/* Apple-inspired Glassy Design System */

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

:root {
  --font-heading: "Stack Sans Notch", sans-serif;
  --font-body: "Roboto Condensed", sans-serif;
}

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #111827;
}

/* Glassy Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  gap: 8px;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e40af 0%, #0284c7 100%);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 14px;
}

.btn-secondary {
  background: rgba(107, 114, 128, 0.15);
  color: #4b5563;
  border: 1px solid rgba(107, 114, 128, 0.2);
}

.btn-secondary:hover {
  background: rgba(107, 114, 128, 0.25);
  color: #374151;
}

/* Glassy Cards */
.glass-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.glass-card-solid {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Input Fields */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #0ea5e9;
  background: white;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #0f172a;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.slide-in {
  animation: slideIn 0.4s ease-out;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-white {
  color: white;
}

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

/* Shared Navigation Auth States */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-auth__dashboard {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid rgba(14, 165, 233, 0.6);
  background: linear-gradient(135deg, rgba(191, 219, 254, 0.55) 0%, rgba(125, 211, 252, 0.55) 100%);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.28);
  color: #0f172a;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-auth__dashboard:hover {
  background: linear-gradient(135deg, rgba(191, 219, 254, 0.7) 0%, rgba(56, 189, 248, 0.7) 100%);
  border-color: rgba(2, 132, 199, 0.8);
}

.nav-auth__status {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
}

/* Home Page */
body.page-home {
  background: linear-gradient(135deg, #0f172a 0%, #0ea5e9 100%);
  min-height: 100vh;
  padding: 20px;
}

.page-home .hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 20px 24px;
  text-align: center;
}

.page-home .hero h1 {
  font-size: 56px;
  color: white;
  margin-bottom: 24px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
}

.page-home .hero p {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.page-home .hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-home .features {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.page-home .feature-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 28px;
  padding: 40px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.page-home .feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%);
}

.page-home .feature-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
}

.page-home .feature-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.page-home .feature-card h3 {
  font-size: 22px;
  color: white;
  margin-bottom: 12px;
  font-weight: 600;
}

.page-home .feature-card p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  font-size: 15px;
}

.page-home .demo-section {
  max-width: 1400px;
  margin: 100px auto;
  padding: 0 24px;
}

.page-home .demo-title {
  text-align: center;
  font-size: 48px;
  color: white;
  margin-bottom: 16px;
  font-weight: 800;
  letter-spacing: -1px;
}

.page-home .demo-subtitle {
  text-align: center;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 64px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Flow Visualization */
.page-home .demo-flow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 80px;
  flex-wrap: wrap;
  padding: 0 20px;
}

.page-home .flow-step {
  display: flex;
  align-items: center;
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.page-home .flow-step:nth-child(1) { animation-delay: 0.1s; }
.page-home .flow-step:nth-child(2) { animation-delay: 0.3s; }
.page-home .flow-step:nth-child(3) { animation-delay: 0.5s; }

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

.page-home .flow-card {
  position: relative;
  min-width: 340px;
  max-width: 360px;
}

.page-home .glass-flow-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 28px;
  padding: 32px 28px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
}

.page-home .glass-flow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%);
}

.page-home .glass-flow-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.15);
}

