/* =========================================================================
   BinBot Launch Control Center • Modern Styling & Responsive Theme
   ========================================================================= */

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Theme variables - Dark (Default) */
  --bg-main: #0B0F19;
  --bg-card: #131B2E;
  --bg-card-hover: #1A243D;
  --bg-elevated: #1E293B;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --accent-wa: #25D366;
  --accent-wa-bg: rgba(37, 211, 102, 0.12);
  --accent-gp: #34A853;
  --accent-gp-bg: rgba(52, 168, 83, 0.12);
  --accent-as: #38BDF8;
  --accent-as-bg: rgba(56, 189, 248, 0.12);
  --accent-blue: #2563EB;
  --accent-critical: #EF4444;
  --accent-warning: #F59E0B;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
}

body.theme-light {
  --bg-main: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-elevated: #E2E8F0;
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;
  
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-dim: #64748B;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10B981;
  color: white;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Header */
.app-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 900;
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 36px;
  height: 36px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #38BDF8 0%, #818CF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.phone-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.phone-num {
  color: #38BDF8;
  font-family: var(--font-mono);
}

.phone-intl {
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* Nav Tabs */
.nav-tabs-bar {
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.nav-tabs-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  padding: 0 1.5rem;
  gap: 0.5rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.9rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: #38BDF8;
  border-bottom-color: #38BDF8;
}

.tab-badge {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
}

.tab-btn.active .tab-badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38BDF8;
  border-color: rgba(56, 189, 248, 0.4);
}

