

:root {
  --font-body: 'Vazirmatn', Tahoma, sans-serif;
  --surface: #fff;
  --primary: #fe6b3d;
  --primary-soft: #fff0ec;
  --dark: #0b1325;
  --bg: #f9fafc;
  --text: #040404;
  --gray: #828282;
  --border: #ededed;
  --light: #f3f3f3;
  --purple: #2b1d9a;
  --purple-soft: #eae8f5;
  --green: #009966;
  --green-soft: #f0f9f6;
  --yellow: #f5a70d;
  --yellow-soft: #fefaf0;
  --red: #f83636;
  --red-soft: #fff3f3;
  --badge-red: #ed1944;
  --dot-gray: #d8d8d8;
  --blue: #1d63d1;
  --blue-soft: #eaf1fd;

  --sidebar-w: 275px;
  --gap: 16px;
  --radius: 12px;

  --content-max: 1600px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100%;
  font-family: var(--font-body);
  background: var(--dark);
  direction: rtl;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; border: 0; outline: none; background: transparent; }
img { display: block; max-width: 100%; }
svg { display: block; flex: none; }

.page {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  background: var(--dark);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  flex: none;
  align-self: flex-start;
  width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
body.nav-open .sidebar-overlay { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }

.box-logo {
  flex: none;
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: linear-gradient(to left, rgba(255,255,255,.04), rgba(255,255,255,.01));
}
.logo-badge { width: 48px; height: 48px; flex: none; }
.logo-badge svg { width: 100%; height: 100%; }
.logo-data { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.logo-title { color: #fff; font-size: 20px; font-weight: 800; line-height: 24px; }
.logo-sub { color: #fff; font-size: 12px; font-weight: 400; line-height: 16px; }
.logo-data--dark .logo-title, .logo-data--dark .logo-sub { color: var(--text); }

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}
.sidebar-btn {
  min-height: 48px;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius);
  color: #fff;
  font-size: 15.5px; font-weight: 400; line-height: 1.45;
  transition: background .18s ease;
}

.sidebar-btn > svg,
.sidebar-btn .side-ic { flex: none; align-self: center; }
.sidebar-btn .side-ic { width: 22px; height: 22px; display: grid; place-items: center; }
.sidebar-btn .side-ic svg,
.sidebar-btn .side-ic i { width: 20px; height: 20px; font-size: 18px; }

.sidebar-btn span { flex: 1; min-width: 0; }
.sidebar-btn:hover { background: rgba(255,255,255,.07); }
.sidebar-btn.active { background: var(--primary); }
.sidebar-btn.active:hover { background: var(--primary); }
.sidebar-sep {
  height: 1px;
  flex: none;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.16) 50%, rgba(255,255,255,0) 100%);
}

.main {
  flex: 1;
  min-width: 0;
  background: var(--bg);

  border-radius: 0 20px 20px 0;
  padding: var(--gap);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.main > * {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
}

.topbar {
  position: relative;
  z-index: 20;
  flex: none;
  min-height: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex; flex-direction: row-reverse;
  justify-content: space-between; align-items: center;
  gap: 16px;
  padding: 16px;
}
.topbar-user { display: flex; align-items: center; gap: 12px; direction: ltr; }
.user-chip {
  direction: rtl;
  height: 48px;
  display: flex; align-items: center; gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-meta { display: flex; flex-direction: column; text-align: right; }
.user-name { color: var(--text); font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap; }
.user-phone { color: var(--gray); font-size: 12px; font-weight: 400; line-height: 16px; }
.user-chip .chev { color: var(--gray); }
.vsep {
  width: 1px; height: 40px; flex: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.08) 50%, rgba(0,0,0,0) 100%);
}
.icon-btn {
  position: relative;
  width: 48px; height: 48px; flex: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.icon-btn .dot {
  position: absolute; top: 0; left: 40px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
}
.topbar-menu { display: flex; align-items: center; gap: 40px; }
.topbar-menu a { color: var(--gray); font-size: 16px; font-weight: 400; line-height: 24px; white-space: nowrap; transition: color .18s ease; }
.topbar-menu a:hover { color: var(--primary); }

.menu-btn {
  display: none;
  width: 48px; height: 48px; flex: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: center; justify-content: center;
  color: var(--text);
}

.page-head {
  flex: none;
  display: flex; flex-direction: column; gap: 8px;
  padding: 0 4px;
}
.page-title { color: var(--text); font-size: 24px; font-weight: 800; line-height: 32px; }
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 12px; line-height: 16px;
}
.bc-item { display: flex; align-items: center; gap: 7px; color: var(--text); font-weight: 400; }
.bc-item svg { color: var(--gray); }
.bc-arrow { color: var(--gray); }
.bc-current { color: var(--text); font-weight: 600; }

