/* AEC Labs — Core Stylesheet */

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

:root {
  --brand:       #1a56db;
  --brand-dark:  #1245b0;
  --brand-light: #e8effd;
  --accent:      #f97316;
  --text:        #1a202c;
  --text-muted:  #6b7280;
  --border:      #e2e8f0;
  --bg:          #ffffff;
  --bg-light:    #f8fafc;
  --radius:      8px;
  --shadow:      0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 16px; }

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

/* ---- Layout ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.bg-light { background: var(--bg-light); }
.text-center { text-align: center; }

/* ---- Navbar ---- */
.navbar { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-brand { font-size: 1.25rem; font-weight: 700; color: var(--brand); }
.nav-links { display: flex; list-style: none; gap: 1rem; align-items: center; }
.nav-links a { color: var(--text); font-size: .9rem; padding: .25rem .5rem; }
.nav-links a.active, .nav-links a:hover { color: var(--brand); }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .6rem 1.25rem; border-radius: var(--radius); font-size: .9rem; font-weight: 500; cursor: pointer; border: 1.5px solid transparent; transition: all .15s; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-light); }
.btn-success { background: #16a34a; color: #fff; border-color: #16a34a; }
.btn-warning { background: #d97706; color: #fff; border-color: #d97706; }
.btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-sm  { padding: .35rem .85rem; font-size: .82rem; }
.btn-xs  { padding: .2rem .55rem; font-size: .78rem; }
.btn-lg  { padding: .8rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---- Hero ---- */
.hero { background: linear-gradient(135deg, var(--brand) 0%, #1e40af 100%); color: #fff; padding: 5rem 0; text-align: center; }
.hero h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
.hero-sub { font-size: 1.1rem; opacity: .9; max-width: 640px; margin: 0 auto 2rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
.hero .btn-outline:hover { background: rgba(255,255,255,.15); }

/* ---- Section titles ---- */
.section-title { font-size: 1.75rem; font-weight: 700; text-align: center; margin-bottom: 2.5rem; }

/* ---- Features grid ---- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.feature-card { background: var(--bg-light); border-radius: var(--radius); padding: 1.75rem; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }

/* ---- Cert cards ---- */
.certs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.cert-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.cert-card h4, .cert-card h3 { margin: .5rem 0 .25rem; }
.cert-meta { font-size: .82rem; color: var(--text-muted); }
.cert-link { font-size: .85rem; }
.cert-badge { display: inline-block; padding: .2rem .65rem; border-radius: 100px; font-size: .72rem; font-weight: 600; text-transform: uppercase; margin-bottom: .5rem; }
.level-foundation  { background: #dbeafe; color: #1e40af; }
.level-associate   { background: #dcfce7; color: #166534; }
.level-professional{ background: #fef9c3; color: #854d0e; }
.level-expert      { background: #ede9fe; color: #4c1d95; }

/* ---- Cert list items ---- */
.certs-list { display: flex; flex-direction: column; gap: 1rem; }
.cert-list-item { display: flex; align-items: flex-start; gap: 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.cert-list-content { flex: 1; }
.cert-list-actions { display: flex; flex-direction: column; gap: .5rem; }
.cert-level-badge { white-space: nowrap; }

/* ---- Cert public page ---- */
.cert-valid-banner { background: #dcfce7; color: #166534; padding: 1rem 1.5rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 1.05rem; }
.cert-invalid-banner { background: #fee2e2; color: #991b1b; padding: 1rem 1.5rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.cert-public-card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); overflow: hidden; max-width: 680px; margin: 0 auto; }
.cert-public-header { background: linear-gradient(135deg, var(--brand), #1e40af); color: #fff; padding: 2rem; text-align: center; }
.cert-public-header h1 { font-size: 1.5rem; margin: .5rem 0; }
.cert-code-display { font-size: .9rem; opacity: .85; }
.cert-public-body { padding: 2rem; }
.cert-holder-info { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.cert-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.cert-details { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; margin-bottom: 1.5rem; }
.cert-detail-item { display: flex; flex-direction: column; }
.cert-detail-label { font-size: .75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .2rem; }
.cert-public-footer { background: var(--bg-light); padding: 1rem 2rem; font-size: .82rem; color: var(--text-muted); border-top: 1px solid var(--border); }
.cert-status-active { color: #16a34a; font-weight: 600; }
.cert-status-revoked { color: #dc2626; font-weight: 600; }
.cert-status-pending { color: #d97706; font-weight: 600; }
.cert-actions { text-align: center; margin-top: 1.5rem; }
.cert-share-url { display: flex; gap: .5rem; margin: .5rem 0 .75rem; }

/* ---- Firms ---- */
.firms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.firm-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.firm-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .5rem; }
.firm-type { font-size: .78rem; background: var(--brand-light); color: var(--brand); padding: .15rem .5rem; border-radius: 100px; white-space: nowrap; }
.firm-state { font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem; }
.firm-description { font-size: .88rem; color: var(--text-muted); margin-bottom: 1rem; }

/* ---- Forms ---- */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: .4rem; color: var(--text); }
.form-control { width: 100%; padding: .6rem .9rem; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: .92rem; font-family: inherit; color: var(--text); background: var(--bg); transition: border-color .15s; }
.form-control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.form-control:disabled { background: var(--bg-light); color: var(--text-muted); cursor: not-allowed; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .3rem; display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.form-check { display: flex; align-items: center; gap: .5rem; }
.form-check input { width: auto; }
.form-section { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: none; }
.form-section h2 { font-size: 1.1rem; margin-bottom: 1.25rem; color: var(--text-muted); font-weight: 600; }

/* ---- Auth cards ---- */
.auth-card { max-width: 480px; margin: 0 auto; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 2.5rem; box-shadow: var(--shadow-md); }
.auth-card h1 { font-size: 1.5rem; margin-bottom: .5rem; }
.auth-form { margin-top: 1.5rem; }
.auth-links { text-align: center; font-size: .88rem; margin-top: 1.25rem; display: flex; gap: .75rem; justify-content: center; color: var(--text-muted); }

/* ---- Alerts ---- */
.alert { padding: .9rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: .9rem; }
.alert ul { margin: 0; padding-left: 1.25rem; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ---- Dashboard ---- */
.dashboard-header { margin-bottom: 2rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.dashboard-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.dashboard-card h3 { font-size: 1rem; margin-bottom: .75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; }
.quick-links { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.quick-links a { font-size: .9rem; }
.cert-summary-list { list-style: none; margin: .5rem 0 1rem; display: flex; flex-direction: column; gap: .4rem; }
.cert-summary-list li { display: flex; align-items: center; gap: .5rem; font-size: .88rem; }
.cert-status-badge { font-size: .72rem; padding: .1rem .4rem; border-radius: 100px; }
.cert-level-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---- Admin ---- */
.admin-header { margin-bottom: 2.5rem; }
.admin-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.admin-section { margin-bottom: 2.5rem; }
.admin-section h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.admin-quick-actions { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.admin-quick-actions a { font-size: .92rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th, .admin-table td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--border); }
.admin-table th { font-weight: 600; color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; background: var(--bg-light); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-form { max-width: 700px; }
.issue-cert-form { background: var(--bg-light); padding: 1.25rem; border-radius: var(--radius); }
.admin-detail-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.admin-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-bottom: .5rem; }
.admin-bio { background: var(--bg-light); padding: 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; }
.back-link { display: inline-block; margin-bottom: 1.5rem; font-size: .88rem; color: var(--text-muted); }

/* ---- Stats ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.stat-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; box-shadow: var(--shadow); }
.stat-card-warning { border-color: #fde68a; background: #fffbeb; }
.stat-number { font-size: 2.25rem; font-weight: 700; color: var(--brand); line-height: 1; }
.stat-label { font-size: .82rem; color: var(--text-muted); margin: .4rem 0; }
.stat-link { font-size: .8rem; }

/* ---- Badges ---- */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 100px; font-size: .72rem; font-weight: 600; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red   { background: #fee2e2; color: #991b1b; }
.badge-grey  { background: #f3f4f6; color: #6b7280; }
.badge-blue  { background: #dbeafe; color: #1e40af; }

/* ---- Blog ---- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.blog-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.blog-card-image { width: 100%; height: 200px; object-fit: cover; display: block; }
.blog-card-body { padding: 1.25rem; }
.blog-card-body h2 { font-size: 1.1rem; margin-bottom: .5rem; }
.blog-excerpt { font-size: .88rem; color: var(--text-muted); margin-bottom: .75rem; }
.blog-meta { font-size: .78rem; color: var(--text-muted); margin-bottom: .75rem; }
.blog-post-wrapper { max-width: 760px; margin: 0 auto; }
.blog-post-image { width: 100%; max-height: 400px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.5rem; }
.blog-post h1 { font-size: 2rem; margin-bottom: .75rem; }
.blog-post-content { margin-top: 1.5rem; line-height: 1.8; }
.blog-post-nav { margin-top: 2rem; }
.blog-related { margin-top: 3rem; border-top: 1px solid var(--border); padding-top: 2rem; }
.blog-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.blog-related-card { background: var(--bg-light); padding: 1rem; border-radius: var(--radius); }
.blog-content-editor { font-family: monospace; }

/* ---- Search form ---- */
.search-form { display: flex; gap: .5rem; align-items: center; }
.search-input { width: 280px; }

/* ---- Validate form ---- */
.validate-form { max-width: 480px; margin: 2rem 0; }
.info-block { background: var(--bg-light); border-radius: var(--radius); padding: 1.5rem; margin-top: 2rem; }

/* ---- Contact ---- */
.contact-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; margin-top: 1.5rem; }
.contact-form { }
.contact-info { background: var(--bg-light); padding: 1.5rem; border-radius: var(--radius); height: fit-content; }

/* ---- Content blocks ---- */
.content-block { margin-bottom: 2rem; }
.content-block h2 { font-size: 1.3rem; margin-bottom: .75rem; }
.lead { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; }

/* ---- Error page ---- */
.error-page { text-align: center; padding: 4rem 0; }
.error-code { font-size: 6rem; font-weight: 800; color: var(--border); line-height: 1; margin-bottom: .5rem; }
.error-page h2 { font-size: 1.5rem; margin-bottom: 1rem; }

/* ---- Empty state ---- */
.empty-state { text-align: center; padding: 3rem; background: var(--bg-light); border-radius: var(--radius); }
.empty-state h3 { margin-bottom: .5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ---- Profile page ---- */
.current-avatar { margin-bottom: .75rem; }
.avatar-preview { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.profile-form { max-width: 640px; }

/* ---- Message row ---- */
.message-row td { background: var(--bg-light); }
.message-content { white-space: pre-wrap; font-size: .88rem; padding: 1rem !important; }

/* ---- Footer ---- */
.footer { background: #0f1724; color: rgba(255,255,255,.65); margin-top: 4rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 4rem 0 3rem;
}
.footer-col-brand { }
.footer-brand-link { display: inline-flex; align-items: center; gap: .4rem; font-size: 1.1rem; font-weight: 700; color: #fff; text-decoration: none; margin-bottom: .75rem; }
.footer-brand-link:hover { text-decoration: none; color: #fff; }
.footer-tagline { font-size: .85rem; line-height: 1.6; color: rgba(255,255,255,.5); max-width: 280px; margin-bottom: 1.25rem; }
.footer-social { display: flex; gap: .75rem; }
.footer-social-link { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.65); transition: background .15s, color .15s; }
.footer-social-link:hover { background: var(--brand); color: #fff; text-decoration: none; }
.footer-heading { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.35); margin-bottom: 1rem; }
.footer-links-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.footer-links-list a { font-size: .88rem; color: rgba(255,255,255,.55); text-decoration: none; transition: color .15s; }
.footer-links-list a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 0; font-size: .8rem; color: rgba(255,255,255,.3); flex-wrap: wrap; gap: .75rem; }
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal a { color: rgba(255,255,255,.3); text-decoration: none; }
.footer-legal a:hover { color: rgba(255,255,255,.65); }

/* ---- Nav: brand icon + user menu + hamburger ---- */
.nav-brand { display: flex; align-items: center; gap: .4rem; font-size: 1.15rem; font-weight: 700; color: var(--brand); text-decoration: none; }
.nav-brand-icon { flex-shrink: 0; }
.nav-hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; background: none; border: none; cursor: pointer; padding: 4px; border-radius: 6px; }
.nav-hamburger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-user-menu { position: relative; }
.nav-user-btn { display: flex; align-items: center; gap: .4rem; background: none; border: 1.5px solid var(--border); border-radius: 100px; padding: .3rem .75rem .3rem .4rem; cursor: pointer; font-size: .85rem; font-family: inherit; color: var(--text); transition: border-color .15s; }
.nav-user-btn:hover { border-color: var(--brand); }
.nav-avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; }
.nav-username { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); min-width: 180px; z-index: 200; padding: .4rem 0; }
.nav-dropdown.is-open { display: block; }
.nav-dropdown-item { display: block; width: 100%; padding: .55rem 1rem; font-size: .88rem; color: var(--text); text-decoration: none; background: none; border: none; text-align: left; cursor: pointer; font-family: inherit; transition: background .1s; }
.nav-dropdown-item:hover { background: var(--bg-light); text-decoration: none; }
.nav-dropdown-divider { border: none; border-top: 1px solid var(--border); margin: .35rem 0; }
.nav-dropdown-logout { color: #dc2626; }
.nav-dropdown-logout:hover { background: #fef2f2; }

/* ---- Auth split layout ---- */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 64px);
}
.auth-brand-panel {
  background: linear-gradient(160deg, #1a56db 0%, #1e3a8a 60%, #0f2460 100%);
  color: #fff;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-brand-inner { max-width: 400px; }
.auth-brand-logo { display: flex; align-items: center; gap: .6rem; font-size: 1.35rem; font-weight: 800; margin-bottom: 2.5rem; letter-spacing: -.3px; }
.auth-brand-headline { font-size: 1.65rem; font-weight: 700; line-height: 1.3; margin-bottom: 1rem; }
.auth-brand-sub { font-size: .95rem; opacity: .8; line-height: 1.6; margin-bottom: 2rem; }
.auth-testimonials { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.auth-testimonial { background: rgba(255,255,255,.08); border-radius: 10px; padding: 1rem 1.25rem; border-left: 3px solid rgba(255,255,255,.3); }
.auth-testimonial-quote { font-size: .88rem; line-height: 1.6; opacity: .9; margin-bottom: .4rem; }
.auth-testimonial-author { font-size: .78rem; opacity: .6; font-weight: 500; }
.auth-benefits { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-direction: column; gap: .75rem; }
.auth-benefit-item { display: flex; align-items: center; gap: .65rem; font-size: .92rem; opacity: .9; }
.auth-benefit-icon { flex-shrink: 0; opacity: .85; }
.auth-brand-stats { display: flex; gap: 2rem; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.5rem; }
.auth-stat { display: flex; flex-direction: column; }
.auth-stat-number { font-size: 1.4rem; font-weight: 800; }
.auth-stat-label { font-size: .78rem; opacity: .65; }

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--bg-light);
}
.auth-form-inner { width: 100%; max-width: 440px; }
.auth-form-header { margin-bottom: 2rem; }
.auth-form-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: .4rem; }
.auth-form-header p { color: var(--text-muted); font-size: .95rem; }

/* ---- Auth centred (forgot/reset) ---- */
.auth-centered-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 2rem 1.5rem;
  background: var(--bg-light);
}
.auth-card {
  max-width: 480px;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}
.auth-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: .5rem; }
.auth-card-sub { color: var(--text-muted); font-size: .92rem; line-height: 1.6; margin-bottom: 0; }
.auth-card-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--brand-light); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; }
.auth-form { margin-top: 1.75rem; }
.auth-switch-link { text-align: center; font-size: .88rem; margin-top: 1.5rem; color: var(--text-muted); }
.auth-switch-link a { color: var(--brand); font-weight: 500; }

/* ---- Form extras ---- */
.form-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.form-label-row label { margin-bottom: 0; }
.form-label-link { font-size: .82rem; color: var(--brand); text-decoration: none; }
.form-label-link:hover { text-decoration: underline; }
.form-input-wrap { position: relative; }
.form-input-wrap .form-control { padding-right: 2.75rem; }
.form-pw-toggle { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0; display: flex; align-items: center; transition: color .15s; }
.form-pw-toggle:hover { color: var(--text); }
.form-required { color: #dc2626; margin-left: .1rem; }

/* ---- Password strength ---- */
.pw-strength { display: flex; align-items: center; gap: .65rem; margin-top: .4rem; }
.pw-strength-bar { flex: 1; height: 4px; background: var(--border); border-radius: 100px; overflow: hidden; }
.pw-strength-fill { height: 100%; width: 0; border-radius: 100px; transition: width .3s, background .3s; }
.pw-strength-label { font-size: .78rem; font-weight: 500; min-width: 50px; }
.pw-requirements { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-direction: column; gap: .3rem; }
.pw-req { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-muted); transition: color .2s; }
.pw-req[data-met="true"] { color: #38a169; }
.pw-req-icon { flex-shrink: 0; }

/* ---- Alert flex row ---- */
.alert { display: flex; align-items: flex-start; gap: .6rem; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: .25rem;
    box-shadow: var(--shadow-md);
    z-index: 99;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a, .nav-links .btn { width: 100%; display: block; padding: .6rem .5rem; text-align: left; }
  .nav-user-menu { width: 100%; }
  .nav-user-btn { width: 100%; border-radius: var(--radius); }
  .nav-dropdown { position: static; border: none; box-shadow: none; background: var(--bg-light); border-radius: var(--radius); margin-top: .25rem; display: block !important; }
  .nav-inner { position: relative; }

  .auth-split { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { min-height: calc(100vh - 64px); padding: 2rem 1.25rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
  .footer-col-brand { grid-column: 1 / -1; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }

  .form-row { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .cert-details { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 1.75rem 1.25rem; }
}
