/* ============================================
   SALUJA GOLD TMT - App CSS v3
   Dark & Light Theme | Mobile First
   Professional · Modern · Clean
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ============================================
   DARK THEME (Default)
============================================ */
:root,
[data-theme="dark"] {
  --bg-base:       #12131A;
  --bg-card:       #1C1E2A;
  --bg-card2:      #22253A;
  --bg-input:      #252838;
  --bg-input2:     #2A2D40;
  --bg-hover:      #262940;
  --bg-elevated:   #1E2030;

  --border:        #2E3248;
  --border-light:  #383C58;
  --border-gold:   rgba(212,165,30,0.4);

  --text-primary:   #ECEEF5;
  --text-secondary: #8B8FA8;
  --text-muted:     #555870;
  --text-disabled:  #353850;

  --gold:          #D4A51E;
  --gold-light:    #EFC040;
  --gold-dark:     #A07810;
  --gold-bg:       #1E1A06;
  --gold-bg2:      #262208;
  --gold-text:     #F0C040;

  --success:       #27AE60;
  --success-bg:    #0A1E10;
  --success-text:  #5DDC96;
  --error:         #E74C3C;
  --error-bg:      #1E0A0A;
  --error-text:    #F09595;
  --warning:       #F39C12;
  --warning-bg:    #1E1408;
  --warning-text:  #F0C060;
  --info:          #3498DB;
  --info-bg:       #081420;
  --info-text:     #85B7EB;

  --nav-bg:        #12131A;
  --nav-border:    #1E2030;
  --nav-active:    #D4A51E;
  --nav-inactive:  #3A3D58;

  --topbar-bg:     #12131A;
  --topbar-border: #1E2030;

  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 24px;
  --r-full: 999px;

  --shadow-sm:   0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.6);
  --shadow-gold: 0 4px 20px rgba(212,165,30,0.25);

  --transition: 0.2s ease;
}

/* ============================================
   LIGHT THEME
============================================ */
[data-theme="light"] {
  --bg-base:       #F0F2F8;
  --bg-card:       #FFFFFF;
  --bg-card2:      #F8F9FC;
  --bg-input:      #F2F4FA;
  --bg-input2:     #EBEEF6;
  --bg-hover:      #EDF0F8;
  --bg-elevated:   #FFFFFF;

  --border:        #DDE2EE;
  --border-light:  #E8ECF4;
  --border-gold:   rgba(160,120,16,0.3);

 --text-primary:   #080A14;
--text-secondary: #1E2240;
--text-muted:     #404868;
--text-disabled:  #606888;


  --gold:          #A07810;
  --gold-light:    #C09820;
  --gold-dark:     #7A5C08;
  --gold-bg:       #FDF6E3;
  --gold-bg2:      #FAF0D0;
  --gold-text:     #8A6408;

  --success:       #1E9E50;
  --success-bg:    #EBF9F1;
  --success-text:  #167A38;
  --error:         #D63031;
  --error-bg:      #FDECEA;
  --error-text:    #A82020;
  --warning:       #E07B00;
  --warning-bg:    #FEF5E7;
  --warning-text:  #905000;
  --info:          #2475B0;
  --info-bg:       #EAF4FB;
  --info-text:     #1A558A;

  --nav-bg:        #FFFFFF;
  --nav-border:    #E0E4F0;
  --nav-active:    #A07810;
  --nav-inactive:  #9AA0BC;

  --topbar-bg:     #FFFFFF;
  --topbar-border: #E0E4F0;

  --shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
  --shadow-gold: 0 4px 20px rgba(160,120,16,0.18);
}

/* ============================================
   BASE
============================================ */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

.app-wrapper {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-base);
  position: relative;
  /* overflow-x removed - breaks sticky topbar */
}

/* ============================================
   TOPBAR — Sticky, curved bottom
============================================ */
.sg-topbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 200;
  background: var(--topbar-bg);
  padding: 0 16px;
  box-shadow: 0 1px 0 var(--topbar-border), 0 2px 16px rgba(0,0,0,0.1);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* No weird edge - clean flat bottom */
