@font-face{font-family:'Vazirmatn';src:url('../fonts/vazirmatn/Vazirmatn.woff2') format('woff2');font-style:normal;font-weight:100 900;font-display:swap}
html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #ce5252;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Persian text follows the page; machine-readable values keep their own direction. */
:where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]), textarea, select) {
  direction: rtl;
  text-align: start;
}

input::placeholder,
textarea::placeholder {
  direction: inherit;
  text-align: inherit;
}

input[dir="ltr"], input[type="tel"], input[type="email"], input[type="url"],
input[type="time"], input[autocomplete="one-time-code"], input[data-jalali-date] {
  direction: ltr;
  text-align: start;
  font-variant-numeric: tabular-nums;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

:root{--ink:#2b2726;--muted:#8e8481;--blue:#d15d5d;--line:#f1eded;--bg:#f9f8f8}
*{box-sizing:border-box}html,body{min-height:100%;margin:0}body{font-family:'Vazirmatn',Tahoma,sans-serif;background:var(--bg);color:var(--ink)}
.app-shell{display:flex;min-height:100vh}.sidebar{width:252px;background:#fff;border-left:1px solid var(--line);padding:30px 18px 24px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);font-weight:800;font-size:20px;padding:0 10px 46px}.brand small,.sidebar-user small{display:block;font-size:11px;font-weight:500;color:var(--muted);margin-top:2px}.brand-mark{display:grid;place-items:center;width:39px;height:39px;background:linear-gradient(135deg,#dd8787,#ca4545);color:#fff;border-radius:12px;font-family:Arial;font-size:23px;box-shadow:0 9px 16px #d15d5d33}.sidebar-label{color:#b8b1af;font-size:11px;font-weight:700;padding:0 15px 15px}.sidebar-link{display:flex;align-items:center;gap:12px;text-decoration:none;color:#6e6562;font-size:14px;font-weight:700;padding:12px 15px;border-radius:12px}.sidebar-link span{font-size:23px;line-height:16px}.sidebar-link.active{background:#f7f5f5;color:#d15d5d}.sidebar-spacer{flex:1}.sidebar-user{display:flex;gap:11px;align-items:center;padding:16px 8px;border-top:1px solid var(--line);font-size:12px;font-weight:700;direction:ltr;text-align:right}.user-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#f6f3f3;color:var(--blue);font-size:16px}.sidebar-logout{border:0;background:transparent;color:#e2576a;font-size:12px;font-weight:700;padding:10px;cursor:pointer}.main-content{width:100%;max-width:1250px;margin:0 auto;padding:45px 55px}.dashboard-top{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:32px}.eyebrow{font-size:12px;font-weight:700;color:var(--blue);margin-bottom:8px}.dashboard-top h1{font-size:29px;font-weight:800;margin:0 0 10px}.dashboard-top p{color:var(--muted);margin:0;font-size:14px}.today-pill{background:white;border:1px solid var(--line);border-radius:10px;padding:9px 15px;font-size:12px;color:#817673}.hero-card{min-height:242px;background:linear-gradient(110deg,#aa3030,#d66f6f);border-radius:24px;position:relative;overflow:hidden;box-shadow:0 22px 35px #c83d3d25;color:#fff;padding:42px}.hero-content{position:relative;z-index:2;max-width:510px}.hero-kicker{font:700 11px Arial;letter-spacing:3px;color:#e6a7a7}.hero-card h2{font-size:27px;font-weight:800;margin:18px 0 13px}.hero-card p{font-size:14px;line-height:2;color:#f0ebeb;margin:0}.hero-orb{position:absolute;width:350px;height:350px;border-radius:50%;border:55px solid #ffffff16;left:-45px;top:-140px;box-shadow:0 0 0 50px #ffffff0b}.systems-section{margin-top:40px}.systems-section h2{font-size:17px;font-weight:800;margin-bottom:18px}.system-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.system-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;display:flex;align-items:center;gap:16px;box-shadow:0 7px 25px #48424009}.system-icon{width:49px;height:49px;display:grid;place-items:center;border-radius:14px;font-size:27px}.system-icon.hub{background:#f7f5f5;color:#d36565}.system-icon.gate{background:#e5f8f5;color:#28a88d}.system-card h3{font-size:15px;font-weight:800;margin:0 0 5px}.system-card p{font-size:12px;color:var(--muted);margin:0}.auth-content{display:flex;align-items:center;justify-content:center;min-height:100vh}.auth-content>.row{width:100%;max-width:490px}.auth-content .col-md-5{width:100%;max-width:none;background:#fff;border:1px solid var(--line);border-radius:24px;padding:42px;box-shadow:0 22px 60px #443e3d12}.auth-content h1{font-weight:800;color:var(--ink)}.form-control{border-radius:10px;padding:11px 13px;border-color:#e6e4e4;direction:rtl;text-align:right}.form-label{font-size:13px;font-weight:700}.btn-primary{background:var(--blue);border-color:var(--blue);border-radius:10px;padding:10px 24px;font-weight:700}.btn-link{color:var(--blue);text-decoration:none}
@media(max-width:780px){.app-shell{display:block}.sidebar{width:100%;height:auto;position:relative;flex-direction:row;align-items:center;padding:12px 20px;gap:15px}.brand{padding:0;font-size:17px}.sidebar-label,.sidebar-user,.sidebar-spacer{display:none}.sidebar-link{margin-right:auto}.sidebar-logout{white-space:nowrap}.main-content{padding:26px 20px}.dashboard-top h1{font-size:23px}.today-pill{display:none}.hero-card{padding:28px;min-height:245px}.hero-card h2{font-size:22px}.system-grid{grid-template-columns:1fr}.auth-content{padding:20px}}
.report-heading h1{font-size:27px;font-weight:800;margin:0 0 8px}.report-heading p{color:var(--muted);font-size:13px}.report-filter{display:flex;gap:14px;align-items:end;flex-wrap:wrap;background:white;border:1px solid var(--line);border-radius:18px;padding:20px;margin:25px 0}.report-filter label{display:block;font-size:12px;font-weight:700;margin-bottom:7px}.report-filter input{width:150px;border:1px solid #e6e4e4;border-radius:10px;padding:10px;direction:ltr;text-align:center}.report-error{margin-bottom:16px}.report-period{font-size:12px;color:var(--muted);margin-bottom:15px}.metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-bottom:27px}.metric{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px}.metric span{display:block;color:var(--muted);font-size:12px;margin-bottom:11px}.metric strong{font-size:23px;font-weight:800;color:var(--ink);direction:ltr;display:block;text-align:right}.report-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:23px;margin-bottom:20px}.report-card h2{font-size:16px;font-weight:800;margin:0 0 17px}.report-card h2 small{font-size:11px;color:var(--muted);font-weight:400}.report-table{font-size:12px;white-space:nowrap;margin:0}.report-table th{color:#847977;background:#f9f8f8;font-weight:700;padding:13px}.report-table td{padding:12px 13px;color:#4c4644}.report-note{font-size:12px;color:var(--muted)}@media(max-width:780px){.metric-grid{grid-template-columns:repeat(2,1fr)}.report-filter input{width:130px}}
.orders-filter{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;margin:24px 0}.filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.filter-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:#6e6562}.filter-grid input:not([type="checkbox"]):not([type="radio"]),.filter-grid select{width:100%;min-height:41px;border:1px solid #e6e4e4;border-radius:9px;background:#fff;padding:8px 10px;font-size:13px;color:var(--ink)}.filter-grid select[multiple]{min-height:82px}.filter-actions{display:flex;gap:10px;margin-top:20px}.orders-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;font-size:13px}.orders-toolbar>div:last-child{display:flex;gap:8px}.selected-count{color:var(--blue);font-weight:700}.order-table-card{padding:0;overflow:hidden}.order-table th,.order-table td{vertical-align:middle}.products-cell{max-width:280px;white-space:normal;min-width:190px}.source-chip{display:inline-block;background:#f7f5f5;color:#d15d5d;border-radius:8px;padding:5px 9px;font-weight:700}.pager{display:flex;align-items:center;justify-content:center;gap:15px;margin:20px 0 26px;font-size:12px}.detail-actions{display:flex;gap:10px;margin:20px 0}.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.detail-list{display:grid;grid-template-columns:150px 1fr;gap:10px;font-size:13px;margin:0}.detail-list dt{color:var(--muted);font-weight:500}.detail-list dd{margin:0;font-weight:700}.order-note{white-space:pre-wrap;border-bottom:1px solid var(--line);padding:12px 0;font-size:13px}@media(max-width:1000px){.filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-grid{grid-template-columns:1fr}}@media(max-width:600px){.filter-grid{grid-template-columns:1fr}.orders-toolbar{align-items:start;flex-direction:column}.detail-list{grid-template-columns:120px 1fr}}
/* Keep native checkboxes compact and beside their RTL labels. */
.order-filter-toggles{display:flex;flex-direction:column;justify-content:center;gap:4px;min-width:0}
.filter-grid .order-filter-toggle{flex-direction:row;align-items:center;gap:8px;min-height:36px;margin:0;cursor:pointer;line-height:1.7}
.filter-grid .order-filter-toggle input[type="checkbox"]{appearance:auto;flex:0 0 18px;width:18px;height:18px;min-height:0;margin:0;padding:0;accent-color:var(--blue);cursor:pointer}
.filter-grid .order-filter-toggle input:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.orders-filter summary{cursor:pointer;font-size:15px;font-weight:800;color:var(--ink);padding:2px 0;list-style-position:inside}.orders-filter summary::marker{color:var(--blue)}.filter-summary-hint{font-size:12px;font-weight:400;color:var(--muted);margin-inline-start:10px}.orders-filter .filter-grid{margin-top:20px}.filter-select-field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px;font-weight:700;color:#6e6562}.filter-grid .combo-native{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;opacity:0;pointer-events:none}.search-combo{position:relative;min-width:0}.search-combo-button{width:100%;min-height:41px;padding:8px 10px;border:1px solid #e6e4e4;border-radius:9px;background:#fff;color:var(--ink);font-size:13px;text-align:start;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-combo-button::after{content:'⌄';float:left;margin-inline-start:8px;color:var(--muted)}.search-combo-button:focus-visible,.sort-button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}.search-combo-panel{position:absolute;z-index:30;inset-inline:0;top:calc(100% + 4px);background:#fff;border:1px solid #e6e4e4;border-radius:10px;box-shadow:0 12px 25px #332e2d24;padding:8px}.search-combo-panel[hidden]{display:none}.filter-grid .search-combo-panel input[type=search]{min-height:36px}.search-combo-options{max-height:230px;overflow:auto;margin-top:6px}.filter-grid .search-combo-option{display:flex;flex-direction:row;align-items:center;gap:8px;padding:7px 6px;cursor:pointer;font-weight:500}.filter-grid .search-combo-option:hover{background:#f7f5f5}.filter-grid .search-combo-option input{width:auto;min-height:0;margin:0}.sort-button{border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;white-space:nowrap;cursor:pointer;padding:5px 2px}.sort-button:hover{color:var(--blue)}.sort-glyph{font-size:11px;margin-inline-start:7px;color:var(--blue)}
.pager .page-size-label{font-weight:700;color:#6e6562}.pager select{min-width:72px;min-height:37px;border:1px solid #e6e4e4;border-radius:9px;background:#fff;color:var(--ink);padding:5px 9px}.pager select:focus-visible{outline:2px solid var(--blue);outline-offset:2px}@media(max-width:600px){.pager{flex-wrap:wrap}}
.orders-filter[open] .filter-content{animation:filter-reveal .24s ease-out both}@keyframes filter-reveal{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.orders-filter[open] .filter-content{animation:none}}
/* Management navigation */
@media(max-width:780px){body.sidebar-open{overflow:hidden}}
body{margin-bottom:0}.sidebar-icon-defs{position:absolute;width:0;height:0;overflow:hidden}.sidebar{flex:0 0 264px;width:264px;height:100dvh;min-height:0;padding:0;background:#fdfdfd;border-left:1px solid #eceae9;box-shadow:-8px 0 32px #4a444306;z-index:20;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#e3e1e0 transparent}.sidebar-head{padding:28px 22px 27px;border-bottom:1px solid #f2f1f1}.brand{padding:0;gap:12px;font-size:18px;line-height:1.25;letter-spacing:-.025em}.brand:hover{color:var(--ink)}.brand small{margin-top:5px;font-size:11px;letter-spacing:0;color:#9e9592}.brand-mark{flex:none;display:grid;grid-template-columns:repeat(2,8px);grid-template-rows:repeat(2,8px);place-content:center;gap:3px;width:43px;height:43px;border-radius:13px;background:#514a49;box-shadow:0 9px 18px #514a4929}.brand-mark span{display:block;width:8px;height:8px;border-radius:2px;background:#fff}.brand-mark span:nth-child(2){opacity:.55}.brand-mark span:nth-child(3){opacity:.75}.brand-mark span:nth-child(4){background:#e6a7a7}.sidebar-nav{padding:20px 13px;display:grid;align-content:start;gap:23px}.sidebar-group{display:grid;gap:3px}.sidebar-group+.sidebar-group{padding-top:20px;border-top:1px solid #f0eeee}.sidebar-label{padding:0 13px 11px;color:#aea6a4;font-size:10px;font-weight:800;letter-spacing:.02em}.sidebar-link{position:relative;min-height:44px;gap:12px;padding:10px 13px;border:1px solid transparent;border-radius:10px;color:#776d6a;font-size:13px;font-weight:600;line-height:1.5;transition:background-color .18s ease,color .18s ease,border-color .18s ease,transform .18s ease}.sidebar-link:hover{color:#534c4b;background:#f7f4f4;transform:translateX(-2px)}.sidebar-link:active{transform:translateX(-2px) scale(.99)}.sidebar-link.active{background:#f4f0f0;border-color:#ede8e8;color:#a12e2e;font-weight:800}.sidebar-link.active::before{content:"";position:absolute;right:-13px;top:9px;bottom:9px;width:3px;border-radius:3px;background:#d15d5d}.nav-icon{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sidebar-footer{margin-top:auto;padding:17px 16px 20px;border-top:1px solid #f0eeee}.sidebar-user{direction:rtl;text-align:right;gap:10px;padding:0 4px 14px;border:0;color:#403b3a;font-size:12px}.sidebar-user-copy{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-user small{color:#a89f9d;margin-top:3px}.user-avatar{flex:none;width:36px;height:36px;border-radius:11px;background:#f1eeee;color:#ac3131;font-size:14px;font-weight:800}.sidebar-logout{display:flex;align-items:center;gap:10px;width:100%;min-height:39px;padding:8px 12px;border:1px solid transparent;border-radius:9px;color:#9a5160;text-align:right;font-size:12px;transition:background-color .18s ease,color .18s ease}.sidebar-logout .nav-icon{width:17px;height:17px}.sidebar-logout:hover{background:#fff0f1;color:#a13349}.sidebar-link:focus-visible,.sidebar-logout:focus-visible,.mobile-menu-toggle:focus-visible,.sidebar-close:focus-visible{outline:2px solid #d46767;outline-offset:2px}.mobile-menu-toggle,.sidebar-close,.sidebar-backdrop{display:none}
@media(max-width:780px){.app-shell{display:block}.mobile-menu-toggle{display:grid;place-items:center;position:sticky;top:12px;right:16px;z-index:19;width:42px;height:42px;margin:12px 16px -54px 0;border:1px solid #e9e3e3;border-radius:11px;background:#fff;color:#59514f;box-shadow:0 7px 18px #4a44431c}.sidebar{position:fixed;right:0;top:0;bottom:0;width:min(286px,86vw);height:100dvh;flex-direction:column;align-items:stretch;gap:0;padding:0;transform:translateX(105%);transition:transform .26s cubic-bezier(.2,.8,.2,1);box-shadow:-20px 0 45px #2d292822;z-index:31}.sidebar.is-open{transform:translateX(0)}.sidebar-head{display:flex;align-items:center;justify-content:space-between}.sidebar-close{display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:8px;background:#f5f3f3;color:#706764}.sidebar-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:30;border:0;background:#2d292880}.main-content{padding-top:70px}.auth-content{padding-top:20px}}@media(prefers-reduced-motion:reduce){.sidebar,.sidebar-link,.sidebar-logout{transition:none}}
/* Compact sidebar and appearance switch */
.sidebar{flex-basis:238px;width:238px}.sidebar-head{padding:21px 18px 20px}.brand{gap:10px;font-size:16px}.brand small{font-size:10px}.brand-mark{width:37px;height:37px;border-radius:10px;grid-template-columns:repeat(2,7px);grid-template-rows:repeat(2,7px)}.brand-mark span{width:7px;height:7px}.sidebar-nav{padding:17px 10px;gap:18px}.sidebar-group{gap:2px}.sidebar-group+.sidebar-group{padding-top:16px}.sidebar-label{padding:0 11px 7px;font-size:10px}.sidebar-link{min-height:39px;padding:7px 11px;gap:10px;border-radius:9px}.sidebar-link > span{font-size:12px;line-height:1.55;font-weight:inherit}.sidebar-link .nav-icon{width:17px;height:17px}.sidebar-link.active::before{right:-10px;top:8px;bottom:8px}.sidebar-footer{padding:14px 12px 16px}.sidebar-user{padding-bottom:10px}.user-avatar{width:32px;height:32px;font-size:12px}.sidebar-logout{min-height:36px}.theme-toggle{display:flex;align-items:center;gap:9px;width:100%;min-height:36px;margin-bottom:4px;padding:7px 11px;border:1px solid transparent;border-radius:9px;background:transparent;color:#7f7471;text-align:right;font-size:12px;font-weight:600;cursor:pointer;transition:background-color .18s ease,color .18s ease}.theme-toggle:hover{background:#f7f4f4;color:#59514f}.theme-toggle .nav-icon{width:17px;height:17px}.theme-icon-sun{display:none}.theme-toggle-label{flex:1}.theme-switch{position:relative;width:27px;height:16px;border-radius:9px;background:#d7d3d2;transition:background-color .18s ease}.theme-switch::after{content:"";position:absolute;top:3px;right:3px;width:10px;height:10px;border-radius:50%;background:#fff;transition:transform .18s ease}.theme-toggle:focus-visible{outline:2px solid #d46767;outline-offset:2px}@media(max-width:780px){.sidebar{width:min(256px,86vw);flex-basis:auto}}
/* Dark appearance across navigation, reports, forms and tables */
html[data-theme="dark"]{color-scheme:dark;--ink:#f3efef;--muted:#b8b2b0;--blue:#e6a7a7;--line:#413b3a;--bg:#1b1919;--bs-body-color:#f3efef;--bs-body-bg:#1b1919;--bs-border-color:#413b3a}html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}html[data-theme="dark"] .sidebar{background:#23201f;border-color:#413b3a;box-shadow:-8px 0 32px #0e0d0d40}html[data-theme="dark"] .sidebar-head,html[data-theme="dark"] .sidebar-footer,html[data-theme="dark"] .sidebar-group+.sidebar-group{border-color:#413b3a}html[data-theme="dark"] .brand,html[data-theme="dark"] .sidebar-user{color:#f6f3f3}html[data-theme="dark"] .brand small,html[data-theme="dark"] .sidebar-user small,html[data-theme="dark"] .sidebar-label{color:#afa7a5}html[data-theme="dark"] .brand-mark{background:#b73434;box-shadow:none}html[data-theme="dark"] .sidebar-link,html[data-theme="dark"] .theme-toggle{color:#cbc6c4}html[data-theme="dark"] .sidebar-link:hover,html[data-theme="dark"] .theme-toggle:hover{background:#34302f;color:#f8f5f5}html[data-theme="dark"] .sidebar-link.active{background:#453f3d;border-color:#5e5654;color:#efebeb}html[data-theme="dark"] .user-avatar{background:#484241;color:#efebeb}html[data-theme="dark"] .sidebar-logout{color:#f3a4ae}html[data-theme="dark"] .sidebar-logout:hover{background:#3a2936;color:#ffd4d8}html[data-theme="dark"] .theme-icon-moon{display:none}html[data-theme="dark"] .theme-icon-sun{display:block}html[data-theme="dark"] .theme-switch{background:#d66e6e}html[data-theme="dark"] .theme-switch::after{transform:translateX(-11px)}html[data-theme="dark"] .report-card,html[data-theme="dark"] .metric,html[data-theme="dark"] .system-card,html[data-theme="dark"] .report-filter,html[data-theme="dark"] .orders-filter,html[data-theme="dark"] .auth-content .col-md-5,html[data-theme="dark"] .today-pill{background:#292524;border-color:#413b3a;color:var(--ink);box-shadow:none}html[data-theme="dark"] .system-card p,html[data-theme="dark"] .report-heading p,html[data-theme="dark"] .dashboard-top p{color:var(--muted)}html[data-theme="dark"] .report-table th,html[data-theme="dark"] .table thead th{background:#363231;color:#d7d4d3;border-color:#4a4443}html[data-theme="dark"] .report-table td,html[data-theme="dark"] .table td{color:#ede9e9;border-color:#413b3a}html[data-theme="dark"] .table{--bs-table-bg:transparent;--bs-table-color:#ede9e9;--bs-table-border-color:#413b3a;--bs-table-striped-bg:#312c2b;--bs-table-hover-bg:#3b3634}html[data-theme="dark"] .form-control,html[data-theme="dark"] .form-select,html[data-theme="dark"] .report-filter input,html[data-theme="dark"] .filter-grid input,html[data-theme="dark"] .filter-grid select,html[data-theme="dark"] .search-combo-button,html[data-theme="dark"] .search-combo-panel,html[data-theme="dark"] .pager select{background:#201d1c;border-color:#524b4a;color:#f6f3f3}html[data-theme="dark"] input::placeholder{color:#a09795;opacity:1}html[data-theme="dark"] .filter-grid label,html[data-theme="dark"] .filter-select-field,html[data-theme="dark"] .pager .page-size-label{color:#ccc7c6}html[data-theme="dark"] .search-combo-option:hover{background:#3c3736}html[data-theme="dark"] .source-chip{background:#4c4644;color:#ece6e6}html[data-theme="dark"] .btn-outline-secondary{color:#d7d4d3;border-color:#6d6461}html[data-theme="dark"] .btn-outline-secondary:hover{background:#484241;border-color:#817673;color:#fff}html[data-theme="dark"] .btn-outline-primary{color:#e6a7a7;border-color:#d97a7a}html[data-theme="dark"] .btn-outline-primary:hover{background:#b83434;color:#fff}html[data-theme="dark"] .btn-primary{background:#cf5454;border-color:#cf5454;color:#fff}html[data-theme="dark"] .btn-link{color:#e6a7a7}html[data-theme="dark"] .detail-list dt{color:#b8b2b0}html[data-theme="dark"] .sidebar-close,html[data-theme="dark"] .mobile-menu-toggle{background:#363231;border-color:#524b4a;color:#ece7e7}html[data-theme="dark"] .sidebar-backdrop:not([hidden]){background:#0c0b0bb8}
/* Jalali date picker */
.filter-date-field{position:relative;display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px;font-weight:700;color:#6e6562}.filter-date-field>label{font-size:12px}.jalali-control{position:relative;min-width:0}
/* Reserve the calendar button area in every RTL date input, including forms and modals. */
.jalali-control>input[data-jalali-date]{padding-right:48px!important;padding-left:12px!important;box-sizing:border-box}.filter-grid .jalali-control input{padding-right:46px;padding-left:10px;direction:ltr;text-align:right}.jalali-trigger{position:absolute;right:4px;top:4px;width:34px;height:33px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:#8d827f;cursor:pointer}.jalali-trigger:hover{background:#f6f3f3;color:#ba3434}.jalali-trigger svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.jalali-panel{position:absolute;z-index:50;inset-inline-start:0;top:calc(100% + 5px);width:min(308px,calc(100vw - 34px));padding:12px;border:1px solid #e7e5e5;border-radius:13px;background:#fff;box-shadow:0 15px 38px #342f2e26;color:var(--ink);font-size:12px;font-weight:500}.jalali-panel[hidden]{display:none}.jalali-header{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:11px}.jalali-header strong{font-size:13px;font-weight:800}.jalali-nav{width:28px;height:28px;border:0;border-radius:7px;background:#f6f5f4;color:#615856;font-size:23px;line-height:1}.jalali-nav:hover{background:#f0ecec}.jalali-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}.jalali-weekday{padding:5px 0;color:#9d9491;font-size:11px}.jalali-day{aspect-ratio:1;border:0;border-radius:8px;background:transparent;color:var(--ink);font-size:12px}.jalali-day:hover{background:#f4f0f0}.jalali-day.today{box-shadow:inset 0 0 0 1px #dd8686}.jalali-day.selected{background:#d15d5d;color:#fff;box-shadow:none}.jalali-footer{display:flex;justify-content:space-between;gap:8px;border-top:1px solid #f2f1f1;margin-top:9px;padding-top:8px}.jalali-footer button{border:0;background:transparent;color:var(--blue);font-size:11px;font-weight:700;padding:5px 7px}.jalali-footer button:hover{text-decoration:underline}.jalali-trigger:focus-visible,.jalali-panel button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}html[data-theme="dark"] .filter-date-field{color:#ccc7c6}html[data-theme="dark"] .jalali-panel{background:#292524;border-color:#524b4a;color:var(--ink);box-shadow:0 18px 38px #0c0b0b80}html[data-theme="dark"] .jalali-trigger{color:#e6a6a6}html[data-theme="dark"] .jalali-trigger:hover,html[data-theme="dark"] .jalali-nav:hover,html[data-theme="dark"] .jalali-day:hover{background:#443e3d;color:#fff}html[data-theme="dark"] .jalali-nav{background:#3c3735;color:#e6a7a7}html[data-theme="dark"] .jalali-day{color:#f3efef}html[data-theme="dark"] .jalali-day.selected{background:#d56b6b;color:#fff}html[data-theme="dark"] .jalali-footer{border-color:#4b4543}
.report-filter .filter-date-field>label{margin-bottom:0}.report-filter .jalali-control input{width:160px;padding-right:44px;padding-left:8px;text-align:right}.report-filter .jalali-trigger{top:5px}.report-filter .jalali-panel{min-width:282px}html[data-theme="dark"] .report-filter .jalali-panel{background:#292524;border-color:#524b4a;color:var(--ink)}
/* User management */
.users-card{margin-top:22px}.users-card h2 small{color:var(--muted);font-weight:500}.user-form-grid{display:grid;grid-template-columns:minmax(145px,1fr) minmax(180px,1.4fr) minmax(150px,1fr) auto;gap:14px;align-items:end}.user-field{display:grid;gap:7px;min-width:0;color:#6e6562;font-size:12px;font-weight:700}.user-field .form-control,.user-field .form-select{width:100%;min-width:0;min-height:44px}.user-field input[name="name"]{direction:rtl;text-align:right}.user-submit{min-height:44px;white-space:nowrap}.user-list{display:grid;gap:10px}.user-item{border:1px solid var(--line);border-radius:12px;overflow:hidden}.user-summary{display:grid;grid-template-columns:minmax(180px,2fr) minmax(130px,1fr) minmax(75px,.6fr) auto;align-items:center;gap:16px;min-height:74px;padding:12px 16px}.user-identity{display:flex;align-items:center;gap:15px;min-width:0}.user-identity strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-mobile{font-size:12px;color:var(--muted);white-space:nowrap}.user-role{color:#6e6562;font-size:12px;font-weight:700}.user-status{width:max-content;padding:5px 10px;border-radius:99px;font-size:11px;font-weight:800}.user-status.is-active{background:#e7f7ed;color:#177145}.user-status.is-inactive{background:#fbecee;color:#a34954}.user-edit-toggle{min-width:72px;justify-self:end}.user-edit-panel{padding:19px 16px;border-top:1px solid var(--line);background:#fcfbfb}.user-edit-panel[hidden]{display:none}.user-edit-panel .user-form-grid{row-gap:17px}.user-active{grid-column:1 / 4;display:flex;align-items:center;gap:8px;color:#6e6562;font-size:12px;font-weight:700}.user-active input{width:16px;height:16px;accent-color:var(--blue)}.user-empty{margin:0;padding:18px;color:var(--muted)}
@media(max-width:1000px){.user-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.user-submit{justify-self:start}.user-active{grid-column:1 / -1}.user-summary{grid-template-columns:minmax(180px,2fr) minmax(100px,1fr) auto auto}.user-identity{display:grid;gap:4px}}
@media(max-width:600px){.user-form-grid{grid-template-columns:1fr}.user-submit{width:100%}.user-summary{grid-template-columns:1fr auto;gap:10px}.user-role{grid-column:1}.user-status{grid-column:2;grid-row:1}.user-edit-toggle{grid-column:2;grid-row:2}.user-active{grid-column:1}.user-edit-panel{padding:16px}}
html[data-theme="dark"] .user-item{border-color:#4a4443}html[data-theme="dark"] .user-field,html[data-theme="dark"] .user-role,html[data-theme="dark"] .user-active{color:#ccc7c6}html[data-theme="dark"] .user-edit-panel{background:#252222;border-color:#4a4443}html[data-theme="dark"] .user-status.is-active{background:#173e34;color:#8ee0b4}html[data-theme="dark"] .user-status.is-inactive{background:#4a2b36;color:#f3adb4}
/* User creation dialog and granular permissions */
.users-page-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px}.users-page-head .report-heading h1{margin-bottom:6px}.users-page-head .btn{white-space:nowrap}.user-modal-content{border:1px solid var(--line);border-radius:18px;overflow:hidden}.user-modal-content .modal-header,.user-modal-content .modal-footer{padding:17px 23px}.user-modal-content .modal-title{font-weight:800}.user-modal-fields{display:grid;gap:18px;padding:24px}.user-modal-fields .user-field{font-size:13px}.user-modal-fields .form-control,.user-modal-fields .form-select{min-height:46px}
.permissions-heading{margin-bottom:22px}.permissions-heading p{max-width:720px;line-height:1.9}.permission-legend{display:flex;flex-wrap:wrap;gap:10px 25px;margin-bottom:22px;color:var(--muted);font-size:12px}.permission-legend>span{display:flex;align-items:center;gap:8px}.legend-mark{width:12px;height:12px;border-radius:4px}.legend-page{background:#d56b6b}.legend-action{background:#36a887}.permission-roles{display:grid;gap:20px}.permission-role-card{padding:0;overflow:hidden;margin:0}.permission-role-head{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:23px 26px;border-bottom:1px solid var(--line)}.permission-role-head h2{margin:3px 0 4px;font-size:19px}.permission-role-head p{margin:0;color:var(--muted);font-size:12px}.permission-role-key{color:var(--blue);font:700 11px Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase}.permission-count{padding:7px 11px;border:1px solid var(--line);border-radius:99px;color:#817673;font-size:11px;white-space:nowrap}.permission-form{padding:21px 26px 24px}.permission-page-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.permission-page{min-width:0;padding:17px;border:1px solid var(--line);border-radius:13px;background:#fcfbfb;transition:background-color .18s,border-color .18s}.permission-page.is-enabled{border-color:#e6a7a7;background:#faf9f9}.permission-page-top{display:flex;align-items:start;justify-content:space-between;gap:10px}.permission-page-top strong{display:block;font-size:14px}.permission-page-top small{display:block;margin-top:5px;color:var(--muted);font-size:11px}.permission-locked{color:#9f9693;font-size:11px;white-space:nowrap}.permission-switch{position:relative;flex:none;width:38px;height:23px;cursor:pointer}.permission-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}.permission-switch span{display:block;width:38px;height:23px;border-radius:99px;background:#d8d4d3;transition:background-color .2s}.permission-switch span::after{content:"";position:absolute;top:3px;right:3px;width:17px;height:17px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #35302f33;transition:transform .2s}.permission-switch input:checked+span{background:#d25e5e}.permission-switch input:checked+span::after{transform:translateX(-15px)}.permission-switch input:focus-visible+span{outline:2px solid var(--blue);outline-offset:2px}.permission-switch input:disabled+span{opacity:.65;cursor:not-allowed}.permission-action-list{display:grid;gap:10px;margin-top:15px;padding-top:14px;border-top:1px solid var(--line)}.permission-action{display:flex;align-items:center;gap:9px;min-width:0;color:#6e6562;font-size:12px;cursor:pointer}.permission-action input{width:16px;height:16px;flex:none;accent-color:#cf5353}.permission-action:has(input:disabled){opacity:.55;cursor:default}.permission-card-footer{display:flex;justify-content:flex-end;margin-top:22px}.permission-card-footer .btn{min-width:175px}.orders-no-select .orders-toolbar>div:last-child,.orders-no-select .order-table th:is(:not([data-column-original]):first-child,[data-column-first]),.orders-no-select .order-table td:is(:not([data-column-original]):first-child,[data-column-first]),.orders-no-detail .order-table th:is(:not([data-column-original]):last-child,[data-column-last]),.orders-no-detail .order-table td:is(:not([data-column-original]):last-child,[data-column-last]){display:none}
.permission-role-head{position:relative;cursor:pointer;list-style:none;padding-inline-end:58px;transition:background-color .18s}
.permission-role-head::-webkit-details-marker{display:none}
.permission-role-head::marker{content:""}
.permission-role-head:hover{background:var(--line)}
.permission-role-head:focus-visible{outline:2px solid var(--blue);outline-offset:-4px;border-radius:inherit}
.permission-role-card:not([open])>.permission-role-head{border-bottom-color:transparent}
.permission-role-chevron{position:absolute;inset-inline-end:26px;top:30px;width:10px;height:10px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .18s}
.permission-role-card[open]>.permission-role-head .permission-role-chevron{transform:rotate(225deg)}
.permission-group+.permission-group{margin-top:26px;padding-top:22px;border-top:1px solid var(--line)}
.permission-group-title{font-size:16px;font-weight:700;margin:0 0 15px;color:var(--ink)}
@media(max-width:780px){.permission-page-grid{grid-template-columns:1fr}.permission-role-head,.permission-form{padding-inline:18px}.permission-role-head{padding-inline-end:48px}.permission-role-chevron{inset-inline-end:20px}}
@media(max-width:600px){.users-page-head{align-items:start;flex-direction:column}.permission-role-head{align-items:start;flex-direction:column;gap:10px}.permission-count{align-self:start}.permission-card-footer .btn{width:100%}}
html[data-theme="dark"] .user-modal-content{background:#292524;border-color:#524b4a;color:var(--ink)}html[data-theme="dark"] .user-modal-content .modal-header,html[data-theme="dark"] .user-modal-content .modal-footer{border-color:#524b4a}html[data-theme="dark"] .user-modal-content .btn-close{filter:invert(1)}html[data-theme="dark"] .permission-role-head{border-color:#484240}html[data-theme="dark"] .permission-count{border-color:#544d4b;color:#cecac9}html[data-theme="dark"] .permission-page{background:#2a2726;border-color:#494341}html[data-theme="dark"] .permission-page.is-enabled{background:#363130;border-color:#7c726f}html[data-theme="dark"] .permission-action-list{border-color:#4f4846}html[data-theme="dark"] .permission-action{color:#d5d1d0}html[data-theme="dark"] .permission-switch span{background:#6a615f}html[data-theme="dark"] .permission-switch input:checked+span{background:#d97777}
/* Searchable user directory */
.user-list-head{display:flex;align-items:start;justify-content:space-between;margin-bottom:18px}.user-list-head h2{margin:0 0 4px}.user-list-head p{margin:0;color:var(--muted);font-size:12px}.user-list-tools{display:grid;grid-template-columns:minmax(220px,1fr) minmax(170px,210px) auto auto;align-items:end;gap:10px;margin-bottom:22px}.user-search,.user-sort{min-width:0}.user-search input{width:100%;min-height:43px;direction:auto;text-align:right}.user-sort{display:grid;gap:4px;color:var(--muted);font-size:11px;font-weight:700}.user-sort select{width:100%;min-height:43px}.user-list-tools .btn{min-height:43px;white-space:nowrap}.user-list-columns{display:grid;grid-template-columns:minmax(180px,2fr) minmax(130px,1fr) minmax(75px,.6fr) auto;gap:16px;padding:0 17px 10px;color:var(--muted);font-size:11px;font-weight:700}.user-list-columns span:last-child{text-align:left}.user-list{gap:8px}.user-item{background:#fff}.user-summary{min-height:70px}.user-identity{display:flex;align-items:center;gap:11px}.user-initial{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:11px;background:#f4f2f2;color:#c73939;font-size:14px;font-weight:800}.user-identity-copy{display:grid;gap:3px;min-width:0}.user-identity-copy strong{font-size:13px}.user-mobile{font-size:11px}.user-role{width:max-content;max-width:100%;padding:5px 9px;border-radius:7px;background:#f6f4f4;color:#726866;font-size:11px}.user-edit-toggle{font-size:12px;padding:7px 13px}.user-pagination{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:22px;color:var(--muted);font-size:12px}
@media(max-width:1000px){.user-list-tools{grid-template-columns:minmax(180px,1fr) minmax(150px,190px) auto}.user-list-tools>a.btn{grid-column:1 / -1;justify-self:start}.user-list-columns{grid-template-columns:minmax(180px,2fr) minmax(100px,1fr) auto auto}}
@media(max-width:600px){.user-list-tools{grid-template-columns:1fr 1fr}.user-search{grid-column:1 / -1}.user-sort{grid-column:1 / -1}.user-list-tools>a.btn{grid-column:auto}.user-list-columns{display:none}.user-identity{display:flex}.user-summary{padding:13px}.user-role{grid-column:1}.user-edit-toggle{grid-column:2;grid-row:2}.user-status{grid-column:2;grid-row:1}.user-pagination{flex-wrap:wrap}}
html[data-theme="dark"] .user-item{background:#292524}html[data-theme="dark"] .user-initial{background:#4c4644;color:#e6a7a7}html[data-theme="dark"] .user-role{background:#3d3836;color:#d7d4d3}html[data-theme="dark"] .user-list-columns{color:#b2abaa}
.permission-fixed{margin:20px 26px 24px;padding:19px 21px;border:1px solid #e6a7a7;border-radius:12px;background:#f8f7f7;color:#a12d2d;font-size:13px;line-height:1.9;font-weight:600}html[data-theme="dark"] .permission-fixed{background:#3e3937;border-color:#776d6b;color:#ece7e7}
/* Role directory */
.role-create-hint{margin:0;color:var(--muted);font-size:12px;line-height:1.8}.roles-card{margin-top:0}.role-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.role-list-head h2{margin:0}.role-list{display:grid;gap:9px}.role-item{border:1px solid var(--line);border-radius:12px;overflow:hidden}.role-summary{display:grid;grid-template-columns:40px minmax(150px,1fr) minmax(90px,auto) minmax(100px,auto) auto;align-items:center;gap:15px;min-height:70px;padding:12px 16px}.role-icon{display:grid;place-items:center;width:39px;height:39px;border-radius:11px;background:#f4f2f2;color:#c83a3a;font-weight:800}.role-main{display:grid;gap:3px;min-width:0}.role-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.role-main code{justify-self:start;color:var(--muted);font-size:11px}.role-users,.role-fixed{font-size:11px;color:var(--muted);white-space:nowrap}.role-fixed{color:#ac3030;font-weight:700}.role-edit-toggle{justify-self:end;font-size:12px}.role-edit-panel{padding:17px;border-top:1px solid var(--line);background:#fcfbfb}.role-edit-panel[hidden]{display:none}.role-edit-panel form{display:flex;align-items:end;gap:12px}.role-edit-panel .user-field{flex:1}.role-edit-panel .btn{white-space:nowrap;min-height:44px}
@media(max-width:600px){.role-list-head{align-items:start;flex-direction:column}.role-summary{grid-template-columns:40px 1fr auto;gap:10px}.role-users{grid-column:2}.role-fixed,.role-edit-toggle{grid-column:3;grid-row:2}.role-edit-panel form{align-items:stretch;flex-direction:column}.role-edit-panel .user-field,.role-edit-panel .btn{width:100%}}
html[data-theme="dark"] .role-item{border-color:#4a4443}html[data-theme="dark"] .role-icon{background:#4c4644;color:#e6a7a7}html[data-theme="dark"] .role-edit-panel{background:#252222;border-color:#4a4443}html[data-theme="dark"] .role-fixed{color:#e6a7a7}

/* Searchable order entity filters */
.lookup-field{position:relative;min-width:0}.lookup-field>label{display:block;margin-bottom:6px;font-size:12px;font-weight:700;color:#6e6562}.filter-grid .lookup-input{padding-left:30px}.lookup-field::after{content:"⌄";position:absolute;left:12px;top:31px;color:#a39a98;pointer-events:none}.lookup-panel:not([hidden]){position:absolute;z-index:35;top:calc(100% + 5px);right:0;left:0;display:grid;max-height:230px;overflow:auto;padding:5px;border:1px solid #e6e4e4;border-radius:10px;background:#fff;box-shadow:0 13px 28px #413c3b24}.lookup-option{width:100%;min-height:37px;padding:8px 10px;border:0;border-radius:7px;background:transparent;color:var(--ink);font:inherit;font-size:12px;line-height:1.6;text-align:right;cursor:pointer}.lookup-option:hover,.lookup-option.is-active{background:#f7f5f5;color:#a52f2f}.lookup-message{padding:10px;color:#908684;font-size:12px;line-height:1.7}.lookup-input:focus-visible{outline:2px solid #d97878;outline-offset:1px}html[data-theme="dark"] .lookup-field>label{color:#ccc7c6}html[data-theme="dark"] .lookup-panel:not([hidden]){background:#292625;border-color:#524b4a;box-shadow:0 13px 28px #110f0f77}html[data-theme="dark"] .lookup-option:hover,html[data-theme="dark"] .lookup-option.is-active{background:#494341;color:#eee9e9}html[data-theme="dark"] .lookup-message{color:#b9b3b1}
.lookup-panel .lookup-option{display:flex;flex-direction:row;align-items:center;gap:9px;margin:0;font-weight:500}.filter-grid .lookup-option input[type=checkbox]{width:16px;min-height:16px;height:16px;margin:0;flex:none;accent-color:#d15d5d}.lookup-option span{min-width:0;overflow-wrap:anywhere}.lookup-selected{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}.lookup-selected:empty{display:none}.lookup-chip{max-width:100%;padding:4px 7px;border:1px solid #e9e4e4;border-radius:7px;background:#f8f7f7;color:#ac3030;font-size:11px;line-height:1.5;text-align:right;overflow-wrap:anywhere;cursor:pointer}.lookup-chip:hover{background:#f3efef}html[data-theme="dark"] .lookup-chip{background:#423d3c;border-color:#6a615f;color:#efebeb}html[data-theme="dark"] .lookup-chip:hover{background:#524b4a}
.lookup-agent-head,.lookup-panel .lookup-agent-option{display:grid;grid-template-columns:16px minmax(0,1.5fr) minmax(85px,1fr);gap:9px;align-items:center}.lookup-agent-head{padding:7px 10px;color:#948a87;font-size:10px;font-weight:700;border-bottom:1px solid #eeeceb}.lookup-agent-head span:first-child{grid-column:2}.lookup-panel .lookup-agent-option .lookup-warehouse{color:#827774;font-size:11px}html[data-theme="dark"] .lookup-agent-head{border-color:#524b4a;color:#beb8b7}html[data-theme="dark"] .lookup-panel .lookup-agent-option .lookup-warehouse{color:#c8c3c2}

/* Compact order detail action */
.order-table .order-detail-cell{white-space:nowrap;text-align:center}.order-table .order-detail-link{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:5px 10px;border:1px solid #e6a7a7;border-radius:8px;background:#faf8f8;color:#a93030;font-size:11px;font-weight:700;line-height:1.4;text-decoration:none;white-space:nowrap;transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease}.order-detail-link svg{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.order-table .order-detail-link:hover{background:#f5f3f3;border-color:#e6a7a7;color:#5f5856;transform:translateY(-1px)}.order-table .order-detail-link:focus-visible{outline:2px solid #d66d6d;outline-offset:2px}.order-table .order-detail-link:active{transform:translateY(0)}html[data-theme="dark"] .order-table .order-detail-link{background:#3e3937;border-color:#625957;color:#eee9e9}html[data-theme="dark"] .order-table .order-detail-link:hover{background:#534c4a;border-color:#d25e5e;color:#fff}@media(prefers-reduced-motion:reduce){.order-table .order-detail-link{transition:none}.order-table .order-detail-link:hover{transform:none}}
.filtered-report-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 13px;padding:11px 14px;border:1px solid #ebe6e6;border-radius:11px;background:#fbf9f9;color:#756b69;font-size:12px}.filtered-report-bar .btn{flex:none;font-size:12px}.filtered-report-bar .btn:disabled{opacity:.5}html[data-theme="dark"] .filtered-report-bar{background:#2f2b2a;border-color:#4f4947;color:#cec9c8}@media(max-width:600px){.filtered-report-bar{align-items:stretch;flex-direction:column}.filtered-report-bar .btn{width:100%}}

/* Shared mobile layout for every dashboard page. */
.mobile-header{display:none}
@media(max-width:780px){
  html,body{max-width:100%;overflow-x:clip}
  .app-shell,.main-content{min-width:0}
  .mobile-header{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:68px;padding:10px 16px;background:#fdfdfd;border-bottom:1px solid var(--line)}
  .mobile-brand{display:flex;align-items:center;gap:10px;min-width:0;color:var(--ink);font-size:15px;font-weight:800;line-height:1.35;text-decoration:none}
  .mobile-brand small{display:block;margin-top:2px;color:var(--muted);font-size:10px;font-weight:500}
  .mobile-brand .brand-mark{width:38px;height:38px}
  .mobile-menu-toggle{position:relative;inset:auto;z-index:auto;flex:none;align-self:center;width:44px;height:44px;margin:0;padding:0;box-shadow:none}
  body.sidebar-open .mobile-menu-toggle{visibility:hidden}
  .sidebar{width:min(300px,calc(100vw - 48px));max-width:100%;padding-bottom:env(safe-area-inset-bottom)}
  .sidebar-head{padding:18px 16px}
  .sidebar-close{width:44px;height:44px}
  .sidebar-nav{padding:15px 12px;gap:16px}
  .sidebar-link{width:100%;min-height:44px;margin-right:0;text-align:right;justify-content:flex-start}
  .sidebar-footer{padding-bottom:calc(16px + env(safe-area-inset-bottom))}
  .main-content{width:100%;max-width:none;padding:24px 16px 48px}
  .auth-content{min-height:calc(100dvh - 68px);padding:20px 16px}
  .auth-content>.row{margin:0}
  .auth-content .col-md-5{padding:28px 22px}
  .dashboard-top{margin-bottom:22px}
  .dashboard-top h1,.report-heading h1{font-size:23px;line-height:1.5}
  .hero-card{min-height:0;padding:28px 24px;border-radius:20px}
  .hero-card h2{font-size:21px;line-height:1.5}
  .hero-card p{font-size:13px}
  .systems-section{margin-top:28px}
  .system-grid{gap:12px}
  .system-card{padding:16px}
  .report-card,.orders-filter,.report-filter{max-width:100%;padding:18px;margin-bottom:16px;border-radius:15px}
  .order-table-card{padding:0}
  .table-responsive{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .report-table,.order-table{min-width:max-content}
  .report-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .report-filter>*{min-width:0}
  .report-filter input{width:100%;min-height:44px}
  .filter-grid{gap:12px}
  .filter-grid input,.filter-grid select,.search-combo-button{min-height:44px}
  .filter-actions,.detail-actions{flex-wrap:wrap}
  .filter-actions .btn,.detail-actions .btn{min-height:44px}
  .metric-grid{gap:10px;margin-bottom:18px}
  .metric{min-width:0;padding:15px}
  .metric strong{font-size:19px;overflow-wrap:anywhere}
  .orders-toolbar{gap:10px}
  .orders-toolbar>div:last-child{flex-wrap:wrap}
  .detail-list{grid-template-columns:minmax(100px,38%) minmax(0,1fr)}
  .detail-list dd{min-width:0;overflow-wrap:anywhere}
  .permission-page-grid{grid-template-columns:1fr}
  .permission-role-head,.permission-form{padding-inline:16px}
  .permission-role-head{padding-inline-end:48px}
  .permission-page{padding:14px}
  .user-modal-fields{padding:18px}
  .modal{--bs-modal-margin:12px}
  html[data-theme="dark"] .mobile-header{background:#23201f}
}
@media(max-width:480px){
  .main-content{padding-inline:12px}
  .mobile-header{padding-inline:12px}
  .hero-card{padding:24px 20px}
  .report-filter,.filter-grid,.metric-grid{grid-template-columns:1fr}
  .report-card,.orders-filter,.report-filter{padding:16px}
  .order-table-card{padding:0}
  .orders-toolbar>div:last-child,.orders-toolbar>div:last-child .btn,.filter-actions .btn{width:100%}
  .pager{gap:9px}
  .role-list-head{align-items:stretch}
  .role-list-head .btn{width:100%;min-height:44px}
  .role-summary{grid-template-columns:36px minmax(0,1fr) auto;gap:10px;padding:14px}
  .role-icon{grid-column:1;grid-row:1;width:36px;height:36px}
  .role-main{grid-column:2 / -1;grid-row:1}
  .role-users{grid-column:2;grid-row:2}
  .role-fixed{grid-column:3;grid-row:2}
  .role-edit-toggle{grid-column:1 / -1;grid-row:3;justify-self:stretch;min-height:40px}
  .user-list-tools{grid-template-columns:1fr}
  .user-list-tools>*{grid-column:1/-1}
  .user-list-tools .btn{width:100%}
}

/* Product category checkbox shares a grid with text fields but keeps its native size. */
#product-search .filter-grid label.subcategories-check{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;min-height:64px;cursor:pointer}
#product-search .filter-grid .subcategories-check input[type=checkbox]{flex:none;width:18px;height:18px;min-height:0;margin:0;padding:0;border-radius:4px;accent-color:var(--blue)}
.lookup-bulk-actions{display:flex;gap:6px;position:sticky;top:0;z-index:1;padding:6px;background:#fff;border-bottom:1px solid #e6e4e4}.lookup-bulk-actions button{flex:1;border:1px solid #e6a7a7;border-radius:6px;background:#f7f5f5;color:#a52f2f;padding:5px 7px;font:inherit;font-size:12px;cursor:pointer}.lookup-bulk-actions button:hover{background:#f3efef}html[data-theme="dark"] .lookup-bulk-actions{border-color:#524b4a;background:#292625}html[data-theme="dark"] .lookup-bulk-actions button{background:#423d3c;border-color:#6a615f;color:#efebeb}

.cash-upload{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:7px 10px;min-width:240px;max-width:360px}.cash-upload>label:first-child{grid-column:1/-1;margin:0}.cash-upload input[type=file]{position:absolute;width:1px;height:1px;padding:0;opacity:0;overflow:hidden}.cash-upload-button{display:inline-flex!important;align-items:center;justify-content:center;min-height:42px;margin:0!important;padding:8px 14px;border:1px solid #e6a7a7;border-radius:10px;background:#f7f5f5;color:#a93030;font-size:12px;white-space:nowrap;cursor:pointer}.cash-upload-button:hover{background:#f1eeee}.cash-upload input[type=file]:focus-visible+.cash-upload-button{outline:2px solid var(--blue);outline-offset:2px}.cash-upload-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:12px}html[data-theme="dark"] .cash-upload-button{background:#443e3d;border-color:#7b716f;color:#f2eeee}html[data-theme="dark"] .cash-upload-button:hover{background:#59514f}html[data-theme="dark"] .cash-upload-name{color:#d6d2d1}
.report-filter .cash-upload input[type=file]{position:absolute;width:1px;min-height:0;height:1px;padding:0;border:0;opacity:0;overflow:hidden}
.cash-tabs{display:flex;gap:8px;overflow-x:auto;max-width:100%;padding:5px 0 13px;margin:20px 0 18px;border-bottom:1px solid var(--line);scrollbar-width:thin}.cash-tab{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;min-height:42px;padding:9px 17px;border:1px solid transparent;border-radius:10px;background:transparent;color:#807572;font:inherit;font-size:13px;font-weight:700;white-space:nowrap;cursor:pointer}.cash-tab:hover{background:#f7f5f5;color:#a93030}.cash-tab[aria-selected="true"]{background:#f7f5f5;border-color:#e6a7a7;color:#a93030}.cash-tab:focus-visible{outline:2px solid var(--blue);outline-offset:2px}.cash-tab-count{display:inline-grid;place-items:center;min-width:21px;height:21px;padding:0 5px;border-radius:99px;background:#e9a846;color:#241c12;font-size:11px}.cash-panel[hidden]{display:none}.cash-panel>.report-card:first-child{margin-top:0}html[data-theme="dark"] .cash-tab{color:#cac5c4}html[data-theme="dark"] .cash-tab:hover,html[data-theme="dark"] .cash-tab[aria-selected="true"]{background:#443e3d;border-color:#7b716f;color:#f2eeee}
.cash-list-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:3px 0 16px}.cash-list-head h2{margin:0 0 4px;font-size:18px;font-weight:800}.cash-list-head p{margin:0;color:var(--muted);font-size:12px}.cash-list-head .btn{white-space:nowrap}.cash-expense-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding:24px}.cash-field{display:grid;align-content:start;gap:8px;min-width:0}.cash-field>label,.cash-expense-fields .filter-date-field>label,.cash-expense-fields .cash-upload>label:first-child{font-size:12px;font-weight:700;color:#6e6562}.cash-full{grid-column:1/-1}.cash-expense-fields .form-control,.cash-expense-fields .filter-date-field input{width:100%;min-height:45px;border:1px solid #e6e4e4;border-radius:10px;background:#fff;color:var(--ink);font-size:14px}.cash-expense-fields .filter-date-field{gap:8px}.cash-expense-fields .jalali-control input{padding-right:45px;direction:ltr;text-align:right}.cash-expense-fields textarea.form-control{min-height:120px;resize:vertical;direction:rtl;text-align:right;line-height:1.8}.cash-expense-fields #expense-amount{direction:ltr;text-align:right}.cash-expense-fields .cash-upload{grid-column:1/-1;max-width:none}.cash-user-field{position:relative}.cash-user-options{position:absolute;z-index:60;top:73px;right:0;left:0;max-height:230px;overflow-y:auto;padding:6px;border:1px solid #e6e4e4;border-radius:10px;background:#fff;box-shadow:0 16px 30px #342f2e29}.cash-user-options[hidden],.cash-user-option[hidden],.cash-user-empty[hidden]{display:none}.cash-user-option{display:flex;justify-content:space-between;gap:10px;width:100%;padding:9px 11px;border:0;border-radius:7px;background:transparent;color:var(--ink);font:inherit;font-size:12px;text-align:right;cursor:pointer}.cash-user-option:hover,.cash-user-option:focus-visible{background:#f7f5f5}.cash-user-option small{color:var(--muted);direction:ltr}.cash-user-empty{margin:0;padding:10px;color:var(--muted);font-size:12px}.cash-selected-user{min-height:16px;color:var(--muted);font-size:11px}.cash-expense-fields .cash-upload-button{width:max-content}html[data-theme="dark"] .cash-field>label,html[data-theme="dark"] .cash-expense-fields .filter-date-field>label,html[data-theme="dark"] .cash-expense-fields .cash-upload>label:first-child{color:#d5d1d0}html[data-theme="dark"] .cash-expense-fields .form-control,html[data-theme="dark"] .cash-expense-fields .filter-date-field input,html[data-theme="dark"] .cash-user-options{background:#201d1c;border-color:#524b4a;color:#f6f3f3}html[data-theme="dark"] .cash-user-options{box-shadow:0 16px 30px #0c0b0b80}html[data-theme="dark"] .cash-user-option:hover,html[data-theme="dark"] .cash-user-option:focus-visible{background:#494341}@media(max-width:640px){.cash-expense-fields{grid-template-columns:1fr;padding:18px}.cash-full,.cash-expense-fields .cash-upload{grid-column:1}.cash-list-head{align-items:flex-start;flex-direction:column}.cash-list-head .btn{width:100%}}
.cash-review-trigger{min-width:86px;white-space:nowrap}.cash-review-body{display:grid;gap:9px;padding:24px}.cash-review-body label{font-size:13px;font-weight:700}.cash-review-body textarea{min-height:90px;resize:vertical;line-height:1.8;direction:rtl;text-align:right}.cash-review-footer{display:flex;gap:9px;justify-content:flex-end;flex-wrap:wrap}.cash-review-footer .btn{min-width:94px;white-space:nowrap}@media(max-width:560px){.cash-review-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.cash-review-footer .btn:first-child{grid-column:1/-1}.cash-review-footer .btn{width:100%}}
.cash-receipt-link{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:6px 11px;border:1px solid #e6a7a7;border-radius:8px;background:#f8f5f5;color:#a93030;font-size:11px;font-weight:700;line-height:1.3;text-decoration:none;white-space:nowrap;transition:background-color .15s ease,border-color .15s ease}.cash-receipt-link svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.cash-receipt-link:hover{background:#f1eded;border-color:#e5a2a2;color:#5f5755}.cash-receipt-link:focus-visible{outline:2px solid var(--blue);outline-offset:2px}.cash-no-receipt{color:var(--muted)}html[data-theme="dark"] .cash-receipt-link{background:#443e3d;border-color:#796f6c;color:#f0ebeb}html[data-theme="dark"] .cash-receipt-link:hover{background:#5c5553;border-color:#d66e6e;color:#fff}@media(prefers-reduced-motion:reduce){.cash-receipt-link{transition:none}}
.cash-ledger-kind{display:inline-flex;align-items:center;justify-content:center;min-width:64px;padding:5px 9px;border-radius:7px;font-weight:700}.cash-ledger-kind.is-expense{background:#fff1dc;color:#875413}.cash-ledger-kind.is-settlement{background:#e4f6ef;color:#176747}.cash-ledger-table .cash-ledger-description{max-width:320px;white-space:normal;line-height:1.7}.cash-ledger-pages{display:flex;justify-content:center;align-items:center;gap:15px;padding:4px 0 20px;color:var(--muted);font-size:12px}html[data-theme="dark"] .cash-ledger-kind.is-expense{background:#47351f;color:#f1c47b}html[data-theme="dark"] .cash-ledger-kind.is-settlement{background:#1d4238;color:#98e2c0}
.report-filter .cash-user-field{width:min(100%,300px)}.report-filter .cash-user-field input[type=search]{width:100%;min-height:44px;text-align:right;direction:rtl}.report-filter .cash-user-field input[type=hidden]{width:1px;min-height:0;padding:0;border:0}.cash-expense-fields .cash-user-field input[type=search]{direction:rtl;text-align:right}
.tire-sms-filter .filter-select-field{width:min(100%,240px)}.tire-sms-filter select.combo-native{position:absolute;width:1px;height:1px;padding:0;opacity:0;pointer-events:none}.tire-sms-filter .search-combo{width:100%}.tire-sms-filter .search-combo-panel input[type=search]{width:100%;text-align:right;direction:rtl}.tire-sms-filter .search-combo-option{display:flex;align-items:center;gap:8px;padding:7px 6px;cursor:pointer;font-weight:500}.tire-sms-filter .search-combo-option:hover{background:#f7f5f5}.tire-sms-filter .search-combo-option input[type=checkbox]{width:auto;min-height:0;margin:0}.tire-sms-filter .search-combo-button{min-height:42px}
html[data-theme="dark"] .tire-sms-filter .search-combo-option:hover{background:#3c3736}
.cash-ledger-kind.is-allocation{background:#f5f2f2;color:#a42e2e}html[data-theme="dark"] .cash-ledger-kind.is-allocation{background:#47413f;color:#e6a7a7}
.cash-ledger-kind.is-request{background:#f0eaff;color:#6844a0}html[data-theme="dark"] .cash-ledger-kind.is-request{background:#382b56;color:#d6bbff}.cash-row-actions{display:flex;gap:6px;align-items:center}.cash-row-actions .btn{white-space:nowrap}.cash-edit-fields{display:grid;gap:17px;padding:24px}.cash-edit-fields [hidden]{display:none}.cash-edit-fields .filter-date-field input{width:100%;min-height:44px;border:1px solid #e6e4e4;border-radius:10px;background:#fff;color:var(--ink)}.cash-edit-fields .jalali-control input{padding-right:44px;direction:ltr;text-align:right}.cash-edit-fields textarea{direction:rtl;text-align:right;line-height:1.8}.cash-edit-fields small{color:var(--muted);font-size:11px}html[data-theme="dark"] .cash-edit-fields .filter-date-field input{background:#201d1c;border-color:#524b4a;color:#f6f3f3}


#cash-edit-modal .modal-header{display:flex;align-items:center;justify-content:space-between;gap:16px}#cash-edit-modal .modal-header .modal-title{margin:0}#cash-edit-modal .modal-header .btn-close{flex:none;margin:0 auto 0 0!important}#cash-edit-document-field .cash-upload{max-width:none;width:100%}#cash-edit-document-field .cash-upload-name{font-size:13px}

#panel-recharge [data-cash-amount],#panel-allocation [data-cash-amount],#create-expense-modal [data-cash-amount],#create-settlement-modal [data-cash-amount],#cash-edit-modal [data-cash-amount]{direction:ltr;text-align:right;font-variant-numeric:tabular-nums}
.cash-ledger-table .cash-ledger-money{white-space:nowrap;font-variant-numeric:tabular-nums}.cash-ledger-table .cash-ledger-money.is-debit{color:#aa4d46}.cash-ledger-table .cash-ledger-money.is-credit{color:#237450}html[data-theme="dark"] .cash-ledger-table .cash-ledger-money.is-debit{color:#ffaaa0}html[data-theme="dark"] .cash-ledger-table .cash-ledger-money.is-credit{color:#9ae5b6}
.tire-customer-filters .filter-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.tire-customer-role-filter{min-width:0}.tire-customer-role-filter>select{width:100%}.tire-customer-role-filter .search-combo{width:100%}.tire-customer-role-filter .search-combo-panel input[type=search]{width:100%}.tire-customer-role-filter .search-combo-option{display:flex;flex-direction:row;align-items:center;gap:8px;padding:8px 6px;cursor:pointer;font-weight:500}.tire-customer-role-filter .search-combo-option input[type=checkbox]{width:16px;height:16px;min-height:16px;margin:0;padding:0;flex:none;accent-color:var(--blue)}.tire-customer-role-filter .search-combo-option:hover{background:var(--bs-tertiary-bg)}
.tire-customer-table{width:100%}.tire-customer-table td,.tire-customer-table th{vertical-align:middle}.tire-customer-table td[dir=ltr]{text-align:right}
.tire-customer-table .sort-button{text-decoration:none;display:inline-flex;align-items:center}
.tire-customer-status{display:inline-block;padding:4px 9px;border-radius:99px;background:#f3f2f2;color:#7e7370;font-weight:700}.tire-customer-status.is-active{background:#e5f5ec;color:#23734a}
.tire-customer-modal-fields{display:grid;grid-template-columns:1fr 1fr;gap:15px}.tire-customer-modal-fields label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:700;color:var(--ink)}.tire-customer-modal-fields input{min-height:42px}
.tire-customer-filters input,.tire-customer-modal-fields .form-control,.tire-customer-modal-fields .form-select{direction:rtl;text-align:right}
.tire-customer-modal-fields .tire-customer-role-select{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.tire-customer-modal-fields small{font-size:11px;color:var(--muted);font-weight:400}
.tire-customer-role-field{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:13px;font-weight:700;color:var(--ink)}.tire-customer-role-field .search-combo-button{min-height:42px}.tire-customer-role-field .search-combo-panel{z-index:1056}.tire-customer-role-field .search-combo-panel input[type=search]{width:100%;min-height:36px;border:1px solid var(--line);border-radius:7px;padding:6px 9px;background:var(--bs-body-bg);color:var(--ink)}.tire-customer-modal-fields .tire-customer-role-field .search-combo-option{display:flex;flex-direction:row;align-items:center;gap:9px;padding:8px;border-radius:6px;cursor:pointer;font-weight:500}.tire-customer-role-field .search-combo-option:hover{background:var(--bs-tertiary-bg)}.tire-customer-role-field .search-combo-option input{min-height:0;margin:0}
.tire-customer-modal-fields .tire-customer-active{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;min-height:42px}.tire-customer-modal-fields .tire-customer-active input{min-height:0;margin:0}
html[data-theme="dark"] .tire-customer-status{background:#3e3937;color:#d4cfce}html[data-theme="dark"] .tire-customer-status.is-active{background:#214b3b;color:#b7edd0}
@media(max-width:900px){.tire-customer-filters .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.tire-customer-filters .filter-grid,.tire-customer-modal-fields{grid-template-columns:1fr}}
.product-management-actions{min-width:250px;white-space:nowrap}.product-management-actions .btn+.btn{margin-right:6px}
.product-stock-modal{overflow:hidden}.product-stock-modal .modal-header{align-items:flex-start;padding:22px 26px}.product-stock-modal .modal-title{font-weight:800;line-height:1.6}.product-stock-subtitle{color:var(--muted);font-size:12px;margin:5px 0 0}.product-stock-modal .modal-body{padding:20px 26px}.product-stock-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:18px}.product-stock-toolbar label{font-weight:700;font-size:13px;white-space:nowrap}.product-stock-toolbar input{max-width:300px;direction:rtl;text-align:right}.product-stock-toolbar span{color:var(--muted);font-size:12px;margin-right:auto;white-space:nowrap}.product-stock-head,.product-stock-row{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(100px,.8fr) minmax(115px,.8fr);align-items:center;gap:16px}.product-stock-head{color:var(--muted);font-size:12px;font-weight:700;padding:0 16px 10px}.product-stock-list{border:1px solid var(--line);border-radius:12px;overflow:hidden}.product-stock-row{padding:13px 16px;background:transparent}.product-stock-row+.product-stock-row{border-top:1px solid var(--line)}.product-stock-row[hidden]{display:none}.product-stock-row strong{font-size:13px;line-height:1.6}.product-stock-current{font-size:13px;color:var(--muted)}.product-stock-row input{direction:ltr;text-align:center;max-width:155px}.product-stock-row input:focus{border-color:#d77070}.product-stock-empty{text-align:center;color:var(--muted);padding:30px 10px}.product-stock-footer{padding:16px 26px}.product-stock-footer [data-stock-changes]{font-size:12px;color:var(--muted);margin-left:auto}@media(max-width:575px){.product-stock-modal .modal-header,.product-stock-modal .modal-body,.product-stock-footer{padding:16px}.product-stock-head{display:none}.product-stock-row{grid-template-columns:1fr 1fr;gap:7px 12px}.product-stock-row strong{grid-column:1/-1}.product-stock-row input{width:100%}.product-stock-toolbar{flex-wrap:wrap}.product-stock-toolbar input{max-width:none;flex:1 1 100%}}
.product-price-display{direction:ltr;text-align:right;font-variant-numeric:tabular-nums}
.product-total-metrics{margin-bottom:18px}.product-total-metrics .metric{min-width:0}.product-total-metrics .metric strong{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.product-total-metrics .metric small{display:block;margin-top:9px;color:var(--muted);font-size:11px;line-height:1.6}
.product-total-group{display:grid;gap:15px;min-width:0;grid-template-columns:minmax(0,1fr)}
@media(min-width:481px){.product-total-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:781px){.product-total-group{grid-template-columns:repeat(2,minmax(0,1fr))}}

.sidebar-menu > summary{cursor:pointer;list-style:none}.sidebar-menu > summary::-webkit-details-marker{display:none}.sidebar-menu > summary::after{content:"";width:7px;height:7px;margin-inline-start:auto;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);transition:transform .18s ease}.sidebar-menu[open]:not([data-expanded="false"]) > summary::after{transform:rotate(225deg)}.sidebar-menu>a{padding-inline-start:35px;font-size:12px}

.sidebar{direction:ltr;scrollbar-gutter:stable}.sidebar> *{direction:rtl}

@media(prefers-reduced-motion:reduce){.sidebar-menu > summary::after{transition:none}}

.sidebar-menu .sidebar-menu{margin-inline-start:22px;padding-top:0;border-top:0}
.attendance-pending-badge{display:inline-flex;align-items:center;justify-content:center;min-width:24px;padding:2px 7px;margin-inline-start:auto;border-radius:20px;background:#b93642;color:#fff;font-size:12px;font-weight:700}.attendance-pending-alert{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:18px;padding:14px 18px;border:1px solid #e9e3e3;border-radius:12px;background:#f7f5f5;color:#554e4c;text-decoration:none}.attendance-new-request{position:fixed;inset-inline-end:24px;bottom:24px;z-index:1050;max-width:calc(100vw - 48px);padding:18px;border:1px solid #e9e3e3;border-radius:12px;background:#fff;color:#554e4c;box-shadow:0 6px 24px #322e2d26}.attendance-new-request a{margin-inline-start:10px}html[data-theme="dark"] .attendance-pending-alert,html[data-theme="dark"] .attendance-new-request{background:#322d2c;color:#f0ebeb;border-color:#615856}.attendance-pending-badge[hidden],.attendance-pending-alert[hidden],.attendance-new-request[hidden]{display:none}
.attendance-request-results{margin-bottom:18px}.attendance-request-results[hidden]{display:none}.attendance-result{padding:16px 18px;margin-bottom:10px;border:1px solid #c7e4d7;border-inline-start:4px solid #21805c;border-radius:10px;background:#f0faf5;color:#1a503b}.attendance-result.rejected{background:#fff4f4;border-color:#edc8cc;border-inline-start-color:#b83a49;color:#7e2933}.attendance-result>strong{display:block;margin-bottom:8px}.attendance-result p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0}.attendance-result>a{margin-inline-end:20px}html[data-theme="dark"] .attendance-result{background:#17362c;border-color:#39745e;color:#d7f3e6}html[data-theme="dark"] .attendance-result.rejected{background:#3b242c;border-color:#82505a;color:#ffe0e5}

/* Keep both user controls in the operations column. */
.user-summary,.user-list-columns{grid-template-columns:minmax(180px,2fr) minmax(110px,1fr) minmax(65px,.6fr) 260px}
.user-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;min-width:0}
.user-actions .btn{white-space:nowrap;font-size:12px;padding:7px 12px}
@media(max-width:1000px) and (min-width:601px){
  .user-summary,.user-list-columns{grid-template-columns:minmax(150px,2fr) minmax(85px,1fr) 60px 175px;gap:10px}
}
@media(max-width:600px){
  .user-summary{grid-template-columns:minmax(0,1fr) auto}
  .user-actions{grid-column:1/-1;grid-row:3;justify-content:flex-start;padding-top:4px}
}
[data-sales-products] .lookup-field{grid-column:span 2}
@media(max-width:600px){[data-sales-products] .lookup-field{grid-column:auto}}

/* Navigation controls retain link semantics with visible button interaction states. */
a.sort-button{gap:6px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;text-decoration:none}
a.sort-button:hover{background:var(--line);color:var(--ink)}
.attendance-pending-alert:hover{border-color:var(--blue);box-shadow:0 2px 8px #00000014}
.attendance-pending-alert:focus-visible{outline:2px solid var(--blue);outline-offset:3px}

/* Bound selection chips so large multi-selects do not expand the filter form. */
.lookup-selected{max-height:84px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;align-content:flex-start;padding-inline-end:4px}
.lookup-selected .lookup-chip{flex-shrink:0}
.lookup-selection-count{display:block;color:var(--muted);font-size:11px;line-height:1.7;margin-top:5px}
.lookup-selection-count[hidden]{display:none}
.lookup-chip:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
.lookup-anchor{position:relative;min-width:0}.lookup-anchor>.lookup-input{width:100%}.lookup-anchor>.lookup-panel:not([hidden]){top:calc(100% + 5px)}
.table-sort-button{display:inline-flex;align-items:center;min-height:32px;border-radius:6px;text-align:start}
.table-sort-button:hover{background:var(--line)}
.table-column-handle{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;width:30px;height:32px;margin-inline-start:6px;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted);cursor:grab;touch-action:none;user-select:none}
.table-column-handle:hover{background:var(--line);color:var(--ink)}
.table-column-handle:focus-visible{outline:2px solid var(--blue);outline-offset:2px;color:var(--ink)}
.table-column-handle:active{cursor:grabbing}
.table-column-pin{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;width:30px;height:32px;margin-inline-start:2px;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer}
.table-column-pin:hover{background:var(--line);color:var(--ink)}
.table-column-pin:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.table-column-pin[aria-pressed="true"]{color:var(--blue);background:var(--line);border-color:currentColor}
.table-layout-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-block:12px;color:var(--muted);font-size:12px}
.table-layout-controls .btn{font-size:12px;min-height:36px}
.table-layout-message{line-height:1.8}
.table-layout-error .table-layout-message{color:var(--blue)}
.table-layout-retry[hidden]{display:none!important}
.table-columns-enabled .table-column-pinned{position:sticky!important;left:var(--column-pin-left,auto)!important;right:var(--column-pin-right,auto)!important;z-index:4;background-color:var(--column-pin-bg,var(--panel,#fff))!important}
.table-columns-enabled thead .table-column-pinned{z-index:6}
.table-columns-enabled .table-column-dragging{opacity:.55}
.table-columns-enabled .table-column-drop-before{border-inline-start:3px solid var(--blue)!important}
.table-columns-enabled .table-column-drop-after{border-inline-end:3px solid var(--blue)!important}
@media(pointer:coarse){.table-column-handle,.table-column-pin{width:44px;height:44px}}
@media print{.table-column-handle,.table-column-pin,.table-layout-controls{display:none!important}.table-columns-enabled .table-column-pinned{position:static!important}}
th[aria-sort="ascending"]>.table-sort-button,th[aria-sort="descending"]>.table-sort-button{color:var(--blue)}
.sidebar-user-profile{color:var(--ink);text-decoration:none;min-height:44px;border-radius:12px;transition:background-color .15s}
.sidebar-user-profile:hover,.sidebar-user-profile[aria-current="page"]{color:var(--ink);background:var(--line);text-decoration:none}
.sidebar-user-profile:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.sidebar-user-profile .user-avatar{position:relative;overflow:hidden;flex:none}
.sidebar-user-profile .user-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
@media(prefers-reduced-motion:reduce){.sidebar-user-profile{transition:none}}
/* A bounded flex chain supports plain content, a form wrapping the content,
   and forms below a separate header. Only the body normally needs to scroll;
   the outer scroll is a fallback for unusually tall headers or footers. */
.modal .modal-dialog{height:calc(100vh - 2 * var(--bs-modal-margin));height:calc(100dvh - 2 * var(--bs-modal-margin));min-height:0}
.modal .modal-content{max-height:100%;min-height:0;overflow-y:auto}
.modal .modal-content>form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow-y:auto}
.modal .modal-header,.modal .modal-footer{flex-shrink:0}
.modal .modal-body{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.modal .modal-header .btn-close{flex-shrink:0;margin-inline-start:auto;margin-inline-end:0}