.page-home .flow-number {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: white;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.page-home .flow-icon {
  font-size: 56px;
  text-align: center;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.page-home .flow-title {
  font-size: 24px;
  color: white;
  margin-bottom: 24px;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-home .flow-example {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 20px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.page-home .flow-arrow {
  font-size: 32px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 20px;
  font-weight: 300;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Email Preview */
.page-home .email-preview {
  font-size: 14px;
}

.page-home .email-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.page-home .email-from {
  font-weight: 700;
  font-size: 15px;
  color: #1f2937;
}

.page-home .email-subject {
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
}

.page-home .email-body {
  color: #374151;
  line-height: 1.6;
  margin-bottom: 14px;
  font-style: italic;
}

.page-home .email-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-home .meta-tag {
  font-size: 11px;
  padding: 5px 10px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 1px solid #93c5fd;
  border-radius: 999px;
  color: #1e40af;
  font-weight: 600;
}

/* AI Processing */
.page-home .ai-processing {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-home .processing-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid #10b981;
  border-radius: 8px;
  font-size: 14px;
  color: #065f46;
  animation: checkIn 0.5s ease-out forwards;
  opacity: 0;
}

.page-home .processing-item:nth-child(1) { animation-delay: 0.8s; }
.page-home .processing-item:nth-child(2) { animation-delay: 1.0s; }
.page-home .processing-item:nth-child(3) { animation-delay: 1.2s; }
.page-home .processing-item:nth-child(4) { animation-delay: 1.4s; }

@keyframes checkIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.page-home .check-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 50%;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

/* Draft Preview */
.page-home .draft-preview {
  font-size: 14px;
}

.page-home .draft-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c3aed;
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  border: 1px solid #c4b5fd;
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 14px;
}

.page-home .draft-body {
  color: #374151;
  line-height: 1.7;
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(249, 250, 251, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.page-home .draft-actions {
  display: flex;
  gap: 8px;
}

.page-home .draft-action-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: var(--font-heading);
}

.page-home .draft-action-btn.edit {
  background: rgba(107, 114, 128, 0.15);
  color: #374151;
  border: 2px solid rgba(107, 114, 128, 0.25);
}

.page-home .draft-action-btn.edit:hover {
  background: rgba(107, 114, 128, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-home .draft-action-btn.send {
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.page-home .draft-action-btn.send:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0891b2 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

.page-home .demo-container {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  padding: 48px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  margin-top: 40px;
}

.page-home .demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.page-home .demo-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-home .glass-detail-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.page-home .glass-detail-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.page-home .demo-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #374151;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 16px;
}

.page-home .demo-content {
  color: #111827;
  line-height: 1.7;
  font-size: 15px;
}

.page-home .demo-meta {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 12px;
}

.page-home .demo-meta strong {
  color: #111827;
}

.page-home .cta-section {
  max-width: 800px;
  margin: 100px auto;
  padding: 0 24px;
  text-align: center;
}

.page-home .cta-box {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 32px;
  padding: 64px 48px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.page-home .cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%);
}

.page-home .cta-box:hover {
  transform: translateY(-4px);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}

.page-home .cta-box h2 {
  font-size: 36px;
  color: white;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-home .cta-box p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
  line-height: 1.6;
}

.page-home .footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-home .footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-home .footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.page-home .footer-links a:hover {
  color: white;
}

@media (max-width: 768px) {
  body.page-home {
    padding: 16px;
  }

  .page-home .hero h1 {
    font-size: 36px;
  }

  .page-home .hero p {
    font-size: 18px;
  }

  .page-home .demo-flow {
    flex-direction: column;
    gap: 24px;
  }

  .page-home .flow-arrow {
    transform: rotate(90deg);
    margin: 0;
  }

  .page-home .flow-card {
    min-width: 100%;
    max-width: 100%;
  }

  .page-home .demo-grid {
    grid-template-columns: 1fr;
  }

  .page-home .feature-card {
    padding: 32px;
  }

  .page-home .demo-container {
    padding: 32px 24px;
  }

  .page-home .cta-box {
    padding: 48px 32px;
  }
}

/* Dashboard Page */
body.page-dashboard {
  background: linear-gradient(135deg, #0f172a 0%, #0ea5e9 100%);
  min-height: 100vh;
  padding: 20px;
}

.page-dashboard .container {
  max-width: 1100px;
  margin: 0 auto;
}

.page-dashboard .dashboard-title h1 {
  font-size: 28px;
  color: white;
  margin-bottom: 4px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-dashboard .dashboard-title p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.page-dashboard .accounts-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  padding: 40px;
  border-radius: 28px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
}

.page-dashboard .accounts-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%);
}

.page-dashboard .how-to-test-card {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  padding: 28px;
  margin: 0 auto 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  color: rgba(255, 255, 255, 0.92);
}

.page-dashboard .how-to-test-card h2 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #ffffff;
}

.page-dashboard .how-to-test-card p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.page-dashboard .how-to-test-card code {
  font-family: "Menlo", "Monaco", "Courier New", monospace;
  background: rgba(14, 165, 233, 0.2);
  color: #ecfeff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.95em;
  letter-spacing: 0.08em;
}

.page-dashboard .how-to-test-card ul {
  padding-left: 22px;
  display: grid;
  gap: 10px;
  list-style: disc;
}

.page-dashboard .how-to-test-card li {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.page-dashboard .accounts-section h2 {
  font-size: 22px;
  margin-bottom: 24px;
  font-weight: 600;
}

.page-dashboard .account-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 28px;
  transition: all 0.3s ease;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.page-dashboard .account-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.6);
}

.page-dashboard .account-card.disabled {
  opacity: 0.6;
  background: rgba(249, 250, 251, 0.95);
}

.page-dashboard .account-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-dashboard .account-info h3 {
  font-size: 18px;
  color: #1f2937;
  margin-bottom: 4px;
  font-weight: 600;
}

.page-dashboard .account-info p {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 8px;
}

.page-dashboard .account-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-dashboard .status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.page-dashboard .status-badge.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.page-dashboard .status-badge.inactive {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.page-dashboard .empty-state {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.9);
}

.page-dashboard .empty-state h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: white;
  font-weight: 600;
}

.page-dashboard .empty-state p {
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.8);
}

.page-dashboard .loading {
  text-align: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
}

.page-dashboard .meta {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 8px;
}

.page-dashboard .prompt-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.page-dashboard .prompt-section h4 {
  font-size: 16px;
  color: #1f2937;
  margin-bottom: 12px;
  font-weight: 600;
}

.page-dashboard .prompt-editor {
  margin-top: 12px;
}

.page-dashboard .prompt-editor textarea {
  width: 100%;
  min-height: 200px;
  padding: 14px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-family: "Menlo", "Monaco", "Courier New", monospace;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 12px;
  line-height: 1.6;
  transition: border-color 0.2s;
  background: white;
}

.page-dashboard .prompt-editor textarea:focus {
  outline: none;
  border-color: #0ea5e9;
}

.page-dashboard .kb-view-pane {
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 16px;
  min-height: 400px;
  overflow-y: auto;
  background: rgba(249, 250, 251, 0.5);
  font-family: "Menlo", "Monaco", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.page-dashboard .kb-view-pane * {
  font-family: "Menlo", "Monaco", "Courier New", monospace !important;
}

.page-dashboard .kb-edit-container {
  display: none;
  margin-bottom: 12px;
}

.page-dashboard .kb-edit-container.active {
  display: block;
}

.page-dashboard .kb-toolbar {
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 10px;
  background: rgba(249, 250, 251, 0.8);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.page-dashboard .kb-toolbar button {
  padding: 8px 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  transition: all 0.2s;
}

.page-dashboard .kb-toolbar button:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

.page-dashboard .kb-editor {
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 0 0 12px 12px;
  padding: 16px;
  min-height: 400px;
  overflow-y: auto;
  background: white;
  font-family: "Menlo", "Monaco", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
}

.page-dashboard .kb-editor * {
  font-family: "Menlo", "Monaco", "Courier New", monospace !important;
}

.page-dashboard .kb-editor h1,
.page-dashboard .kb-editor h2,
.page-dashboard .kb-editor h3,
.page-dashboard .kb-editor h4 {
  margin-top: 1em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.page-dashboard .kb-editor h1 { font-size: 1.5em; }
.page-dashboard .kb-editor h2 { font-size: 1.3em; }
.page-dashboard .kb-editor h3 { font-size: 1.1em; }
.page-dashboard .kb-editor h4 { font-size: 1em; }

.page-dashboard .kb-editor ul,
.page-dashboard .kb-editor ol {
  margin: 1em 0;
  padding-left: 2em;
}

.page-dashboard .kb-editor p {
  margin: 0.5em 0;
}

.page-dashboard .kb-view-pane.hidden {
  display: none;
}

.page-dashboard .kb-edit-toggle {
  margin-bottom: 12px;
}

.page-dashboard .kb-edit-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(102, 126, 234, 0.12);
  border: 1px solid rgba(102, 126, 234, 0.25);
  color: #374151;
  cursor: pointer;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.page-dashboard .kb-edit-toggle button:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.35);
  color: #1f2937;
  transform: translateY(-1px);
}

.page-dashboard .kb-view-pane h1 { font-size: 1.5em; margin-top: 1em; margin-bottom: 0.5em; font-weight: 600; }
.page-dashboard .kb-view-pane h2 { font-size: 1.3em; margin-top: 1em; margin-bottom: 0.5em; font-weight: 600; }
.page-dashboard .kb-view-pane h3 { font-size: 1.1em; margin-top: 0.8em; margin-bottom: 0.4em; font-weight: 600; }
.page-dashboard .kb-view-pane h4 { font-size: 1em; margin-top: 0.6em; margin-bottom: 0.3em; font-weight: 600; }

.page-dashboard .kb-view-pane p {
  margin-bottom: 1em;
}

.page-dashboard .kb-view-pane ul,
.page-dashboard .kb-view-pane ol {
  margin-bottom: 1em;
  padding-left: 2em;
}

.page-dashboard .kb-view-pane li {
  margin-bottom: 0.5em;
}

.page-dashboard .kb-view-pane code {
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
}

.page-dashboard .kb-view-pane pre {
  background: rgba(0, 0, 0, 0.05);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1em;
}

.page-dashboard .kb-view-pane pre code {
  background: none;
  padding: 0;
}

.page-dashboard .kb-view-pane hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin: 1.5em 0;
}

.page-dashboard .kb-view-pane strong {
  font-weight: 600;
}

.page-dashboard .prompt-help {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
  line-height: 1.5;
}

.page-dashboard .prompt-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-dashboard .collapsible-section {
  margin-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 20px;
}

.page-dashboard .collapsible-header {
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  transition: opacity 0.2s;
}

.page-dashboard .collapsible-header:hover {
  opacity: 0.7;
}

.page-dashboard .collapsible-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: #1f2937;
  font-weight: 600;
}

