/* ============================================================
   BestAdmins Design System
   ============================================================ */
:root {
  --navy:        #0d1b2a;
  --navy-mid:    #1b2d45;
  --navy-light:  #243b55;
  --blue:        #1565c0;
  --blue-hover:  #0d47a1;
  --teal:        #00acc1;
  --teal-hover:  #00838f;
  --white:       #ffffff;
  --off-white:   #f5f7fa;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --border:      #e2e8f0;
  --green:       #10b981;
  --red:         #ef4444;
  --yellow:      #f59e0b;
  --radius:      8px;
  --radius-lg:   16px;
  --shadow:      0 2px 8px rgba(0,0,0,.08);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
  --transition:  all .2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); text-decoration: underline; }

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

/* ---- Layout ---- */
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ---- Typography ---- */
h1,h2,h3,h4 { font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 640px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-weight: 600; font-size: .95rem; cursor: pointer;
  border: 2px solid transparent; transition: var(--transition);
  text-decoration: none !important;
}
.btn-primary   { background: var(--blue);  color: #fff; }
.btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-teal      { background: var(--teal);  color: #fff; }
.btn-teal:hover{ background: var(--teal-hover); color: #fff; }
.btn-outline   { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline-white:hover { background: rgba(255,255,255,.15); color: #fff; }
.btn-sm        { padding: 8px 18px; font-size: .875rem; }
.btn-lg        { padding: 16px 36px; font-size: 1.05rem; }

/* ---- Navbar ---- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.navbar-brand {
  font-size: 1.4rem; font-weight: 800; color: #fff !important;
  text-decoration: none !important; letter-spacing: -.02em;
}
.navbar-brand span { color: var(--teal); }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,.8); padding: 8px 12px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500; transition: var(--transition);
  text-decoration: none !important;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-cta { margin-left: 8px; }

/* Mobile nav toggle */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 10px 8px; flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: #fff; border-radius: 2px; transition: var(--transition);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; flex-direction: column; align-items: stretch;
    position: fixed; top: 64px; left: 0; right: 0; z-index: 200;
    background: var(--navy-mid);
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 12px 16px 16px; gap: 2px;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 11px 14px; border-radius: var(--radius); }
  .nav-links .nav-cta { margin-left: 0; margin-top: 8px; text-align: center; }
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, #0a3d62 100%);
  color: #fff; padding: 100px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 80% at 70% 50%, rgba(0,172,193,.12) 0%, transparent 60%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge { display: inline-block; background: rgba(0,172,193,.2); color: var(--teal); border: 1px solid rgba(0,172,193,.4); padding: 4px 14px; border-radius: 20px; font-size: .8rem; font-weight: 600; letter-spacing: .05em; margin-bottom: 20px; text-transform: uppercase; }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero .lead { color: rgba(255,255,255,.8); margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hero-stats { display: flex; gap: 32px; margin-top: 48px; padding-top: 36px; border-top: 1px solid rgba(255,255,255,.1); }
.hero-stat-num { font-size: 2rem; font-weight: 800; color: var(--teal); }
.hero-stat-label { font-size: .8rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .05em; }

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-img { display: none; }
  .hero-stats { gap: 20px; }
}

/* ---- Cards ---- */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow); transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-icon { width: 52px; height: 52px; border-radius: var(--radius); margin-bottom: 20px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.card-icon-blue  { background: #e3f2fd; }
.card-icon-teal  { background: #e0f7fa; }
.card-icon-green { background: #e8f5e9; }

.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---- Pricing ---- */
.pricing-card {
  border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px 28px; text-align: center; transition: var(--transition);
  background: var(--white);
}
.pricing-card.featured {
  border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), var(--shadow-lg);
}
.pricing-badge { background: var(--blue); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 12px; border-radius: 12px; display: inline-block; margin-bottom: 16px; text-transform: uppercase; }
.pricing-price { font-size: 2.8rem; font-weight: 800; color: var(--navy); line-height: 1; }
.pricing-period { font-size: .9rem; color: var(--text-muted); }
.pricing-features { list-style: none; text-align: left; margin: 24px 0; }
.pricing-features li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.pricing-features li::before { content: '✓ '; color: var(--green); font-weight: 700; }

/* ---- Forms ---- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 6px; color: var(--text); }
.form-control {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .95rem; color: var(--text);
  transition: var(--transition); background: var(--white);
}
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,101,192,.12); }
.form-control.is-invalid { border-color: var(--red); }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.errorlist { list-style: none; color: var(--red); font-size: .85rem; margin-top: 4px; }
.form-check { display: flex; align-items: flex-start; gap: 10px; }
.form-check input[type=checkbox] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--blue); }

.form-section { background: var(--off-white); border-radius: var(--radius-lg); padding: 32px; margin-bottom: 28px; }
.form-section h3 { margin-bottom: 20px; color: var(--navy); }

/* ---- Alerts / Messages ---- */
.messages-list { list-style: none; }
.alert {
  padding: 12px 18px; border-radius: var(--radius); margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px; font-size: .9rem;
}
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid var(--green); }
.alert-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--red); }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid var(--blue); }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid var(--yellow); }

