/* ============================================================
   VisaGate Pro — Frontend Dashboard CSS 2026
   Clean, Modern, RTL, Glassmorphism + Neumorphism hybrid
   Single source of truth — no !important wars
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --navy:       #0a2540;
  --navy2:      #0f3460;
  --cyan:       #00c9a7;
  --cyan2:      #00b4d8;
  --page-bg:    linear-gradient(135deg,#e8f5fb 0%,#eef3fb 50%,#eef0ff 100%);
  --card-bg:    rgba(255,255,255,.72);
  --card-blur:  blur(18px) saturate(1.3);
  --card-bdr:   rgba(255,255,255,.75);
  --card-shd:   0 18px 50px rgba(10,47,85,.09);
  --sb-bg1:     rgba(10,47,85,.97);
  --sb-bg2:     rgba(9,63,105,.93);
  --sb-line:    rgba(255,255,255,.10);
  --sb-accent:  #00c9a7;
  --sb-w:       252px;
  --sb-w-mini:  80px;
  --text:       #0f172a;
  --muted:      #64748b;
  --bdr:        rgba(226,232,240,.9);
  --ok:         #059669; --ok-bg: #d1fae5;
  --warn:       #d97706; --warn-bg: #fef3c7;
  --danger:     #dc2626; --danger-bg: #fee2e2;
  --info:       #2563eb; --info-bg: #dbeafe;
  --radius-sm:  10px;
  --radius:     16px;
  --radius-lg:  22px;
  --trans:      .2s cubic-bezier(.22,.9,.25,1);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.aa-dash, .aa-dash * { font-family: 'Vazirmatn', Tahoma, Arial, sans-serif; }
.aa-dash a { text-decoration: none; }
.aa-dash button { font-family: inherit; }

/* ── SHELL ───────────────────────────────────────────────── */
.aa-dash {
  direction: rtl;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 800px;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: var(--page-bg);
  border-radius: var(--radius-lg);
  color: var(--text);
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.aa-side {
  order: 0;
  flex: 0 0 var(--sb-w);
  width: var(--sb-w);
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--sb-bg1), var(--sb-bg2));
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border-left: 1px solid var(--sb-line);
  box-shadow: -16px 0 48px rgba(3,28,55,.18);
  transition: flex-basis var(--trans), width var(--trans);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
.aa-side::-webkit-scrollbar { width: 4px; }
.aa-side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 20px; }

/* Logo */
.aa-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: rgba(8,42,78,.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--sb-line);
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
}
.aa-logo span span { color: var(--cyan); }
.aa-logo button {
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.10);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans), transform var(--trans);
}
.aa-logo button:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }

/* Search bar */
.aa-command {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sb-line);
}
.aa-command input {
  width: 100%;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11px;
  color: #fff;
  outline: none;
  transition: background var(--trans), border-color var(--trans);
}
.aa-command input::placeholder { color: rgba(255,255,255,.5); }
.aa-command input:focus { background: rgba(255,255,255,.16); border-color: rgba(0,201,167,.5); }

/* User block */
.aa-user {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--sb-line);
  cursor: pointer;
  transition: background var(--trans);
}
.aa-user:hover { background: rgba(255,255,255,.05); }
.aa-av {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--cyan2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0,201,167,.3);
}
.aa-user b { display: block; font-size: 12px; font-weight: 700; color: #fff; }
.aa-user small { display: block; font-size: 10px; color: var(--cyan); margin-top: 1px; }

/* Section labels */
.aa-sec {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.32);
  padding: 10px 18px 4px;
}