.page-dashboard .collapsible-icon {
  font-size: 12px;
  color: #0ea5e9;
  transition: transform 0.2s;
  display: inline-block;
  width: 16px;
}

.page-dashboard .collapsible-hint {
  font-size: 13px;
  color: #6b7280;
  font-weight: 400;
}

.page-dashboard .collapsible-content {
  margin-top: 16px;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  body.page-dashboard {
    padding: 16px;
  }

  .page-dashboard .account-header {
    flex-direction: column;
  }
}

/* Privacy Page */
body.page-privacy {
  background: linear-gradient(135deg, #0f172a 0%, #0ea5e9 100%);
  min-height: 100vh;
}

.page-privacy .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}

.page-privacy .content-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.page-privacy h1 {
  font-size: 42px;
  color: #1a202c;
  margin-bottom: 16px;
  font-weight: 800;
  letter-spacing: -1px;
}

.page-privacy .last-updated {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 32px;
  font-weight: 500;
}

.page-privacy h2 {
  font-size: 26px;
  color: #1f2937;
  margin-top: 40px;
  margin-bottom: 16px;
  font-weight: 700;
}

.page-privacy h3 {
  font-size: 20px;
  color: #374151;
  margin-top: 28px;
  margin-bottom: 12px;
  font-weight: 600;
}