.content {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  align-content: start;
}
.content > * { grid-column: 1 / -1; min-width: 0; }
.content > .panel { grid-column: auto; }

.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--gap);
}
.card-number {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
}
.cn-decor {
  position: absolute;
  left: 45%; top: -75px;
  width: 167.7px; height: 163.4px;
  background: var(--primary-soft);
  border-radius: 20px;
  opacity: .3;
  pointer-events: none;
}
.cn-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; }
.cn-icon { width: 24px; height: 24px; flex: none; color: var(--gray); }
.cn-data { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cn-title { color: var(--text); font-size: 14px; font-weight: 600; line-height: 20px; }
.cn-value { min-height: 24px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cn-num { color: var(--primary); font-size: 16px; font-weight: 600; line-height: 24px; }
.cn-unit { color: var(--gray); font-size: 10px; font-weight: 400; line-height: 24px; letter-spacing: -.2px; }
.cn-foot { position: relative; margin-top: 8px; min-height: 24px; }
.cn-caption { color: var(--gray); font-size: 12px; font-weight: 400; line-height: 24px; letter-spacing: -.24px; }
.cn-foot--link { display: flex; justify-content: space-between; align-items: center; }
.cn-foot--link svg { color: var(--primary); }
.cn-link { color: var(--primary); font-size: 12px; font-weight: 600; line-height: 24px; letter-spacing: -.24px; }

.alert-panel {
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 16px;
  padding: 16px;
}
.alert-panel--purple { background: var(--purple-soft); border: 1px solid var(--purple-soft); }
.alert-panel--purple .alert-icon { background: var(--purple); }
.alert-panel--orange { background: var(--primary-soft); border: 1px solid var(--primary-soft); }
.alert-panel--orange .alert-icon { background: var(--primary); }
.alert-panel--green { background: var(--green-soft); border: 1px solid var(--green-soft); }
.alert-panel--green .alert-icon { background: var(--green); }
.alert-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex: none;
}
.alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.alert-title { color: var(--text); font-size: 16px; font-weight: 600; line-height: 24px; }
.alert-text { color: var(--gray); font-size: 12px; font-weight: 400; line-height: 20px; }

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding-top: 15px;
  overflow: hidden;
}
.panel-head {
  flex: none;
  min-height: 40px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
  padding: 0 0 0 16px;
}
.ph-title { display: flex; align-items: center; gap: 16px; min-height: 24px; }
.ph-bar { width: 2px; height: 20px; flex: none; background: var(--primary); border-radius: 8px 0 0 8px; }
.ph-title span:last-child { color: var(--text); font-size: 16px; font-weight: 600; line-height: 24px; }
.ph-more {
  display: flex; flex-direction: row-reverse; align-items: center; gap: 8px;
  margin-top: 4px;
  color: var(--gray);
  font-size: 14px; font-weight: 600; line-height: 20px;
  white-space: nowrap;
}
.ph-more:hover { color: var(--primary); }
.panel-body {
  flex: 1;
  margin: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--gap);
  align-content: start;
}