.sg-topbar::after {
  display: none;
}

.sg-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  border-bottom: 1px solid var(--topbar-border);
}

/* Brand */
.sg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sg-logo {
  width: 38px; height: 38px;
  object-fit: contain;
  border-radius: 10px;
}

.sg-logo-fallback {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--gold-bg);
  border: 1.5px solid var(--border-gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.sg-brand-text { display: flex; flex-direction: column; }

.sg-brand-name {
  font-size: 15px; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  line-height: 1.2;
  transition: color 0.3s;
}

.sg-brand-tag {
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 2px;
}

/* Actions */
.sg-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sg-notif-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 18px;
  transition: all 0.2s ease;
}

.sg-notif-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold);
  background: var(--gold-bg);
}

.sg-notif-count {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 18px; height: 18px;
  border-radius: var(--r-full);
  background: var(--error);
  color: #fff;
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--topbar-bg);
  font-family: inherit;
}

/* ============================================
   BOTTOM NAV
============================================ */
.sg-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: var(--nav-bg);
  border-top: 1px solid var(--nav-border);
  display: flex; align-items: center;
  justify-content: space-around;
  padding: 8px 0 20px;
  z-index: 200;
  transition: background 0.3s, border-color 0.3s;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.12);
}

.sg-nav-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  flex: 1; cursor: pointer;
  text-decoration: none;
  color: var(--nav-inactive);
  transition: color 0.2s ease;
  padding: 4px 0;
  min-width: 0;
}

.sg-nav-item.active,
.sg-nav-item:hover { color: var(--nav-active); }

.sg-nav-item i { font-size: 22px; line-height: 1; }

.sg-nav-item span {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.sg-nav-center {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin-top: -24px;
  border: 3px solid var(--nav-bg);
  flex-shrink: 0; cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-gold);
  transition: all 0.2s ease;
}
.sg-nav-center:hover { background: var(--gold-light); transform: scale(1.05); }
.sg-nav-center:active { transform: scale(0.95); }
.sg-nav-center i { font-size: 23px; color: #fff; font-weight: 900; }

.screen { padding: 62px 0 100px; min-height: 100vh; }

/* ============================================
   CARDS — Clearly visible in both themes
============================================ */
.card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  margin: 0 12px 10px;
  transition: all 0.2s ease;
}
.card:hover { border-color: var(--border-light); }
.card-gold { border-color: var(--border-gold) !important; }

/* ============================================
   FORM ELEMENTS — Clearly visible blocks
============================================ */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

.field-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px; letter-spacing: 0.2px;
}
.field-label .req { color: var(--gold); margin-left: 2px; }

/* INPUT — More visible border in dark */
.field-input {
  display: flex; align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light); /* lighter border for visibility */
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
  min-height: 50px;
}

[data-theme="dark"] .field-input {
  border-color: #3A3E58; /* even more visible in dark */
  background: #1E2130;
}

.field-input:focus-within {
  border-color: var(--gold) !important;
  background: var(--bg-input2);
}

.field-input.error { border-color: var(--error) !important; }

.fi-icon {
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 17px; flex-shrink: 0;
  display: flex; align-items: center;
}

.field-input input,
.field-input select,
.field-input textarea {
  flex: 1; background: transparent;
  border: none; outline: none;
  color: var(--text-primary);
  font-size: 14px; font-weight: 500;
  padding: 13px 12px 13px 0;
  font-family: inherit; min-width: 0;
}
.field-input input::placeholder { color: var(--text-muted); font-weight: 400; }
.field-input select option {
  background: var(--bg-input);
  color: var(--text-primary);
}
.field-input textarea {
  resize: none; padding: 13px 12px;
  min-height: 80px;
}

.field-err {
  font-size: 11px; color: var(--error-text);
  margin-top: 5px; display: none;
}
.field-err.show { display: block; }

/* ============================================
   REGISTER CARDS — Clearly visible blocks
============================================ */
.reg-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-lg);
  margin: 0 12px 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

[data-theme="dark"] .reg-card {
  border-color: #323658; /* more visible in dark */
  background: #1A1C28;
}