/* ---- Footer ---- */
.footer { background: var(--navy); color: rgba(255,255,255,.7); padding: 60px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: rgba(255,255,255,.6); font-size: .875rem; text-decoration: none; transition: var(--transition); }
.footer ul a:hover { color: var(--teal); }
.footer-brand { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-brand span { color: var(--teal); }
.footer-desc { font-size: .875rem; line-height: 1.7; }
.footer-bottom { padding-top: 28px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: rgba(255,255,255,.4); }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- Section headers ---- */
.section-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--teal); margin-bottom: 12px; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* ---- Trust bar ---- */
.trust-bar { background: var(--navy-mid); padding: 20px 0; }
.trust-items { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.7); font-size: .875rem; font-weight: 500; }
.trust-icon { font-size: 1.2rem; }

/* ---- Portal ---- */
.portal-layout { display: grid; grid-template-columns: 240px 1fr; gap: 0; min-height: calc(100vh - 64px); }
.portal-sidebar { background: var(--off-white); border-right: 1px solid var(--border); padding: 32px 20px; }
.portal-sidebar nav ul { list-style: none; }
.portal-sidebar nav li { margin-bottom: 4px; }
.portal-sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius);
  color: var(--text); font-size: .9rem; text-decoration: none !important;
  transition: var(--transition);
}
.portal-sidebar nav a:hover, .portal-sidebar nav a.active {
  background: var(--blue); color: #fff;
}
.portal-main { padding: 40px 48px; }
@media (max-width: 768px) {
  .portal-layout { grid-template-columns: 1fr; }
  .portal-sidebar { padding: 16px 20px; }
  .portal-main { padding: 24px 20px; }
}

/* ---- Chatbot widget ---- */
#chatbot-widget {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  font-family: inherit;
}
#chatbot-btn {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--blue); color: #fff; border: none;
  cursor: pointer; font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(21,101,192,.4);
  transition: var(--transition); display: flex; align-items: center; justify-content: center;
}
#chatbot-btn:hover { background: var(--blue-hover); transform: scale(1.05); }
#chatbot-box {
  width: 340px; max-height: 500px; background: var(--white);
  border-radius: var(--radius-lg); box-shadow: 0 8px 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column; overflow: hidden;
  margin-bottom: 12px;
}
#chatbot-header {
  background: var(--navy); color: #fff; padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: .9rem;
}
#chatbot-header span { color: var(--teal); margin-right: 6px; font-size: 1rem; }
#chatbot-close { background: none; border: none; color: rgba(255,255,255,.6); cursor: pointer; font-size: 1.1rem; }
#chatbot-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-msg {
  max-width: 85%; padding: 10px 14px; border-radius: 14px;
  font-size: .875rem; line-height: 1.5; white-space: pre-wrap;
}
.chat-msg.bot { background: var(--off-white); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--blue); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-options { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chat-opt-btn {
  background: #f1f5f9; border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: 16px; font-size: .8rem; cursor: pointer;
  transition: var(--transition);
}
.chat-opt-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
#chatbot-input-area { border-top: 1px solid var(--border); padding: 10px 12px; display: flex; gap: 8px; }
#chatbot-input {
  flex: 1; border: 1px solid var(--border); border-radius: 20px;
  padding: 8px 14px; font-size: .875rem; outline: none;
}
#chatbot-input:focus { border-color: var(--blue); }
#chatbot-send {
  background: var(--blue); color: #fff; border: none; border-radius: 50%;
  width: 34px; height: 34px; cursor: pointer; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}

/* ---- Misc ---- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: .75rem; font-weight: 600; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-red { background: #fee2e2; color: #991b1b; }
.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.bg-dark { background: var(--navy); color: #fff; }
.bg-light { background: var(--off-white); }

/* ---- Tables ---- */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; padding: 10px 16px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); border-bottom: 2px solid var(--border); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--off-white); }