.blog-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 3px 12px rgba(0,0,0,.1);
  padding: 12px;
  display: flex; flex-direction: column;
}
.blog-img { position: relative; aspect-ratio: 245 / 170; }
.blog-img img { width: 100%; height: 100%; border-radius: var(--radius); object-fit: cover; }
.date-badge {
  position: absolute; right: 10px; top: 10px;
  width: 70px; height: 70px;
  background: rgba(255,255,255,.4);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 10px;
  box-shadow: 0 15px 30px rgba(0,0,0,.08);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.db-day { color: var(--text); font-size: 24px; font-weight: 400; line-height: 22px; }
.db-month { color: var(--text); font-size: 13px; font-weight: 400; line-height: 22px; margin-top: 5px; }
.blog-title { margin-top: 12px; color: var(--text); font-size: 16px; font-weight: 600; line-height: 24px; }
.blog-excerpt { margin-top: 12px; flex: 1; color: var(--gray); font-size: 14px; font-weight: 400; line-height: 20px; text-align: justify; }
.blog-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--dot-gray); display: flex; justify-content: flex-end; }
.blog-more { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; font-weight: 400; line-height: 20px; }
.blog-more svg { color: var(--gray); }

.shop-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 0 15px rgba(0,0,0,.08);
  padding: 16px;
  display: flex; flex-direction: column; align-items: stretch; gap: 16px;
}
.discount-badge {
  position: absolute; left: 16px; top: 16px;
  width: 36px; height: 36px;
  background: var(--badge-red);
  border-radius: 100px;
  color: #fff; font-size: 12px; font-weight: 400; line-height: 16px;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.fav-btn {
  position: absolute; right: 16px; top: 16px;
  width: 30px; height: 30px;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  z-index: 1;
}
.shop-img { width: 100%; aspect-ratio: 1; }
.shop-img img { width: 100%; height: 100%; object-fit: contain; }
.shop-title { flex: 1; color: var(--text); font-size: 16px; font-weight: 600; line-height: 24px; }
.shop-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; direction: ltr; }
.price-col { direction: rtl; display: flex; flex-direction: column; gap: 4px; }
.price-row { display: flex; align-items: flex-start; gap: 4px; }
.price-new { color: var(--text); font-size: 16px; font-weight: 700; line-height: 18px; }
.price-unit { color: var(--text); font-size: 14px; font-weight: 300; line-height: 18px; }
.price-old { color: var(--gray); font-size: 16px; font-weight: 400; line-height: 16px; text-decoration: line-through; }
.cart-btn {
  width: 48px; height: 48px; flex: none;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}

.panel .slider-dots {
  order: 3;
  display: flex; gap: 4px; align-items: center; justify-content: center;
  direction: ltr;
  padding-bottom: 16px;
}
.sd { width: 10px; height: 10px; border-radius: 100px; background: var(--dot-gray); }
.sd--active { width: 20px; background: var(--primary); }
.panel .slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 3px 12px rgba(0,0,0,.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  z-index: 2;
}
.panel .slider-arrow--start { right: 4px; }
.panel .slider-arrow--end { left: 4px; }