/* Nav links */
.aa-nav { display: flex; flex-direction: column; }
.aa-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 14px;
  min-height: 44px;
  color: rgba(255,255,255,.75);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-right: 3px solid transparent;
  border-left: 0;
  transition: background var(--trans), border-color var(--trans), color var(--trans);
}
.aa-nav a:hover { background: rgba(255,255,255,.055); }
.aa-nav a.active {
  background: linear-gradient(90deg, rgba(0,201,167,.05), rgba(0,201,167,.16));
  border-right-color: var(--sb-accent);
  color: var(--cyan);
  font-weight: 700;
}
.aa-nav i {
  flex: 0 0 34px;
  width: 34px; height: 34px;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #dfeaf3);
  box-shadow: 0 9px 20px rgba(0,0,0,.15), inset 0 -3px 8px rgba(0,0,0,.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-style: normal;
  transition: transform var(--trans), box-shadow var(--trans);
}
.aa-nav a:hover i { transform: translateX(-2px) scale(1.04); }
.aa-nav span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-nav em {
  flex-shrink: 0;
  background: #e24b4a; color: #fff;
  font-size: 9px; font-weight: 900; font-style: normal;
  padding: 2px 7px; border-radius: 999px;
}
.aa-nav em.ai-tag { background: var(--cyan); color: #0a2540; }

/* Collapse */
.aa-dash.collapsed .aa-side { flex-basis: var(--sb-w-mini); width: var(--sb-w-mini); }
.aa-dash.collapsed .aa-user > div,
.aa-dash.collapsed .aa-sec,
.aa-dash.collapsed .aa-nav span,
.aa-dash.collapsed .aa-logo > span,
.aa-dash.collapsed .aa-command { display: none; }
.aa-dash.collapsed .aa-nav a { justify-content: center; padding-inline: 8px; }
.aa-dash.collapsed .aa-logo button { transform: rotate(180deg); }

/* ── MAIN CONTENT ────────────────────────────────────────── */
.aa-main {
  order: 1;
  flex: 1;
  min-width: 0;
  padding: 22px;
  overflow-y: auto;
  height: 100vh;
}

.aa-page { display: none; }
.aa-page.on { display: block; }

/* Top bar */
.aa-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 12px;
}
.aa-top h2 { font-size: 20px; font-weight: 900; letter-spacing: -.4px; }
.aa-top p { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.aa-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* Buttons */
.aa-btn, .aa-actions button {
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: #fff;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
}
.aa-btn:hover, .aa-actions button:hover {
  background: var(--navy2);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(10,47,85,.2);
}
.aa-btn.ghost {
  background: rgba(255,255,255,.7);
  color: var(--navy);
  border: 1px solid var(--bdr);
}
.aa-btn.cyan { background: var(--cyan); color: #063a2f; }
.aa-btn.danger { background: #dc2626; }

/* News bar */
.aa-newsbar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.82);
  border-right: 4px solid var(--warn);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: var(--card-shd);
  min-height: 58px;
  overflow: hidden;
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
}
.aa-newsbar.info    { border-right-color: var(--info); background: #eff6ff; }
.aa-newsbar.warning { border-right-color: var(--warn); background: #fffbeb; }
.aa-newsbar.success { border-right-color: var(--ok);   background: #f0fdf4; }
.aa-newsbar.danger  { border-right-color: var(--danger); background: #fff1f2; }
.aa-news-title {
  flex-shrink: 0;
  font-size: 11px; font-weight: 900;
  color: var(--navy);
  background: #e0f2fe;
  border-radius: 999px;
  padding: 5px 12px;
}
.aa-news-text { flex: 1; font-size: 12px; line-height: 1.8; color: #334155; transition: opacity .25s, transform .25s; }
.aa-news-text.is-changing { opacity: 0; transform: translateY(5px); }
.aa-news-text a { color: #1d6fc4; font-weight: 700; border-bottom: 1px dashed currentColor; }

/* ── CARDS ───────────────────────────────────────────────── */
.aa-card {
  background: var(--card-bg);
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
  border: 1px solid var(--card-bdr);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--card-shd);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.aa-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.5), transparent 42%);
  pointer-events: none;
}
.aa-card h3 { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.aa-card i { font-size: 22px; font-style: normal; margin-bottom: 6px; display: block; }
.aa-card small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.aa-card b { font-size: 20px; font-weight: 900; letter-spacing: -.3px; }
.aa-card p { font-size: 12px; line-height: 1.8; color: var(--muted); }

/* KPI cards */
.aa-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 16px; }
.aa-kpis .aa-card { padding: 16px; margin-bottom: 0; }

/* Grid layouts */
.aa-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.aa-grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 16px; }

/* Hero banner */
.aa-hero-banner {
  background: linear-gradient(135deg, rgba(10,47,85,.97) 0%, #0f3460 60%, #16537e 100%);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 55px rgba(10,47,85,.2);
}
.aa-hero-banner::before {
  content: '';
  position: absolute;
  inset: -80px auto auto -100px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(0,201,167,.18);
  filter: blur(24px);
}
.aa-hero-badge {
  display: inline-block;
  background: rgba(0,201,167,.15);
  border: 1px solid rgba(0,201,167,.35);
  color: var(--cyan);
  font-size: 10px; font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
  position: relative;
}
.aa-hero-title { font-size: 20px; font-weight: 900; color: #fff; line-height: 1.3; margin-bottom: 6px; position: relative; }
.aa-hero-sub { font-size: 12px; color: rgba(255,255,255,.65); line-height: 1.7; position: relative; }
.aa-hero-stats { display: flex; gap: 22px; margin-top: 14px; position: relative; }
.aa-hero-stat-num { font-size: 22px; font-weight: 900; color: var(--cyan); line-height: 1; }
.aa-hero-stat-lbl { font-size: 10px; color: rgba(255,255,255,.5); margin-top: 2px; }
.aa-hero-right { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
.aa-mini-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
}
.aa-mini-card-ico { font-size: 18px; }
.aa-mini-card-lbl { font-size: 10px; color: rgba(255,255,255,.5); }
.aa-mini-card-val { font-size: 13px; font-weight: 700; color: #fff; }

/* Visa ring */
.aa-visa { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; }
.aa-ring {
  --p: 72;
  width: 128px; height: 128px;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) calc(var(--p) * 1%), rgba(10,47,85,.1) 0);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.75), 0 18px 35px rgba(0,201,167,.18);
  animation: ringIn .8s ease-out;
}
@keyframes ringIn { from { opacity:.4; transform:scale(.95); } to { opacity:1; transform:scale(1); } }
.aa-ring b {
  font-size: 24px; font-weight: 900; color: var(--navy);
  background: rgba(255,255,255,.88);
  width: 82px; height: 82px;
  border-radius: 50%;
  display: grid; place-items: center;
}
.aa-bar { height: 7px; background: rgba(10,47,85,.08); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.aa-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--cyan2)); border-radius: 999px; }

/* Rows and docs */
.aa-row, .aa-doc {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15,23,42,.07);
}
.aa-row:last-child, .aa-doc:last-child { border-bottom: none; }
.aa-row b, .aa-doc b { font-size: 12px; font-weight: 700; color: var(--text); }
.aa-row small, .aa-doc small { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.aa-doc-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.aa-doc-actions button {
  font-size: 10px; font-weight: 700;
  padding: 4px 10px;
  border: 1px solid var(--bdr);
  border-radius: 8px;
  background: rgba(255,255,255,.8);
  cursor: pointer;
  transition: background var(--trans);
  color: var(--text);
}
.aa-doc-actions button:hover { background: #fff; border-color: var(--cyan); color: var(--navy); }

/* Status badges */
.aa-doc span { border-radius: 999px; padding: 3px 10px; font-size: 10px; font-weight: 800; }
.approved, .ok-badge { background: var(--ok-bg); color: var(--ok); }
.pending, .warn-badge { background: var(--warn-bg); color: var(--warn); }
.rejected, .danger-badge { background: var(--danger-bg); color: var(--danger); }
.incomplete, .info-badge { background: var(--info-bg); color: var(--info); }

/* Progress bars */
.aa-prog-wrap { margin-bottom: 12px; }
.aa-prog-top { display: flex; justify-content: space-between; margin-bottom: 5px; }
.aa-prog-lbl { font-size: 12px; font-weight: 600; color: var(--text); }
.aa-prog-pct { font-size: 11px; font-weight: 800; }
.aa-prog-track { height: 7px; background: rgba(15,23,42,.07); border-radius: 999px; overflow: hidden; }
.aa-prog-fill { height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.22,.9,.25,1); }

/* Timeline */
.aa-time {
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
  position: relative;
}
.aa-time::before {
  content: '';
  position: absolute;
  right: 15px; top: 28px; bottom: 0;
  width: 2px;
  background: rgba(15,23,42,.08);
}
.aa-time:last-child::before { display: none; }
.aa-time-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  z-index: 1;
}
.aa-time-dot.done { background: var(--ok-bg); }
.aa-time-dot.active { background: var(--info-bg); }
.aa-time-dot.pend { background: rgba(15,23,42,.06); }
.aa-time-title { font-size: 13px; font-weight: 700; color: var(--text); }
.aa-time-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.aa-time-detail {
  font-size: 11px; line-height: 1.8; color: var(--muted);
  background: rgba(15,23,42,.04);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 6px;
  display: none;
}
.aa-time-detail.open { display: block; }

/* Timeline linear progress bar (top of case page) */
.aa-tl-prog { display: flex; align-items: center; gap: 0; position: relative; margin-bottom: 18px; }
.aa-tl-prog::before { content: ''; position: absolute; top: 16px; right: 16px; left: 16px; height: 2px; background: var(--bdr); z-index: 0; }
.aa-tl-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; z-index: 1; cursor: pointer; }
.aa-tl-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; border: 2px solid transparent; }
.aa-tl-dot.done { background: var(--cyan); color: #fff; border-color: var(--cyan); }
.aa-tl-dot.active { background: #fff; border-color: var(--cyan); color: var(--cyan); }
.aa-tl-dot.pend { background: #fff; border-color: var(--bdr); color: var(--muted); }
.aa-tl-lbl { font-size: 9px; color: var(--muted); text-align: center; max-width: 64px; line-height: 1.4; font-weight: 600; }

/* Appointments */
.aa-apt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(248,250,252,.9);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: border-color var(--trans);
}
.aa-apt:hover { border-color: var(--cyan); }
.aa-apt-date { text-align: center; min-width: 38px; }
.aa-apt-day { font-size: 22px; font-weight: 900; color: var(--navy); line-height: 1; }
.aa-apt-mon { font-size: 9px; color: var(--muted); font-weight: 700; }
.aa-apt-div { width: 1px; height: 32px; background: var(--bdr); flex-shrink: 0; }
.aa-apt-title { font-size: 12px; font-weight: 700; color: var(--text); }
.aa-apt-where { font-size: 10px; color: var(--muted); margin-top: 2px; }
.aa-apt-badge { margin-right: auto; font-size: 10px; padding: 3px 9px; border-radius: 999px; font-weight: 700; flex-shrink: 0; }
.ab-teal { background: #ccfbf1; color: #0f766e; }
.ab-amber { background: #fef3c7; color: #92400e; }
.ab-blue { background: #dbeafe; color: #1e40af; }

/* Plans */
.aa-plans { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 16px; }
.aa-plan {
  background: var(--card-bg);
  backdrop-filter: var(--card-blur);
  border: 1px solid var(--card-bdr);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
  box-shadow: var(--card-shd);
}
.aa-plan:hover { transform: translateY(-2px); box-shadow: 0 24px 60px rgba(10,47,85,.13); }
.aa-plan.sel { border: 2px solid var(--cyan); background: #f0fdf9; }
.aa-plan-icon { font-size: 28px; margin-bottom: 8px; }
.aa-plan-name { font-size: 14px; font-weight: 900; color: var(--text); }
.aa-plan-price { font-size: 11px; color: var(--muted); margin-top: 4px; }
.aa-plan-badge { display: inline-block; margin-top: 8px; font-size: 10px; padding: 3px 10px; border-radius: 999px; font-weight: 700; }

/* Credit */
.aa-credit-wrap {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 20px 50px rgba(10,47,85,.2);
}
.aa-cred-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.aa-cred-title { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.75); }
.aa-cred-val { font-size: 26px; font-weight: 900; color: var(--cyan); }
.aa-cred-lv { font-size: 10px; color: rgba(255,255,255,.45); margin-top: 1px; }
.aa-cred-track { height: 8px; background: rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.aa-cred-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--cyan2)); border-radius: 999px; }
.aa-cred-sub { font-size: 10px; color: rgba(255,255,255,.4); }
.aa-cred-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 14px; }
.aa-cred-stat { background: rgba(255,255,255,.07); border-radius: var(--radius); padding: 10px; text-align: center; }
.aa-cred-stat b { font-size: 16px; font-weight: 900; color: var(--cyan); display: block; }
.aa-cred-stat small { font-size: 9px; color: rgba(255,255,255,.4); margin-top: 2px; display: block; }

/* Calendar */
.aa-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; margin-bottom: 12px; }
.aa-cal-head { text-align: center; font-size: 10px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.aa-cal-day { text-align: center; font-size: 11px; padding: 6px 2px; border-radius: 8px; cursor: pointer; color: var(--text); transition: background var(--trans); }
.aa-cal-day:hover { background: rgba(15,23,42,.06); }
.aa-cal-day.has { background: #ccfbf1; color: #0f766e; font-weight: 800; }
.aa-cal-day.today { background: var(--navy); color: #fff; font-weight: 900; }
.aa-cal-day.empty { color: rgba(15,23,42,.18); }

/* Event items */
.aa-ev { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: rgba(248,250,252,.9); border: 1px solid var(--bdr); border-radius: var(--radius); margin-bottom: 8px; }
.aa-ev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.aa-ev-title { font-size: 12px; font-weight: 700; color: var(--text); }
.aa-ev-date { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* Ticket */
.aa-ticket-form { background: rgba(248,250,252,.9); border: 1px solid var(--bdr); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 14px; }
.aa-ticket-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(248,250,252,.9);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: border-color var(--trans);
}
.aa-ticket-item:hover { border-color: var(--cyan); }
.aa-ticket-id { font-size: 10px; font-weight: 900; color: var(--info); min-width: 52px; }
.aa-ticket-title { font-size: 12px; font-weight: 700; color: var(--text); }
.aa-ticket-date { font-size: 10px; color: var(--muted); }
.aa-ticket-st { margin-right: auto; font-size: 10px; padding: 3px 9px; border-radius: 999px; font-weight: 700; }
.st-open { background: var(--warn-bg); color: var(--warn); }
.st-wait { background: var(--info-bg); color: var(--info); }
.st-done { background: var(--ok-bg); color: var(--ok); }

/* Forms / inputs */
.aa-label { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; display: block; }
.aa-input, .aa-select, .aa-textarea {
  width: 100%;
  border: 1px solid var(--bdr);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text);
  background: rgba(255,255,255,.85);
  outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
  margin-bottom: 12px;
  direction: rtl;
}
.aa-input:focus, .aa-select:focus, .aa-textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,201,167,.12);
}
.aa-textarea { height: 80px; resize: none; }
.aa-select { height: 40px; appearance: none; cursor: pointer; }
.aa-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Transactions */
.aa-tx {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15,23,42,.07);
}
.aa-tx:last-child { border-bottom: none; }
.aa-tx-ico { font-size: 20px; }
.aa-tx-name { font-size: 12px; font-weight: 700; color: var(--text); }
.aa-tx-date { font-size: 10px; color: var(--muted); margin-top: 1px; }
.aa-tx-amt { margin-right: auto; font-size: 14px; font-weight: 900; flex-shrink: 0; }
.tx-in { color: var(--ok); }
.tx-out { color: var(--danger); }
.aa-filterbar { display: grid; grid-template-columns: 1fr 160px 140px; gap: 10px; margin-bottom: 12px; }