.reg-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px 11px;
  border-bottom: 1.5px solid var(--border);
  background: var(--bg-card2);
}

[data-theme="dark"] .reg-card-head {
  border-bottom-color: #2E3248;
  background: #1E2030;
}

.reg-card-head i { font-size: 18px; color: var(--gold); }
.reg-card-head span { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.reg-card-body { padding: 16px; }

/* Select arrow */
select.custom-sel {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px !important;
  cursor: pointer;
}

/* PAN verify button */
.pan-verify-btn {
  flex-shrink: 0;
  margin: 6px;
  padding: 8px 14px;
  background: var(--gold);
  color: #fff;
  border: none; border-radius: 8px;
  font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  font-family: inherit;
  transition: all 0.2s;
  min-width: 64px; text-align: center;
}
.pan-verify-btn:hover { background: var(--gold-light); }
.pan-verify-btn:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }
.pan-verify-btn.verified { background: var(--success); color: #fff; }

/* ============================================
   BUTTONS
============================================ */
.btn, .reg-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%;
  padding: 14px 20px;
  border-radius: var(--r-full);
  font-size: 15px; font-weight: 700;
  cursor: pointer; border: none;
  transition: all 0.2s ease;
  font-family: inherit; letter-spacing: 0.2px;
}

.btn-gold, .reg-btn-gold {
  background: var(--gold); color: #fff;
}
.btn-gold:hover, .reg-btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}
.btn-gold:active, .reg-btn-gold:active { transform: scale(0.98); }
.btn-gold:disabled, .reg-btn-gold:disabled {
  background: var(--border); color: var(--text-muted);
  cursor: not-allowed; transform: none; box-shadow: none;
}

.btn-outline, .reg-btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-light);
  margin-top: 10px;
}
.btn-outline:hover, .reg-btn-outline:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}

/* ============================================
   OTP INPUTS
============================================ */
.otp-row, .otp-inputs {
  display: flex; gap: 8px;
  justify-content: center; margin: 14px 0;
}

.otp-box, .otp-input {
  width: 44px; height: 52px; text-align: center;
  font-size: 20px; font-weight: 800;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 2px solid var(--border-light);
  border-radius: var(--r-md); outline: none;
  transition: all 0.2s; font-family: inherit;
}

[data-theme="dark"] .otp-box,
[data-theme="dark"] .otp-input {
  border-color: #3A3E58;
}

.otp-box:focus, .otp-input:focus { border-color: var(--gold); background: var(--gold-bg); }
.otp-box.filled, .otp-input.filled {
  border-color: var(--gold);
  background: var(--bg-input);
  color: var(--text-primary);
}
[data-theme="dark"] .otp-box.filled,
[data-theme="dark"] .otp-input.filled {
  background: #1E1C06;
  color: #ECEEF5;
}
[data-theme="light"] .otp-box.filled,
[data-theme="light"] .otp-input.filled {
  background: #FDF6E3;
  color: #1A1D30;
}

/* ============================================
   STATUS PILLS
============================================ */
.pill {
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: var(--r-full);
  white-space: nowrap; letter-spacing: 0.2px;
}
.pill-success { background: var(--success-bg); color: var(--success-text); }
.pill-pending { background: var(--warning-bg); color: var(--warning-text); }
.pill-error   { background: var(--error-bg);   color: var(--error-text); }
.pill-info    { background: var(--info-bg);    color: var(--info-text); }
.pill-cancel  { background: #F5F3FF; color: #6D28D9; }

/* ============================================
   VERIFIED BADGE
============================================ */
.v-badge, .verified-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--success-bg); color: var(--success-text);
  font-size: 11px; font-weight: 700;
  padding: 5px 12px; border-radius: var(--r-full);
  margin-top: 8px;
}

/* ============================================
   SECTION TITLE
============================================ */
.sec-head {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 16px; margin-bottom: 8px;
}
.sec-title {
  font-size: 14px; font-weight: 800;
  color: var(--gold);
  display: flex; align-items: center; gap: 6px;
}
.sec-link {
  font-size: 11px; color: var(--text-muted);
  text-decoration: none; font-weight: 600;
  transition: color 0.2s;
}
.sec-link:hover { color: var(--gold); }

