@font-face {
  font-family: "LocalNazanin";
  src: local("B Nazanin"), local("Nazanin"), local("BNazanin");
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-main: "LocalNazanin", Tahoma, serif;
  --red-950: #641017;
  --red-900: #7f111a;
  --red-800: #991b1b;
  --red-700: #bd1f25;
  --red-600: #dc2626;
  --red-50: #fff1f2;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --surface-3: #f0f3f8;
  --text: #111827;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #e5e7eb;
  --success: #047857;
  --success-bg: #ecfdf5;
  --blue: #2563eb;
  --blue-bg: #eff6ff;
  --gold: #c08106;
  --gold-bg: #fff7dd;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, .06);
  --shadow: 0 20px 60px rgba(15, 23, 42, .10);
  --shadow-red: 0 18px 42px rgba(189, 31, 37, .20);
  --radius-xs: 12px;
  --radius-sm: 18px;
  --radius: 24px;
  --radius-lg: 32px;
  --container: 1460px;
  --sidebar-w: 280px;
  --header-h: 82px;
}

body.dark-mode {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #111827;
  --surface-2: #172031;
  --surface-3: #0b1220;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --line: #243041;
  --success-bg: rgba(4, 120, 87, .14);
  --blue-bg: rgba(37, 99, 235, .18);
  --gold-bg: rgba(192, 129, 6, .18);
  --red-50: rgba(189, 31, 37, .14);
  --shadow-sm: 0 10px 24px rgba(2, 6, 23, .35);
  --shadow: 0 20px 60px rgba(2, 6, 23, .40);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  font-size: 18px;
  line-height: 1.8;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(220, 38, 38, .08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 220px, var(--bg) 100%);
  overflow-x: hidden;
}
body.drawer-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { display: block; width: 20px; height: 20px; }

.skip-link {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
.skip-link:focus {
  width: auto; height: auto; clip: auto; top: 12px; right: 12px; z-index: 300;
  background: var(--red-700); color: #fff; padding: 10px 14px; border-radius: var(--radius-xs);
}

.container { width: min(var(--container), calc(100% - 30px)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229,231,235,.85);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .05);
}
body.dark-mode .site-header {
  background: rgba(15, 23, 42, .88);
  border-color: rgba(36, 48, 65, .9);
}
.header-inner {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: center;
}
.header-right, .header-actions { display: flex; align-items: center; gap: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red-700), var(--red-950)); color: #fff;
  font-size: 25px; font-weight: 900; box-shadow: var(--shadow-red);
}
.brand strong { display: block; font-size: 25px; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.header-search {
  min-height: 50px; border: 1px solid transparent; border-radius: 999px;
  background: var(--surface-3); display: flex; align-items: center; gap: 10px; padding: 0 16px;
  color: var(--muted);
}
.header-search:focus-within {
  border-color: rgba(189,31,37,.28); box-shadow: 0 0 0 4px rgba(189,31,37,.08); background: var(--surface);
}
.header-search input {
  width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text);
}
.icon-btn {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  display: none; align-items: center; justify-content: center; gap: 4px; flex-direction: column;
}
.icon-btn span { width: 18px; height: 2px; border-radius: 999px; background: currentColor; }
.primary-btn, .secondary-btn, .ghost-btn, .text-link, .theme-toggle {
  min-height: 46px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 0 18px; border: 1px solid transparent;
}
.primary-btn {
  background: linear-gradient(135deg, var(--red-700), var(--red-950)); color: #fff; box-shadow: var(--shadow-red);
}
.secondary-btn {
  background: var(--red-50); color: var(--red-800); border-color: rgba(189,31,37,.14);
}
.ghost-btn, .theme-toggle {
  background: var(--surface); color: var(--text); border-color: var(--line);
}
.text-link { min-height: auto; padding: 0; color: var(--red-800); }
.theme-toggle { min-width: 92px; }

.layout-shell {
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); gap: 24px;
  padding: 24px 0 40px;
}

.dashboard-sidebar {
  position: sticky; top: calc(var(--header-h) + 18px); align-self: start;
  max-height: calc(100vh - var(--header-h) - 36px); overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); padding: 18px;
}
body.dark-mode .dashboard-sidebar { background: rgba(17,24,39,.96); }
.sidebar-head { margin-bottom: 18px; }
.drawer-close {
  display: none; width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  font-size: 28px; line-height: 1; margin-inline-start: auto; color: var(--muted);
}
.profile-card {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 22px;
  background: linear-gradient(135deg, rgba(189,31,37,.10), rgba(255,255,255,.75)); border: 1px solid rgba(189,31,37,.10);
}
body.dark-mode .profile-card { background: linear-gradient(135deg, rgba(189,31,37,.22), rgba(17,24,39,.8)); }
.avatar {
  flex: 0 0 58px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red-700), var(--red-950)); color: #fff; font-size: 29px; box-shadow: var(--shadow-red);
}
.profile-card h2 { margin: 0; font-size: 24px; line-height: 1.2; }
.profile-card p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; }
.profile-card a { color: var(--red-800); font-size: 15px; }

.sidebar-nav { display: grid; gap: 18px; }
.nav-group { display: grid; gap: 8px; }
.nav-title { color: var(--muted-2); font-size: 14px; font-weight: 900; padding: 0 10px; }
.nav-item {
  min-height: 52px; border-radius: 16px; padding: 10px 12px; display: flex; align-items: center; gap: 10px;
  color: var(--text); transition: .18s ease; position: relative;
}
.nav-item:hover { background: var(--surface-3); }
.nav-item.active {
  background: var(--red-50); color: var(--red-800); box-shadow: inset -4px 0 0 var(--red-700);
}
.nav-item.nav-exit { color: var(--red-700); }
.nav-icon {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-3); color: currentColor;
}
.badge {
  margin-inline-start: auto; min-width: 26px; height: 26px; border-radius: 999px; padding: 0 8px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted); font-size: 14px; font-weight: 900;
}
.badge.danger { background: var(--red-50); color: var(--red-800); }