.page-privacy p,
.page-privacy li {
  color: #4b5563;
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 16px;
}

.page-privacy ul {
  padding-left: 24px;
  margin-bottom: 20px;
}

.page-privacy li {
  margin-bottom: 12px;
}

.page-privacy strong {
  color: #1f2937;
  font-weight: 600;
}

.page-privacy .highlight-box {
  background: linear-gradient(135deg, #ebf8ff 0%, #dbeafe 100%);
  border: 1px solid #bee3f8;
  border-radius: 16px;
  padding: 24px;
  margin: 28px 0;
}

.page-privacy .highlight-box p {
  color: #1e40af;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .page-privacy .container {
    padding: 60px 16px 48px;
  }

  .page-privacy .content-card {
    padding: 32px 24px;
  }

  .page-privacy h1 {
    font-size: 32px;
  }

  .page-privacy h2 {
    font-size: 22px;
  }
}

/* Terms Page */
body.page-terms {
  background: linear-gradient(135deg, #0f172a 0%, #0ea5e9 100%);
  min-height: 100vh;
}

.page-terms .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}

.page-terms .content-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.page-terms h1 {
  font-size: 42px;
  color: #1a202c;
  margin-bottom: 16px;
  font-weight: 800;
  letter-spacing: -1px;
}

.page-terms .last-updated {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 32px;
  font-weight: 500;
}

.page-terms h2 {
  font-size: 26px;
  color: #1f2937;
  margin-top: 40px;
  margin-bottom: 16px;
  font-weight: 700;
}

.page-terms h3 {
  font-size: 20px;
  color: #374151;
  margin-top: 28px;
  margin-bottom: 12px;
  font-weight: 600;
}

.page-terms p,
.page-terms li {
  color: #4b5563;
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 16px;
}

