/* ================================================================
   Ahdverify – Main Stylesheet
   Teal Trust Verification Theme
   ================================================================ */

/* ── Reset & Variables ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #0891b2;
  --primary-light:#22d3ee;
  --primary-dark: #0e7490;
  --accent:       #06b6d4;
  --success:      #059669;
  --warning:      #d97706;
  --danger:       #dc2626;
  --info:         #0284c7;

  --bg:           #f0fdfa;
  --surface:      #ffffff;
  --border:       #ccfbf1;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --text-light:   #94a3b8;

  --sidebar-w:    260px;
  --topbar-h:     60px;
  --radius:       8px;
  --shadow:       0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:    0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg:      #0f172a;
  --surface: #1e293b;
  --border:  #334155;
  --text:    #e2e8f0;
  --text-muted: #94a3b8;
}

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

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Layout ────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f172a 0%, #0891b2 100%); color: #fff; overflow-y: auto; z-index: 300;
  display: flex; flex-direction: column; transition: transform .25s ease;
}
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.topbar {
  position: sticky; top: 0; z-index: 200;
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 1.5rem;
  gap: 1rem;
  box-shadow: var(--shadow);
}
.main-content { flex: 1; padding: 1.5rem; max-width: 1280px; width: 100%; }

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar-brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: .6rem; font-size: 1.1rem; font-weight: 700; }
.sidebar-brand i { font-size: 1.3rem; color: #67e8f9; }
.sidebar-close { display: none; background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer; font-size: 1.1rem; }

.sidebar-user { padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: .75rem; }
.sidebar-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.sidebar-user-name { font-weight: 600; font-size: .9rem; }
.sidebar-user-bal { font-size: .78rem; color: #67e8f9; }

.sidebar-nav { padding: .5rem 0; flex: 1; }
.nav-section-title { font-size: .65rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.4); padding: .75rem 1.25rem .25rem; }
.nav-item { display: flex; align-items: center; gap: .6rem; padding: .55rem 1.25rem; color: rgba(255,255,255,.8); text-decoration: none; font-size: .875rem; transition: all .15s; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { border-left: 3px solid #67e8f9; }
.nav-item i { width: 18px; text-align: center; font-size: .9rem; }

/* ── Topbar ────────────────────────────────────────────────────── */
.topbar-toggle { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.2rem; display: none; }
.topbar-title { font-weight: 600; font-size: 1rem; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.d-none-sm { }

.theme-toggle { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1rem; padding: .4rem; border-radius: var(--radius); transition: .15s; }
.theme-toggle:hover { background: var(--bg); }

/* Notifications */
.notif-wrap, .user-menu-wrap { position: relative; }
.notif-btn, .user-menu-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1rem; padding: .4rem .6rem; border-radius: var(--radius); display: flex; align-items: center; gap: .4rem; transition: .15s; }
.notif-btn:hover, .user-menu-btn:hover { background: var(--bg); color: var(--text); }
.notif-badge { position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff; border-radius: 99px; font-size: .65rem; padding: 0 4px; min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }
.user-avatar-sm { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 180px; z-index: 400; display: none; }
.dropdown-menu.show { display: block; }
.dropdown-menu a { display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; color: var(--text); text-decoration: none; font-size: .875rem; transition: .1s; }
.dropdown-menu a:hover { background: var(--bg); }
.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: .25rem 0; }
.notif-dropdown { min-width: 300px; max-height: 400px; overflow-y: auto; }

