:root {
  --ink: #2d1a26;
  --muted: #7d6671;
  --surface: #ffffff;
  --canvas: #fff8f6;
  --line: #f1ded9;
  --brand: #d64978;
  --brand-strong: #8f2048;
  --brand-soft: #fff0f4;
  --accent: #f47a32;
  --accent-soft: #fff0e5;
  --success: #168768;
  --warning: #a45c00;
  --danger: #be2c45;
  --radius: 20px;
  --shadow: 0 12px 35px rgba(94, 35, 53, .08);
  color: var(--ink);
  background: var(--canvas);
  font-family: Vazirmatn, IRANSans, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: var(--canvas); }
button, a, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { display: grid; min-height: 100dvh; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100dvh; flex-direction: column; gap: 30px; padding: 24px 16px; color: #fff; background: linear-gradient(165deg, var(--brand-strong), #5e1431); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 20px; font-weight: 800; text-decoration: none; }
.brand-dark { color: var(--brand-strong); }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 13px; background: linear-gradient(135deg, var(--accent), #ffb45d); color: #4a1329; }
.nav-list { display: grid; gap: 6px; }
.nav-item { padding: 12px 14px; border-radius: 12px; color: #f8dce7; font-size: 14px; text-decoration: none; }
.nav-item:hover, .nav-item.is-active { color: #fff; background: rgba(255, 255, 255, .14); }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .09); }
.sidebar-footer small { display: block; margin-top: 3px; color: #f5cedc; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--brand-strong); font-weight: 800; background: #ffc2d6; }
.main-content { width: 100%; max-width: 1800px; margin: 0 auto; padding: 28px clamp(20px, 4vw, 56px) 48px; }
.main-content.customer-view, .main-content.staff-view { max-width: 1060px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 12px; }
.topbar h1, .panel h1, .panel h2 { margin: 0; letter-spacing: -.4px; }
.topbar h1, .panel h1 { font-size: clamp(20px, 2vw, 28px); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.button, .icon-button, .text-button { border: 0; background: transparent; }
.button { padding: 12px 16px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--brand), #f0618b); box-shadow: 0 8px 18px rgba(214, 73, 120, .2); }
.button-secondary { color: var(--brand-strong); background: var(--brand-soft); }
.icon-button { position: relative; padding: 10px; color: var(--ink); }
.notification-dot { position: absolute; top: 8px; left: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.mobile-menu { display: none; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.metric-card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.metric-card { display: grid; gap: 8px; padding: 20px; border-top: 4px solid var(--brand); }
.metric-warning { border-top-color: var(--accent); }
.metric-success { border-top-color: var(--success); }
.metric-neutral { border-top-color: #b4939f; }
.metric-card span, .metric-card small { color: var(--muted); font-size: 13px; }
.metric-card strong { font-size: 24px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 18px; }
.panel { padding: 22px; }
.panel + .panel { margin-top: 18px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel h2 { font-size: 18px; }
.text-button { color: var(--brand); font-weight: 700; }
.schedule-list { display: grid; }
.appointment-row { display: grid; grid-template-columns: 58px 10px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.appointment-row time { font-variant-numeric: tabular-nums; font-weight: 800; }
.appointment-line { width: 4px; height: 42px; border-radius: 99px; background: linear-gradient(var(--brand), #f39b62); }
.appointment-detail { display: grid; gap: 5px; }
.appointment-detail span { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; width: fit-content; padding: 6px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.status-success { color: #0a6f53; background: #e4f5ef; }
.status-warning { color: #8e5100; background: var(--accent-soft); }
.status-danger { color: #921f36; background: #ffe8ed; }
.status-neutral { color: var(--muted); background: #f5eef1; }
.full-width { display: block; width: 100%; margin-top: 18px; }
.chart { display: flex; height: 190px; align-items: flex-end; gap: 12px; padding: 16px 2px; border-bottom: 1px solid var(--line); }
.chart span { min-width: 12px; flex: 1; height: var(--h); border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, #f69c6f, var(--brand)); }
.insight-list { display: grid; gap: 13px; margin-top: 20px; }
.insight-list div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.insight-list span { color: var(--muted); }
.quick-actions { margin-top: 18px; }
.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.action-grid form { display: contents; }
.action-grid button, .action-grid > a { display: flex; min-height: 74px; align-items: center; justify-content: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--brand-strong); font-weight: 700; text-align: center; text-decoration: none; background: #fff8f8; }
.action-grid button:hover { background: var(--brand-soft); }
.action-grid small { color: var(--muted); font-weight: 500; }
.booking-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.booking-step { padding: 10px; border-radius: 12px; color: var(--muted); text-align: center; font-size: 13px; background: #fff8f8; }
.booking-step.is-active { color: var(--brand-strong); font-weight: 800; background: var(--brand-soft); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.field input:not([type=checkbox]), .field select { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; }
.field input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); vertical-align: middle; }
.schedule-editor { display: grid; grid-template-columns: 1fr repeat(3, minmax(90px, 1fr)); gap: 8px; align-items: center; padding-block: 8px; border-bottom: 1px solid var(--line); }
.notice { padding: 14px; border: 1px solid #ffd9bd; border-radius: 14px; color: #774000; background: var(--accent-soft); font-size: 13px; }
.mobile-nav { display: none; }
@media (max-width: 1000px) { .app-shell { grid-template-columns: 220px minmax(0, 1fr); } .metrics { grid-template-columns: repeat(2, 1fr); } .dashboard-grid { grid-template-columns: 1fr; } .sidebar { padding-inline: 12px; } }
@media (max-width: 720px) { body { padding-bottom: 76px; } .app-shell { display: block; } .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: min(82vw, 300px); transform: translateX(105%); padding-inline: 16px; box-shadow: 0 0 0 100vmax rgba(44, 10, 25, 0); transition: transform .2s ease, box-shadow .2s ease; } .sidebar.is-open { transform: translateX(0); box-shadow: 0 0 0 100vmax rgba(44, 10, 25, .42); } .main-content { padding: 18px 16px; } .topbar { align-items: flex-start; margin-bottom: 20px; } .topbar-actions .icon-button { display: none; } .mobile-menu { display: inline-flex; order: 3; border-radius: 10px; background: var(--brand-soft); } .topbar-actions { margin-inline-start: auto; } .topbar h1 { font-size: 19px; } .metrics { gap: 10px; margin-bottom: 12px; } .metric-card { padding: 14px; border-radius: 16px; } .metric-card strong { font-size: 20px; } .panel { padding: 16px; border-radius: 16px; } .appointment-row { grid-template-columns: 48px 8px minmax(0, 1fr); } .appointment-row .status { grid-column: 3; } .action-grid, .form-grid { grid-template-columns: repeat(2, 1fr); } .booking-steps { grid-template-columns: 1fr; } .schedule-editor { grid-template-columns: 1fr 1fr; } .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 10; display: grid; height: 68px; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); align-items: center; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .95); backdrop-filter: blur(12px); } .mobile-nav a { padding: 12px 2px; color: var(--muted); font-size: 11px; text-align: center; text-decoration: none; } .mobile-nav .is-active { color: var(--brand); font-weight: 800; } }
@media (min-width: 1600px) { .main-content { padding-top: 42px; } .panel { padding: 28px; } .metric-card { padding: 24px; } }