.popover {
  position: absolute;
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  z-index: 30;
  overflow: hidden;
}
.popover--profile { left: 16px; width: 160px; }
.popover--notif { left: 200px; width: 266px; max-width: calc(100% - 32px); }
.pop-btn { color: var(--text) !important; border-radius: 0 !important; }
.popover--profile .pop-btn:first-child { border-bottom: 1px solid var(--border); }
.pop-ic { color: var(--gray); display: flex; }
.notif-head {
  min-height: 48px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 16px; line-height: 24px;
}
.notif-item { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.notif-item--line { border-bottom: 1px solid var(--border); }
.ni-head { display: flex; flex-direction: column; gap: 4px; }
.ni-title { color: var(--text); font-size: 16px; font-weight: 400; line-height: 24px; }
.ni-date { color: var(--gray); font-size: 12px; line-height: 16px; }
.ni-text { color: var(--gray); font-size: 12px; line-height: 16px; }

.sheet {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.sheet--pad { gap: 16px; align-items: stretch; }

.filters { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.filters > * { flex: 1 1 220px; }

.form-input { display: flex; flex-direction: column; gap: 8px; flex: 1 1 220px; min-width: 0; }
.form-input > label { color: var(--text); font-size: 16px; font-weight: 600; line-height: 24px; }
.form-group {
  min-height: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  transition: border-color .18s ease;
}
.form-group:focus-within { border-color: var(--primary); }
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}
.form-group input, .form-group select {
  flex: 1;
  color: var(--text);
  font-size: 14px; font-weight: 600; line-height: 24px;
  text-align: right;
  min-width: 0;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--gray); font-weight: 400; }
.fi-icon { width: 20px; height: 20px; color: var(--gray); flex: none; }
.form-group--area { min-height: 127px; align-items: flex-start; }
.form-group--area textarea {
  flex: 1; min-height: 100px; resize: vertical;
  color: var(--text); font-size: 14px; font-weight: 600; line-height: 24px;
  text-align: right;
}
.form-row { display: flex; flex-wrap: wrap; gap: 16px; }
.form-hint { color: var(--gray); font-size: 12px; line-height: 18px; }

.btn {
  min-height: 48px;
  border-radius: 16px;
  display: inline-flex; direction: ltr;
  align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  font-size: 16px; font-weight: 400; line-height: 24px;
  flex: none;
  transition: filter .18s ease, background .18s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-ghost { color: var(--primary); }
.btn--center { align-self: center; }
.btn--block { width: 100%; }
.sheet--pad > .btn { align-self: flex-end; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 32px;
  padding: 4px 20px;
  border: 1px solid var(--purple);
  border-radius: var(--radius);
  color: var(--purple);
  font-size: 15px; font-weight: 400; line-height: 24px;
  white-space: nowrap;
}
.btn-outline--primary { border-color: var(--primary); color: var(--primary); }

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; min-width: 760px; border-collapse: collapse; }
.table th {
  height: 48px;
  background: var(--light);
  padding: 12px;
  text-align: right;
  color: var(--text);
  font-size: 15px; font-weight: 700; line-height: 24px;
  white-space: nowrap;
}
.table th:first-child { border-radius: 0 8px 8px 0; }
.table th:last-child { border-radius: 8px 0 0 8px; }
.table td {
  height: 56px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  color: var(--gray);
  font-size: 15px; font-weight: 400; line-height: 24px;
  background: var(--surface);
}
.table--orders th, .table--orders td { width: 20%; }
.table--downloads th, .table--downloads td { width: 33.333%; }
.table--vieworder th, .table--vieworder td { width: 50%; }
td.col-links .btn-outline { margin-bottom: 4px; }
td.col-links .btn-outline + .btn-outline { margin-right: 10px; }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 100px; min-height: 24px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px; font-weight: 400; line-height: 16px;
  white-space: nowrap;
}
.badge--purple { background: var(--purple-soft); color: var(--purple); }
.badge--green  { background: var(--green-soft);  color: var(--green); }
.badge--yellow { background: var(--yellow-soft); color: var(--yellow); }
.badge--red    { background: var(--red-soft);    color: var(--red); }
.badge--orange { background: var(--primary-soft); color: var(--primary); }
.badge--blue   { background: var(--blue-soft);   color: var(--blue); }
.badge--gray   { background: var(--light);       color: var(--gray); }