/* ── Sidebar overlay (mobile) ──────────────────────────────────── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 250; }

/* ── Auth / Main layout ────────────────────────────────────────── */
.auth-body { background: var(--bg); min-height: 100vh; }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 2rem; width: 100%; max-width: 420px; }
.auth-logo { text-align: center; font-size: 1.5rem; font-weight: 800; color: var(--primary); margin-bottom: 1rem; }
.auth-logo i { color: var(--primary-light); margin-right: .3rem; }
.auth-title { text-align: center; font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: .25rem; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: .875rem; margin-bottom: 1.5rem; }
.auth-divider { display: flex; align-items: center; gap: .75rem; color: var(--text-muted); font-size: .8rem; margin: 1rem 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.auth-footer-text { text-align: center; color: var(--text-muted); font-size: .875rem; margin-top: 1rem; }
.auth-footer-text a { color: var(--primary-light); text-decoration: none; font-weight: 600; }

/* ── Home page ─────────────────────────────────────────────────── */
.home-page { }
.home-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: var(--primary); display: flex; align-items: center; justify-content: space-between; padding: 0 2rem; height: 64px; }
.home-nav .brand { color: #fff; text-decoration: none; font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; gap: .5rem; }
.home-nav-links { display: flex; gap: .75rem; }
.hero { background: linear-gradient(135deg, #0f172a 0%, var(--primary-light) 100%); color: #fff; padding: 8rem 2rem 5rem; text-align: center; }
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; opacity: .9; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.features { padding: 4rem 2rem; background: var(--bg); }
.features h2 { text-align: center; font-size: 1.8rem; font-weight: 700; margin-bottom: 2.5rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; max-width: 1100px; margin: 0 auto; }
.feature-card { background: var(--surface); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); text-align: center; }
.feature-icon { width: 56px; height: 56px; border-radius: 50%; background: #cffafe; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; }
.feature-icon i { font-size: 1.4rem; color: var(--primary); }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.feature-card p { font-size: .875rem; color: var(--text-muted); }
.home-footer { background: var(--primary-dark); color: rgba(255,255,255,.7); text-align: center; padding: 1.5rem; font-size: .8rem; }
.container { max-width: 1200px; margin: 0 auto; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1.25rem; border-radius: var(--radius); font-size: .875rem; font-weight: 600; cursor: pointer; border: 2px solid transparent; text-decoration: none; transition: all .15s; white-space: nowrap; }
.btn-primary   { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline   { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white     { background: #fff; color: var(--primary); border-color: #fff; }
.btn-white:hover { background: var(--bg); }
.btn-outline-white { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-white:hover { background: rgba(255,255,255,.1); }
.btn-google    { background: #fff; color: #374151; border-color: var(--border); }
.btn-google:hover { background: var(--bg); }
.btn-google i  { color: #ea4335; }
.btn-block     { width: 100%; justify-content: center; }
.btn-lg        { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-sm        { padding: .3rem .8rem; font-size: .8rem; }
.btn-primary-sm { @extend .btn; background: var(--primary); color: #fff; padding: .35rem .85rem; font-size: .8rem; border-radius: 6px; }
.btn-outline-sm { background: transparent; color: var(--primary); border: 1px solid var(--primary); padding: .35rem .85rem; font-size: .8rem; border-radius: 6px; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.btn-green { background: var(--success); color: #fff; }
.btn-red   { background: var(--danger); color: #fff; }
.btn-icon  { background: none; border: none; cursor: pointer; padding: .3rem .5rem; color: var(--text-muted); border-radius: 4px; transition: .1s; font-size: .85rem; }
.btn-icon:hover { background: var(--bg); color: var(--text); }
.btn-icon.btn-danger { color: var(--danger); }
.btn-icon.btn-warn   { color: var(--warning); }
.btn-icon.btn-ok     { color: var(--success); }

.badge-admin { background: var(--primary); color: #fff; font-size: .75rem; padding: .25rem .75rem; border-radius: 99px; font-weight: 600; }
.badge-blue  { background: #cffafe; color: var(--primary-dark); font-size: .75rem; padding: .2rem .6rem; border-radius: 99px; }
.badge-gray  { background: #f1f5f9; color: var(--text-muted); font-size: .75rem; padding: .2rem .6rem; border-radius: 99px; }
.badge-credit { background: #dcfce7; color: #166534; }
.badge-debit  { background: #fee2e2; color: #991b1b; }

/* ── Forms ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .8rem; font-weight: 600; color: var(--text); margin-bottom: .35rem; }
.form-control { width: 100%; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .875rem; color: var(--text); background: var(--surface); transition: border-color .15s; }
.form-control:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(8,145,178,.1); }
.form-control:disabled { background: var(--bg); cursor: not-allowed; }
.form-control-sm { padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 6px; font-size: .875rem; background: var(--surface); color: var(--text); }
.form-control-xs { width: 100px; padding: .3rem .5rem; border: 1px solid var(--border); border-radius: 6px; font-size: .8rem; }
.form-hint  { font-size: .75rem; color: var(--text-muted); margin-top: .25rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .75rem; }
.form-row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-size: .8rem; }
.req { color: var(--danger); }
.link-sm  { font-size: .8rem; color: var(--primary); text-decoration: none; cursor: pointer; background: none; border: none; }
.checkbox-label { display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.input-icon-wrap { position: relative; }
.input-toggle-pw { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-muted); padding: .25rem; }
.form-section-title { font-weight: 700; font-size: .85rem; color: var(--primary); text-transform: uppercase; letter-spacing: .5px; margin: 1.25rem 0 .5rem; border-bottom: 1px solid var(--border); padding-bottom: .35rem; }

textarea.form-control { resize: vertical; min-height: 80px; }