/* ============================================
   LOGIN PAGE
============================================ */
.login-header {
  padding: 48px 20px 32px;
  text-align: center;
  background: linear-gradient(160deg, #0A0C14 0%, #12131A 100%);
}

[data-theme="light"] .login-header {
  background: linear-gradient(160deg, #1A1D30 0%, #252840 100%);
}

.login-logo-placeholder {
  width: 78px; height: 78px;
  background: var(--gold-bg);
  border: 2px solid var(--border-gold);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: var(--gold);
  margin: 0 auto 14px;
  box-shadow: var(--shadow-gold);
}

.login-brand-name {
  font-size: 24px; font-weight: 900;
  color: #FFFFFF; letter-spacing: 1px;
}
.login-tagline {
  font-size: 10px; color: var(--gold);
  letter-spacing: 2.5px; margin-top: 5px;
  font-weight: 700; text-transform: uppercase;
}

.login-card {
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 28px 22px 40px;
  margin-top: -16px;
  position: relative; z-index: 1;
  min-height: calc(100vh - 200px);
  box-shadow: var(--shadow-lg);
  border-top: 1.5px solid var(--border-light);
}

.login-title {
  font-size: 22px; font-weight: 800;
  color: var(--text-primary); margin-bottom: 4px;
}
.login-subtitle {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 22px;
}
.login-divider {
  height: 3px; width: 40px;
  background: var(--gold); border-radius: 2px; margin-bottom: 22px;
}

.login-icon-wrap {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--gold-bg);
  border: 2px solid var(--border-gold);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px; font-size: 34px; color: var(--gold);
}

.register-link {
  text-align: center; margin-top: 20px;
  font-size: 13px; color: var(--text-secondary);
}
.register-link a { color: var(--gold); font-weight: 700; text-decoration: none; }

/* Input wrap for login page */
.input-wrap {
  display: flex; align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
  min-height: 50px;
}

[data-theme="dark"] .input-wrap { border-color: #3A3E58; background: #1E2130; }
.input-wrap:focus-within { border-color: var(--gold) !important; }
.input-wrap.error { border-color: var(--error) !important; }

.input-icon { padding: 0 12px; color: var(--text-muted); font-size: 17px; flex-shrink: 0; }

.input-wrap input,
.input-wrap select {
  flex: 1; background: transparent;
  border: none; outline: none;
  color: var(--text-primary);
  font-size: 14px; font-weight: 500;
  padding: 13px 12px 13px 0;
  font-family: inherit;
}
.input-wrap input::placeholder { color: var(--text-muted); font-weight: 400; }

.input-error { font-size: 11px; color: var(--error-text); margin-top: 5px; display: none; }
.input-error.show { display: block; }

.mobile-prefix {
  padding: 13px 0 13px 14px;
  font-size: 15px; color: var(--text-secondary);
  font-weight: 700; border-right: 1.5px solid var(--border-light);
  margin-right: 4px; flex-shrink: 0;
}

/* Resend */
.resend-wrap {
  display: flex; align-items: center;
  justify-content: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
  margin-top: 8px;
}
.resend-link {
  background: none; border: none;
  color: var(--gold); font-size: 12px;
  font-weight: 700; cursor: pointer; font-family: inherit;
}
.resend-link:disabled { color: var(--text-muted); cursor: not-allowed; }

/* ============================================
   REGISTER PAGE SPECIFIC
============================================ */
.reg-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--topbar-bg);
  border-bottom: 1.5px solid var(--border-light);
  position: sticky; top: 0; z-index: 100;
}

