/* Shared presentation layer for desktop, touch, keyboard and offline WebViews. */
@font-face{font-family:Vazirmatn;src:url('img/Vazirmatn.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
:root{--ease-ui:cubic-bezier(.2,.75,.25,1);--focus-ring:#2563eb;--shadow-sm:0 2px 6px rgb(24 30 25 / .035)}
:root[data-style='day']{
 --bg1:#f3f4ef;--bg2:#f3f4ef;--page:#f3f4ef;--glass:#fff;--surface:#fff;--glass-strong:#eaece4;
 --glass-border:#e3e6dc;--line:#d8ddd0;--text:#202b24;--text-dim:#61695e;
 --accent:#a45209;--accent-2:#c26c15;--on-accent:#fff;--green:#167348;--red:#b82c42;--warn:#995309;--field:#fafbf8;
 --tint:rgb(38 58 31 / .045);--hero:linear-gradient(115deg,#132d25,#294436);--hero-text:#fff9e9;--hero-glass:rgb(255 255 255 / .09);
 --radius:22px;--r2:15px;--shadow:0 4px 18px rgb(31 46 25 / .035)
}
:root[data-style='mine']{
 --bg1:#101815;--bg2:#101815;--page:#101815;--glass:#1b2620;--surface:#1b2620;--glass-strong:#2a382e;
 --glass-border:#304035;--line:#3c4b40;--text:#f0f4eb;--text-dim:#b1beae;--field:#152018;
 --accent:#efba62;--accent-2:#e8a342;--on-accent:#231b0d;--hero:linear-gradient(115deg,#263b2d,#344b37);
 --hero-text:#fff9e9;--hero-glass:rgb(255 255 255 / .075);--focus-ring:#8ab4ff;--radius:22px;--r2:15px;--shadow:0 6px 22px rgb(0 0 0 / .12)
}
:root[data-style='clean']{--text-dim:#62666e;--line:#d9dde3;--glass-border:#e4e7ed;--green:#167348;--red:#b82c42;--radius:18px;--r2:12px}
html{scrollbar-gutter:stable;scroll-padding-top:24px}
body{line-height:1.65;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font-family:inherit}
button,a,input,select,textarea,summary,[tabindex]{-webkit-tap-highlight-color:transparent}
button{touch-action:manipulation}
button:disabled{opacity:.48;cursor:not-allowed;transform:none!important;box-shadow:none!important}
:is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--focus-ring);outline-offset:3px}
::selection{background:#e9bb68;color:#1d291f}
.app{max-width:1680px;margin-inline:auto;grid-template-columns:236px minmax(0,1fr);gap:26px;padding:24px}
.main{gap:24px}
.sidebar{top:24px;height:calc(100dvh - 48px);padding:20px 12px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.brand{gap:10px;padding:0 8px 22px}
.brand h1{font-size:15px}.brand small{font-size:11px}
.brand-icon.logo{width:48px;height:48px;flex-shrink:0}
.new-btn{min-height:48px;margin-bottom:18px;border-radius:12px;box-shadow:none}
.nav-btn{min-height:44px;font-size:13px;padding:9px 12px;gap:10px;position:relative}
.nav-btn .ico{display:grid;place-items:center}
.nav-btn.active{background:var(--tint);box-shadow:inset -3px 0 0 var(--accent)}
.nav-btn.active .ico{color:var(--accent)}.sidebar .spacer{min-height:20px}
.topbar{gap:10px 16px;padding:2px 2px 4px}
.topbar h2{font-size:clamp(22px,2vw,28px);line-height:1.5;letter-spacing:-.5px}
.topbar .sub{font-size:12px}.topbar .top-logo{width:48px;height:48px;filter:none}
.date-chip,.sync-chip{border-radius:10px;font-size:11px;padding:7px 10px}
.topbar :is(button,.sync-chip){min-height:38px}
.section,.d-col{gap:20px}
#dashboard.section.active{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:20px}
.panel{padding:22px}
.panel h3{font-size:15px;line-height:1.8;flex-wrap:wrap;gap:8px}
.hero{padding:26px;min-height:260px;border:1px solid rgb(255 255 255 / .08);box-shadow:var(--shadow)}
.hero::before{content:'';position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 10% 0%,rgb(226 180 91 / .2),transparent 60%),repeating-radial-gradient(ellipse at -5% -40%,transparent 0 24px,rgb(239 186 98 / .09) 25px 26px,transparent 27px 48px);mask-image:linear-gradient(90deg,#000,transparent 80%)}
.hero>.h-lbl{font-size:13px;opacity:1;color:#e7dfca;padding-inline-end:140px}
.hero>.value{font-size:clamp(30px,3vw,44px);font-weight:800;margin:12px 0 8px;padding-inline-end:135px;overflow-wrap:anywhere;line-height:1.5}
.hero .value .unit{margin-inline-start:6px;opacity:.86}
.hero-ph{width:112px;height:112px;left:26px;top:24px;filter:drop-shadow(0 8px 16px rgb(0 0 0 / .2));border-radius:50%;outline:1px solid #edc27040;outline-offset:7px}
.hero .split{margin-top:26px;gap:10px}
.hero .split>div{padding:12px;border:1px solid rgb(255 255 255 / .12);border-radius:12px}
.hero .split small{opacity:1;color:#e7dfca}
.hero .split .value{white-space:normal;overflow-wrap:anywhere;font-size:clamp(12px,1.2vw,17px)}
.hero .h-chart{opacity:.06}
.hero .h-fx{position:relative;padding-inline-end:135px;color:var(--hero-text);overflow-wrap:anywhere}
.value,.money,.hour-now,.t-tile b,.total-bar .sum{font-variant-numeric:tabular-nums}
.d-head{flex-wrap:wrap;align-items:center;gap:8px;margin:0 2px -8px}
.d-head h3{font-size:16px}.d-head .link-btn{font-size:12px;min-height:32px}
.today-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.t-tile{min-height:112px;padding:18px!important;padding-inline-end:88px!important;border-color:var(--line);box-shadow:none;gap:8px;overflow:hidden;background-image:radial-gradient(ellipse at 0% 50%,rgb(201 160 77 / .09),transparent 65%)}
.t-tile .t-ph{width:62px;height:62px;left:14px;margin-top:-31px;filter:none;border-radius:50%;outline:1px solid #b9985033;outline-offset:4px}
.t-tile .t-l{font-size:12px;font-weight:600}
.t-tile b{font-size:28px;line-height:1.3;overflow-wrap:anywhere;max-width:100%}
.tasks-row{gap:12px;padding-bottom:4px}
.task{flex-basis:min(300px,85%);box-shadow:none;min-height:96px}.task:only-child{flex:1 1 100%}
.task small{font-size:12px}.tasks-h{margin-bottom:10px}
.empty{padding:26px 16px;font-size:13px}.empty-ph{width:88px;height:88px;filter:none;margin-bottom:16px}
.empty-art{max-height:120px}
.stat{padding:18px;border-color:var(--line);box-shadow:none;min-width:0}
.stat .value{font-size:clamp(22px,2vw,30px);overflow-wrap:anywhere}.stat .label{font-weight:600}
.form-grid{gap:18px 14px}.field{min-width:0}
.field label{display:block;font-size:12px;font-weight:600;color:var(--text-dim);margin-bottom:7px}
.field :is(input,select,textarea){min-height:48px;border-radius:11px;font-size:15px}
.field textarea{width:100%;background:var(--field);border:1px solid var(--line);color:var(--text);padding:12px;resize:vertical}
input[inputmode='decimal'],input[inputmode='numeric'],input[type='tel']{font-variant-numeric:tabular-nums}
.field input::placeholder{color:var(--text-dim);opacity:.8}.field .hint{font-size:12px;line-height:1.8}
.btn-primary{min-height:46px;border-radius:11px;box-shadow:none;padding:11px 24px}
.btn-ghost{min-height:42px;border-radius:11px;box-shadow:none}.btn-ghost.sm{min-height:36px}
.stepper button,.month-bar button{min-width:44px;min-height:44px}.stepper input{min-width:0}
.truck-box{padding:18px;border-radius:15px}.truck-box .t-title{margin-bottom:16px}
.total-bar{padding:14px 16px}.total-bar .sum{overflow-wrap:anywhere}
.shift-pick,.tabs{border:1px solid var(--line);border-radius:12px;padding:4px}
.tabs button,.shift-pick button{min-height:42px;border-radius:9px}.hour-panel{gap:14px}
.checks input{display:inline-block;width:16px;height:16px;margin-inline-end:5px;accent-color:var(--accent);vertical-align:middle}
.checks label{min-height:42px;display:inline-flex;align-items:center}
.checks label:focus-within,.loy-sw:focus-within{outline:3px solid var(--focus-ring);outline-offset:2px}
.loy-sw input{display:block;position:absolute;opacity:0;width:20px;height:20px}
.loy-f input,.loy-f select{min-height:44px}
.look-opt:has(input[value='day']) .sw{background:#f3f4ef!important}.look-opt:has(input[value='day']) .sw i{background:linear-gradient(115deg,#132d25,#294436)!important}.look-opt:has(input[value='day']) .sw b{background:#fff!important}
.look-opt:has(input[value='mine']) .sw{background:#101815!important}.look-opt:has(input[value='mine']) .sw i{background:linear-gradient(115deg,#263b2d,#344b37)!important}.look-opt:has(input[value='mine']) .sw b{background:#1b2620!important}
.look-opt:has(input[value='auto']) .sw{background:linear-gradient(90deg,#f3f4ef 50%,#101815 50%)!important}.look-opt:has(input[value='auto']) .sw i{background:linear-gradient(90deg,#294436 50%,#efba62 50%)!important}.look-opt:has(input[value='auto']) .sw b{background:linear-gradient(90deg,#fff 50%,#1b2620 50%)!important}
.del{min-width:36px;min-height:36px;opacity:.8;border-radius:8px}
.table-wrap{border-radius:12px;scrollbar-width:thin}

/* =====================================================================
   ✨ کامپکت‌سازی، افزایش سرعت و کارت‌های واکنش‌گرا در موبایل و دسکتاپ
   ===================================================================== */
tbody tr, .p-card, .act-item, .card, .stat, .t-tile {
  content-visibility: auto;
  contain-intrinsic-size: 0 54px;
}
.smart-chunk-hidden { display: none !important; }
.smart-search-hidden { display: none !important; }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.smart-search-wrap { position: relative; display: flex; align-items: center; flex: 1; min-width: 200px; max-width: 380px; }
.smart-search-ico { position: absolute; right: 12px; pointer-events: none; font-size: 14px; opacity: 0.6; }
.smart-search-input { width: 100%; padding: 8px 36px 8px 12px !important; font-size: 13.5px !important; min-height: 40px !important; border-radius: 12px !important; background: rgba(255, 255, 255, 0.05) !important; border: 1px solid var(--line) !important; color: var(--text) !important; box-sizing: border-box; transition: border-color 0.2s ease, background 0.2s ease; }
.smart-search-input:focus { border-color: var(--accent) !important; background: rgba(255, 255, 255, 0.08) !important; outline: none; }
.smart-search-count { position: absolute; left: 12px; font-size: 11px; color: var(--text-dim); pointer-events: none; }

.view-toggle-btns { display: inline-flex; align-items: center; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.view-toggle-btns button { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; border: none; background: transparent; color: var(--text-dim); cursor: pointer; transition: all 0.15s ease; font-weight: 500; }
.view-toggle-btns button.active { background: var(--surface); color: var(--champ-hi, var(--accent)); font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.25); border: 1px solid var(--line); }

.smart-load-more { display: block; width: 100%; margin-top: 14px; padding: 11px 16px; font-size: 13px; font-weight: 600; text-align: center; background: rgba(255, 255, 255, 0.04); border: 1px dashed var(--line); border-radius: 14px; color: var(--text); cursor: pointer; transition: all 0.2s ease; }
.smart-load-more:hover { background: var(--tint); border-color: var(--accent); color: var(--accent); }

.rate-box { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.rate-label { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--text-dim); }
.rate-reset-btn { background: rgba(255,255,255,0.06); border: 1px dashed var(--line); color: var(--champ-hi, var(--accent)); border-radius: 7px; padding: 2px 7px; font-size: 11px; cursor: pointer; transition: all 0.15s ease; }
.rate-reset-btn:hover { background: var(--tint); border-style: solid; }
.rate-box input { width: 100%; padding: 7px 10px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--text); background: var(--field, rgba(255,255,255,0.06)); border: 1px solid var(--line); box-sizing: border-box; }
.rate-box input:focus { border-color: var(--accent); outline: none; }

/* نمایش در قالب کارت‌های شیک و مدرن (چه با سوئیچ دسکتاپ و چه در موبایل) */
.smart-list-container.view-cards .table-wrap,
.smart-list-container.view-cards table,
.smart-list-container.view-cards tbody {
  display: block !important; width: 100% !important; overflow: visible !important;
}
.smart-list-container.view-cards thead { display: none !important; }
.smart-list-container.view-cards tbody {
  display: grid !important; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important; gap: 14px !important;
}
.smart-list-container.view-cards tbody tr:not(.smart-chunk-hidden):not(.smart-search-hidden) {
  display: flex !important; flex-direction: column !important; background: var(--surface) !important;
  border: 1px solid var(--line) !important; border-radius: 18px !important; padding: 16px !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16) !important; transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  margin: 0 !important; min-height: auto !important; position: relative;
}
.smart-list-container.view-cards tbody tr:hover {
  border-color: var(--champ-hi, var(--accent)) !important; transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}
.smart-list-container.view-cards tbody tr td {
  display: flex !important; justify-content: space-between !important; align-items: center !important;
  padding: 6px 0 !important; border: none !important; white-space: normal !important; font-size: 13.5px !important;
}
.smart-list-container.view-cards tbody tr td:first-child {
  font-weight: 700 !important; font-size: 14.5px !important; border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding-bottom: 8px !important; margin-bottom: 6px !important; color: var(--champ-hi, var(--accent)) !important;
}
.smart-list-container.view-cards tbody tr td.money {
  font-size: 17px !important; font-weight: 800 !important; padding: 6px 0 !important;
}
.smart-list-container.view-cards tbody tr td.buyer-cell { padding: 6px 0 !important; }
.smart-list-container.view-cards tbody tr td:last-child {
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important; padding-top: 10px !important; margin-top: 8px !important;
  justify-content: flex-end !important; gap: 10px !important;
}
.smart-list-container.view-cards tbody tr td:last-child button {
  min-width: 36px; min-height: 36px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 10px;
  background: rgba(255, 255, 255, 0.06); font-size: 15px; border: 1px solid var(--line);
}

/* در نمایشگرهای موبایل و تبلت (زیر 850 پیکسل)، نمایش کارتی به صورت تک‌ستونه همیشه فعال است */
@media (max-width: 850px) {
  .table-wrap.smart-cards { overflow-x: visible !important; }
  .table-wrap.smart-cards table, .table-wrap.smart-cards tbody { display: block !important; width: 100% !important; }
  .table-wrap.smart-cards thead { display: none !important; }
  .table-wrap.smart-cards tbody { display: flex !important; flex-direction: column !important; gap: 12px !important; }
  .table-wrap.smart-cards tbody tr:not(.smart-chunk-hidden):not(.smart-search-hidden) {
    display: flex !important; flex-direction: column !important; background: var(--surface) !important;
    border: 1px solid var(--line) !important; border-radius: 18px !important; padding: 14px 16px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) !important; transition: transform 0.15s ease, border-color 0.15s ease !important; margin: 0 !important;
  }
  .table-wrap.smart-cards tbody tr:active { transform: scale(0.99) !important; }
  .table-wrap.smart-cards tbody tr td { display: flex !important; justify-content: space-between !important; align-items: center !important; padding: 4px 0 !important; border: none !important; white-space: normal !important; font-size: 13.5px !important; min-height: auto !important; }
  .table-wrap.smart-cards tbody tr td:first-child { font-weight: 700 !important; font-size: 14.5px !important; border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important; padding-bottom: 8px !important; margin-bottom: 6px !important; color: var(--champ-hi, var(--accent)) !important; }
  .table-wrap.smart-cards tbody tr td.money { font-size: 16px !important; font-weight: 800 !important; }
  .table-wrap.smart-cards tbody tr td.buyer-cell { padding: 6px 0 !important; }
  .table-wrap.smart-cards tbody tr td:last-child { border-top: 1px solid rgba(255, 255, 255, 0.06) !important; padding-top: 10px !important; margin-top: 8px !important; justify-content: flex-end !important; gap: 10px !important; }
  .table-wrap.smart-cards tbody tr td:last-child button { min-width: 38px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255, 255, 255, 0.06); font-size: 15px; }
}

html.viewer :is([data-del], [data-edit], [data-sdel], [data-xdel], .del, .edit-only) {
  display: none !important;
}

/* =====================================================================
   📱 تب‌های مدرن و فرم‌های تاشوی بخش شراکت (Mobile-First Sub-Tabs)
   ===================================================================== */
.partner-nav-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
  background: var(--tint, rgba(255, 255, 255, 0.04));
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.pt-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.75, 0.25, 1);
  box-sizing: border-box;
  width: 100%;
  user-select: none;
}
.pt-tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.pt-tab-btn.active {
  background: var(--surface) !important;
  color: var(--champ-hi, var(--accent)) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  border-color: var(--line) !important;
  font-weight: 700;
}
.pt-tab-ico { font-size: 16px; line-height: 1; flex-shrink: 0; }
.pt-tab-txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pt-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--line);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.pt-tab-btn.active .pt-tab-badge {
  background: var(--accent);
  color: var(--on-accent, #fff);
}

.partner-tab-pane {
  display: none;
}
.partner-tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeInTab 0.2s ease-out;
}
@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.collapsible-form {
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.2, 0.75, 0.25, 1);
}

/* در تبلت و موبایل (زیر 768px)، تب‌ها ۲ در ۲ می‌شوند تا کاملاً جادار، منظم و خوانا باشند */
@media (max-width: 768px) {
  .partner-nav-tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 6px;
  }
  .pt-tab-btn {
    padding: 11px 10px;
    font-size: 12.5px;
    gap: 6px;
    justify-content: flex-start;
  }
  .pt-tab-ico { font-size: 15px; }
  .pt-tab-badge {
    margin-inline-start: auto;
  }
}
@media (max-width: 360px) {
  .pt-tab-btn {
    padding: 9px 6px;
    font-size: 11.5px;
    gap: 4px;
  }
  .pt-tab-ico { font-size: 14px; }
}
.ch-tools{flex-wrap:wrap;gap:10px}.ch-tools>*{max-width:100%}
.ch-scroll{touch-action:pan-x pan-y}
th{font-weight:700;padding:12px;background:var(--tint)}td{padding:14px 12px}
.act-item{padding:13px}.act-item .a-body{min-width:0;overflow-wrap:anywhere}
.sheet{max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.sheet .grab{margin-top:3px}.sheet h4{padding-inline-end:48px}
.design-close{position:absolute;inset-inline-end:16px;top:14px;width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;color:var(--text);background:var(--surface);font-size:23px;cursor:pointer;z-index:1}
.acts{gap:10px}.acts button{min-height:104px;border:1px solid var(--line);border-radius:14px;font-size:12px;padding:14px 6px}
.acts button .act-ph{width:48px;height:48px;filter:none}
.modal-bg{z-index:60;padding:16px}
.modal{max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overscroll-behavior:contain;scrollbar-width:thin}
body.design-dialog-open{overflow:hidden}
.toast{max-width:calc(100vw - 32px);text-align:center;line-height:1.8;z-index:410}.toast.glass{border-radius:14px}
.skip-main{position:fixed;top:8px;right:16px;z-index:500;padding:10px 18px;background:var(--surface);color:var(--text);border:2px solid var(--focus-ring);border-radius:10px;transform:translateY(-180%)}
.skip-main:focus{transform:none}
/* One entrance per panel; exact accounting values remain visible throughout. */
.section.active>*,.motion .section.entering :is(.stat,.item,.act-item,.h-row,.doc-row,.p-card,.chip,tbody tr,.machine-row),.motion :is(.hero-ph,.hero-art,.empty-art .ea-ic,.bump){animation:none}
.motion .section.active>:not(.sel-bar):not(:has(.sel-bar)){animation:design-enter 240ms var(--ease-ui) both;animation-delay:0ms}
.motion .task{animation:design-enter 220ms var(--ease-ui) both;animation-delay:0ms}
.motion .sheet.show .acts button{animation:design-enter 180ms var(--ease-ui) both;animation-delay:0ms}
.motion .modal-bg.show .modal{animation:design-enter 200ms var(--ease-ui) both}
@keyframes design-enter{from{opacity:0;translate:0 6px}to{opacity:1;translate:0 0}}
:is(.nav-btn,.btn-primary,.btn-ghost,.t-tile,.acts button,.task){transition:background-color 160ms ease,border-color 160ms ease,box-shadow 160ms ease,transform 160ms var(--ease-ui)}
@media(hover:hover) and (pointer:fine){
 .t-tile:hover,.task:hover{transform:translateY(-2px);border-color:var(--accent);box-shadow:var(--shadow-sm)}
 .btn-primary:hover,.new-btn:hover{transform:translateY(-1px);filter:brightness(1.07)}
}
@media(hover:none){.t-tile:hover,.btn-primary:hover,.new-btn:hover{transform:none}}
@media(min-width:821px){
 .sheet{width:min(620px,calc(100vw - 48px));max-height:calc(100dvh - 64px);padding:26px}
 .sheet.show{transition:transform 220ms var(--ease-ui),opacity 180ms ease,visibility 0s}
}
@media(max-width:1200px) and (min-width:821px){
 .app{grid-template-columns:218px minmax(0,1fr);padding:18px;gap:20px}
 #dashboard.section.active{display:flex}.sidebar{top:18px;height:calc(100dvh - 36px)}
}
@media(max-width:820px){
 html{scrollbar-gutter:auto;scroll-padding-bottom:110px}
 .app{display:block;padding:max(14px,env(safe-area-inset-top)) 14px calc(108px + env(safe-area-inset-bottom))}
 .main{gap:20px}.topbar{gap:10px;padding:4px 2px}.topbar h2{font-size:23px}
 .topbar .top-logo{width:44px;height:44px}.topbar .date-chip{font-size:11px;padding:6px 9px}
 .panel{padding:18px 16px}.panel h3{font-size:14px}
 .hero{min-height:242px;padding:20px;border-radius:22px}
 .hero-ph{width:88px;height:88px;left:18px;top:20px}
 .hero>.h-lbl{padding-inline-end:98px;font-size:12px}
 .hero>.value{padding-inline-end:98px;font-size:30px;margin-top:14px}
 .hero .h-fx{padding-inline-end:98px;font-size:12px}
 .hero .split{margin-top:24px;gap:6px}.hero .split>div{padding:10px 7px}
 .hero .split .value{font-size:13px}.hero .split small{font-size:10px}
 .today-grid{gap:10px}.t-tile{min-height:108px;padding:13px!important;padding-inline-end:64px!important}
 .t-tile .t-ph{width:46px;height:46px;left:10px;margin-top:-23px}
 .t-tile .t-l{font-size:11px}.t-tile b{font-size:24px}.d-head .link-btn{font-size:11px}
 .hour-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:14px 10px}
 .hour-panel .field{min-width:0}.hour-panel .field:first-child{grid-column:1/-1}
 .hour-panel>.btn-primary{grid-column:1/-1;width:100%}
 .field :is(input,select,textarea){font-size:16px}
 .tabbar{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));border-radius:20px;height:68px;box-shadow:0 4px 24px rgb(0 0 0 / .12)}
 .tabbar button{min-height:48px;width:56px;justify-content:center;font-size:10px}
 .tabbar button.active:not(.tab-fab){color:var(--accent);background:var(--tint);border-radius:12px}
 .tabbar .tab-fab{width:52px;height:52px;border-radius:17px;margin-top:-22px;box-shadow:0 5px 12px rgb(0 0 0 / .16)}
 .sheet{padding:16px 16px calc(106px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0}
 .sheet.show{transition:transform 240ms var(--ease-ui),visibility 0s}.sheet .acts button{min-height:98px}
 .modal-bg{padding:12px}.modal{max-height:calc(100dvh - 24px);padding:20px 16px}
 .total-bar{gap:12px}.empty{padding:22px 10px}
 .loy-f input,.loy-f select{font-size:16px}
}
@media(max-width:380px){
 .app{padding-inline:10px}.form-grid{grid-template-columns:minmax(0,1fr)}
 .form-grid .field[style],.field.wide,.form-grid .buyers{grid-column:1/-1!important}
 .t-tile{padding-inline-end:55px!important}.t-tile .t-ph{width:38px;height:38px;margin-top:-19px}
 .hero>.value{font-size:26px}.hero .split{grid-template-columns:repeat(3,minmax(0,1fr))}
 .today-grid{gap:8px}.total-bar>.w-btns{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
 .confetti,.check-pop,.m-ripple{display:none!important}
}
@media(forced-colors:active){.nav-btn.active,.tabbar button.active,.t-tile{border:1px solid ButtonText}}
@media print{
 body.design-dialog-open{overflow:visible}.skip-main,.design-close{display:none!important}
 .app{max-width:none;padding:0}*{animation:none!important;transition:none!important}
}