.pagination {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
  margin-top: 24px;
  direction: ltr;
}
.pg {
  width: 40px; height: 40px;
  background: var(--surface);
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0,0,0,.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  font-size: 18px; font-weight: 400;
}
.pg--active { background: var(--primary); color: #fff; font-weight: 600; box-shadow: 0 0 30px rgba(0,0,0,.1); }

.account-card {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 16px;
}
.tabs {
  border-bottom: 1px solid var(--light);
  display: flex; gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 16px;
  color: var(--gray);
  font-size: 16px; font-weight: 400; line-height: 24px;
  white-space: nowrap;
  flex: none;
}
.tab-btn.active {
  color: var(--primary);
  font-weight: 700;
  border-bottom: 2px solid var(--primary);
}
.avatar-upload { position: relative; width: 104px; height: 100px; align-self: center; }
.avatar-img {
  width: 100px; height: 100px;
  border: 1px solid var(--dot-gray);
  border-radius: 58px;
  object-fit: cover;
}
.avatar-cam {
  position: absolute; left: 64px; top: 60px;
  width: 40px; height: 40px;
  background: var(--primary);
  border: 1px solid var(--dot-gray);
  border-radius: 256px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.avatar-cam svg { width: 24px; height: 24px; }
.account-form { display: flex; flex-direction: column; gap: 16px; }
.gender-field { display: flex; flex-direction: column; gap: 8px; }
.gender-field > label { color: var(--text); font-size: 16px; font-weight: 600; line-height: 24px; }
.gender-opts { display: flex; flex-wrap: wrap; gap: 20px; }
.radio { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text); font-size: 16px; line-height: 24px; }
.radio input { display: none; }
.radio-mark {
  width: 24px; height: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  position: relative;
  flex: none;
}
.radio input:checked + .radio-mark { border-color: var(--primary); }
.radio input:checked + .radio-mark::after {
  content: '';
  position: absolute; inset: 3px;
  background: var(--primary);
  border-radius: 20px;
}

.order-intro { color: var(--gray); font-size: 16px; font-weight: 400; line-height: 28px; }
.order-intro b { color: var(--text); font-weight: 700; }
.order-intro .badge { vertical-align: middle; margin: 0 4px; }
.section-title { color: #111; font-size: 20px; font-weight: 800; line-height: 24px; }
.totals-row { display: flex; flex-wrap: wrap; gap: 16px; }
.total-cell { flex: 1 1 240px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.tc-label { color: var(--text); font-size: 16px; font-weight: 700; line-height: 24px; }
.tc-val { color: var(--gray); font-size: 16px; font-weight: 400; line-height: 24px; }
.tc-val--dark { color: var(--text); font-size: 14px; line-height: 20px; }
.bill-rows { display: flex; flex-direction: column; gap: 16px; }
.bill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 50px; }
.br-label { display: flex; align-items: center; gap: 4px; color: var(--text); font-size: 16px; font-weight: 700; line-height: 24px; min-width: 140px; }
.br-label svg { color: var(--gray); }
.br-val { color: var(--text); font-size: 14px; font-weight: 400; line-height: 20px; }

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}
.balance-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark) 0%, #1a2540 100%);
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
  display: flex; flex-direction: column; gap: 16px;
  min-height: 180px;
}
.balance-card::after {
  content: '';
  position: absolute; left: -40px; top: -60px;
  width: 190px; height: 190px;
  background: var(--primary);
  opacity: .18;
  border-radius: 32px;
  transform: rotate(18deg);
}
.bc-label { position: relative; color: rgba(255,255,255,.72); font-size: 14px; line-height: 20px; }
.bc-amount { position: relative; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.bc-amount strong { font-size: 32px; font-weight: 800; line-height: 40px; }
.bc-amount span { font-size: 14px; color: rgba(255,255,255,.72); }
.bc-actions { position: relative; margin-top: auto; display: flex; flex-wrap: wrap; gap: 12px; }
.bc-actions .btn { min-height: 40px; padding: 8px 20px; font-size: 14px; }
.bc-actions .btn-ghost { color: #fff; border: 1px solid rgba(255,255,255,.28); }

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
}
.st-icon {
  width: 48px; height: 48px; flex: none;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.st-icon--green { background: var(--green-soft); color: var(--green); }
.st-icon--red { background: var(--red-soft); color: var(--red); }
.st-icon--yellow { background: var(--yellow-soft); color: var(--yellow); }
.st-icon--blue { background: var(--blue-soft); color: var(--blue); }
.st-data { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st-title { color: var(--gray); font-size: 13px; line-height: 20px; }
.st-value { color: var(--text); font-size: 18px; font-weight: 700; line-height: 26px; }
.st-value small { font-size: 12px; font-weight: 400; color: var(--gray); }

.amount-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  font-size: 14px; line-height: 20px;
  background: var(--surface);
  transition: all .18s ease;
}
.chip:hover, .chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.amount-in { color: var(--green); font-weight: 600; }
.amount-out { color: var(--red); font-weight: 600; }

.sheet-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.sheet-head .btn { min-height: 42px; padding: 10px 20px; font-size: 15px; }

.ticket-subject { color: var(--text); font-weight: 600; }
.ticket-subject small { display: block; color: var(--gray); font-weight: 400; font-size: 12px; margin-top: 2px; }

.thread { display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 12px; max-width: 82%; }
.msg--me { align-self: flex-start; flex-direction: row-reverse; }
.msg--support { align-self: flex-end; }
.msg-avatar {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--light);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray);
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-bubble {
  border-radius: 16px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
}
.msg--me .msg-bubble { background: var(--primary-soft); border: 1px solid #ffe0d6; border-top-right-radius: 4px; }
.msg--support .msg-bubble { background: var(--light); border: 1px solid var(--border); border-top-left-radius: 4px; }
.msg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.msg-name { color: var(--text); font-size: 14px; font-weight: 700; line-height: 20px; }
.msg-time { color: var(--gray); font-size: 12px; line-height: 16px; }
.msg-text { color: var(--text); font-size: 14px; font-weight: 400; line-height: 26px; text-align: justify; }
.msg-file {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
}
.msg-file svg { color: var(--primary); }

.ticket-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tm-item { display: flex; flex-direction: column; gap: 4px; }
.tm-label { color: var(--gray); font-size: 12px; line-height: 18px; }
.tm-value { color: var(--text); font-size: 15px; font-weight: 600; line-height: 22px; }

.file-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 120px;
  padding: 20px;
  border: 1.5px dashed var(--dot-gray);
  border-radius: var(--radius);
  color: var(--gray);
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.file-drop:hover { border-color: var(--primary); background: var(--primary-soft); }
.file-drop strong { color: var(--text); font-size: 15px; font-weight: 600; }
.file-drop span { font-size: 12px; }
.file-drop svg { color: var(--primary); }
.file-drop input { display: none; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 56px 20px;
  text-align: center;
  color: var(--gray);
}
.empty-state strong { color: var(--text); font-size: 18px; font-weight: 700; }
.empty-state svg { color: var(--dot-gray); }

.login-body { background: var(--surface); }
.login-page {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px;
  padding: 40px 16px;
}
.login-tint { display: none; }
.login-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .2;
  pointer-events: none;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 424px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 24px;
  display: flex; flex-direction: column; gap: 24px;
}
.lc-head { align-self: center; display: flex; flex-direction: column; gap: 8px; max-width: 280px; }
.lc-head h1 { color: var(--text); font-size: 28px; font-weight: 700; line-height: 40px; text-align: center; }
.lc-head p { color: var(--gray); font-size: 16px; font-weight: 300; line-height: 24px; text-align: center; }
.login-card .form-input { flex: none; }
.login-card .btn { width: 100%; }
.login-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text); font-size: 15px; font-weight: 300; line-height: 24px; }
.checkbox input { display: none; }
.check-mark {
  width: 24px; height: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex: none;
}
.checkbox input:checked + .check-mark { background: var(--primary); border-color: var(--primary); }
.forgot { color: var(--text); font-size: 15px; font-weight: 400; line-height: 24px; }
.login-brand {
  position: relative;
  z-index: 1;
  display: flex; align-items: center; gap: 12px;
}
.otp-note { color: var(--text); font-size: 15px; font-weight: 300; line-height: 26px; }
.otp-field { display: flex; flex-direction: column; gap: 12px; }
.otp-field > label { color: var(--text); font-size: 16px; font-weight: 600; line-height: 24px; }
.otp-boxes { display: flex; gap: 12px; direction: ltr; justify-content: center; }
.otp-boxes input {
  width: 56px; height: 56px;
  max-width: 18%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text);
  font-size: 20px; font-weight: 600;
}
.otp-timer { color: var(--text); font-size: 14px; font-weight: 600; line-height: 20px; text-align: center; }
.otp-timer-label { color: var(--text); font-size: 14px; font-weight: 300; line-height: 20px; text-align: center; }