/* ---- Card sub-components ---- */
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-header h3 { margin: 0; }
.card-body { padding: 0; }

/* ---- Portal header ---- */
.portal-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; }
.portal-header h1 { font-size: 1.8rem; margin: 0; }

/* ---- Portal stat cards ---- */
.portal-stat-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; text-decoration: none !important; transition: var(--transition); }
.portal-stat-card:hover { border-color: var(--blue); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.portal-stat-icon { font-size: 2rem; margin-bottom: 8px; color: var(--blue); display:flex; align-items:center; justify-content:center; }
.portal-stat-label { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.portal-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--navy); }

/* ---- Empty state ---- */
.empty-state { text-align: center; padding: 60px 20px; background: var(--off-white); border-radius: var(--radius-lg); }
.empty-icon { font-size: 3rem; margin-bottom: 16px; color: var(--text-muted); display:flex; align-items:center; justify-content:center; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }

/* ---- Badge variants ---- */
.badge-paid, .badge-green { background: #d1fae5; color: #065f46; }
.badge-pending, .badge-yellow { background: #fef3c7; color: #92400e; }
.badge-cancelled, .badge-refunded, .badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }

/* ---- Form error ---- */
.form-error { color: var(--red); font-size: .8rem; margin-top: 4px; }
.form-check-label { font-size: .9rem; color: var(--text); cursor: pointer; }

/* ---- Docs layout ---- */
.docs-layout { display: grid; grid-template-columns: 260px 1fr; gap: 0; min-height: calc(100vh - 64px); }
.docs-sidebar { background: var(--off-white); border-right: 1px solid var(--border); padding: 32px 20px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; }
.docs-sidebar .docs-nav-section { margin-bottom: 28px; }
.docs-sidebar .docs-nav-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); padding: 0 12px; margin-bottom: 6px; }
.docs-sidebar nav ul { list-style: none; }
.docs-sidebar nav li { margin-bottom: 2px; }
.docs-sidebar nav a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius); color: var(--text); font-size: .875rem; text-decoration: none !important; transition: var(--transition); }
.docs-sidebar nav a:hover { background: #e2e8f0; color: var(--navy); }
.docs-sidebar nav a.active { background: var(--blue); color: #fff; }
.docs-main { padding: 48px 56px; max-width: 800px; }
.docs-article h1 { font-size: 2rem; margin-bottom: 8px; }
.docs-article .docs-meta { font-size: .8rem; color: var(--text-muted); margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.docs-article h2 { font-size: 1.25rem; margin: 36px 0 12px; padding-top: 36px; border-top: 1px solid var(--border); color: var(--navy); }
.docs-article h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.docs-article p { color: var(--text); margin-bottom: 16px; line-height: 1.75; }
.docs-article ul, .docs-article ol { margin: 0 0 16px 24px; }
.docs-article li { margin-bottom: 6px; line-height: 1.7; color: var(--text); }
.docs-article .callout { background: #dbeafe; border-left: 4px solid var(--blue); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; margin: 20px 0; font-size: .9rem; color: #1e40af; }
.docs-article .callout-tip { background: #d1fae5; border-left-color: var(--green); color: #065f46; }
.docs-article .callout-warn { background: #fef3c7; border-left-color: var(--yellow); color: #92400e; }
.docs-article code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .85em; font-family: 'SF Mono', 'Fira Code', monospace; color: var(--navy); }
.docs-article .step { display: flex; gap: 16px; margin-bottom: 20px; }
.docs-article .step-num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-size: .85rem; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.docs-article .step-body h4 { font-size: 1rem; margin-bottom: 4px; }
.docs-article .step-body p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.docs-nav-back { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: .85rem; text-decoration: none !important; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.docs-nav-back:hover { color: var(--blue); }
@media (max-width: 900px) { .docs-layout { grid-template-columns: 1fr; } .docs-sidebar { position: static; height: auto; } .docs-main { padding: 24px 20px; } }

/* ---- FAQ accordion ---- */
.faq-list { list-style: none; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item summary {
  list-style: none;
  padding: 18px 4px;
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: .975rem;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--teal);
  flex-shrink: 0;
  line-height: 1;
}
.faq-item[open] > summary::after { content: '\2212'; }
.faq-answer {
  padding: 0 4px 20px;
  color: var(--text-muted);
  line-height: 1.85;
  font-size: .93rem;
}
.faq-answer a { color: var(--blue); }
.faq-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.faq-section-header h3 { margin: 0; font-size: 1.1rem; color: var(--navy); }