/* Smart / AI */
.aa-ai { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 10px; }
.aa-ai-answer { font-size: 12px; line-height: 1.9; color: var(--muted); background: rgba(15,23,42,.04); border-radius: 12px; padding: 12px; margin-top: 10px; min-height: 44px; }

/* Calculator */
.aa-calc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aa-calc .aa-btn, .aa-calc b { grid-column: 1 / -1; }

/* Referral */
.aa-ref-code { background: var(--info-bg); border: 1px dashed #60a5fa; border-radius: var(--radius); padding: 14px; font-weight: 900; color: var(--navy); text-align: center; margin: 10px 0; font-size: 15px; letter-spacing: 1px; }

/* Badge strip */
.aa-badge-strip, .aa-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.aa-badge-strip span, .aa-badges span {
  background: rgba(255,255,255,.85);
  border: 1px solid var(--bdr);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
  box-shadow: 0 6px 16px rgba(15,23,42,.06);
}

/* Profile */
.aa-profile-grid { display: grid; grid-template-columns: 160px 1fr; gap: 16px; }
.aa-profile-av {
  height: 160px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--cyan), var(--navy));
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 900; color: #fff;
  box-shadow: 0 20px 48px rgba(0,201,167,.22);
}
.aa-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Telegram */
.aa-tg-card {
  background: linear-gradient(135deg, #0088cc, #006fa6);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 18px 45px rgba(0,136,204,.22);
}
.aa-tg-icon { font-size: 36px; }
.aa-tg-title { font-size: 15px; font-weight: 900; color: #fff; }
.aa-tg-sub { font-size: 11px; color: rgba(255,255,255,.72); margin-top: 3px; }
.aa-tg-btn { margin-right: auto; background: #fff; color: #006fa6; border: none; border-radius: var(--radius); padding: 10px 18px; font-size: 12px; font-weight: 900; cursor: pointer; flex-shrink: 0; transition: box-shadow var(--trans), transform var(--trans); }
.aa-tg-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }

/* Switch toggles */
.aa-switchline { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(15,23,42,.07); font-size: 12px; font-weight: 700; }
.aa-switchline:last-child { border-bottom: none; }
.aa-switch { width: 38px; height: 21px; border-radius: 999px; background: #cbd5e1; position: relative; cursor: pointer; transition: background var(--trans); flex-shrink: 0; }
.aa-switch::after { content: ''; width: 17px; height: 17px; border-radius: 50%; background: #fff; position: absolute; top: 2px; right: 2px; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: right var(--trans); }
.aa-switch.on { background: var(--cyan); }
.aa-switch.on::after { right: 19px; }

/* Toast */
.aa-toast {
  position: fixed;
  left: 24px; bottom: 24px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 12px; font-weight: 900;
  box-shadow: 0 20px 50px rgba(15,23,42,.28);
  z-index: 999999;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.aa-toast.show { opacity: 1; transform: translateY(0); }

/* Modal */
.aa-modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999998;
  align-items: center; justify-content: center;
  padding: 20px;
}
.aa-modal.open { display: flex; }
.aa-modal-box { width: min(760px,94vw); background: #fff; border-radius: var(--radius-lg); padding: 22px; box-shadow: 0 30px 80px rgba(15,23,42,.28); position: relative; direction: rtl; }
.aa-modal-close { position: absolute; left: 14px; top: 14px; border: 0; background: #f1f5f9; border-radius: 10px; width: 32px; height: 32px; cursor: pointer; font-size: 16px; }
.aa-doc-sheet { height: 260px; border-radius: var(--radius); background: linear-gradient(135deg,#fff,#eef6ff); border: 1px dashed #cbd5e1; display: grid; place-items: center; color: var(--muted); font-weight: 700; margin-bottom: 12px; }

/* Tour */
.aa-tour { display: none; position: fixed; right: 270px; top: 140px; z-index: 999997; }
.aa-tour.show { display: block; }
.aa-tour-box { width: 300px; background: #fff; border: 1px solid var(--bdr); border-radius: var(--radius-lg); padding: 18px; box-shadow: 0 20px 55px rgba(15,23,42,.18); direction: rtl; }
.aa-tour-box p { font-size: 12px; color: var(--muted); line-height: 1.9; margin-bottom: 12px; }
.aa-tour-skip { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }

/* Activity */
.aa-activity-line { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid rgba(15,23,42,.07); }
.aa-activity-line:last-child { border-bottom: none; }
.aa-activity-time { min-width: 90px; font-size: 11px; color: var(--muted); flex-shrink: 0; }
.aa-activity-body { font-size: 12px; line-height: 1.8; color: var(--text); }

/* Dark mode */
.aa-dash.dark {
  --page-bg: linear-gradient(135deg, #07111f 0%, #0f1d31 50%, #1b2544 100%);
  --card-bg: rgba(15,23,42,.68);
  --card-bdr: rgba(255,255,255,.12);
  --text: #e5eef9;
  --muted: #8fadc5;
  --bdr: rgba(255,255,255,.1);
}
.aa-dash.dark .aa-card { color: var(--text); }

/* Login */
.aacrmv41-login { background: #fff3cd; border: 1px solid #ffc107; border-radius: var(--radius); padding: 20px; direction: rtl; font-weight: 700; color: #856404; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .aa-dash { flex-direction: column; height: auto; max-height: none; overflow: visible; border-radius: 0; }
  .aa-side { width: 100%; flex-basis: auto; height: auto; max-height: none; border-left: 0; border-bottom: 1px solid var(--sb-line); }
  .aa-main { height: auto; padding: 16px; }
  .aa-kpis, .aa-plans, .aa-grid3 { grid-template-columns: 1fr 1fr; }
  .aa-grid2, .aa-visa, .aa-profile-grid, .aa-form-grid { grid-template-columns: 1fr; }
  .aa-hero-banner { grid-template-columns: 1fr; }
  .aa-hero-right { display: none; }
  .aa-filterbar, .aa-calc { grid-template-columns: 1fr; }
  .aa-tour { right: 16px; left: 16px; }
  .aa-tour-box { width: auto; }
  .aa-tg-card { flex-direction: column; align-items: flex-start; }
  .aa-tg-btn { margin-right: 0; }
}
@media (max-width: 560px) {
  .aa-kpis, .aa-plans { grid-template-columns: 1fr; }
  .aa-main { padding: 12px; }
}