[data-theme="dark"] .reg-topbar { border-bottom-color: #2E3248; }

.back-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary); font-size: 20px;
  text-decoration: none; flex-shrink: 0;
  transition: all 0.2s;
}
[data-theme="dark"] .back-btn { border-color: #3A3E58; }
.back-btn:hover { border-color: var(--border-gold); color: var(--gold); }

.reg-title { font-size: 17px; font-weight: 800; color: var(--text-primary); }
.reg-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Steps */
.steps-bar {
  display: flex; align-items: center;
  padding: 14px 20px 10px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
}
.s-item { display: flex; flex-direction: column; align-items: center; flex: 1; gap: 5px; }
.s-circle {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--text-muted);
  transition: all 0.3s;
}
[data-theme="dark"] .s-circle { border-color: #3A3E58; background: #1E2030; }
.s-item.active .s-circle { background: var(--gold); border-color: var(--gold); color: #fff; }
.s-item.done .s-circle { background: var(--success-bg); border-color: var(--success); color: var(--success-text); }
.s-label { font-size: 9px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.s-item.active .s-label { color: var(--gold); }
.s-item.done .s-label { color: var(--success-text); }
.s-line { flex: 1; height: 2px; background: var(--border-light); margin-bottom: 14px; transition: background 0.4s; }
[data-theme="dark"] .s-line { background: #2E3248; }
.s-line.done { background: var(--success); }

/* ============================================
   DASHBOARD SPECIFIC
============================================ */
.welcome-hero {
  margin: 12px 12px 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
}
[data-theme="dark"] .welcome-hero { border-color: #323658; }

.hero-top {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .hero-top { border-bottom-color: #2E3248; }

.hero-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900; color: #fff;
  flex-shrink: 0;
}
.hero-name { font-size: 15px; font-weight: 800; color: var(--text-primary); }
.hero-role { font-size: 11px; color: var(--gold); margin-top: 2px; font-weight: 700; }
.hero-zone { font-size: 10px; color: var(--text-muted); margin-top: 1px; }

.hero-stats { display: grid; grid-template-columns: 1fr 1fr; }
.hero-stat {
  padding: 13px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .hero-stat { border-color: #2E3248; }
.hero-stat:nth-child(even) { border-right: none; }
.hero-stat:nth-last-child(-n+2) { border-bottom: none; }
.hero-stat .val { font-size: 20px; font-weight: 900; color: var(--text-primary); line-height: 1; }
.hero-stat .unit { font-size: 10px; color: var(--gold); margin-left: 2px; font-weight: 700; }
.hero-stat .lbl { font-size: 10px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

.points-strip {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--gold-bg);
  border: 1.5px solid var(--border-gold);
  border-radius: var(--r-lg);
  margin: 0 12px 10px;
  padding: 13px 16px;
  text-decoration: none; cursor: pointer;
  transition: all 0.2s;
}
.points-strip:hover { background: var(--gold-bg2); transform: translateY(-1px); }
.pts-left { display: flex; align-items: center; gap: 12px; }
.pts-icon  { font-size: 26px; color: var(--gold); }
.pts-lbl   { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.pts-val   { font-size: 22px; font-weight: 900; color: var(--gold); line-height: 1.1; }
.pts-right { display: flex; align-items: center; gap: 8px; }
.pts-redeem {
  background: var(--gold); color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 5px 12px; border-radius: var(--r-full);
}
.pts-arrow { color: var(--gold); font-size: 16px; }

.alert-strip {
  display: flex; align-items: center; gap: 12px;
  background: var(--warning-bg);
  border: 1.5px solid rgba(243,156,18,0.3);
  border-radius: var(--r-lg);
  margin: 0 12px 10px;
  padding: 12px 16px;
  text-decoration: none; cursor: pointer;
  transition: opacity 0.2s;
}
.alert-strip:hover { opacity: 0.85; }
.alert-num { font-size: 24px; font-weight: 900; color: var(--warning); flex-shrink: 0; }
.alert-info .a-title { font-size: 13px; font-weight: 700; color: var(--warning-text); }
.alert-info .a-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.alert-arr { margin-left: auto; color: var(--warning); font-size: 17px; flex-shrink: 0; }

.target-wrap {
  margin: 0 12px 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}
[data-theme="dark"] .target-wrap { border-color: #323658; }
.tw-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tw-title { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.tw-pct   { font-size: 13px; color: var(--gold); font-weight: 900; }
.tw-bar   { background: var(--border-light); border-radius: 4px; height: 7px; overflow: hidden; }
[data-theme="dark"] .tw-bar { background: #2E3248; }
.tw-fill  { background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); height: 7px; border-radius: 4px; transition: width 1.2s ease; }
.tw-nums  { display: flex; justify-content: space-between; margin-top: 6px; }
.tw-done  { font-size: 11px; color: var(--gold); font-weight: 700; }
.tw-total { font-size: 11px; color: var(--text-muted); }

.qa-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 0 12px; margin-bottom: 12px;
}
.qa-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 14px 12px;
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}
[data-theme="dark"] .qa-card { border-color: #323658; }
.qa-card:hover { border-color: var(--border-gold); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.qa-card.qa-urgent { border-color: rgba(231,76,60,0.4) !important; background: var(--error-bg); }
.qa-card i { font-size: 22px; color: var(--gold); }
.qa-card.qa-urgent i { color: var(--error-text); }
.qa-lbl { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.qa-sub { font-size: 10px; color: var(--text-muted); }

.campaign-banner {
  margin: 0 12px 10px;
  background: var(--gold-bg);
  border: 1.5px solid var(--border-gold);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.cb-icon { font-size: 26px; color: var(--gold); flex-shrink: 0; }
.cb-title { font-size: 13px; font-weight: 800; color: var(--gold); }
.cb-sub   { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.cb-till  { font-size: 10px; color: var(--text-muted); margin-top: 3px; }

.stock-card {
  margin: 0 12px 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
[data-theme="dark"] .stock-card { border-color: #323658; }
.sc-left .sc-val  { font-size: 22px; font-weight: 900; color: var(--text-primary); }
.sc-left .sc-unit { font-size: 12px; color: var(--gold); font-weight: 700; margin-left: 2px; }
.sc-left .sc-lbl  { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.sc-btn {
  background: var(--bg-card2);
  border: 1.5px solid var(--border-light);
  color: var(--text-secondary); font-size: 12px;
  padding: 8px 14px; border-radius: var(--r-full);
  text-decoration: none; transition: all 0.2s; font-weight: 600;
}
.sc-btn:hover { border-color: var(--border-gold); color: var(--gold); }

.order-cards { padding: 0 12px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.order-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 13px 14px;
  text-decoration: none; display: block;
  transition: all 0.2s ease;
}
[data-theme="dark"] .order-card { border-color: #323658; }
.order-card:hover { border-color: var(--border-gold); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.oc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 5px; }
.oc-no  { font-size: 11px; color: var(--gold); font-weight: 700; letter-spacing: 0.3px; }
.oc-name { font-size: 13px; color: var(--text-secondary); margin: 2px 0; }
.oc-meta { display: flex; justify-content: space-between; margin-top: 8px; align-items: center; }
.oc-date { font-size: 10px; color: var(--text-muted); }
.oc-qty  { font-size: 15px; color: var(--text-primary); font-weight: 900; }

/* ============================================
   PROFILE
============================================ */
.profile-hero {
  background: var(--bg-card);
  padding: 28px 20px 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.profile-avatar-wrap { position: relative; width: 90px; margin: 0 auto 14px; }
.profile-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 900; color: #fff;
  border: 3px solid var(--border-gold);
  overflow: hidden; box-shadow: var(--shadow-gold);
}
.profile-avatar img { width:100%; height:100%; object-fit:cover; }
.online-dot {
  position: absolute; bottom: 4px; right: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg-card);
}
.profile-name { font-size: 20px; font-weight: 900; color: var(--text-primary); margin-bottom: 6px; }
.profile-role-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-bg); border: 1.5px solid var(--border-gold);
  color: var(--gold); font-size: 11px; font-weight: 800;
  padding: 5px 14px; border-radius: var(--r-full); margin-bottom: 8px;
}
.profile-mobile { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }

.stats-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--border);
}
.stat-box { padding: 14px 8px; text-align: center; border-right: 1px solid var(--border); }
.stat-box:last-child { border-right: none; }
.stat-box .sv { font-size: 17px; font-weight: 900; color: var(--text-primary); }
.stat-box .sl { font-size: 10px; color: var(--text-muted); margin-top: 3px; font-weight: 600; }

.info-section {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-lg);
  margin: 10px 12px; overflow: hidden;
}
[data-theme="dark"] .info-section { border-color: #323658; }
.info-section-title {
  font-size: 10px; font-weight: 800;
  color: var(--text-muted); letter-spacing: 0.8px;
  text-transform: uppercase; padding: 12px 16px 8px;
}
.info-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
[data-theme="dark"] .info-row { border-top-color: #2A2D40; }
.ir-left { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); font-size: 13px; }
.ir-left i { font-size: 17px; color: var(--text-muted); }
.ir-val { font-size: 13px; color: var(--text-primary); text-align: right; max-width: 55%; word-break: break-word; font-weight: 500; }
.ir-val.gold  { color: var(--gold); font-weight: 700; }
.ir-val.green { color: var(--success-text); font-weight: 700; }
.ir-val.amber { color: var(--warning-text); }

/* ============================================
   MORE PAGE / MENU
============================================ */
.user-mini-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  text-decoration: none; transition: background 0.2s;
}
.user-mini-card:hover { background: var(--bg-hover); }
.uc-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: #fff;
  flex-shrink: 0; overflow: hidden;
  border: 2px solid var(--border-gold);
}
.uc-avatar img { width:100%; height:100%; object-fit:cover; }
.uc-name   { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.uc-role   { font-size: 11px; color: var(--gold); margin-top: 2px; font-weight: 700; }
.uc-mobile { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.uc-arrow  { margin-left:auto; color:var(--border-light); font-size:18px; flex-shrink:0; }

.points-chip {
  display: flex; align-items: center; gap: 10px;
  margin: 12px;
  padding: 12px 16px;
  background: var(--gold-bg);
  border: 1.5px solid var(--border-gold);
  border-radius: var(--r-lg);
  text-decoration: none; transition: all 0.2s;
}
.points-chip:hover { background: var(--gold-bg2); transform: translateY(-1px); }
.pc-icon  { font-size: 22px; color: var(--gold); }
.pc-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.pc-val   { font-size: 18px; font-weight: 900; color: var(--gold); line-height: 1; }
.pc-arrow { margin-left:auto; font-size:16px; color:var(--text-muted); }

.menu-section-label {
  font-size: 10px; font-weight: 800; color: var(--text-muted);
  letter-spacing: 0.8px; text-transform: uppercase;
  padding: 14px 16px 6px;
}
.menu-group {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-lg);
  margin: 0 12px 12px; overflow: hidden;
}
[data-theme="dark"] .menu-group { border-color: #323658; }
.menu-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-top: 1px solid var(--border);
  text-decoration: none; transition: background 0.2s; cursor: pointer;
}
[data-theme="dark"] .menu-row { border-top-color: #2A2D40; }
.menu-row:first-child { border-top: none; }
.menu-row:hover { background: var(--bg-hover); }
.mr-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0;
}
.mr-text { flex:1; min-width:0; }
.mr-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.mr-sub   { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.mr-right { display:flex; align-items:center; gap:6px; }
.mr-arrow { color: var(--border-light); font-size: 16px; }
.mr-badge {
  min-width: 20px; height: 20px; border-radius: 10px;
  padding: 0 6px; background: var(--error); color: #fff;
  font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.logout-row {
  display: flex; align-items: center; gap: 12px;
  margin: 0 12px 12px;
  padding: 14px 16px;
  background: var(--error-bg);
  border: 1.5px solid rgba(231,76,60,0.25);
  border-radius: var(--r-lg);
  cursor: pointer; text-decoration: none; transition: all 0.2s;
}
.logout-row:hover { opacity: 0.85; transform: translateY(-1px); }
.lr-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(231,76,60,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: var(--error-text);
}
.lr-text  { font-size: 14px; font-weight: 700; color: var(--error-text); flex:1; }
.lr-arrow { color: rgba(231,76,60,0.3); font-size: 16px; }

/* ============================================
   NOTIFICATIONS
============================================ */
.notif-item {
  display: flex; align-items: flex-start;
  gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s; text-decoration: none;
}
[data-theme="dark"] .notif-item { border-bottom-color: #1E2030; }
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: var(--gold-bg); border-left: 3px solid var(--gold); }
[data-theme="dark"] .notif-item.unread { background: #1A1A08; }
.notif-item.unread:hover { background: var(--gold-bg2); }
.n-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; margin-top: 2px;
}
.n-body { flex: 1; min-width: 0; }
.n-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; line-height: 1.3; }
.n-msg   { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.n-time  { font-size: 10px; color: var(--text-disabled); margin-top: 5px; }
.n-dot   { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex-shrink: 0; margin-top: 6px; }

/* ============================================
   TOAST
============================================ */
.toast-container, .toast-wrap {
  position: fixed; top: 16px;
  left: 50%; transform: translateX(-50%);
  z-index: 9999; width: 90%; max-width: 380px;
}
.toast {
  padding: 12px 16px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 600;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
  animation: slideDown 0.3s ease;
  box-shadow: var(--shadow-md);
}
.toast-success, .t-success { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success); }
.toast-error,   .t-error   { background: var(--error-bg);   color: var(--error-text);   border: 1px solid var(--error); }
.toast-info,    .t-info    { background: var(--info-bg);    color: var(--info-text);    border: 1px solid var(--info); }
@keyframes slideDown { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }

/* ============================================
   SPINNER
============================================ */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   THEME TOGGLE (More page)
============================================ */
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0;
  background: var(--border-light); border-radius: 13px;
  cursor: pointer; transition: background 0.3s;
}
.switch-slider::before {
  content: ''; position: absolute;
  height: 20px; width: 20px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.3s;
}
.switch input:checked + .switch-slider { background: #27AE60; } /* Green when ON */
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* ============================================
   EMPTY STATE
============================================ */
.empty-state, .empty-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 50px 24px; text-align: center;
}
.empty-state i, .empty-wrap i { font-size: 52px; color: var(--border-light); margin-bottom: 14px; }
.empty-state .et, .empty-wrap .et { font-size: 15px; font-weight: 700; color: var(--text-muted); }
.empty-state .es, .empty-wrap .es { font-size: 12px; color: var(--text-disabled); margin-top: 6px; }

/* ============================================
   SCROLLBAR
============================================ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ============================================
   UTILITIES
============================================ */
.text-gold    { color: var(--gold); }
.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--text-primary); }
.text-success { color: var(--success-text); }
.text-error   { color: var(--error-text); }
.font-bold    { font-weight: 700; }
.font-800     { font-weight: 800; }
.text-center  { text-align: center; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.mt-8    { margin-top: 8px; }
.mt-12   { margin-top: 12px; }
.mt-16   { margin-top: 16px; }
.mb-8    { margin-bottom: 8px; }
.mb-12   { margin-bottom: 12px; }
.p-16    { padding: 16px; }
.hidden  { display: none !important; }
.spacer  { height: 12px; }
.pb-safe { padding-bottom: 100px; }

/* ============================================
   SMOOTH TRANSITIONS
============================================ */
body, .app-wrapper, .sg-topbar, .sg-bottom-nav,
.card, .reg-card, .welcome-hero, .info-section,
.menu-group, .points-strip, .target-wrap,
.qa-card, .order-card, .alert-strip, .notif-item,
.input-wrap, .field-input, .menu-row, .back-btn {
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* ============================================
   COMPATIBILITY ALIASES
   Old variable names → New variables
============================================ */
:root,
[data-theme="dark"] {
  --black:  var(--bg-base);
  --black2: var(--bg-card);
  --black3: var(--bg-card2);
  --black4: var(--border);
  --white:  var(--text-primary);
  --gray:   var(--text-secondary);
  --gray2:  var(--text-muted);
  --gold-light-old: var(--gold-light);
}

[data-theme="light"] {
  --black:  var(--bg-base);
  --black2: var(--bg-card);
  --black3: var(--bg-card2);
  --black4: var(--border);
  --white:  var(--text-primary);
  --gray:   var(--text-secondary);
  --gray2:  var(--text-muted);
}