:root {
  --navy: #0A1628;
  --navy-light: #1A2744;
  --emerald: #059669;
  --emerald-light: #10B981;
  --gold: #C9A227;
  --gold-light: #D4AF37;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --danger: #DC2626;
  --success: #059669;
  --shadow: 0 4px 6px -1px rgba(10, 22, 40, 0.1), 0 2px 4px -2px rgba(10, 22, 40, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(10, 22, 40, 0.1), 0 4px 6px -4px rgba(10, 22, 40, 0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--emerald); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--emerald-light); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header {
  background: var(--navy);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  text-decoration: none;
}

.brand-logo {
  width: auto;
  height: 56px;
  max-width: 200px;
  border-radius: 0;
  object-fit: contain;
}

.brand-logo--compact {
  height: 48px;
  max-width: 160px;
}

.brand-logo--login {
  height: auto;
  max-width: min(280px, 90vw);
  margin: 0 auto 1rem;
}

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 500; }
.site-nav a:hover { color: var(--gold); }

.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

/* Hero banner */
.hero-banner {
  background: var(--white);
  border-bottom: 4px solid var(--gold);
  line-height: 0;
}

.hero-banner-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

.hero-compact {
  padding: 3rem 0 3.5rem;
}

.hero-compact h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #0D2137 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--emerald), var(--gold), var(--emerald));
}

.hero-content { max-width: 720px; }

.eyebrow {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 2rem; max-width: 560px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary { background: var(--emerald); color: var(--white); border-color: var(--emerald); }
.btn-primary:hover { background: var(--emerald-light); border-color: var(--emerald-light); color: var(--white); }

.btn-gold { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--navy); }

.btn-secondary { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-secondary:hover { border-color: var(--white); color: var(--white); }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-success { background: var(--success); color: var(--white); border-color: var(--success); }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--gray-50); }

.section-heading { text-align: center; margin-bottom: 3rem; }
.section-heading h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.section-intro { color: var(--gray-500); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }

/* Service Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
}

.service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.service-icon {
  width: 48px; height: 48px;
  background: var(--navy);
  color: var(--gold);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.service-card h3 { font-family: var(--font-serif); color: var(--navy); margin-bottom: 0.5rem; font-size: 1.25rem; }
.service-card p { color: var(--gray-500); font-size: 0.95rem; margin-bottom: 1rem; }

.service-list { list-style: none; }
.service-list li {
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--gray-700);
  padding-left: 1.25rem;
  position: relative;
}
.service-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--emerald);
  font-weight: 700;
}

.coming-soon-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.5rem;
}

/* Packages */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.package-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.package-card.featured { border-color: var(--gold); position: relative; }
.package-card.featured::after {
  content: "Popular";
  position: absolute;
  top: -12px; right: 1.5rem;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.package-price {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--navy);
  margin: 1rem 0;
}

.package-price .period { font-size: 1rem; color: var(--gray-500); font-family: var(--font-sans); }
.package-price.free { color: var(--emerald); }

/* Disclaimer */
.disclaimer-box {
  background: var(--gray-100);
  border-left: 4px solid var(--gold);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.disclaimer-box strong { color: var(--navy); }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.4rem; color: var(--navy); font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.95rem; }
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 { color: var(--gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.footer-grid a { color: rgba(255,255,255,0.7); display: block; padding: 0.25rem 0; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* Admin */
.admin-shell { min-height: calc(100vh - 80px); }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }

.admin-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.admin-card h2, .admin-card h3 { color: var(--navy); margin-bottom: 0.5rem; font-family: var(--font-serif); }
.admin-card p { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 1rem; }
.admin-card .btn { margin-right: 0.5rem; margin-bottom: 0.5rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.stat-value { font-size: 2rem; font-weight: 700; color: var(--navy); font-family: var(--font-serif); }
.stat-label { font-size: 0.85rem; color: var(--gray-500); margin-top: 0.25rem; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.data-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--gray-200); }
.data-table tr:hover td { background: var(--gray-50); }

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-new { background: #DBEAFE; color: #1E40AF; }
.status-accepted { background: #D1FAE5; color: #065F46; }
.status-needs-info { background: #FEF3C7; color: #92400E; }
.status-not-accepting { background: #FEE2E2; color: #991B1B; }
.status-refer { background: #F3E8FF; color: #6B21A8; }

/* Admin sidebar layout */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 72px); }

.admin-sidebar {
  background: var(--navy);
  padding: 1.5rem 0;
  color: var(--white);
}

.admin-sidebar a {
  display: block;
  padding: 0.6rem 1.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  border-left: 3px solid transparent;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  color: var(--white);
  background: rgba(255,255,255,0.05);
  border-left-color: var(--gold);
}

.admin-main { padding: 2rem; background: var(--gray-50); }

.panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.panel-header h2 { font-family: var(--font-serif); color: var(--navy); font-size: 1.25rem; }

.action-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 22, 40, 0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.hidden { display: none !important; }

/* Client portal */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.checklist-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--emerald); }

.tab-nav { display: flex; gap: 0; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.5rem; }
.tab-nav button {
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tab-nav button.active { color: var(--emerald); border-bottom-color: var(--emerald); }

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); padding: 1rem; }
  .site-nav.open { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 2.5rem 0; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}

.persona-appearance {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.persona-avatar {
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--emerald);
}

.persona-avatar--photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.persona-avatar--lg { width: 72px; height: 72px; }
.persona-avatar--md { width: 56px; height: 56px; }

.persona-bubble {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  border-left: 4px solid var(--emerald);
}

.persona-bubble__meta strong {
  display: block;
  color: var(--navy);
}

.persona-bubble__title {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 0.35rem;
}

.persona-bubble__text {
  margin: 0;
  color: var(--gray-700);
  font-size: 0.95rem;
  line-height: 1.5;
}