.dashboard-main { display: grid; gap: 18px; }
.card-surface, .notice-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.95); box-shadow: var(--shadow-sm);
}
body.dark-mode .card-surface,
body.dark-mode .notice-card { background: rgba(17,24,39,.96); }
.page-intro {
  padding: clamp(18px, 4vw, 28px); display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.eyebrow {
  display: inline-flex; width: fit-content; background: var(--red-50); color: var(--red-800); border-radius: 999px;
  padding: 4px 12px; font-size: 14px; font-weight: 900; margin-bottom: 10px;
}
.page-intro h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.2; letter-spacing: -.03em; }
.page-intro p { margin: 10px 0 0; color: var(--muted); max-width: 840px; }
.intro-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.notice-card {
  padding: 18px 20px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 16px; align-items: center;
}
.notice-card.success { background: var(--success-bg); }
.notice-icon {
  width: 54px; height: 54px; border-radius: 18px; background: rgba(255,255,255,.7); display: grid; place-items: center; font-size: 24px;
}
.notice-copy h2 { margin: 0; font-size: 28px; line-height: 1.3; }
.notice-copy p { margin: 8px 0 0; color: var(--muted); }
.notice-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.stats-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
}
.stat-card { padding: 18px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stat-icon {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
}
.stat-icon.mint { background: #eafaf4; color: #057857; }
.stat-icon.gold { background: var(--gold-bg); color: var(--gold); }
.stat-icon.blue { background: var(--blue-bg); color: var(--blue); }
.stat-icon.rose { background: var(--red-50); color: var(--red-800); }
body.dark-mode .stat-icon.mint { background: rgba(5,120,87,.15); }
.stat-trend { font-size: 14px; font-weight: 900; }
.stat-trend.up { color: var(--success); }
.stat-trend.steady { color: var(--blue); }
.stat-trend.pending { color: var(--red-800); }
.stat-card h3 { margin: 0; font-size: 16px; color: var(--muted); }
.stat-card strong { display: block; margin-top: 4px; font-size: 42px; line-height: 1.1; }
.stat-card p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

.content-grid {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(290px, .8fr); gap: 16px;
}
.main-column, .side-column { display: grid; gap: 16px; }

.main-column, .side-column, .dashboard-main, .content-grid > *, .stats-grid > *, .action-grid > *, .check-grid > * {
  min-width: 0;
}
.card-surface, .notice-card, .stat-card, .action-card, .timeline article, .ticket-item, .summary-list li, .check-item {
  overflow: hidden;
}
.content-grid { align-items: start; }
.section-head, .page-intro, .notice-card, .ticket-item, .summary-list li { min-width: 0; }
.page-intro p, .notice-copy p, .action-card p, .timeline p, .ticket-item small, .summary-list li, .check-item {
  overflow-wrap: anywhere;
}
.section-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px;
}
.section-head h2 { margin: 0; font-size: 32px; line-height: 1.25; }
.section-head.compact h2 { font-size: 28px; }
.progress-card, .list-card, .profile-summary, .updates-card { padding: 20px; }
.progress-percent { color: var(--red-800); font-size: 22px; }
.progress-bar {
  width: 100%; height: 14px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-bottom: 18px;
}
.progress-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red-700), var(--red-950)); }
.check-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.check-item {
  min-height: 54px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px;
  background: var(--surface-2);
}
.check-item span {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted);
}
.check-item.done { border-color: rgba(4,120,87,.18); background: var(--success-bg); }
.check-item.done span { background: rgba(4,120,87,.15); color: var(--success); }

