@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');
:root{--bg:#f3f6fb;--card:#fff;--ink:#17243a;--muted:#75839a;--line:#e4eaf2;--nav:#101d33;--nav2:#1b2c48;--accent:#5878e8;--accent2:#20b6a2;--shadow:0 12px 34px rgba(25,42,70,.07)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Vazirmatn,Tahoma,sans-serif;font-size:14px}.app{min-height:100vh;display:flex}.sidebar{width:270px;background:linear-gradient(165deg,var(--nav),#172943 72%,#20365a);color:#e8efff;position:fixed;right:0;top:0;bottom:0;display:flex;flex-direction:column;z-index:5}.brand{display:flex;gap:12px;align-items:center;padding:24px 20px 18px}.brand b{display:block;font-size:17px}.brand small,.profile small{display:block;color:#9aacc9;font-size:11px}.brand-mark{width:44px;height:44px;border-radius:14px;background:linear-gradient(135deg,#6c86ff,#24c6b4);display:grid;place-items:center;color:white;font-weight:800;font-size:17px;box-shadow:0 8px 20px #15294b}.mine-chip{margin:0 16px 14px;padding:10px 12px;border:1px solid #314766;border-radius:12px;color:#b8c9e4;background:#1b2e4a}.sidebar nav{overflow:auto;padding:4px 12px 20px;flex:1}.sidebar nav a{display:flex;align-items:center;gap:12px;padding:10px 12px;margin:3px 0;border-radius:10px;text-decoration:none;color:#c1cde0;font-size:13px;transition:.18s}.sidebar nav a span{width:25px;height:25px;display:grid;place-items:center;border-radius:8px;background:#243955;color:#9eb4ff;font-size:15px}.sidebar nav a:hover,.sidebar nav a.active{background:linear-gradient(90deg,#263d61,#314a70);color:white}.sidebar nav a.active span{background:#647ff1;color:white}.logout{padding:14px 18px;border-top:1px solid #2a3d5a}.logout button{border:0;background:transparent;color:#c4d0e3;font:inherit;cursor:pointer}.main{margin-right:270px;width:calc(100% - 270px);padding:28px 32px 24px;min-width:0}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.eyebrow{font-size:11px;color:var(--muted)}h1{font-size:25px;margin:3px 0 0;font-weight:800}.profile{display:flex;align-items:center;gap:10px;background:white;padding:8px 14px;border:1px solid var(--line);border-radius:14px}.profile b{font-size:12px}.profile small{color:var(--muted)}.avatar{width:35px;height:35px;border-radius:11px;background:#e9efff;color:#536fdb;display:grid;place-items:center;font-weight:800}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px}.stat{background:var(--card);border:1px solid var(--line);border-radius:17px;padding:19px 20px;box-shadow:var(--shadow);position:relative;overflow:hidden}.stat span{color:var(--muted);font-size:12px}.stat b{display:block;font-size:29px;margin-top:8px}.stat i{position:absolute;left:17px;top:18px;font-size:24px;color:#8396e9;font-style:normal;opacity:.8}.panel{background:var(--card);border:1px solid var(--line);border-radius:17px;padding:22px;margin-bottom:20px;box-shadow:var(--shadow);min-width:0}.panel h2{font-size:17px;margin:0 0 8px}.panel p{color:var(--muted);margin:4px 0 12px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}.panel-head p{margin:0}.quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.quick-grid a{background:#f6f8ff;border:1px solid #e4eaff;padding:16px;border-radius:12px;text-decoration:none;color:#344b83;display:flex;justify-content:space-between}.quick-grid b{font-size:18px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:flex;flex-direction:column;gap:6px;min-width:0}.field span{font-size:12px;color:#52627a;font-weight:600}.field input,.field select,.field textarea,.search,.doc-line select,.doc-line input{width:100%;border:1px solid #dce4ef;border-radius:10px;padding:10px 12px;background:#fbfcfe;color:#1b2a40;font:inherit;outline:none;min-height:42px}.field input:focus,.field select:focus,.field textarea:focus{border-color:#8398f2;box-shadow:0 0 0 3px #edf0ff}.field textarea{min-height:90px;resize:vertical}.span2{grid-column:1/-1}.primary,.soft{border:0;border-radius:10px;padding:11px 18px;background:linear-gradient(110deg,#5d78e8,#667fe7);color:white;font:600 13px Vazirmatn,sans-serif;cursor:pointer;text-decoration:none;display:inline-flex;justify-content:center;align-items:center;gap:6px}.soft{background:#edf1ff;color:#4b64c5;border:1px solid #dfe6ff}.full{width:100%;margin-top:8px}.editor{border:1px solid var(--line);border-radius:12px;margin:10px 0 18px;padding:12px;background:#fbfcff}.editor summary{cursor:pointer;color:#5268ca;font-weight:700}.editor form{padding-top:16px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px}table{width:100%;border-collapse:collapse;min-width:650px}th{background:#f4f7fc;color:#65748a;font-weight:700;font-size:12px;text-align:right;white-space:nowrap}td,th{padding:12px 13px;border-bottom:1px solid #edf1f6}td{font-size:12px;color:#35445b}tbody tr:hover{background:#fafbff}tbody tr:last-child td{border-bottom:0}.search{max-width:220px;min-height:38px}.empty{padding:26px;text-align:center;color:var(--muted);background:#fafcff;border:1px dashed var(--line);border-radius:12px}.notice{padding:12px 16px;background:#eaf8f5;color:#187b6e;border:1px solid #d0eee7;border-radius:11px;margin-bottom:16px}.alert{padding:10px;background:#fff0f0;color:#a43e43;border-radius:10px;margin:10px 0}.login{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 20% 20%,#dce8ff,transparent 35%),linear-gradient(135deg,#eef3fb,#e8edf8)}.login-card{width:min(420px,calc(100% - 30px));background:white;padding:36px;border:1px solid #e5eaf3;border-radius:22px;box-shadow:0 25px 80px #1b2e4a20}.login-card .brand-mark{margin:auto}.login-card h1{text-align:center;font-size:22px;margin-top:18px}.login-card p{text-align:center;color:var(--muted);margin:6px 0 22px}.login-card .field{margin:13px 0}.doc-line{display:grid;grid-template-columns:2fr 1fr;gap:10px;margin:8px 0}.inline-action{display:inline-block;margin:5px}footer{color:#9aa6b7;text-align:center;font-size:11px;padding:20px}.muted{color:var(--muted)}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f2f5fa;padding:14px;border-radius:10px;direction:ltr;text-align:left}@media(max-width:1100px){.sidebar{width:230px}.main{margin-right:230px;width:calc(100% - 230px);padding:22px}.stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:720px){.sidebar{position:static;width:100%;height:auto;max-height:42vh}.app{display:block}.sidebar nav{display:grid;grid-template-columns:repeat(2,1fr)}.main{margin:0;width:100%;padding:18px}.topbar{align-items:flex-start;gap:12px}.stats{grid-template-columns:repeat(2,1fr)}.quick-grid{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}.span2{grid-column:auto}.profile{display:none}}

/* ==== نسخه 0.8.4: تب‌ها، نقشه قفسه و گروه دکمه‌های اسناد ==== */
.parity-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.parity-tabs a{padding:9px 16px;border-radius:12px;background:#eef3fb;color:#31405c;font-weight:600;text-decoration:none;border:1px solid transparent;transition:.18s}
.parity-tabs a:hover{background:#e3ebfa}
.parity-tabs a.active{background:linear-gradient(135deg,var(--accent),#7a63e8);color:#fff;box-shadow:0 8px 20px rgba(88,120,232,.28)}
.shelf-target{margin:14px 0;padding:12px 16px;border-radius:12px;background:linear-gradient(135deg,#eef4ff,#e9fbf7);border:1px solid #d7e5ff}
.shelf-target .muted{color:#5b6b85}
.shelf-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:16px 0 6px}
.shelf-toolbar .inline-action{display:inline-flex;margin:0 4px 0 0}
.shelf-chips{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.shelf-chips a{padding:8px 14px;border-radius:999px;background:#f1f5fc;border:1px solid #e0e8f4;color:#2c3c59;text-decoration:none;font-weight:600;display:flex;gap:6px;align-items:center}
.shelf-chips a small{color:#7b8aa3;font-weight:500}
.shelf-chips a.active{background:#16233c;color:#fff;border-color:#16233c}
.shelf-chips a.active small{color:#b9c6dd}
.shelf-level{margin:18px 0;padding:14px;border:1px solid #e3eaf5;border-radius:16px;background:linear-gradient(180deg,#fbfdff,#f4f8fd)}
.shelf-level-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:10px}
.shelf-level-head h3{margin:0 6px 0 0;font-size:15px}
.shelf-level-head .inline-action{display:inline-flex;margin:0}
.shelf-grid{display:grid;gap:8px}
.shelf-cell{position:relative;min-height:96px;border-radius:12px;border:1px dashed #cfdaea;background:repeating-linear-gradient(135deg,#f7f9fd,#f7f9fd 8px,#f2f6fc 8px,#f2f6fc 16px);padding:8px;display:flex;flex-direction:column;gap:4px;overflow:hidden;transition:.18s}
.shelf-cell small{color:#8a99b1;font-size:11px}
.shelf-cell b{font-size:13px;line-height:1.5}
.shelf-cell em{font-style:normal;font-size:11px;color:#5f7190}
.shelf-cell.filled{background:linear-gradient(160deg,#ffffff,#eef4ff);border:1px solid #c9d9f4;box-shadow:0 6px 16px rgba(35,64,120,.08)}
.shelf-cell.filled b{color:#132a52}
.shelf-cell.target{border:2px solid var(--accent2);box-shadow:0 0 0 4px rgba(32,182,162,.18),0 10px 24px rgba(32,182,162,.18);background:linear-gradient(160deg,#effcfa,#e2f8f3)}
.shelf-cell .cell-empty{color:#9aa8be;font-weight:600;font-size:12px}
.shelf-cell .cell-ident{margin-top:auto;font-size:10px;color:#7c8ca6;border-top:1px dashed #dbe4f1;padding-top:4px;direction:rtl;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shelf-cell .cell-actions{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
.shelf-cell .cell-actions form{display:inline-flex;margin:0}
.shelf-cell .soft,.shelf-cell .danger{padding:3px 8px;font-size:11px;border-radius:8px}
.doc-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:14px;border-radius:14px;background:linear-gradient(135deg,#f5f8fe,#eef6f4);border:1px solid #e0e9f5;margin:14px 0}
.doc-actions .inline-action{display:inline-flex;margin:0}
.doc-actions .soft,.doc-actions .primary{padding:7px 12px;font-size:12px}
@media(max-width:720px){.shelf-grid{grid-template-columns:1fr!important}.shelf-toolbar{flex-direction:column;align-items:stretch}}
.doc-action-group{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid #dbe6f4;border-radius:12px;background:#fff;box-shadow:0 3px 10px rgba(30,55,100,.05);max-width:100%}
.doc-action-group b{font-size:12px;color:#33466a;direction:ltr;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:130px}
.doc-action-group .soft{padding:5px 9px;font-size:11px;white-space:nowrap}
.doc-action-group form{margin:0;display:inline-flex}

/* ==== نسخه 0.8.5: سطوح شدت هشدار، تاریخ شمسی، چک‌باکس واضح، نوار ابزار و ثبت سند فشرده ==== */
.topbar{gap:16px;flex-wrap:wrap}
.topbar-title{min-width:0}
.topbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-right:auto}
.global-search{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:3px 5px 3px 10px;box-shadow:var(--shadow)}
.global-search input[type=search]{border:0;background:transparent;min-height:34px;width:min(230px,40vw);font:inherit;color:var(--ink);outline:none}
.global-search .soft{min-height:34px;padding:6px 11px}
.topbar-btn{min-height:38px;white-space:nowrap}
input[type=checkbox]{-webkit-appearance:none;appearance:none;width:20px;min-width:20px;height:20px;min-height:20px;padding:0;border:2px solid #b9c6dd;border-radius:6px;background:#fff;display:inline-grid;place-items:center;cursor:pointer;vertical-align:middle;transition:.15s;flex:none}
input[type=checkbox]:hover{border-color:#8398f2}
input[type=checkbox]:checked{background:#5878e8;border-color:#5878e8}
input[type=checkbox]:checked::after{content:"";width:5px;height:10px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(42deg) translate(-1px,-1px)}
input[type=checkbox]:focus-visible{outline:3px solid #dfe7ff;outline-offset:1px}
.field input[type=checkbox]{width:20px;min-height:20px;padding:0}
.alert-kpis{display:flex;flex-wrap:wrap;gap:10px;margin:4px 0 16px}
.alert-kpi{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 14px;box-shadow:var(--shadow);min-width:140px}
.alert-kpi i{width:12px;height:12px;border-radius:50%;background:var(--sev,#64748b);flex:none}
.alert-kpi span{color:var(--muted);font-size:12px;font-weight:600}
.alert-kpi b{margin-right:auto;font-size:20px;color:var(--ink)}
.sev-badge{display:inline-block;color:#fff;border-radius:999px;padding:3px 10px;font-size:11px;font-weight:700;white-space:nowrap;line-height:1.6}
.due-late{color:#b91c1c;font-weight:800}
tr.alert-resolved{opacity:.62}
.alert-filter{grid-template-columns:repeat(3,minmax(0,1fr)) minmax(90px,auto);align-items:end}
.alert-table th:first-child,.alert-table td:first-child{width:44px;text-align:center}
.date-input{text-align:center;letter-spacing:.4px;direction:ltr;font-variant-numeric:tabular-nums}
.doc-entry-grid{grid-template-columns:repeat(4,minmax(0,1fr));align-items:end}
.doc-entry-grid .span4{grid-column:1/-1}
.doc-entry-items{background:linear-gradient(135deg,#f7faff,#f1f7ff);border:1px solid #e2eaf7;border-radius:14px;padding:12px 14px}
.doc-entry-items-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.doc-entry-items-head h3{margin:0;font-size:14px;color:#33466a}
.doc-entry-items .doc-line{grid-template-columns:3fr 1fr;margin:6px 0}
.doc-entry-items .doc-line select,.doc-entry-items .doc-line input{min-height:40px}
.doc-entry-submit{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
@media(max-width:1100px){.doc-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.doc-entry-grid{grid-template-columns:1fr}.alert-filter{grid-template-columns:1fr}.global-search{flex:1 1 100%}.global-search input[type=search]{width:100%}.topbar-actions{width:100%}}

/* ==== نسخه 0.8.6: ریل ناوبری شیشه‌ای، هیروی روشن داشبورد و چیدمان جدید ==== */
/* ریل ناوبری: فقط آیکون‌های درشت در حالت عادی و بازشدن نرم با نمایش برچسب‌ها روی هاور. */
.sidebar.rail{width:88px;padding:0;background:linear-gradient(180deg,#0b1a30 0%,#122845 55%,#0e2038 100%);border-left:1px solid rgba(255,255,255,.06);box-shadow:-10px 0 30px rgba(6,18,38,.18);overflow:hidden;transition:width .36s cubic-bezier(.22,.61,.36,1),box-shadow .36s ease;will-change:width}
.sidebar.rail:hover{width:292px;box-shadow:-28px 0 70px rgba(5,16,36,.42)}
.rail-brand{display:flex;align-items:center;gap:12px;padding:18px 20px 12px;min-height:72px}
.rail-brand .brand-mark{flex:none;width:46px;height:46px;border-radius:15px;font-size:18px;transition:transform .36s cubic-bezier(.22,.61,.36,1)}
.rail-brand-text{opacity:0;max-width:0;overflow:hidden;white-space:nowrap;transition:opacity .26s ease .06s,max-width .36s cubic-bezier(.22,.61,.36,1)}
.rail-brand-text b{display:block;font-size:16px;color:#f2f7ff;letter-spacing:.2px}
.rail-brand-text small{display:block;color:#8fa7c8;font-size:11px;margin-top:2px}
.sidebar.rail:hover .rail-brand-text{opacity:1;max-width:200px}
.mine-chip{margin:0 14px 10px;padding:9px 12px;border:1px solid #2b4468;border-radius:12px;color:#b8c9e4;background:rgba(27,46,74,.65);display:flex;align-items:center;gap:10px;min-height:42px;overflow:hidden;white-space:nowrap}
.mine-ico{font-size:18px;flex:none;width:24px;text-align:center}
.rail-search{display:flex;align-items:center;gap:10px;margin:2px 12px 10px;padding:4px 8px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:rgba(255,255,255,.05);overflow:hidden;flex:none}
.sidebar.rail:hover .rail-search{border-color:rgba(255,255,255,.16);background:rgba(255,255,255,.08)}
.rail-search .rail-icon{flex:none;width:44px;height:38px;display:grid;place-items:center;font-size:22px;color:#9db8e6;transition:font-size .3s ease,color .3s ease}
.rail-search input[type=search]{border:0;background:transparent;color:#eaf2ff;font:inherit;font-size:13px;min-height:36px;width:0;opacity:0;outline:none;transition:width .36s cubic-bezier(.22,.61,.36,1),opacity .28s ease;padding:0}
.rail-search input[type=search]::placeholder{color:#8199bb}
.sidebar.rail:hover .rail-search input[type=search]{width:100%;opacity:1;padding:0 4px}
.sidebar.rail .rail-nav{flex:1;overflow-y:auto;overflow-x:hidden;padding:4px 10px 14px;scrollbar-width:thin;scrollbar-color:#2b466b transparent}
.rail-nav::-webkit-scrollbar{width:5px}
.rail-nav::-webkit-scrollbar-thumb{background:#2b466b;border-radius:9px}
.nav-group{margin:4px 0 8px}
.nav-group-title{font-size:10px;font-weight:700;letter-spacing:.6px;color:#7e96b8;text-transform:uppercase;padding:0 12px;max-height:0;opacity:0;overflow:hidden;transition:max-height .3s ease,opacity .24s ease,padding .3s ease;white-space:nowrap}
.sidebar.rail:hover .nav-group-title{max-height:22px;opacity:1;padding:6px 12px 2px}
.sidebar.rail .rail-link{display:flex;align-items:center;justify-content:center;gap:0;padding:9px 0;margin:2px 0;border-radius:13px;text-decoration:none;color:#c6d4ea;font-size:13px;transition:background .2s ease,color .2s ease,padding .34s cubic-bezier(.22,.61,.36,1),gap .34s ease;position:relative}
.sidebar.rail .rail-link .rail-icon{flex:none;width:46px;height:44px;display:grid;place-items:center;border-radius:12px;background:rgba(255,255,255,.04);color:#a9c0e6;font-size:24px;line-height:1;transition:font-size .34s cubic-bezier(.22,.61,.36,1),background .2s ease,color .2s ease,transform .2s ease}
.sidebar.rail .rail-link .rail-label{opacity:0;max-width:0;overflow:hidden;white-space:nowrap;transition:opacity .24s ease .04s,max-width .36s cubic-bezier(.22,.61,.36,1);font-weight:600}
.sidebar.rail .rail-link:hover .rail-icon{transform:translateY(-1px);background:rgba(120,150,255,.18);color:#dbe7ff}
.sidebar.rail:hover .rail-link{justify-content:flex-start;gap:12px;padding:9px 10px}
.sidebar.rail:hover .rail-link .rail-icon{font-size:20px;width:38px;height:38px;background:rgba(255,255,255,.06)}
.sidebar.rail:hover .rail-link .rail-label{opacity:1;max-width:190px}
.sidebar.rail .rail-link.active{background:linear-gradient(90deg,rgba(88,120,232,.34),rgba(32,182,162,.18));color:#fff;box-shadow:inset 0 0 0 1px rgba(130,160,255,.22)}
.sidebar.rail .rail-link.active .rail-icon{background:linear-gradient(135deg,#5b7bf0,#38c9b6);color:#fff;box-shadow:0 8px 18px rgba(40,80,170,.35)}
.rail-footer{flex:none;border-top:1px solid rgba(255,255,255,.07);padding:10px;display:flex;flex-direction:column;gap:4px;background:rgba(4,14,30,.18)}
.sidebar.rail .rail-action{display:flex;align-items:center;justify-content:center;gap:0;background:transparent;border:0;color:#c6d4ea;font:inherit;font-size:13px;padding:7px 0;border-radius:12px;cursor:pointer;text-decoration:none;overflow:hidden;transition:background .2s ease,color .2s ease,padding .34s cubic-bezier(.22,.61,.36,1),gap .34s ease}
.sidebar.rail .rail-action .rail-icon{flex:none;width:44px;height:38px;display:grid;place-items:center;font-size:21px;border-radius:11px;transition:font-size .3s ease,background .2s ease}
.sidebar.rail .rail-action .rail-label{opacity:0;max-width:0;overflow:hidden;white-space:nowrap;font-weight:600;transition:opacity .22s ease,max-width .34s cubic-bezier(.22,.61,.36,1)}
.sidebar.rail .rail-action:hover{background:rgba(255,255,255,.07);color:#fff}
.sidebar.rail:hover .rail-action{justify-content:flex-start;gap:10px;padding:7px 10px}
.sidebar.rail:hover .rail-action .rail-icon{font-size:18px;width:34px;height:34px}
.sidebar.rail:hover .rail-action .rail-label{opacity:1;max-width:170px}
.sidebar.rail .rail-profile{display:flex;align-items:center;justify-content:center;gap:10px;padding:7px 6px;border-radius:12px;background:rgba(255,255,255,.04);overflow:hidden}
.sidebar.rail .rail-profile .avatar{flex:none;width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#5b7bf0,#38c9b6);color:#fff;font-size:15px}
.sidebar.rail .rail-profile .rail-label{opacity:0;max-width:0;overflow:hidden;white-space:nowrap;transition:opacity .24s ease,max-width .36s cubic-bezier(.22,.61,.36,1)}
.sidebar.rail .rail-profile .rail-label b{display:block;font-size:12px;color:#f0f5ff}
.sidebar.rail .rail-profile .rail-label small{display:block;color:#8fa7c8;font-size:10px;margin-top:1px}
.sidebar.rail:hover .rail-profile{justify-content:flex-start;padding:7px 10px}
.sidebar.rail:hover .rail-profile .rail-label{opacity:1;max-width:170px}
.sidebar.rail .rail-logout{display:flex;justify-content:center;padding:2px 0 0}
.sidebar.rail .rail-logout button{display:flex;align-items:center;justify-content:center;gap:0;width:100%;border:0;background:transparent;color:#9fb3d3;font:inherit;font-size:12px;padding:6px 0;border-radius:11px;cursor:pointer;overflow:hidden;transition:background .2s ease,color .2s ease,padding .34s ease,gap .34s ease}
.sidebar.rail .rail-logout .rail-icon{flex:none;width:40px;height:32px;display:grid;place-items:center;font-size:18px}
.sidebar.rail .rail-logout .rail-label{opacity:0;max-width:0;overflow:hidden;white-space:nowrap;transition:opacity .22s ease,max-width .34s ease}
.sidebar.rail .rail-logout button:hover{background:rgba(220,80,90,.16);color:#ffd9dc}
.sidebar.rail:hover .rail-logout button{justify-content:flex-start;gap:8px;padding:6px 10px}
.sidebar.rail:hover .rail-logout .rail-label{opacity:1;max-width:150px}
/* محتوا در کنار ریل ثابت می‌ماند تا بازشدن منو محتوا را جابه‌جا نکند. */
.main{margin-right:88px;width:calc(100% - 88px);padding:24px 28px 26px;min-width:0}
/* هیروی روشن داشبورد */
.dash-hero{display:flex;align-items:center;justify-content:space-between;gap:26px;background:linear-gradient(135deg,#ffffff 0%,#f7faff 55%,#eef5ff 100%);border:1px solid #e2ebf8;border-radius:24px;padding:28px 32px;margin-bottom:20px;box-shadow:0 20px 55px rgba(28,56,110,.09);position:relative;overflow:hidden}
.dash-hero:before{content:"";position:absolute;left:-90px;top:-120px;width:320px;height:320px;border-radius:50%;background:radial-gradient(circle,#dce9ff 0%,rgba(220,233,255,0) 70%);pointer-events:none}
.dash-hero:after{content:"";position:absolute;right:-60px;bottom:-150px;width:300px;height:300px;border-radius:50%;background:radial-gradient(circle,#d7f6ef 0%,rgba(215,246,239,0) 70%);pointer-events:none}
.dash-hero-copy{position:relative;z-index:1;min-width:0}
.dash-hero-eyebrow{display:inline-flex;align-items:center;gap:8px;background:#eaf1ff;color:#3f5fbf;border:1px solid #dbe6ff;border-radius:999px;padding:6px 13px;font-size:12px;font-weight:700}
.dash-hero-copy h1{font-size:30px;line-height:1.3;margin:12px 0 6px;color:#12233f;display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.dash-hero-copy h1 small{font-size:13px;font-weight:600;color:#6b7f9e;letter-spacing:.5px}
.dash-hero-copy p{color:#66788f;margin:0 0 18px;font-size:13px}
.dash-hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.dash-hero-actions .primary,.dash-hero-actions .soft{min-height:42px}
.dash-clock{position:relative;z-index:1;min-width:212px;background:#fff;border:1px solid #e4ecf8;border-radius:20px;padding:16px 22px;box-shadow:0 14px 34px rgba(28,56,110,.09);text-align:center;flex:none}
.dash-clock-label{font-size:10px;color:#8a99b1;letter-spacing:.8px;font-weight:700}
.dash-clock-day{font-size:20px;font-weight:800;color:#1d3357;margin:3px 0}
.dash-clock-date{font-size:13px;color:#4d638a;font-variant-numeric:tabular-nums;letter-spacing:.3px}
.dash-clock-time{font-size:30px;font-weight:800;color:#2f5bd6;font-variant-numeric:tabular-nums;letter-spacing:1.5px;margin-top:6px}
.stats,.dash-hero + .stats{grid-template-columns:repeat(auto-fit,minmax(175px,1fr))}
@media(max-width:1100px){.dash-hero-copy h1{font-size:24px}.dash-clock-time{font-size:24px}.main{padding:20px}}
@media(max-width:900px){
  .sidebar.rail{position:static;width:100%;height:auto;max-height:none;flex-direction:row;align-items:center;overflow:visible;padding:8px 10px;gap:8px}
  .sidebar.rail:hover{width:100%;box-shadow:none}
  .rail-brand{display:none}
  .mine-chip{display:none}
  .rail-search{width:auto;margin:0;flex:none}
  .rail-search input[type=search]{display:none}
  .rail-search .rail-icon{width:38px;height:38px}
  .sidebar.rail .rail-nav{display:flex;flex-direction:row;align-items:center;gap:4px;overflow-x:auto;overflow-y:hidden;padding:2px;flex:1}
  .nav-group{display:flex;flex-direction:row;align-items:center;gap:3px;margin:0}
  .nav-group-title{display:none}
  .sidebar.rail .rail-link,.sidebar.rail:hover .rail-link{padding:6px 8px;gap:0}
  .sidebar.rail .rail-link .rail-icon,.sidebar.rail:hover .rail-link .rail-icon{width:40px;height:40px;font-size:21px}
  .sidebar.rail .rail-link .rail-label,.sidebar.rail:hover .rail-link .rail-label{display:none}
  .rail-footer{flex-direction:row;border-top:0;border-right:1px solid rgba(255,255,255,.08);padding:0 0 0 6px;gap:2px;background:transparent}
  .sidebar.rail .rail-action .rail-label,.sidebar.rail .rail-profile,.sidebar.rail .rail-logout .rail-label{display:none}
  .sidebar.rail .rail-action,.sidebar.rail:hover .rail-action{padding:4px;gap:0}
  .sidebar.rail .rail-action .rail-icon,.sidebar.rail:hover .rail-action .rail-icon{width:38px;height:38px;font-size:19px}
  .sidebar.rail .rail-logout{display:none}
  .main{margin:0;width:100%;padding:18px}
  .app{display:block}
  .dash-hero{flex-direction:column;align-items:flex-start;padding:22px}
  .dash-clock{width:100%;display:grid;grid-template-columns:1fr auto;align-items:center;text-align:right;gap:2px 10px}
  .dash-clock-label{grid-column:1/-1}
  .dash-clock-time{margin:0;font-size:26px;justify-self:end;grid-row:2/4;grid-column:2}
  .dash-clock-day,.dash-clock-date{grid-column:1}
}
@media(max-width:620px){.dash-hero-copy h1{font-size:21px}.dash-hero-copy h1 small{font-size:11px}.quick-grid{grid-template-columns:1fr}.stats{grid-template-columns:1fr 1fr}}

/* V086: collapsed rail keeps the mine chip icon-only so no truncated label leaks out. */
.sidebar.rail .mine-chip{justify-content:center;gap:0;padding:9px 0}
.sidebar.rail .mine-chip .rail-label{opacity:0;max-width:0;overflow:hidden;white-space:nowrap;transition:max-width .36s cubic-bezier(.22,.61,.36,1),opacity .24s ease}
.sidebar.rail:hover .mine-chip{justify-content:flex-start;gap:10px;padding:9px 12px}
.sidebar.rail:hover .mine-chip .rail-label{opacity:1;max-width:170px}

/* V087: دو کادر مشکی مستقل برای نتایج جست‌وجو (راست) و اقلام سند (چپ) */
.doc-entry-split{display:grid;grid-template-columns:1.45fr 1fr;gap:14px;align-items:stretch}
.doc-pane{display:flex;flex-direction:column;min-height:380px;background:#fff;border:2px solid #0f172a;border-radius:14px;box-shadow:0 10px 24px rgba(15,23,42,.06);overflow:hidden}
.doc-pane-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid #e2e8f0;background:#f8fafc}
.doc-pane-head h3{margin:0;font-size:14px;color:#0f172a}
.doc-pane-head input[type=search]{min-width:180px;flex:1;max-width:320px}
.doc-pane-body{padding:10px 12px;overflow:auto;flex:1;max-height:430px}
.doc-product-table{width:100%;border-collapse:collapse;font-size:13px}
.doc-product-table th{position:sticky;top:0;background:#eef2f7;color:#334155;text-align:right;padding:8px;border-bottom:1px solid #dbe3ef}
.doc-product-table td{padding:7px 8px;border-bottom:1px solid #eef2f7}
.doc-product-table tr:hover td{background:#f1f5ff}
.doc-pane-items .doc-line{margin:6px 0}
.doc-pane .empty{text-align:center;color:#64748b;padding:18px}
@media(max-width:900px){.doc-entry-split{grid-template-columns:1fr}}

/* V087: انتخاب دسته‌های بازنشانی کارخانه */
.reset-cats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.reset-cat{display:flex;gap:9px;align-items:flex-start;border:1px solid #dbe4f0;border-radius:12px;padding:11px 12px;background:#f8fbff;cursor:pointer}
.reset-cat:hover{border-color:#9db4e0;background:#f1f7ff}
.reset-cat input{margin-top:3px}
.reset-cat b{display:block;color:#16233a;font-size:13px}
.reset-cat small{display:block;color:#64748b;font-size:11.5px;margin-top:2px;line-height:1.6}
@media(max-width:820px){.reset-cats{grid-template-columns:1fr}}

/* V087: برچسب اختصاصی هر نوع کد */
.id-label-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.id-label-grid .field{margin:0}
.id-label-grid input{text-align:left;direction:ltr}

/* V088: کارت تاریخ و روز داشبورد */
.dash-clock-v88{min-width:268px;width:300px;max-width:100%;padding:18px 20px 14px;border-radius:22px;border:1px solid #dbe7fb;background:linear-gradient(160deg,#ffffff 0%,#f4f8ff 70%,#eef4ff 100%);box-shadow:0 22px 45px rgba(28,56,110,.13);text-align:right;overflow:hidden;position:relative}
.dash-clock-glow{position:absolute;inset:-40% -35% auto auto;width:220px;height:220px;border-radius:50%;background:radial-gradient(circle,rgba(84,128,255,.18),rgba(84,128,255,0) 70%);pointer-events:none}
.dash-clock-head{display:flex;align-items:center;justify-content:space-between;gap:8px;position:relative;z-index:1}
.dash-clock-caption{font-size:11px;font-weight:800;letter-spacing:.6px;color:#7b8cab}
.dash-clock-badge{font-size:10.5px;font-weight:700;color:#2f5bd6;background:#eaf1ff;border:1px solid #d9e5ff;border-radius:999px;padding:3px 9px}
.dash-clock-body{display:flex;align-items:center;gap:14px;margin:10px 0 8px;position:relative;z-index:1}
.dash-clock-daynum{flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;width:84px;height:92px;border-radius:18px;background:linear-gradient(160deg,#2f5bd6,#1d3f9e);color:#fff;box-shadow:0 12px 24px rgba(47,91,214,.28)}
.dash-clock-daynum b{font-size:36px;line-height:1;font-variant-numeric:tabular-nums}
.dash-clock-daynum span{font-size:11px;font-weight:700;opacity:.9;margin-top:4px}
.dash-clock-meta{min-width:0;display:flex;flex-direction:column;gap:3px}
.dash-clock-weekday{font-size:19px;font-weight:800;color:#16294a;line-height:1.2}
.dash-clock-date{font-size:12.5px;color:#55688a;font-variant-numeric:tabular-nums;letter-spacing:.4px}
.dash-clock-v88 .dash-clock-time{font-size:26px;font-weight:800;color:#2f5bd6;font-variant-numeric:tabular-nums;letter-spacing:1px;margin-top:2px}
.dash-clock-foot{display:flex;align-items:center;gap:8px;font-size:10.5px;color:#8a99b1;border-top:1px dashed #dde7f6;padding-top:9px;position:relative;z-index:1}
.dash-clock-dot{flex:1;height:1px;background:linear-gradient(90deg,#dde7f6,#c9d9f2,#dde7f6)}
@media(max-width:900px){.dash-clock-v88{width:100%;min-width:0}}
@media(max-width:620px){.dash-clock-daynum{width:74px;height:82px}.dash-clock-weekday{font-size:17px}.dash-clock-v88 .dash-clock-time{font-size:22px}}
@media(max-width:900px){.dash-clock.dash-clock-v88{display:block;text-align:right}}

/* ==== نسخه 0.8.9: برچسب کامل منو، نمای عملیاتی، موجودی چند‌انباری، تصویر و تقویم ==== */
/* ریل ناوبری: فضای بازشدن بیشتر تا عنوان‌های بلند منو کامل دیده شوند. */
.sidebar.rail:hover{width:324px}
.sidebar.rail:hover .rail-link .rail-label{max-width:234px;overflow:visible;text-overflow:clip}
.sidebar.rail .rail-link .rail-label{line-height:1.55;padding-left:2px}
.sidebar.rail:hover .rail-brand-text{max-width:230px}
.sidebar.rail:hover .mine-chip .rail-label{max-width:224px}
.sidebar.rail:hover .rail-action .rail-label{max-width:214px}
.sidebar.rail:hover .rail-profile .rail-label{max-width:210px}
.sidebar.rail:hover .rail-logout .rail-label{max-width:188px}
.sidebar.rail .nav-group-title{font-size:11px;letter-spacing:.4px}
@media(max-width:900px){.sidebar.rail:hover{width:100%}}

/* نمای عملیاتی داشبورد: سه کارت خرید، سرویس و تعمیرات و موجودی */
.ops-overview .panel-head{margin-bottom:14px}
.ops-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(238px,1fr));gap:14px}
.ops-card{display:flex;align-items:center;gap:14px;padding:18px;border-radius:16px;text-decoration:none;color:#1b2a40;background:linear-gradient(135deg,#f8fbff,#eef4ff);border:1px solid #e0e9f8;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;position:relative;min-width:0}
.ops-card:hover{transform:translateY(-2px);box-shadow:0 16px 32px rgba(28,56,110,.13);border-color:#c9d9f4}
.ops-ico{width:52px;height:52px;border-radius:14px;display:grid;place-items:center;font-size:24px;flex:none;background:#e8efff;color:#3f5fbf}
.ops-maintenance{background:linear-gradient(135deg,#fffaf3,#fff3e4);border-color:#f6e6cc}
.ops-maintenance .ops-ico{background:#ffefd8;color:#b45309}
.ops-stock{background:linear-gradient(135deg,#f5fdfb,#e9f8f3);border-color:#d5efe8}
.ops-stock .ops-ico{background:#dcf5ec;color:#0f766e}
.ops-body{min-width:0;flex:1}
.ops-body>b{display:block;font-size:15px;margin-bottom:3px;color:#182a47}
.ops-body>small{display:block;color:var(--muted);font-size:11.5px;margin-bottom:8px}
.ops-metrics{display:flex;flex-wrap:wrap;gap:5px 12px;font-size:11.5px;color:#5b6b85}
.ops-metrics b{font-size:14px;color:#1d3357;margin-right:4px}
.ops-arrow{color:#9db4e0;font-size:18px;flex:none}
@media(max-width:620px){.ops-grid{grid-template-columns:1fr}}

/* موجودی: جدول عریض با اسکرول، تصویر کوچک و پارامترهای چندخطی */
.inventory-wrap{overflow:auto}
.inventory-table{min-width:1180px}
.inventory-table th{position:sticky;top:0;z-index:1}
.inventory-table td{vertical-align:middle}
.inventory-table tr[hidden]{display:none}
.inventory-table td:last-child{max-width:262px;white-space:normal;color:#5b6b85;line-height:1.7}
.img-preview{width:48px;height:40px;padding:0;min-height:0;border-radius:8px;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;cursor:zoom-in}
.img-preview img{pointer-events:none}
.img-modal{position:fixed;inset:0;z-index:1400;background:rgba(8,18,38,.62);display:flex;align-items:center;justify-content:center;padding:22px;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.img-modal[hidden]{display:none}
.img-modal-card{background:#fff;border-radius:18px;max-width:min(760px,100%);max-height:90vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 30px 80px rgba(4,14,32,.45)}
.img-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
.img-modal-head b{font-size:13px;color:#1d3357}
.img-modal-body{overflow:auto;padding:14px;display:grid;place-items:center;background:#f7f9fd}
.img-modal-body img{max-width:100%;max-height:70vh;border-radius:10px;box-shadow:0 10px 30px rgba(15,30,60,.18)}

/* تقویم شمسی شناور و دکمه آن کنار همه فیلدهای تاریخ */
.date-picker-wrap{position:relative;display:block;min-width:0}
.date-picker-wrap .date-input{padding-left:38px}
.date-picker-btn{position:absolute;left:5px;top:50%;transform:translateY(-50%);width:28px;height:30px;padding:0;border:1px solid #dfe6ff;background:#f4f7ff;color:#4b64c5;border-radius:8px;cursor:pointer;font-size:14px;line-height:1;display:grid;place-items:center}
.date-picker-btn:hover{background:#e8efff;border-color:#c7d5fa}
.jdp{position:fixed;z-index:1500;width:302px;max-width:94vw;background:#fff;border:1px solid #dbe5f4;border-radius:16px;box-shadow:0 22px 55px rgba(16,38,80,.22);padding:10px 12px 12px;direction:rtl}
.jdp[hidden]{display:none}
.jdp-head{display:flex;align-items:center;gap:4px;margin-bottom:8px}
.jdp-head button{width:30px;height:30px;border:1px solid #e1e9f6;background:#f6f9ff;color:#4b64c5;border-radius:9px;cursor:pointer;font-size:16px;line-height:1;display:grid;place-items:center;font-family:inherit}
.jdp-head button:hover{background:#eaf1ff}
.jdp-title{flex:1;text-align:center;line-height:1.2}
.jdp-title b{display:block;font-size:14px;color:#16294a}
.jdp-title small{display:block;font-size:10.5px;color:#7b8bab;font-weight:700}
.jdp-week,.jdp-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.jdp-week span{text-align:center;font-size:10.5px;color:#7b8bab;font-weight:700;padding:2px 0}
.jdp-grid{margin:4px 0 8px}
.jdp-blank{height:30px}
.jdp-day{height:30px;border:0;background:#f0f4fb;color:#27374f;border-radius:8px;font:600 12px Vazirmatn,Tahoma,sans-serif;cursor:pointer;display:grid;place-items:center}
.jdp-day:hover{background:#e1eaff;color:#1d3f9e}
.jdp-day.today{box-shadow:inset 0 0 0 1.5px #6d8cf0}
.jdp-day.sel{background:linear-gradient(135deg,#5d78e8,#3f5fd0);color:#fff;box-shadow:0 6px 14px rgba(63,95,208,.32)}
.jdp-foot{display:flex;gap:6px;border-top:1px dashed #e2eaf6;padding-top:8px}
.jdp-foot button{flex:1;border:1px solid #e1e9f6;background:#f7f9ff;color:#3f56a8;border-radius:9px;padding:6px 4px;font:600 11px Vazirmatn,Tahoma,sans-serif;cursor:pointer}
.jdp-foot button:hover{background:#eaf1ff}

/* ==== نسخه 0.9.1: صفحه ثبت ورود/خروج؛ دکمه‌های هم‌اندازه و ستون اطلاعات عریض‌تر ==== */
.de-page{display:flex;flex-direction:column;gap:12px;min-width:0}
.de-switch{display:flex;justify-content:center;align-items:stretch;gap:12px;margin:2px 0 0}
.de-big{flex:1 1 0;max-width:380px;min-height:46px;display:flex;align-items:center;justify-content:center;gap:10px;border-radius:11px;color:#fff;text-decoration:none;font-weight:800;font-size:14px;letter-spacing:.2px;box-shadow:0 8px 20px rgba(16,38,80,.16);transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;border:1px solid rgba(255,255,255,.3)}
.de-big:hover{transform:translateY(-1px);box-shadow:0 13px 28px rgba(16,38,80,.22);filter:brightness(1.03)}
.de-big.active{box-shadow:0 0 0 2px #fff,0 0 0 5px rgba(88,120,232,.32),0 13px 28px rgba(16,38,80,.2)}
.de-big-ico{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.22);font-size:15px;line-height:1;flex:none}
.de-big-label{display:flex;flex-direction:column;align-items:flex-start;line-height:1.28;text-align:right;min-width:0}
.de-big-label b{font-size:14.5px;font-weight:800}
.de-big-label small{font-size:10.5px;font-weight:600;opacity:.9;white-space:nowrap}
.de-in{background:linear-gradient(135deg,#22c55e,#15803d)}
.de-out{background:linear-gradient(135deg,#ef4444,#b91c1c)}
.de-move{background:linear-gradient(135deg,#8b5cf6,#5b21b6)}
.de-subbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:2px}
.de-mode-chip{font-size:11.5px;font-weight:700;color:#41527a;background:#eef3fb;border:1px solid #e0e8f4;border-radius:999px;padding:4px 12px}
.de-subbar-links{display:flex;gap:8px;flex-wrap:wrap}
.de-subbar-links .soft{min-height:36px;padding:7px 14px;font-size:12px;border-radius:9px}
.de-form{display:flex;flex-direction:column;gap:12px;min-width:0}
.de-shell{display:grid;grid-template-columns:minmax(500px,560px) minmax(0,1fr);gap:16px;align-items:stretch;min-width:0}
.de-side{display:flex;flex-direction:column;gap:12px;min-width:0}
.de-card{position:relative;overflow:hidden;background:linear-gradient(180deg,#fff,#fbfdff);border:1px solid #c9d6e6;border-radius:12px;box-shadow:0 10px 26px rgba(24,39,75,.07);padding:14px 16px;display:flex;flex-direction:column;min-width:0;transition:box-shadow .18s ease,border-color .18s ease}
.de-card::before{content:"";position:absolute;inset:0 0 auto 0;height:3px;background:linear-gradient(90deg,#5878e8,#20b6a2)}
.de-head-card::before{background:linear-gradient(90deg,#3b82f6,#60a5fa)}
.de-filter-card::before{background:linear-gradient(90deg,#14b8a6,#2dd4bf)}
.de-results-card::before{background:linear-gradient(90deg,#7c3aed,#a78bfa)}
.de-items-card::before{background:linear-gradient(90deg,#5d78e8,#20b6a2)}
.de-card:hover{box-shadow:0 14px 34px rgba(24,39,75,.11);border-color:#b8c8de}
.de-card h3{font-size:14px;font-weight:800;color:#0f1c33;margin:0;line-height:1.35}
.de-card-title{display:flex;align-items:center;gap:9px;min-width:0}
.de-card-ico{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:linear-gradient(135deg,#eef3ff,#dfe8ff);border:1px solid #dbe5f7;color:#3f5fd0;font-size:15px;flex:none}
.de-card-head{display:flex;align-items:center;gap:10px;justify-content:space-between;flex-wrap:wrap;margin-bottom:8px}
.de-card-head h3{margin:0}
.de-count{font-size:10.5px;font-weight:700;color:#5b6d8c;background:#eef3fb;border:1px solid #e2eaf5;border-radius:999px;padding:3px 9px;white-space:nowrap}
.de-head-card .de-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;margin-top:12px}
.de-head-card .field span,.de-filter-card .field span{font-size:11.5px}
.de-head-card .field input,.de-head-card .field select,.de-filter-card .field input,.de-filter-card .field select{min-height:42px;padding:9px 11px;border-radius:10px;font-size:13px;background:#fdfefe}
.de-head-card .de-field-note{grid-column:1/-1}
.de-filter-card .de-filters{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.de-check{display:flex;align-items:center;gap:8px;font-size:12.5px;color:#40506c;font-weight:600;cursor:pointer}
.de-results-card{flex:1;min-height:260px}
.de-results-body{flex:1;overflow:auto;border:1px solid #dfe7f2;border-radius:10px;background:#fff;max-height:470px}
.de-results-table{min-width:0!important;width:100%;table-layout:fixed;border-collapse:collapse}
.de-results-table thead th{position:sticky;top:0;z-index:1;background:linear-gradient(180deg,#f6f9ff,#eef4fc);font-size:11.5px;color:#4a5d7c}
.de-results-table td,.de-results-table th{padding:7px 7px;font-size:11.5px}
.de-results-table th:nth-child(1),.de-results-table td:nth-child(1){width:84px}
.de-results-table th:nth-child(2),.de-results-table td:nth-child(2){overflow-wrap:anywhere}
.de-results-table th:nth-child(3),.de-results-table td:nth-child(3){width:48px}
.de-results-table th:nth-child(4),.de-results-table td:nth-child(4){width:66px;text-align:center}
.de-results-table th:nth-child(5),.de-results-table td:nth-child(5){width:68px;text-align:center}
.de-results-table tbody tr{cursor:pointer}
.de-results-table .soft.tiny{padding:2px 5px;font-size:10px;border-radius:7px;white-space:nowrap}
.de-items-card{min-height:560px;padding-bottom:12px}
.de-items-body{flex:1;overflow:auto;margin-top:4px;min-width:0;border:1px solid #dfe7f2;border-radius:10px;background:#fff}
.de-items-table{min-width:0!important;width:100%;table-layout:fixed;border-collapse:collapse}
.de-items-table thead th{position:sticky;top:0;z-index:1;background:linear-gradient(180deg,#f6f9ff,#eef4fc);font-size:11.5px;padding:9px 7px;color:#4a5d7c;text-align:center}
.de-items-table td{padding:8px 7px;vertical-align:middle;text-align:center}
.de-items-table .de-line-no{text-align:center;color:#7b8aa3;font-weight:700}
.de-items-table .de-product-select{width:100%;max-width:100%;min-height:38px;padding:7px 9px;font-size:12.5px;border-radius:9px;text-align:center;text-align-last:center}
.de-items-table .de-line-qty input{min-height:38px;width:100%;max-width:92px;padding:7px 9px;text-align:center;border-radius:9px}
.de-items-table .de-line-party,.de-items-table .de-line-src{font-size:11.5px;color:#475569;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.de-items-table th:nth-child(1),.de-items-table td:nth-child(1){width:52px}
.de-items-table th:nth-child(3),.de-items-table td:nth-child(3){width:86px}
.de-items-table th:nth-child(4),.de-items-table td:nth-child(4){width:56px;text-align:center}
.de-items-table th:nth-child(5),.de-items-table td:nth-child(5){width:72px;text-align:center}
.de-items-table th:nth-child(6),.de-items-table td:nth-child(6){width:104px;text-align:center}
.de-items-table th:nth-child(7),.de-items-table td:nth-child(7){width:104px;text-align:center}
.de-items-table th:nth-child(8),.de-items-table td:nth-child(8){width:48px;text-align:center}
.de-line-unit,.de-line-stock{font-size:12px;color:#54657f;white-space:nowrap;text-align:center}
.de-line-meta{display:block;color:#8a99b1;font-size:10px;margin-top:3px;min-height:12px}
.de-line-remove{padding:4px 9px!important;font-size:11px!important;border-radius:8px!important;color:#b23a3a;background:#fff0f0;border:1px solid #f3d7d7}
.de-items-empty{padding:26px 14px;text-align:center;color:#8a99b1;font-size:12px;border:1px dashed #dfe7f2;border-radius:10px;margin:10px}
.de-items-empty[hidden]{display:none}
.de-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:flex-start;padding:2px 0}
.de-actions .de-act{min-height:42px;border:0;border-radius:10px;color:#fff;font:700 13px Vazirmatn,Tahoma,sans-serif;cursor:pointer;padding:10px 20px;flex:1 1 0;width:170px;min-width:170px;box-shadow:0 6px 16px rgba(109,40,217,.16);transition:filter .16s ease}
.de-act:hover{filter:brightness(1.06)}
.de-act-delete{background:linear-gradient(180deg,#8b5cf6,#7c3aed)}
.de-act-draft{background:linear-gradient(180deg,#7c4ded,#6d28d9)}
.de-act-final{background:linear-gradient(180deg,#6d3fe0,#5b21b6)}
@media(max-width:1320px){.de-shell{grid-template-columns:minmax(440px,510px) minmax(0,1fr)}}
@media(max-width:1100px){.de-shell{grid-template-columns:1fr}.de-items-card{min-height:380px}.de-results-body{max-height:320px}.de-big-label small{white-space:normal}}
@media(max-width:720px){.de-switch{flex-direction:column;gap:10px}.de-big{width:100%;max-width:none}.de-actions{flex-direction:column;align-items:stretch}.de-act{width:100%;min-width:0}.de-head-card .de-fields{grid-template-columns:1fr}.de-results-table,.de-items-table{table-layout:auto}.de-results-table{min-width:430px!important}.de-items-table{min-width:680px!important}}

/* گزارش تفصیلی همگام‌سازی و خروجی CSV */
.de-sync-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:4px 0 14px}
.de-sync-kpi{background:linear-gradient(150deg,#fbfdff,#f1f6fd);border:1px solid #e0e9f5;border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:4px}
.de-sync-kpi span{font-size:11px;color:#6b7c96;font-weight:600}
.de-sync-kpi b{font-size:22px;color:#12223c}
.de-sync-kpi-warn b{color:#b45309}
.de-sync-filter{grid-template-columns:repeat(4,minmax(0,1fr));align-items:end}
.de-sync-filter-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.de-sync-table{margin-top:12px;border:1px solid var(--line);border-radius:12px}
.de-sync-table table{min-width:1080px}
.de-sync-table td{vertical-align:top}
.de-sync-detail{max-width:340px;overflow-wrap:anywhere;color:#4a5b75}
.de-origin{display:inline-block;border-radius:999px;padding:2px 9px;font-size:10.5px;font-weight:800;white-space:nowrap}
.de-origin-desktop{background:#e8f1ff;color:#2457b8;border:1px solid #cfe0fb}
.de-origin-web{background:#eafaf5;color:#0f7a5c;border:1px solid #cdeee2}
.de-status{display:inline-block;border-radius:999px;padding:2px 9px;font-size:10.5px;font-weight:700;white-space:nowrap;background:#eef2f8;color:#4a5b75}
.de-status-proposal{background:#fff6e5;color:#9a6200;border:1px solid #f4e2bb}
.de-status-recorded,.de-status-applied{background:#e9f9f2;color:#0f7a5c;border:1px solid #cdeee2}
.de-status-conflict,.de-status-rejected,.de-status-apply_error{background:#fff0f0;color:#a43e43;border:1px solid #f3d7d7}
@media(max-width:1100px){.de-sync-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.de-sync-filter{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.de-sync-kpis,.de-sync-filter{grid-template-columns:1fr}}

/* ==== V092: چیدمان فشرده تنظیمات، حذف فضای خالی و کنارِ هم قراردادن کارت‌های کوتاه ==== */
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start;margin-bottom:20px}
.settings-grid>.panel{margin-bottom:0;padding:18px 20px}
.settings-grid .inline-actions{display:flex;flex-wrap:wrap;gap:8px}
.settings-grid .form-grid{grid-template-columns:1fr}
.settings-grid .form-grid .span2{grid-column:auto}
@media(max-width:900px){.settings-grid{grid-template-columns:1fr}}