.page-terms ul {
  padding-left: 24px;
  margin-bottom: 20px;
}

.page-terms li {
  margin-bottom: 12px;
}

.page-terms strong {
  color: #1f2937;
  font-weight: 600;
}

.page-terms .warning-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fbbf24;
  border-radius: 16px;
  padding: 24px;
  margin: 28px 0;
}

.page-terms .warning-box p {
  color: #92400e;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .page-terms .container {
    padding: 60px 16px 48px;
  }

  .page-terms .content-card {
    padding: 32px 24px;
  }

  .page-terms h1 {
    font-size: 32px;
  }

  .page-terms h2 {
    font-size: 22px;
  }
}

/* Login Page */
body.page-login {
  background: linear-gradient(135deg, #0f172a 0%, #0ea5e9 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.page-login .login-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 56px 48px;
  max-width: 480px;
  width: 100%;
}

.page-login .logo {
  text-align: center;
  margin-bottom: 40px;
  color: inherit;
}

.page-login .logo h1 {
  font-size: 32px;
  color: #1a202c;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-login .logo p {
  color: #718096;
  font-size: 16px;
  line-height: 1.5;
}

.page-login .login-button {
  width: 100%;
  padding: 16px 24px;
  background: white;
  color: #444;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 20px;
}

.page-login .login-button:hover {
  border-color: #0ea5e9;
  background: #f7fafc;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-login .signup-button {
  background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%);
  color: white;
  border: none;
}

.page-login .signup-button:hover {
  background: linear-gradient(135deg, #1e40af 0%, #0284c7 100%);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}

.page-login .error-message {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  display: none;
  font-weight: 500;
}

.page-login .error-message.show {
  display: block;
}

.page-login .google-icon {
  width: 24px;
  height: 24px;
}

.page-login .info-box {
  background: linear-gradient(135deg, #ebf8ff 0%, #dbeafe 100%);
  border: 1px solid #bee3f8;
  color: #1e40af;
  padding: 20px;
  border-radius: 16px;
  font-size: 14px;
  margin-top: 28px;
  line-height: 1.6;
}

.page-login .info-box strong {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  color: #1e3a8a;
}

.page-login .back-link {
  text-align: center;
  margin-top: 24px;
}

.page-login .back-link a {
  color: #1a202c;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.page-login .back-link a:hover {
  color: #0ea5e9;
}

@media (max-width: 480px) {
  .page-login .login-container {
    padding: 40px 28px;
  }

  .page-login .logo h1 {
    font-size: 28px;
  }
}

/* Setup Page */
.page-setup * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.page-setup {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #0f172a 0%, #0ea5e9 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.page-setup .setup-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 100%;
}

.page-setup .setup-card h1 {
  font-size: 24px;
  color: #333;
  margin-bottom: 8px;
}

.page-setup .setup-card p {
  color: #666;
  font-size: 14px;
  margin-bottom: 24px;
}

.page-setup .success-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 20px;
}

.page-setup .form-group {
  margin-bottom: 20px;
}

.page-setup .form-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
}

.page-setup .form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.page-setup .form-group input:focus {
  outline: none;
  border-color: #0ea5e9;
}

.page-setup .form-group input:disabled {
  background: #f9fafb;
  cursor: not-allowed;
}

.page-setup .hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.page-setup .btn {
  width: 100%;
  padding: 12px;
  background: #1d4ed8;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
  display: inline-block;
}

.page-setup .btn:hover:not(:disabled) {
  background: #1e40af;
}

.page-setup .btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.page-setup .loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.page-setup .error {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
}

.page-setup .success-message {
  text-align: center;
  padding: 40px 20px;
}

.page-setup .success-message h2 {
  color: #065f46;
  margin-bottom: 12px;
}

.page-setup .success-message p {
  margin-bottom: 24px;
}

/* Glassy Header Layout */
.dashboard-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  padding: 24px 32px;
  border-radius: 24px;
  margin: 24px auto;
  max-width: 1100px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.dashboard-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%);
}

.dashboard-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-right: 20px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover {
  color: white;
}

.logo {
  display: inline-flex;
  align-items: center;
  color: white;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.logo:hover {
  color: white;
}

@media (max-width: 768px) {
  .dashboard-header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-actions {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    margin-right: 0;
    margin-bottom: 8px;
  }
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-row {
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}