/* Main Content */
.main-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Card */
.hero-card {
  background: linear-gradient(135deg, #131D35 0%, #0F172A 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-pill {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38BDF8;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.2rem;
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Progress Ring Card */
.progress-ring-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.progress-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(#10B981 0% 0%, var(--bg-elevated) 0% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: all 0.5s ease;
}

.circle-inner {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.circle-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.circle-sub {
  font-size: 0.65rem;
  color: #10B981;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.progress-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Platform Cards Grid */
.platform-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.platform-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.platform-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.platform-icon-wrap img {
  width: 26px;
  height: 26px;
}
.bg-wa { background: var(--accent-wa-bg); }
.bg-gp { background: var(--accent-gp-bg); }
.bg-as { background: var(--accent-as-bg); }

.platform-status-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.platform-name {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.platform-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}
.platform-meta code {
  color: #38BDF8;
}

.platform-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.card-progress {
  margin-bottom: 1.25rem;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.fill-wa { background: var(--accent-wa); }
.fill-gp { background: var(--accent-gp); }
.fill-as { background: var(--accent-as); }

.progress-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
}

.card-links {
  display: flex;
  gap: 0.75rem;
}

.link-btn {
  flex: 1;
  text-align: center;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: var(--font-main);
  transition: opacity 0.2s ease;
}
.link-btn:hover { opacity: 0.9; }

.link-wa { background: var(--accent-wa); color: #052E16; }
.link-gp { background: var(--accent-gp); color: white; }
.link-as { background: var(--accent-as); color: #082F49; }
.link-secondary { background: var(--bg-elevated); color: var(--text-main); border: 1px solid var(--border-color); }

/* Section Boxes */
.section-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.section-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Deep Links Grid */
.deep-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1rem;
}

.deep-link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.deep-link-card:hover {
  border-color: #38BDF8;
  transform: translateX(4px);
  background: var(--bg-card-hover);
}

.deep-link-icon {
  font-size: 1.5rem;
}

.deep-link-info {
  flex: 1;
  min-width: 0;
}

.deep-link-title {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.deep-link-url {
  font-size: 0.75rem;
  color: #38BDF8;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deep-link-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.ext-arrow {
  color: var(--text-dim);
  font-size: 1.1rem;
}

/* Diagnostic Alert */
.diagnostic-alert {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(56, 189, 248, 0.15) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.diag-icon {
  font-size: 2rem;
}

.diag-content h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: #38BDF8;
}

.diag-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Diagnostic Steps Grid */
.diag-steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.diag-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s ease;
}

.diag-card:hover {
  border-color: var(--border-hover);
}

.diag-card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.diag-head-info {
  flex: 1;
}

.diag-step-num {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: block;
}

.diag-card-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.diag-body {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.snip-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 0.8rem 0;
  font-size: 0.82rem;
}

.snip-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
}

.status-indicator {
  font-size: 0.75rem;
  font-weight: 700;
}
.status-green { color: #10B981; }

.snip-body div {
  margin-bottom: 0.35rem;
}

.fix-tip {
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--accent-warning);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: var(--text-main);
  margin-top: 0.75rem;
}

/* Checkbox Custom */
.check-container {
  display: block;
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  user-select: none;
}
.check-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.checkmark {
  position: absolute;
  top: -12px;
  left: 0;
  height: 24px;
  width: 24px;
  background-color: var(--bg-elevated);
  border: 2px solid var(--border-hover);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.check-container:hover input ~ .checkmark {
  border-color: #38BDF8;
}
.check-container input:checked ~ .checkmark {
  background-color: #10B981;
  border-color: #10B981;
}
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}
.check-container input:checked ~ .checkmark:after {
  display: block;
}
.check-container .checkmark:after {
  left: 8px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* Badges */
.badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
}
.badge-critical {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-required {
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Platform Banner */
.platform-banner {
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
}
.banner-gp {
  background: linear-gradient(135deg, #064E3B 0%, #0F172A 100%);
  border: 1px solid rgba(52, 168, 83, 0.3);
}
.banner-as {
  background: linear-gradient(135deg, #0C4A6E 0%, #0F172A 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.banner-icon img {
  width: 48px;
  height: 48px;
}
.banner-info {
  flex: 1;
}
.banner-info h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.banner-info p {
  font-size: 0.85rem;
  color: #CBD5E1;
}
.banner-info code {
  color: #38BDF8;
  font-weight: 700;
}

.bg-gp-accent { background: #34A853 !important; }
.bg-as-accent { background: #0284C7 !important; }

/* Specs Grid */
.spec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.spec-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.spec-card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.spec-head-info {
  flex: 1;
}

.spec-step {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  display: block;
}

.spec-title {
  font-size: 1.1rem;
  font-weight: 800;
}

.spec-body {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.spec-list {
  padding-left: 1.25rem;
  line-height: 1.7;
}

/* Field Inputs & Textarea */
.field-item {
  margin-bottom: 1.25rem;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.char-count {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.field-input-box {
  display: flex;
  gap: 0.5rem;
}
.field-input-box input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.88rem;
  outline: none;
}
.field-input-box input:focus {
  border-color: #38BDF8;
}

.field-textarea-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.field-textarea-box textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.85rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}
.field-textarea-box textarea:focus {
  border-color: #38BDF8;
}

.btn-copy {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.btn-copy:hover { opacity: 0.9; }

/* Asset Specs Table */
.asset-specs-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.asset-spec-row {
  display: flex;
  justify-content: space-between;
  background: var(--bg-elevated);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
}
@media (max-width: 600px) {
  .asset-spec-row { flex-direction: column; gap: 0.25rem; }
}

/* Answers Grid */
.answers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

.answer-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.answer-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 700;
}

.answer-val {
  font-size: 0.85rem;
  color: var(--text-main);
}

/* Data Safety Table */
.data-safety-table {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ds-row {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.ds-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.ds-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Copy Hub Grid */
.copy-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.copy-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.copy-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.copy-card-title {
  font-weight: 700;
  font-size: 0.88rem;
}

.copy-card-body {
  font-size: 0.82rem;
  color: #38BDF8;
  word-break: break-all;
}

/* Assets Gallery Grid */
.assets-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.asset-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.asset-preview-box {
  height: 140px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.bg-dark-preview {
  background: #0F172A;
}

.asset-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.asset-info strong {
  font-size: 0.88rem;
}
.asset-info span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Code & cURL Box */
.code-box {
  background: #090D16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0.75rem 0;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
}

.copy-code-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38BDF8;
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

pre code {
  display: block;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #CBD5E1;
  overflow-x: auto;
  line-height: 1.5;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.data-table th, .data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.data-table th {
  color: var(--text-dim);
  font-weight: 700;
}

/* Buttons & Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent-blue);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: #38BDF8;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
}

.btn-xs {
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1rem;
}

.text-link {
  color: #38BDF8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.step-ol {
  padding-left: 1.25rem;
  line-height: 1.8;
  margin-top: 0.5rem;
}

/* Footer */
.app-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: none;
}
.footer-links a:hover {
  color: #38BDF8;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
    padding: 1.75rem;
  }
  .progress-ring-card {
    display: none;
  }
}

/* ========================================================================= */
/* GEMINI CHAT INTERFACE & AI REQUIREMENTS ASSISTANT                         */
/* ========================================================================= */
.gemini-chat-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.gemini-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.08);
}

.gemini-header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.gemini-avatar-glow {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #38BDF8, #A855F7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
  animation: floatIcon 3s ease-in-out infinite alternate;
}

@keyframes floatIcon {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(-4px) scale(1.04); }
}

.gemini-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.gemini-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.gemini-model-badge {
  background: rgba(168, 85, 247, 0.2);
  color: #C084FC;
  border: 1px solid rgba(168, 85, 247, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.gemini-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.gemini-header-actions {
  display: flex;
  gap: 0.75rem;
}

/* Quick Prompts */
.quick-prompts-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

.prompt-chips-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.prompt-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.prompt-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.prompt-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38BDF8;
  transform: translateY(-2px);
}

/* Chat Stream */
.chat-stream-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  min-height: 480px;
  max-height: 650px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scroll-behavior: smooth;
}

.chat-bubble {
  display: flex;
  gap: 1rem;
  max-width: 90%;
  animation: fadeInMsg 0.25s ease-out forwards;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.bot-bubble {
  align-self: flex-start;
}

.chat-bubble.user-bubble {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bubble-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.bot-bubble .bubble-avatar {
  background: linear-gradient(135deg, #0284C7, #9333EA);
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.3);
}

.user-bubble .bubble-avatar {
  background: #2563EB;
}

.bubble-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  color: var(--text-main);
  font-size: 0.9rem;
  line-height: 1.6;
  position: relative;
}

.bot-bubble .bubble-content {
  border-top-left-radius: 4px;
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(168, 85, 247, 0.25);
}

.user-bubble .bubble-content {
  border-top-right-radius: 4px;
  background: #1E3A8A;
  border-color: #3B82F6;
  color: white;
}

.bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.35rem;
}

.user-bubble .bubble-meta {
  color: rgba(255, 255, 255, 0.7);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.bubble-body p {
  margin: 0 0 0.75rem 0;
}
.bubble-body p:last-child {
  margin-bottom: 0;
}

.bubble-body ul, .bubble-body ol {
  margin: 0.5rem 0 0.75rem 1.25rem;
  padding: 0;
}

.bubble-body li {
  margin-bottom: 0.35rem;
}

.bubble-body code {
  background: rgba(0, 0, 0, 0.4);
  color: #38BDF8;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.bubble-body pre {
  background: #0B0F19;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  margin: 0.75rem 0;
}

.bubble-body pre code {
  background: transparent;
  padding: 0;
  color: #E2E8F0;
  display: block;
}

.bubble-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.6rem;
}

.bubble-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bubble-copy-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38BDF8;
  border-color: #38BDF8;
}

/* Chat Input */
.chat-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}

.chat-input-form {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.chat-textarea {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.92rem;
  resize: none;
  line-height: 1.5;
  max-height: 140px;
  outline: none;
  transition: border-color 0.2s ease;
}

.chat-textarea:focus {
  border-color: #A855F7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.chat-send-btn {
  height: 48px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0284C7, #9333EA);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.4);
}

.chat-input-caption {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  text-align: right;
}

/* Floating AI Button */
.floating-gemini-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #0284C7, #9333EA);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 8px 25px rgba(147, 51, 234, 0.4);
  cursor: pointer;
  z-index: 999;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-gemini-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 30px rgba(147, 51, 234, 0.6);
}

/* Modal */
.gemini-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.gemini-modal.show {
  display: flex;
}

.gemini-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: zoomModal 0.2s ease-out;
}

@keyframes zoomModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.gemini-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.gemini-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-close-x {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.gemini-modal-body {
  padding: 1.5rem;
}

.modal-info {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.gemini-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-color);
}

/* Print Styles */
@media print {
  .app-header, .nav-tabs-bar, .header-actions, .btn, .link-btn, .app-footer, #toast, .floating-gemini-btn, .gemini-chat-container {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
  .tab-pane {
    display: block !important;
    page-break-after: always;
  }
  .section-box, .platform-card, .diag-card, .spec-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
  }
}