.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.action-card {
  min-height: 116px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface-2); padding: 16px;
  display: flex; gap: 14px; align-items: flex-start; transition: transform .16s ease, box-shadow .16s ease;
}
.action-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.action-card.action-primary { background: linear-gradient(135deg, rgba(189,31,37,.08), rgba(255,255,255,.88)); }
body.dark-mode .action-card.action-primary { background: linear-gradient(135deg, rgba(189,31,37,.18), rgba(17,24,39,.92)); }
.action-icon {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); font-size: 24px;
  box-shadow: var(--shadow-sm);
}
.action-card h3 { margin: 0; font-size: 24px; line-height: 1.2; }
.action-card p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.table-wrap { overflow: auto; }
.product-table { width: 100%; border-collapse: collapse; min-width: 740px; }
.product-table th, .product-table td { text-align: right; padding: 14px 10px; border-bottom: 1px solid var(--line); }
.product-table th { color: var(--muted); font-size: 15px; font-weight: 900; }
.product-table tbody tr:last-child td { border-bottom: 0; }
.title-cell { display: flex; align-items: center; gap: 12px; }
.title-cell strong { display: block; font-size: 18px; }
.title-cell small { color: var(--muted); }
.mini-thumb { width: 46px; height: 46px; border-radius: 14px; flex: 0 0 46px; }
.mini-thumb.red { background: linear-gradient(135deg, #fecaca, #ef4444); }
.mini-thumb.gold { background: linear-gradient(135deg, #fde68a, #f59e0b); }
.mini-thumb.blue { background: linear-gradient(135deg, #bfdbfe, #2563eb); }
.status-pill {
  min-height: 30px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; font-size: 14px; font-weight: 900;
}
.status-pill.active { background: var(--success-bg); color: var(--success); }
.status-pill.pending { background: var(--gold-bg); color: var(--gold); }
.product-table a { color: var(--red-800); font-weight: 900; }

.summary-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.summary-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2);
}
.summary-list span { color: var(--muted); }
.success-text { color: var(--success); }
.full { width: 100%; margin-top: 14px; }
.timeline, .ticket-list { display: grid; gap: 12px; }
.timeline article, .ticket-item {
  border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: var(--surface-2);
}
.timeline strong, .ticket-item strong { display: block; font-size: 18px; }
.timeline p, .ticket-item small { color: var(--muted); margin: 6px 0 0; display: block; }
.timeline small { color: var(--muted-2); margin-top: 8px; }
.ticket-item { display: flex; align-items: center; justify-content: space-between; }
.status-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.status-dot.pending { background: var(--gold); }
.status-dot.active { background: var(--success); }

.mobile-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.44); z-index: 80;
}

@media (max-width: 1240px) {
  .layout-shell { gap: 18px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .ghost-btn { display: none; }
  .layout-shell { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; }
  .dashboard-sidebar {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(88vw, 340px); max-height: none;
    border-radius: 0 0 0 28px; transform: translateX(108%); transition: transform .24s ease; z-index: 90;
    overflow: auto;
  }
  body.drawer-open .dashboard-sidebar { transform: translateX(0); }
  .drawer-close, .icon-btn { display: inline-flex; }
  .site-header { position: sticky; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .dashboard-main, .main-column, .side-column { gap: 14px; }
  .container { width: min(var(--container), calc(100% - 20px)); }
  .header-search { order: 4; grid-column: 1 / -1; }
  .header-inner { grid-template-columns: auto 1fr auto; gap: 10px; padding-block: 10px; }
  .brand strong { font-size: 22px; }
  .brand small { display: none; }
  .theme-toggle .theme-text { display: none; }
  .theme-toggle { min-width: 46px; padding: 0 12px; }
  .page-intro, .notice-card { grid-template-columns: 1fr; display: grid; align-items: start; }
  .page-intro { padding: 18px; }
  .page-intro h1 { font-size: 28px; }
  .stats-grid, .action-grid, .check-grid { grid-template-columns: 1fr; }
  .notice-copy h2 { font-size: 24px; }
  .section-head, .section-head.with-link, .section-head.compact { flex-direction: column; align-items: stretch; }
  .section-head h2 { font-size: 26px; }
  .stat-card strong { font-size: 36px; }
}


@media (max-width: 640px) {
  body { font-size: 16px; }
  .layout-shell { gap: 14px; padding-bottom: 28px; }
  .page-intro,
  .notice-card,
  .progress-card,
  .list-card,
  .profile-summary,
  .updates-card,
  .stat-card,
  .card-surface { padding: 16px; }
  .profile-card { align-items: center; gap: 12px; }
  .profile-card h2 { font-size: 22px; }
  .summary-list li {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 4px;
  }
  .ticket-item { flex-wrap: wrap; align-items: flex-start; gap: 8px; }
  .product-table { min-width: 680px; }
}

@media (max-width: 520px) {
  .brand-mark { width: 42px; height: 42px; font-size: 22px; }
  .brand strong { font-size: 20px; }
  .header-actions { gap: 6px; }
  .primary-btn, .secondary-btn, .ghost-btn, .theme-toggle { min-height: 42px; padding: 0 14px; }
  .notice-card, .progress-card, .list-card, .profile-summary, .updates-card, .card-surface { border-radius: 22px; }
}


/* v31 full panel additions */
.panel-grid { align-items: start; }
.form-card, .filter-card { padding: 20px; }
.info-grid, .feature-grid, .toolbar-grid, .product-cards-grid { display: grid; gap: 14px; }
.info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-item {
  min-height: 82px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2);
  padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.info-item span { color: var(--muted); font-size: 14px; }
.info-item strong { font-size: 22px; line-height: 1.35; }
.info-item.wide { grid-column: 1 / -1; }
.ltr-value { direction: ltr; unicode-bidi: plaintext; }
.feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-card {
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); padding: 16px;
}
.feature-card strong, .tip-item strong { display: block; font-size: 20px; margin-bottom: 6px; }
.feature-card p, .tip-item p { margin: 0; color: var(--muted); }
.quick-list, .tip-list { display: grid; gap: 10px; }
.quick-row {
  min-height: 56px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); padding: 0 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.quick-row b { color: var(--red-800); font-size: 20px; }
.toolbar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field-chip {
  min-height: 78px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2);
  padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.field-chip label { color: var(--muted); font-size: 14px; font-weight: 800; }
.field-chip input, .field-chip select {
  width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit;
}
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.product-cards-grid { grid-template-columns: 1fr; }
.product-mini-card {
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface-2); padding: 14px;
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 14px;
}
.thumb-box { width: 72px; height: 72px; border-radius: 18px; }
.thumb-box.red { background: linear-gradient(135deg, #fecaca, #ef4444); }
.thumb-box.gold { background: linear-gradient(135deg, #fde68a, #f59e0b); }
.thumb-box.blue { background: linear-gradient(135deg, #bfdbfe, #2563eb); }
.product-mini-card strong { display: block; font-size: 20px; }
.product-mini-card p { margin: 6px 0 0; color: var(--muted); }

@media (max-width: 1240px) {
  .toolbar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .info-grid, .feature-grid, .toolbar-grid { grid-template-columns: 1fr; }
  .product-mini-card { grid-template-columns: 1fr; }
  .thumb-box { width: 100%; max-width: 100px; }
  .info-item strong { font-size: 20px; }
}


/* v32 messages / support / profile */
.chat-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.chat-list-card, .chat-panel { padding: 20px; }
.chat-search {
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2);
  padding: 0 14px; min-height: 52px; display: flex; align-items: center; margin-bottom: 14px;
}
.chat-search input {
  width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit;
}
.chat-list { display: grid; gap: 10px; }
.chat-item {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2);
}
.chat-item.active { background: var(--red-50); border-color: rgba(189,31,37,.18); }
.chat-avatar {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-weight: 900;
}
.chat-avatar.red { background: linear-gradient(135deg, var(--red-700), var(--red-950)); }
.chat-avatar.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.chat-avatar.gold { background: linear-gradient(135deg, #f59e0b, #b45309); }
.chat-avatar.mint { background: linear-gradient(135deg, #10b981, #047857); }
.chat-copy strong { display: block; font-size: 18px; line-height: 1.3; }
.chat-copy p { margin: 4px 0 0; color: var(--muted); line-height: 1.6; }
.chat-meta { text-align: left; color: var(--muted-2); font-size: 14px; display: grid; gap: 6px; }
.chat-meta b {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 999px; background: var(--red-700); color: #fff; justify-self: end;
}
.chat-panel { display: grid; gap: 16px; }
.chat-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.chat-head-user { display: flex; align-items: center; gap: 12px; }
.chat-head-user strong { display: block; font-size: 22px; }
.chat-head-user small { color: var(--muted); }
.messages-thread {
  min-height: 420px; display: flex; flex-direction: column; gap: 10px; padding: 6px;
}
.bubble {
  max-width: min(78%, 560px); padding: 12px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface-2);
}
.bubble p { margin: 0; }
.bubble span { display: block; margin-top: 8px; color: var(--muted-2); font-size: 13px; }
.bubble.incoming { align-self: flex-start; border-top-right-radius: 8px; }
.bubble.outgoing {
  align-self: flex-end; border-top-left-radius: 8px; background: var(--red-50); border-color: rgba(189,31,37,.16);
}
.message-composer {
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface-2); padding: 14px;
}
.message-composer textarea {
  width: 100%; resize: vertical; min-height: 110px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit;
}
.composer-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.ticket-stack { display: grid; gap: 12px; }
.ticket-row {
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); padding: 14px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center;
}
.ticket-main strong { display: block; font-size: 20px; }
.ticket-main p { margin: 6px 0 0; color: var(--muted); }
.ticket-main small { display: block; margin-top: 8px; color: var(--muted-2); }
.ticket-side { display: grid; justify-items: end; gap: 10px; }
.support-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-hero-inline {
  display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-2);
}
.avatar.lg { width: 72px; height: 72px; font-size: 34px; }
.hero-copy strong { display: block; font-size: 26px; line-height: 1.2; }
.hero-copy p { margin: 4px 0 0; color: var(--muted); }
.pill-note {
  display: inline-flex; margin-top: 10px; min-height: 30px; align-items: center; padding: 0 12px; border-radius: 999px;
  background: var(--success-bg); color: var(--success); font-size: 14px; font-weight: 900;
}
.settings-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.setting-box {
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); padding: 16px;
}
.setting-box strong { display: block; font-size: 20px; }
.setting-box p { margin: 6px 0 10px; color: var(--muted); }
.toggle-list { display: grid; gap: 12px; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2);
}
.toggle-row strong { display: block; font-size: 18px; }
.toggle-row p { margin: 4px 0 0; color: var(--muted); }
.toggle-chip {
  min-width: 78px; min-height: 34px; padding: 0 12px; display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 14px; font-weight: 900;
}
.toggle-chip.on { background: var(--success-bg); color: var(--success); }

@media (max-width: 1240px) {
  .chat-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .support-form-grid, .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .chat-panel-head, .profile-hero-inline, .toggle-row { flex-direction: column; align-items: stretch; }
  .ticket-row { grid-template-columns: 1fr; }
  .ticket-side { justify-items: start; }
  .bubble { max-width: 100%; }
}
@media (max-width: 560px) {
  .chat-item { grid-template-columns: 44px minmax(0,1fr); }
  .chat-meta { grid-column: 2; justify-items: start; text-align: right; }
}


/* v33: business pages + component system */
.panel-footer {
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(12px);
}
body.dark-mode .panel-footer { background: rgba(15,23,42,.9); }
.panel-footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}
.panel-footer strong { color: var(--text); }

.status-pill.draft {
  background: var(--surface-3);
  color: var(--muted);
}
.orders-toolbar-grid,
.wallet-form-grid,
.reports-toolbar-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.invoice-card { padding: 20px; }
.invoice-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.invoice-meta-grid > div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 12px 14px;
}
.invoice-meta-grid span { display: block; color: var(--muted); font-size: 14px; }
.invoice-meta-grid strong { display: block; margin-top: 4px; font-size: 18px; }
.invoice-total {
  margin-top: 16px;
  margin-inline-start: auto;
  width: min(100%, 360px);
  border-radius: 18px;
  background: var(--red-50);
  border: 1px solid rgba(189,31,37,.16);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.invoice-total span { color: var(--muted); }
.invoice-total strong { color: var(--red-800); font-size: 22px; }
.order-steps { display: grid; gap: 12px; }
.order-step {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 12px;
}
.order-step > b {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--muted);
}
.order-step strong { display: block; }
.order-step small { color: var(--muted); }
.order-step.done > b { background: var(--success-bg); color: var(--success); }
.order-step.current { border-color: rgba(189,31,37,.18); background: var(--red-50); }
.order-step.current > b { background: var(--red-700); color: #fff; }

.wallet-hero {
  padding: clamp(20px, 4vw, 30px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}
.wallet-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.2; }
.wallet-hero p { margin: 10px 0 0; color: var(--muted); max-width: 760px; }
.wallet-balance {
  min-width: min(100%, 380px);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--red-700), var(--red-950));
  color: #fff;
  padding: 20px;
  box-shadow: var(--shadow-red);
}
.wallet-balance span,
.wallet-balance small { display: block; opacity: .82; }
.wallet-balance strong { display: block; margin: 8px 0; font-size: 30px; }
.wallet-hero .intro-actions { grid-column: 1 / -1; }
.money-type {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}
.money-type.income { background: var(--success-bg); color: var(--success); }
.money-type.expense { background: var(--red-50); color: var(--red-800); }
.revenue-bars { display: grid; gap: 14px; }
.revenue-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.metric-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.metric-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red-700), var(--red-950));
}
.metric-bar.blue span { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.metric-bar.gold span { background: linear-gradient(90deg, #c08106, #fbbf24); }
.metric-bar.gray span { background: linear-gradient(90deg, #6b7280, #9ca3af); }

.reports-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 16px;
}
.chart-card { padding: 20px; }
.chart-card-wide { grid-row: span 2; }
.chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}
.chart-legend i,
.legend-list i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.legend-red { background: var(--red-700); }
.legend-blue { background: var(--blue); }
.legend-gold { background: var(--gold); }
.legend-gray { background: var(--muted-2); }
.svg-chart-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 10px;
}
.line-chart { width: 100%; height: auto; }
.grid-lines line { stroke: var(--line); stroke-width: 1; }
.chart-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.red-line { stroke: var(--red-700); }
.blue-line { stroke: var(--blue); }
.red-point { fill: var(--red-700); }
.blue-point { fill: var(--blue); }
.funnel-list { display: grid; gap: 10px; }
.funnel-step {
  position: relative;
  min-height: 46px;
  border-radius: 14px;
  background: var(--surface-3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.funnel-step span {
  height: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: linear-gradient(90deg, rgba(189,31,37,.20), rgba(189,31,37,.06));
  white-space: nowrap;
}
.funnel-step b { padding-inline: 12px; color: var(--muted); }
.donut-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.donut-chart {
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(
    var(--red-700) 0 46%,
    var(--blue) 46% 73%,
    var(--gold) 73% 90%,
    var(--muted-2) 90% 100%
  );
  display: grid;
  place-items: center;
  position: relative;
}
.donut-chart::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: var(--surface);
}
.donut-chart > span {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
}
.donut-chart small { display: block; color: var(--muted); font-size: 13px; }
.legend-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.legend-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}
.trend-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}
.trend-pill.up { background: var(--success-bg); color: var(--success); }
.trend-pill.steady { background: var(--blue-bg); color: var(--blue); }

@media (max-width: 1240px) {
  .orders-toolbar-grid,
  .wallet-form-grid,
  .reports-toolbar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .invoice-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reports-grid { grid-template-columns: 1fr; }
  .chart-card-wide { grid-row: auto; }
}
@media (max-width: 900px) {
  .wallet-hero { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .panel-footer-inner { flex-direction: column; align-items: flex-start; padding-block: 16px; }
  .orders-toolbar-grid,
  .wallet-form-grid,
  .reports-toolbar-grid,
  .invoice-meta-grid {
    grid-template-columns: 1fr;
  }
  .donut-layout { grid-template-columns: 1fr; justify-items: center; }
  .legend-list { width: 100%; }
  .wallet-balance { width: 100%; min-width: 0; }
  .invoice-total { width: 100%; flex-direction: column; align-items: flex-start; }
}


/* v34: saved / liked ads */
.saved-toolbar-card { padding: 20px; }
.saved-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.saved-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.saved-tab {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
}
.saved-tab:hover,
.saved-tab.active {
  background: var(--red-50);
  color: var(--red-800);
  border-color: rgba(189,31,37,.18);
}
.saved-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.saved-search,
.saved-sort {
  min-width: 230px;
  min-height: 68px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.saved-search span,
.saved-sort span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.saved-search input,
.saved-sort select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}
.saved-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
  gap: 16px;
  align-items: start;
}
.saved-main-column,
.saved-side-column { min-width: 0; }
.saved-side-column {
  display: grid;
  gap: 16px;
}
.saved-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.saved-ad-card {
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.saved-ad-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.saved-ad-card.removing {
  opacity: 0;
  transform: scale(.96);
  transition: .2s ease;
}
.saved-media {
  min-height: 180px;
  position: relative;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.saved-media.red { background: linear-gradient(135deg, #fecaca, #dc2626); }
.saved-media.blue { background: linear-gradient(135deg, #dbeafe, #2563eb); }
.saved-media.gold { background: linear-gradient(135deg, #fef3c7, #d97706); }
.saved-media.mint { background: linear-gradient(135deg, #d1fae5, #059669); }
.saved-media.job { background: linear-gradient(135deg, #e0e7ff, #4338ca); }
.saved-media.store { background: linear-gradient(135deg, #fce7f3, #be185d); }
.saved-kind {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}
.heart-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: var(--red-700);
  display: grid;
  place-items: center;
  font-size: 24px;
  box-shadow: 0 8px 20px rgba(15,23,42,.12);
}
.heart-btn:hover { transform: scale(1.06); }
.saved-card-body { padding: 16px; }
.saved-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.saved-card-head h3 {
  margin: 0;
  font-size: 23px;
  line-height: 1.35;
}
.saved-card-head p {
  margin: 5px 0 0;
  color: var(--muted);
}
.verified-mark,
.stock-label {
  flex: 0 0 auto;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}
.verified-mark {
  background: var(--success-bg);
  color: var(--success);
}
.stock-label {
  background: var(--blue-bg);
  color: var(--blue);
}
.saved-card-meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.saved-card-meta strong { font-size: 21px; }
.saved-card-meta span { color: var(--muted); font-size: 14px; }
.price-change {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}
.price-change.down { color: var(--success); }
.price-change.up { color: var(--red-700); }
.saved-card-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.saved-card-actions .primary-btn,
.saved-card-actions .ghost-btn {
  flex: 1 1 140px;
}
.saved-empty {
  padding: 44px 20px;
  text-align: center;
}
.empty-heart {
  font-size: 64px;
  color: var(--red-700);
  line-height: 1;
}
.saved-empty h2 { margin: 14px 0 4px; }
.saved-empty p {
  margin: 0 auto 18px;
  color: var(--muted);
  max-width: 520px;
}
.saved-alerts {
  display: grid;
  gap: 10px;
}
.saved-alerts article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}
.saved-alerts strong { display: block; }
.saved-alerts p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.saved-alerts small {
  display: block;
  margin-top: 6px;
  color: var(--muted-2);
}
.alert-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.alert-icon.down {
  background: var(--success-bg);
  color: var(--success);
}
.alert-icon.new {
  background: var(--blue-bg);
  color: var(--blue);
}
.alert-icon.time {
  background: var(--gold-bg);
  color: var(--gold);
}
.compact-toggle {
  align-items: flex-start;
  padding: 12px;
}
.compact-toggle p { font-size: 14px; }
.mini-suggestions {
  display: grid;
  gap: 10px;
}
.mini-suggestions a {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-2);
}
.mini-suggestions strong { display: block; }
.mini-suggestions small { color: var(--muted); }
.suggestion-thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}
.suggestion-thumb.red { background: linear-gradient(135deg, #fecaca, #ef4444); }
.suggestion-thumb.blue { background: linear-gradient(135deg, #bfdbfe, #2563eb); }
.suggestion-thumb.gold { background: linear-gradient(135deg, #fde68a, #f59e0b); }

@media (max-width: 1260px) {
  .saved-layout { grid-template-columns: 1fr; }
  .saved-side-column {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .saved-side-column {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .saved-grid { grid-template-columns: 1fr; }
  .saved-toolbar { align-items: stretch; }
  .saved-controls { width: 100%; }
  .saved-search,
  .saved-sort {
    flex: 1 1 220px;
    min-width: 0;
  }
}
@media (max-width: 520px) {
  .saved-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .saved-tab { width: 100%; }
  .saved-card-head,
  .saved-card-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .saved-media { min-height: 150px; }
}


/* V35: mobile sidebar/category vertical scroll fix */
@media (max-width: 980px) {
  .dashboard-sidebar {
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }

  .dashboard-sidebar .sidebar-head {
    position: relative;
    z-index: 2;
  }

  .dashboard-sidebar .sidebar-nav {
    min-height: max-content;
    padding-bottom: 24px;
  }

  body.drawer-open .dashboard-sidebar {
    pointer-events: auto;
  }

  body.drawer-open .mobile-backdrop {
    pointer-events: auto;
  }
}

/* Visible but unobtrusive mobile scrollbar */
@media (max-width: 980px) {
  .dashboard-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(189, 31, 37, .42) transparent;
  }

  .dashboard-sidebar::-webkit-scrollbar {
    width: 5px;
  }

  .dashboard-sidebar::-webkit-scrollbar-track {
    background: transparent;
  }

  .dashboard-sidebar::-webkit-scrollbar-thumb {
    background: rgba(189, 31, 37, .38);
    border-radius: 999px;
  }
}


/* V36: integrated professional multi-step advertisement wizard */
.publish-options-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.publish-option-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.publish-option-card.primary-path {
  background:
    linear-gradient(145deg, rgba(189,31,37,.08), rgba(255,255,255,.94));
  border-color: rgba(189,31,37,.18);
}
body.dark-mode .publish-option-card.primary-path {
  background: linear-gradient(145deg, rgba(189,31,37,.22), rgba(17,24,39,.96));
}
.publish-option-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  font-size: 28px;
  margin-bottom: 14px;
}
.publish-option-card h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.3;
}
.publish-option-card p {
  margin: 8px 0;
  color: var(--muted);
}
.publish-option-card ul {
  margin: 8px 0 18px;
  padding-right: 20px;
  color: var(--muted);
}
.publish-option-card .full {
  margin-top: auto;
}

.wizard-top {
  padding: 22px;
  overflow: visible;
}
.wizard-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 12px;
}
.wizard-breadcrumb a:hover { color: var(--red-800); }
.wizard-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  gap: 18px;
  align-items: center;
}
.wizard-title-row h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.2;
}
.wizard-title-row p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 760px;
}
.wizard-progress-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  padding: 16px;
}
.wizard-progress-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.wizard-progress-card span { color: var(--red-800); font-weight: 900; }
.wizard-progress-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.wizard-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red-700), var(--red-950));
}
.wizard-step-strip {
  margin-top: 18px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: thin;
}
.wizard-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 700px;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}
.wizard-step-list li > a,
.wizard-step-list li > span {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
}
.wizard-step-num {
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--muted);
  font-weight: 900;
}
.wizard-step-list strong { line-height: 1.2; }
.wizard-step-list small { color: var(--muted); }
.wizard-step-list .is-active > a,
.wizard-step-list .is-active > span {
  background: var(--red-50);
  border-color: rgba(189,31,37,.18);
}
.wizard-step-list .is-active .wizard-step-num {
  background: var(--red-700);
  color: #fff;
}
.wizard-step-list .is-done .wizard-step-num {
  background: var(--success-bg);
  color: var(--success);
}
.wizard-step-list .is-done .wizard-step-num::after {
  content: "✓";
}
.wizard-step-list .is-done .wizard-step-num {
  font-size: 0;
}
.wizard-step-list .is-done .wizard-step-num::after {
  font-size: 17px;
}

.wizard-layout,
.wizard-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 18px;
  align-items: start;
}
.wizard-form-card,
.wizard-review-card {
  padding: 22px;
}
.wizard-side-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.wizard-side-card,
.wizard-publish-panel {
  padding: 18px;
}
.wizard-side-card h2,
.wizard-publish-panel h2 {
  margin: 0 0 10px;
  font-size: 26px;
}
.wizard-side-card p,
.wizard-publish-panel p {
  color: var(--muted);
}
.wizard-section + .wizard-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.wizard-section-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.wizard-section-title > span {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--red-50);
  font-size: 22px;
}
.wizard-section-title h2 {
  margin: 0;
  font-size: 29px;
  line-height: 1.3;
}
.wizard-section-title p {
  margin: 4px 0 0;
  color: var(--muted);
}
.wizard-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.wizard-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.wizard-field.full { grid-column: 1 / -1; }
.wizard-field label {
  font-weight: 900;
}
.wizard-field small { color: var(--muted); }
.wizard-input-shell,
.wizard-select-shell,
.wizard-textarea-shell {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
}
.wizard-textarea-shell {
  align-items: stretch;
  padding-block: 10px;
}
.wizard-input-shell:focus-within,
.wizard-select-shell:focus-within,
.wizard-textarea-shell:focus-within {
  border-color: rgba(189,31,37,.30);
  box-shadow: 0 0 0 4px rgba(189,31,37,.07);
}
.wizard-input-shell input,
.wizard-select-shell select,
.wizard-textarea-shell textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}
.wizard-textarea-shell textarea {
  resize: vertical;
}
.wizard-uploader {
  display: grid;
  gap: 12px;
}
.wizard-upload-main {
  min-height: 170px;
  border: 2px dashed var(--line-strong, var(--line));
  border-radius: 22px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  cursor: pointer;
}
.wizard-upload-main input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.wizard-upload-main > span {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--red-50);
  color: var(--red-800);
  font-size: 26px;
}
.wizard-upload-main strong {
  margin-top: 8px;
  font-size: 22px;
}
.wizard-upload-main small {
  max-width: 600px;
  color: var(--muted);
}
.wizard-upload-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.wizard-upload-slot {
  aspect-ratio: 1;
  min-height: 86px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--muted);
  overflow: hidden;
  position: relative;
}
.wizard-upload-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wizard-upload-slot.has-image::after {
  content: attr(data-label);
  position: absolute;
  right: 6px;
  bottom: 6px;
  border-radius: 999px;
  background: rgba(15,23,42,.76);
  color: #fff;
  padding: 2px 7px;
  font-size: 12px;
}
.wizard-actions {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wizard-preview-image {
  min-height: 150px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(189,31,37,.10), rgba(37,99,235,.10)),
    var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 46px;
  margin-bottom: 14px;
  overflow: hidden;
}
.wizard-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wizard-preview-row {
  padding: 11px 0;
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--line);
}
.wizard-preview-row:last-child { border-bottom: 0; }
.wizard-preview-row span { color: var(--muted); font-size: 14px; }
.wizard-preview-row strong { overflow-wrap: anywhere; }
.tips-card ul {
  margin: 0;
  padding-right: 20px;
  color: var(--muted);
}
.warning-card {
  background: var(--gold-bg) !important;
  border-color: rgba(192,129,6,.16);
}
.wizard-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.wizard-category-card,
.wizard-condition-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--text);
  padding: 14px;
  text-align: right;
  min-width: 0;
}
.wizard-category-card:hover,
.wizard-category-card.is-selected,
.wizard-condition-card:hover,
.wizard-condition-card.is-selected {
  border-color: rgba(189,31,37,.30);
  background: var(--red-50);
  box-shadow: inset 0 0 0 1px rgba(189,31,37,.10);
}
.wizard-category-card > span,
.wizard-condition-card > span {
  display: block;
  font-size: 27px;
  margin-bottom: 8px;
}
.wizard-category-card strong,
.wizard-condition-card strong {
  display: block;
  font-size: 20px;
}
.wizard-category-card small,
.wizard-condition-card small {
  color: var(--muted);
}
.wizard-condition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.wizard-map {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-2);
  padding: 14px;
}
.wizard-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.wizard-map-toolbar strong,
.wizard-map-toolbar small {
  display: block;
}
.wizard-map-toolbar small { color: var(--muted); }
.wizard-map-canvas {
  min-height: 300px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px),
    linear-gradient(135deg, #dbeafe, #dcfce7);
  background-size: 34px 34px, 34px 34px, auto;
}
body.dark-mode .wizard-map-canvas {
  background:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(135deg, #172554, #052e16);
  background-size: 34px 34px, 34px 34px, auto;
}
.wizard-map-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50% 50% 50% 12px;
  border: 3px solid #fff;
  background: var(--red-700);
  color: #fff;
  box-shadow: var(--shadow);
}
.wizard-map-marker.is-active {
  transform: translate(-50%, -50%) scale(1.12);
  background: var(--red-950);
}
.wizard-map-center {
  position: absolute;
  right: 16px;
  bottom: 16px;
  min-width: 220px;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  color: #111827;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.wizard-map-center strong,
.wizard-map-center small { display: block; }
.wizard-map-center small { color: #6b7280; direction: ltr; text-align: right; }
.wizard-map-note {
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
}
.wizard-map-note p { margin: 0; }
.wizard-toggle-row {
  margin-top: 14px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wizard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wizard-chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 14px;
}
.wizard-chip.is-selected {
  background: var(--red-50);
  border-color: rgba(189,31,37,.24);
  color: var(--red-800);
}
.wizard-review-hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-2);
}
.wizard-review-image {
  aspect-ratio: 1;
  border-radius: 20px;
  background: linear-gradient(135deg, #fee2e2, #bfdbfe);
  display: grid;
  place-items: center;
  font-size: 52px;
}
.wizard-review-hero h2 {
  margin: 4px 0;
  font-size: 30px;
  line-height: 1.3;
}
.wizard-review-hero p {
  margin: 0;
  color: var(--muted);
}
.wizard-review-price {
  display: block;
  margin-top: 8px;
  color: var(--red-800);
  font-size: 25px;
}
.wizard-review-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.wizard-review-grid > div,
.wizard-description-preview,
.wizard-selected-features {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-2);
  padding: 13px;
}
.wizard-review-grid span,
.wizard-description-preview > span,
.wizard-selected-features > span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}
.wizard-review-grid strong {
  display: block;
  margin-top: 3px;
}
.wizard-description-preview,
.wizard-selected-features { margin-top: 12px; }
.wizard-description-preview p { margin: 6px 0 0; }
.wizard-selected-features > div {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.wizard-selected-features b {
  border-radius: 999px;
  background: var(--red-50);
  color: var(--red-800);
  padding: 4px 10px;
  font-size: 14px;
}
.wizard-selected-features em {
  color: var(--muted);
}
.wizard-publish-panel {
  background:
    linear-gradient(145deg, rgba(4,120,87,.10), rgba(255,255,255,.95)) !important;
  border-color: rgba(4,120,87,.18);
}
body.dark-mode .wizard-publish-panel {
  background: linear-gradient(145deg, rgba(4,120,87,.18), rgba(17,24,39,.96)) !important;
}
.wizard-publish-status {
  margin-bottom: 12px;
  border-radius: 15px;
  background: var(--success-bg);
  color: var(--success);
  padding: 10px 12px;
}
.wizard-mobile-bar {
  display: none;
}

@media (max-width: 1240px) {
  .publish-options-grid {
    grid-template-columns: 1fr;
  }
  .wizard-layout,
  .wizard-review-layout {
    grid-template-columns: 1fr;
  }
  .wizard-side-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .wizard-title-row {
    grid-template-columns: 1fr;
  }
  .wizard-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wizard-review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .wizard-side-panel {
    grid-template-columns: 1fr;
  }
  .wizard-fields,
  .wizard-category-grid,
  .wizard-condition-grid,
  .wizard-review-grid {
    grid-template-columns: 1fr;
  }
  .wizard-field.full {
    grid-column: auto;
  }
  .wizard-upload-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .wizard-map-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .wizard-review-hero {
    grid-template-columns: 1fr;
  }
  .wizard-review-image {
    max-width: 180px;
  }
  .wizard-actions {
    padding-bottom: 72px;
  }
  .wizard-mobile-bar {
    position: sticky;
    bottom: 10px;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    padding: 10px 12px;
  }
  body.dark-mode .wizard-mobile-bar {
    background: rgba(17,24,39,.94);
  }
  .wizard-mobile-bar span,
  .wizard-mobile-bar strong {
    display: block;
  }
  .wizard-mobile-bar span {
    color: var(--muted);
    font-size: 13px;
  }
}
@media (max-width: 520px) {
  .wizard-top,
  .wizard-form-card,
  .wizard-review-card,
  .wizard-side-card,
  .wizard-publish-panel,
  .publish-option-card {
    padding: 16px;
  }
  .wizard-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wizard-review-hero h2 {
    font-size: 24px;
  }
  .wizard-title-row h1 {
    font-size: 27px;
  }
}


/* V37: job ad and resume publication panels */
.recruitment-progress {
  padding: 16px 20px;
}
.recruitment-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.recruitment-progress span {
  color: var(--red-800);
  font-weight: 900;
}
.recruitment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 18px;
  align-items: start;
}
.recruitment-form {
  padding: 22px;
}
.recruitment-benefits-preview {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.recruitment-benefits-preview b {
  border-radius: 999px;
  background: var(--red-50);
  color: var(--red-800);
  padding: 4px 10px;
  font-size: 14px;
}
.recruitment-benefits-preview em {
  color: var(--muted);
}
.resume-upload-box {
  min-height: 92px;
  border: 2px dashed var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.resume-upload-box:hover {
  border-color: rgba(189,31,37,.25);
  background: var(--red-50);
}
.resume-upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.resume-upload-box > span {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--surface);
  font-size: 24px;
  box-shadow: var(--shadow-sm);
}
.resume-upload-box strong,
.resume-upload-box small {
  display: block;
}
.resume-upload-box small {
  color: var(--muted);
}
.success-card {
  background: var(--success-bg) !important;
  border-color: rgba(4,120,87,.18);
}
.success-card h2 {
  color: var(--success);
}

@media (max-width: 1240px) {
  .recruitment-layout {
    grid-template-columns: 1fr;
  }
  .recruitment-layout .wizard-side-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .recruitment-layout .wizard-side-panel {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .recruitment-form,
  .recruitment-progress {
    padding: 16px;
  }
  .recruitment-progress > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* V52 — collision-free dashboard panels on phones and small tablets */
.layout-shell,
.dashboard-main,
.dashboard-main > *,
.card-surface,
.saved-toolbar,
.saved-tabs,
.saved-controls,
.saved-layout,
.saved-main-column,
.saved-side-column {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 760px) {
  .layout-shell {
    width: min(var(--container), calc(100% - 16px));
    gap: 12px;
  }

  .dashboard-main {
    width: 100%;
    overflow: visible;
  }

  .saved-toolbar-card {
    padding: 16px;
    overflow: visible;
  }

  .saved-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
  }

  .saved-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .saved-tab {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    white-space: nowrap;
  }

  .saved-controls {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .saved-search,
  .saved-sort {
    width: 100%;
    min-width: 0;
  }

  .intro-actions,
  .saved-card-actions {
    width: 100%;
  }

  .intro-actions > *,
  .saved-card-actions > * {
    max-width: 100%;
  }
}

@media (max-width: 390px) {
  .saved-tabs {
    grid-template-columns: 1fr;
  }
}

/* V60 — functional marketplace media uploader */
.media-upload-status{display:block;margin-top:10px;color:var(--brand,#b11f2c);font-weight:800}
.wizard-video-uploader{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(260px,1.2fr);gap:14px;align-items:stretch}
.wizard-video-pick{min-height:170px}
.wizard-video-preview{min-height:170px;border:1px dashed var(--line,#d8dde7);border-radius:18px;background:var(--soft,#f7f8fb);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;padding:16px;overflow:hidden;text-align:center}
.wizard-video-preview>span{font-size:2rem}.wizard-video-preview video{width:100%;max-height:250px;border-radius:14px;background:#111}
.wizard-video-preview>div{display:flex;flex-direction:column;gap:4px}.wizard-video-preview button,.media-slot button{border:0;background:#a71928;color:#fff;border-radius:999px;font:inherit;font-weight:800;cursor:pointer}
.wizard-video-preview button{padding:8px 14px}.media-slot{position:relative}.media-slot button{position:absolute;top:6px;left:6px;width:28px;height:28px;line-height:28px;padding:0;box-shadow:0 4px 12px #0003}
.market-toast{position:fixed;left:50%;bottom:max(24px,env(safe-area-inset-bottom));z-index:10000;transform:translateX(-50%);max-width:min(92vw,560px);padding:12px 18px;border-radius:14px;background:#172033;color:#fff;box-shadow:0 16px 45px #0004;font-weight:800;text-align:center}.market-toast[data-tone="success"]{background:#146c43}.market-toast[data-tone="error"]{background:#a71928}
.is-disabled{opacity:.55;pointer-events:none}.wizard-review-image img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
@media(max-width:720px){.wizard-video-uploader{grid-template-columns:1fr}.wizard-video-preview,.wizard-video-pick{min-height:150px}}
.dynamic-saved-media{position:relative;min-height:190px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:var(--soft,#f4f6f9)}.dynamic-saved-media>img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover}.dynamic-saved-media>span:not(.saved-kind){font-size:3.3rem}.dynamic-saved-media .saved-kind,.dynamic-saved-media .heart-btn{z-index:2}.market-toast{position:fixed;left:50%;bottom:max(24px,env(safe-area-inset-bottom));z-index:10000;transform:translateX(-50%);max-width:min(92vw,560px);padding:12px 18px;border-radius:14px;background:#172033;color:#fff;box-shadow:0 16px 45px #0004;font-weight:800;text-align:center}

/* Functional marketplace panels — v60 */
.sd-toast-stack{position:fixed;z-index:3000;left:18px;bottom:18px;display:grid;gap:10px;max-width:min(390px,calc(100vw - 36px))}.sd-toast{background:#162033;color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:12px 16px;box-shadow:0 18px 45px rgba(15,23,42,.25);opacity:0;transform:translateY(10px);transition:.2s ease;font-size:.9rem}.sd-toast.show{opacity:1;transform:none}.sd-toast.error{background:#7f1d1d}.sd-modal-open{overflow:hidden}.sd-modal-shell{position:fixed;inset:0;z-index:2500;display:grid;place-items:center;padding:18px}.sd-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.58);backdrop-filter:blur(4px)}.sd-modal{position:relative;width:min(620px,100%);max-height:min(780px,calc(100vh - 36px));overflow:auto;background:var(--surface,#fff);color:var(--text,#172033);border:1px solid var(--border,#e2e8f0);border-radius:22px;box-shadow:0 30px 90px rgba(15,23,42,.32)}.sd-modal.wide{width:min(820px,100%)}.sd-modal>header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;background:inherit;border-bottom:1px solid var(--border,#e2e8f0)}.sd-modal>header h2{margin:0;font-size:1.1rem}.sd-modal-close{width:38px;height:38px;border:1px solid var(--border,#e2e8f0);border-radius:12px;background:transparent;color:inherit;font-size:1.5rem;cursor:pointer}.sd-modal-body{padding:20px}.sd-modal-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.sd-form-grid,.sd-detail-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.sd-form-grid label,.sd-detail-list label{display:grid;gap:7px;font-size:.86rem}.sd-form-grid input,.sd-form-grid select,.sd-form-grid textarea,.sd-detail-list input,.sd-detail-list select,.sd-detail-list textarea,.sd-profile-input{width:100%;min-height:44px;border:1px solid var(--border,#d8dee9);border-radius:12px;padding:10px 12px;background:var(--surface-2,#f8fafc);color:inherit;font:inherit;outline:none}.sd-form-grid input:focus,.sd-detail-list input:focus,.sd-profile-input:focus{border-color:#b51f2a;box-shadow:0 0 0 3px rgba(181,31,42,.1)}.sd-detail-list p{margin:0;padding:12px;border-radius:12px;background:var(--surface-2,#f8fafc);line-height:1.8}.sd-detail-list .wide,.sd-form-grid .wide{grid-column:1/-1}.sd-note{padding:12px 14px;border-radius:12px;background:rgba(181,31,42,.07);line-height:1.8}.sd-empty{text-align:center;padding:24px;color:var(--muted,#64748b)}.sd-link-button{border:0;background:transparent;padding:0;font:inherit;cursor:pointer}.sd-profile-input{font-weight:700}.info-item textarea.sd-profile-input{min-height:86px;resize:vertical}.toggle-chip[role="switch"]{cursor:pointer;user-select:none}.sd-profile-preview{text-align:center}.sd-profile-preview .avatar{margin:0 auto 12px}.sd-mini-image{object-fit:cover;border-radius:9px}.ticket-side button{white-space:nowrap}
body.dark-mode .sd-modal{--surface:#111827;--surface-2:#182235;--text:#f1f5f9;--border:#334155}.dark-mode .sd-profile-input,.dark-mode .sd-form-grid input,.dark-mode .sd-form-grid select,.dark-mode .sd-form-grid textarea,.dark-mode .sd-detail-list input,.dark-mode .sd-detail-list select,.dark-mode .sd-detail-list textarea{background:#182235;color:#f8fafc;border-color:#334155}
@media(max-width:700px){.sd-modal-shell{padding:8px;align-items:end}.sd-modal{max-height:92vh;border-radius:22px 22px 10px 10px}.sd-modal-body{padding:16px}.sd-form-grid,.sd-detail-list{grid-template-columns:1fr}.sd-detail-list .wide,.sd-form-grid .wide{grid-column:auto}.sd-modal-actions>*{flex:1 1 140px}.sd-toast-stack{left:10px;right:10px;bottom:10px;max-width:none}.ticket-side{align-items:flex-start}.sd-profile-input{font-size:16px}}