.only-mobile { display: none; }

@media (max-width: 1180px) {
  .content { grid-template-columns: 1fr; }
  .content > .panel { grid-column: 1 / -1; }
  .topbar-menu { gap: 24px; }
}

@media (max-width: 1024px) {
  .page { display: block; }
  .sidebar {
    position: fixed;
    top: 0; right: 0;
    height: 100dvh;
    background: var(--dark);
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: -8px 0 32px rgba(0,0,0,.28);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .main {
    border-radius: 0;
    min-height: 100vh;
  }
  .menu-btn { display: flex; }
  .topbar-menu { display: none; }
}

@media (max-width: 768px) {
  :root { --gap: 12px; }
  .topbar { min-height: 72px; padding: 12px; border-radius: var(--radius); }
  .page-title { font-size: 20px; line-height: 28px; }
  .user-meta { display: none; }
  .user-chip { padding: 6px; }
  .icon-btn { width: 42px; height: 42px; }
  .icon-btn .dot { left: 34px; }
  .menu-btn { width: 42px; height: 42px; }
  .popover--notif { left: 12px; right: 12px; width: auto; max-width: none; }
  .popover--profile { left: 12px; }
  .sheet { padding: 12px; }
  .cn-decor { display: none; }
  .alert-panel { align-items: flex-start; }
  .alert-icon { width: 44px; height: 44px; }
  .msg { max-width: 100%; }
  .balance-card { padding: 20px; }
  .bc-amount strong { font-size: 26px; line-height: 34px; }
  .sheet--pad > .btn { align-self: stretch; }
  .only-mobile { display: initial; }
}

@media (max-width: 480px) {
  .sidebar { width: 84vw; max-width: 300px; }
  .main { padding: 12px 10px; }
  .panel-body { grid-template-columns: 1fr; }
  .cards-row { grid-template-columns: 1fr; }
  .otp-boxes { gap: 8px; }
  .login-card { padding: 28px 18px; }
  .lc-head h1 { font-size: 24px; line-height: 34px; }
  .vsep { display: none; }
  .topbar-user { gap: 8px; }
  .sheet-head { flex-direction: column; align-items: stretch; }
  .sheet-head .btn { width: 100%; }
}

@media print {
  .sidebar, .sidebar-overlay, .topbar, .pagination, .menu-btn { display: none !important; }
  .main { padding: 0; background: var(--surface); }
  body { background: var(--surface); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Avatar camera button: cursor + hover + upload loading state. */
.avatar-cam{cursor:pointer;transition:transform .15s ease,filter .15s ease,box-shadow .15s ease}
.avatar-cam:hover{filter:brightness(1.08);transform:scale(1.08);box-shadow:0 4px 12px -2px rgba(254,107,61,.5)}
.avatar-cam:active{transform:scale(.96)}
.avatar-cam.is-loading{pointer-events:none;opacity:.7}
.avatar-cam.is-loading svg{animation:nv-spin .8s linear infinite}
@keyframes nv-spin{to{transform:rotate(360deg)}}
.nv-alert{border-radius:10px;padding:10px 14px;font-size:13px;margin-bottom:14px}
.nv-alert.is-error{background:var(--red-soft);color:var(--red)}
.nv-alert.is-success{background:var(--green-soft);color:var(--green)}
.nv-empty{color:var(--gray);text-align:center}
.nv-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.nv-toast{position:fixed;bottom:22px;right:50%;transform:translate(50%,8px);background:var(--dark);color:#fff;border-radius:99px;padding:11px 22px;font-size:13.5px;box-shadow:0 8px 28px -8px rgba(0,0,0,.4);opacity:0;pointer-events:none;transition:opacity .22s,transform .22s;z-index:200}
.nv-toast.show{opacity:1;transform:translate(50%,0)}
.tab-pane[hidden]{display:none}
.notif-list .notif-item summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between}
.notif-list .notif-item summary::-webkit-details-marker{display:none}
.notif-list .ni-body{padding-top:8px}
/* order detail modal reuses nv-modal from panel.css */
.nv-modal{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:20px}
.nv-modal[hidden]{display:none}
.nv-modal-backdrop{position:absolute;inset:0;background:rgba(11,19,37,.55)}
.nv-modal-card{position:relative;width:100%;max-width:460px;max-height:88vh;overflow:auto;background: var(--surface);border-radius:16px;padding:22px}
.nv-modal-close{position:absolute;top:12px;left:16px;font-size:24px;line-height:1;color:var(--gray);background:none;border:none;cursor:pointer}
