:root {
  --ink: #172334;
  --muted: #728092;
  --line: #dfe5e9;
  --paper: #ffffff;
  --canvas: #f4f6f5;
  --teal: #0f6258;
  --teal-dark: #0a403b;
  --teal-pale: #e4f0ed;
  --gold: #bd8534;
  --danger: #b74343;
}

a { color: inherit; text-decoration: none; }

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Vazirmatn, Tahoma, Arial, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.auth-page { min-height: 100vh; padding: 28px; position: relative; }
.auth-brand { position: absolute; top: 28px; right: 32px; z-index: 2; color: #fff; font-size: 22px; font-weight: 900; letter-spacing: -.7px; }
.auth-brand b { color: #d6ae69; }
.auth-layout { min-height: calc(100vh - 56px); display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; background: var(--paper); }
.auth-aside { padding: 120px 9%; background: var(--teal-dark); color: #fff; position: relative; overflow: hidden; }
.auth-aside::before, .auth-aside::after { content: ''; position: absolute; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.auth-aside::before { width: 430px; height: 430px; top: -200px; left: -145px; }
.auth-aside::after { width: 320px; height: 320px; bottom: -180px; right: -120px; }
.eyebrow { display: inline-flex; color: #d6ae69; font-size: 12px; font-weight: 800; letter-spacing: .5px; }
.auth-aside h1 { max-width: 410px; margin: 18px 0; font-size: clamp(29px, 4vw, 48px); line-height: 1.35; letter-spacing: -1.6px; }
.auth-aside p { max-width: 410px; color: #b9d2ce; line-height: 2; }
.auth-points { display: grid; gap: 13px; margin-top: 45px; }
.auth-points div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.auth-points svg { width: 18px; color: #d6ae69; }
.auth-card-wrap { display: grid; place-items: center; padding: 90px 9% 42px; }
.auth-card { width: min(410px, 100%); }
.auth-card h2 { margin: 0 0 9px; font-size: 29px; letter-spacing: -1px; }
.auth-card > p { margin: 0 0 32px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.auth-card label { display: grid; gap: 9px; margin: 17px 0; font-size: 13px; font-weight: 700; }
.auth-card input { width: 100%; padding: 14px 15px; border: 1px solid var(--line); border-radius: 4px; outline: none; direction: ltr; text-align: left; transition: border-color .2s, box-shadow .2s; }
.auth-card input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-pale); }
.primary-button { width: 100%; min-height: 49px; color: #fff; background: var(--teal); border: 1px solid var(--teal); border-radius: 4px; font-weight: 800; }
.primary-button:hover { background: var(--teal-dark); }
.auth-note { margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.message { min-height: 22px; margin-top: 14px; color: var(--danger); font-size: 13px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 242px 1fr; }
.side-nav { display: flex; flex-direction: column; padding: 30px 16px 18px; color: #d8e7e4; background: var(--ink); }
.side-brand { margin: 0 10px 38px; color: #fff; font-size: 22px; font-weight: 900; direction: ltr; text-align: right; }
.side-brand b { color: #d6ae69; }
.user-mini { display: flex; align-items: center; gap: 10px; padding: 12px 10px 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.user-mini .avatar { width: 35px; height: 35px; display: grid; place-items: center; color: var(--teal-dark); background: #d6ae69; border-radius: 50%; font-weight: 900; }
.user-mini strong, .user-mini small { display: block; }
.user-mini strong { color: #fff; font-size: 13px; }
.user-mini small { margin-top: 3px; color: #9bb0b5; font-size: 11px; }
.nav-links { display: grid; gap: 5px; margin-top: 22px; }
.nav-links button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 12px; border: 0; border-right: 2px solid transparent; color: #b4c6c8; background: transparent; text-align: right; font-size: 13px; }
.nav-links button:hover, .nav-links button.active { color: #fff; background: rgba(255,255,255,.07); border-right-color: #d6ae69; }
.nav-links svg { width: 18px; }
.logout { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 12px; border: 0; color: #b4c6c8; background: transparent; text-align: right; }
.logout:hover { color: #fff; }
.logout svg { width: 18px; }

.dash-main { min-width: 0; padding: 34px clamp(20px, 5vw, 74px); }
.home-button { position: fixed; z-index: 20; top: 22px; left: 28px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid #cfe0ff; border-radius: 12px; background: linear-gradient(135deg, #edf4ff, #fff); color: #155eef; font-size: 12px; font-weight: 800; text-decoration: none; box-shadow: 0 7px 18px rgba(21,94,239,.10); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.home-button:hover { transform: translateY(-2px); background: #fff; box-shadow: 0 10px 24px rgba(21,94,239,.18); }
.home-button svg { width: 17px; height: 17px; }
.dash-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 34px; }
.dash-top h1 { margin: 0; font-size: 26px; letter-spacing: -1px; }
.dash-top p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.date-label { padding: 9px 12px; color: var(--muted); border: 1px solid var(--line); background: var(--paper); font-size: 12px; }
.dash-page { display: none; }
.dash-page.active { display: block; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-card { min-height: 142px; padding: 20px; border: 1px solid var(--line); background: var(--paper); position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: var(--teal); }
.stat-card.gold::after { background: var(--gold); }
.stat-card .label { color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin-top: 25px; font-size: 24px; letter-spacing: -.8px; }
.stat-card small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.panel-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 14px; margin-top: 14px; }
.panel { border: 1px solid var(--line); background: var(--paper); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 15px; }
.panel-head button { border: 0; color: var(--teal); background: transparent; font-size: 12px; font-weight: 800; }
.order-list { padding: 0 20px; }
.order-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 15px; padding: 15px 0; border-bottom: 1px solid #edf0f1; }
.order-row:last-child { border-bottom: 0; }
.order-row strong { display: block; direction: ltr; text-align: right; font-size: 15px; letter-spacing: .4px; }
.order-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.order-row .price { font-size: 12px; font-weight: 800; white-space: nowrap; }
.status { padding: 5px 8px; color: var(--teal); background: var(--teal-pale); font-size: 10px; white-space: nowrap; }
.status.pending { color: #885d21; background: #fbf2e3; }
.status.cancelled { color: #a83939; background: #fbe9e9; }
.secure-box { padding: 22px; }
.secure-box svg { width: 29px; color: var(--gold); }
.secure-box h3 { margin: 17px 0 9px; font-size: 16px; }
.secure-box p { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 2; }
.text-button { padding: 0; border: 0; color: var(--teal); background: transparent; font-size: 12px; font-weight: 800; }
.wide-panel { margin-top: 14px; }
.empty { padding: 42px 20px; color: var(--muted); text-align: center; font-size: 13px; line-height: 2; }
.wallet-layout, .listing-layout { display: grid; grid-template-columns: 1fr .85fr; gap: 14px; }
.wallet-amount { padding: 27px; color: #fff; background: var(--teal-dark); }
.wallet-amount small { color: #bad6d2; }
.wallet-amount strong { display: block; margin-top: 14px; font-size: 28px; }
.wallet-amount span { margin-right: 4px; font-size: 12px; }
.action-card { padding: 24px; }
.action-card h3 { margin: 0 0 8px; font-size: 16px; }
.action-card p { color: var(--muted); font-size: 12px; line-height: 2; }
.action-card button { width: auto; padding: 0 20px; }
.toast { position: fixed; bottom: 23px; left: 23px; z-index: 10; padding: 12px 16px; color: #fff; background: var(--ink); box-shadow: 0 8px 25px rgba(23,35,52,.18); font-size: 13px; }

@media (max-width: 880px) {
  .stats { grid-template-columns: 1fr; }
  .panel-grid, .wallet-layout, .listing-layout { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { min-height: 375px; padding: 115px 9% 50px; }
}
@media (max-width: 650px) {
  .auth-page { padding: 0; }
  .auth-layout { min-height: 100vh; }
  .auth-brand { top: 20px; right: 23px; }
  .auth-aside { min-height: 310px; padding-top: 90px; }
  .auth-aside h1 { font-size: 28px; }
  .auth-points { display: none; }
  .auth-card-wrap { padding: 38px 24px; }
  .app-shell { display: block; }
  .side-nav { position: sticky; top: 0; z-index: 3; flex-direction: row; align-items: center; min-height: 59px; padding: 0 16px; }
  .side-brand { margin: 0 auto 0 18px; font-size: 18px; }
  .user-mini, .logout { display: none; }
  .nav-links { display: flex; gap: 0; margin: 0; }
  .nav-links button { width: auto; padding: 10px 8px; border-right: 0; border-bottom: 2px solid transparent; font-size: 0; }
  .nav-links button.active { border-bottom-color: #d6ae69; }
  .nav-links svg { width: 19px; }
  .dash-main { padding: 27px 16px; }
  .home-button { top: 14px; left: 14px; min-height: 38px; padding: 0 11px; font-size: 11px; }
  .home-button span { display: none; }
  .dash-top { align-items: flex-start; }
  .date-label { display: none; }
  .order-row { grid-template-columns: 1fr auto; }
  .order-row .status { grid-column: 2; grid-row: 1; }
  .order-row .price { grid-column: 1; }
}
/* Shared BuySellSim visual identity */
:root{--teal:#155eef;--teal-dark:#1049bd;--teal-pale:#eaf1ff;--gold:#f28a2e}
.auth-brand,.side-brand{color:var(--teal)}
.primary-button,.side-nav a.active{background:var(--teal);border-color:var(--teal)}
 .primary-button:hover{background:var(--teal-dark)}
.brand-logo{object-fit:cover;object-position:center;border-radius:6px}.auth-logo{width:210px;height:64px}.side-logo{width:145px;height:42px}.auth-brand{display:block;width:max-content}.auth-card{border-top:4px solid var(--gold);box-shadow:0 20px 60px rgba(16,73,189,.12)}.auth-page{background:radial-gradient(circle at 15% 15%,#eaf1ff 0,transparent 38%),#f5f8ff}.auth-aside{background:linear-gradient(145deg,#1049bd,#155eef 58%,#f28a2e)}.auth-brand .brand-logo{background:#fff}
