*{box-sizing:border-box}body{margin:0;background:#f3f6fb;color:#1f2937;font-family:Tahoma,Arial,sans-serif}.shell{display:flex;min-height:calc(100vh - 44px)}aside{width:280px;background:#1f3a5f;color:white;padding:18px 14px;position:sticky;top:0;height:100vh;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.35) rgba(255,255,255,.08)}aside::-webkit-scrollbar{width:8px}aside::-webkit-scrollbar-track{background:rgba(255,255,255,.08);border-radius:10px}aside::-webkit-scrollbar-thumb{background:rgba(255,255,255,.35);border-radius:10px}.brand{font-weight:bold;font-size:18px;margin:10px 8px 25px}.nav{display:block;color:white;text-decoration:none;padding:12px 14px;border-radius:12px;margin:7px 0;background:rgba(255,255,255,.08)}.nav.active{background:#0f5132}.nav.muted{opacity:.65}main{flex:1;padding:24px;overflow-x:hidden;overflow-y:visible}header{background:white;border:1px solid #d8dee9;border-radius:16px;padding:18px 22px;margin-bottom:18px}h1{margin:0 0 8px;color:#1f3a5f}.sub{color:#64748b}.toolbar{display:flex;gap:12px;justify-content:space-between;margin-bottom:12px}.search{display:flex;gap:8px;flex:1}.search input{flex:1}.btn,button{border:0;border-radius:10px;padding:10px 16px;background:#eef2f7;color:#1f2937;text-decoration:none;cursor:pointer;font-family:Tahoma}.primary{background:#0f5132!important;color:white!important}.danger{background:#b42318;color:#fff}.small{padding:7px 10px;font-size:12px}.stats{display:flex;gap:12px;margin-bottom:12px}.stats div{background:white;border:1px solid #d8dee9;border-radius:12px;padding:12px 16px}.card,.form-card{background:white;border:1px solid #d8dee9;border-radius:16px;padding:18px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:1300px}th,td{border-bottom:1px solid #e5e7eb;padding:11px;text-align:right;white-space:nowrap}th{background:#f8fafc;color:#334155}.owner{max-width:360px;overflow:hidden;text-overflow:ellipsis}.badge{background:#e9f7ef;color:#0f5132;border-radius:999px;padding:4px 10px}.actions{display:flex;gap:6px}.actions form{display:inline}.empty{text-align:center;color:#64748b;padding:30px}.grid.two{display:grid;grid-template-columns:1fr 1fr;gap:14px 18px}.section-title{font-weight:bold;color:#1f3a5f;border-bottom:1px solid #e5e7eb;padding-bottom:10px;margin:18px 0 14px}label{display:flex;flex-direction:column;gap:7px;color:#334155}label span{font-size:12px;color:#64748b}input,select{border:1px solid #cbd5e1;border-radius:10px;padding:10px 12px;font-family:Tahoma;background:white;font-size:14px}input[readonly]{background:#f3f4f6}.plate-box{display:flex;align-items:center;justify-content:center;gap:12px;border:2px solid #1f3a5f;border-radius:16px;background:#fff;padding:12px;max-width:620px;margin:auto;direction:ltr}.blue{background:#153b7a;color:white;border-radius:8px;padding:8px 10px;text-align:center;font-weight:bold;line-height:1.4}.plate-in{width:76px;text-align:center;font-size:28px;font-weight:bold;padding:8px}.plate-in.wide{width:105px}.plate-letter{width:90px;text-align:center;font-size:22px;font-weight:bold}.iran{font-weight:bold;font-size:18px}.checks{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.checks label{flex-direction:row;align-items:center;background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:10px}.form-actions{display:flex;gap:10px;margin-top:22px}.messages{margin:12px 0}.msg{padding:10px 14px;border-radius:10px;margin-bottom:8px}.msg.error{background:#fff1f0;color:#b42318}.msg.ok{background:#ecfdf3;color:#0f5132}@media(max-width:900px){.shell{display:block}aside{height:auto;width:auto;position:static}.grid.two{grid-template-columns:1fr}.checks{grid-template-columns:1fr}.toolbar{flex-direction:column}}
.invalid-date{border-color:#dc2626!important;background:#fff7f7!important;box-shadow:0 0 0 2px rgba(220,38,38,.08)!important}
.date-error{display:block;color:#dc2626;font-size:12px;margin-top:6px;min-height:16px;text-align:right}

/* نسخه جمع‌وجورتر مدیریت خودرو */
.nav-group{margin:7px 0}.nav.parent{display:flex;align-items:center;justify-content:space-between;margin-bottom:0}.chev{font-size:13px;opacity:.85}.submenu{display:block;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);border-radius:0 0 14px 14px;margin:-2px 6px 8px;padding:7px}.subnav{display:block;color:#eef6ff;text-decoration:none;padding:10px 12px;border-radius:10px;font-size:13px}.subnav:hover{background:rgba(255,255,255,.12)}
.car-modern{padding:16px;background:linear-gradient(180deg,#fff,#f8fbff);border-radius:18px}.form-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px;padding:12px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px}.form-kicker{color:#0f5132;font-weight:bold;font-size:12px;margin-bottom:4px}.form-topbar h2{margin:0 0 4px;color:#1f3a5f;font-size:21px}.form-topbar p{margin:0;color:#64748b;font-size:13px}.quick-actions{display:flex;gap:8px;white-space:nowrap}.car-layout{display:grid;grid-template-columns:minmax(0,1fr) 520px;gap:14px;align-items:start}.car-layout.second-row{grid-template-columns:1fr 1fr;margin-top:14px}.panel{background:white;border:1px solid #dbe3ef;border-radius:18px;padding:14px;box-shadow:0 8px 24px rgba(15,35,70,.05)}.panel-title{display:flex;align-items:center;gap:8px;font-weight:bold;color:#1f3a5f;margin-bottom:12px}.panel-title span{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:9px;background:#e9f7ef;color:#0f5132}.compact-grid{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:10px 12px}.compact-grid label,.small-gap label{gap:5px;font-size:13px}.compact-grid input,.compact-grid select,.small-gap select,.small-gap input{padding:9px 10px;border-radius:11px}.main-panel{min-height:0}.plate-panel{align-self:stretch}.modern-plate{max-width:none;margin:4px 0 8px;padding:10px;transform:scale(.92);transform-origin:center}.plate-hint{font-size:12px;color:#64748b;text-align:center;margin-top:2px}.dates-grid{grid-template-columns:repeat(3,1fr)}.docs-panel{margin-top:14px}.modern-checks{grid-template-columns:repeat(6,1fr)}.modern-checks label{justify-content:center;min-height:44px;background:#f8fafc}.sticky-actions{position:sticky;bottom:12px;margin-top:14px;padding:10px;background:rgba(255,255,255,.92);backdrop-filter:blur(8px);border:1px solid #e2e8f0;border-radius:16px;display:flex;gap:10px;justify-content:flex-start;box-shadow:0 10px 30px rgba(15,35,70,.12)}
@media(max-width:1200px){.car-layout,.car-layout.second-row{grid-template-columns:1fr}.compact-grid{grid-template-columns:repeat(2,1fr)}.modern-checks{grid-template-columns:repeat(3,1fr)}.modern-plate{transform:none}}
@media(max-width:700px){.form-topbar{flex-direction:column;align-items:stretch}.quick-actions{justify-content:flex-start}.compact-grid,.dates-grid{grid-template-columns:1fr}.modern-checks{grid-template-columns:1fr}.plate-box{gap:6px}.plate-in{width:58px;font-size:20px}.plate-in.wide{width:78px}.plate-letter{width:70px;font-size:18px}}

/* جستجوی هوشمند مالک در مدیریت خودرو */
.owner-smart-grid{align-items:start}.smart-person{position:relative}.person-search{width:100%;padding-left:36px;background:#fff}.person-search:focus{border-color:#0f5132;box-shadow:0 0 0 3px rgba(15,81,50,.10);outline:none}.person-search.invalid-smart{border-color:#dc2626;background:#fff7f7}.person-dropdown{display:none;position:absolute;z-index:50;top:calc(100% + 6px);right:0;left:0;max-height:260px;overflow:auto;background:#fff;border:1px solid #cbd5e1;border-radius:14px;box-shadow:0 18px 40px rgba(15,35,70,.18);padding:6px}.smart-person.open .person-dropdown{display:block}.person-option{padding:10px 12px;border-radius:11px;cursor:pointer;border-bottom:1px solid #f1f5f9}.person-option:last-child{border-bottom:0}.person-option:hover{background:#e9f7ef}.person-option b{display:block;color:#1f3a5f;margin-bottom:4px}.person-option small{display:block;color:#64748b;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.person-empty{padding:14px;text-align:center;color:#64748b}.smart-hint{display:block;color:#64748b;font-size:11px;margin-top:5px}.smart-person::after{content:'🔎';position:absolute;left:10px;top:9px;opacity:.55;pointer-events:none}

/* اطلاعات تکمیلی مدیریت افراد */
.subsection-title{font-weight:bold;color:#1f3a5f;border-right:4px solid #0f5132;padding:8px 12px;background:#f8fafc;border-radius:12px;margin:4px 0 12px}
.details-card{margin-top:16px;border:1px solid #dbe3ef;border-radius:16px;background:#fbfdff;padding:12px}
.details-card summary{cursor:pointer;font-weight:bold;color:#1f3a5f;padding:4px 2px 12px;list-style:none}
.details-card summary::-webkit-details-marker{display:none}
.extra-grid{margin-top:4px}.field.wide{grid-column:span 2}.field label{font-size:13px;color:#334155;margin-bottom:6px}.field textarea{width:100%;border:1px solid #cbd5e1;border-radius:10px;padding:10px 12px;font-family:Tahoma;background:white;font-size:14px;resize:vertical;min-height:44px}.tablewrap{overflow:auto}.truncate{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:900px){.field.wide{grid-column:span 1}}

/* جستجوی آنلاین و ترتیب نمایش افراد */
.people-controls{display:grid;grid-template-columns:minmax(260px,1fr) 260px auto;gap:12px;align-items:end;margin-bottom:12px}
.people-controls label{font-size:13px;color:#334155;margin-bottom:6px;display:block}.people-controls input,.people-controls select{width:100%}.live-search-box small{display:block;color:#64748b;font-size:11px;margin-top:5px}.order-box select{background:#fff}.loading-table{opacity:.55;transition:opacity .15s}.muted{text-align:center;color:#64748b;padding:24px!important}
@media(max-width:900px){.people-controls{grid-template-columns:1fr}}
.import-box{display:grid;gap:10px;max-width:560px;margin-bottom:16px}
.import-box input[type=file]{padding:10px;border:1px solid #ddd;border-radius:10px;background:#fff}
.import-summary{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
.import-actions{margin:10px 0;gap:8px;display:flex;flex-wrap:wrap}
.badge.ok{background:#e8fff1;color:#087a35;border:1px solid #bff0cf}
.badge.danger{background:#fff0f0;color:#b00020;border:1px solid #ffc7c7}
tr.row-error td{background:#fff8f8}
tr.row-ok td{background:#fbfffb}

/* منوی اصلی مدیریت اطلاعات سیستم */
.system-menu .system-submenu{padding:8px 7px 10px}.submenu-section{background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.08);border-radius:13px;margin:7px 0;padding:8px}.submenu-title{font-weight:bold;color:#fff;padding:7px 9px 8px;font-size:13px;display:flex;align-items:center;gap:6px}.nested-submenu{border-right:2px solid rgba(255,255,255,.20);margin-right:8px;padding-right:7px}.nested-submenu .subnav{font-size:12.5px;padding:9px 10px;margin:2px 0;background:rgba(255,255,255,.035)}.nested-submenu .subnav:hover{background:rgba(255,255,255,.14)}

.issue-location-picker .location-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.issue-location-picker .hint{
  display:block;
  color:#6b7280;
  margin-top:6px;
  font-size:16px;
}
.issue-location-picker input[disabled]{
  background:#f3f4f6;
  color:#9ca3af;
  cursor:not-allowed;
}
.issue-location-picker .invalid-smart{
  border-color:#dc2626 !important;
  box-shadow:0 0 0 3px rgba(220,38,38,.08);
}
@media (max-width:720px){
  .issue-location-picker .location-row{grid-template-columns:1fr;}
}

/* قرارداد اقساط */
.installment-layout{display:grid;grid-template-columns:1.2fr .8fr;gap:14px;align-items:start;margin-bottom:14px}.installment-layout.second-row{grid-template-columns:1fr 1fr}.calc-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px}.calc-cards div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:12px}.calc-cards small{display:block;color:#64748b;margin-bottom:6px}.calc-cards b{font-size:18px;color:#1f3a5f}.hint{color:#64748b;font-size:12px}.inline-radios{display:flex;gap:18px;margin:8px 0 12px}.inline-radios label{flex-direction:row;align-items:center}.partners-box select{width:100%;min-height:120px}.smart-id-person{position:relative}.person-id-search{width:100%}.person-id-dropdown{display:none;position:absolute;z-index:90;top:calc(100% + 6px);right:0;left:0;max-height:260px;overflow:auto;background:#fff;border:1px solid #cbd5e1;border-radius:14px;box-shadow:0 18px 40px rgba(15,35,70,.18);padding:6px}.smart-id-person.open .person-id-dropdown{display:block}.person-id-option{padding:10px 12px;border-radius:10px;cursor:pointer;border-bottom:1px solid #f1f5f9}.person-id-option:hover{background:#e9f7ef}.variable-installments-table input{min-width:160px}.accounting-menu .submenu{padding:8px 7px 10px}@media(max-width:1000px){.installment-layout,.installment-layout.second-row{grid-template-columns:1fr}.calc-cards{grid-template-columns:1fr}}


/* صفحه خانه و خوش‌آمدگویی */
.home-link{background:linear-gradient(135deg,#0f5132,#146c43)!important;color:#fff!important;font-weight:bold;text-align:center}
.home-hero{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:20px;align-items:stretch;margin-bottom:18px;background:linear-gradient(135deg,#10213a,#1f3a5f 55%,#0f5132);border-radius:24px;padding:22px;border:1px solid rgba(255,255,255,.12);box-shadow:0 18px 45px rgba(15,35,70,.18);overflow:hidden;position:relative}
.home-hero::before{content:'';position:absolute;inset:-120px auto auto -120px;width:320px;height:320px;background:rgba(255,178,54,.16);border-radius:50%;filter:blur(6px)}
.hero-text{position:relative;z-index:1;color:#fff;padding:10px 8px}.hero-kicker{display:inline-block;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);padding:7px 12px;border-radius:999px;font-size:12px;margin-bottom:14px;color:#ffe8bd}.hero-text h2{margin:0 0 12px;font-size:32px;color:#fff}.hero-text p{margin:0;line-height:2;color:#e8eef7;max-width:780px}.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.hero-actions .btn{background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.18)}.hero-actions .primary{background:#f59e0b!important;color:#1b1f24!important;font-weight:bold}.hero-logo-card{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.12);border-radius:22px;padding:14px;min-height:260px}.hero-logo-card img{max-width:100%;max-height:300px;object-fit:contain;filter:drop-shadow(0 18px 25px rgba(0,0,0,.35))}.home-stats{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:14px;margin-bottom:18px}.home-stat-card{background:#fff;border:1px solid #d8dee9;border-radius:18px;padding:18px;box-shadow:0 10px 26px rgba(15,35,70,.06)}.home-stat-num{font-size:26px;font-weight:bold;color:#1f3a5f;margin-bottom:8px}.home-stat-label{color:#64748b}.quick-panel{display:grid;grid-template-columns:1fr 1fr;gap:14px}.quick-card{background:#fff;border:1px solid #d8dee9;border-radius:18px;padding:18px}.quick-card h3{margin:0 0 14px;color:#1f3a5f}.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.quick-grid a{display:block;text-decoration:none;color:#1f2937;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:12px}.quick-grid a:hover{border-color:#0f5132;background:#e9f7ef}.muted-text{color:#64748b;line-height:2;margin:0}@media(max-width:1100px){.home-hero{grid-template-columns:1fr}.hero-logo-card{min-height:220px}.home-stats{grid-template-columns:repeat(2,1fr)}.quick-panel{grid-template-columns:1fr}}@media(max-width:640px){.home-stats,.quick-grid{grid-template-columns:1fr}.hero-text h2{font-size:24px}}
.badge{display:inline-block;padding:5px 10px;border-radius:999px;background:#eef3ff;color:#173b77;font-weight:700;font-size:12px}.actions{min-width:310px}.inline-form{display:inline-flex;gap:6px;align-items:center;margin:2px}.inline-form select{min-width:105px;padding:6px;border:1px solid #ddd;border-radius:8px}.btn.small{padding:6px 10px;font-size:12px}.btn.danger{background:#c0392b;color:#fff}.btn.light{background:#f2f4f7;color:#111}.empty{text-align:center;color:#777;padding:25px}.section-title{grid-column:1/-1;font-weight:800;color:#0f3d75;border-bottom:1px solid #e5e7eb;padding:8px 0;margin-top:8px}.req{color:#d11}.field-error{font-size:12px;color:#b00020;margin-top:4px;min-height:16px}.full{grid-column:1/-1}.form-actions{display:flex;gap:10px;justify-content:flex-start;margin-top:10px}textarea{width:100%;box-sizing:border-box;border:1px solid #d7dce2;border-radius:10px;padding:10px;font-family:inherit} .grid-form select{width:100%;box-sizing:border-box;border:1px solid #d7dce2;border-radius:10px;padding:10px;font-family:inherit;background:white}

/* عملیات مالی */
.amount{font-weight:700;color:#0f5132}.receipt-a5{max-width:760px;background:white;border:1px solid #d8dee9;border-radius:18px;padding:24px;margin:auto;box-shadow:0 12px 35px rgba(15,35,70,.08)}.receipt-head{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #1f3a5f;padding-bottom:14px;margin-bottom:18px}.receipt-head h2{margin:0;color:#1f3a5f}.receipt-head p{margin:6px 0 0;color:#64748b}.receipt-table{min-width:0;width:100%;border:1px solid #e5e7eb}.receipt-table th{width:130px;background:#f8fafc;color:#334155}.receipt-table td,.receipt-table th{border:1px solid #e5e7eb;padding:12px}.receipt-signs{display:flex;justify-content:space-between;margin-top:55px;color:#334155}.bank-field,.cashbox-field{transition:.15s}
@media print{body{background:white}.shell{display:block}aside,header,.no-print,.messages{display:none!important}main{padding:0}.receipt-a5{box-shadow:none;border:0;border-radius:0;max-width:none}.receipt-table{font-size:13px}@page{size:A5 landscape;margin:12mm}}


/* v24 اصلاح منو و مانده حساب */
aside{width:315px;min-width:315px;max-width:315px;height:100vh;overflow-y:auto!important;overflow-x:hidden!important;padding-bottom:30px}
main{min-width:0}.submenu-section{margin-bottom:10px}.nested-submenu .subnav{white-space:normal;line-height:1.6}.balance-pill{display:inline-block;margin-right:6px;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:700;vertical-align:middle}.balance-pill.debit{background:#fff1f0;color:#b42318;border:1px solid #ffd1cc}.balance-pill.credit{background:#ecfdf3;color:#087a35;border:1px solid #b7ebc6}.balance-pill.zero{background:#eef2f7;color:#475569;border:1px solid #d8dee9}
@media(max-width:900px){aside{width:auto;min-width:0;max-width:none;height:auto;max-height:70vh}}

/* v26 منوی کلیکی شاخه‌ای */
.nav-toggle,
.section-toggle{
  width:100%;
  border:0;
  font-family:Tahoma,Arial,sans-serif;
  cursor:pointer;
  text-align:right;
}
.nav.parent.nav-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:white;
  padding:12px 14px;
  border-radius:12px;
  margin:7px 0;
  background:rgba(255,255,255,.08);
  font-size:14px;
}
.nav-group.open > .nav.parent.nav-toggle{
  background:#0f5132;
}
.nav-group > .submenu{
  display:none;
}
.nav-group.open > .submenu{
  display:block;
}
.submenu-section > .nested-submenu{
  display:none;
}
.submenu-section.open > .nested-submenu{
  display:block;
}
.section-toggle.submenu-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:transparent;
  color:#fff;
  padding:8px 9px;
  font-weight:bold;
  font-size:13px;
  border-radius:10px;
}
.submenu-section.open > .section-toggle.submenu-title{
  background:rgba(255,255,255,.10);
}
.nav-toggle .chev,
.section-toggle .chev{
  transition:transform .15s ease;
  opacity:.85;
  margin-right:auto;
  padding-right:8px;
}
.nav-group.open > .nav-toggle .chev,
.submenu-section.open > .section-toggle .chev{
  transform:rotate(90deg);
}
.subnav.active-subnav{
  background:rgba(255,255,255,.18)!important;
  border-right:3px solid #f59e0b;
  font-weight:bold;
}

/* v27 فرم دریافت چک شبیه نسخه ویندوزی */
.check-form-card{background:#eef3f8;border-color:#cfd8e3;padding:16px}.check-windows-form{display:block}.check-row{display:grid;gap:16px;margin-bottom:14px}.check-row.two-cols{grid-template-columns:1fr 1fr}.check-row.three-cols{grid-template-columns:1fr 1fr 1fr}.check-row.optional-row{grid-template-columns:1fr 1fr 1fr}.check-windows-form label{font-weight:600;color:#344866}.check-windows-form input,.check-windows-form select,.check-windows-form textarea{background:#fff;border:1px solid #aeb9c6;border-radius:3px;padding:10px 12px}.check-windows-form textarea{min-height:130px}.check-boxset{border:1px solid #aeb9c6;background:#f5f8fb;border-radius:4px;margin:12px 0 14px;padding:14px}.check-boxset legend{font-weight:800;color:#344866;padding:0 8px}.radio-line{display:flex;gap:18px;justify-content:flex-start;align-items:center;margin:4px 0 12px}.radio-choice,.check-inline{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;font-weight:600}.radio-choice input,.check-inline input{width:auto}.party-panel{margin-top:8px}.category-inline{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}.category-inline .btn{white-space:nowrap}.check-actions{justify-content:flex-start;border-top:1px solid #d8dee9;padding-top:14px}.check-topbar h2{font-size:28px}.smart-select{min-height:42px}@media(max-width:900px){.check-row.two-cols,.check-row.three-cols,.check-row.optional-row{grid-template-columns:1fr}.category-inline{grid-template-columns:1fr}.radio-line{flex-direction:column;align-items:flex-start}}

/* v31 global smart person picker */
.person-id-search.invalid-smart{border-color:#dc2626!important;background:#fff7f7!important;}
.person-id-empty{padding:12px;text-align:center;color:#64748b;font-size:12px;}
.person-id-footer{display:block;margin-top:6px;padding:10px 12px;border-radius:10px;background:#f8fafc;color:#0f5132;text-decoration:none;font-weight:700;border:1px dashed #9cc3b2;}
.person-id-footer:hover{background:#e9f7ef;}
.global-person-picker .person-id-search{padding-left:36px;}
.global-person-picker:after{content:'🔎';position:absolute;left:10px;top:9px;opacity:.55;pointer-events:none;}

.smart-check-picker{position:relative}
.check-dropdown{display:none;position:absolute;z-index:50;left:0;right:0;top:100%;background:#fff;border:1px solid #cbd5e1;border-radius:12px;box-shadow:0 10px 24px rgba(15,23,42,.12);max-height:260px;overflow:auto;margin-top:4px;text-align:right}
.smart-check-picker.open .check-dropdown{display:block}
.check-option,.check-empty{padding:10px 12px;cursor:pointer;border-bottom:1px solid #eef2f7;font-size:13px}
.check-option:hover{background:#eef6ff}
.check-empty{color:#64748b;cursor:default}
.selected-row { outline: 2px solid #0b5d3b; background: #eefaf4 !important; }
.compact-toolbar { justify-content: space-between; align-items: center; gap: 12px; }
.small-text { font-size: 12px; margin-top: 4px; }
.guarantee-page .card:target { outline: 2px solid #0b5d3b; }

/* Windows-like installment contracts page */
.windows-like-page{direction:rtl}
.page-center-title{text-align:center;margin:8px 0 12px;font-size:28px;font-weight:800;color:#0f2940}
.page-side-title{text-align:right;margin:18px 6px 8px;font-size:20px;font-weight:800;color:#0f2940}
.win-filterbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;flex-wrap:wrap}
.win-filter-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
.win-filter-form input{height:34px;min-width:220px;border:1px solid #c7d4e4;border-radius:6px;padding:4px 8px;background:#fff}
.win-table-card{padding:0;border-radius:4px;overflow:hidden}
.win-fixed-table{overflow:auto;border:1px solid #adb8c5;background:#fff}
.top-contract-table{height:260px;min-height:260px}
.bottom-installment-table{height:360px;min-height:360px;max-height:360px;overflow-y:auto;overflow-x:auto;scrollbar-width:thin}
.win-fixed-table table{min-width:1250px;margin:0}
.win-fixed-table thead th{position:sticky;top:0;z-index:2;background:#e9eef3;color:#17365a;border:1px solid #aab4c0;text-align:center;white-space:nowrap}
.win-fixed-table td{white-space:nowrap;text-align:center;border-bottom:1px solid #eef1f4}
.clickable-row{cursor:pointer}
.selected-row td{background:#4f718b!important;color:#fff!important}
.selected-row .badge{background:#eef6ff;color:#123}
.selected-row .muted{color:#eef!important}
.win-separator{border-top:2px solid #aeb8c3;margin:12px 0 18px}
.installment-actionbar{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0 6px}
.installment-actionbar form{display:inline;margin:0}
.installment-actionbar .btn{font-weight:700;min-width:94px;text-align:center}
.btn.success{background:#198754;color:#fff}
.btn.blue{background:#1769d5;color:#fff}
.btn.purple{background:#7b2cff;color:#fff}
.btn.slate{background:#637083;color:#fff}
.btn.brown{background:#8a3b18;color:#fff}
.btn.dark{background:#122033;color:#fff}
.btn.teal{background:#169b89;color:#fff}
.selected-contract-caption{padding:8px 10px;background:#f8fafc;border-bottom:1px solid #dce5ee;font-weight:700}

/* فرم شبیه نسخه ویندوز برای سند دریافت/پرداخت */
.money-doc-form{max-width:980px;margin:auto}.windows-like-form{display:flex;flex-direction:column;gap:14px}.win-fieldset{border:1px solid #b8c0cc;border-radius:4px;padding:18px 20px 16px;background:#fff}.win-fieldset legend{font-weight:800;color:#1f3a5f;padding:0 8px}.person-line{display:grid;grid-template-columns:1fr;gap:8px}.win-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px 24px;align-items:end}.win-grid-1{display:grid;grid-template-columns:1fr;gap:10px}.smart-id-cashbox{position:relative}.cashbox-id-search{width:100%}.cashbox-id-dropdown{display:none;position:absolute;z-index:90;top:calc(100% + 6px);right:0;left:0;max-height:230px;overflow:auto;background:#fff;border:1px solid #cbd5e1;border-radius:12px;box-shadow:0 18px 40px rgba(15,35,70,.18);padding:6px}.smart-id-cashbox.open .cashbox-id-dropdown{display:block}.cashbox-id-option{padding:10px 12px;border-radius:10px;cursor:pointer;border-bottom:1px solid #f1f5f9}.cashbox-id-option:hover{background:#e9f7ef}.cashbox-id-option small,.person-id-option small{display:block;color:#64748b;margin-top:3px}.invalid-smart{border-color:#dc2626!important;box-shadow:0 0 0 2px rgba(220,38,38,.12)}@media(max-width:900px){.win-grid-2{grid-template-columns:1fr}}
/* رسید شکیل‌تر شبیه نسخه ویندوز */
.classy-receipt{position:relative;overflow:hidden;border:1px solid #cbd5e1;background:linear-gradient(180deg,#fff 0%,#fdfdfd 100%);}
.receipt-watermark{position:absolute;left:30px;top:110px;font-size:86px;font-weight:900;color:rgba(15,58,95,.035);transform:rotate(-18deg);pointer-events:none}
.receipt-head.fancy{border-bottom:3px double #1f3a5f;gap:16px;align-items:stretch}.receipt-title-block h2{font-size:30px;margin:2px 0;color:#112d4e}.receipt-kicker{font-size:13px;color:#0f5132;font-weight:800;letter-spacing:.5px}.receipt-no-box{min-width:150px;border:1px solid #d7dee8;border-radius:12px;background:#f8fafc;padding:10px 14px;text-align:center}.receipt-no-box span{display:block;color:#64748b;font-size:12px;margin-bottom:6px}.receipt-no-box b{font-size:18px;color:#0f172a}.receipt-amount-box{margin:16px 0;border:2px solid #0f5132;border-radius:14px;background:#f0fff7;padding:12px 18px;display:flex;align-items:baseline;gap:10px;justify-content:center}.receipt-amount-box span{color:#0f5132;font-weight:800}.receipt-amount-box strong{font-size:28px;color:#064e3b}.receipt-amount-box small{color:#0f5132}.receipt-modern-table{border-collapse:collapse;background:#fff}.receipt-modern-table th{background:#eef4fb;color:#102a43;font-weight:900}.receipt-modern-table td{color:#0f172a}.fancy-signs{margin-top:64px}.fancy-signs span{display:block;width:180px;border-top:1px solid #334155;margin-bottom:8px}
@media print{.classy-receipt{background:#fff!important}.receipt-amount-box{break-inside:avoid}.receipt-watermark{display:block}}

/* --- v19: A5 one-page professional receipt --- */
.print-helper{max-width:760px;margin:0 auto 10px auto;background:#fff7ed;border:1px solid #fed7aa;color:#7c2d12;border-radius:12px;padding:10px 14px;font-size:13px}
.receipt-one-page{width:198mm;max-width:198mm;min-height:auto;box-sizing:border-box;padding:11mm 12mm;margin:0 auto;border:1px solid #b8c2d2;border-radius:12px;box-shadow:0 10px 28px rgba(15,35,70,.08);page-break-inside:avoid;break-inside:avoid;overflow:hidden}
.receipt-topline{display:flex;justify-content:space-between;align-items:center;color:#64748b;font-size:12px;margin-bottom:8px}
.receipt-one-page .receipt-head.fancy{margin-bottom:10px;padding-bottom:10px;align-items:center}
.receipt-one-page .receipt-title-block{text-align:right;flex:1}.receipt-one-page .receipt-title-block h2{font-size:28px;line-height:1.05}.receipt-one-page .receipt-title-block p{margin:3px 0 0}.receipt-one-page .receipt-no-box{min-width:125px;padding:8px 10px}.receipt-one-page .receipt-no-box b{font-size:17px}.receipt-one-page .receipt-amount-box{margin:10px 0 6px;padding:8px 14px}.receipt-one-page .receipt-amount-box strong{font-size:26px}.amount-words{text-align:center;font-weight:800;color:#334155;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:10px;padding:6px 10px;margin-bottom:10px}.compact-receipt-table td,.compact-receipt-table th{padding:8px 10px;font-size:13px}.compact-receipt-table th{width:112px}.receipt-one-page .fancy-signs{margin-top:34px}.receipt-one-page .fancy-signs span{width:170px}.receipt-one-page .receipt-watermark{top:95px;left:38px;font-size:92px;color:rgba(15,58,95,.028);z-index:0}.receipt-one-page>*:not(.receipt-watermark){position:relative;z-index:1}

@media print{
  html,body{width:210mm;height:148mm;background:white!important;overflow:hidden!important}
  body{margin:0!important;padding:0!important}
  .shell{display:block!important;min-height:0!important;background:white!important}
  aside,header,.no-print,.messages,.print-helper{display:none!important}
  main{padding:0!important;margin:0!important;background:white!important;overflow:hidden!important}
  .receipt-one-page{width:198mm!important;max-width:198mm!important;height:136mm!important;margin:0 auto!important;padding:6mm 8mm!important;border:1px solid #94a3b8!important;border-radius:0!important;box-shadow:none!important;page-break-after:avoid!important;page-break-before:avoid!important;page-break-inside:avoid!important;break-inside:avoid!important;overflow:hidden!important}
  .receipt-topline{font-size:10px!important;margin-bottom:4px!important}.receipt-one-page .receipt-head.fancy{padding-bottom:5px!important;margin-bottom:6px!important;border-bottom:2px solid #1f3a5f!important}.receipt-one-page .receipt-title-block h2{font-size:23px!important}.receipt-one-page .receipt-title-block p,.receipt-kicker{font-size:10px!important}.receipt-one-page .receipt-no-box{min-width:102px!important;padding:5px 7px!important}.receipt-one-page .receipt-no-box span{font-size:9px!important;margin-bottom:2px!important}.receipt-one-page .receipt-no-box b{font-size:14px!important}.receipt-one-page .receipt-amount-box{margin:5px 0 4px!important;padding:5px 10px!important;border-width:1.5px!important}.receipt-one-page .receipt-amount-box strong{font-size:21px!important}.receipt-one-page .receipt-amount-box span,.receipt-one-page .receipt-amount-box small{font-size:11px!important}.amount-words{font-size:11px!important;padding:4px 8px!important;margin-bottom:5px!important}.compact-receipt-table td,.compact-receipt-table th{padding:4px 7px!important;font-size:10.8px!important;line-height:1.35!important}.compact-receipt-table th{width:88px!important}.receipt-one-page .fancy-signs{margin-top:20px!important;font-size:11px!important}.receipt-one-page .fancy-signs span{width:135px!important;margin-bottom:5px!important}.receipt-one-page .receipt-watermark{font-size:78px!important;top:70px!important;color:rgba(15,58,95,.023)!important}
  @page{size:A5 landscape;margin:5mm}
}

/* v23: تنظیم اندازه نمایش برنامه */
html{--ui-scale:1}
@media screen{
  body{zoom:var(--ui-scale)}
}
.ui-scale-box{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:10px;margin:0 0 12px;color:#fff}
.ui-scale-title{font-size:13px;font-weight:800;margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}
.ui-scale-controls{display:grid;grid-template-columns:36px 1fr 36px;gap:6px;align-items:center}
.ui-scale-controls select{width:100%;height:34px;border-radius:9px;border:1px solid rgba(255,255,255,.25);background:#fff;color:#1f2937;padding:4px 8px;text-align:center;font-weight:700}
.ui-scale-btn{height:34px;min-width:0;padding:0;border-radius:9px;background:rgba(255,255,255,.16);color:#fff;font-weight:900;font-size:17px;border:1px solid rgba(255,255,255,.16)}
.ui-scale-btn:hover{background:rgba(255,255,255,.24)}
.ui-scale-box small{display:block;margin-top:7px;color:rgba(255,255,255,.78);font-size:10.5px;line-height:1.6}
@media print{body{zoom:1!important}.ui-scale-box{display:none!important}}

/* v24: تنظیمات داخل منو، ساعت شمسی و جستجوی منو */
.sidebar-clock{
  margin:6px 6px 10px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  color:#eef6ff;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  font-size:12px;
}
.sidebar-clock strong{font-size:18px;color:#fff;direction:ltr;letter-spacing:.4px}
.menu-search-box{position:relative;margin:0 6px 10px}
.menu-search-box input{
  width:100%;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.10);
  color:#fff;
  padding:8px 12px;
  outline:none;
}
.menu-search-box input::placeholder{color:rgba(255,255,255,.70)}
.menu-search-box input:focus{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.32)}
.menu-search-empty{display:none;color:#ffd5d5;font-size:12px;padding:8px 4px;text-align:center}
aside.menu-searching .menu-search-empty.show{display:block}
aside.menu-searching .nav-group.search-hidden,
aside.menu-searching .submenu-section.search-hidden,
aside.menu-searching a.subnav.search-hidden,
aside.menu-searching a.nav.search-hidden{display:none!important}
aside.menu-searching .nav-group.search-match{display:block!important}
aside.menu-searching .submenu,
aside.menu-searching .nested-submenu{display:block!important}
.settings-menu .ui-scale-box.compact{margin:0;background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.10)}
.settings-menu .ui-scale-box.compact small{text-align:center}
.settings-menu .ui-scale-controls{grid-template-columns:32px 1fr 32px}
.settings-menu .ui-scale-controls select,.settings-menu .ui-scale-btn{height:32px}
.settings-menu .submenu-section.open .nested-submenu{display:block}

/* v28: صفحه سوابق پرداخت اقساط */
.installment-history-page .stat-row{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:12px;margin:12px 0}
.installment-history-page .stat-card{background:#fff;border:1px solid #dbe4ef;border-radius:14px;padding:12px 14px;box-shadow:0 4px 14px rgba(15,23,42,.05)}
.installment-history-page .stat-title{font-size:12px;color:#64748b;font-weight:800;margin-bottom:6px}
.installment-history-page .stat-value{font-size:20px;font-weight:900;color:#0f172a;direction:ltr;text-align:right}
.installment-history-page .danger-soft{background:#fff7f7;border-color:#fecaca}
.installment-history-page .danger-soft .stat-value{color:#b91c1c}
.installment-history-page .compact-summary{font-size:13px;gap:10px}
.installment-history-page tfoot .totals-row th{background:#f8fafc;font-weight:900}
@media(max-width:900px){.installment-history-page .stat-row{grid-template-columns:repeat(2,minmax(140px,1fr))}}
@media(max-width:560px){.installment-history-page .stat-row{grid-template-columns:1fr}}

/* v29: چاپ سوابق پرداخت اقساط */
.print-only{display:none}
.history-print-toolbar{display:flex;justify-content:flex-end;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 10px}
@media print{
  html,body{width:auto!important;height:auto!important;overflow:visible!important;background:#fff!important}
  body.printing-installment-history{margin:0!important;padding:0!important;zoom:1!important}
  body.printing-installment-history .shell{display:block!important;background:#fff!important;min-height:0!important}
  body.printing-installment-history aside,
  body.printing-installment-history header,
  body.printing-installment-history .messages,
  body.printing-installment-history .no-print,
  body.printing-installment-history .history-print-toolbar{display:none!important}
  body.printing-installment-history main{padding:0!important;margin:0!important;background:#fff!important;overflow:visible!important}
  body.printing-installment-history .installment-history-page{page:installment-history-print;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;color:#111!important;font-size:10.5px!important;direction:rtl!important}
  @page installment-history-print{size:A4 landscape;margin:8mm}
  body.printing-installment-history .print-only{display:block!important}
  body.printing-installment-history .print-header-box{text-align:center;border-bottom:2px solid #111;margin-bottom:8px;padding-bottom:6px}
  body.printing-installment-history .print-header-box h1{font-size:18px;margin:2px 0 4px;color:#111}
  body.printing-installment-history .print-kicker{font-weight:900;font-size:12px}
  body.printing-installment-history .page-center-title{display:none!important}
  body.printing-installment-history .card,
  body.printing-installment-history .stat-card{box-shadow:none!important;border:1px solid #999!important;border-radius:4px!important;padding:6px 8px!important;margin:5px 0!important;background:#fff!important;break-inside:avoid}
  body.printing-installment-history .section-title{font-size:12px!important;margin-bottom:5px!important;color:#111!important;font-weight:900!important}
  body.printing-installment-history .stat-row{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:5px!important;margin:6px 0!important}
  body.printing-installment-history .stat-title{font-size:9px!important;color:#333!important;margin-bottom:2px!important}
  body.printing-installment-history .stat-value{font-size:13px!important;color:#111!important}
  body.printing-installment-history .grid.three{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:4px 8px!important}
  body.printing-installment-history .win-fixed-table{overflow:visible!important;border:1px solid #777!important;height:auto!important;min-height:0!important;background:#fff!important}
  body.printing-installment-history .win-fixed-table table,
  body.printing-installment-history table.table{width:100%!important;min-width:0!important;border-collapse:collapse!important;font-size:9.2px!important;margin:0!important}
  body.printing-installment-history th,
  body.printing-installment-history td{border:1px solid #999!important;padding:3px 4px!important;white-space:normal!important;text-align:center!important;line-height:1.35!important;color:#111!important;background:#fff!important}
  body.printing-installment-history thead th{position:static!important;background:#e5e7eb!important;font-weight:900!important}
  body.printing-installment-history tfoot th{background:#f3f4f6!important;font-weight:900!important}
  body.printing-installment-history .print-signature-row{display:flex!important;justify-content:space-between;gap:30px;margin-top:28px;font-size:11px;break-inside:avoid}
  body.printing-installment-history .print-signature-row div{width:42%;text-align:center}
  body.printing-installment-history .print-signature-row span{display:block;border-top:1px solid #222;margin-bottom:6px;height:1px}
}

/* Backup / Restore */
.danger-zone{border-color:#fecaca;background:#fffafa}
.checkline{display:flex;gap:8px;align-items:center;margin:10px 0;font-weight:600}
.checkline input{width:auto}
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}
.stats-grid>div{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:12px;text-align:center}
.stats-grid span{display:block;color:#64748b;font-size:12px;margin-bottom:6px}
.stats-grid b{font-size:18px;color:#0f172a}
/* Person accounts pages */
.person-stats{grid-template-columns:repeat(4,minmax(130px,1fr));margin:12px 0 16px}.person-row.row-debit{background:#fff1f0}.person-row.row-credit{background:#ecfdf3}.person-row.row-zero{background:#fff}.row-actions{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}.btn.success{background:#0f7b3f;color:#fff}.btn.warn{background:#8a3a14;color:#fff}.ledger-head{background:#f8fafc;border:1px solid #d8dee9;border-radius:14px;padding:12px;margin:12px 0}.ledger-head h3{margin:0 0 6px;color:#1f3a5f}
@media(max-width:900px){.person-stats{grid-template-columns:repeat(2,1fr)}}

/* settlement close: live payment item summary */
.settlement-live-summary{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  margin:10px 0 14px;
  padding:10px 12px;
  border:1px solid var(--border, #d8e2ef);
  border-radius:12px;
  background:#f8fafc;
  color:#16304f;
}
.settlement-live-summary span{
  background:#fff;
  border:1px solid #e5edf6;
  border-radius:10px;
  padding:8px 12px;
}
.settlement-live-summary b{font-weight:800;color:#064e3b;}

/* وضعیت قراردادها: تب‌های خواناتر و جدا از دکمه‌های عملیاتی */
.contract-status-tabs{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:10px 0 12px;}
.status-tab{display:inline-flex;align-items:center;justify-content:center;padding:9px 16px;border-radius:10px;text-decoration:none;font-weight:800;border:1px solid #d6e0ef;background:#f6f8fb;color:#17324d;box-shadow:0 1px 0 rgba(0,0,0,.03);}
.status-tab.is-active{color:#fff;box-shadow:0 6px 14px rgba(0,0,0,.12);}
.status-tab.active-tab.is-active{background:#0f7a45;border-color:#0f7a45;}
.status-tab.settled-tab.is-active{background:#0f766e;border-color:#0f766e;}
.status-tab.closed-tab.is-active{background:#9a4317;border-color:#9a4317;}
.status-tab.deleted-tab.is-active{background:#0f9f8f;border-color:#0f9f8f;}
.status-tab.canceled-tab.is-active{background:#7c3aed;border-color:#7c3aed;}
.status-tab:not(.is-active):hover{background:#eaf1f8;}
.history-toggle{display:inline-flex;width:26px;height:26px;border-radius:8px;align-items:center;justify-content:center;background:#eef4fb;border:1px solid #cbd8e8;text-decoration:none;color:#12395d;font-weight:900;}
.installment-history-subrow td{background:#f8fbff!important;padding:10px!important;}
.sub-history-box{border:1px solid #d7e3f2;border-radius:12px;background:#fff;padding:10px;}
.sub-history-title{font-weight:800;margin-bottom:8px;color:#12395d;}
.mini-table th,.mini-table td{font-size:12px;padding:6px 8px;}
.canceled-row{opacity:.65;text-decoration:line-through;background:#fff1f1!important;}
.installment-actionbar form{display:inline-flex;margin:0;}

.cleanup-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin:18px 0}
.cleanup-item{display:block;border:1px solid #d8e2f0;border-radius:16px;background:#fff;padding:14px;cursor:pointer;line-height:1.9}
.cleanup-item:hover{border-color:#b91c1c;background:#fff7f7}
.cleanup-item input{margin-left:8px;vertical-align:middle}
.cleanup-item strong{display:inline-block;color:#0f2948;font-size:15px}
.cleanup-item span{display:block;color:#475569;font-size:13px;margin-top:4px}
.cleanup-item small{display:inline-block;margin-top:8px;color:#64748b;background:#f1f5f9;border-radius:999px;padding:2px 10px}
.cleanup-warning{border:1px dashed #ef4444;background:#fff1f2;border-radius:14px;padding:12px;margin:14px 0}
.danger-link{color:#fecaca!important;background:rgba(185,28,28,.14)!important}

/* Report hub */
.report-menu-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));}
.report-card-link{text-decoration:none;color:inherit;transition:.15s ease;}
.report-card-link:hover{transform:translateY(-2px);box-shadow:0 12px 24px rgba(15,23,42,.12);}


/* v36 استاندارد اندازه واقعی پیش‌نمایش چاپ
   گزارش‌های A4 همان A4 دیده می‌شوند و رسیدهای دریافت/پرداخت همان A5 دیده می‌شوند.
   رسید مالی فعلاً A5 افقی است: 210mm × 148mm
*/
.receipt-a5,
.receipt-a5.classy-receipt,
.receipt-a5.receipt-one-page{
  width:210mm !important;
  min-height:148mm !important;
  max-width:none !important;
  margin:18px auto !important;
  padding:8mm !important;
  box-sizing:border-box !important;
  background:#fff !important;
  color:#111827 !important;
  border:1px solid #d8dee9;
  border-radius:10px;
  box-shadow:0 12px 28px rgba(15,23,42,.18);
  overflow:hidden;
}
.receipt-a5 .receipt-head{
  margin-bottom:10px;
  padding-bottom:8px;
}
.receipt-a5 .receipt-amount-box{
  margin:8px 0;
}
.receipt-a5 .receipt-table td,
.receipt-a5 .receipt-table th{
  padding:6px 7px;
  font-size:11.5px;
}
.receipt-a5 .receipt-signs{
  margin-top:18px;
}
@page receiptA5 {
  size: A5 landscape;
  margin:0;
}
@media print{
  body:has(.receipt-a5){
    background:#fff!important;
    margin:0!important;
    padding:0!important;
  }
  body:has(.receipt-a5) .shell{
    display:block!important;
    background:#fff!important;
    min-height:auto!important;
  }
  body:has(.receipt-a5) aside,
  body:has(.receipt-a5) header,
  body:has(.receipt-a5) .no-print,
  body:has(.receipt-a5) .messages{
    display:none!important;
  }
  body:has(.receipt-a5) main{
    width:210mm!important;
    min-height:148mm!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
  }
  body:has(.receipt-a5) .card{
    margin:0!important;
    padding:0!important;
    border:0!important;
    box-shadow:none!important;
    background:#fff!important;
  }
  .receipt-a5,
  .receipt-a5.classy-receipt,
  .receipt-a5.receipt-one-page{
    page: receiptA5;
    width:210mm!important;
    min-height:148mm!important;
    max-height:148mm!important;
    margin:0!important;
    padding:8mm!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
}

/* A4 report preview guard: do not let generic layout stretch printable reports */
.a4-preview .a4-sheet{
  width:210mm!important;
  min-height:297mm!important;
  max-width:none!important;
}

/* گزارش بررسی وضعیت حساب بین دو شخص */
.status-check-form .checkbox-line{justify-content:end}.inline-check{display:flex;align-items:center;gap:8px;color:#334155;font-size:13px}.status-result{border:1px solid #d8dee9;border-radius:14px;padding:14px;text-align:center;margin:12px 0;background:#f8fafc}.status-result h3{margin:0 0 8px;color:#1f3a5f}.status-result strong{font-size:20px;color:#0f172a}.status-result .result-amount{margin-top:8px;font-weight:900;font-size:18px}.status-result.debit{background:#fff1f0;border-color:#fecaca}.status-result.credit{background:#ecfdf3;border-color:#bbf7d0}.status-result.zero{background:#f8fafc}.empty-result{font-weight:900;color:#1f3a5f;font-size:18px}.party-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.party-summary div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:10px}.report-header{text-align:center;border-bottom:2px solid #1f3a5f;padding-bottom:10px;margin-bottom:12px}.report-header h2{margin:0 0 6px;color:#1f3a5f}.compact-report-table{min-width:0!important;font-size:12px}.compact-report-table th,.compact-report-table td{padding:7px 8px;white-space:normal}.status-check-sheet{padding:14mm!important}@media screen{.a4-preview .status-check-sheet{padding:10mm!important;font-size:var(--report-font-size,12px)!important}}.print-signature-row{display:flex;justify-content:space-between;gap:40px;margin-top:35px}.print-signature-row div{width:42%;text-align:center}.print-signature-row span{display:block;border-top:1px solid #222;margin-bottom:8px}
@media(max-width:900px){.party-summary{grid-template-columns:1fr}}
@media print{body.print-report-page{background:#fff!important;margin:0!important}.print-report-page .a4-preview{padding:0!important;background:#fff!important}.print-report-page .a4-sheet{box-shadow:none!important;margin:0!important;border:0!important;width:210mm!important;min-height:297mm!important}.status-check-sheet{padding:10mm!important}@page{size:A4 portrait;margin:8mm}}

/* Vehicle contract form */
.smart-list{max-height:190px;overflow:auto;border:1px solid var(--border,#d7e1ef);border-radius:12px;background:#fff;margin-top:8px;padding:6px}
.smart-row{display:block;padding:8px 10px;border-bottom:1px solid #eef2f7;cursor:pointer;line-height:1.9}
.smart-row:last-child{border-bottom:none}
.smart-row:hover{background:#f4f8ff}
.smart-filter{width:100%;box-sizing:border-box}
.check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px}
.contract-tabs .tab{padding:10px 16px;border-radius:10px;background:#edf2f7;color:#123;text-decoration:none;display:inline-block;margin:3px}
.contract-tabs .tab.active{background:#0b6b3a;color:#fff}
.sticky-actions{position:sticky;bottom:0;background:rgba(245,248,252,.95);padding:12px;border-top:1px solid #d7e1ef;z-index:5}

.btn.xs{padding:5px 8px;font-size:12px;margin:2px}.actions-cell{white-space:nowrap}.contract-tabs .tab{border-radius:8px;padding:9px 14px;text-decoration:none}.contract-tabs .tab.active{background:#0f7b3c;color:#fff}

/* Accounting documents: modern responsive workspace */
.accounting-docs-page{display:grid;gap:16px;max-width:1700px;margin:0 auto}
.accounting-docs-hero{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:22px 26px;border:1px solid #dce6f2;border-radius:22px;background:linear-gradient(135deg,#fff 0%,#f4f9ff 100%);box-shadow:0 12px 32px rgba(22,50,82,.06)}
.accounting-docs-hero-title{display:flex;align-items:flex-start;gap:14px}.accounting-docs-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:16px;background:#e9f4ff;font-size:28px}.accounting-docs-kicker{font-size:13px;font-weight:800;color:#11704a;margin-bottom:4px}.accounting-docs-hero h2{margin:0;color:#12355c;font-size:30px}.accounting-docs-hero p{margin:8px 0 0;color:#667892}.accounting-docs-hero-actions{display:flex;gap:8px;flex-wrap:wrap}
.accounting-docs-summary{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:12px}.doc-summary-card{padding:16px 18px;border:1px solid #dce6f2;border-radius:18px;background:#fff;box-shadow:0 8px 20px rgba(22,50,82,.04)}.doc-summary-card span{display:block;color:#687c93;font-size:13px}.doc-summary-card strong{display:block;margin-top:7px;color:#14385f;font-size:22px}.doc-summary-card small{color:#8a9aab}.doc-summary-card.success{background:#f2fcf6;border-color:#cfeedd}.doc-summary-card.danger{background:#fff6f6;border-color:#f3d4d4}.doc-summary-card.amount-card strong{font-size:18px}
.accounting-docs-filter-card{padding:16px;border:1px solid #dce6f2;border-radius:18px;background:#fff}.accounting-docs-filter-form{display:grid;grid-template-columns:minmax(280px,2fr) minmax(170px,1fr) minmax(190px,1fr) auto;gap:10px;align-items:end}.accounting-docs-filter-form label{display:grid;gap:6px}.accounting-docs-filter-form label>span{font-size:12px;font-weight:800;color:#536b83}.accounting-docs-filter-form input,.accounting-docs-filter-form select{width:100%;box-sizing:border-box}.doc-filter-actions{display:flex;gap:8px}
.accounting-docs-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(390px,.75fr);gap:16px;align-items:start}.accounting-docs-list,.accounting-docs-lines{border:1px solid #dce6f2;border-radius:20px;background:#fff;padding:16px;box-shadow:0 10px 26px rgba(15,40,70,.05)}.accounting-docs-lines{position:sticky;top:72px}.section-title-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid #e8eef5}.section-title-row h3{margin:0;color:#12355c;font-size:20px}.section-title-row p{margin:4px 0 0;color:#7a8ba0;font-size:13px}
.accounting-docs-table-wrap{overflow:auto;border:1px solid #e0e8f1;border-radius:14px}.accounting-docs-list .accounting-docs-table-wrap{max-height:620px}.lines-wrap{max-height:430px}.accounting-docs-table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px;white-space:nowrap}.accounting-docs-table th{position:sticky;top:0;z-index:2;padding:11px 10px;background:#edf4fb;color:#173b61;border-bottom:1px solid #d2deea;font-weight:900}.accounting-docs-table td{padding:11px 10px;border-bottom:1px solid #edf2f7;vertical-align:middle}.accounting-docs-table tbody tr:hover td{background:#f8fbfe}.accounting-docs-table .selected-row td{background:#e8f4ff!important}.accounting-docs-table .canceled-row td{color:#8a919a;background:#fff8f8;text-decoration:none}.accounting-docs-table .canceled-row .amount{text-decoration:line-through;opacity:.7}.doc-no{display:block;color:#0d426f;font-size:15px}.doc-row-index{display:block;color:#95a1af;margin-top:3px}.doc-desc{max-width:320px;overflow:hidden;text-overflow:ellipsis}.debit{color:#a32626;font-weight:900}.credit{color:#087243;font-weight:900}.source-badge{background:#eef5ff;color:#174b78;border-radius:999px;padding:6px 10px}.source-manual-person-document,.source-manual-account-document{background:#eaf8ef;color:#12673d}.source-cancel-journal-entry{background:#fff0e8;color:#a04a14}.source-person-money-transaction{background:#eaf3ff;color:#1c5f9d}.source-installment-contract,.source-installment-payment{background:#ebfaf8;color:#08746a}.accounting-doc-actions{display:flex;align-items:center;gap:6px}.doc-actions-menu{position:relative}.doc-actions-menu summary{list-style:none;cursor:pointer;width:34px;height:34px;display:grid;place-items:center;border:1px solid #d9e3ed;border-radius:10px;background:#f7fafc;font-size:22px}.doc-actions-menu summary::-webkit-details-marker{display:none}.doc-actions-menu>div{position:absolute;left:0;top:40px;z-index:10;min-width:130px;padding:8px;border:1px solid #dde6ef;border-radius:12px;background:#fff;box-shadow:0 12px 30px rgba(17,43,71,.14)}.doc-actions-menu form{margin:0}
.selected-doc-card{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}.selected-doc-card>div{padding:11px;border:1px solid #e1eaf3;border-radius:12px;background:#f8fbfe}.selected-doc-card span{display:block;color:#7a8ca0;font-size:11px}.selected-doc-card strong{display:block;margin-top:5px;color:#173b5f}.selected-doc-desc{grid-column:1/-1}.lines-table td:first-child strong,.lines-table td:first-child small{display:block}.lines-table td:first-child small{color:#8493a3;margin-top:3px}
@media(max-width:1200px){.accounting-docs-summary{grid-template-columns:repeat(3,1fr)}.accounting-docs-layout{grid-template-columns:1fr}.accounting-docs-lines{position:static}.accounting-docs-filter-form{grid-template-columns:1fr 1fr}.doc-filter-search{grid-column:1/-1}.doc-filter-actions{grid-column:1/-1}}
@media(max-width:720px){.accounting-docs-page{gap:12px}.accounting-docs-hero{align-items:flex-start;padding:16px;border-radius:17px}.accounting-docs-icon{width:44px;height:44px;font-size:22px}.accounting-docs-hero h2{font-size:23px}.accounting-docs-hero p{font-size:12px;line-height:1.9}.accounting-docs-hero-actions{width:100%}.accounting-docs-hero{flex-direction:column}.accounting-docs-summary{grid-template-columns:1fr 1fr}.doc-summary-card{padding:12px}.doc-summary-card strong{font-size:18px}.accounting-docs-filter-form{grid-template-columns:1fr}.doc-filter-search,.doc-filter-actions{grid-column:auto}.doc-filter-actions .btn{flex:1}.accounting-docs-list,.accounting-docs-lines{padding:11px;border-radius:16px}.accounting-docs-table-wrap{border:0;overflow:visible;max-height:none!important}.accounting-docs-table,.accounting-docs-table tbody,.accounting-docs-table tr,.accounting-docs-table td{display:block;width:100%;box-sizing:border-box}.accounting-docs-table thead{display:none}.accounting-docs-table tbody{display:grid;gap:10px}.accounting-docs-table tr{border:1px solid #dfe8f1;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 5px 14px rgba(17,43,71,.04)}.accounting-docs-table td{display:flex;justify-content:space-between;gap:12px;padding:8px 10px;border-bottom:1px dashed #e5ebf2;white-space:normal;text-align:left}.accounting-docs-table td:last-child{border-bottom:0}.accounting-docs-table td:before{content:attr(data-label);font-weight:900;color:#566d85;flex:0 0 88px;text-align:right}.accounting-docs-table .doc-desc{max-width:none}.accounting-doc-actions{justify-content:flex-start}.accounting-doc-actions .btn{flex:1}.accounting-docs-table tfoot{display:block;margin-top:10px}.accounting-docs-table tfoot tr{display:grid;grid-template-columns:1fr}.accounting-docs-table tfoot th{position:static;display:block}.selected-doc-card{grid-template-columns:1fr 1fr}.selected-doc-desc{grid-column:1/-1}}

.menu-draggable{
  cursor:grab;
  transition:transform .22s ease, box-shadow .22s ease, opacity .22s ease, background-color .22s ease;
}
.menu-draggable:hover{
  transform:translateY(-2px);
}
.menu-draggable:active{
  cursor:grabbing;
}
.menu-draggable.dragging{
  opacity:.70;
  transform:scale(1.03);
  outline:2px dashed rgba(255,255,255,.6);
  background:rgba(255,255,255,.12);
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}



/* v57 - چیدمان منظم جزئیات روش پرداخت قولنامه */
.vc-payment-details{margin-top:12px}
.vc-payment-details h4{margin:0 0 14px;color:#17375e}
.vc-payment-grid{
  display:grid;
  grid-template-columns: minmax(220px,1fr) minmax(220px,1fr);
  gap:14px 18px;
  align-items:end;
}
.vc-payment-grid .vc-field{
  width:100%;
  min-width:0;
  flex-direction:column;
  gap:7px;
}
.vc-payment-grid .vc-field input,
.vc-payment-grid .vc-field select{
  width:100%;
  min-width:0;
}
.vc-payment-grid .vc-track,
.vc-payment-grid .vc-other,
.vc-payment-grid .vc-single-bank{
  grid-column:auto;
}
.vc-payment-grid small,
.vc-payment-details small{
  display:block;
  margin-top:12px;
}
@media(max-width:900px){
  .vc-payment-grid{grid-template-columns:1fr}
}


/* جستجوی هوشمند بانک در جزئیات پرداخت */
.smart-bank{position:relative}
.bank-search{width:100%}
.bank-dropdown{display:none;position:absolute;z-index:120;top:calc(100% + 6px);right:0;left:0;max-height:240px;overflow:auto;background:#fff;border:1px solid #cbd5e1;border-radius:12px;box-shadow:0 18px 40px rgba(15,35,70,.18);padding:6px}
.smart-bank.open .bank-dropdown{display:block}
.bank-option{padding:10px 12px;border-radius:10px;cursor:pointer;border-bottom:1px solid #f1f5f9;background:#fff}
.bank-option:hover{background:#e9f7ef}
.bank-option b{display:block;color:#1f3a5f;margin-bottom:3px}
.bank-option small,.bank-empty{display:block;color:#64748b;font-size:12px}
.bank-empty{padding:12px;text-align:center}
.js-sheba.invalid-smart,.bank-search.invalid-smart{border-color:#dc2626!important;background:#fff7f7!important}


/* Monthly profit calculator */
.calculator-page{max-width:1050px;margin:0 auto}.calculator-card{margin-bottom:16px}.calc-topbar h2{font-size:24px}.calculator-inputs{align-items:stretch}.calc-note{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:12px;padding:12px 14px;color:#334155;line-height:2}.calc-note span{display:block;color:#64748b}.calc-result-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.calc-result-grid div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:14px;text-align:center}.calc-result-grid span{display:block;color:#64748b;font-size:12px;margin-bottom:8px}.calc-result-grid b{display:block;color:#1f3a5f;font-size:22px;margin-bottom:5px}.calc-result-grid small{color:#64748b}.copy-box{display:none;margin-top:12px;min-height:170px;direction:rtl}.calculations-menu .submenu{padding-bottom:6px}
@media(max-width:900px){.calculator-page{max-width:none}.calc-result-grid{grid-template-columns:1fr}}
/* Lump check payment calculator */
.lump-payment-page .calc-table-wrap{overflow-x:auto;margin-top:12px}.calc-line-table th,.calc-line-table td{text-align:center;vertical-align:middle}.calc-line-table input{min-width:130px;text-align:center}.calc-line-table .line-amount{min-width:180px}.calc-line-table .line-interest,.calc-line-table .line-total{font-weight:800;color:#1f3a5f;white-space:nowrap}.calc-line-table .row-error td{background:#fff7f7}.calc-row-actions{justify-content:flex-start}.lump-note{margin-bottom:10px}.btn.small{padding:6px 10px;font-size:12px}.btn.danger{background:#fee2e2;color:#991b1b;border-color:#fecaca}
@media(max-width:900px){.calc-line-table input{min-width:120px}.calc-line-table .line-amount{min-width:160px}}

/* --- Calculation pages refinement --- */
.improved-calc-page{max-width:1180px;margin:0 auto;}
.compact-calc-card{box-shadow:0 12px 30px rgba(15,58,104,.08);}
.calc-meta-box{background:#fbfdff;}
.win-grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:end;}
.clean-calc-table-wrap{border-radius:14px;overflow:auto;border:1px solid #d9e3ef;background:#fff;}
.clean-calc-table{min-width:980px;}
.clean-calc-table th{background:#f3f7fb;color:#14213d;font-weight:800;}
.clean-calc-table td,.clean-calc-table th{vertical-align:middle;text-align:center;}
.clean-calc-table input,.clean-calc-table select{max-width:190px;margin:auto;text-align:center;}
.clean-calc-table .line-interest,.clean-calc-table .line-total{font-weight:800;color:#0f3a68;}
.calc-total-row th,.calc-total-row td{background:#eef6ff!important;font-weight:900;color:#0f3a68;border-top:2px solid #b7c9dd;}
.compact-note{display:flex;gap:18px;flex-wrap:wrap;align-items:center;margin-bottom:12px;}
.sticky-calc-actions{position:sticky;bottom:0;background:rgba(255,255,255,.94);border-top:1px solid #e5edf6;padding-top:14px;z-index:2;}
.btn.success{background:#0f766e;color:#fff;border-color:#0f766e;}
@media(max-width:900px){.win-grid-4{grid-template-columns:1fr 1fr}.improved-calc-page{max-width:100%;}.clean-calc-table{min-width:850px}}
@media(max-width:600px){.win-grid-4{grid-template-columns:1fr}.compact-note{display:block}.compact-note span{display:block;margin-top:6px}}

/* محاسبات: انتخاب هوشمند شخص */
.calc-person-picker .person-id-search{width:100%;min-height:38px;}
.calc-person-picker .person-id-dropdown{min-width:320px;}
/* v66: شرایط‌گذاران قرارداد اقساط */
.settlers-box{border:1px solid #dbe6f2;background:#f8fafc;border-radius:14px;padding:12px;margin-bottom:14px}
.settlers-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.settlers-head b{display:block;color:#1f3a5f;margin-bottom:4px}.settlers-table input{min-width:120px}.settlers-table .smart-id-person{min-width:260px}.settlers-table tfoot th{background:#eef6ff;font-weight:900}.bad-total{color:#dc2626!important}.ok-total{color:#15803d!important}.btn.small{padding:7px 10px;font-size:12px}.btn.danger{background:#fee2e2;color:#991b1b;border-color:#fecaca}
@media(max-width:900px){.settlers-head{align-items:stretch;flex-direction:column}.settlers-table .smart-id-person{min-width:220px}}

/* v67 - cleaner installment contract form + one-time payment option */
.tidy-contract-grid{grid-template-columns:1.05fr .95fr!important;align-items:start}
.schedule-panel .pay-type-cards{display:grid;grid-template-columns:1fr;gap:8px;margin:0 0 12px}
.pay-type-cards label{display:flex;align-items:center;gap:8px;background:#f8fafc;border:1px solid #dbe5f0;border-radius:13px;padding:10px 12px;cursor:pointer;font-weight:800;color:#17345a}
.pay-type-cards input{width:auto;min-width:auto}.pay-type-cards label:has(input:checked){background:#ecfdf5;border-color:#8bd2aa;color:#14532d}
.hint-box{background:#f8fafc;border:1px dashed #b9c9dc;border-radius:13px;padding:12px;line-height:1.9;color:#475569;font-size:12px}
.settlers-panel{max-width:100%;overflow:visible}.compact-settlers-box{background:#fbfdff;border:1px solid #dbe5f0;border-radius:16px;padding:12px}
.settlers-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;flex-wrap:wrap}.settlers-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.share-pill{display:inline-flex;align-items:center;justify-content:center;background:#eef6ff;border:1px solid #cfe0f5;color:#163a5f;border-radius:999px;padding:8px 12px;font-weight:900;min-width:110px}
.settlers-tablewrap{max-height:260px;overflow:auto;border:1px solid #e2e8f0;border-radius:14px;background:white}.compact-settlers-table{min-width:760px;margin:0}.compact-settlers-table th,.compact-settlers-table td{vertical-align:middle}.compact-settlers-table th:first-child,.compact-settlers-table td:first-child{width:52%}.compact-settlers-table th:nth-child(2),.compact-settlers-table td:nth-child(2){width:16%;text-align:center}.compact-settlers-table th:nth-child(3),.compact-settlers-table td:nth-child(3){width:18%;text-align:center}.compact-settlers-table th:nth-child(4),.compact-settlers-table td:nth-child(4){width:90px;text-align:center}.compact-settlers-table .settler-share{max-width:130px;text-align:center}.compact-settlers-table .person-id-search{min-width:320px}.compact-settlers-table tfoot th{background:#f8fafc;position:sticky;bottom:0;z-index:1}.bad-total{color:#b91c1c!important}.ok-total{color:#15803d!important}
@media(max-width:1000px){.tidy-contract-grid{grid-template-columns:1fr!important}.settlers-head{align-items:stretch}.settlers-actions{justify-content:space-between}.compact-settlers-table{min-width:720px}}

/* v68: اصلاح نمایش لیست هوشمند و چیدمان شرایط‌گذاران */
.installment-form, .installment-form .panel, .settlers-panel, .settlers-box{overflow:visible!important}
.person-id-dropdown{z-index:99999!important}
.settlers-tablewrap{overflow:visible!important;max-height:none!important}
.compact-settlers-table{min-width:0!important;width:100%}
.compact-settlers-table .person-id-search{min-width:0!important}
.one-time-due-box{display:grid;grid-template-columns:1fr 260px;gap:10px;align-items:end;margin-top:10px}
.one-time-due-box .hint-box{margin:0}
@media(max-width:800px){.one-time-due-box{grid-template-columns:1fr}}

/* v69: رفع خطای صدور سند اقساط و نمایش لیست شرایط‌گذار روی همه کادرها */
.smart-id-person{position:relative;z-index:20}
.smart-id-person:focus-within{z-index:100000}
.smart-id-person .person-id-dropdown{position:absolute;top:100%;right:0;left:auto;z-index:100001!important;box-shadow:0 14px 30px rgba(15,35,65,.18)}
.compact-settlers-table td{position:relative}
.deposit-person-smart{position:relative}.deposit-person-smart.open .person-dropdown{display:block}.deposit-person-smart .person-dropdown{display:none;position:absolute;z-index:3000;top:calc(100% + 6px);right:0;left:0;max-height:260px;overflow:auto;background:#fff;border:1px solid #cbd5e1;border-radius:14px;box-shadow:0 18px 40px rgba(15,35,70,.18);padding:6px}.deposit-person-smart::after{content:'🔎';position:absolute;left:10px;top:9px;opacity:.55;pointer-events:none}
.readonly-autofill{background:#f1f5f9!important;color:#334155!important;border-style:dashed!important}
#deposit-target-select:disabled{background:#f1f5f9;color:#475569}


.summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:14px}
.stat-card{border:1px solid #d8e3f0;border-radius:14px;background:#fff;padding:18px;text-align:center}
.stat-card strong{display:block;font-size:26px;color:#0f3768;margin-bottom:6px}
.stat-card span{color:#52677f}
.text-success{color:#087a42;font-weight:700}
.text-danger{color:#a31111;font-weight:700}
.muted-row{opacity:.62}

/* v87: بازآرایی منو و تنظیم فونت */
:root{--app-font:"B Yekan",Yekan,Vazirmatn,Tahoma,Arial,sans-serif;--ui-scale:1!important}
body,input,select,button,textarea{font-family:var(--app-font)!important}
body{zoom:1!important}
html[data-app-font="tahoma"]{--app-font:Tahoma,Arial,sans-serif}
html[data-app-font="vazirmatn"]{--app-font:Vazirmatn,Tahoma,Arial,sans-serif}
html[data-app-font="iransans"]{--app-font:IRANSans,"IRANSansWeb",Tahoma,Arial,sans-serif}
html[data-app-font="shabnam"]{--app-font:Shabnam,Tahoma,Arial,sans-serif}
html[data-app-font="yekan"]{--app-font:"B Yekan",Yekan,Vazirmatn,Tahoma,Arial,sans-serif}
.sidebar-clock,
.sidebar-clock #sidebarJalaliDate,
.sidebar-clock strong{font-weight:800!important;font-size:15px!important;color:#fff!important}
.sidebar-clock{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.18)}
.font-setting-box{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:10px;margin:0 0 12px;color:#fff}
.font-setting-box select{width:100%;height:34px;border-radius:9px;border:1px solid rgba(255,255,255,.25);background:#fff;color:#1f2937;padding:4px 8px;font-weight:700}
.font-setting-box small{display:block;margin-top:7px;color:rgba(255,255,255,.78);font-size:10.5px;line-height:1.6;text-align:center}
.fixed-menu{cursor:default!important}
.fixed-menu.menu-draggable{cursor:default!important}
.home-link.fixed-menu{background:rgba(255,255,255,.16);font-weight:800}
.settings-menu.fixed-menu{margin-top:14px;border-top:1px solid rgba(255,255,255,.16);padding-top:7px}
@media print{body{zoom:1!important}}


/* v88: پاکسازی ظاهر منو و سایدبار */
aside{width:300px!important;padding:14px 10px!important;}
.brand{font-size:17px!important;line-height:1.8;margin:8px 8px 16px!important;}
.sidebar-clock{font-weight:800!important;font-size:13px!important;margin:6px 6px 8px!important;padding:9px 12px!important;}
.sidebar-clock #sidebarJalaliDate,.sidebar-clock strong{font-weight:900!important;font-size:15px!important;}
.menu-search-box input{height:36px!important;}
.nav,.nav.parent,.nav.parent.nav-toggle{padding:10px 12px!important;margin:5px 0!important;border-radius:11px!important;font-size:13.5px!important;}
.nav-group{margin:5px 0!important;}
.nav-group>.submenu{margin:0 4px 7px!important;padding:6px!important;border-radius:0 0 12px 12px!important;}
.subnav{padding:8px 10px!important;font-size:12.5px!important;border-radius:9px!important;}
.submenu-section{margin:5px 0!important;padding:6px!important;border-radius:11px!important;}
.section-toggle.submenu-title{padding:6px 8px!important;font-size:12.5px!important;}
.nested-submenu{margin-right:6px!important;padding-right:6px!important;}
.nested-submenu .subnav{padding:7px 9px!important;font-size:12px!important;}
.home-link.fixed-menu{font-weight:900!important;background:#0f6b3a!important;text-align:center!important;font-size:15px!important;}
.settings-menu.fixed-menu{margin-top:10px!important;border-top:1px solid rgba(255,255,255,.14)!important;padding-top:8px!important;}
.menu-draggable.fixed-menu,.home-link.fixed-menu,.settings-menu.fixed-menu{cursor:default!important;}
@media(max-width:900px){aside{width:auto!important}}


/* v91: خواناتر شدن فونت منوی کناری */
aside .nav{
  font-size:15px;
  font-weight:700;
}
aside .subnav{
  font-size:14px;
  font-weight:600;
}
aside .brand{
  font-size:19px;
}
.nav.parent .chev{
  font-size:14px;
}

/* Menu readability: slightly larger Persian sidebar labels */
aside .nav, aside .nav.parent, aside .nav.parent.nav-toggle{font-size:15px!important;font-weight:700!important;}
aside .subnav{font-size:14px!important;font-weight:600!important;line-height:1.55!important;}
aside .submenu-title{font-size:15px!important;font-weight:700!important;}
aside .nested-submenu .subnav{font-size:13.5px!important;font-weight:600!important;}


/* v93 - بازطراحی فرم و لیست چک‌ها */
.checks-page-topbar{
  background:linear-gradient(135deg,#ffffff,#f1f5f9);
  border:1px solid #dbe3ee;
  border-radius:18px;
  padding:14px 16px;
  margin-bottom:14px;
}
.checks-page-topbar .title h2{margin-bottom:4px}
.check-list-summary{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:10px;
  margin:12px 0 14px;
}
.check-summary-card{
  background:#fff;
  border:1px solid #d9e2ef;
  border-radius:16px;
  padding:12px 14px;
  box-shadow:0 8px 22px rgba(15,23,42,.05);
}
.check-summary-card span{display:block;color:#64748b;font-size:13px;margin-bottom:6px}
.check-summary-card strong{font-size:18px;color:#0f172a}
.check-summary-card.mini strong{font-size:16px}
.check-list-card{padding:16px}
.check-filter-bar{
  display:grid;
  grid-template-columns:2fr 1fr repeat(4,1fr) auto auto;
  gap:10px;
  align-items:end;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:16px;
  padding:12px;
  margin-bottom:14px;
}
.check-table-wrap{border:1px solid #e2e8f0;border-radius:16px;overflow:auto;background:#fff}
.check-table{min-width:1500px}
.check-table th{
  position:sticky;
  top:0;
  z-index:2;
  background:#eef4fb;
  color:#1e3a5f;
  font-weight:800;
}
.check-table td{vertical-align:middle}
.check-table tr:hover td{background:#f8fbff}
.check-person-cell strong{color:#12385f}
.sayadi-cell{font-family:Tahoma,Arial,sans-serif;letter-spacing:.5px;direction:ltr;text-align:right}
.strong-amount{font-weight:800;color:#075985}
.check-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:92px;
  border-radius:999px;
  padding:5px 10px;
  font-size:12px;
  font-weight:800;
  border:1px solid transparent;
}
.check-status-badge.status-paid{background:#dcfce7;color:#166534;border-color:#86efac}
.check-status-badge.status-returned{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.check-status-badge.status-neutral{background:#f1f5f9;color:#475569;border-color:#cbd5e1}
.check-status-badge.status-transfered{background:#fef3c7;color:#92400e;border-color:#fde68a}
.check-status-badge.status-bank{background:#dbeafe;color:#1e40af;border-color:#bfdbfe}
.check-status-badge.status-default{background:#ede9fe;color:#5b21b6;border-color:#ddd6fe}
.check-actions-box{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  min-width:360px;
}
.status-inline-form{display:flex!important;gap:5px;align-items:center}
.status-inline-form select{min-width:125px;padding:7px 8px;border-radius:9px}

.check-form-card{
  border-radius:18px;
  background:linear-gradient(180deg,#f8fbff,#eef3f8);
  border:1px solid #d7e1ec;
  box-shadow:0 10px 26px rgba(15,23,42,.06);
}
.modern-check-form{max-width:1250px;margin:auto}
.check-form-help{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  background:#fff;
  border:1px solid #dbe3ee;
  border-radius:16px;
  padding:12px 14px;
  margin-bottom:14px;
  color:#334155;
}
#sayadiCounter{
  min-width:120px;
  text-align:center;
  border-radius:999px;
  background:#f1f5f9;
  padding:6px 10px;
  font-weight:800;
  color:#64748b;
}
#sayadiCounter.ok{background:#dcfce7;color:#166534}
#sayadiCounter.bad{background:#fee2e2;color:#991b1b}
.check-section-title{
  font-size:17px;
  font-weight:900;
  color:#163b63;
  margin:16px 0 10px;
  padding:8px 12px;
  border-right:4px solid #2563eb;
  background:#fff;
  border-radius:12px;
  box-shadow:0 3px 12px rgba(15,23,42,.04);
}
.check-windows-form label{font-size:14px}
.check-windows-form input,
.check-windows-form select,
.check-windows-form textarea{
  border-radius:12px;
  border:1px solid #c4cfdd;
  min-height:42px;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.check-windows-form input:focus,
.check-windows-form select:focus,
.check-windows-form textarea:focus{
  outline:none;
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
.check-boxset{
  border-radius:16px!important;
  border:1px solid #d4deeb!important;
  background:#ffffff!important;
  box-shadow:0 6px 18px rgba(15,23,42,.04);
}
.check-boxset legend{font-size:15px;background:#fff;border-radius:999px}
.radio-line{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:8px 10px;
}
.category-inline .btn{height:42px;display:flex;align-items:center}
.check-actions .btn.primary,
.form-actions.check-actions .btn.primary{min-width:130px}
@media(max-width:1200px){
  .check-filter-bar{grid-template-columns:1fr 1fr}
}
@media(max-width:900px){
  .check-filter-bar{grid-template-columns:1fr}
  .check-form-help{flex-direction:column;align-items:stretch}
}

.currency-setting-box{display:flex;flex-direction:column;gap:6px;padding:8px 10px;border-radius:12px;background:rgba(255,255,255,.08);}
.currency-setting-box select{width:100%;border:1px solid rgba(255,255,255,.18);border-radius:10px;padding:7px 8px;font-weight:700;direction:rtl;}
.currency-setting-box small{font-size:11px;line-height:1.7;color:rgba(255,255,255,.75);}
.amount-unit-hint{font-size:12px;color:#5c6f8f;margin-top:4px;font-weight:700;}

/* v94 - سر و سامان دادن بخش چک‌ها */
.checks-dashboard{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:10px;
  margin:12px 0 14px;
}
.check-dash-card{
  display:block;
  text-decoration:none;
  color:#0f172a;
  background:#fff;
  border:1px solid #d9e2ef;
  border-radius:18px;
  padding:12px 14px;
  box-shadow:0 8px 22px rgba(15,23,42,.05);
  transition:.15s ease;
}
.check-dash-card:hover{transform:translateY(-1px);box-shadow:0 10px 26px rgba(15,23,42,.08)}
.check-dash-card.active{border-color:#2563eb;background:#eff6ff}
.check-dash-card.warning{border-color:#fed7aa;background:#fff7ed}
.check-dash-card.danger{border-color:#fecaca;background:#fff1f2}
.check-dash-card span{display:block;color:#64748b;font-size:13px;margin-bottom:4px}
.check-dash-card strong{display:block;font-size:22px;color:#0f172a;margin-bottom:2px}
.check-dash-card small{color:#475569;font-weight:700}
.check-list-summary.compact{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));margin:8px 0 14px}
.check-person-cell small{display:block;color:#64748b;margin-top:4px;font-size:12px}
/* هم‌رنگ‌سازی ردیف‌های سررسید با کارت‌های سریع بالای صفحه */
.check-row-overdue td{background:#fff5f5!important}
.check-row-overdue:hover td{background:#ffecec!important}
.check-row-due-today td{background:#fffaf2!important}
.check-row-due-today:hover td{background:#fff4e5!important}
.check-row-overdue td:first-child{box-shadow:inset -4px 0 0 #ef4444}
.check-row-due-today td:first-child{box-shadow:inset -4px 0 0 #f59e0b}
.late-pill{display:inline-flex;margin-right:6px;background:#fee2e2;color:#991b1b;border:1px solid #fecaca;border-radius:999px;padding:2px 7px;font-size:11px;font-weight:800}
.check-quick-actions{display:flex;flex-wrap:wrap;gap:5px;align-items:center;border-right:1px solid #e2e8f0;padding-right:6px;margin-right:2px}
.check-actions-box .btn.small{white-space:nowrap}
@media(max-width:1100px){.check-filter-bar{grid-template-columns:1fr 1fr}.check-actions-box{min-width:300px}.checks-dashboard{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}}


/* انتخاب قرارداد و قسط در فرم چک پرداخت اقساط */
.installment-select-panel{margin-top:10px}
.installment-choice-list{display:flex;flex-direction:column;gap:8px}
.installment-contract-title{margin-top:8px;padding:8px 10px;border-radius:10px;background:#f3f6fb;font-weight:700;color:#26364a;border:1px solid #dfe7f2}
.installment-choice{display:grid;grid-template-columns:auto 80px 130px 160px 160px 130px;gap:10px;align-items:center;padding:9px 10px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;cursor:pointer;font-size:13px}
.installment-choice:hover,.installment-choice.selected{background:#eef7ff;border-color:#8cc6ff}
.installment-choice input{width:16px;height:16px}
.empty-box{padding:12px;border:1px dashed #cbd5e1;border-radius:10px;background:#fafafa;color:#64748b}
.alert.small{font-size:13px;padding:8px 10px}
@media(max-width:900px){.installment-choice{grid-template-columns:auto 1fr;}.installment-choice span{display:block}}

/* مالک همان واگذارکننده: کادر مالک فقط خواندنی می‌شود و چیزی مخفی نمی‌شود */
.readonly-field{
  background:#f1f5f9!important;
  color:#475569!important;
  cursor:not-allowed!important;
  pointer-events:none;
}


/* تست شکیل‌سازی صفحه قراردادهای اقساط */
.installment-list-page .selected-contract-panel{
  margin:18px 0 14px;
  padding:16px;
  border:1px solid #dbe7f5;
  border-radius:18px;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 55%,#eef6ff 100%);
  box-shadow:0 12px 30px rgba(15,23,42,.06);
}
.selected-contract-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}
.selected-contract-kicker{
  color:#64748b;
  font-size:12px;
  font-weight:800;
  margin-bottom:4px;
}
.selected-contract-name{
  color:#0f2747;
  font-size:20px;
  font-weight:900;
}
.selected-contract-sub{
  color:#64748b;
  font-size:13px;
  margin-top:4px;
}
.status-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  padding:8px 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:900;
}
.status-active{background:#dcfce7;color:#166534;border:1px solid #bbf7d0}
.selected-contract-summary{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(145px,1fr));
  gap:10px;
}
.summary-tile{
  padding:12px 14px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  min-height:72px;
}
.summary-tile span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  margin-bottom:8px;
}
.summary-tile b{
  display:block;
  color:#0f2747;
  font-size:20px;
  font-weight:950;
  direction:ltr;
  text-align:right;
}
.summary-tile.emphasis{
  background:#eff6ff;
  border-color:#bfdbfe;
}
.polished-actions{
  display:grid!important;
  grid-template-columns:1.25fr 1.35fr .8fr;
  gap:12px;
  align-items:stretch!important;
  margin:12px 0 16px!important;
}
.action-group{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 24px rgba(15,23,42,.04);
}
.action-group-title{
  width:100%;
  color:#64748b;
  font-size:12px;
  font-weight:900;
  margin-bottom:2px;
}
.polished-actions .btn{
  margin:0!important;
  border-radius:11px;
}
.polished-installments{
  border-radius:18px!important;
  overflow:hidden;
}
.polished-installments .selected-contract-caption{
  padding:12px 14px;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
  font-size:14px;
  font-weight:900;
  color:#0f2747;
}
.bottom-installment-table table thead th{
  background:#eef4fb;
  color:#0f2747;
}
.bottom-installment-table table tbody tr:not(.installment-history-subrow) td{
  padding-top:14px;
  padding-bottom:14px;
}
.bottom-installment-table .badge{
  box-shadow:0 2px 8px rgba(15,23,42,.08);
}
@media(max-width:1050px){
  .polished-actions{grid-template-columns:1fr}
  .selected-contract-head{align-items:flex-start;flex-direction:column}
}

/* UI v2 - صفحه قراردادهای اقساط: کارت خلاصه و عملیات مرتب */
.installment-list-page .page-side-title{
  margin-top:18px;
  margin-bottom:10px;
  padding:0 4px;
}
.selected-contract-dashboard-v2{
  margin:12px 0 14px;
  border:1px solid #dbe7f5;
  border-radius:20px;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.07);
  overflow:hidden;
}
.selected-ribbon-v2{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  background:linear-gradient(135deg,#0f2747 0%,#164e63 100%);
  color:#fff;
}
.selected-ribbon-label-v2{
  display:inline-flex;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.20);
  font-size:12px;
  font-weight:900;
  margin-bottom:8px;
}
.selected-ribbon-title-v2{
  font-size:22px;
  font-weight:950;
  line-height:1.7;
}
.selected-ribbon-meta-v2{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:6px;
  color:#dbeafe;
  font-size:13px;
  font-weight:700;
}
.selected-ribbon-meta-v2 span{
  padding:3px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
}
.selected-ribbon-status-v2{
  min-width:84px;
  text-align:center;
  padding:9px 16px;
  border-radius:999px;
  color:#14532d;
  background:#dcfce7;
  border:1px solid #86efac;
  font-size:14px;
  font-weight:950;
}
.selected-stat-grid-v2{
  display:grid;
  grid-template-columns:repeat(6,minmax(130px,1fr));
  gap:12px;
  padding:14px;
  background:#f8fafc;
}
.selected-stat-card-v2{
  min-height:86px;
  padding:13px 14px;
  border:1px solid #e2e8f0;
  border-radius:17px;
  background:#fff;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
}
.selected-stat-card-v2 span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:900;
  margin-bottom:10px;
}
.selected-stat-card-v2 b{
  display:block;
  color:#10233f;
  font-size:22px;
  line-height:1.3;
  font-weight:950;
  direction:ltr;
  text-align:right;
  white-space:nowrap;
}
.selected-stat-card-v2.primary-stat{border-color:#bfdbfe;background:#eff6ff}
.selected-stat-card-v2.warning-stat{border-color:#fde68a;background:#fffbeb}
.selected-stat-card-v2.danger-stat{border-color:#fecaca;background:#fff1f2}
.selected-stat-card-v2.status-stat{border-color:#bbf7d0;background:#f0fdf4}
.action-panel-v2{
  display:grid;
  grid-template-columns:1.35fr 1fr auto;
  gap:12px;
  align-items:stretch;
  margin:12px 0 14px;
}
.action-block-v2,.action-more-v2{
  border:1px solid #e2e8f0;
  background:#fff;
  border-radius:18px;
  padding:12px;
  box-shadow:0 10px 28px rgba(15,23,42,.05);
}
.action-block-v2{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:9px;
}
.action-title-v2{
  width:100%;
  font-size:12px;
  color:#64748b;
  font-weight:950;
  margin-bottom:2px;
}
.action-panel-v2 .btn{
  margin:0!important;
  border-radius:12px;
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.action-panel-v2 .big-action{
  min-height:44px;
  padding:10px 18px;
  font-size:15px;
}
.action-more-v2{
  min-width:170px;
  position:relative;
}
.action-more-v2 summary{
  list-style:none;
  cursor:pointer;
  font-weight:950;
  color:#0f2747;
  padding:10px 12px;
  border-radius:12px;
  background:#f1f5f9;
  text-align:center;
}
.action-more-v2 summary::-webkit-details-marker{display:none}
.more-actions-list-v2{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}
.more-actions-list-v2 form{margin:0}
.more-actions-list-v2 .btn{width:100%}
.polished-installments .selected-contract-caption{
  text-align:right;
  padding:13px 16px!important;
  background:linear-gradient(90deg,#f8fafc,#eef6ff)!important;
}
@media(max-width:1250px){
  .selected-stat-grid-v2{grid-template-columns:repeat(3,1fr)}
  .action-panel-v2{grid-template-columns:1fr}
}
@media(max-width:760px){
  .selected-ribbon-v2{flex-direction:column;align-items:flex-start}
  .selected-stat-grid-v2{grid-template-columns:1fr 1fr}
  .selected-stat-card-v2 b{font-size:18px}
}

/* Installment standalone list page */
.detail-header-card{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  background:#fff;border:1px solid #d6e2f0;border-radius:16px;padding:18px 22px;margin-bottom:16px;
  box-shadow:0 10px 24px rgba(15,39,72,.05);
}
.detail-header-card .page-center-title{margin:0 0 8px 0;text-align:right;}
.detail-header-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.standalone-installments-summary{margin-bottom:16px;}
.section-title-row{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:12px;}
.section-title-row h2{margin:0;color:#0e2b4d;}
.installment-detail-table td,.installment-detail-table th{vertical-align:middle;}
.status-pill{display:inline-flex;align-items:center;justify-content:center;padding:5px 10px;border-radius:999px;background:#eef4fb;color:#12365b;font-weight:700;font-size:.9rem;white-space:nowrap;}
.status-پرداخت-شده{background:#e7f8ef;color:#057447;}
.status-پرداخت-نشده{background:#fff4e5;color:#9a5700;}
.status-پرداخت-ناقص{background:#fff1f0;color:#b42318;}
.status-تمدید-شده{background:#ede9fe;color:#5b21b6;}
.always-open-history td{background:#f8fbff;}
.nowrap{white-space:nowrap;}
.btn.small{padding:6px 10px;font-size:.85rem;border-radius:8px;}
@media (max-width: 900px){
  .detail-header-card{flex-direction:column;align-items:stretch;}
  .detail-header-actions{justify-content:flex-start;}
  .section-title-row{flex-direction:column;align-items:flex-start;}
}





/* --- Installment contracts toolbar v4: چیدمان مرتب کلیدها و فیلترهای قرارداد اقساط --- */
.contracts-toolbar-v3{
  background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%) !important;
  border:1px solid #d7e3f0 !important;
  border-radius:18px !important;
  padding:16px !important;
  margin:8px 0 14px !important;
  box-shadow:0 10px 24px rgba(15,41,64,.06) !important;
  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
  position:relative !important;
  overflow:visible !important;
}
.contracts-toolbar-head-v3{
  display:grid !important;
  grid-template-columns:1fr auto !important;
  align-items:center !important;
  gap:14px !important;
  margin:0 !important;
}
.compact-title-v3{
  margin:0 !important;
  text-align:right !important;
  font-size:27px !important;
  line-height:1.35 !important;
  color:#0f2940 !important;
}
.toolbar-subtitle-v3{
  color:#61748a !important;
  font-size:13px !important;
  margin-top:4px !important;
  white-space:normal !important;
}
.new-contract-btn-v3{
  position:static !important;
  min-width:190px !important;
  height:42px !important;
  border-radius:12px!important;
  font-weight:900!important;
  box-shadow:0 8px 18px rgba(15,122,69,.18) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  white-space:nowrap !important;
  margin:0 !important;
}
.status-tabs-v3{
  margin:0!important;
  padding:6px !important;
  background:#eef4fb !important;
  border:1px solid #d9e5f1 !important;
  border-radius:14px !important;
  display:flex!important;
  flex-wrap:wrap !important;
  gap:6px !important;
  width:100% !important;
  justify-content:flex-start !important;
  direction:rtl !important;
}
.status-tabs-v3 .status-tab{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  min-width:126px !important;
  border-radius:11px !important;
  border:0!important;
  box-shadow:none!important;
  background:transparent !important;
  color:#17324d !important;
  padding:9px 14px !important;
  text-decoration:none !important;
  font-weight:800 !important;
}
.status-tabs-v3 .status-tab.is-active{
  color:#fff !important;
  background:#0f7b3c !important;
  box-shadow:0 8px 18px rgba(15,41,64,.14)!important;
}
.status-tabs-v3 .status-tab.settled-tab.is-active{background:#0f766e!important;}
.status-tabs-v3 .status-tab.closed-tab.is-active{background:#7c3aed!important;}
.status-tabs-v3 .status-tab.deleted-tab.is-active{background:#0ea5a2!important;}
.status-tabs-v3 .status-tab.canceled-tab.is-active{background:#64748b!important;}
.status-tabs-v3 .tab-dot-v3{
  width:8px !important;
  height:8px !important;
  border-radius:50% !important;
  background:#9aa8b8 !important;
  display:inline-block !important;
}
.status-tabs-v3 .status-tab.is-active .tab-dot-v3{background:#fff!important;}
.filterbar-v3{
  margin:0!important;
  padding-top:12px !important;
  border-top:1px dashed #d9e5f1 !important;
  display:block !important;
  width:100% !important;
}
.filter-form-v3{
  width:100% !important;
  display:grid!important;
  grid-template-columns:minmax(280px, 1fr) 190px 96px 96px !important;
  gap:10px!important;
  align-items:end!important;
  margin:0 !important;
  direction:rtl !important;
}
.filter-field-v3{
  display:flex !important;
  flex-direction:column !important;
  gap:4px !important;
  min-width:0 !important;
}
.filter-field-v3 label{
  color:#50657c !important;
  font-size:12px !important;
  font-weight:800 !important;
}
.filter-form-v3 input{
  width:100% !important;
  min-width:0!important;
  height:40px!important;
  border-radius:11px!important;
  border:1px solid #c9d8e8!important;
  background:#fff!important;
  box-sizing:border-box !important;
}
.search-btn-v3,.clear-btn-v3{
  height:40px !important;
  border-radius:11px!important;
  min-width:0 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin:0 !important;
  white-space:nowrap !important;
}
@media (max-width:900px){
  .contracts-toolbar-head-v3{grid-template-columns:1fr !important;}
  .new-contract-btn-v3{justify-self:stretch !important;width:100% !important;}
  .filter-form-v3{grid-template-columns:1fr 1fr !important;}
  .status-tabs-v3 .status-tab{flex:1 1 calc(50% - 8px) !important;min-width:0 !important;}
}
@media (max-width:560px){
  .filter-form-v3{grid-template-columns:1fr !important;}
  .status-tabs-v3 .status-tab{flex:1 1 100% !important;}
}

/* --- Clean installment contracts header: remove duplicate title and keep actions in one tidy row --- */
.contracts-toolbar-clean-titleless{
  padding:12px 14px !important;
  margin-top:6px !important;
}
.status-tabs-with-action-v3{
  align-items:center !important;
  gap:8px !important;
}
.status-tabs-with-action-v3 .new-contract-tab-action-v3{
  order:-1 !important;
  min-width:210px !important;
  height:42px !important;
  padding:9px 18px !important;
  border-radius:13px !important;
  background:linear-gradient(135deg,#087443,#0ea56a) !important;
  color:#fff !important;
  box-shadow:0 10px 20px rgba(8,116,67,.20) !important;
  border:1px solid rgba(255,255,255,.28) !important;
  margin-left:12px !important;
  position:relative !important;
}
.status-tabs-with-action-v3 .new-contract-tab-action-v3::after{
  content:"";
  position:absolute;
  left:-11px;
  top:8px;
  bottom:8px;
  width:1px;
  background:#cfdbea;
}
.status-tabs-with-action-v3 .status-tab{
  flex:0 0 auto !important;
}
@media (max-width:900px){
  .status-tabs-with-action-v3 .new-contract-tab-action-v3{
    order:-1 !important;
    width:100% !important;
    margin-left:0 !important;
  }
  .status-tabs-with-action-v3 .new-contract-tab-action-v3::after{display:none !important;}
}


/* منوی قراردادها - نسخه ساده و پایدار */
.clean-contracts-submenu{
  padding:8px 9px 10px;
}
.clean-contracts-submenu .menu-section-label{
  display:block;
  margin:8px 2px 6px;
  padding:8px 10px;
  color:#fff;
  font-weight:800;
  font-size:13px;
  border-radius:10px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.08);
}
.clean-contracts-submenu .menu-section-label:first-child{margin-top:2px;}
.clean-contracts-submenu .subnav{
  margin:3px 8px 3px 0;
  padding:10px 12px;
  border-right:2px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.035);
}
.clean-contracts-submenu .subnav:hover,
.clean-contracts-submenu .subnav.active-subnav{
  background:rgba(255,255,255,.16);
}

/* v-contract-menu-restore: برگشت ظاهر منوی قراردادها مثل منوی مدیریت */
.contracts-menu .contracts-submenu{
  padding:8px 7px 10px !important;
}
.contracts-menu .submenu-section{
  background:rgba(255,255,255,.055) !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:13px !important;
  margin:7px 0 !important;
  padding:8px !important;
}
.contracts-menu .submenu-title{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  width:100% !important;
  color:#fff !important;
  font-weight:bold !important;
  padding:8px 9px !important;
  font-size:13px !important;
  border-radius:10px !important;
  background:transparent !important;
}
.contracts-menu .submenu-section.open > .submenu-title{
  background:rgba(255,255,255,.10) !important;
}
.contracts-menu .nested-submenu{
  border-right:2px solid rgba(255,255,255,.20) !important;
  margin-right:8px !important;
  padding-right:7px !important;
}
.contracts-menu .nested-submenu .subnav{
  display:block !important;
  font-size:12.5px !important;
  padding:9px 10px !important;
  margin:2px 0 !important;
  background:rgba(255,255,255,.035) !important;
  border-right:0 !important;
  border-radius:10px !important;
  white-space:normal !important;
  line-height:1.6 !important;
}
.contracts-menu .nested-submenu .subnav:hover{
  background:rgba(255,255,255,.14) !important;
}

/* separate-contract-menus: جدا شدن قرارداد اقساط از قولنامه خودرو با حفظ ظاهر منو */
.contracts-menu .direct-contract-submenu{
  padding:8px 7px 10px !important;
}
.contracts-menu .direct-contract-submenu .subnav{
  display:block !important;
  font-size:13px !important;
  font-weight:700 !important;
  padding:10px 12px !important;
  margin:4px 0 !important;
  background:rgba(255,255,255,.055) !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:11px !important;
  white-space:normal !important;
  line-height:1.55 !important;
}
.contracts-menu .direct-contract-submenu .subnav:hover,
.contracts-menu .direct-contract-submenu .subnav.active-subnav{
  background:rgba(255,255,255,.14) !important;
}

/* --- Option 3: نوار عملیات قرارداد انتخاب‌شده زیر داشبورد --- */
.selected-contract-actionbar-v3{
  margin:12px 0 14px;
  padding:12px 14px;
  border:1px solid #dbe7f5;
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 10px 26px rgba(15,23,42,.055);
  display:grid;
  grid-template-columns:minmax(230px, .95fr) minmax(0, 2.8fr);
  gap:12px;
  align-items:center;
}
.selected-actionbar-info-v3{
  min-width:0;
  padding:8px 12px;
  border-radius:14px;
  background:#f1f5f9;
  border:1px solid #e2e8f0;
}
.selected-actionbar-label-v3{
  display:inline-flex;
  padding:3px 9px;
  border-radius:999px;
  background:#0f2747;
  color:#fff;
  font-size:11px;
  font-weight:900;
  margin-bottom:6px;
}
.selected-actionbar-info-v3 strong{
  display:block;
  color:#10233f;
  font-size:16px;
  font-weight:950;
  line-height:1.7;
}
.selected-actionbar-info-v3 small{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.selected-actionbar-buttons-v3{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
}
.selected-actionbar-buttons-v3 .btn,
.selected-actionbar-buttons-v3 button.btn{
  margin:0!important;
  min-height:38px;
  border-radius:11px!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
}
.selected-actionbar-buttons-v3 form{margin:0;display:inline-flex;}
.selected-action-more-v3{
  position:relative;
}
.selected-action-more-v3 summary{
  list-style:none;
  cursor:pointer;
  min-height:38px;
  border-radius:11px;
  padding:9px 14px;
  background:#eef4fb;
  color:#0f2747;
  border:1px solid #dbe7f5;
  font-weight:950;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.selected-action-more-v3 summary::-webkit-details-marker{display:none;}
.selected-more-menu-v3{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  z-index:30;
  min-width:190px;
  padding:10px;
  border:1px solid #dbe7f5;
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 36px rgba(15,23,42,.16);
  display:flex;
  flex-direction:column;
  gap:8px;
}
.selected-more-menu-v3 .btn,
.selected-more-menu-v3 button.btn{width:100%;}
@media(max-width:1050px){
  .selected-contract-actionbar-v3{grid-template-columns:1fr;}
  .selected-actionbar-buttons-v3{justify-content:flex-start;}
}
@media(max-width:620px){
  .selected-actionbar-buttons-v3 .btn,
  .selected-actionbar-buttons-v3 button.btn,
  .selected-action-more-v3,
  .selected-action-more-v3 summary{width:100%;}
  .selected-more-menu-v3{position:static;margin-top:8px;box-shadow:none;}
}

/* vTheme: نمایش سایت / تم رنگی */
html[data-app-theme="green"]{--theme-sidebar:#1f3a5f;--theme-primary:#0f5132;--theme-primary-2:#146c43;--theme-soft:#e9f7ef;--theme-text:#1f3a5f;--theme-ring:rgba(15,81,50,.14)}
html[data-app-theme="blue"]{--theme-sidebar:#173b77;--theme-primary:#1d4ed8;--theme-primary-2:#2563eb;--theme-soft:#eff6ff;--theme-text:#173b77;--theme-ring:rgba(37,99,235,.14)}
html[data-app-theme="purple"]{--theme-sidebar:#4c1d95;--theme-primary:#7c3aed;--theme-primary-2:#8b5cf6;--theme-soft:#f3e8ff;--theme-text:#4c1d95;--theme-ring:rgba(124,58,237,.14)}
html[data-app-theme="brown"]{--theme-sidebar:#4a2f20;--theme-primary:#92400e;--theme-primary-2:#b45309;--theme-soft:#fff7ed;--theme-text:#4a2f20;--theme-ring:rgba(146,64,14,.14)}
html[data-app-theme="teal"]{--theme-sidebar:#134e4a;--theme-primary:#0f766e;--theme-primary-2:#14b8a6;--theme-soft:#ecfeff;--theme-text:#134e4a;--theme-ring:rgba(20,184,166,.16)}
html[data-app-theme="dark"]{--theme-sidebar:#111827;--theme-primary:#334155;--theme-primary-2:#475569;--theme-soft:#f1f5f9;--theme-text:#111827;--theme-ring:rgba(51,65,85,.18)}
html:not([data-app-theme]){--theme-sidebar:#1f3a5f;--theme-primary:#0f5132;--theme-primary-2:#146c43;--theme-soft:#e9f7ef;--theme-text:#1f3a5f;--theme-ring:rgba(15,81,50,.14)}
aside{background:var(--theme-sidebar)!important}.primary,.btn.primary,button.primary{background:var(--theme-primary)!important;color:#fff!important}.home-link,.home-link.fixed-menu{background:linear-gradient(135deg,var(--theme-primary),var(--theme-primary-2))!important;color:#fff!important}.nav.active{background:var(--theme-primary)!important}h1,.section-title,.panel-title,.quick-card h3,.form-topbar h2{color:var(--theme-text)!important}.panel-title span,.form-kicker,.amount{color:var(--theme-primary)!important}.panel-title span{background:var(--theme-soft)!important}.subsection-title{border-right-color:var(--theme-primary)!important;color:var(--theme-text)!important}.badge,.badge.ok{background:var(--theme-soft)!important;color:var(--theme-primary)!important}.quick-grid a:hover,.person-option:hover,.person-id-option:hover{border-color:var(--theme-primary)!important;background:var(--theme-soft)!important}.person-search:focus,input:focus,select:focus,textarea:focus{border-color:var(--theme-primary)!important;box-shadow:0 0 0 3px var(--theme-ring)!important;outline:none}.theme-setting-box{display:flex;flex-direction:column;gap:7px;padding:8px 10px;border-radius:12px;background:rgba(255,255,255,.08)}.theme-setting-box select{width:100%;border:1px solid rgba(255,255,255,.18);border-radius:10px;padding:7px 8px;font-weight:700;direction:rtl}.theme-setting-box small{font-size:11px;line-height:1.7;color:rgba(255,255,255,.75)}.theme-swatches{display:flex;gap:5px;justify-content:center;flex-wrap:wrap}.theme-swatches span{width:18px;height:18px;border-radius:999px;border:2px solid rgba(255,255,255,.7);box-shadow:0 1px 4px rgba(0,0,0,.2)}.theme-swatches [data-theme-dot="green"]{background:#0f5132}.theme-swatches [data-theme-dot="blue"]{background:#2563eb}.theme-swatches [data-theme-dot="purple"]{background:#7c3aed}.theme-swatches [data-theme-dot="brown"]{background:#92400e}.theme-swatches [data-theme-dot="teal"]{background:#0f766e}.theme-swatches [data-theme-dot="dark"]{background:#111827}.settings-menu .submenu-section>.submenu-title{justify-content:space-between}

.smart-vehicle{position:relative}.vehicle-search{width:100%;padding-left:36px;background:#fff}.vehicle-search:focus{border-color:var(--primary,#0f5132);box-shadow:0 0 0 3px rgba(15,81,50,.10);outline:none}.smart-vehicle:after{content:'🔎';position:absolute;left:10px;top:9px;opacity:.55;pointer-events:none}.vehicle-dropdown{display:none;position:absolute;z-index:3500;top:calc(100% + 6px);right:0;left:0;max-height:280px;overflow:auto;background:#fff;border:1px solid #cbd5e1;border-radius:14px;box-shadow:0 18px 40px rgba(15,35,70,.18);padding:6px}.smart-vehicle.open .vehicle-dropdown{display:block}.vehicle-option,.vehicle-empty{padding:10px 12px;border-radius:11px;border-bottom:1px solid #f1f5f9;color:#183153}.vehicle-option{cursor:pointer}.vehicle-option:hover{background:#e9f7ef}.vehicle-option.add-new{color:#0f7a55;font-weight:800;background:#eefaf4;border:1px dashed #99d8bd;margin-top:6px}.vehicle-empty{text-align:center;color:#64748b;font-size:12px}.catalog-table td,.catalog-table th{white-space:nowrap}.catalog-form{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:12px;align-items:end}.catalog-form label{display:flex;flex-direction:column;gap:6px}.status-off{opacity:.55}.badge.off{background:#fee2e2;color:#991b1b}.badge.on{background:#dcfce7;color:#166534}
@media(max-width:900px){.catalog-form{grid-template-columns:1fr}}

/* انتخاب گزینه فعال در جستجوی هوشمند با کلیدهای بالا/پایین */
.person-option.smart-active,
.person-id-option.smart-active,
.person-id-footer.smart-active,
.bank-option.smart-active,
.vehicle-option.smart-active,
.cashbox-option.smart-active,
.cashbox-id-option.smart-active,
.check-option.smart-active,
.smart-option.smart-active{
  background: rgba(8, 128, 96, .12) !important;
  border-color: rgba(8, 128, 96, .35) !important;
  outline: 1px solid rgba(8, 128, 96, .25);
}
.vehicle-option.add-new.smart-active{
  background: rgba(8, 128, 96, .18) !important;
}

/* پیام فارسی برای فیلدهای اجباری و جستجوی هوشمند عمومی */
.required-error{
  display:none;
  color:#dc2626;
  font-size:12px;
  font-weight:700;
  margin:0 0 6px;
  text-align:right;
}
.generic-smart-box,.smart-location{position:relative;width:100%}
.generic-smart-dropdown,.location-dropdown{
  display:none;
  position:absolute;
  z-index:4500;
  top:calc(100% + 6px);
  right:0;
  left:0;
  max-height:260px;
  overflow:auto;
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:14px;
  box-shadow:0 18px 40px rgba(15,35,70,.18);
  padding:6px;
}
.generic-smart-box.open .generic-smart-dropdown,
.smart-location.open .location-dropdown{display:block}
.generic-smart-option,.location-option,.generic-smart-empty,.location-empty{
  padding:10px 12px;
  border-radius:11px;
  border-bottom:1px solid #f1f5f9;
  color:#183153;
  background:#fff;
}
.generic-smart-option,.location-option{cursor:pointer}
.generic-smart-option:hover,.location-option:hover{background:#e9f7ef}
.generic-smart-empty,.location-empty{color:#64748b;text-align:center;font-size:12px}
.location-option.smart-active,.generic-smart-option.smart-active{
  background:rgba(8,128,96,.12)!important;
  border-color:rgba(8,128,96,.35)!important;
  outline:1px solid rgba(8,128,96,.25);
}
.location-row .smart-location input{width:100%}

/* Quick add modal: keeps add-person/add-car inside current browser page instead of opening installed PWA */
.quick-add-modal{display:none;position:fixed;inset:0;z-index:99999;direction:rtl}
.quick-add-modal.open{display:block}
.quick-add-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.45);backdrop-filter:blur(2px)}
.quick-add-panel{position:absolute;inset:4vh 4vw;background:#f8fafc;border:1px solid #cbd5e1;border-radius:20px;box-shadow:0 24px 80px rgba(15,23,42,.35);overflow:hidden;display:flex;flex-direction:column}
.quick-add-head{height:54px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;background:#fff;border-bottom:1px solid #e2e8f0;color:#0f2748;font-weight:800}
.quick-add-close{width:38px;height:38px;border:0;border-radius:12px;background:#fee2e2;color:#991b1b;font-size:26px;line-height:1;cursor:pointer}
.quick-add-frame{border:0;width:100%;height:calc(100% - 54px);background:#f8fafc}
body.quick-add-open{overflow:hidden}
@media (max-width: 800px){.quick-add-panel{inset:1vh 1vw;border-radius:14px}.quick-add-head{height:50px}.quick-add-frame{height:calc(100% - 50px)}}


/* تنظیمات دسترسی سریع */
.settings-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:12px;
  margin:16px 0 18px;
}
.settings-check-card{
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid #d8e3ef;
  background:#f8fbff;
  border-radius:14px;
  padding:13px 14px;
  cursor:pointer;
  transition:.15s ease;
}
.settings-check-card:hover{
  border-color:#9fc6e8;
  background:#eef7ff;
}
.settings-check-card input{
  width:18px;
  height:18px;
  accent-color:var(--primary,#0f6b3a);
}
.settings-check-title{
  font-weight:bold;
  color:#0b2545;
}
.quick-access-settings .form-actions{
  display:flex;
  gap:10px;
  justify-content:flex-start;
  margin-top:14px;
}


/* v-sidebar-collapse: منوی جمع‌شونده دسکتاپ با باز شدن روی حرکت موس */
@media (min-width: 901px){
  .shell{align-items:stretch;}
  aside.sidebar-collapsible{
    width:72px!important;
    min-width:72px!important;
    max-width:72px!important;
    padding:12px 8px!important;
    transition:width .22s ease, min-width .22s ease, max-width .22s ease, box-shadow .22s ease;
    position:sticky;
    z-index:50;
  }
  aside.sidebar-collapsible:hover,
  aside.sidebar-collapsible:focus-within{
    width:300px!important;
    min-width:300px!important;
    max-width:300px!important;
    box-shadow:-10px 0 28px rgba(15,23,42,.16);
  }
  aside.sidebar-collapsible .brand,
  aside.sidebar-collapsible .sidebar-clock,
  aside.sidebar-collapsible .menu-search-box,
  aside.sidebar-collapsible .submenu,
  aside.sidebar-collapsible .subnav,
  aside.sidebar-collapsible .submenu-section,
  aside.sidebar-collapsible .font-setting-box,
  aside.sidebar-collapsible .currency-setting-box,
  aside.sidebar-collapsible .theme-setting-box{
    opacity:0;
    pointer-events:none;
    max-height:0;
    overflow:hidden;
    margin:0!important;
    padding:0!important;
    border:0!important;
    transition:opacity .12s ease;
  }
  aside.sidebar-collapsible:hover .brand,
  aside.sidebar-collapsible:focus-within .brand,
  aside.sidebar-collapsible:hover .sidebar-clock,
  aside.sidebar-collapsible:focus-within .sidebar-clock,
  aside.sidebar-collapsible:hover .menu-search-box,
  aside.sidebar-collapsible:focus-within .menu-search-box,
  aside.sidebar-collapsible:hover .nav-group.open > .submenu,
  aside.sidebar-collapsible:focus-within .nav-group.open > .submenu,
  aside.sidebar-collapsible:hover .subnav,
  aside.sidebar-collapsible:focus-within .subnav,
  aside.sidebar-collapsible:hover .submenu-section,
  aside.sidebar-collapsible:focus-within .submenu-section,
  aside.sidebar-collapsible:hover .font-setting-box,
  aside.sidebar-collapsible:focus-within .font-setting-box,
  aside.sidebar-collapsible:hover .currency-setting-box,
  aside.sidebar-collapsible:focus-within .currency-setting-box,
  aside.sidebar-collapsible:hover .theme-setting-box,
  aside.sidebar-collapsible:focus-within .theme-setting-box{
    opacity:1;
    pointer-events:auto;
    max-height:none;
    overflow:visible;
  }
  aside.sidebar-collapsible .sidebar-mode-hint{
    display:flex;
    width:44px;
    height:38px;
    align-items:center;
    justify-content:center;
    margin:4px auto 10px!important;
    padding:0!important;
    border-radius:12px;
    background:rgba(255,255,255,.14);
    color:#fff;
    font-size:18px;
  }
  aside.sidebar-collapsible:hover .sidebar-mode-hint,
  aside.sidebar-collapsible:focus-within .sidebar-mode-hint{
    opacity:.75;
    width:100%;
    justify-content:center;
  }
  aside.sidebar-collapsible .nav,
  aside.sidebar-collapsible .nav.parent,
  aside.sidebar-collapsible .nav.parent.nav-toggle,
  aside.sidebar-collapsible .home-link.fixed-menu{
    width:52px!important;
    min-height:44px;
    padding:10px 0!important;
    margin:7px auto!important;
    overflow:hidden;
    white-space:nowrap;
    text-align:center!important;
    justify-content:center!important;
    font-size:0!important;
    line-height:1!important;
  }
  aside.sidebar-collapsible .nav::first-letter,
  aside.sidebar-collapsible .home-link.fixed-menu::first-letter{font-size:18px!important;}
  aside.sidebar-collapsible .nav.parent.nav-toggle{gap:0!important;}
  aside.sidebar-collapsible .nav.parent.nav-toggle .chev{display:none!important;}
  aside.sidebar-collapsible:hover .nav,
  aside.sidebar-collapsible:focus-within .nav,
  aside.sidebar-collapsible:hover .nav.parent,
  aside.sidebar-collapsible:focus-within .nav.parent,
  aside.sidebar-collapsible:hover .nav.parent.nav-toggle,
  aside.sidebar-collapsible:focus-within .nav.parent.nav-toggle,
  aside.sidebar-collapsible:hover .home-link.fixed-menu,
  aside.sidebar-collapsible:focus-within .home-link.fixed-menu{
    width:auto!important;
    padding:10px 12px!important;
    margin:5px 0!important;
    font-size:15px!important;
    text-align:right!important;
    justify-content:space-between!important;
  }
  aside.sidebar-collapsible:hover .nav.parent.nav-toggle .chev,
  aside.sidebar-collapsible:focus-within .nav.parent.nav-toggle .chev{display:inline!important;}
  aside.sidebar-collapsible:not(:hover):not(:focus-within) .nav-group.open > .submenu{display:none!important;}
  aside.sidebar-collapsible:hover .nav-group.open > .submenu,
  aside.sidebar-collapsible:focus-within .nav-group.open > .submenu{display:block!important;}
  aside.sidebar-collapsible:hover .submenu-section.open > .nested-submenu,
  aside.sidebar-collapsible:focus-within .submenu-section.open > .nested-submenu{display:block!important;}
  main{transition:padding .22s ease;}
}
@media (max-width:900px){
  .sidebar-mode-hint{display:none!important;}
}


/* v-sidebar-drawer: منوی اسلایدی حرفه‌ای از سمت راست */
.main-menu-toggle{
  position:fixed!important;
  top:16px!important;
  right:16px!important;
  z-index:1200!important;
  width:48px!important;
  height:48px!important;
  padding:0!important;
  border-radius:14px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:var(--theme-sidebar,#1f3a5f)!important;
  color:#fff!important;
  font-size:22px!important;
  font-weight:900!important;
  box-shadow:0 10px 28px rgba(15,23,42,.22)!important;
  border:1px solid rgba(255,255,255,.18)!important;
}
.main-menu-toggle:hover{filter:brightness(1.08)}
.sidebar-drawer-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.42);
  backdrop-filter:blur(2px);
  z-index:1090;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}
body.sidebar-open .sidebar-drawer-backdrop{
  opacity:1;
  pointer-events:auto;
}
body.sidebar-open{overflow:hidden;}
.shell{display:block!important;min-height:100vh!important;}
main{width:100%!important;max-width:none!important;padding:24px 24px 24px 24px!important;}
aside.sidebar-collapsible.sidebar-drawer{
  position:fixed!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  width:315px!important;
  min-width:315px!important;
  max-width:315px!important;
  height:100vh!important;
  z-index:1100!important;
  transform:translateX(105%)!important;
  transition:transform .22s ease, box-shadow .22s ease!important;
  box-shadow:-20px 0 45px rgba(15,23,42,.22)!important;
  padding:16px 14px 28px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
body.sidebar-open aside.sidebar-collapsible.sidebar-drawer{
  transform:translateX(0)!important;
}
aside.sidebar-collapsible.sidebar-drawer .brand,
aside.sidebar-collapsible.sidebar-drawer .sidebar-clock,
aside.sidebar-collapsible.sidebar-drawer .menu-search-box,
aside.sidebar-collapsible.sidebar-drawer .submenu,
aside.sidebar-collapsible.sidebar-drawer .subnav,
aside.sidebar-collapsible.sidebar-drawer .submenu-section,
aside.sidebar-collapsible.sidebar-drawer .font-setting-box,
aside.sidebar-collapsible.sidebar-drawer .currency-setting-box,
aside.sidebar-collapsible.sidebar-drawer .theme-setting-box{
  opacity:1!important;
  pointer-events:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
aside.sidebar-collapsible.sidebar-drawer .sidebar-mode-hint{
  display:flex!important;
  position:sticky!important;
  top:0!important;
  margin:0 0 10px auto!important;
  width:42px!important;
  height:42px!important;
  padding:0!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.14)!important;
  color:#fff!important;
  font-size:24px!important;
  line-height:1!important;
  z-index:2!important;
}
aside.sidebar-collapsible.sidebar-drawer .nav,
aside.sidebar-collapsible.sidebar-drawer .nav.parent,
aside.sidebar-collapsible.sidebar-drawer .nav.parent.nav-toggle,
aside.sidebar-collapsible.sidebar-drawer .home-link.fixed-menu{
  width:auto!important;
  min-height:0!important;
  padding:12px 14px!important;
  margin:7px 0!important;
  overflow:visible!important;
  white-space:normal!important;
  text-align:right!important;
  justify-content:space-between!important;
  font-size:15px!important;
  line-height:1.5!important;
}
aside.sidebar-collapsible.sidebar-drawer .nav.parent.nav-toggle .chev{display:inline!important;}
aside.sidebar-collapsible.sidebar-drawer .nav::first-letter,
aside.sidebar-collapsible.sidebar-drawer .home-link.fixed-menu::first-letter{font-size:inherit!important;}
@media (min-width:901px){
  aside.sidebar-collapsible.sidebar-drawer:hover,
  aside.sidebar-collapsible.sidebar-drawer:focus-within{
    width:315px!important;
    min-width:315px!important;
    max-width:315px!important;
  }
  aside.sidebar-collapsible.sidebar-drawer:not(:hover):not(:focus-within) .nav-group.open > .submenu{display:block!important;}
}
@media (max-width:900px){
  main{padding:16px!important;padding-top:74px!important;}
  .main-menu-toggle{top:12px!important;right:12px!important;width:46px!important;height:46px!important;}
  aside.sidebar-collapsible.sidebar-drawer{
    width:min(86vw,330px)!important;
    min-width:0!important;
    max-width:min(86vw,330px)!important;
    height:100vh!important;
    max-height:none!important;
  }
}
@media print{
  .main-menu-toggle,.sidebar-drawer-backdrop,aside.sidebar-collapsible.sidebar-drawer{display:none!important;}
  main{padding:0!important;}
}


/* v-sidebar-drawer-v2: جلوگیری از تداخل دکمه منو با عنوان صفحات + ساعت ظریف سراسری */
.main-menu-toggle{
  right:auto!important;
  left:18px!important;
  top:18px!important;
  width:44px!important;
  height:44px!important;
  border-radius:14px!important;
}
.global-date-time-pill{
  position:fixed;
  left:76px;
  top:20px;
  z-index:1180;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(190,205,225,.9);
  box-shadow:0 8px 24px rgba(15,23,42,.10);
  color:var(--theme-text,#1f3a5f);
  font-weight:800;
  font-size:18px;
  line-height:1;
  backdrop-filter:blur(8px);
  direction:rtl;
  pointer-events:none;
}
.global-date-time-pill strong{font-size:20px;direction:ltr;font-size:13px;color:var(--theme-primary,#0f5132);letter-spacing:.4px;}
.global-date-time-pill .dot{opacity:.45;color:#64748b;}
body.sidebar-open .main-menu-toggle{opacity:.25;pointer-events:none;}
@media (max-width:900px){
  .main-menu-toggle{left:12px!important;right:auto!important;top:12px!important;width:42px!important;height:42px!important;}
  .global-date-time-pill{left:62px;top:14px;padding:7px 10px;font-size:11px;gap:6px;max-width:calc(100vw - 120px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .global-date-time-pill strong{font-size:12px;}
}
@media print{.global-date-time-pill{display:none!important;}}


/* v-topbar-menu-v1: دکمه منو داخل نوار بالایی، بدون مزاحمت روی فرم‌ها */
body{
  padding-top:52px!important;
}
.app-topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:44px;
  z-index:1195;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 16px;
  box-sizing:border-box;
  background:rgba(248,250,252,.86);
  border-bottom:1px solid rgba(203,213,225,.88);
  box-shadow:0 6px 20px rgba(15,23,42,.06);
  backdrop-filter:blur(10px);
  direction:ltr;
}
.app-topbar .main-menu-toggle{
  position:static!important;
  inset:auto!important;
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  border-radius:10px!important;
  margin:0!important;
  padding:0!important;
  z-index:auto!important;
  box-shadow:0 6px 16px rgba(15,23,42,.16)!important;
  font-size:19px!important;
  line-height:1!important;
}
.app-topbar .global-date-time-pill{
  position:static!important;
  inset:auto!important;
  z-index:auto!important;
  height:28px;
  min-height:28px;
  padding:6px 12px!important;
  box-shadow:0 4px 12px rgba(15,23,42,.07)!important;
  background:rgba(255,255,255,.78)!important;
  direction:rtl;
}
body.sidebar-open .app-topbar .main-menu-toggle{
  opacity:.35;
  pointer-events:none;
}
@media (max-width:900px){
  body{padding-top:48px!important;}
  .app-topbar{
    height:42px;
    padding:5px 10px;
  }
  .app-topbar .main-menu-toggle{
    width:34px!important;
    height:34px!important;
  }
  .app-topbar .global-date-time-pill{
    font-size:11px;
    padding:6px 9px!important;
  }
}
@media print{
  body{padding-top:0!important;}
  .app-topbar{display:none!important;}
}

/* hossein-topbar-layout */
.app-topbar{
  direction:rtl !important;
}
.app-topbar .main-menu-toggle{
  order:2 !important;
}
.app-topbar .global-date-time-pill{
  order:1 !important;
  position:static !important;
  left:auto !important;
  top:auto !important;
  margin-left:auto !important;
  margin-right:0 !important;
  pointer-events:none;
}


/* final-topbar-rtl-fix: menu button right, datetime left */
.app-topbar{
  direction:rtl !important;
  position:fixed !important;
  top:0 !important;
  left:0 !important;
  right:0 !important;
  height:44px !important;
  padding:6px 16px !important;
  display:block !important;
  z-index:1195 !important;
}
.app-topbar .main-menu-toggle,
.main-menu-toggle{
  position:absolute !important;
  right:16px !important;
  left:auto !important;
  top:5px !important;
  width:34px !important;
  height:34px !important;
  border-radius:10px !important;
  z-index:1200 !important;
}
.app-topbar .global-date-time-pill,
.global-date-time-pill{
  position:absolute !important;
  left:16px !important;
  right:auto !important;
  top:7px !important;
  margin:0 !important;
  height:28px !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  padding:6px 12px !important;
  box-sizing:border-box !important;
  border-radius:999px !important;
  z-index:1196 !important;
}
@media(max-width:700px){
  .app-topbar .main-menu-toggle,
  .main-menu-toggle{right:10px!important;left:auto!important;}
  .app-topbar .global-date-time-pill,
  .global-date-time-pill{left:10px!important;right:auto!important;max-width:calc(100vw - 70px);}
}


/* Fix submenu font consistency */
.submenu a,
.submenu .subnav,
.submenu-item,
.nested-submenu a{
    font-size:15px !important;
    font-weight:600 !important;
    line-height:1.5 !important;
}


/* final-menu-submenu-unify: یکسان‌سازی فونت و اندازه زیرمنوهای مدیریت با بقیه منوها */
aside.sidebar-collapsible.sidebar-drawer .submenu-title,
aside.sidebar-collapsible.sidebar-drawer .submenu-title.section-toggle,
aside.sidebar-collapsible.sidebar-drawer button.submenu-title,
aside.sidebar-collapsible.sidebar-drawer .submenu-section > .submenu-title{
  width:100% !important;
  min-height:42px !important;
  box-sizing:border-box !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  padding:11px 14px !important;
  margin:6px 0 !important;
  border-radius:12px !important;
  border:0 !important;
  background:rgba(255,255,255,.10) !important;
  color:#eef6ff !important;
  font-family:inherit !important;
  font-size:15px !important;
  font-weight:800 !important;
  line-height:1.55 !important;
  text-align:right !important;
  white-space:normal !important;
  cursor:pointer !important;
}

aside.sidebar-collapsible.sidebar-drawer .submenu-title .chev,
aside.sidebar-collapsible.sidebar-drawer .submenu-title.section-toggle .chev{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:13px !important;
  line-height:1 !important;
  opacity:.9 !important;
  flex:0 0 auto !important;
}

aside.sidebar-collapsible.sidebar-drawer .nested-submenu{
  padding:4px 0 6px !important;
  margin:0 !important;
  overflow:visible !important;
  max-height:none !important;
}

aside.sidebar-collapsible.sidebar-drawer .nested-submenu .subnav,
aside.sidebar-collapsible.sidebar-drawer .submenu .subnav,
aside.sidebar-collapsible.sidebar-drawer a.subnav{
  width:100% !important;
  min-height:40px !important;
  box-sizing:border-box !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  padding:10px 14px !important;
  margin:4px 0 !important;
  border-radius:11px !important;
  color:#eef6ff !important;
  font-family:inherit !important;
  font-size:15px !important;
  font-weight:700 !important;
  line-height:1.55 !important;
  text-align:right !important;
  white-space:normal !important;
}

/* حذف اثر کلاس‌های قدیمی که زیرمنوی مدیریت را کوچک‌تر می‌کردند */
aside.sidebar-collapsible.sidebar-drawer .system-submenu .submenu-title,
aside.sidebar-collapsible.sidebar-drawer .system-submenu .subnav,
aside.sidebar-collapsible.sidebar-drawer .system-menu .submenu-title,
aside.sidebar-collapsible.sidebar-drawer .system-menu .subnav{
  font-size:15px !important;
  font-weight:800 !important;
  line-height:1.55 !important;
}


/* FIX add new vehicle button in contract picker */
.vc-picker-footer a.btn.success{
background:#198754 !important;
color:#fff !important;
border:1px solid #157347 !important;
opacity:1 !important;
filter:none !important;
}
.vc-picker-footer a.btn.success:hover{
background:#157347 !important;
color:#fff !important;
}
.vc-picker-footer a.btn.success,
.vc-picker-footer a.btn.success *{
color:#fff !important;
}





/* dashboard-layout-drag-settings-final */
.dashboard-hero-v2{
  grid-template-columns:minmax(0,1fr) 320px !important;
  margin-bottom:18px !important;
}
.dashboard-hero-v2 .hero-actions,
.dashboard-hero-v2 + .home-stats{
  display:none !important;
}
.hero-inline-stats{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(115px,1fr));
  gap:8px;
  margin-top:20px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.18);
  max-width:920px;
}
.hero-inline-stat{
  min-height:48px;
  padding:7px 10px;
  border-inline-start:1px solid rgba(255,255,255,.18);
  color:#fff;
}
.hero-inline-num{
  display:block;
  font-size:17px;
  font-weight:900;
  color:#ffffff;
  line-height:1.4;
}
.hero-inline-label{
  display:block;
  margin-top:2px;
  font-size:11.5px;
  color:#dcecff;
  line-height:1.6;
}
.dashboard-quick-v2{
  display:block !important;
  grid-template-columns:1fr !important;
  margin-bottom:16px;
}
.dashboard-quick-v2 .quick-card{padding:20px !important}
.dashboard-quick-v2 .quick-card h3{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:20px;
  margin-bottom:18px !important;
}
.dashboard-quick-v2 .quick-grid{
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr)) !important;
  gap:14px !important;
}
.dashboard-quick-v2 .quick-grid a{
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:48px;
  font-weight:800;
  border-radius:14px !important;
}
.dashboard-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.dashboard-module-card{
  position:relative;
  background:#fff;
  border:1px solid #d8dee9;
  border-radius:18px;
  padding:14px 16px;
  box-shadow:0 12px 30px rgba(15,35,70,.06);
  overflow:hidden;
  transition:transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.dashboard-module-card.dashboard-dragging{
  opacity:.72;
  transform:scale(.995);
  box-shadow:0 18px 45px rgba(15,35,70,.18);
}
.dashboard-module-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
  padding:10px 12px;
  border-radius:13px;
  background:#f8fafc;
}
.dashboard-module-head h3{
  margin:0;
  font-size:18px;
  color:#12355a;
}
.reminder-head{background:#eff6ff}
.installment-head{background:#fff7ed}
.checks-head{background:#fff1f2}
.dashboard-module-tools{
  position:absolute;
  left:14px;
  top:16px;
  display:flex;
  gap:8px;
  z-index:3;
}
.dashboard-drag-handle,
.dashboard-module-settings{
  width:32px;
  height:32px;
  border:1px solid #dbe3ef;
  border-radius:10px;
  background:#f8fafc;
  color:#12355a;
  font-weight:900;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.dashboard-drag-handle{
  cursor:grab;
  font-size:20px;
  line-height:1;
}
.dashboard-drag-handle:active{cursor:grabbing}
.dashboard-module-settings:hover,
.dashboard-drag-handle:hover{
  background:#e9f7ef;
  border-color:#0f6b3a;
}
.dashboard-module-card.dashboard-rows-limited .dashboard-module-body{
  overflow:auto;
}
.dashboard-mini-table.tablewrap{
  border:0;
  box-shadow:none;
  overflow:auto;
}
.dashboard-mini-table .table{font-size:13px}
.dashboard-mini-table .table th,
.dashboard-mini-table .table td{
  padding:9px 8px;
  white-space:nowrap;
}
.dashboard-settings-page .form-topbar{margin-bottom:18px}
.dashboard-settings-hint{
  background:#eef6ff;
  border:1px solid #d7e7ff;
  color:#1f3a5f;
  padding:12px 14px;
  border-radius:14px;
  margin-bottom:16px;
}
.dashboard-settings-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.dashboard-setting-row{
  display:grid;
  grid-template-columns:minmax(180px,1fr) 260px auto;
  gap:12px;
  align-items:center;
  background:#fff;
  border:1px solid #dbe3ef;
  border-radius:14px;
  padding:12px;
}
.dash-setting-module{
  font-weight:900;
  color:#12355a;
}
.dashboard-setting-row label{margin:0}
.dashboard-setting-row select{margin-top:6px}
.dash-order-tools{
  display:flex;
  gap:8px;
}
.dash-setting-move{
  border:1px solid #dbe3ef;
  border-radius:10px;
  background:#f8fafc;
  padding:8px 12px;
  font-weight:800;
  cursor:pointer;
}
.dash-setting-move:hover{
  background:#e9f7ef;
  border-color:#0f6b3a;
}
@media(max-width:1200px){
  .dashboard-hero-v2{grid-template-columns:1fr !important}
}
@media(max-width:760px){
  .dashboard-setting-row{grid-template-columns:1fr}
  .dashboard-module-tools{position:static;margin-bottom:8px;justify-content:flex-start}
}
@media(max-width:640px){
  .hero-inline-stats{grid-template-columns:repeat(2,1fr)}
  .hero-inline-stat{border-inline-start:0;border-bottom:1px solid rgba(255,255,255,.12)}
  .dashboard-quick-v2 .quick-grid{grid-template-columns:1fr !important}
}


/* dashboard-drag-handle-visible-fix */
.dashboard-module-card{overflow:visible !important}
.dashboard-module-tools{
  position:absolute !important;left:14px !important;top:14px !important;right:auto !important;
  display:flex !important;flex-direction:row !important;align-items:center !important;gap:8px !important;z-index:20 !important;
}
.dashboard-drag-handle,.dashboard-module-settings{
  width:34px !important;height:34px !important;min-width:34px !important;
  border:1px solid #dbe3ef !important;border-radius:10px !important;background:#f8fafc !important;color:#12355a !important;
  font-weight:900 !important;display:inline-flex !important;align-items:center !important;justify-content:center !important;
  text-decoration:none !important;line-height:1 !important;box-shadow:0 4px 12px rgba(15,35,70,.06) !important;user-select:none !important;
}
.dashboard-drag-handle{cursor:grab !important;font-size:23px !important;letter-spacing:-2px !important}
.dashboard-module-settings{cursor:pointer !important;font-size:17px !important}
.dashboard-drag-handle:active{cursor:grabbing !important}
.dashboard-drag-handle:hover,.dashboard-module-settings:hover{background:#e9f7ef !important;border-color:#0f6b3a !important;color:#0f5132 !important}
.dashboard-module-card.dashboard-dragging{opacity:.65 !important;transform:scale(.998) !important}

/* v-check-actions-menu - عملیات چک به صورت منوی شناور بدون پهن/بلند کردن ردیف */
.check-actions-compact{min-width:98px;display:flex;justify-content:center;align-items:center;position:relative;overflow:visible;}
.check-op-menu{position:relative;display:inline-block;min-width:96px;z-index:5;}
.check-op-menu[open]{z-index:10050;}
.check-op-menu summary{list-style:none;user-select:none;cursor:pointer;}
.check-op-menu summary::-webkit-details-marker{display:none;}
.check-op-btn{background:#0f7a55!important;color:#fff!important;border-color:#0f7a55!important;border-radius:11px!important;min-width:96px;text-align:center;}
.check-op-dropdown{position:absolute;top:calc(100% + 8px);right:0;display:flex;flex-direction:column;gap:6px;min-width:225px;max-height:70vh;overflow:auto;padding:8px;background:#fff;border:1px solid #d8e3f0;border-radius:14px;box-shadow:0 16px 36px rgba(15,35,65,.18);z-index:10060;}
.check-op-menu[open] .check-op-dropdown::before{content:"";position:absolute;top:-7px;right:22px;width:12px;height:12px;background:#fff;border-top:1px solid #d8e3f0;border-right:1px solid #d8e3f0;transform:rotate(-45deg);}
.check-op-dropdown .btn.small,.check-op-dropdown .inline-form,.check-op-dropdown .inline-form button{width:100%;justify-content:flex-start;text-align:right;white-space:nowrap;}
.check-op-dropdown .btn.small{border-radius:10px;}
.check-op-dropdown .inline-form{display:block;margin:0;}
.check-op-dropdown .inline-form button{display:flex;align-items:center;}
.check-table td.actions.checks-actions{overflow:visible;vertical-align:middle;width:115px;min-width:115px;}
.check-table tr:has(.check-op-menu[open]) td{background:#f8fbff!important;}
@media(max-width:1100px){.check-actions-compact{min-width:96px}.check-op-dropdown{min-width:215px}}

/* v-check-actions-portal - باز شدن منوی عملیات چک خارج از جدول برای جلوگیری از بریده شدن */
.check-op-menu{position:relative;display:inline-block;min-width:96px;z-index:5;}
.check-op-menu.open{z-index:10050;}
.check-op-btn{background:#0f7a55!important;color:#fff!important;border-color:#0f7a55!important;border-radius:11px!important;min-width:96px;text-align:center;cursor:pointer;}
.check-op-dropdown{display:none;flex-direction:column;gap:6px;min-width:225px;max-height:70vh;overflow:auto;padding:8px;background:#fff;border:1px solid #d8e3f0;border-radius:14px;box-shadow:0 16px 36px rgba(15,35,65,.18);z-index:10060;}
.check-op-menu.open .check-op-dropdown{display:flex;}
.check-op-dropdown-portal{position:fixed!important;display:flex!important;z-index:999999!important;}
.check-op-dropdown .btn.small,.check-op-dropdown .inline-form,.check-op-dropdown .inline-form button{width:100%;justify-content:flex-start;text-align:right;white-space:nowrap;}
.check-op-dropdown .btn.small{border-radius:10px;}
.check-op-dropdown .inline-form{display:block;margin:0;}
.check-op-dropdown .inline-form button{display:flex;align-items:center;}
.check-op-note{font-size:12px;line-height:1.8;color:#8a5a00;background:#fff7e6;border:1px solid #ffe1a6;border-radius:10px;padding:7px 9px;white-space:normal;}
.check-table td.actions.checks-actions{overflow:visible;vertical-align:middle;width:115px;min-width:115px;}
.check-table tr:has(.check-op-menu.open) td{background:#f8fbff!important;}

/* Check actions portal: menu is rendered as a body-level overlay so table scroll/overflow never clips it. */
.check-op-menu{position:relative;display:inline-block;overflow:visible!important;}
.check-op-menu > .check-op-dropdown{display:none!important;}
.check-op-dropdown-portal{
  position:fixed!important;
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  min-width:240px!important;
  max-width:min(300px, calc(100vw - 16px))!important;
  overflow:auto!important;
  padding:8px!important;
  background:#fff!important;
  border:1px solid #d8e3f0!important;
  border-radius:14px!important;
  box-shadow:0 18px 42px rgba(15,35,65,.22)!important;
  z-index:2147483000!important;
  direction:rtl!important;
}
.check-op-dropdown-portal .btn.small,
.check-op-dropdown-portal .inline-form,
.check-op-dropdown-portal .inline-form button{width:100%!important;justify-content:flex-start!important;text-align:right!important;white-space:nowrap!important;}
.check-op-dropdown-portal .inline-form{display:block!important;margin:0!important;}
.check-op-dropdown-portal .inline-form button{display:flex!important;align-items:center!important;}


/* final-check-actions-portal-fix: منوی عملیات چک همیشه کنار همان دکمه باز شود */
.check-op-dropdown-portal{
  position:fixed!important;
  display:flex!important;
  right:auto!important;
  inset-inline-start:auto!important;
  inset-inline-end:auto!important;
  transform:none!important;
  z-index:2147483000!important;
  width:max-content;
}
.check-op-dropdown-portal::before{display:none!important;}



/* v-check-actions-inline - حذف منوی سه‌نقطه و نمایش عملیات به صورت دکمه‌های کنار ردیف */
.check-table td.actions.checks-actions{
  overflow:visible !important;
  vertical-align:middle !important;
  min-width:620px !important;
  width:620px !important;
}
.check-inline-actions{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:6px !important;
  min-width:600px !important;
}
.check-inline-actions .inline-form{
  display:inline-flex !important;
  margin:0 !important;
}
.check-inline-actions .btn.small,
.check-inline-actions .inline-form button{
  min-height:30px !important;
  border-radius:9px !important;
  white-space:nowrap !important;
  padding:6px 10px !important;
  font-size:12px !important;
}
.check-action-warn{
  display:inline-flex !important;
  align-items:center !important;
  min-height:30px !important;
  padding:5px 10px !important;
  border-radius:9px !important;
  border:1px solid #f6c266 !important;
  background:#fff7e6 !important;
  color:#9a5b00 !important;
  font-size:11px !important;
  font-weight:700 !important;
  white-space:nowrap !important;
}
.check-op-menu,.check-op-dropdown,.check-op-dropdown-portal{
  display:none !important;
}


/* Check operation popup modal */
.check-popup-open{overflow:hidden}
.check-popup-modal{display:none;position:fixed;inset:0;z-index:100000;direction:rtl}
.check-popup-modal.open{display:block}
.check-popup-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.42);backdrop-filter:blur(2px)}
.check-popup-panel{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:min(980px,94vw);height:min(760px,88vh);background:#f8fafc;border:1px solid #cbd5e1;border-radius:22px;box-shadow:0 30px 90px rgba(15,23,42,.35);overflow:hidden;display:flex;flex-direction:column}
.check-popup-head{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;background:linear-gradient(180deg,#ffffff,#f1f5f9);border-bottom:1px solid #e2e8f0;color:#0f2748;font-weight:900}
.check-popup-close{width:38px;height:38px;border:0;border-radius:12px;background:#fee2e2;color:#991b1b;font-size:24px;line-height:1;cursor:pointer}
.check-popup-close:hover{background:#fecaca}
.check-popup-frame{border:0;width:100%;height:100%;background:#f8fafc}
@media(max-width:720px){
  .check-popup-panel{width:96vw;height:90vh;border-radius:16px}
  .check-popup-head{height:52px}
}


/* Pages loaded inside check popup iframe */
body.popup-iframe-body{background:#f8fafc!important;overflow:auto}
body.popup-iframe-body .app-topbar,
body.popup-iframe-body .sidebar{display:none!important}
body.popup-iframe-body .layout{display:block!important;min-height:auto!important}
body.popup-iframe-body main{margin:0!important;padding:18px!important;max-width:none!important;width:100%!important}
body.popup-iframe-body .topbar,
body.popup-iframe-body .page-head{margin-top:0!important;padding-top:0!important}
body.popup-iframe-body .topbar .actions-bar,
body.popup-iframe-body .top-actions{display:none!important}
body.popup-iframe-body .card{box-shadow:none!important}


/* ===== Drag and drop visible animation v2 ===== */
.menu-draggable,
.dashboard-module-card,
.dashboard-setting-row{
  will-change: transform;
  backface-visibility: hidden;
}

.menu-draggable{
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, background-color .18s ease !important;
}

.menu-draggable:hover{
  transform: translateY(-2px);
}

.menu-draggable.dragging{
  opacity: .78 !important;
  transform: scale(1.055) rotate(.35deg) !important;
  box-shadow: 0 16px 36px rgba(15,35,70,.26) !important;
  z-index: 999 !important;
  outline: 2px dashed rgba(13,110,253,.35) !important;
}

.dashboard-module-card.dashboard-dragging{
  opacity: .78 !important;
  transform: scale(1.018) rotate(.25deg) !important;
  box-shadow: 0 20px 48px rgba(15,35,70,.24) !important;
  z-index: 999 !important;
}

.bongah-reorder-animating{
  pointer-events: none;
}



/* v-dashboard-stats-floating-bottom
   آمار داشبورد از وسط متن خارج شد و به صورت نوار شناور در پایین بنر قرار گرفت.
   آمار هنوز داخل بنر است، زیر بنر نیست. */
.dashboard-hero-v2.home-hero{
  position:relative !important;
  overflow:hidden !important;
  padding-bottom:104px !important;
  min-height:310px !important;
}

.dashboard-hero-v2 .hero-text{
  padding-bottom:0 !important;
}

.dashboard-hero-v2 .hero-inline-stats{
  position:absolute !important;
  right:22px !important;
  left:22px !important;
  bottom:18px !important;
  z-index:3 !important;
  display:grid !important;
  grid-template-columns:repeat(5,minmax(110px,1fr)) !important;
  gap:0 !important;
  max-width:none !important;
  margin:0 !important;
  padding:10px 12px !important;
  border-top:1px solid rgba(255,255,255,.20) !important;
  border-radius:18px !important;
  background:rgba(3,18,34,.18) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10) !important;
  backdrop-filter:blur(6px);
}

.dashboard-hero-v2 .hero-inline-stat{
  min-height:48px !important;
  padding:6px 14px !important;
  color:#fff !important;
  text-align:center !important;
  border-inline-start:1px solid rgba(255,255,255,.20) !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
}

.dashboard-hero-v2 .hero-inline-stat:last-child{
  border-inline-start:0 !important;
}

.dashboard-hero-v2 .hero-inline-num{
  display:block !important;
  font-size:18px !important;
  font-weight:950 !important;
  color:#ffffff !important;
  line-height:1.2 !important;
  margin-bottom:2px !important;
}

.dashboard-hero-v2 .hero-inline-label{
  display:block !important;
  margin:0 !important;
  font-size:11.5px !important;
  color:#edf7ff !important;
  line-height:1.5 !important;
  font-weight:700 !important;
  white-space:nowrap !important;
}

@media(max-width:1100px){
  .dashboard-hero-v2.home-hero{
    padding-bottom:132px !important;
  }
  .dashboard-hero-v2 .hero-inline-stats{
    grid-template-columns:repeat(3,minmax(100px,1fr)) !important;
  }
}

@media(max-width:640px){
  .dashboard-hero-v2.home-hero{
    padding-bottom:190px !important;
  }
  .dashboard-hero-v2 .hero-inline-stats{
    right:12px !important;
    left:12px !important;
    bottom:12px !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  .dashboard-hero-v2 .hero-inline-stat{
    border-inline-start:0 !important;
    border-bottom:1px solid rgba(255,255,255,.12) !important;
  }
}

/* dashboard-compact-hero-stats-20260622
   بنر داشبورد جمع‌وجور شد و نوار آمار ظریف‌تر شد. */
.dashboard-hero-v2.home-hero{
  grid-template-columns:minmax(0,1fr) 255px !important;
  gap:16px !important;
  padding:18px !important;
  padding-bottom:78px !important;
  min-height:245px !important;
  margin-bottom:14px !important;
  border-radius:22px !important;
}
.dashboard-hero-v2 .hero-logo-card{
  min-height:190px !important;
  padding:10px !important;
  border-radius:18px !important;
}
.dashboard-hero-v2 .hero-logo-card img{
  max-height:235px !important;
}
.dashboard-hero-v2 .hero-text{
  padding:8px 6px 0 !important;
}
.dashboard-hero-v2 .hero-kicker{
  font-size:11px !important;
  padding:6px 10px !important;
  margin-bottom:10px !important;
}
.dashboard-hero-v2 .hero-text h2{
  font-size:28px !important;
  margin-bottom:8px !important;
  line-height:1.5 !important;
}
.dashboard-hero-v2 .hero-text p{
  font-size:13px !important;
  line-height:1.9 !important;
  max-width:760px !important;
}
.dashboard-hero-v2 .hero-inline-stats{
  right:50% !important;
  left:auto !important;
  bottom:16px !important;
  transform:translateX(50%) !important;
  width:min(74%, 760px) !important;
  grid-template-columns:repeat(5,minmax(86px,1fr)) !important;
  padding:6px 8px !important;
  border-radius:14px !important;
  border-top:1px solid rgba(255,255,255,.13) !important;
  background:rgba(3,18,34,.13) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08) !important;
}
.dashboard-hero-v2 .hero-inline-stat{
  min-height:38px !important;
  padding:4px 8px !important;
  border-inline-start:1px solid rgba(255,255,255,.13) !important;
}
.dashboard-hero-v2 .hero-inline-num{
  font-size:15px !important;
  line-height:1.15 !important;
  margin-bottom:1px !important;
}
.dashboard-hero-v2 .hero-inline-label{
  font-size:10px !important;
  line-height:1.35 !important;
  font-weight:700 !important;
}

@media(max-width:1100px){
  .dashboard-hero-v2.home-hero{
    grid-template-columns:1fr !important;
    padding-bottom:92px !important;
    min-height:auto !important;
  }
  .dashboard-hero-v2 .hero-logo-card{
    min-height:170px !important;
  }
  .dashboard-hero-v2 .hero-inline-stats{
    width:calc(100% - 36px) !important;
    grid-template-columns:repeat(3,minmax(95px,1fr)) !important;
  }
}
@media(max-width:640px){
  .dashboard-hero-v2.home-hero{
    padding:14px !important;
    padding-bottom:155px !important;
  }
  .dashboard-hero-v2 .hero-text h2{
    font-size:22px !important;
  }
  .dashboard-hero-v2 .hero-inline-stats{
    width:calc(100% - 24px) !important;
    bottom:12px !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}


/* compact hero final */
.dashboard-hero-v2{min-height:220px !important;padding:22px 28px 70px !important;position:relative;}
.hero-logo-card{transform:scale(.88);transform-origin:center;}
.hero-text h2{margin-bottom:8px !important;}
.hero-text p{margin-bottom:8px !important;max-width:780px;}
.hero-inline-stats{
max-width:760px !important;
position:absolute;
bottom:14px;
left:50%;
transform:translateX(-50%);
margin-top:0 !important;
padding:8px 14px !important;
border-top:none !important;
border-radius:16px;
background:rgba(8,20,45,.22);
backdrop-filter:blur(3px);
}
.hero-inline-stat{min-height:30px !important;padding:4px 8px !important;}
.hero-inline-num{font-size:15px !important;}
.hero-inline-label{font-size:10px !important;}


/* dashboard stats bottom */
.dashboard-hero-v2{position:relative!important;padding-bottom:78px!important;}
.hero-inline-stats{
 position:absolute!important;
 bottom:12px!important;
 left:50%!important;
 transform:translateX(-50%)!important;
 width:min(760px,72%)!important;
 margin:0!important;
 padding:0!important;
 border-top:none!important;
 background:rgba(10,28,58,.35)!important;
 backdrop-filter:blur(4px);
 border:1px solid rgba(255,255,255,.12)!important;
 border-radius:16px!important;
}

/* stats pinned to bottom of hero */
.dashboard-hero-v2{position:relative;padding-bottom:90px !important;}
.dashboard-hero-v2 .hero-text{position:static !important;}
.hero-inline-stats{
position:absolute !important;
bottom:18px;
left:50%;
transform:translateX(-50%);
width:72%;
max-width:760px !important;
margin-top:0 !important;
padding-top:0 !important;
border-top:none !important;
background:rgba(8,25,55,.35);
border:1px solid rgba(255,255,255,.12);
border-radius:14px;
padding:6px 10px !important;
}

/* hero-height-match-logo-final-20260622
   فقط ارتفاع بنر جمع شد؛ اندازه لوگو تغییر نکرد. */
.dashboard-hero-v2.home-hero{
  min-height:220px !important;
  padding:14px 18px 54px !important;
  grid-template-columns:minmax(0,1fr) 255px !important;
  gap:16px !important;
  align-items:center !important;
  margin-bottom:14px !important;
}
.dashboard-hero-v2 .hero-logo-card{
  min-height:190px !important;
  padding:10px !important;
  transform:none !important;
}
.dashboard-hero-v2 .hero-logo-card img{
  max-height:235px !important;
  max-width:100% !important;
}
.dashboard-hero-v2 .hero-text{
  padding:4px 6px 0 !important;
}
.dashboard-hero-v2 .hero-kicker{
  margin-bottom:8px !important;
}
.dashboard-hero-v2 .hero-text h2{
  margin:0 0 6px !important;
  line-height:1.35 !important;
}
.dashboard-hero-v2 .hero-text p{
  margin:0 !important;
  line-height:1.75 !important;
}
.dashboard-hero-v2 .hero-inline-stats{
  position:absolute !important;
  bottom:14px !important;
  left:50% !important;
  right:auto !important;
  transform:translateX(-50%) !important;
  width:min(720px,70%) !important;
  max-width:720px !important;
  margin:0 !important;
  padding:5px 10px !important;
  border-top:none !important;
  border:1px solid rgba(255,255,255,.13) !important;
  border-radius:14px !important;
  background:rgba(8,25,55,.32) !important;
  backdrop-filter:blur(4px) !important;
}
.dashboard-hero-v2 .hero-inline-stat{
  min-height:32px !important;
  padding:3px 8px !important;
}
@media(max-width:1100px){
  .dashboard-hero-v2.home-hero{
    min-height:auto !important;
    padding:14px 18px 78px !important;
    grid-template-columns:1fr !important;
  }
  .dashboard-hero-v2 .hero-inline-stats{
    width:calc(100% - 36px) !important;
  }
}
@media(max-width:640px){
  .dashboard-hero-v2.home-hero{
    padding:14px 14px 148px !important;
  }
  .dashboard-hero-v2 .hero-inline-stats{
    width:calc(100% - 24px) !important;
    bottom:12px !important;
  }
}


/* فرم جمع‌وجور و حرفه‌ای اشخاص */
.person-compact-form{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.person-compact-form .person-card{
  border:1px solid #dbe5f2;
  border-radius:18px;
  background:linear-gradient(180deg,#fff,#f9fbff);
  padding:14px 16px;
  box-shadow:0 8px 22px rgba(15,35,70,.04);
}
.person-compact-form .person-card-title,
.person-compact-form .details-card summary{
  font-size:16px;
  font-weight:900;
  color:#0f2f57;
  padding:0 0 12px;
  margin:0;
}
.person-compact-form .person-main-grid{
  grid-template-columns:repeat(4,minmax(150px,1fr));
  gap:12px 14px;
  align-items:end;
}
.person-compact-form .field label{
  margin-bottom:5px;
  font-size:12.5px;
  color:#334155;
  font-weight:700;
}
.person-compact-form input,
.person-compact-form select,
.person-compact-form textarea{
  min-height:38px;
  border-radius:11px;
  padding:8px 10px;
  font-size:13.5px;
}
.person-compact-form textarea{
  min-height:58px;
  max-height:92px;
}
.person-compact-form .issue-location-picker{
  grid-column:span 2;
}
.person-compact-form .location-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.person-compact-form .hint{
  display:block;
  margin-top:5px;
  font-size:11px;
  color:#64748b;
}
.person-compact-form .details-card{
  margin-top:0;
}
.person-compact-form .extra-grid{
  grid-template-columns:repeat(4,minmax(150px,1fr));
  gap:12px 14px;
}
.person-compact-form .extra-grid .field.wide{
  grid-column:span 2;
}
.person-compact-form .button-row{
  position:sticky;
  bottom:10px;
  z-index:5;
  display:flex;
  gap:10px;
  justify-content:flex-start;
  padding:10px 12px;
  border:1px solid #dbe5f2;
  border-radius:16px;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(8px);
  box-shadow:0 12px 30px rgba(15,35,70,.1);
}
.person-compact-form .button-row .primary{
  min-width:130px;
  font-weight:900;
}
.person-compact-note{
  margin-top:8px;
  font-size:12px;
  color:#64748b;
  text-align:left;
}
@media(max-width:1200px){
  .person-compact-form .person-main-grid,
  .person-compact-form .extra-grid{grid-template-columns:repeat(2,1fr)}
  .person-compact-form .issue-location-picker,
  .person-compact-form .extra-grid .field.wide{grid-column:span 2}
}
@media(max-width:700px){
  .person-compact-form .person-main-grid,
  .person-compact-form .extra-grid,
  .person-compact-form .location-row{grid-template-columns:1fr}
  .person-compact-form .issue-location-picker,
  .person-compact-form .extra-grid .field.wide{grid-column:span 1}
}


/* compact person form spacing */
.person-form .compact-grid{gap:4px 8px !important;}
.person-form .field{margin-bottom:0 !important;}
.person-form .field label{margin-bottom:2px !important;display:block;}
.person-form input,.person-form select{height:36px !important;padding:6px 10px !important;}
.person-form textarea{padding:6px 10px !important;min-height:52px !important;}
.person-form .location-row{gap:6px !important;}
.subsection-title{margin-bottom:8px !important;}


/* چیدمان نهایی فرم اشخاص - فقط ظاهر، بدون تغییر دیتابیس */
.person-form{
  max-width:1180px;
  margin-inline:auto;
}
.person-form .person-card{
  border:1px solid #dbe5f2;
  border-radius:18px;
  background:linear-gradient(180deg,#fff,#f9fbff);
  padding:14px 16px;
  margin-bottom:12px;
  box-shadow:0 8px 22px rgba(15,35,70,.04);
}
.person-form .person-card-title{
  font-size:16px;
  font-weight:900;
  color:#0f2f57;
  margin-bottom:12px;
}
.person-form .person-row{
  display:grid !important;
  gap:10px 12px !important;
  align-items:end;
  margin-bottom:10px;
}
.person-form .person-row:last-child{
  margin-bottom:0;
}
.person-form .row-3{
  grid-template-columns:repeat(3,minmax(190px,1fr)) !important;
}
.person-form .row-issued{
  grid-template-columns:minmax(190px,1fr) minmax(190px,1fr) minmax(430px,2fr) !important;
}
.person-form .address-row{
  grid-template-columns:minmax(520px,2.5fr) minmax(190px,.8fr) !important;
}
.person-form .notes-row{
  grid-template-columns:1fr !important;
}
.person-form .field label{
  margin-bottom:4px !important;
  font-size:12.5px;
  font-weight:800;
  color:#334155;
}
.person-form input,
.person-form select{
  min-height:38px !important;
  height:38px !important;
  padding:7px 10px !important;
  border-radius:11px !important;
  font-size:13.5px !important;
}
.person-form textarea{
  min-height:48px !important;
  max-height:84px;
  padding:8px 10px !important;
  border-radius:11px !important;
  font-size:13.5px !important;
}
.person-form .location-row{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:8px !important;
}
.person-form .hint{
  display:block;
  margin-top:4px;
  font-size:11px;
  color:#64748b;
}
.person-form .button-row{
  position:sticky;
  bottom:10px;
  z-index:5;
  display:flex;
  gap:10px;
  justify-content:flex-start;
  padding:10px 12px;
  border:1px solid #dbe5f2;
  border-radius:16px;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(8px);
  box-shadow:0 12px 30px rgba(15,35,70,.1);
}
.person-form .button-row .primary{
  min-width:135px;
  font-weight:900;
}
@media(max-width:1100px){
  .person-form .row-3,
  .person-form .row-issued,
  .person-form .address-row{
    grid-template-columns:1fr 1fr !important;
  }
  .person-form .issue-location-picker,
  .person-form .address-field,
  .person-form .notes-field{
    grid-column:1/-1;
  }
}
@media(max-width:680px){
  .person-form .row-3,
  .person-form .row-issued,
  .person-form .address-row,
  .person-form .location-row{
    grid-template-columns:1fr !important;
  }
}

/* topbar-home-breadcrumb-v1: کلید خانه کنار منو + مسیر صفحه */
.app-topbar .topbar-home-button,
.topbar-home-button{
  position:absolute!important;
  right:52px!important;
  left:auto!important;
  top:5px!important;
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:10px!important;
  background:#ffffff!important;
  color:#12395f!important;
  border:1px solid #d8e3f0!important;
  box-shadow:0 6px 16px rgba(15,23,42,.10)!important;
  text-decoration:none!important;
  font-size:22px!important;
  font-weight:900!important;
  line-height:1!important;
  z-index:1200!important;
}
.app-topbar .topbar-home-button:hover,
.topbar-home-button:hover{
  background:#eef6ff!important;
  border-color:#bcd3ea!important;
  transform:translateY(-1px);
}
.app-breadcrumb{
  position:absolute!important;
  right:170px!important;
  left:330px!important;
  top:7px!important;
  height:30px!important;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  direction:rtl!important;
  color:#52657b!important;
  font-size:13px!important;
  z-index:1197!important;
  pointer-events:auto!important;
}
.app-breadcrumb a,
.app-breadcrumb span{
  display:inline-flex!important;
  align-items:center!important;
  max-width:220px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#12395f!important;
  text-decoration:none!important;
  background:rgba(255,255,255,.68)!important;
  border:1px solid rgba(216,227,240,.86)!important;
  border-radius:999px!important;
  padding:5px 10px!important;
  line-height:1.1!important;
}
.app-breadcrumb a:hover{
  background:#eef6ff!important;
}
.app-breadcrumb .breadcrumb-separator{
  color:#8aa0b7!important;
  font-weight:900!important;
  margin:0 1px!important;
}
.app-breadcrumb .breadcrumb-current{
  color:#0b2f55!important;
  font-weight:800!important;
  background:transparent!important;
  border-color:transparent!important;
  padding-inline:4px!important;
}
@media(max-width:900px){
  .app-topbar .topbar-home-button,
  .topbar-home-button{right:52px!important;width:34px!important;height:34px!important;}
  .app-breadcrumb{right:92px!important;left:230px!important;font-size:12px!important;}
  .app-breadcrumb a,.app-breadcrumb span{max-width:130px!important;padding:5px 8px!important;}
}
@media(max-width:640px){
  .app-breadcrumb{display:none!important;}
}
@media print{
  .topbar-home-button,.app-breadcrumb{display:none!important;}
}

/* v1.1 اصلاح ظاهر بخش شرکای قرارداد اقساط
   - حذف اسکرول داخلی کادر شرکا
   - باز شدن لیست جستجوی شریک روی کادرها، نه زیر/پشت کادر
   - ارتفاع پویا برای ردیف‌ها
*/
.installment-partners-panel{
  overflow:visible!important;
  position:relative;
  z-index:20;
}

.installment-partners-panel .tablewrap{
  overflow:visible!important;
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
}

.installment-partners-panel .partners-table{
  overflow:visible!important;
  table-layout:fixed;
}

.installment-partners-panel .partners-table tbody,
.installment-partners-panel .partners-table tr,
.installment-partners-panel .partners-table td,
.installment-partners-panel .partners-table th{
  overflow:visible!important;
}

.installment-partners-panel .partners-table th:first-child,
.installment-partners-panel .partners-table td:first-child{
  width:55%;
}

.installment-partners-panel .partners-table th:nth-child(2),
.installment-partners-panel .partners-table td:nth-child(2){
  width:16%;
}

.installment-partners-panel .partners-table th:nth-child(3),
.installment-partners-panel .partners-table td:nth-child(3){
  width:14%;
  text-align:center;
}

.installment-partners-panel .partners-table th:nth-child(4),
.installment-partners-panel .partners-table td:nth-child(4){
  width:15%;
  text-align:center;
}

.installment-partners-panel .smart-id-person{
  position:relative;
  z-index:1000;
}

.installment-partners-panel .smart-id-person.open{
  z-index:99999;
}

.installment-partners-panel .person-id-dropdown{
  z-index:999999!important;
  max-height:280px;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}

.installment-partners-panel .person-id-option{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.installment-partners-panel .quick-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-start;
}

.installment-partners-panel #settlersTotal.ok-total{
  color:#087f5b;
}

.installment-partners-panel #settlersTotal.bad-total{
  color:#b42318;
}

.installment-partners-panel .settler-share{
  text-align:center;
}

.installment-partners-panel .remove-settler-row{
  white-space:nowrap;
}

@media(max-width:900px){
  .installment-partners-panel .partners-table{
    min-width:720px;
  }
}

/* v1.2 نمایش تمیز شرکای قرارداد اقساط + فیلتر شریک */
.partner-filter-field-v3 select{
  width:100%;
  min-height:38px;
  border:1px solid #cbd7e6;
  border-radius:10px;
  background:#fff;
  padding:6px 10px;
  color:#0f2f57;
  font-family:inherit;
}
.partner-filter-field-v3{
  min-width:220px;
}
.partners-cell{
  min-width:210px;
  vertical-align:middle;
}
.partners-compact{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
}
.partner-count-badge{
  background:#e9fff3!important;
  color:#07683e!important;
  border:1px solid #b7efd0!important;
  font-weight:900;
  white-space:nowrap;
}
.partners-chip-list{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:4px;
  max-width:260px;
  line-height:1.8;
}
.partner-chip{
  display:inline-flex;
  align-items:center;
  max-width:125px;
  padding:2px 7px;
  border-radius:999px;
  background:#f2f7fc;
  border:1px solid #d8e5f2;
  color:#315071;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.selected-partners-line{
  display:inline-flex!important;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
}
.selected-partner-chip{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.24);
  color:inherit;
  font-weight:900;
  white-space:nowrap;
}
@media(max-width:900px){
  .partner-filter-field-v3{min-width:100%;}
  .partners-chip-list{max-width:220px;}
}

/* دسته‌بندی قرارداد اقساط */
.installment-category-panel select,
.category-field-v3 select{
  width:100%;
  min-height:38px;
  border:1px solid #cbd7e6;
  border-radius:10px;
  background:#fff;
  padding:6px 10px;
  color:#0f2f57;
  font-family:inherit;
}
.category-field-v3{min-width:220px;}
.category-badge{
  background:#eef6ff!important;
  color:#0f3d70!important;
  border:1px solid #cfe0f5!important;
  font-weight:900;
}
@media(max-width:900px){.category-field-v3{min-width:100%;}}

/* دسته‌بندی قرارداد اقساط + جستجوی هوشمند فیلتر دسته‌بندی */
.installment-category-panel select,
.category-filter-field-v3 select{
  width:100%;
  min-height:38px;
  border:1px solid #cbd7e6;
  border-radius:10px;
  background:#fff;
  padding:6px 10px;
  color:#0f2f57;
  font-family:inherit;
}
.category-filter-field-v3{position:relative;overflow:visible!important;min-width:220px;}
.category-badge{
  background:#eef6ff!important;
  color:#0f3d70!important;
  border:1px solid #cfe0f5!important;
  font-weight:900;
}
.smart-category-filter{position:relative;z-index:50;}
.smart-category-filter.open{z-index:99999;}
.category-filter-search{
  width:100%;
  min-height:38px;
  border:1px solid #cbd7e6;
  border-radius:10px;
  background:#fff;
  padding:6px 10px;
  color:#0f2f57;
  font-family:inherit;
}
.category-filter-search:focus{
  outline:none;
  border-color:#0f766e;
  box-shadow:0 0 0 3px rgba(15,118,110,.12);
}
.category-filter-dropdown{
  display:none;
  position:absolute;
  z-index:999999;
  top:calc(100% + 5px);
  right:0;
  left:0;
  max-height:280px;
  overflow-y:auto;
  overflow-x:hidden;
  background:#fff;
  border:1px solid #cbd7e6;
  border-radius:12px;
  box-shadow:0 14px 35px rgba(15,47,87,.18);
  padding:6px;
}
.smart-category-filter.open .category-filter-dropdown{display:block;}
.category-filter-option{
  padding:9px 10px;
  border-radius:9px;
  cursor:pointer;
  font-size:13px;
  color:#17395f;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.category-filter-option:hover,
.category-filter-option.is-active{
  background:#e8f5f2;
  color:#064e3b;
  font-weight:900;
}
@media(max-width:900px){.category-filter-field-v3{min-width:100%;}}



.category-filter-field-v3{
 min-width:260px!important;
}
.category-filter-field-v3 select,
.installment-category-panel select{
 width:100%!important;
 min-height:42px;
}

/* Fix installment contracts filter layout - final */
.installment-list-page .filterbar-v3{
  overflow:visible!important;
}

.installment-list-page .installment-contract-filter-form{
  display:grid!important;
  grid-template-columns:minmax(420px, 1fr) 230px 190px 96px 1fr;
  grid-template-areas:
    "search category amount button clear"
    "reset reset reset reset reset";
  gap:10px!important;
  align-items:end!important;
  width:100%!important;
  direction:rtl;
}

.installment-list-page .installment-contract-filter-form .search-field-v3{
  grid-area:search!important;
  min-width:0!important;
  width:auto!important;
}

.installment-list-page .installment-contract-filter-form .category-field-v3,
.installment-list-page .installment-contract-filter-form .category-filter-field-v3{
  grid-area:category!important;
  min-width:0!important;
  width:auto!important;
  flex:unset!important;
}

.installment-list-page .installment-contract-filter-form .amount-field-v3{
  grid-area:amount!important;
  min-width:0!important;
  width:auto!important;
  flex:unset!important;
}

.installment-list-page .installment-contract-filter-form .search-btn-v3{
  grid-area:button!important;
  width:96px!important;
  height:40px!important;
  align-self:end!important;
}

.installment-list-page .installment-contract-filter-form .clear-btn-v3{
  grid-area:reset!important;
  width:100%!important;
  height:40px!important;
  justify-content:center!important;
  align-self:end!important;
}

.installment-list-page .installment-contract-filter-form input,
.installment-list-page .installment-contract-filter-form select{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}

.installment-list-page .installment-contract-filter-form label{
  display:block!important;
  margin-bottom:4px!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}

@media(max-width:1100px){
  .installment-list-page .installment-contract-filter-form{
    grid-template-columns:1fr 220px 180px 90px;
    grid-template-areas:
      "search category amount button"
      "reset reset reset reset";
  }
}

@media(max-width:760px){
  .installment-list-page .installment-contract-filter-form{
    grid-template-columns:1fr;
    grid-template-areas:
      "search"
      "category"
      "amount"
      "button"
      "reset";
  }
  .installment-list-page .installment-contract-filter-form .search-btn-v3{
    width:100%!important;
  }
}

/* رنگ دسته‌بندی قرارداد اقساط */
.installment-category-manager .category-create-form{
  display:grid;
  grid-template-columns:minmax(260px,1fr) 220px 110px;
  gap:12px;
  align-items:end;
  margin-bottom:14px;
}
.installment-category-manager .category-create-form input,
.installment-category-manager .category-create-form select{
  width:100%;
  min-height:40px;
  border:1px solid #cbd7e6;
  border-radius:10px;
  background:#fff;
  padding:6px 10px;
  font-family:inherit;
}
.colored-category-badge{
  border:1px solid rgba(15,47,87,.12)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);
}
.category-color-dot{
  display:inline-block;
  width:28px;
  height:18px;
  border-radius:999px;
  border:2px solid;
  vertical-align:middle;
}
.colored-selected-category{
  border:1px solid rgba(255,255,255,.35);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.25);
}
@media(max-width:760px){
  .installment-category-manager .category-create-form{
    grid-template-columns:1fr;
  }
}

/* اصلاح نهایی رنگ دسته‌بندی قرارداد اقساط */
.colored-category-badge{
  border:1px solid rgba(15,47,87,.12)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);
}
.category-color-dot{
  display:inline-block;
  width:28px;
  height:18px;
  border-radius:999px;
  border:2px solid;
  vertical-align:middle;
}
.inline-color-form{
  display:flex;
  gap:6px;
  align-items:center;
}
.inline-color-form select{
  min-width:120px;
}
.colored-selected-category{
  border:1px solid rgba(255,255,255,.35);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.25);
}



/* Fix category badge colors from category settings */
.category-badge.colored-category-badge{
    border:1px solid rgba(15,47,87,.12)!important;
    font-weight:900;
}

/* Final override: category badge must use database color */
.category-badge.colored-category-badge{
  background:var(--cat-bg, #eef6ff)!important;
  color:var(--cat-text, #0f3d70)!important;
  border:1px solid rgba(15,47,87,.12)!important;
}
.colored-selected-category{
  background:var(--cat-bg, rgba(255,255,255,.16))!important;
  color:var(--cat-text, inherit)!important;
}



/* Active deleted contracts tab must be red */
.view-chip.active[data-view="deleted"],
.status-tab.deleted-tab.is-active,
a.view-chip.active[href*="view=deleted"]{
    background:#dc2626 !important;
    border-color:#b91c1c !important;
    color:#ffffff !important;
}

/* people-modern-form-v2: فرم شکیل و منظم ثبت/ویرایش افراد */
.people-form-page{
  max-width:1280px!important;
  margin:18px auto 28px!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
.people-form-page .window-title,
.people-form-page>.panel{display:none!important;}
.people-form-hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  padding:22px 24px;
  margin-bottom:16px;
  border:1px solid #dbe7f3;
  border-radius:24px;
  background:
    radial-gradient(circle at 10% 20%, rgba(15,81,50,.10), transparent 30%),
    linear-gradient(135deg,#ffffff 0%,#f5f9ff 100%);
  box-shadow:0 18px 45px rgba(15,35,70,.08);
}
.people-form-hero h2{margin:4px 0 6px!important;color:#102f52!important;font-size:28px!important;font-weight:950!important;letter-spacing:-.4px;}
.people-form-hero p{margin:0;color:#64748b;font-size:13px;line-height:1.9;}
.people-form-hero .form-kicker{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:999px;background:#eaf5ee;color:#0f5132;font-size:12px;font-weight:900;}
.people-form-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.people-form-actions .btn.light{background:#fff!important;color:#12395f!important;border:1px solid #dbe7f3!important;}
.person-modern-form{max-width:1280px!important;margin:0 auto!important;display:block!important;}
.person-modern-shell{display:flex;flex-direction:column;gap:14px;}
.person-modern-card{
  background:rgba(255,255,255,.96)!important;
  border:1px solid #dbe7f3!important;
  border-radius:24px!important;
  padding:20px 22px!important;
  box-shadow:0 16px 42px rgba(15,35,70,.075)!important;
  overflow:visible!important;
}
.person-modern-card .card-head{display:flex;align-items:center;gap:12px;margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid #edf3fa;}
.person-modern-card .card-icon{width:42px;height:42px;border-radius:16px;background:linear-gradient(135deg,#eef6ff,#eaf5ee);display:flex;align-items:center;justify-content:center;font-size:20px;box-shadow:inset 0 0 0 1px rgba(15,35,70,.06);}
.person-modern-card h3{margin:0!important;color:#102f52!important;font-size:18px!important;font-weight:950!important;}
.person-modern-card small{color:#64748b;font-size:12px;}
.person-modern-form .modern-grid{display:grid!important;gap:14px 16px!important;align-items:start!important;}
.person-modern-form .grid-3{grid-template-columns:repeat(3,minmax(220px,1fr))!important;}
.person-modern-form .grid-4{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
.person-modern-form .second-line{margin-top:14px;}
.person-modern-form .address-grid{grid-template-columns:minmax(360px,2fr) minmax(190px,.7fr)!important;}
.person-modern-form .address-grid .wide{grid-column:auto!important;}
.person-modern-form .address-grid .full{grid-column:1/-1!important;}
.person-modern-form .field{min-width:0!important;margin:0!important;}
.person-modern-form .field label{display:flex!important;align-items:center;gap:4px;margin-bottom:7px!important;color:#1e3a5f!important;font-weight:900!important;font-size:13px!important;}
.person-modern-form .field label b{color:#dc2626;font-size:15px;line-height:1;}
.person-modern-form input,
.person-modern-form select,
.person-modern-form textarea{
  width:100%!important;
  min-height:44px!important;
  height:44px!important;
  border-radius:14px!important;
  border:1px solid #cbd9ea!important;
  background:#fff!important;
  padding:9px 13px!important;
  color:#0f172a!important;
  font-size:14px!important;
  font-weight:650!important;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.person-modern-form textarea{height:auto!important;min-height:74px!important;resize:vertical!important;line-height:1.9!important;}
.person-modern-form input:focus,
.person-modern-form textarea:focus{background:#fff!important;border-color:var(--theme-primary,#0f5132)!important;box-shadow:0 0 0 4px rgba(15,81,50,.10)!important;outline:none!important;}
.person-modern-form .important-field input{border-color:#88b99f!important;background:#fbfffd!important;}
.person-modern-form .location-row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;}
.person-modern-form .hint{display:block;margin-top:6px!important;color:#74839a!important;font-size:11px!important;line-height:1.7;}
.person-modern-form .location-dropdown{z-index:10050!important;}
.person-savebar{
  position:sticky;
  bottom:12px;
  z-index:80;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:16px;
  padding:12px 14px;
  border:1px solid #dbe7f3;
  border-radius:20px;
  background:rgba(255,255,255,.93);
  backdrop-filter:blur(10px);
  box-shadow:0 18px 44px rgba(15,35,70,.16);
}
.person-savebar .savebar-note{color:#64748b;font-size:12px;line-height:1.8;}
.person-savebar .savebar-actions{display:flex;gap:10px;align-items:center;}
.person-savebar .btn{min-width:116px;justify-content:center;}
.person-savebar .btn.primary{min-width:142px!important;font-weight:950!important;background:#0f5132!important;color:#fff!important;}
@media(max-width:1050px){
  .people-form-hero{align-items:flex-start;flex-direction:column;}
  .person-modern-form .grid-3,
  .person-modern-form .grid-4,
  .person-modern-form .address-grid{grid-template-columns:1fr 1fr!important;}
  .person-modern-form .issue-location-picker,
  .person-modern-form .address-grid .wide,
  .person-modern-form .address-grid .full{grid-column:1/-1!important;}
}
@media(max-width:700px){
  .people-form-page{margin:10px 8px 24px!important;}
  .people-form-hero{padding:18px;border-radius:20px;}
  .people-form-hero h2{font-size:22px!important;}
  .person-modern-card{padding:16px!important;border-radius:20px!important;}
  .person-modern-form .grid-3,
  .person-modern-form .grid-4,
  .person-modern-form .address-grid,
  .person-modern-form .location-row{grid-template-columns:1fr!important;}
  .person-savebar{position:static;flex-direction:column;align-items:stretch;}
  .person-savebar .savebar-actions{justify-content:stretch;}
  .person-savebar .btn{flex:1;}
}

/* تفکیک لیست قراردادهای اقساط از صفحه اقساط */
.list-only-hint-v3{
  margin:12px 2px 0;
  padding:12px 16px;
  border:1px dashed #c8d7ea;
  border-radius:14px;
  background:#f8fbff;
  color:#244466;
  font-size:13px;
}
.actions-cell{white-space:nowrap;}
.installment-detail-toolbar-v3{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin-bottom:12px;
}
.installment-detail-page-v3 .installment-detail-summary-card-v3 h2{margin-top:0;}
.installment-detail-grid-v3{gap:12px;}



/* اصلاح صفحه لیست قراردادهای اقساط: دکمه‌ها بالا، جدول تمام‌صفحه، اقساط جدا */
.installment-list-page-full{
  display:flex !important;
  flex-direction:column !important;
  min-height:calc(100vh - 96px) !important;
  gap:10px !important;
}
.installment-contract-top-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  flex-wrap:wrap !important;
  padding:12px 14px !important;
  border:1px solid #d7e3f0 !important;
  border-radius:16px !important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%) !important;
  box-shadow:0 8px 22px rgba(15,41,64,.06) !important;
}
.installment-contract-top-actions-main{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:8px !important;
  flex-wrap:wrap !important;
}
.installment-contract-top-actions .btn{
  min-height:36px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  white-space:nowrap !important;
}
.installment-contract-top-actions-hint{
  color:#64748b !important;
  font-size:13px !important;
  font-weight:700 !important;
}
.installment-list-page-full .contracts-toolbar-v3{
  margin:0 !important;
  padding:10px !important;
  gap:8px !important;
}
.installment-list-page-full .win-table-card{
  flex:1 1 auto !important;
  min-height:0 !important;
  display:flex !important;
  flex-direction:column !important;
}
.installment-list-page-full .top-contract-table{
  height:auto !important;
  min-height:520px !important;
  flex:1 1 auto !important;
  max-height:calc(100vh - 255px) !important;
}
.installment-list-page-full .top-contract-table table{
  min-width:1550px !important;
}
.installment-row-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  white-space:nowrap !important;
}
.installment-row-actions form{
  display:inline-flex !important;
  margin:0 !important;
}
.installment-row-actions .btn.small{
  min-width:72px !important;
  padding:5px 9px !important;
  font-size:12px !important;
  line-height:1.4 !important;
}
.btn.danger{
  background:#dc2626 !important;
  color:#fff !important;
  border-color:#b91c1c !important;
}
.btn.dark{
  background:#334155 !important;
  color:#fff !important;
  border-color:#1e293b !important;
}
.installment-list-page-full .list-only-hint-v3{
  margin-top:0 !important;
}
@media (max-width: 900px){
  .installment-list-page-full .top-contract-table{
    max-height:none !important;
    min-height:420px !important;
  }
  .installment-contract-top-actions{
    align-items:stretch !important;
  }
  .installment-contract-top-actions-main{
    width:100% !important;
  }
  .installment-contract-top-actions-main .btn{
    flex:1 1 140px !important;
  }
}


/* صفحه اقساط قرارداد: خلاصه داخل پنجره بازشو + تب‌بندی */
.installment-detail-page-v4{
  display:flex;
  flex-direction:column;
  min-height:calc(100vh - 88px);
  gap:10px;
}
.installment-detail-head-v4{
  padding:12px 16px;
  border:1px solid #d7e3f0;
  border-radius:16px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 8px 22px rgba(15,41,64,.06);
}
.installment-detail-title-v4{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.installment-detail-kicker-v4{
  font-size:12px;
  font-weight:800;
  color:#64748b;
}
.installment-detail-main-title-v4{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  font-size:18px;
  font-weight:900;
  color:#17324d;
}
.installment-detail-meta-v4{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  font-size:13px;
  color:#475569;
}
.contract-status-pill-v4{
  display:inline-flex;
  align-items:center;
  padding:4px 12px;
  border-radius:999px;
  background:#e8f7ef;
  color:#126b3e;
  font-size:12px;
  font-weight:900;
  border:1px solid #bfe8d0;
}
.installment-detail-toolbar-v4{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:10px 12px;
  border:1px solid #dbe7f3;
  border-radius:16px;
  background:#fff;
}
.installment-detail-tabs-v4{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:8px;
  border:1px solid #dbe7f3;
  border-radius:16px;
  background:#f8fbff;
}
.installment-tab-btn-v4{
  border:1px solid #d6e3f0;
  border-radius:12px;
  background:#fff;
  color:#294866;
  font-weight:900;
  padding:9px 18px;
  cursor:pointer;
}
.installment-tab-btn-v4.active{
  background:#17324d;
  color:#fff;
  border-color:#17324d;
}
.installment-tab-panel-v4{
  display:none;
  min-height:0;
  flex:1 1 auto;
}
.installment-tab-panel-v4.active{
  display:flex;
  flex-direction:column;
}
.installment-full-table-card-v4{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.installment-full-table-v4{
  flex:1 1 auto;
  min-height:430px;
  max-height:none;
  overflow:visible;
}
.installment-full-table-v4 table{
  min-width:1200px;
}
.payment-summary-strip-v4{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 10px;
}
.payment-summary-strip-v4 span{
  display:inline-flex;
  gap:6px;
  align-items:center;
  padding:8px 12px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#334155;
}
.contract-summary-modal-v4{
  display:none;
  position:fixed;
  inset:0;
  z-index:9999;
}
.contract-summary-modal-v4.open{
  display:block;
}
.contract-summary-modal-backdrop-v4{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.42);
  backdrop-filter:blur(2px);
}
.contract-summary-modal-box-v4{
  position:relative;
  width:min(920px, calc(100vw - 32px));
  max-height:calc(100vh - 48px);
  overflow:auto;
  margin:24px auto;
  background:#fff;
  border-radius:20px;
  border:1px solid #dbe7f3;
  box-shadow:0 28px 80px rgba(15,23,42,.28);
  padding:18px;
}
.contract-summary-modal-head-v4{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid #e5edf6;
  padding-bottom:12px;
  margin-bottom:14px;
}
.contract-summary-modal-head-v4 h2{
  margin:4px 0 0;
  color:#17324d;
}
.contract-summary-grid-v4{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.contract-summary-grid-v4>div{
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#f8fafc;
}
.contract-summary-grid-v4 span,
.contract-summary-note-v4 span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  margin-bottom:6px;
}
.contract-summary-grid-v4 b{
  color:#172b42;
}
.contract-summary-note-v4{
  margin-top:12px;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#fff;
}
.contract-summary-note-v4 p{
  margin:0;
  line-height:1.9;
}
.contract-summary-modal-actions-v4{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin-top:14px;
  border-top:1px solid #e5edf6;
  padding-top:12px;
}
.muted-row{
  opacity:.65;
}
@media (max-width:800px){
  .contract-summary-grid-v4{grid-template-columns:1fr;}
  .installment-detail-toolbar-v4 .btn{flex:1 1 auto;}
  .installment-tab-btn-v4{flex:1 1 auto;}
}

/* Auth & user access management */
.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#eaf2fb,#f8fafc);font-family:Tahoma,Arial,sans-serif;color:#0f2d4d}
.auth-card{width:min(420px,92vw);background:#fff;border:1px solid #d7e4f3;border-radius:24px;box-shadow:0 24px 70px rgba(15,45,77,.16);padding:34px;text-align:center}
.auth-logo{width:72px;height:72px;margin:0 auto 12px;border-radius:22px;background:#e8f2ff;display:flex;align-items:center;justify-content:center;font-size:34px}
.auth-card h1{margin:0 0 8px;font-size:28px;color:#102f54}.auth-card p{margin:0 0 22px;color:#64748b}.auth-form{text-align:right;display:grid;gap:10px}.auth-form label{font-weight:700;color:#334155}.auth-form input{height:44px;border:1px solid #cbd7e6;border-radius:12px;padding:0 14px;font-size:16px}.auth-form button{margin-top:12px;height:46px}.auth-help{margin-top:18px;font-size:12px;color:#64748b;background:#f8fafc;border:1px dashed #d7e4f3;border-radius:12px;padding:10px}.auth-messages{margin-bottom:14px;text-align:right}.topbar-user-pill{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #d7e4f3;border-radius:999px;padding:6px 12px;margin-inline-start:10px;color:#123456;box-shadow:0 4px 14px rgba(15,45,77,.06)}.topbar-user-pill small{color:#64748b}.topbar-user-pill a{color:#b42318;text-decoration:none;font-weight:700}.page-header-card{background:#fff;border:1px solid #d7e4f3;border-radius:18px;padding:22px 24px;margin:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px}.page-header-card h1{margin:0 0 8px;color:#102f54}.page-header-card p{margin:0;color:#64748b}.auth-table-card,.auth-user-form{margin:0 24px 24px;padding:18px;border-radius:18px;border:1px solid #d7e4f3;background:#fff}.clean-table{width:100%;border-collapse:collapse}.clean-table th,.clean-table td{border-bottom:1px solid #e5edf6;padding:12px;text-align:center}.clean-table th{background:#eef5fb;color:#102f54}.badge{display:inline-block;padding:5px 12px;border-radius:999px;font-weight:700}.badge.ok{background:#dcfce7;color:#166534}.badge.danger{background:#fee2e2;color:#991b1b}.row-actions{white-space:nowrap}.btn.small{padding:7px 12px;font-size:13px}.btn.muted{background:#eef2f7;color:#334155}.form-grid.three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.field{display:flex;flex-direction:column;gap:7px}.field label{font-weight:700;color:#334155}.field input,.field select{height:42px;border:1px solid #cbd7e6;border-radius:12px;padding:0 12px;background:#fff}.check-field{justify-content:end}.check-field label{display:flex;align-items:center;gap:8px;background:#f8fafc;border:1px solid #e5edf6;border-radius:12px;padding:10px}.section-title{color:#102f54;border-top:1px solid #e5edf6;padding-top:18px;margin-top:20px}.permissions-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.permission-item{display:flex;align-items:center;gap:8px;background:#f8fafc;border:1px solid #e5edf6;border-radius:12px;padding:12px;font-weight:700;color:#334155}.form-actions{margin-top:18px;display:flex;justify-content:flex-start}@media(max-width:900px){.form-grid.three,.permissions-grid{grid-template-columns:1fr}.page-header-card{margin:12px;align-items:flex-start;flex-direction:column}.auth-table-card,.auth-user-form{margin:0 12px 12px}.topbar-user-pill small{display:none}}


.header-power-btn{
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:50%;
  color:#64748b;
  font-weight:bold;
}
.header-power-btn:hover{
  color:#dc2626;
  background:#fee2e2;
}


/* power-logout-real-fix:
   قبلاً روی کادر تاریخ/ساعت pointer-events:none بود و کلیک پاور به لینک خروج نمی‌رسید.
   این بخش آخر فایل آمده تا همه overrideهای قبلی را قطعی اصلاح کند. */
.app-topbar .global-date-time-pill,
.global-date-time-pill{
  pointer-events:auto !important;
  direction:ltr !important;
  flex-direction:row !important;
}

.app-topbar .global-date-time-pill *,
.global-date-time-pill *{
  pointer-events:auto !important;
}

#globalClock{
  direction:ltr !important;
  unicode-bidi:isolate !important;
}

#globalJalaliDate{
  direction:rtl !important;
  unicode-bidi:isolate !important;
}

.header-power-btn{
  pointer-events:auto !important;
  cursor:pointer !important;
  text-decoration:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:26px !important;
  height:26px !important;
  min-width:26px !important;
  border-radius:50% !important;
  color:#64748b !important;
  background:transparent !important;
  font-weight:900 !important;
  line-height:1 !important;
  transition:background .15s ease,color .15s ease,transform .15s ease !important;
}

.header-power-btn:hover{
  color:#dc2626 !important;
  background:#fee2e2 !important;
  transform:scale(1.04);
}

.header-power-btn:active{
  transform:scale(.96);
}


.permissions-groups{
  display:grid;
  gap:14px;
}
.permission-group-card{
  border:1px solid #dbeafe;
  border-radius:16px;
  padding:14px;
  background:#fff;
}
.permission-group-title{
  font-weight:800;
  color:#0f3760;
  margin-bottom:10px;
}
.permission-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}
.permission-help{
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  padding:10px 14px;
  color:#475569;
  margin:10px 0 14px;
}
.permissions-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:10px;
}
.permission-item{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
}
.permission-item:hover{
  background:#eef6ff;
  border-color:#bfdbfe;
}
.permission-item input{
  width:16px;
  height:16px;
}

.role-permissions-page{display:flex;flex-direction:column;gap:18px}
.role-permission-card,.user-extra-permissions-card{padding:18px;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.08)}
.role-permission-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.role-permission-head h2,.permission-group-box h3{margin:0}
.permission-groups-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.permission-group-box{border:1px solid #e5e7eb;border-radius:14px;padding:12px;background:#f8fafc}
.permission-group-box h3{font-size:14px;color:#1f3b64;margin-bottom:10px}
.permission-check{display:flex;align-items:center;gap:8px;padding:7px 4px;font-size:13px}
.permission-check input{width:16px;height:16px}
.sticky-actions{position:sticky;bottom:12px;background:rgba(255,255,255,.85);backdrop-filter:blur(8px);padding:12px;border-radius:14px;box-shadow:0 8px 24px rgba(15,23,42,.08);display:flex;justify-content:flex-start}
.muted{color:#64748b;font-size:13px}

.account-type-switch{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:12px;
  margin-bottom:18px;
}
.account-type-option{
  display:flex;
  align-items:flex-start;
  gap:10px;
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:14px;
  background:#f8fafc;
  cursor:pointer;
}
.account-type-option.system{
  background:#fff7ed;
  border-color:#fed7aa;
}
.account-type-option input{margin-top:4px}
.account-type-option b{display:block;color:#1f3b64;margin-bottom:4px}
.account-type-option small{display:block;color:#64748b;line-height:1.8}
.system-permissions-box{
  margin-top:18px;
  border-top:1px solid #e5e7eb;
  padding-top:16px;
}
.role-permissions-page{display:flex;flex-direction:column;gap:18px}
.role-permission-card{padding:18px;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.08)}
.role-permission-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.permission-groups-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.permission-group-box{border:1px solid #e5e7eb;border-radius:14px;padding:12px;background:#f8fafc}
.permission-group-box h3{font-size:14px;color:#1f3b64;margin:0 0 10px}
.permission-check{display:flex;align-items:center;gap:8px;padding:7px 4px;font-size:13px}
.permission-check input{width:16px;height:16px}
.sticky-actions{position:sticky;bottom:12px;background:rgba(255,255,255,.85);backdrop-filter:blur(8px);padding:12px;border-radius:14px;box-shadow:0 8px 24px rgba(15,23,42,.08);display:flex;justify-content:flex-start}
.badge.warning{background:#fff7ed;color:#c2410c;border-color:#fed7aa}


.sidebar-user-card{display:flex;align-items:center;gap:10px;padding:12px;margin:10px 0;border-radius:12px;background:rgba(255,255,255,.08);color:#fff}
.sidebar-user-avatar{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.15)}
.sidebar-user-info{display:flex;flex-direction:column}
.sidebar-user-info strong{color:#fff}
.sidebar-user-info span,.sidebar-user-info small{font-size:12px;color:#dbeafe}
.sidebar-user-info .sidebar-db-path{direction:ltr;text-align:left;display:block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#bfdbfe}


/* Compact hidden row operations menu */
.installment-row-actions{
  min-width:54px;
  width:54px;
  text-align:center;
  overflow:visible !important;
}
.row-action-menu{
  position:relative;
  display:inline-flex;
  justify-content:center;
  align-items:center;
}
.row-action-trigger{
  width:34px;
  height:30px;
  border:1px solid #d7e3f1;
  border-radius:10px;
  background:#f8fafc;
  color:#173b63;
  font-size:22px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
}
.row-action-trigger:hover,
.row-action-menu.is-open .row-action-trigger{
  background:#173b63;
  color:#fff;
  border-color:#173b63;
}
.row-action-dropdown{
  position:absolute;
  top:36px;
  left:0;
  z-index:50;
  min-width:150px;
  display:none;
  flex-direction:column;
  gap:2px;
  padding:8px;
  background:#fff;
  border:1px solid #d7e3f1;
  border-radius:14px;
  box-shadow:0 16px 35px rgba(15,23,42,.18);
  text-align:right;
}
.row-action-menu.is-open .row-action-dropdown{
  display:flex;
}
.row-action-dropdown a,
.row-action-dropdown button{
  display:block;
  width:100%;
  border:0;
  background:transparent;
  color:#0f2742;
  text-decoration:none;
  padding:9px 10px;
  border-radius:10px;
  font:inherit;
  font-size:13px;
  text-align:right;
  cursor:pointer;
  white-space:nowrap;
}
.row-action-dropdown a:hover,
.row-action-dropdown button:hover{
  background:#eef6ff;
}
.row-action-dropdown form{
  margin:0;
}
.row-action-dropdown form button{
  color:#dc2626;
}
.row-action-dropdown form button:hover{
  background:#fee2e2;
}
.top-contract-table,
.top-contract-table .table,
.win-fixed-table{
  overflow:visible;
}


/* Compact actions menu for checks table */
.checks-actions{
  width:72px;
  min-width:72px;
  text-align:center;
  position:relative;
}

.check-actions-menu-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  position:relative;
}

.check-actions-menu{
  position:relative;
  display:inline-block;
  direction:rtl;
}

.check-actions-menu > summary{
  list-style:none;
}

.check-actions-menu > summary::-webkit-details-marker{
  display:none;
}

.check-actions-trigger{
  width:34px;
  height:30px;
  border-radius:12px;
  border:1px solid #d8e4f2;
  background:#f8fafc;
  color:#12345a;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:22px;
  font-weight:900;
  line-height:1;
  box-shadow:0 4px 12px rgba(15,23,42,.06);
  transition:background .15s ease, transform .15s ease, border-color .15s ease;
}

.check-actions-trigger:hover{
  background:#eaf2ff;
  border-color:#b9d3f2;
  transform:translateY(-1px);
}

.check-actions-menu[open] .check-actions-trigger{
  background:#12345a;
  color:#fff;
  border-color:#12345a;
}

.check-actions-dropdown{
  position:absolute;
  top:36px;
  left:0;
  z-index:80;
  min-width:210px;
  padding:8px;
  border-radius:14px;
  background:#fff;
  border:1px solid #dbe6f3;
  box-shadow:0 18px 42px rgba(15,23,42,.18);
  display:flex !important;
  flex-direction:column;
  gap:6px;
  text-align:right;
  white-space:nowrap;
}

.check-actions-dropdown .btn,
.check-actions-dropdown button,
.check-actions-dropdown a{
  width:100%;
  justify-content:flex-start;
  text-align:right;
  border-radius:10px;
  min-height:34px;
}

.check-actions-dropdown .inline-form{
  width:100%;
  display:block;
}

.check-actions-dropdown .check-action-warn{
  display:block;
  padding:8px 10px;
  border-radius:10px;
  background:#fff7ed;
  color:#9a3412;
  font-size:12px;
  white-space:normal;
}

.table-wrap,
.checks-table-wrap{
  overflow:visible;
}

@media (max-width: 900px){
  .check-actions-dropdown{
    left:auto;
    right:0;
  }
}


/* Professional floating action menu for checks */
.checks-actions{
  width:54px !important;
  min-width:54px !important;
  text-align:center !important;
  overflow:visible !important;
}

.check-actions-menu-wrap{
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  position:relative !important;
}

.check-actions-menu{
  display:inline-block !important;
  position:relative !important;
  direction:rtl !important;
}

.check-actions-menu > summary{
  list-style:none !important;
}
.check-actions-menu > summary::-webkit-details-marker{
  display:none !important;
}

.check-actions-trigger{
  width:34px !important;
  height:32px !important;
  border-radius:12px !important;
  border:1px solid #d5e2f1 !important;
  background:#17395f !important;
  color:#fff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  cursor:pointer !important;
  font-size:22px !important;
  font-weight:900 !important;
  line-height:1 !important;
  box-shadow:0 8px 18px rgba(15,23,42,.12) !important;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease !important;
}

.check-actions-trigger:hover{
  background:#0f2c4f !important;
  transform:translateY(-1px) !important;
  box-shadow:0 12px 24px rgba(15,23,42,.18) !important;
}

.check-actions-menu:not([open]) .check-actions-dropdown{
  display:none !important;
}

.check-actions-dropdown{
  position:fixed !important;
  z-index:99999 !important;
  width:210px !important;
  min-width:210px !important;
  max-width:240px !important;
  max-height:70vh !important;
  overflow:auto !important;
  padding:8px !important;
  border-radius:14px !important;
  background:#fff !important;
  border:1px solid #dbe6f3 !important;
  box-shadow:0 18px 44px rgba(15,23,42,.22) !important;
  display:flex !important;
  flex-direction:column !important;
  gap:6px !important;
  text-align:right !important;
  white-space:nowrap !important;
}

.check-actions-dropdown::before{
  content:'عملیات چک';
  display:block;
  padding:6px 8px 8px;
  margin-bottom:2px;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  border-bottom:1px solid #eef2f7;
}

.check-actions-dropdown .btn,
.check-actions-dropdown button,
.check-actions-dropdown a{
  width:100% !important;
  min-height:34px !important;
  justify-content:flex-start !important;
  text-align:right !important;
  border-radius:10px !important;
  padding:7px 10px !important;
  box-shadow:none !important;
}

.check-actions-dropdown .btn:hover,
.check-actions-dropdown button:hover,
.check-actions-dropdown a:hover{
  background:#eef6ff !important;
}

.check-actions-dropdown .danger,
.check-actions-dropdown button.danger,
.check-actions-dropdown .btn.danger{
  background:#fee2e2 !important;
  color:#b91c1c !important;
}

.check-actions-dropdown .danger:hover,
.check-actions-dropdown button.danger:hover,
.check-actions-dropdown .btn.danger:hover{
  background:#fecaca !important;
}

.check-actions-dropdown .inline-form{
  width:100% !important;
  display:block !important;
  margin:0 !important;
}

.check-actions-dropdown .check-action-warn{
  display:block !important;
  white-space:normal !important;
  padding:8px 10px !important;
  border-radius:10px !important;
  background:#fff7ed !important;
  color:#9a3412 !important;
  font-size:12px !important;
  line-height:1.8 !important;
}

.checks-table-wrap,
.table-wrap{
  overflow:auto;
}


/* FINAL unified compact floating check action menu */
.checks-actions{
  width:50px !important;
  min-width:50px !important;
  max-width:50px !important;
  text-align:center !important;
  overflow:visible !important;
}

.check-actions-menu-wrap{
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  position:relative !important;
}

.check-actions-menu{
  display:inline-block !important;
  position:relative !important;
  direction:rtl !important;
}

.check-actions-menu > summary{
  list-style:none !important;
}

.check-actions-menu > summary::-webkit-details-marker{
  display:none !important;
}

.check-actions-trigger{
  width:32px !important;
  height:30px !important;
  border-radius:11px !important;
  border:1px solid #d7e3f1 !important;
  background:#17395f !important;
  color:#fff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  cursor:pointer !important;
  font-size:21px !important;
  font-weight:900 !important;
  line-height:1 !important;
  box-shadow:0 7px 16px rgba(15,23,42,.12) !important;
}

.check-actions-trigger:hover{
  background:#102f53 !important;
  transform:translateY(-1px) !important;
}

.check-actions-menu:not([open]) .check-actions-dropdown{
  display:none !important;
}

.check-actions-dropdown{
  position:fixed !important;
  z-index:999999 !important;
  width:168px !important;
  min-width:168px !important;
  max-width:168px !important;
  max-height:70vh !important;
  overflow:auto !important;
  padding:6px !important;
  border-radius:13px !important;
  background:#ffffff !important;
  border:1px solid #d9e5f3 !important;
  box-shadow:0 16px 36px rgba(15,23,42,.24) !important;
  display:flex !important;
  flex-direction:column !important;
  gap:4px !important;
  text-align:right !important;
  white-space:nowrap !important;
  visibility:hidden;
}

.check-actions-dropdown::before{
  content:'عملیات چک';
  display:block;
  padding:5px 8px 7px;
  margin-bottom:2px;
  color:#64748b;
  font-size:11px;
  font-weight:800;
  border-bottom:1px solid #edf2f7;
}

.check-actions-dropdown .btn,
.check-actions-dropdown button,
.check-actions-dropdown a{
  width:100% !important;
  min-height:30px !important;
  height:auto !important;
  justify-content:flex-start !important;
  text-align:right !important;
  border-radius:9px !important;
  padding:5px 8px !important;
  box-shadow:none !important;
  font-size:12px !important;
  line-height:1.7 !important;
  margin:0 !important;
  border:0 !important;
}

.check-actions-dropdown .btn:hover,
.check-actions-dropdown button:hover,
.check-actions-dropdown a:hover{
  background:#eef6ff !important;
}

.check-actions-dropdown .danger,
.check-actions-dropdown button.danger,
.check-actions-dropdown .btn.danger{
  background:#fee2e2 !important;
  color:#b91c1c !important;
}

.check-actions-dropdown .danger:hover,
.check-actions-dropdown button.danger:hover,
.check-actions-dropdown .btn.danger:hover{
  background:#fecaca !important;
}

.check-actions-dropdown .inline-form{
  display:block !important;
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
}

.check-actions-dropdown .check-action-warn{
  display:block !important;
  white-space:normal !important;
  padding:6px 8px !important;
  border-radius:9px !important;
  background:#fff7ed !important;
  color:#9a3412 !important;
  font-size:11px !important;
  line-height:1.7 !important;
}

.checks-table-wrap,
.check-list-card,
.table-wrap{
  overflow:auto !important;
}


/* Installment payments: visible delete-last-payment action */
.inline-action-form{display:inline-flex;align-items:center;margin:0;gap:6px;}
.section-title-with-action{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;}
.btn.btn-sm{padding:6px 10px;font-size:12px;line-height:1.2;}
.row-action-dropdown form{display:block;margin:0;}
.row-action-dropdown button.danger-menu-item{width:100%;border:0;background:transparent;color:#b42318;text-align:right;padding:8px 10px;font:inherit;cursor:pointer;}
.row-action-dropdown button.danger-menu-item:hover{background:rgba(180,35,24,.08);}

/* v30: لیست خودرو شکیل‌تر و حذف نمایش دیتابیس از بالای صفحه */
.cars-page{display:flex;flex-direction:column;gap:14px}
.cars-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;background:linear-gradient(135deg,#ffffff 0%,#f7fbff 100%);border:1px solid #d8e3f0;border-radius:18px;padding:18px 20px;box-shadow:0 10px 28px rgba(15,35,70,.05)}
.cars-kicker{font-size:12px;font-weight:900;color:#0f5132;margin-bottom:5px}.cars-hero h2{margin:0 0 6px;color:#1f3a5f;font-size:24px}.cars-hero p{margin:0;color:#64748b;font-size:13px;line-height:1.8}.cars-add-btn{white-space:nowrap;font-weight:800}
.cars-filter-card{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;background:#fff;border:1px solid #d8e3f0;border-radius:16px;padding:10px 14px;box-shadow:0 8px 22px rgba(15,35,70,.04)}
.cars-filter-card-compact{padding:10px 12px;align-items:stretch}.cars-filter-topline{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.cars-search-form{display:flex;align-items:center;gap:8px;flex:1}.cars-search-compact{display:flex;flex-direction:row;align-items:end;gap:10px;justify-content:flex-end}.cars-main-search{display:flex;align-items:center;gap:8px}.cars-main-search input{flex:0 1 380px;max-width:380px;height:38px;background:#f8fafc}.cars-search-form input{height:38px;background:#f8fafc}.cars-search-form select{height:38px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:10px;padding:0 10px;color:#0f172a}.cars-advanced-filters{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.cars-advanced-filters label{display:flex;flex-direction:column;gap:4px;min-width:145px}.cars-advanced-filters label span{font-size:11px;font-weight:800;color:#64748b}.cars-advanced-filters input{width:145px}.cars-clear-btn{height:38px;display:inline-flex;align-items:center}.btn.ghost{background:#f8fafc;border:1px solid #e2e8f0;color:#475569}.cars-summary-pill{background:#eef6ff;border:1px solid #cfe0f5;color:#1f3a5f;border-radius:999px;padding:8px 14px;white-space:nowrap;align-self:flex-start}.cars-summary-pill b{font-size:17px;color:#0f172a}.cars-stat-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:12px 0 14px}.cars-stat-card{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff;border:1px solid #dbe5f1;border-radius:16px;padding:12px 14px;text-decoration:none;color:#1e293b;box-shadow:0 8px 22px rgba(15,35,70,.04);transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}.cars-stat-card:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(15,35,70,.08)}.cars-stat-card span{font-size:12px;font-weight:900;color:#64748b}.cars-stat-card b{font-size:22px;color:#0f172a}.cars-stat-card.active{border-color:#1f4b7a;box-shadow:0 0 0 2px rgba(31,75,122,.08)}.cars-stat-card.green b{color:#047857}.cars-stat-card.red b{color:#b91c1c}.cars-stat-card.red-soft b{color:#dc2626}.cars-stat-card.amber b{color:#b45309}.cars-stat-card.purple b{color:#6d28d9}
.cars-list-card{padding:0;overflow:hidden;border-radius:18px}.cars-list-head{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.cars-list-head strong{display:block;color:#1f3a5f;font-size:16px}.cars-list-head span{display:block;color:#64748b;font-size:12px;margin-top:5px}
.cars-table-wrap{border-radius:0}.cars-table{min-width:1180px}.cars-table th{font-size:13px;font-weight:900;background:#f8fafc;color:#334155}.cars-table td{vertical-align:middle}.cars-table tbody tr{transition:background .15s ease,transform .15s ease}.cars-table tbody tr:hover td{background:#fbfdff}.row-no{font-weight:900;color:#64748b;text-align:center}.car-name-cell b{display:block;color:#0f172a;margin-bottom:5px}.car-name-cell span{display:inline-block;color:#64748b;font-size:12px;background:#f1f5f9;border-radius:999px;padding:3px 9px}.plate-chip{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:150px;border:1px solid #cbd5e1;background:#fff;border-radius:12px;padding:8px 12px;font-weight:900;color:#1f3a5f;box-shadow:inset 0 0 0 1px #f1f5f9;direction:ltr;unicode-bidi:isolate;white-space:nowrap}.plate-chip .plate-iran{font-size:12px;color:#64748b;margin:0 2px}.plate-chip.plate-alert-soon{border-color:#f59e0b;box-shadow:inset 0 0 0 1px #ffedd5,0 0 0 2px rgba(245,158,11,.12)}.plate-chip.plate-alert-expired{border-color:#dc2626;box-shadow:inset 0 0 0 1px #fee2e2,0 0 0 2px rgba(220,38,38,.12)}.owner-cell{max-width:330px;color:#0f172a;font-weight:700}.car-specs-cell span,.car-dates-cell span{display:block;color:#64748b;font-size:12px;line-height:1.9}.car-specs-cell b,.car-dates-cell b{color:#0f172a;font-size:13px}.status-badge{font-weight:900}.vin-cell{direction:ltr;text-align:left;font-family:Consolas,monospace;color:#0f172a;background:#fbfdff}.car-actions{justify-content:flex-start}.car-actions .btn,.car-actions button{font-weight:800}.cars-empty{line-height:2.4;background:#fbfdff!important}
@media(max-width:1100px){.cars-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.cars-search-compact{flex-direction:column;align-items:stretch}.cars-main-search{justify-content:flex-end}.cars-main-search input{max-width:none}}
@media(max-width:900px){.cars-hero,.cars-filter-card{flex-direction:column;align-items:stretch}.cars-main-search,.cars-advanced-filters{flex-direction:column;align-items:stretch}.cars-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cars-main-search input,.cars-advanced-filters label,.cars-advanced-filters input,.cars-advanced-filters select,.cars-search-form button,.cars-search-form .btn,.cars-add-btn{width:100%;max-width:none;text-align:center}.cars-summary-pill{text-align:center}.cars-hero{text-align:center}}

/* vehicle-alert-settings-and-car-warning-cards */
.cars-stat-grid{grid-template-columns:repeat(7,minmax(0,1fr));}
.cars-stat-card.orange b{color:#ea580c;}
.vehicle-alert-settings-card{padding:18px;display:flex;flex-direction:column;gap:16px;}
.vehicle-alert-settings-card .two-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.setting-field{display:flex;flex-direction:column;gap:8px;background:#f8fafc;border:1px solid #dbe5f1;border-radius:16px;padding:14px;}
.setting-field span{font-weight:900;color:#0f2f57;}
.setting-field small{color:#64748b;line-height:1.8;font-size:12px;}
.setting-field input,.setting-field textarea{border:1px solid #cbd5e1;border-radius:12px;background:#fff;padding:10px 12px;font-weight:800;color:#0f172a;}
.setting-field textarea{resize:vertical;line-height:1.9;}
.inline-input-unit{display:flex;align-items:center;gap:8px;}
.inline-input-unit input{width:120px;text-align:center;}
.inline-input-unit b{background:#eef6ff;border:1px solid #cfe0f5;border-radius:999px;padding:9px 12px;color:#1f3a5f;white-space:nowrap;}
.full-width{grid-column:1/-1;}
@media(max-width:1280px){.cars-stat-grid{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:900px){.vehicle-alert-settings-card .two-cols{grid-template-columns:1fr}.cars-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}

/* v31: مدیریت لیستی وضعیت خودرو */
.vehicle-status-manager-card{padding:0;overflow:hidden;border-radius:18px;}
.status-manager-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;background:#f8fafc;border-bottom:1px solid #e2e8f0;}
.status-manager-head strong{display:block;color:#0f2f57;font-size:17px;font-weight:1000;margin-bottom:5px;}
.status-manager-head span{display:block;color:#64748b;font-size:12px;line-height:1.8;}
.status-add-form{display:flex;align-items:center;gap:8px;min-width:420px;}
.status-add-form input{height:40px;flex:1;border:1px solid #cbd5e1;border-radius:12px;background:#fff;padding:0 12px;font-weight:800;color:#0f172a;}
.status-list-table-wrap{overflow:auto;}
.status-list-table{width:100%;border-collapse:separate;border-spacing:0;min-width:880px;}
.status-list-table th{background:#fff;color:#334155;font-size:13px;font-weight:1000;border-bottom:1px solid #e2e8f0;padding:12px 14px;text-align:right;}
.status-list-table td{border-bottom:1px solid #eef2f7;padding:12px 14px;vertical-align:middle;background:#fff;}
.status-list-table tbody tr:hover td{background:#fbfdff;}
.status-inline-form{display:flex;align-items:center;gap:8px;}
.status-inline-form input{height:38px;min-width:240px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;padding:0 12px;font-weight:900;color:#0f172a;}
.status-inline-form input[readonly]{background:#f8fafc;color:#64748b;}
.status-inline-form button:disabled,.inline-action-form button:disabled{opacity:.45;cursor:not-allowed;}
.status-note{display:block;color:#64748b;margin-top:6px;font-size:11px;}
.usage-pill,.default-pill{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:7px 12px;font-weight:900;font-size:12px;white-space:nowrap;}
.usage-pill{background:#eef6ff;border:1px solid #cfe0f5;color:#1f3a5f;}
.default-pill{background:#e8fff3;border:1px solid #bbf7d0;color:#047857;}
.inline-action-form{display:inline-flex;align-items:center;margin:0;}
.settings-help-box{margin:14px 18px 18px;padding:12px 14px;border:1px dashed #cbd5e1;background:#fbfdff;border-radius:14px;color:#475569;line-height:1.9;font-size:12px;}
.compact-actions{margin-top:0;}
@media(max-width:900px){.status-manager-head{flex-direction:column;align-items:stretch}.status-add-form{min-width:0;flex-direction:column;align-items:stretch}.status-add-form input,.status-add-form button{width:100%}.vehicle-status-manager-card{border-radius:16px}}

/* v32: وضعیت‌های خودرو داخل پنجره مدیریتی */
.vehicle-status-summary-card{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-radius:18px;}
.vehicle-status-summary-text strong{display:block;color:#0f2f57;font-size:17px;font-weight:1000;margin-bottom:5px;}
.vehicle-status-summary-text span{display:block;color:#64748b;font-size:12px;line-height:1.8;}
.vehicle-status-summary-info{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.settings-modal-backdrop{position:fixed;inset:0;z-index:1200;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(15,23,42,.42);backdrop-filter:blur(2px);}
.settings-modal-backdrop.is-open{display:flex;}
body.modal-open{overflow:hidden;}
.settings-modal{width:min(1120px,96vw);max-height:88vh;background:#fff;border:1px solid #dbe5f1;border-radius:22px;box-shadow:0 24px 70px rgba(15,23,42,.24);overflow:hidden;display:flex;flex-direction:column;}
.settings-modal-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;background:linear-gradient(135deg,#f8fafc 0%,#eef6ff 100%);border-bottom:1px solid #e2e8f0;}
.settings-modal-head strong{display:block;color:#0f2f57;font-size:18px;font-weight:1000;margin-bottom:5px;}
.settings-modal-head span{display:block;color:#64748b;font-size:12px;line-height:1.8;}
.settings-modal-close{width:42px;height:42px;border:0;border-radius:14px;background:#e8eef7;color:#334155;font-size:28px;line-height:1;cursor:pointer;font-weight:900;}
.settings-modal-close:hover{background:#dbe5f1;}
.settings-modal-body{padding:16px 18px;overflow:auto;}
.status-add-form-modal{min-width:0;margin-bottom:14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:12px;}
.modal-table-wrap{border:1px solid #e2e8f0;border-radius:16px;overflow:auto;}
.modal-table-wrap .status-list-table th{background:#f8fafc;}
.modal-help-box{margin:14px 0 0;}
@media(max-width:900px){.vehicle-status-summary-card{flex-direction:column;align-items:stretch}.vehicle-status-summary-info{justify-content:stretch}.vehicle-status-summary-info>*{flex:1;text-align:center}.settings-modal-backdrop{padding:10px}.settings-modal{width:100%;max-height:94vh;border-radius:18px}.settings-modal-head{align-items:flex-start}.status-inline-form{flex-direction:column;align-items:stretch}.status-inline-form input{min-width:0;width:100%;}.status-inline-form button{width:100%;}.status-add-form-modal{flex-direction:column;align-items:stretch}.status-add-form-modal input,.status-add-form-modal button{width:100%;}}

/* Mobile card layout for installment contracts list */
.installment-mobile-cards{display:none;}
@media (max-width: 900px){
  .installment-list-page-full .installment-desktop-table-card{display:none !important;}
  .installment-list-page-full .list-only-hint-v3{display:none !important;}
  .installment-list-page-full .installment-contract-top-actions-hint{display:none !important;}
  .installment-list-page-full .contracts-toolbar-v3{border-radius:18px !important;}
  .installment-list-page .contract-status-tabs{overflow-x:auto;flex-wrap:nowrap !important;padding-bottom:2px;}
  .installment-mobile-cards{display:grid;grid-template-columns:1fr;gap:12px;margin:0 8px 14px;}
  .installment-contract-card{position:relative;background:linear-gradient(180deg,#fff 0%,#f8fbff 100%);border:1px solid #d7e3f0;border-radius:18px;padding:14px;box-shadow:0 10px 26px rgba(15,41,64,.08);overflow:hidden;}
  .installment-contract-card:active{transform:scale(.995);}
  .installment-card-main-link{position:absolute;inset:0;z-index:1;}
  .installment-card-head,.installment-card-meta,.installment-card-amounts,.installment-card-foot{position:relative;z-index:2;}
  .installment-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px;}
  .installment-card-kicker{font-size:12px;color:#64748b;font-weight:800;margin-bottom:4px;}
  .installment-card-title{font-size:18px;line-height:1.7;color:#102f54;font-weight:900;}
  .installment-status-pill{display:inline-flex;align-items:center;justify-content:center;min-width:58px;padding:5px 10px;border-radius:999px;background:#e8f8ef;color:#11613a;font-weight:900;font-size:12px;white-space:nowrap;}
  .installment-card-meta{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px;color:#64748b;font-size:13px;}
  .installment-card-meta span{background:#f1f5f9;border:1px solid #e3edf7;border-radius:12px;padding:6px 8px;}
  .installment-card-meta b{color:#102f54;direction:ltr;unicode-bidi:embed;}
  .installment-card-amounts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px;}
  .installment-card-amounts div{background:#f8fafc;border:1px solid #e3edf7;border-radius:14px;padding:10px;min-height:66px;display:flex;flex-direction:column;justify-content:center;gap:4px;}
  .installment-card-amounts div:first-child{grid-column:1 / -1;}
  .installment-card-amounts small{color:#64748b;font-size:12px;font-weight:800;}
  .installment-card-amounts b{color:#102f54;font-size:15px;font-weight:900;line-height:1.5;}
  .installment-card-amounts .debt b{color:#b42318;}
  .installment-card-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px dashed #d7e3f0;padding-top:10px;}
  .installment-card-tags{display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
  .installment-card-tags span{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#eef5ff;color:#123456;font-size:12px;font-weight:900;}
  .installment-card-tags .category-chip{background:var(--cat-bg);color:var(--cat-text);}
  .installment-card-actions{display:flex;gap:6px;align-items:center;flex-shrink:0;}
  .installment-card-actions a{position:relative;z-index:3;min-width:62px;text-align:center;}
  .installment-mobile-empty{background:#fff;border:1px dashed #cbd7e6;border-radius:16px;padding:18px;text-align:center;color:#64748b;font-weight:800;}
}

/* installment contract detail mobile polish - 1405/04/07 */
.installment-mobile-summary-v4{display:none;}
.installment-detail-mobile-cards-v4{display:none;}
@media (max-width:800px){
  .installment-detail-page-v4{gap:10px;padding-inline:2px;}
  .installment-detail-head-v4{padding:14px 16px;border-radius:22px;}
  .installment-detail-main-title-v4{font-size:20px;line-height:1.8;justify-content:center;text-align:center;}
  .installment-detail-kicker-v4{text-align:right;}
  .contract-status-pill-v4{order:-1;margin-inline:auto;padding:8px 20px;font-size:15px;}
  .installment-detail-meta-v4{justify-content:center;text-align:center;gap:8px;font-size:14px;}
  .installment-detail-meta-v4 span{display:inline-flex;gap:6px;align-items:center;justify-content:center;}
  .installment-mobile-summary-v4{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px;}
  .installment-mobile-summary-v4>div{border:1px solid #e2eaf4;background:#f8fbff;border-radius:16px;padding:10px 8px;text-align:center;}
  .installment-mobile-summary-v4 span{display:block;color:#64748b;font-size:12px;font-weight:900;margin-bottom:4px;}
  .installment-mobile-summary-v4 b{display:block;color:#102f54;font-size:15px;font-weight:1000;line-height:1.5;}

  .installment-detail-toolbar-v4{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px;border-radius:22px;}
  .installment-detail-toolbar-v4 .btn,
  .installment-detail-toolbar-v4 .inline-action-form,
  .installment-detail-toolbar-v4 .inline-action-form .btn{width:100%;min-height:58px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:16px;font-weight:1000;border-radius:16px;white-space:normal;line-height:1.45;}
  .installment-detail-toolbar-v4 .btn:first-child{order:1;}
  .installment-detail-toolbar-v4 .blue{order:2;}
  .installment-detail-toolbar-v4 .success{order:3;}
  .installment-detail-toolbar-v4 .gray{order:4;}
  .installment-detail-toolbar-v4 .primary{order:5;}
  .installment-detail-toolbar-v4 .inline-action-form{order:6;margin:0;}
  .installment-detail-toolbar-v4 .dark{order:7;grid-column:1 / -1;}

  .installment-detail-tabs-v4{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:8px;border-radius:20px;}
  .installment-tab-btn-v4{padding:11px 8px;min-height:48px;border-radius:14px;font-size:15px;}

  .installment-full-table-card-v4{border-radius:18px;overflow:hidden;}
  .installment-full-table-card-v4 .section-title{font-size:18px;text-align:center;padding:14px 10px;margin:0;border-top:0;border-bottom:1px solid #e5edf6;}
  #tab-installments .installment-full-table-v4{display:none !important;}
  .installment-detail-mobile-cards-v4{display:grid;grid-template-columns:1fr;gap:12px;padding:12px;background:#f8fbff;}
  .installment-installment-card-v4{background:#fff;border:1px solid #d9e5f2;border-radius:20px;padding:14px;box-shadow:0 10px 26px rgba(15,41,64,.07);border-right:5px solid #94a3b8;}
  .installment-installment-card-v4.is-paid{border-right-color:#16a34a;background:linear-gradient(180deg,#ffffff 0%,#f2fff7 100%);}
  .installment-installment-card-v4.is-due{border-right-color:#f59e0b;background:linear-gradient(180deg,#ffffff 0%,#fffaf0 100%);}
  .installment-installment-card-v4.is-overdue{border-right-color:#dc2626;background:linear-gradient(180deg,#ffffff 0%,#fff5f5 100%);}
  .installment-card-top-v4{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;}
  .installment-card-top-v4 small{display:block;color:#64748b;font-size:12px;font-weight:900;margin-bottom:2px;}
  .installment-card-top-v4 strong{font-size:24px;color:#102f54;font-weight:1000;}
  .installment-status-badge-v4{display:inline-flex;align-items:center;justify-content:center;min-width:86px;padding:7px 12px;border-radius:999px;background:#eef2f7;color:#334155;font-weight:1000;font-size:13px;}
  .is-paid .installment-status-badge-v4{background:#dcfce7;color:#166534;}
  .is-due .installment-status-badge-v4{background:#fef3c7;color:#92400e;}
  .is-overdue .installment-status-badge-v4{background:#fee2e2;color:#991b1b;}
  .installment-card-amount-v4{font-size:22px;font-weight:1000;color:#0f6845;text-align:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:12px;margin-bottom:10px;}
  .installment-card-info-grid-v4{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
  .installment-card-info-grid-v4>div{background:#f8fbff;border:1px solid #e3edf7;border-radius:14px;padding:10px;text-align:center;}
  .installment-card-info-grid-v4 span{display:block;color:#64748b;font-size:12px;font-weight:900;margin-bottom:4px;}
  .installment-card-info-grid-v4 b{display:block;color:#17324d;font-weight:1000;font-size:14px;line-height:1.55;}
  .installment-card-guarantee-v4{margin-top:10px;background:#eef5ff;color:#17324d;border:1px solid #d7e7ff;border-radius:14px;padding:9px 10px;text-align:center;font-weight:900;}
  .installment-card-pay-btn-v4{margin-top:10px;width:100%;min-height:46px;border-radius:14px;font-weight:1000;}
}


/* Mobile compact redesign for installment contract form - 1405/04/07 */
@media (max-width:800px){
  main:has(.installment-form){padding:10px 8px 94px;}
  .installment-form{
    padding:8px!important;
    border-radius:22px!important;
    background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
    overflow:visible!important;
  }
  .installment-form .form-topbar{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    margin-bottom:10px;
    padding:12px 14px!important;
    border-radius:18px!important;
    text-align:center;
  }
  .installment-form .form-topbar h2{font-size:22px!important;line-height:1.55;margin:0;color:#102f54;}
  .installment-form .form-kicker{font-size:12px;margin-bottom:2px;}
  .installment-form .form-topbar p{font-size:12px;line-height:1.9;margin:4px auto 0;max-width:330px;}
  .installment-form .quick-actions{justify-content:center;}
  .installment-form .quick-actions .btn{min-height:42px;padding:9px 18px;border-radius:14px;font-weight:900;}

  .installment-layout,
  .installment-layout.second-row,
  .tidy-contract-grid{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;margin-bottom:10px!important;}
  .installment-form .panel{
    padding:12px!important;
    border-radius:18px!important;
    box-shadow:0 8px 22px rgba(15,41,64,.045)!important;
  }
  .installment-form .panel-title{
    font-size:18px!important;
    line-height:1.5;
    margin-bottom:9px!important;
    justify-content:flex-start;
  }
  .installment-form .panel-title span{width:28px;height:28px;border-radius:10px;}
  .installment-form label{gap:5px!important;font-size:13px!important;font-weight:800;color:#334155;}
  .installment-form input,
  .installment-form select{
    min-height:44px!important;
    padding:9px 11px!important;
    border-radius:13px!important;
    font-size:14px!important;
  }
  .installment-form .hint,
  .installment-form .hint-box{font-size:12px!important;line-height:1.9;margin:6px 0!important;}

  /* compact live calculation: one narrow list instead of four large boxes */
  .installment-form .calc-panel{order:-1;}
  .installment-form .calc-cards{
    display:block!important;
    overflow:hidden;
    border:1px solid #e2eaf4;
    border-radius:16px;
    background:#fff;
  }
  .installment-form .calc-cards div{
    display:flex!important;
    flex-direction:row!important;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:9px 12px!important;
    border:0!important;
    border-bottom:1px solid #eef2f7!important;
    border-radius:0!important;
    background:#f8fbff!important;
    min-height:0!important;
  }
  .installment-form .calc-cards div:last-child{border-bottom:0!important;}
  .installment-form .calc-cards small{margin:0!important;font-size:12px!important;font-weight:900;color:#64748b;}
  .installment-form .calc-cards b{font-size:17px!important;font-weight:1000;color:#102f54;direction:ltr;unicode-bidi:embed;}
  .installment-form #calcNote{text-align:center;margin:7px 0 0!important;}

  /* financial fields: denser mobile grid */
  .installment-form .financial-panel .grid.two{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:9px!important;
  }
  .installment-form .financial-panel label:first-child,
  .installment-form .financial-panel label:nth-child(5),
  .installment-form .financial-panel .hint-box{grid-column:1 / -1;}
  .installment-form .financial-panel label:nth-child(6),
  .installment-form .financial-panel label:nth-child(7),
  .installment-form .financial-panel label:nth-child(8){grid-column:auto;}
  .installment-form .financial-panel label:nth-child(8){grid-column:1 / -1;}

  /* payment type as mobile segmented control */
  .installment-form .pay-type-cards{
    display:grid!important;
    grid-template-columns:repeat(3,1fr)!important;
    gap:7px!important;
    margin-bottom:10px!important;
  }
  .installment-form .pay-type-cards label{
    min-height:58px!important;
    padding:8px 6px!important;
    border-radius:15px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center;
    gap:5px!important;
    font-size:12px!important;
    line-height:1.5;
  }
  .installment-form .pay-type-cards input{width:18px!important;height:18px!important;min-height:0!important;padding:0!important;}
  .installment-form .regular-schedule.grid.two{grid-template-columns:1fr 1fr!important;gap:9px!important;}
  .installment-form .one-time-schedule label{margin-top:8px;}

  /* smaller supporting sections */
  .installment-form .compact-mobile-category .grid.two{grid-template-columns:1fr!important;gap:8px!important;}
  .installment-form .compact-mobile-category p.hint:nth-of-type(2){display:none;}
  .installment-form .compact-mobile-description input{min-height:42px!important;}
  .installment-form .variable-schedule-panel .tablewrap{max-width:100%;overflow:auto;}
  .installment-form .variable-installments-table{min-width:520px!important;}

  /* fixed mobile submit bar */
  .installment-form .sticky-actions{
    position:fixed!important;
    right:10px!important;
    left:10px!important;
    bottom:8px!important;
    z-index:300!important;
    margin:0!important;
    padding:8px!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    border-radius:18px!important;
    background:rgba(255,255,255,.94)!important;
    border:1px solid #d7e4f3!important;
    box-shadow:0 14px 34px rgba(15,41,64,.18)!important;
    backdrop-filter:blur(10px);
  }
  .installment-form .sticky-actions .btn,
  .installment-form .sticky-actions button{
    width:100%!important;
    min-height:52px!important;
    border-radius:15px!important;
    font-size:16px!important;
    font-weight:1000!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center;
  }
}

@media (max-width:390px){
  .installment-form .pay-type-cards label{font-size:11px!important;padding-inline:4px!important;}
  .installment-form .financial-panel label{font-size:12px!important;}
}

/* mobile polish for cars list - v12.20 */
.cars-mobile-list{display:none;}
@media(max-width:900px){
  .cars-page{gap:10px;}
  .cars-hero{padding:16px 14px;border-radius:18px;}
  .cars-hero h2{font-size:22px;}
  .cars-hero p{font-size:12px;line-height:1.9;}
  .cars-add-btn{padding:12px 14px;border-radius:12px;}
  .cars-filter-card{padding:12px;border-radius:18px;}
  .cars-filter-topline{justify-content:center;}
  .cars-summary-pill{padding:8px 14px;font-size:13px;}
  .cars-search-compact{gap:8px;}
  .cars-main-search{gap:8px;}
  .cars-main-search input,
  .cars-search-form input,
  .cars-search-form select{height:44px!important;min-height:44px!important;padding:0 12px!important;border-radius:12px!important;font-size:14px!important;}
  .cars-main-search input{flex:initial!important;}
  .cars-search-form button{height:44px;border-radius:12px;padding:0 12px;}
  .cars-advanced-filters{gap:8px;}
  .cars-advanced-filters label{gap:5px;}
  .cars-advanced-filters label span{font-size:12px;text-align:center;}
  .cars-stat-grid{gap:8px;margin:10px 0;}
  .cars-stat-card{min-height:70px;padding:12px;border-radius:16px;}
  .cars-stat-card span{font-size:12px;line-height:1.6;}
  .cars-stat-card b{font-size:22px;}
  .cars-list-card{border-radius:18px;}
  .cars-list-head{padding:14px;text-align:center;}
  .cars-list-head strong{font-size:17px;}
  .cars-list-head span{font-size:12px;line-height:1.8;}
  .cars-table-wrap{display:none;}
  .cars-mobile-list{display:grid;grid-template-columns:1fr;gap:12px;padding:12px;background:#f8fbff;}
  .cars-mobile-card{background:#fff;border:1px solid #dbe5f1;border-radius:18px;padding:14px;box-shadow:0 8px 20px rgba(15,35,70,.05);}
  .cars-mobile-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px;}
  .cars-mobile-title b{display:block;color:#0f172a;font-size:16px;line-height:1.8;}
  .cars-mobile-title span{display:inline-block;background:#f1f5f9;color:#64748b;border-radius:999px;padding:3px 9px;font-size:12px;}
  .cars-mobile-plate-row{display:flex;justify-content:center;margin:8px 0 12px;}
  .cars-mobile-plate-row .plate-chip{min-width:170px;padding:9px 12px;border-radius:14px;font-size:15px;}
  .cars-mobile-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
  .cars-mobile-info-grid div{background:#f8fafc;border:1px solid #edf2f7;border-radius:14px;padding:9px 10px;min-width:0;}
  .cars-mobile-info-grid div.wide{grid-column:1/-1;}
  .cars-mobile-info-grid span{display:block;color:#64748b;font-size:11px;font-weight:800;margin-bottom:5px;}
  .cars-mobile-info-grid b{display:block;color:#0f172a;font-size:13px;line-height:1.7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .cars-mobile-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:12px;}
  .cars-mobile-actions .btn,.cars-mobile-actions button{height:38px;min-width:86px;border-radius:11px;font-weight:800;}
}


/* mobile cars visibility/hotfix - v13.26 */
.cars-mobile-list-top{display:none;}
@media(max-width:900px){
  .cars-page{padding-bottom:18px;}
  .cars-filter-card.cars-filter-card-compact{display:block!important;padding:10px!important;}
  .cars-search-form.cars-search-compact{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;align-items:stretch!important;}
  .cars-main-search{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;align-items:stretch!important;}
  .cars-main-search input[name="q"]{
    display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
    height:46px!important;min-height:46px!important;max-height:46px!important;
    padding:0 12px!important;line-height:46px!important;text-align:center!important;
    border-radius:14px!important;resize:none!important;-webkit-appearance:none!important;appearance:none!important;
  }
  .cars-main-search button{width:100%!important;height:44px!important;min-height:44px!important;max-height:44px!important;}
  .cars-advanced-filters{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  .cars-advanced-filters label{min-width:0!important;width:100%!important;}
  .cars-advanced-filters input,.cars-advanced-filters select{width:100%!important;height:44px!important;min-height:44px!important;max-height:44px!important;text-align:center!important;}
  .cars-list-card{overflow:visible!important;}
  .cars-list-card .cars-mobile-list-inside{display:none!important;}
  .cars-mobile-list-top{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;padding:0!important;background:transparent!important;}
  .cars-mobile-card{display:block!important;visibility:visible!important;opacity:1!important;position:relative!important;background:#fff!important;}
  .cars-list-head{padding:12px!important;}
  .cars-list-head span{display:none!important;}
  .cars-table-wrap{display:none!important;}
}

/* mobile cars/form hard fix - v14.16 */
@media (max-width: 900px){
  html, body{max-width:100%;overflow-x:hidden!important;}
  main{padding:10px 8px!important;overflow-x:hidden!important;}
  .shell{width:100%;max-width:100%;overflow-x:hidden!important;}

  /* cars list: show real mobile cards inside the list card */
  .cars-page{width:100%;max-width:100%;overflow-x:hidden!important;gap:10px!important;}
  .cars-mobile-list-top{display:none!important;}
  .cars-list-card .cars-mobile-list-inside{
    display:grid!important;grid-template-columns:1fr!important;gap:10px!important;
    padding:10px!important;background:#f8fbff!important;width:100%!important;
  }
  .cars-table-wrap{display:none!important;}
  .cars-mobile-card{display:block!important;width:100%!important;max-width:100%!important;overflow:hidden!important;}
  .cars-mobile-info-grid{grid-template-columns:1fr!important;}
  .cars-mobile-actions{justify-content:stretch!important;}
  .cars-mobile-actions .btn,.cars-mobile-actions button{flex:1!important;width:100%!important;}

  /* cars search must be a normal input, not a tall box */
  .cars-main-search,.cars-search-compact,.cars-advanced-filters{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important;}
  .cars-main-search input[name="q"],
  .cars-search-form input,
  .cars-search-form select{
    width:100%!important;height:44px!important;min-height:44px!important;max-height:44px!important;
    padding:0 12px!important;line-height:44px!important;text-align:center!important;
    border-radius:14px!important;display:block!important;overflow:hidden!important;
  }
  .cars-main-search button{width:100%!important;height:44px!important;min-height:44px!important;max-height:44px!important;}

  /* car add/edit form mobile layout */
  .form-card.car-modern{
    width:100%!important;max-width:100%!important;margin:0!important;padding:10px!important;
    border-radius:18px!important;overflow:hidden!important;
  }
  .form-topbar{padding:12px!important;margin-bottom:10px!important;text-align:center!important;}
  .form-topbar h2{font-size:22px!important;line-height:1.7!important;}
  .form-topbar p{font-size:12px!important;line-height:1.9!important;}
  .quick-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;white-space:normal!important;}
  .quick-actions .btn,.quick-actions button{width:100%!important;min-height:44px!important;}
  .car-layout,.car-layout.second-row{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important;max-width:100%!important;}
  .panel{width:100%!important;max-width:100%!important;padding:12px!important;border-radius:18px!important;overflow:hidden!important;}
  .compact-grid,.dates-grid,.owner-smart-grid,.grid.two{grid-template-columns:1fr!important;gap:10px!important;}
  .compact-grid label,.small-gap label,label{min-width:0!important;}
  input,select,textarea,.vehicle-search,.person-search{
    width:100%!important;max-width:100%!important;min-width:0!important;height:44px!important;min-height:44px!important;
    font-size:14px!important;border-radius:12px!important;
  }

  /* license plate must fit phone width */
  .plate-panel{overflow:hidden!important;}
  .plate-box.modern-plate{
    width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;
    transform:none!important;box-sizing:border-box!important;overflow:hidden!important;
    display:grid!important;grid-template-columns:30px minmax(0,1fr) minmax(52px,1fr) minmax(0,1.25fr) auto minmax(0,1fr)!important;
    gap:4px!important;padding:8px 6px!important;border-radius:16px!important;align-items:center!important;
  }
  .plate-box.modern-plate .blue{width:30px!important;min-width:30px!important;padding:5px 2px!important;font-size:9px!important;line-height:1.25!important;border-radius:8px!important;}
  .plate-box.modern-plate .plate-in,
  .plate-box.modern-plate .plate-in.wide,
  .plate-box.modern-plate .plate-letter{
    width:100%!important;min-width:0!important;max-width:100%!important;height:46px!important;min-height:46px!important;
    padding:4px!important;font-size:18px!important;text-align:center!important;border-radius:10px!important;
  }
  .plate-box.modern-plate .iran{font-size:15px!important;white-space:nowrap!important;padding:0 2px!important;}
  .plate-hint{font-size:11px!important;line-height:1.8!important;}

  .modern-checks{grid-template-columns:1fr!important;gap:8px!important;}
  .modern-checks label{min-height:44px!important;justify-content:center!important;}
  .sticky-actions{position:sticky!important;bottom:8px!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;padding:8px!important;z-index:20!important;}
  .sticky-actions .btn,.sticky-actions button{width:100%!important;min-height:44px!important;}
}


/* =========================================================
   FINAL MOBILE FIX: Vehicle registration form - v15.15
   Scope: فقط فرم ثبت/ویرایش خودرو (.car-modern)
   هدف: فرم در گوشی جمع‌وجور، قابل استفاده و بدون بیرون‌زدگی باشد.
   ========================================================= */
@media (max-width: 900px){
  body:has(.car-modern) main{padding:8px 6px!important;overflow-x:hidden!important;}
  body:has(.car-modern) .shell,
  body:has(.car-modern) main,
  body:has(.car-modern) .form-card.car-modern{width:100%!important;max-width:100%!important;min-width:0!important;}

  .form-card.car-modern{
    padding:8px!important;
    margin:0!important;
    border-radius:16px!important;
    border:0!important;
    background:#f3f6fb!important;
    box-shadow:none!important;
    overflow:visible!important;
  }

  .car-modern .form-topbar{
    display:block!important;
    padding:12px!important;
    margin:0 0 10px!important;
    border-radius:16px!important;
    text-align:right!important;
    background:#fff!important;
    border:1px solid #dbe3ef!important;
  }
  .car-modern .form-kicker{font-size:11px!important;margin-bottom:2px!important;}
  .car-modern .form-topbar h2{font-size:18px!important;line-height:1.7!important;margin:0!important;}
  .car-modern .form-topbar p{font-size:11px!important;line-height:1.8!important;margin:4px 0 10px!important;color:#64748b!important;}
  .car-modern .quick-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;width:100%!important;white-space:normal!important;}
  .car-modern .quick-actions .btn,
  .car-modern .quick-actions button{width:100%!important;min-height:42px!important;padding:9px 8px!important;font-size:13px!important;text-align:center!important;}

  .car-modern .car-layout,
  .car-modern .car-layout.second-row{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    margin:0!important;
    width:100%!important;
    max-width:100%!important;
  }
  .car-modern .car-layout.second-row{margin-top:10px!important;}

  .car-modern .panel{
    padding:12px!important;
    border-radius:16px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:visible!important;
    box-shadow:0 6px 16px rgba(15,35,70,.04)!important;
  }
  .car-modern .panel-title{font-size:14px!important;margin-bottom:10px!important;line-height:1.8!important;}
  .car-modern .panel-title span{width:24px!important;height:24px!important;border-radius:8px!important;font-size:12px!important;}

  .car-modern .compact-grid,
  .car-modern .dates-grid,
  .car-modern .owner-smart-grid,
  .car-modern .grid.two,
  .car-modern .grid.small-gap{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
    width:100%!important;
  }
  .car-modern label{display:flex!important;flex-direction:column!important;gap:5px!important;font-size:12px!important;min-width:0!important;width:100%!important;}
  .car-modern label span{font-size:10px!important;}

  .car-modern input,
  .car-modern select,
  .car-modern textarea,
  .car-modern .vehicle-search,
  .car-modern .person-search{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    padding:0 10px!important;
    font-size:13px!important;
    line-height:42px!important;
    border-radius:12px!important;
    box-sizing:border-box!important;
  }
  .car-modern .smart-hint{font-size:10px!important;line-height:1.7!important;margin-top:3px!important;}
  .car-modern .vehicle-dropdown,
  .car-modern .person-dropdown{z-index:9999!important;max-height:230px!important;border-radius:13px!important;}

  .car-modern .plate-panel{overflow:hidden!important;}
  .car-modern .plate-box.modern-plate{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:7px 5px!important;
    border-radius:14px!important;
    gap:3px!important;
    transform:none!important;
    display:grid!important;
    grid-template-columns:28px minmax(35px,1fr) minmax(50px,1fr) minmax(50px,1.2fr) 36px minmax(35px,1fr)!important;
    align-items:center!important;
    direction:ltr!important;
    overflow:hidden!important;
  }
  .car-modern .plate-box.modern-plate .blue{
    width:28px!important;min-width:28px!important;height:48px!important;
    padding:4px 1px!important;font-size:8px!important;line-height:1.25!important;border-radius:8px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;flex-direction:column!important;
  }
  .car-modern .plate-box.modern-plate .plate-in,
  .car-modern .plate-box.modern-plate .plate-in.wide,
  .car-modern .plate-box.modern-plate .plate-letter{
    width:100%!important;min-width:0!important;max-width:100%!important;
    height:44px!important;min-height:44px!important;max-height:44px!important;
    padding:0 2px!important;font-size:16px!important;line-height:44px!important;text-align:center!important;
    border-radius:10px!important;
  }
  .car-modern .plate-box.modern-plate .iran{font-size:13px!important;text-align:center!important;white-space:nowrap!important;overflow:hidden!important;}
  .car-modern .plate-hint{font-size:10px!important;line-height:1.8!important;margin-top:6px!important;}

  .car-modern .docs-panel{margin-top:10px!important;}
  .car-modern .modern-checks{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;}
  .car-modern .modern-checks label{min-height:40px!important;padding:8px!important;justify-content:center!important;align-items:center!important;text-align:center!important;}
  .car-modern .modern-checks input{width:auto!important;height:auto!important;min-height:0!important;margin-left:5px!important;}

  .car-modern .sticky-actions{
    position:sticky!important;
    bottom:6px!important;
    z-index:50!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    padding:8px!important;
    margin-top:10px!important;
    border-radius:14px!important;
    background:rgba(255,255,255,.95)!important;
  }
  .car-modern .sticky-actions .btn,
  .car-modern .sticky-actions button{width:100%!important;min-height:44px!important;padding:9px 8px!important;font-size:13px!important;text-align:center!important;}
}

@media (max-width: 380px){
  .car-modern .plate-box.modern-plate{grid-template-columns:25px minmax(30px,1fr) minmax(45px,1fr) minmax(46px,1.15fr) 31px minmax(30px,1fr)!important;gap:2px!important;padding:6px 4px!important;}
  .car-modern .plate-box.modern-plate .blue{width:25px!important;min-width:25px!important;font-size:7px!important;}
  .car-modern .plate-box.modern-plate .plate-in,
  .car-modern .plate-box.modern-plate .plate-in.wide,
  .car-modern .plate-box.modern-plate .plate-letter{font-size:14px!important;height:40px!important;min-height:40px!important;line-height:40px!important;}
  .car-modern .plate-box.modern-plate .iran{font-size:11px!important;}
}


/* =========================================================
   FINAL FIX: Vehicle form opens full page + fixed bottom actions - v15.16
   - ثبت خودرو از منو/لیست دیگر در quick-add popup باز نمی‌شود (app.js).
   - در موبایل دکمه‌های ثبت و انصراف مثل فرم قرارداد اقساط ثابت پایین صفحه هستند.
   ========================================================= */
@media (max-width: 900px){
  body:has(.car-modern){padding-bottom:78px!important;}
  body:has(.car-modern) .car-form-top-actions{display:none!important;}

  .car-modern .car-form-bottom-actions{
    position:fixed!important;
    right:10px!important;
    left:10px!important;
    bottom:8px!important;
    z-index:100000!important;
    margin:0!important;
    padding:8px!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    border-radius:18px!important;
    background:rgba(255,255,255,.96)!important;
    border:1px solid #d7e4f3!important;
    box-shadow:0 14px 34px rgba(15,41,64,.20)!important;
    backdrop-filter:blur(10px)!important;
  }
  .car-modern .car-form-bottom-actions .btn,
  .car-modern .car-form-bottom-actions button{
    width:100%!important;
    min-height:52px!important;
    border-radius:15px!important;
    font-size:16px!important;
    font-weight:1000!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
  }
}


/* =========================================================
   v15.17 - ثبت خودرو تمام‌صفحه + Footer ثابت مثل قرارداد اقساط
   ========================================================= */
@media (max-width: 900px){
  main:has(.car-modern){padding:10px 8px 96px!important;}
  body:has(.car-modern){padding-bottom:0!important;}
  .car-modern{border-radius:18px!important;margin:0!important;padding:10px!important;overflow:visible!important;}
  .car-modern .car-form-top-actions{display:flex!important;justify-content:center!important;}
  .car-modern .car-form-top-actions button{display:none!important;}
  .car-modern .form-topbar{text-align:center!important;justify-content:center!important;align-items:center!important;}
  .car-modern .car-form-bottom-actions{
    position:fixed!important;
    right:10px!important;
    left:10px!important;
    bottom:8px!important;
    z-index:300000!important;
    margin:0!important;
    padding:8px!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    border-radius:18px!important;
    background:rgba(255,255,255,.96)!important;
    border:1px solid #d7e4f3!important;
    box-shadow:0 14px 34px rgba(15,41,64,.18)!important;
    backdrop-filter:blur(10px)!important;
  }
  .car-modern .car-form-bottom-actions .btn,
  .car-modern .car-form-bottom-actions button{
    width:100%!important;
    min-height:52px!important;
    border-radius:15px!important;
    font-size:16px!important;
    font-weight:1000!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
  }
}


/* =========================================================
   v15.18 - ثبت خودرو: جلوگیری از رفتن چک‌باکس‌ها زیر Footer ثابت
   ========================================================= */
@media (max-width: 900px){
  main:has(.car-modern){
    padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .car-modern{
    padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .car-modern .docs-panel{
    margin-bottom: calc(145px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .car-modern .car-form-bottom-actions{
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* car view page */
.car-view-page{padding-bottom:140px}
.car-view-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.car-view-grid>div{border:1px solid var(--border,#dbe3ec);border-radius:16px;background:#f8fafc;padding:13px 15px;display:flex;flex-direction:column;gap:6px;min-height:70px}
.car-view-grid span{color:#64748b;font-size:13px}.car-view-grid b{color:#163047;font-size:15px;word-break:break-word}.car-view-plate{justify-content:center;margin-top:16px}.car-view-docs label.checked{border-color:#86efac;background:#f0fdf4}
@media (max-width: 720px){.car-view-grid,.car-view-grid.two-col{grid-template-columns:1fr}.car-actions{gap:6px;flex-wrap:wrap}.cars-mobile-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.cars-mobile-actions .btn,.cars-mobile-actions button{width:100%;text-align:center;justify-content:center}.car-view-page{padding-bottom:160px}}

/* v15.21 - Cars operations in 3-dot menu + compact car view header */
.car-actions-menu-cell,
.car-actions-menu-wrap{
  position:relative;
  overflow:visible!important;
  display:flex;
  justify-content:center;
  align-items:center;
}
.car-actions-menu{
  position:relative;
  display:inline-block;
  direction:rtl;
}
.car-actions-menu > summary{
  list-style:none;
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid #d7e3ef;
  background:#f8fafc;
  color:#163047;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  user-select:none;
}
.car-actions-menu > summary::-webkit-details-marker{display:none;}
.car-actions-menu[open] > summary{
  background:#0f5132;
  color:#fff;
  border-color:#0f5132;
}
.car-actions-dropdown{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  z-index:99999;
  min-width:150px;
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:7px;
  background:#fff;
  border:1px solid #d7e3ef;
  border-radius:14px;
  box-shadow:0 18px 40px rgba(15,35,70,.20);
}
.car-actions-dropdown .btn,
.car-actions-dropdown button,
.car-actions-dropdown form{
  width:100%;
  margin:0;
}
.car-actions-dropdown .btn,
.car-actions-dropdown button{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  border-radius:10px;
  font-weight:800;
  white-space:nowrap;
}
.cars-table-wrap,
.cars-list-card,
.cars-table td.actions{overflow:visible!important;}

.car-view-page .car-view-main-row{
  grid-template-columns:minmax(0,1fr) 300px!important;
  gap:12px!important;
  align-items:stretch!important;
}
.car-view-page .car-main-specs-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:9px!important;
}
.car-view-page .car-main-specs-grid>div{
  min-height:54px!important;
  padding:9px 11px!important;
  border-radius:13px!important;
  gap:3px!important;
}
.car-view-page .car-main-specs-grid span{font-size:11px!important;}
.car-view-page .car-main-specs-grid b{font-size:13px!important;line-height:1.55!important;}
.car-view-page .plate-panel{
  min-height:0!important;
  padding:12px!important;
  align-self:stretch!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
}
.car-view-page .plate-panel .panel-title{margin-bottom:8px!important;}
.car-view-page .car-view-plate{
  margin:4px 0 0!important;
  justify-content:center!important;
  align-items:center!important;
  flex:1!important;
  min-height:64px!important;
}
.car-view-page .car-view-plate .plate-chip{
  min-width:0!important;
  width:100%!important;
  max-width:260px!important;
  padding:8px 10px!important;
  border-radius:13px!important;
  font-size:15px!important;
}
@media(max-width:1200px){
  .car-view-page .car-view-main-row{grid-template-columns:1fr!important;}
  .car-view-page .car-main-specs-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .car-view-page .plate-panel{align-self:auto!important;}
  .car-view-page .car-view-plate{flex:0!important;min-height:auto!important;}
  .car-view-page .car-view-plate .plate-chip{width:auto!important;min-width:180px!important;}
}
@media(max-width:720px){
  .cars-mobile-actions.car-actions-menu-wrap{justify-content:flex-end!important;margin-top:10px!important;}
  .cars-mobile-actions .car-actions-menu{margin-right:auto;}
  .cars-mobile-actions .car-actions-dropdown{left:0;right:auto;}
  .car-view-page .car-main-specs-grid{grid-template-columns:1fr 1fr!important;}
  .car-view-page .car-main-specs-grid>div{min-height:50px!important;padding:8px 10px!important;}
}

/* v15.22 - رفع بریده شدن منوی سه‌نقطه خودرو در دسکتاپ و موبایل */
.cars-list-card,
.cars-table-wrap,
.cars-table,
.cars-table tbody,
.cars-table tr,
.cars-table td,
.cars-mobile-list,
.cars-mobile-card{
  overflow:visible!important;
}

.car-actions-menu-cell,
.car-actions-menu-wrap{
  position:relative!important;
  overflow:visible!important;
  z-index:20;
}

.car-actions-menu[open]{z-index:1000000!important;}
.car-actions-menu > summary{touch-action:manipulation;}

.car-actions-dropdown{
  max-height:70vh;
  overflow:auto;
}

.car-actions-dropdown.car-actions-dropdown-portal{
  position:fixed!important;
  top:auto;
  right:auto;
  left:auto;
  bottom:auto;
  display:flex!important;
  z-index:999999!important;
  min-width:150px!important;
  max-width:min(240px, calc(100vw - 20px));
  max-height:min(70vh, 320px);
}

@media(max-width:720px){
  .cars-mobile-card{
    position:relative!important;
    padding-top:16px!important;
    overflow:visible!important;
  }
  .cars-mobile-card-top{
    padding-left:54px!important;
  }
  .cars-mobile-actions.car-actions-menu-wrap{
    position:absolute!important;
    top:12px!important;
    left:12px!important;
    right:auto!important;
    margin:0!important;
    width:auto!important;
    justify-content:flex-start!important;
    z-index:30!important;
  }
  .cars-mobile-actions .car-actions-menu{margin:0!important;}
  .cars-mobile-actions .car-actions-menu > summary{
    width:42px!important;
    height:42px!important;
    border-radius:13px!important;
  }
  .cars-mobile-actions .car-actions-dropdown{
    left:0!important;
    right:auto!important;
  }
}

/* v15.23 - اصلاح منوی عملیات خودرو و ارتفاع خودکار ردیف‌های جدول خودرو */
body > .car-actions-dropdown-portal{
  position:fixed!important;
  z-index:2147483000!important;
  min-width:156px!important;
  max-width:min(240px, calc(100vw - 16px))!important;
  max-height:min(70vh, 330px)!important;
  overflow:auto!important;
  display:flex!important;
  flex-direction:column!important;
  gap:7px!important;
  padding:8px!important;
  background:#fff!important;
  border:1px solid #d7e3ef!important;
  border-radius:14px!important;
  box-shadow:0 22px 55px rgba(15,35,70,.28)!important;
  direction:rtl!important;
}
body > .car-actions-dropdown-portal .btn,
body > .car-actions-dropdown-portal button,
body > .car-actions-dropdown-portal form{
  width:100%!important;
  margin:0!important;
}
body > .car-actions-dropdown-portal .btn,
body > .car-actions-dropdown-portal button{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:36px!important;
  border-radius:10px!important;
  font-weight:800!important;
  white-space:nowrap!important;
}

.cars-table tbody tr,
.cars-table tbody td{
  height:auto!important;
}
.cars-table td{
  vertical-align:middle!important;
}
.cars-table .owner-cell,
.cars-table .car-specs-cell,
.cars-table .car-dates-cell{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  line-height:1.75!important;
}
.cars-table .owner-cell{
  max-width:420px!important;
  min-width:260px!important;
  word-break:normal!important;
  overflow-wrap:anywhere!important;
}
.cars-table .owner-cell{
  display:-webkit-box!important;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden!important;
}
.cars-table .car-specs-cell span,
.cars-table .car-dates-cell span{
  white-space:normal!important;
  line-height:1.8!important;
}
.cars-table .vin-cell{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}


/* Installment contract form layout polish - buyer full width + inline live calculation */
.installment-form .buyer-layout{grid-template-columns:1fr!important;}
.installment-form .buyer-panel-grid{display:grid;grid-template-columns:minmax(300px,520px) 1fr;gap:14px;align-items:end;}
.installment-form .buyer-search-label{max-width:520px;width:100%;}
.installment-form .buyer-selected-card{min-height:44px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:10px 14px;display:flex;flex-direction:column;justify-content:center;gap:5px;}
.installment-form .buyer-selected-card small{font-size:12px;color:#64748b;font-weight:800;}
.installment-form .buyer-selected-card b{font-size:14px;color:#102f54;line-height:1.8;font-weight:900;white-space:normal;word-break:break-word;}
.installment-form .calc-inline-panel .calc-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.installment-form .calc-inline-panel .calc-cards div{min-width:0;}
.installment-form .calc-inline-panel #calcNote{text-align:center;margin-top:8px;}
@media(max-width:1000px){
  .installment-form .buyer-panel-grid{grid-template-columns:1fr;align-items:stretch;}
  .installment-form .buyer-search-label{max-width:none;}
}
@media(max-width:800px){
  .installment-form .calc-panel{order:initial!important;}
  .installment-form .calc-inline-panel .calc-cards{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;border:0!important;background:transparent!important;overflow:visible!important;}
  .installment-form .calc-inline-panel .calc-cards div{display:block!important;padding:9px 7px!important;border:1px solid #e2e8f0!important;border-radius:14px!important;background:#f8fbff!important;text-align:center!important;min-height:72px!important;}
  .installment-form .calc-inline-panel .calc-cards small{display:block!important;margin:0 0 6px!important;font-size:11px!important;line-height:1.45;}
  .installment-form .calc-inline-panel .calc-cards b{display:block!important;font-size:14px!important;line-height:1.4;}
}

/* Monthly profit calculator mobile compact result cards - keep number font readable */
@media(max-width:800px){
  .monthly-profit-page .calculator-result{
    padding:14px 16px!important;
  }
  .monthly-profit-page .calculator-result .section-title{
    margin:0 0 10px!important;
    padding-bottom:8px!important;
  }
  .monthly-profit-page .calc-result-grid{
    grid-template-columns:1fr!important;
    gap:9px!important;
  }
  .monthly-profit-page .calc-result-grid div{
    padding:10px 12px!important;
    min-height:92px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
  }
  .monthly-profit-page .calc-result-grid span{
    margin-bottom:4px!important;
    line-height:1.6!important;
  }
  .monthly-profit-page .calc-result-grid b{
    margin-bottom:0!important;
    line-height:1.45!important;
  }
  .monthly-profit-page .calc-result-grid small{
    display:none!important;
  }
}


/* User card polish: avatar + touch friendly account links */
.sidebar-user-card-modern{
  align-items:flex-start;
  gap:12px;
  padding:12px;
  border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(135deg, rgba(255,255,255,.11), rgba(255,255,255,.06));
  box-shadow:0 12px 26px rgba(0,0,0,.12);
}
.sidebar-user-avatar-modern{
  width:48px;
  height:48px;
  min-width:48px;
  font-weight:900;
  font-size:16px;
  color:#e0f2fe;
  background:linear-gradient(135deg, rgba(16,185,129,.38), rgba(59,130,246,.25));
  border:1px solid rgba(255,255,255,.16);
  overflow:hidden;
}
.sidebar-user-avatar-modern img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.sidebar-user-avatar-modern span{display:flex;align-items:center;justify-content:center;width:100%;height:100%}
.sidebar-user-info-modern{gap:4px;min-width:0;flex:1}
.sidebar-user-info-modern strong{font-size:14px;line-height:1.35;margin-bottom:2px}
.sidebar-user-meta-row{display:flex;align-items:center;gap:5px;font-size:11.5px;color:#dbeafe;line-height:1.4;white-space:normal}
.sidebar-user-meta-row .online-dot{color:#22c55e;font-size:13px;line-height:1}
.sidebar-user-info-modern .sidebar-db-path{margin-top:2px}
.sidebar-user-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:8px;width:100%}
.sidebar-user-action-badge{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:7px 8px;
  border-radius:10px;
  text-decoration:none;
  font-size:12px;
  font-weight:800;
  color:#e0f2fe !important;
  background:rgba(15,23,42,.30);
  border:1px solid rgba(147,197,253,.28);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
  transition:transform .15s ease, background .15s ease, border-color .15s ease;
  touch-action:manipulation;
}
.sidebar-user-action-badge:hover,.sidebar-user-action-badge:focus{
  background:rgba(16,185,129,.20);
  border-color:rgba(52,211,153,.45);
  transform:translateY(-1px);
}
@media (max-width: 768px){
  .sidebar-user-card-modern{padding:12px 10px;gap:10px}
  .sidebar-user-avatar-modern{width:46px;height:46px;min-width:46px}
  .sidebar-user-actions{gap:6px}
  .sidebar-user-action-badge{min-height:36px;font-size:12.5px}
}

/* v15.31 - تنظیم متعادل جدول خودروها: ستون عملیات/VIN، جداکننده ستون‌ها و ردیف‌های یکی‌درمیان */
.cars-table{
  min-width:1180px!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
.cars-table th,
.cars-table td{
  border-bottom:1px solid #e2e8f0!important;
  border-left:1px solid #e7edf5!important;
}
.cars-table th:first-child,
.cars-table td:first-child{
  border-right:0!important;
}
.cars-table th:last-child,
.cars-table td:last-child{
  border-left:0!important;
}
.cars-table tbody tr:nth-child(odd) td{
  background:#ffffff!important;
}
.cars-table tbody tr:nth-child(even) td{
  background:#f7fbff!important;
}
.cars-table tbody tr:hover td{
  background:#eef6ff!important;
}
.cars-table th:nth-child(8),
.cars-table td:nth-child(8){
  width:165px!important;
  max-width:165px!important;
}
.cars-table th:nth-child(9),
.cars-table td:nth-child(9){
  width:82px!important;
  max-width:82px!important;
  text-align:center!important;
}
.cars-table .vin-cell{
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  direction:ltr!important;
  text-align:left!important;
  background:inherit!important;
}
.cars-table .car-actions-menu-cell{
  padding-left:8px!important;
  padding-right:8px!important;
}
.cars-table .car-actions-menu-cell .car-actions-menu{
  margin:auto!important;
}
.cars-table .owner-cell,
.cars-table .car-specs-cell,
.cars-table .car-dates-cell{
  background:inherit!important;
}

/* v15.32 - نهایی‌سازی جدول خودروها: عملیات باریک‌تر و اصلاح خط ستون مالک فعلی */
.cars-table{
  table-layout:fixed!important;
}
.cars-table th,
.cars-table td{
  border-left:1px solid #eef3f8!important;
  border-bottom:1px solid #e2e8f0!important;
  box-sizing:border-box!important;
}
.cars-table th:nth-child(9),
.cars-table td:nth-child(9){
  width:64px!important;
  max-width:64px!important;
  min-width:64px!important;
  padding-left:4px!important;
  padding-right:4px!important;
  text-align:center!important;
}
.cars-table th:nth-child(8),
.cars-table td:nth-child(8){
  width:158px!important;
  max-width:158px!important;
  min-width:158px!important;
}
.cars-table .car-actions-menu-cell{
  padding-left:4px!important;
  padding-right:4px!important;
  text-align:center!important;
  vertical-align:middle!important;
}
.cars-table .car-actions-menu-cell .car-actions-menu{
  width:38px!important;
  height:38px!important;
  margin:0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.cars-table .car-actions-menu > summary{
  margin:0 auto!important;
}
.cars-table .owner-cell{
  display:table-cell!important;
  vertical-align:middle!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  word-break:normal!important;
  overflow-wrap:anywhere!important;
  line-height:1.85!important;
  max-width:none!important;
  min-width:0!important;
  background:inherit!important;
}
.cars-table .car-specs-cell,
.cars-table .car-dates-cell,
.cars-table .vin-cell,
.cars-table .car-actions-menu-cell{
  background:inherit!important;
}
.cars-table tbody tr:nth-child(odd) td{
  background:#ffffff!important;
}
.cars-table tbody tr:nth-child(even) td{
  background:#f7fbff!important;
}
.cars-table tbody tr:hover td{
  background:#eef6ff!important;
}


/* v15.33 - تنظیم دقیق و غیرتهاجمی عرض ستون‌های جدول خودروها */
.cars-table{
  width:100%!important;
  min-width:1240px!important;
  table-layout:fixed!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
.cars-table col.col-row{width:46px!important;}
.cars-table col.col-car{width:124px!important;}
.cars-table col.col-plate{width:178px!important;}
.cars-table col.col-owner{width:auto!important;}
.cars-table col.col-specs{width:116px!important;}
.cars-table col.col-dates{width:160px!important;}
.cars-table col.col-status{width:86px!important;}
.cars-table col.col-vin{width:205px!important;}
.cars-table col.col-actions{width:58px!important;}
.cars-table th,
.cars-table td{
  border-left:1px solid #edf2f7!important;
  border-bottom:1px solid #e2e8f0!important;
  box-sizing:border-box!important;
  vertical-align:middle!important;
}
.cars-table th:last-child,
.cars-table td:last-child{border-left:0!important;}
.cars-table .row-no,
.cars-table th:nth-child(1),
.cars-table td:nth-child(1){
  width:46px!important;min-width:46px!important;max-width:46px!important;
  text-align:center!important;padding-left:6px!important;padding-right:6px!important;
}
.cars-table .car-name-cell,
.cars-table th:nth-child(2),
.cars-table td:nth-child(2){
  width:124px!important;min-width:124px!important;max-width:124px!important;
}
.cars-table .car-name-cell b{white-space:normal!important;line-height:1.65!important;}
.cars-table .plate-chip{min-width:138px!important;max-width:160px!important;padding:7px 10px!important;}
.cars-table th:nth-child(8),
.cars-table td:nth-child(8){
  width:205px!important;min-width:205px!important;max-width:205px!important;
}
.cars-table .vin-cell{
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  direction:ltr!important;text-align:left!important;background:inherit!important;
  font-size:12.5px!important;
}
.cars-table th:nth-child(9),
.cars-table td:nth-child(9){
  width:58px!important;min-width:58px!important;max-width:58px!important;
  padding-left:3px!important;padding-right:3px!important;text-align:center!important;
}
.cars-table .car-actions-menu-cell{padding-left:3px!important;padding-right:3px!important;text-align:center!important;}
.cars-table .car-actions-menu-cell .car-actions-menu{width:36px!important;height:36px!important;margin:0 auto!important;}
.cars-table .car-actions-menu > summary{width:34px!important;height:34px!important;margin:0 auto!important;}
.cars-table .owner-cell{
  display:table-cell!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
  max-width:none!important;min-width:0!important;line-height:1.85!important;background:inherit!important;
  overflow-wrap:anywhere!important;
}
.cars-table tbody tr:nth-child(odd) td{background:#ffffff!important;}
.cars-table tbody tr:nth-child(even) td{background:#f7fbff!important;}
.cars-table tbody tr:hover td{background:#eef6ff!important;}
@media(max-width:900px){
  .cars-table{min-width:1180px!important;}
}

/* v15_42_checks_mobile_cards - نمایش لیست چک‌ها به صورت کارت در موبایل */
.checks-mobile-cards{
  display:none;
}
.check-mobile-card{
  position:relative;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  border:1px solid #dbe5f1;
  border-radius:22px;
  padding:14px;
  box-shadow:0 14px 34px rgba(15,35,70,.07);
  overflow:visible;
}
.check-mobile-card.is-overdue{
  border-color:#fecaca;
  background:linear-gradient(180deg,#fff 0%,#fff5f5 100%);
}
.check-mobile-card.is-due-today{
  border-color:#f5cb91;
  background:linear-gradient(180deg,#fff 0%,#fffaf2 100%);
}
.check-mobile-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.check-card-rowno{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:42px;
  height:30px;
  padding:0 10px;
  border-radius:999px;
  background:#eef6ff;
  border:1px solid #cfe0f5;
  color:#1f3a5f;
  font-weight:1000;
  direction:ltr;
}
.check-mobile-main{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}
.check-mobile-amount{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:12px 14px;
}
.check-mobile-amount small{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:900;
  margin-bottom:5px;
}
.check-mobile-amount strong{
  display:block;
  color:#0f172a;
  font-size:23px;
  font-weight:1000;
  line-height:1.45;
}
.check-mobile-bankline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  margin-bottom:12px;
  border-radius:16px;
  background:#eef6ff;
  border:1px solid #d8e8fb;
}
.check-mobile-bankline b{
  color:#12385f;
  font-size:15px;
  font-weight:1000;
}
.check-mobile-bankline span{
  color:#64748b;
  font-size:12px;
  font-weight:900;
}
.check-mobile-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}
.check-mobile-grid>div{
  min-width:0;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:16px;
  padding:10px 11px;
}
.check-mobile-grid span{
  display:block;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  margin-bottom:5px;
}
.check-mobile-grid b{
  display:block;
  color:#0f172a;
  font-size:13px;
  line-height:1.7;
  font-weight:900;
  word-break:break-word;
}
.check-mobile-grid .ltr-text{
  direction:ltr;
  text-align:right;
  unicode-bidi:isolate;
  font-family:Tahoma,Arial,sans-serif;
}
.check-mobile-empty{
  background:#fff;
  border:1px dashed #cbd5e1;
  border-radius:18px;
  padding:18px;
  text-align:center;
  color:#64748b;
  font-weight:900;
}

@media(max-width:768px){
  .check-list-card{
    padding:14px !important;
    overflow:visible !important;
  }
  .check-table-wrap{
    display:none !important;
  }
  .checks-mobile-cards{
    display:flex;
    flex-direction:column;
    gap:14px;
    margin-top:12px;
    overflow:visible;
  }
  .check-filter-bar{
    grid-template-columns:1fr 1fr !important;
    gap:10px !important;
    padding:14px !important;
    border-radius:22px !important;
    background:rgba(255,255,255,.78) !important;
    box-shadow:0 12px 32px rgba(15,35,70,.05) !important;
  }
  .check-filter-bar input,
  .check-filter-bar select,
  .check-filter-bar button,
  .check-filter-bar .btn{
    min-height:58px;
    border-radius:16px !important;
    font-size:15px;
    text-align:center;
  }
  .check-list-summary.compact{
    grid-template-columns:1fr 1fr !important;
    gap:12px !important;
  }
  .check-summary-card{
    min-height:92px;
    border-radius:18px;
    display:flex;
    flex-direction:column;
    justify-content:center;
  }
  .check-summary-card strong{
    font-size:24px;
  }
  .check-summary-card.mini strong{
    font-size:22px;
  }
  .check-mobile-card .check-actions-menu-wrap{
    position:relative;
    display:flex;
    justify-content:center;
    align-items:center;
  }
  .check-mobile-card .check-actions-trigger{
    width:52px;
    height:52px;
    border-radius:16px;
    background:#143a63;
    color:#fff;
    box-shadow:0 10px 22px rgba(20,58,99,.22);
  }
  .check-mobile-card .check-actions-trigger:hover{
    background:#0f2f57;
  }
  .check-mobile-card .check-actions-dropdown{
    min-width:255px;
    max-width:calc(100vw - 28px);
  }
}

@media(max-width:420px){
  .check-mobile-grid{
    grid-template-columns:1fr;
  }
  .check-mobile-main{
    grid-template-columns:1fr auto;
  }
  .check-mobile-amount strong{
    font-size:21px;
  }
}

/* v15.45 - کارت موبایل فشرده و کاربردی چک‌ها: اطلاعات کلیدی در یک نگاه */
@media(max-width:768px){
  .checks-mobile-cards{
    gap:12px !important;
    margin-top:12px !important;
  }
  .check-mobile-card-v45{
    --check-accent:#22c55e;
    --check-soft:rgba(34,197,94,.12);
    --check-border:rgba(34,197,94,.28);
    position:relative !important;
    padding:12px 14px 13px 14px !important;
    border-radius:22px !important;
    border:1px solid var(--check-border) !important;
    background:
      radial-gradient(circle at top right, var(--check-soft) 0, rgba(255,255,255,0) 42%),
      linear-gradient(180deg,#ffffff 0%,#f8fbff 100%) !important;
    box-shadow:0 12px 28px rgba(15,35,70,.07), 0 0 0 1px rgba(255,255,255,.7) inset !important;
    overflow:visible !important;
  }
  .check-mobile-card-v45.is-bank{--check-accent:#3b82f6;--check-soft:rgba(59,130,246,.12);--check-border:rgba(59,130,246,.28);}
  .check-mobile-card-v45.is-transferred{--check-accent:#f59e0b;--check-soft:rgba(245,158,11,.13);--check-border:rgba(245,158,11,.30);}
  .check-mobile-card-v45.is-returned,.check-mobile-card-v45.is-overdue{--check-accent:#ef4444;--check-soft:rgba(239,68,68,.11);--check-border:rgba(239,68,68,.28);}
  .check-mobile-card-v45.is-due-today{--check-accent:#f59e0b;--check-soft:rgba(245,158,11,.12);--check-border:rgba(245,158,11,.30);}
  .check-mobile-card-v45.is-paid{--check-accent:#16a34a;--check-soft:rgba(22,163,74,.12);--check-border:rgba(22,163,74,.28);}
  .check-mobile-card-v45.is-neutral{--check-accent:#64748b;--check-soft:rgba(100,116,139,.10);--check-border:rgba(100,116,139,.24);}
  .check-mobile-card-v45.is-default{--check-accent:#64748b;--check-soft:rgba(100,116,139,.10);--check-border:rgba(100,116,139,.22);}
  .check-mobile-card-v45 .check-mobile-accent{
    position:absolute;
    top:16px;
    bottom:16px;
    right:8px;
    width:5px;
    border-radius:999px;
    background:var(--check-accent);
    box-shadow:0 0 18px var(--check-accent);
    opacity:.78;
  }
  .check-mobile-card-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding-right:8px;
    margin-bottom:9px;
  }
  .check-mobile-head-right{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
  }
  .check-mobile-card-v45 .check-card-rowno{
    min-width:42px;
    height:34px;
    padding:0 10px;
    background:#eef6ff;
    border:1px solid #d2e2f4;
    font-size:16px;
  }
  .check-mobile-card-v45 .check-status-badge{
    min-width:104px;
    justify-content:center;
    padding:8px 14px;
    font-size:13px;
    font-weight:1000;
    border-radius:999px;
  }
  .check-mobile-card-v45 .check-actions-menu-wrap{
    margin-right:auto;
    flex:0 0 auto;
  }
  .check-mobile-card-v45 .check-actions-trigger{
    width:44px !important;
    height:44px !important;
    border-radius:14px !important;
    background:#123a63 !important;
    color:#fff !important;
    box-shadow:0 8px 18px rgba(18,58,99,.22) !important;
  }
  .check-mobile-card-v45 .check-actions-dropdown{
    z-index:9999;
  }
  .check-mobile-hero{
    margin:0 8px 9px 0;
    padding:10px 12px;
    border-radius:18px;
    background:rgba(248,250,252,.92);
    border:1px solid #e2e8f0;
    text-align:right;
  }
  .check-mobile-hero span{
    display:block;
    color:#64748b;
    font-size:11px;
    font-weight:900;
    margin-bottom:3px;
  }
  .check-mobile-hero strong{
    display:block;
    color:#0f172a;
    font-size:25px;
    font-weight:1000;
    line-height:1.35;
    letter-spacing:-.3px;
  }
  .check-mobile-primary-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:7px;
    margin-right:8px;
  }
  .check-mobile-primary-grid>div{
    min-width:0;
    border:1px solid #e4ebf3;
    background:rgba(255,255,255,.88);
    border-radius:15px;
    padding:8px 10px;
  }
  .check-mobile-primary-grid>div.wide{
    grid-column:1/-1;
  }
  .check-mobile-primary-grid span{
    display:block;
    color:#64748b;
    font-size:11px;
    font-weight:900;
    margin-bottom:3px;
  }
  .check-mobile-primary-grid b{
    display:block;
    color:#0f172a;
    font-size:13px;
    font-weight:950;
    line-height:1.55;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .check-mobile-primary-grid .sayadi b{
    font-size:15px;
    letter-spacing:.2px;
  }
  .check-mobile-primary-grid .ltr-text{
    direction:ltr;
    unicode-bidi:isolate;
    text-align:right;
    font-family:Tahoma,Arial,sans-serif;
  }
  .check-mobile-subline{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin:9px 8px 0 0;
    padding-top:8px;
    border-top:1px dashed #dbe5f1;
  }
  .check-mobile-subline span{
    display:inline-flex;
    align-items:center;
    min-height:26px;
    padding:4px 9px;
    border-radius:999px;
    background:#eef6ff;
    border:1px solid #d8e8fb;
    color:#12385f;
    font-size:11.5px;
    font-weight:900;
    max-width:100%;
  }
  .check-mobile-card-v45 .check-mobile-main,
  .check-mobile-card-v45 .check-mobile-amount,
  .check-mobile-card-v45 .check-mobile-bankline,
  .check-mobile-card-v45 .check-mobile-grid{
    display:none !important;
  }
}
@media(max-width:420px){
  .check-mobile-hero strong{font-size:23px;}
  .check-mobile-primary-grid{grid-template-columns:1fr 1fr;gap:6px;}
  .check-mobile-primary-grid b{font-size:12.5px;}
  .check-mobile-primary-grid .sayadi b{font-size:14px;}
}


/* v15.49 - Restore internal scroll for installment contracts list
   The check actions portal had a broad overflow:visible rule for .top-contract-table/.win-fixed-table.
   That rule leaked into installment contracts and removed the table's own scroll area.
   Keep this fix scoped to the installment contracts page only. */
.installment-list-page-full .installment-desktop-table-card{
  overflow:hidden !important;
}
.installment-list-page-full .top-contract-table.win-fixed-table,
.installment-list-page-full .win-fixed-table.top-contract-table{
  overflow:auto !important;
  overflow-x:auto !important;
  overflow-y:auto !important;
  height:auto !important;
  min-height:420px !important;
  max-height:calc(100vh - 255px) !important;
}
.installment-list-page-full .top-contract-table .table{
  overflow:initial !important;
}
.installment-list-page-full .top-contract-table thead th{
  position:sticky !important;
  top:0 !important;
  z-index:5 !important;
}
@media (max-width: 900px){
  .installment-list-page-full .top-contract-table.win-fixed-table,
  .installment-list-page-full .win-fixed-table.top-contract-table{
    overflow:auto !important;
    min-height:360px !important;
    max-height:calc(100vh - 210px) !important;
  }
}

/* v15.51 - فرم دریافت/ویرایش چک: بهینه‌سازی اختصاصی نسخه موبایل */
@media (max-width: 700px){
  .check-topbar{
    margin-bottom:10px!important;
    padding:14px 14px!important;
    border-radius:18px!important;
    align-items:stretch!important;
    gap:10px!important;
  }
  .check-topbar h2{font-size:26px!important;margin-bottom:6px!important;line-height:1.5!important;}
  .check-topbar p{font-size:13px!important;line-height:1.8!important;margin:0!important;}
  .check-topbar .btn{height:44px!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:8px 10px!important;}

  .check-form-card{
    padding:10px!important;
    border-radius:18px!important;
    background:linear-gradient(180deg,#f7fbff,#edf4fb)!important;
  }
  .modern-check-form{max-width:none!important;width:100%!important;}

  .check-form-help{
    padding:10px 11px!important;
    margin-bottom:10px!important;
    border-radius:16px!important;
    gap:8px!important;
    font-size:13px!important;
    line-height:1.8!important;
  }
  #sayadiCounter{
    min-width:0!important;
    width:100%!important;
    padding:7px 10px!important;
    font-size:13px!important;
  }

  .check-section-title{
    margin:10px 0 8px!important;
    padding:9px 11px!important;
    border-radius:14px!important;
    font-size:16px!important;
    line-height:1.6!important;
    box-shadow:0 8px 20px rgba(15,35,70,.04)!important;
  }

  .check-row,
  .check-row.three-cols,
  .check-row.two-cols,
  .check-row.optional-row{
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin-bottom:8px!important;
  }
  .check-windows-form label{
    gap:5px!important;
    font-size:13px!important;
    line-height:1.65!important;
    font-weight:800!important;
  }
  .check-windows-form label span,
  .check-windows-form small,
  .field-hint{
    font-size:11px!important;
    line-height:1.65!important;
  }
  .check-windows-form input,
  .check-windows-form select,
  .check-windows-form textarea{
    min-height:44px!important;
    border-radius:13px!important;
    padding:9px 11px!important;
    font-size:14px!important;
  }
  .check-windows-form textarea{min-height:72px!important;rows:3;}

  .check-boxset{
    margin:9px 0 10px!important;
    padding:12px 10px 10px!important;
    border-radius:18px!important;
    box-shadow:0 8px 22px rgba(15,35,70,.045)!important;
  }
  .check-boxset legend{
    font-size:14px!important;
    padding:2px 9px!important;
    color:#163b63!important;
  }
  .owner-box .check-row{margin-bottom:6px!important;}
  .same-owner-line,
  .check-inline{
    min-height:42px!important;
    padding:7px 9px!important;
    border-radius:12px!important;
    background:#f8fafc!important;
    border:1px solid #e2e8f0!important;
    line-height:1.6!important;
  }
  .same-owner-line input,
  .check-inline input{width:22px!important;height:22px!important;min-height:0!important;}

  .radio-line{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    align-items:stretch!important;
    padding:7px!important;
    margin:2px 0 8px!important;
    border-radius:16px!important;
  }
  .radio-choice{
    justify-content:center!important;
    text-align:center!important;
    background:#fff!important;
    border:1px solid #dbe5f0!important;
    border-radius:13px!important;
    padding:8px 6px!important;
    min-height:44px!important;
    font-size:12px!important;
    line-height:1.6!important;
  }
  .radio-choice input{width:20px!important;height:20px!important;min-height:0!important;flex:0 0 auto!important;}
  .radio-choice:has(input:checked){
    border-color:#2563eb!important;
    background:#eef6ff!important;
    color:#12385f!important;
    box-shadow:0 0 0 3px rgba(37,99,235,.08)!important;
  }

  .party-panel{margin-top:6px!important;}
  .person-id-search{height:44px!important;}
  .person-id-dropdown{max-height:220px!important;border-radius:14px!important;}

  .installment-link-box .alert,
  .installment-link-box .empty-box{
    padding:10px!important;
    border-radius:14px!important;
    font-size:12px!important;
    line-height:1.9!important;
  }
  .installment-contract-title{
    padding:8px 10px!important;
    border-radius:12px!important;
    font-size:12px!important;
    line-height:1.8!important;
  }
  .installment-choice{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:5px!important;
    padding:9px!important;
    border-radius:14px!important;
    font-size:12px!important;
  }
  .installment-choice input{width:20px!important;height:20px!important;min-height:0!important;}

  .category-inline{
    grid-template-columns:1fr!important;
    gap:7px!important;
  }
  .category-inline .btn{
    height:40px!important;
    justify-content:center!important;
    border-radius:12px!important;
  }

  .full{margin-top:4px!important;}
  .form-actions.full.check-actions{
    position:sticky!important;
    bottom:0!important;
    z-index:50!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    margin:12px -2px 0!important;
    padding:9px!important;
    background:rgba(255,255,255,.94)!important;
    backdrop-filter:blur(10px)!important;
    border:1px solid #dbe5f0!important;
    border-radius:16px!important;
    box-shadow:0 -8px 24px rgba(15,35,70,.10)!important;
  }
  .form-actions.full.check-actions .btn,
  .form-actions.full.check-actions button{
    width:100%!important;
    min-width:0!important;
    height:46px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:14px!important;
    font-size:15px!important;
    font-weight:900!important;
  }
}

/* RBAC / user permission matrix */
.permissions-matrix-form .user-overrides-card{
  margin-top:18px;
  border:1px solid #dbe6f3;
  background:linear-gradient(180deg,#ffffff 0%,#f9fbff 100%);
}
.permission-legend{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 14px;}
.permission-legend .pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 11px;font-size:12px;font-weight:800;border:1px solid #d7e3f1;background:#fff;color:#34495e;}
.permission-legend .pill.allow{background:#ecfdf3;color:#166534;border-color:#bbf7d0;}
.permission-legend .pill.deny{background:#fff1f2;color:#b91c1c;border-color:#fecdd3;}
.permission-legend .pill.inherit{background:#f8fafc;color:#475569;}
.permission-matrix{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px;}
.permission-matrix-group{border:1px solid #dbe6f3;border-radius:18px;background:#fff;overflow:hidden;box-shadow:0 8px 22px rgba(15,35,70,.045);}
.permission-matrix-group h4{margin:0;padding:12px 14px;background:#f1f6fd;color:#163b63;font-size:14px;border-bottom:1px solid #dbe6f3;}
.permission-matrix-row{display:grid;grid-template-columns:minmax(150px,1fr) auto;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid #edf2f7;}
.permission-matrix-row:last-child{border-bottom:0;}
.permission-name{font-size:13px;font-weight:750;color:#243b53;line-height:1.7;}
.permission-mode-toggle{display:flex;gap:5px;align-items:center;justify-content:flex-end;flex-wrap:nowrap;}
.mode-option{cursor:pointer;}
.mode-option input{position:absolute;opacity:0;pointer-events:none;}
.mode-option span{display:inline-flex;align-items:center;justify-content:center;min-width:62px;height:32px;border-radius:999px;border:1px solid #d7e3f1;background:#fff;color:#475569;font-size:12px;font-weight:800;transition:.15s ease;}
.mode-option.inherit input:checked + span{background:#e2e8f0;border-color:#cbd5e1;color:#334155;}
.mode-option.allow input:checked + span{background:#dcfce7;border-color:#86efac;color:#166534;box-shadow:0 0 0 3px rgba(22,101,52,.08);}
.mode-option.deny input:checked + span{background:#ffe4e6;border-color:#fda4af;color:#b91c1c;box-shadow:0 0 0 3px rgba(185,28,28,.08);}
.auth-table-card .badge.warning{background:#fff7ed;color:#c2410c;border:1px solid #fed7aa;}
@media (max-width: 720px){
  .permission-matrix{grid-template-columns:1fr;}
  .permission-matrix-row{grid-template-columns:1fr;gap:8px;}
  .permission-mode-toggle{justify-content:stretch;display:grid;grid-template-columns:repeat(3,1fr);}
  .mode-option span{width:100%;min-width:0;height:36px;}
}

/* RBAC designer v15.53 - نقش‌ها و دسترسی‌های ریسپانسیو */
.rbac-designer{display:grid;grid-template-columns:260px minmax(0,1fr);gap:18px;align-items:start;direction:rtl;}
.rbac-side{position:sticky;top:82px;padding:16px;border:1px solid #dbe6f3;border-radius:22px;background:linear-gradient(180deg,#fff,#f8fbff);box-shadow:0 10px 30px rgba(15,35,70,.06);}
.rbac-side h3{margin:0 0 12px;color:#12345a;font-size:18px;}
.rbac-role-tabs{display:flex;flex-direction:column;gap:8px;}
.rbac-role-tab{border:1px solid #d6e4f5;background:#fff;border-radius:16px;padding:11px 12px;text-align:right;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;color:#243b53;font-weight:900;transition:.18s ease;}
.rbac-role-tab small{color:#64748b;font-size:11px;background:#f1f5f9;border-radius:999px;padding:4px 8px;white-space:nowrap;}
.rbac-role-tab.active{background:#0f3a63;color:#fff;border-color:#0f3a63;box-shadow:0 10px 22px rgba(15,58,99,.18);}
.rbac-role-tab.active small{background:rgba(255,255,255,.16);color:#fff;}
.rbac-hint{margin-top:14px;padding:12px;border-radius:16px;background:#eef7ff;color:#41607b;font-size:12px;line-height:1.9;}
.rbac-main{padding:18px;border:1px solid #dbe6f3;border-radius:24px;background:rgba(255,255,255,.92);box-shadow:0 12px 32px rgba(15,35,70,.055);min-width:0;}
.rbac-topbar,.rbac-panel-head,.rbac-module-head,.rbac-user-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.rbac-topbar h2,.rbac-panel-head h3,.rbac-module-head h4{margin:0;color:#12345a;}
.rbac-search-wrap{min-width:260px;flex:0 1 360px;}
.rbac-search,.rbac-filter-select{width:100%;height:42px;border:1px solid #cbd9ea;border-radius:14px;background:#fff;padding:0 14px;color:#243b53;font-weight:750;outline:none;}
.rbac-search:focus,.rbac-filter-select:focus{border-color:#0ea5e9;box-shadow:0 0 0 4px rgba(14,165,233,.10);}
.rbac-role-panel{display:none;margin-top:16px;}
.rbac-role-panel.active{display:block;}
.rbac-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.rbac-actions.compact{gap:6px;}
.btn.mini{height:32px;padding:0 10px;border-radius:11px;font-size:12px;}
.rbac-workspace{display:grid;grid-template-columns:230px minmax(0,1fr);gap:14px;margin-top:14px;align-items:start;}
.rbac-module-nav{display:flex;flex-direction:column;gap:8px;position:sticky;top:82px;}
.rbac-module-btn{border:1px solid #d7e5f5;background:#fff;border-radius:15px;padding:10px 12px;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;color:#294661;font-weight:900;transition:.16s ease;text-align:right;}
.rbac-module-btn small{font-size:11px;color:#64748b;background:#f1f5f9;border-radius:999px;padding:3px 8px;white-space:nowrap;}
.rbac-module-btn.active{background:#e8f4ff;border-color:#9ed2ff;color:#0f3a63;box-shadow:inset 4px 0 0 #1d8fe1;}
.rbac-permission-area{min-width:0;}
.rbac-module-panel{display:none;border:1px solid #dce8f5;border-radius:20px;background:#fff;overflow:hidden;box-shadow:0 8px 22px rgba(15,35,70,.045);}
.rbac-module-panel.active{display:block;}
.rbac-module-head{padding:14px 16px;background:linear-gradient(90deg,#eef6ff,#f9fcff);border-bottom:1px solid #dce8f5;}
.rbac-module-quick{display:flex;gap:6px;flex-wrap:wrap;}
.rbac-table,.rbac-override-table{display:flex;flex-direction:column;}
.rbac-row{display:grid;grid-template-columns:auto 52px minmax(0,1fr);gap:12px;align-items:center;padding:12px 16px;border-bottom:1px solid #edf3f9;cursor:pointer;transition:.15s ease;}
.rbac-row:last-child,.rbac-override-row:last-child{border-bottom:0;}
.rbac-row:hover,.rbac-override-row:hover{background:#f8fbff;}
.rbac-row input{position:absolute;opacity:0;pointer-events:none;}
.rbac-switch{width:48px;height:26px;border-radius:999px;background:#e2e8f0;border:1px solid #cbd5e1;position:relative;transition:.18s ease;}
.rbac-switch:before{content:"";position:absolute;width:20px;height:20px;top:2px;right:2px;background:#fff;border-radius:50%;box-shadow:0 2px 6px rgba(0,0,0,.16);transition:.18s ease;}
.rbac-row input:checked + .rbac-switch{background:#16a34a;border-color:#16a34a;box-shadow:0 0 0 4px rgba(22,163,74,.08);}
.rbac-row input:checked + .rbac-switch:before{right:23px;}
.rbac-row-text{display:flex;flex-direction:column;gap:3px;min-width:0;}
.rbac-row-text b{font-size:14px;color:#1f3b55;line-height:1.7;}
.rbac-row-text small{font-size:11px;color:#7b8da3;direction:ltr;text-align:right;}
.rbac-sticky-save{grid-column:1/-1;}

.rbac-user-designer{margin-top:16px;padding:16px;border-radius:22px;}
.rbac-user-topbar{margin:12px 0;}
.rbac-user-topbar .rbac-search{flex:1 1 280px;max-width:420px;}
.rbac-user-topbar .rbac-filter-select{flex:0 0 180px;}
.user-rbac-workspace{grid-template-columns:220px minmax(0,1fr);}
.rbac-override-row{display:grid;grid-template-columns:minmax(0,1fr) 170px;gap:12px;align-items:center;padding:12px 16px;border-bottom:1px solid #edf3f9;transition:.15s ease;}
.override-select{height:38px;border:1px solid #cbd9ea;border-radius:13px;background:#f8fafc;color:#34495e;padding:0 10px;font-weight:900;outline:none;}
.rbac-override-row.mode-allow{background:linear-gradient(90deg,rgba(22,163,74,.08),rgba(255,255,255,0));}
.rbac-override-row.mode-deny{background:linear-gradient(90deg,rgba(220,38,38,.08),rgba(255,255,255,0));}
.rbac-override-row.mode-allow .override-select{background:#ecfdf3;border-color:#86efac;color:#166534;}
.rbac-override-row.mode-deny .override-select{background:#fff1f2;border-color:#fda4af;color:#b91c1c;}
.rbac-override-row.mode-inherit .override-select{background:#f8fafc;color:#475569;}

@media (max-width: 980px){
  .rbac-designer{grid-template-columns:1fr;}
  .rbac-side{position:static;}
  .rbac-role-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
  .rbac-workspace,.user-rbac-workspace{grid-template-columns:1fr;}
  .rbac-module-nav{position:static;display:flex;flex-direction:row;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x mandatory;}
  .rbac-module-btn{min-width:180px;scroll-snap-align:start;}
}
@media (max-width: 640px){
  .rbac-main,.rbac-side,.rbac-user-designer{border-radius:18px;padding:12px;}
  .rbac-role-tabs{grid-template-columns:1fr;}
  .rbac-topbar,.rbac-panel-head,.rbac-module-head,.rbac-user-topbar{align-items:stretch;}
  .rbac-search-wrap,.rbac-user-topbar .rbac-search,.rbac-user-topbar .rbac-filter-select{min-width:0;max-width:none;flex:1 1 100%;}
  .rbac-actions,.rbac-actions.compact,.rbac-module-quick{display:grid;grid-template-columns:1fr 1fr;width:100%;}
  .rbac-actions .btn,.rbac-module-quick .btn{width:100%;}
  .rbac-row{grid-template-columns:44px minmax(0,1fr);padding:11px 12px;}
  .rbac-row .rbac-row-text{grid-column:2;}
  .rbac-override-row{grid-template-columns:1fr;gap:8px;padding:12px;}
  .override-select{width:100%;height:42px;}
  .rbac-module-btn{min-width:155px;padding:9px 10px;}
}

/* v15.55 - مدیریت کاربران و RBAC مخصوص موبایل/دسکتاپ */
.users-mobile-list{display:none;}
.account-type-switch{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px;}
.account-type-option{position:relative;display:flex;gap:12px;align-items:flex-start;border:1px solid #dbe6f3;border-radius:18px;background:#fff;padding:16px;cursor:pointer;transition:.18s ease;min-height:88px;}
.account-type-option input{width:18px;height:18px;accent-color:#0f7c59;margin-top:2px;}
.account-type-option span{display:flex;flex-direction:column;gap:6px;line-height:1.8;}
.account-type-option b{color:#12345a;font-size:16px;}
.account-type-option small{color:#64748b;font-size:12px;}
.account-type-option:has(input:checked){border-color:#9ed2ff;background:#f2f9ff;box-shadow:0 0 0 4px rgba(29,143,225,.08);}
.account-type-option.system:has(input:checked){border-color:#fdba74;background:#fff8ed;box-shadow:0 0 0 4px rgba(251,146,60,.10);}
.system-permissions-box{border:1px solid #dbe6f3;border-radius:22px;background:linear-gradient(180deg,#fff,#f8fbff);padding:16px;margin-top:12px;}
.system-permissions-box .permission-toolbar{align-items:flex-start;}
.permissions-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;}
.permission-group-card{border:1px solid #dbe6f3;border-radius:18px;background:#fff;overflow:hidden;}
.permission-group-title{padding:12px 14px;background:#eef6ff;color:#12345a;font-weight:900;border-bottom:1px solid #dbe6f3;}
.permission-group-card .permissions-grid{padding:10px;display:grid;grid-template-columns:1fr;gap:8px;}
.permission-group-card .permission-item{margin:0;}
.rbac-user-designer .permission-toolbar{border-bottom:1px solid #e6eef8;padding-bottom:12px;}
.rbac-user-designer .permission-help-mini{font-size:12px;color:#64748b;}

@media(max-width:720px){
  .page-header-card{border-radius:22px;margin:12px;padding:18px;text-align:right;}
  .page-header-card h1{font-size:30px;line-height:1.45;}
  .page-header-card p{font-size:16px;line-height:2;}
  .page-header-card .toolbar-actions{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px;}
  .page-header-card .toolbar-actions .btn{width:100%;justify-content:center;min-height:46px;}
  .auth-table-card{padding:12px;border-radius:22px;}
  .auth-table-card .clean-table{display:none;}
  .users-mobile-list{display:grid;gap:12px;}
  .user-mobile-card{border:1px solid #dbe6f3;border-radius:20px;background:linear-gradient(180deg,#fff,#f8fbff);padding:14px;box-shadow:0 10px 24px rgba(15,45,77,.06);}
  .user-mobile-card.system{box-shadow:inset 4px 0 0 #f59e0b,0 10px 24px rgba(15,45,77,.06);}
  .user-mobile-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;border-bottom:1px solid #edf3f9;padding-bottom:10px;}
  .user-mobile-head b{display:block;color:#12345a;font-size:18px;line-height:1.7;}
  .user-mobile-head small{display:block;color:#64748b;direction:ltr;text-align:right;font-weight:800;}
  .user-mobile-meta{display:grid;grid-template-columns:1fr;gap:7px;margin:12px 0;color:#334155;font-weight:800;line-height:1.8;}
  .user-mobile-meta span{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:14px;padding:8px 10px;}
  .user-mobile-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
  .user-mobile-actions form{display:block;}
  .user-mobile-actions .btn,.user-mobile-actions button{width:100%;min-height:42px;}

  .auth-user-form{margin:0 12px 14px;padding:12px;border-radius:22px;}
  .account-type-switch{grid-template-columns:1fr;gap:10px;}
  .account-type-option{min-height:0;padding:12px 14px;border-radius:18px;align-items:center;}
  .account-type-option input{width:22px;height:22px;flex:0 0 auto;}
  .account-type-option b{font-size:17px;}
  .account-type-option small{font-size:12px;line-height:1.8;}
  .form-grid.three{gap:12px;}
  .field{gap:8px;}
  .field label{font-size:15px;}
  .field input,.field select{height:48px;border-radius:16px;font-size:16px;}
  .check-field label{min-height:56px;justify-content:center;font-size:16px;border-radius:18px;}
  .check-field input{width:26px;height:26px;}
  .system-permissions-box{padding:12px;border-radius:20px;}
  .system-permissions-box .permission-toolbar{display:grid;gap:10px;}
  .permissions-groups{grid-template-columns:1fr;gap:10px;}
  .permission-group-card{border-radius:18px;}
  .permission-item{min-height:44px;border-radius:14px;}

  .rbac-user-designer{margin:14px 0 0;padding:12px;border-radius:22px;background:#fff;}
  .rbac-user-designer .section-title{font-size:22px;text-align:right;margin:0;padding-top:0;}
  .rbac-user-topbar{display:grid!important;grid-template-columns:1fr;gap:10px;}
  .rbac-user-topbar .rbac-actions.compact{grid-template-columns:1fr;}
  .permission-legend{gap:6px;}
  .permission-legend .pill{flex:1 1 calc(50% - 6px);justify-content:center;min-height:34px;}
  .user-rbac-workspace,.rbac-workspace{display:block!important;margin-top:12px;}
  .rbac-module-nav{display:grid!important;grid-template-columns:1fr!important;overflow:visible!important;gap:8px;padding:0!important;position:static!important;}
  .rbac-module-btn{width:100%;min-width:0!important;border-radius:18px;padding:13px 14px;min-height:58px;}
  .rbac-module-btn.active{box-shadow:inset 5px 0 0 #1d8fe1,0 8px 18px rgba(29,143,225,.12);}
  .rbac-module-btn small{font-size:12px;}
  .rbac-permission-area{margin-top:12px;}
  .rbac-module-panel{border-radius:20px;box-shadow:0 10px 28px rgba(15,45,77,.06);}
  .rbac-module-head{display:grid!important;grid-template-columns:1fr;gap:10px;padding:14px;}
  .rbac-module-head h4{font-size:20px;}
  .rbac-module-quick{grid-template-columns:1fr;}
  .rbac-override-row{border-radius:0;padding:12px;}
  .rbac-row-text b{font-size:15px;}
  .rbac-row-text small{font-size:12px;word-break:break-word;}
  .override-select{height:46px;border-radius:15px;font-size:15px;}
  .permission-help{margin:12px 0;padding:12px;border-radius:16px;font-size:13px;line-height:2;}
  .form-actions{position:sticky;bottom:0;background:rgba(248,251,255,.92);backdrop-filter:blur(8px);padding:10px 0;margin-top:10px;z-index:8;}
  .form-actions .btn{width:100%;height:50px;border-radius:16px;font-size:16px;}
}

@media(max-width:420px){
  .page-header-card h1{font-size:26px;}
  .page-header-card .toolbar-actions{grid-template-columns:1fr;}
  .permission-legend .pill{flex-basis:100%;}
}


/* ===== PWA install controls - v16.01 ===== */
.pwa-install-button{
  position:fixed;
  left:16px;
  bottom:16px;
  z-index:1200;
  border:0;
  border-radius:999px;
  padding:11px 18px;
  background:#0f172a;
  color:#fff;
  font-weight:900;
  font-family:inherit;
  box-shadow:0 12px 30px rgba(15,23,42,.22);
  cursor:pointer;
}
.pwa-install-button[hidden],.pwa-install-help[hidden]{display:none!important;}
.pwa-install-help{
  position:fixed;
  left:16px;
  bottom:66px;
  z-index:1200;
  max-width:270px;
  border:1px solid #dbe6f3;
  border-radius:18px;
  padding:12px 14px;
  background:#fff;
  color:#12345a;
  font-weight:800;
  line-height:1.9;
  box-shadow:0 16px 42px rgba(15,45,77,.14);
}
@media(max-width:720px){
  .pwa-install-button{left:12px;bottom:12px;padding:10px 14px;font-size:13px;}
  .pwa-install-help{left:12px;right:12px;bottom:60px;max-width:none;font-size:13px;}
}

/* ===== v16.02 - بهبود فرم تعریف/ویرایش کاربر جدید ===== */
.user-form-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}
.summary-chip{
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid #dbe6f3;
  border-radius:18px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  padding:12px 14px;
  min-width:0;
}
.summary-chip span{
  width:34px;
  height:34px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#eef6ff;
  color:#0f3a63;
  font-weight:950;
  flex:0 0 auto;
}
.summary-chip b{display:block;color:#12345a;font-size:14px;line-height:1.6;}
.summary-chip small{display:block;color:#64748b;font-size:12px;line-height:1.7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.summary-chip.primary{border-color:#9ed2ff;background:#f2f9ff;}
.summary-chip.primary span{background:#0f3a63;color:#fff;}
.user-modern-card{
  border:1px solid #dbe6f3;
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff 0%,#f9fbff 100%);
  padding:16px;
  margin-bottom:16px;
  box-shadow:0 10px 28px rgba(15,45,77,.045);
}
.user-card-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
  padding-bottom:12px;
  border-bottom:1px solid #edf3f9;
}
.user-card-head .card-icon{
  width:44px;
  height:44px;
  border-radius:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#eef6ff;
  font-size:21px;
}
.user-card-head h3{margin:0;color:#12345a;font-size:19px;}
.user-card-head small{color:#64748b;line-height:1.9;}
.user-main-fields,.user-password-fields,.role-grid{align-items:end;}
.temporary-password-note{
  min-height:74px;
  border:1px dashed #bfd4ec;
  border-radius:18px;
  background:#f8fafc;
  padding:12px 14px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  color:#334155;
}
.temporary-password-note b{color:#0f3a63;}
.temporary-password-note small{line-height:1.8;color:#64748b;}
.account-type-card .account-type-switch{margin-bottom:0;}
.role-grid{margin-top:14px;}
.role-field small{line-height:1.9;}
.auth-user-form .field.important-field input{border-color:#f59e0b;background:#fffdf5;}
.auth-user-form .field.important-field label{color:#9a3412;}

@media(max-width:720px){
  .user-form-summary{grid-template-columns:1fr;gap:8px;margin-bottom:12px;}
  .summary-chip{padding:10px 12px;border-radius:16px;}
  .summary-chip span{width:30px;height:30px;border-radius:10px;}
  .summary-chip b{font-size:14px;}
  .summary-chip small{font-size:11px;white-space:normal;}
  .user-modern-card{padding:12px;border-radius:22px;margin-bottom:12px;}
  .user-card-head{align-items:flex-start;margin-bottom:12px;padding-bottom:10px;}
  .user-card-head .card-icon{width:40px;height:40px;border-radius:14px;}
  .user-card-head h3{font-size:20px;}
  .user-card-head small{font-size:13px;}
  .user-main-fields,.user-password-fields,.role-grid{display:grid!important;grid-template-columns:1fr!important;gap:12px;}
  .user-active-field{order:3;}
  .temporary-password-note{min-height:0;border-radius:16px;font-size:13px;}
  .account-type-card .account-type-switch{gap:10px;}
  .role-grid{margin-top:12px;}
  .auth-user-form .field input,.auth-user-form .field select{min-height:50px;}
  .auth-user-form .field small{font-size:12px;line-height:1.8;}
  .system-permissions-box.user-modern-card{margin-top:0;}
}

/* ===== PWA status diagnostic page - v17.01 ===== */
.pwa-status-panel{display:flex;flex-direction:column;gap:14px;margin-top:14px}.pwa-status-summary{background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:14px 16px;font-weight:800;color:#334155}.pwa-status-summary.ok{background:#ecfdf5;border-color:#86efac;color:#166534}.pwa-status-summary.warn{background:#fffbeb;border-color:#fcd34d;color:#92400e}.pwa-status-summary.bad{background:#fef2f2;border-color:#fca5a5;color:#991b1b}.pwa-status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.pwa-status-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:14px;box-shadow:0 8px 24px rgba(15,23,42,.06)}.pwa-status-card strong{display:block;font-size:15px;color:#0f172a;margin-bottom:8px}.pwa-status-card span{display:block;font-weight:800;color:#64748b;margin-bottom:6px}.pwa-status-card small{display:block;color:#64748b;line-height:1.8}.pwa-status-card.ok{border-color:#86efac;background:#f0fdf4}.pwa-status-card.ok span{color:#15803d}.pwa-status-card.warn{border-color:#fcd34d;background:#fffbeb}.pwa-status-card.warn span{color:#b45309}.pwa-status-card.bad{border-color:#fca5a5;background:#fef2f2}.pwa-status-card.bad span{color:#b91c1c}.pwa-status-notes,.pwa-status-raw{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:14px}.pwa-status-notes h2{margin-top:0;font-size:18px}.pwa-status-raw pre{direction:ltr;text-align:left;white-space:pre-wrap;overflow:auto;background:#0f172a;color:#e2e8f0;border-radius:12px;padding:12px}
@media(max-width:720px){.pwa-status-grid{grid-template-columns:1fr}.pwa-status-panel{margin-top:10px}.pwa-status-card{border-radius:14px}}

/* Quick access edit tile on dashboard */
.dashboard-quick-v2 .quick-grid .quick-access-edit-tile{
  justify-content:center;
  color:#15803d !important;
  background:linear-gradient(180deg,#f0fdf4,#ecfdf5) !important;
  border:1.5px dashed #22c55e !important;
  box-shadow:0 6px 16px rgba(34,197,94,.10);
}
.dashboard-quick-v2 .quick-grid .quick-access-edit-tile:hover{
  color:#166534 !important;
  background:#dcfce7 !important;
  border-color:#16a34a !important;
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(34,197,94,.18);
}
.dashboard-quick-v2 .quick-access-plus{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:50%;
  background:#22c55e;
  color:#fff;
  font-size:18px;
  font-weight:900;
  line-height:1;
  box-shadow:0 5px 12px rgba(34,197,94,.25);
}
.dashboard-quick-v2 .quick-empty-message{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:12px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#64748b;
  font-weight:700;
  text-align:center;
}


/* settings-menu-accordion-fix-v1: زیرمنوهای تنظیمات فقط با کلیک باز شوند */
aside.sidebar-collapsible.sidebar-drawer .settings-menu .submenu-section > .nested-submenu{
  display:none !important;
}
aside.sidebar-collapsible.sidebar-drawer .settings-menu .submenu-section.open > .nested-submenu{
  display:block !important;
}
aside.sidebar-collapsible.sidebar-drawer .settings-menu.menu-force-closed .submenu-section > .nested-submenu{
  display:none !important;
}

/* autosadra-settings-menu-v3: ساختار ثابت و بدون تداخل برای منوی تنظیمات */
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .settings-root-submenu{
  padding:7px !important;
}
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .settings-section{
  display:block !important;
  position:static !important;
  margin:6px 0 !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
}
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .settings-section > .section-toggle{
  width:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  padding:11px 13px !important;
  border-radius:12px !important;
  background:rgba(255,255,255,.12) !important;
  color:#eef6ff !important;
  border:1px solid rgba(255,255,255,.10) !important;
  font-size:14px !important;
  font-weight:800 !important;
  cursor:pointer !important;
}
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .settings-section > .settings-section-panel{
  display:none !important;
  margin:5px 8px 8px 0 !important;
  padding:6px 8px 6px 0 !important;
  border-right:2px solid rgba(255,255,255,.16) !important;
  background:transparent !important;
}
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .settings-section.open > .settings-section-panel{
  display:block !important;
}
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .settings-direct-link,
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .settings-section-panel > .subnav{
  display:block !important;
  margin:3px 0 !important;
  padding:10px 12px !important;
  border-radius:10px !important;
  color:#eef6ff !important;
  text-decoration:none !important;
  font-size:13.5px !important;
  font-weight:700 !important;
  line-height:1.7 !important;
  background:transparent !important;
}
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .settings-direct-link:hover,
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .settings-section-panel > .subnav:hover{
  background:rgba(255,255,255,.12) !important;
}
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .settings-inline-label{
  display:block !important;
  margin-bottom:5px !important;
  color:#eef6ff !important;
  font-weight:800 !important;
  text-align:right !important;
}
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .font-setting-box,
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .currency-setting-box,
aside.sidebar-collapsible.sidebar-drawer .autosadra-settings-menu-v3 .theme-setting-box{
  margin:5px 0 7px !important;
  padding:9px 10px !important;
  border-radius:12px !important;
  background:rgba(255,255,255,.08) !important;
  border:1px solid rgba(255,255,255,.10) !important;
}

/* AutoSadra secure field visibility toggle */
.password-eye-wrap{position:relative;display:block;width:100%;}
.password-eye-wrap>input{width:100%;padding-left:46px!important;}
.password-eye-btn{position:absolute;left:8px;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:10px;background:#eef4fb;color:#163a5f;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:16px;line-height:1;z-index:3;}
.password-eye-btn:hover{background:#dbeafe;}
.password-eye-btn:focus{outline:2px solid #93c5fd;outline-offset:1px;}
.auth-form .password-eye-wrap{margin-bottom:10px;}
.auth-form .password-eye-wrap input{box-sizing:border-box;}

/* Category Permission Engine v1 */
.category-access-card{margin-top:16px}
.category-access-modules{display:grid;gap:10px;margin-top:12px}
.category-access-row,.category-access-inline{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid var(--border,#e5e7eb);border-radius:14px;background:rgba(255,255,255,.68)}
.category-access-inline{margin:0 0 12px;background:rgba(239,246,255,.72);border-color:rgba(147,197,253,.55)}
.category-access-info{display:flex;flex-direction:column;gap:4px}
.category-access-info b{font-size:14px;color:var(--text,#111827)}
.category-access-info small{color:var(--muted,#6b7280)}
.category-access-modal{position:fixed;inset:0;display:none;z-index:4000;align-items:center;justify-content:center;padding:18px}
.category-access-modal.open{display:flex}
.category-access-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.42);backdrop-filter:blur(2px)}
.category-access-modal-panel{position:relative;width:min(560px,96vw);max-height:86vh;overflow:auto;background:var(--card-bg,#fff);border-radius:18px;box-shadow:0 22px 60px rgba(0,0,0,.28);padding:18px;border:1px solid rgba(255,255,255,.55)}
.category-access-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px}
.category-access-modal-head h3{margin:0 0 4px;font-size:18px}
.category-access-modal-head small{color:var(--muted,#6b7280)}
.category-access-modal-actions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 14px}
.category-access-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.category-access-check{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--border,#e5e7eb);border-radius:12px;background:rgba(248,250,252,.9);cursor:pointer}
.category-access-check input{width:18px;height:18px}
.category-access-check span{font-weight:600}
@media (max-width:700px){.category-access-row,.category-access-inline{align-items:stretch;flex-direction:column}.category-access-row .btn,.category-access-inline .btn{width:100%}.category-access-modal-panel{padding:14px}.category-access-modal-head{flex-direction:column}.category-access-checks{grid-template-columns:1fr}}

/* AutoSadra Customer Portal + Inventory */
.portal-body{min-height:100vh;margin:0;background:linear-gradient(135deg,#f4f7fb,#eef2ff);font-family:Tahoma,Arial,sans-serif;color:#1f2937}.portal-shell{width:min(1100px,94vw);margin:0 auto;padding:32px 0}.portal-card,.portal-form-card,.portal-table-card{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:24px;box-shadow:0 16px 40px rgba(15,23,42,.08);padding:24px}.portal-hero-card,.portal-card{display:flex;align-items:center;justify-content:space-between;gap:20px}.portal-logo{width:92px;height:92px;object-fit:contain}.portal-kicker{color:#2563eb;font-weight:800;margin-bottom:8px}.portal-card h1,.portal-form-card h1{margin:0 0 8px;font-size:28px}.portal-card p,.portal-form-card p{margin:0;color:#64748b;line-height:1.9}.portal-options{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:22px}.portal-option{display:flex;min-height:180px;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:10px;text-decoration:none;color:#0f172a;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:24px;box-shadow:0 16px 38px rgba(15,23,42,.08);transition:.2s}.portal-option:hover{transform:translateY(-4px);box-shadow:0 22px 48px rgba(15,23,42,.12)}.portal-option-icon{font-size:42px}.portal-option strong{font-size:20px}.portal-option small{color:#64748b}.portal-form-shell{min-height:100vh;display:grid;place-items:center;padding:24px}.portal-form-card{width:min(560px,94vw)}.portal-form-card.wide{width:auto}.portal-form-actions,.portal-actions-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px}.portal-form-actions a{color:#2563eb;text-decoration:none}.inventory-search{display:flex;gap:10px;margin:20px 0}.inventory-search input{flex:1;border:1px solid #dbe3ef;border-radius:14px;padding:12px 14px}.inventory-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.inventory-card{overflow:hidden;background:#fff;border-radius:22px;border:1px solid rgba(15,23,42,.08);box-shadow:0 12px 28px rgba(15,23,42,.07)}.inventory-card img,.inventory-no-image{width:100%;height:190px;object-fit:cover;background:#e5e7eb;display:grid;place-items:center;font-size:48px}.inventory-card-body{padding:16px}.inventory-card-body h2{font-size:18px;margin:0 0 8px}.inventory-card-body p{margin:6px 0;line-height:1.8}.portal-empty{grid-column:1/-1;background:#fff;border-radius:18px;padding:24px;text-align:center;color:#64748b}.inventory-admin-thumb{width:72px;height:54px;object-fit:cover;border-radius:10px}.actions-cell{display:flex;gap:6px;flex-wrap:wrap}.btn.sm{padding:6px 10px;font-size:12px}.btn.danger{background:#fee2e2;color:#991b1b;border-color:#fecaca}.span-2{grid-column:span 2}.portal-messages{margin-top:16px}@media(max-width:800px){.portal-options{grid-template-columns:1fr}.portal-hero-card,.portal-card{align-items:flex-start;flex-direction:column}.span-2{grid-column:span 1}.inventory-search{flex-direction:column}}

/* AutoSadra customer portal landing polish - 1405/04 */
.portal-home-body{background:radial-gradient(circle at 18% 8%,rgba(37,99,235,.12),transparent 28%),radial-gradient(circle at 78% 18%,rgba(245,158,11,.11),transparent 30%),linear-gradient(135deg,#f8fbff,#eef4ff 55%,#f8fafc);color:#10213f}.portal-home-shell{width:min(1680px,96vw);padding:28px 0 22px}.portal-home-hero{position:relative;overflow:hidden;min-height:142px;padding:26px 34px;border-radius:28px;background:linear-gradient(115deg,rgba(255,255,255,.96),rgba(248,251,255,.9));box-shadow:0 18px 55px rgba(15,35,75,.11);display:flex;flex-direction:row;align-items:center;justify-content:space-between}.portal-home-hero:before{content:"";position:absolute;inset:-45% 18% auto auto;width:56%;height:130%;background:repeating-linear-gradient(165deg,rgba(37,99,235,.07),rgba(37,99,235,.07) 1px,transparent 2px,transparent 9px);opacity:.7;transform:rotate(-8deg);pointer-events:none}.portal-hero-content{position:relative;z-index:1;text-align:right;max-width:760px}.portal-hero-content h1{font-size:44px;letter-spacing:-1px;color:#10213f;margin:0 0 10px;font-weight:900}.portal-hero-content p{border-right:5px solid #2563eb;padding-right:14px;color:#263a5c;font-size:15px}.portal-home-logo{position:relative;z-index:1;width:118px;height:118px;border-radius:22px;background:#0f172a;box-shadow:0 16px 36px rgba(15,23,42,.2);padding:0;object-fit:cover}.portal-clock-card{position:relative;z-index:1;direction:ltr;min-width:250px;display:grid;grid-template-columns:1fr auto;grid-template-areas:"time icon" "date icon" "sub icon";align-items:center;gap:3px 16px;background:rgba(255,255,255,.86);border:1px solid rgba(37,99,235,.10);border-radius:22px;padding:18px 22px;box-shadow:0 14px 34px rgba(15,35,75,.10);backdrop-filter:blur(8px)}.portal-clock-card:after{content:"📅";grid-area:icon;display:grid;place-items:center;width:54px;height:54px;border-radius:16px;background:#e8f0ff;font-size:27px}.portal-clock-time{grid-area:time;font-weight:900;font-size:22px;color:#0b3a82}.portal-clock-date{grid-area:date;direction:rtl;font-weight:700;color:#20385f}.portal-clock-subdate{grid-area:sub;direction:rtl;color:#64748b;font-size:13px}.portal-home-options{gap:28px;margin-top:42px}.portal-home-options .portal-option{position:relative;overflow:hidden;min-height:360px;padding:28px 34px;border-radius:24px;background:rgba(255,255,255,.92);box-shadow:0 18px 48px rgba(15,35,75,.10);border:1px solid rgba(15,23,42,.06)}.portal-home-options .portal-option:before{content:"";position:absolute;inset:14px;border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.96) 48%,rgba(255,255,255,1));z-index:0}.portal-home-options .portal-option>*{position:relative;z-index:1}.portal-option-bg{position:absolute!important;inset:14px 14px auto 14px;height:145px;border-radius:18px;opacity:.86}.portal-option-bg.user-bg{background:linear-gradient(135deg,rgba(124,58,237,.20),rgba(255,255,255,.35)),radial-gradient(circle at 50% 20%,rgba(124,58,237,.18),transparent 36%)}.portal-option-bg.customer-bg{background:linear-gradient(135deg,rgba(245,158,11,.22),rgba(255,255,255,.35)),radial-gradient(circle at 72% 44%,rgba(245,158,11,.20),transparent 36%)}.portal-option-bg.car-bg{background:linear-gradient(135deg,rgba(37,99,235,.20),rgba(255,255,255,.35)),radial-gradient(circle at 22% 44%,rgba(37,99,235,.20),transparent 36%)}.portal-home-options .portal-option-icon{display:grid;place-items:center;width:92px;height:92px;border-radius:50%;background:#fff;box-shadow:0 10px 30px rgba(15,35,75,.10);font-size:44px;margin-bottom:26px}.portal-home-options .portal-option strong{font-size:26px;font-weight:900;color:#10213f}.portal-home-options .portal-option small{font-size:15px;color:#334d74}.portal-option-btn{display:inline-flex;align-items:center;justify-content:center;min-width:245px;margin-top:24px;border-radius:14px;padding:14px 20px;color:#fff;font-weight:900;box-shadow:0 12px 26px rgba(15,35,75,.18)}.portal-option-btn:before{content:"←";font-size:25px;margin-left:12px}.portal-option-btn.purple{background:linear-gradient(135deg,#6d3bd2,#9b47d8)}.portal-option-btn.gold{background:linear-gradient(135deg,#f59e0b,#fbbf24)}.portal-option-btn.blue{background:linear-gradient(135deg,#0f6de8,#3b82f6)}.portal-contact-card{display:grid;grid-template-columns:1fr 1fr 1.5fr 1fr;gap:0;align-items:center;margin:34px auto 0;background:rgba(255,255,255,.94);border:1px solid rgba(15,23,42,.07);border-radius:24px;box-shadow:0 18px 48px rgba(15,35,75,.09);padding:18px 22px}.portal-contact-item{display:flex;align-items:center;gap:14px;text-decoration:none;color:#10213f;padding:8px 18px;border-left:1px solid #dbe6f5}.portal-contact-item:last-child{border-left:0}.portal-contact-icon{display:grid;place-items:center;flex:0 0 52px;width:52px;height:52px;border-radius:50%;background:#e8f0ff;font-size:25px}.portal-contact-item strong{display:block;font-size:16px;font-weight:900;margin-bottom:6px}.portal-contact-item span:not(.portal-contact-icon){display:block;color:#102a56;font-weight:800}.portal-contact-item.wide span:not(.portal-contact-icon),.location-link span:not(.portal-contact-icon){font-weight:700;color:#334d74;line-height:1.7}.location-link,.contact-call-link{transition:.2s}.location-link:hover,.contact-call-link:hover{background:#f7faff;border-radius:18px}.portal-contact-item.disabled{opacity:.62;cursor:not-allowed}.portal-home-footer{margin-top:28px;background:linear-gradient(135deg,#0f2746,#112f57);color:#fff;border-radius:18px;text-align:center;padding:18px;box-shadow:0 18px 40px rgba(15,35,75,.18);font-weight:700}@media(max-width:1050px){.portal-home-hero{flex-wrap:wrap}.portal-clock-card{order:3;width:100%;min-width:0}.portal-home-options{grid-template-columns:1fr}.portal-contact-card{grid-template-columns:1fr 1fr}.portal-contact-item:nth-child(2n){border-left:0}}@media(max-width:620px){.portal-home-shell{width:min(94vw,620px);padding-top:18px}.portal-home-hero{padding:22px;align-items:flex-start}.portal-hero-content h1{font-size:32px}.portal-home-logo{width:92px;height:92px}.portal-contact-card{grid-template-columns:1fr}.portal-contact-item{border-left:0;border-bottom:1px solid #dbe6f5}.portal-contact-item:last-child{border-bottom:0}.portal-option-btn{min-width:0;width:100%}}


/* Customer portal contact: support two titled mobile numbers - 1405/04/12 */
.portal-contact-card{grid-template-columns:1fr 1fr 1fr 1.5fr 1fr;}
@media(max-width:1050px){.portal-contact-card{grid-template-columns:1fr 1fr;}}
@media(max-width:620px){.portal-contact-card{grid-template-columns:1fr;}}

/* Customer portal: registration and first-login password flow */
.portal-form-shell.wide .portal-form-card{width:min(920px,94vw)}
.customer-register-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.customer-register-grid label{display:flex;flex-direction:column;gap:7px;font-weight:800;color:#12324d}
.customer-register-grid input,.customer-register-grid textarea{border:1px solid #d8e2f0;border-radius:13px;padding:11px 12px;font:inherit;background:#fff;color:#102a43;outline:none}
.customer-register-grid textarea{resize:vertical;min-height:76px}
.customer-register-grid input:focus,.customer-register-grid textarea:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.customer-register-grid .wide-field{grid-column:span 2}
.customer-register-grid .btn{justify-self:start;margin-top:4px}
.customer-register-grid b{color:#d93025}
@media(max-width:800px){.customer-register-grid{grid-template-columns:1fr}.customer-register-grid .wide-field{grid-column:span 1}}

/* Customer dashboard polish - 1405/04/12 */
.customer-dashboard-body{background:radial-gradient(circle at 18% 8%,rgba(37,99,235,.12),transparent 28%),radial-gradient(circle at 82% 12%,rgba(16,185,129,.10),transparent 30%),linear-gradient(135deg,#f6f9ff,#eef4ff 58%,#f8fafc)}
.customer-dashboard-shell{width:min(1680px,96vw);padding:30px 0 34px}
.customer-dashboard-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;background:linear-gradient(120deg,rgba(255,255,255,.98),rgba(248,251,255,.92));border:1px solid rgba(15,23,42,.07);border-radius:28px;box-shadow:0 18px 55px rgba(15,35,75,.11);padding:26px 30px;position:relative;overflow:hidden}
.customer-dashboard-hero:before{content:"";position:absolute;inset:-60px 28% auto auto;width:52%;height:210px;background:repeating-linear-gradient(160deg,rgba(37,99,235,.07),rgba(37,99,235,.07) 1px,transparent 2px,transparent 10px);transform:rotate(-8deg);pointer-events:none}
.customer-hero-main{display:flex;align-items:center;gap:18px;position:relative;z-index:1}
.customer-avatar{display:grid;place-items:center;flex:0 0 76px;width:76px;height:76px;border-radius:24px;background:linear-gradient(135deg,#0f6de8,#0f2746);color:#fff;font-size:34px;font-weight:900;box-shadow:0 16px 34px rgba(15,35,75,.22)}
.customer-hero-main h1{margin:0 0 8px;font-size:34px;color:#10213f;font-weight:900;letter-spacing:-.5px}
.customer-hero-main p{margin:0;color:#334d74;line-height:1.9;max-width:780px}
.customer-hero-meta{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px}
.customer-hero-meta span{display:inline-flex;align-items:center;gap:5px;background:#eef6ff;border:1px solid rgba(37,99,235,.10);border-radius:999px;padding:7px 12px;color:#29476d;font-size:13px}
.customer-hero-meta b{color:#0f2746}
.customer-hero-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;position:relative;z-index:1;min-width:330px}
.customer-quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-top:24px}
.customer-stat-card{position:relative;overflow:hidden;min-height:112px;background:#fff;border:1px solid rgba(15,23,42,.07);border-radius:24px;box-shadow:0 14px 38px rgba(15,35,75,.08);padding:18px 20px;display:flex;flex-direction:column;gap:8px}
.customer-stat-card:after{content:"";position:absolute;left:-28px;top:-34px;width:110px;height:110px;border-radius:50%;opacity:.12}
.customer-stat-card.blue:after{background:#2563eb}.customer-stat-card.amber:after{background:#f59e0b}.customer-stat-card.green:after{background:#10b981}.customer-stat-card.red:after{background:#ef4444}
.customer-stat-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:15px;background:#eef4ff;font-size:23px}
.customer-stat-card small{color:#64748b;font-weight:800}.customer-stat-card strong{font-size:28px;color:#10213f;font-weight:900}
.customer-dashboard-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:18px;margin-top:22px}
.customer-action-card{display:flex;flex-direction:column;gap:14px;background:rgba(255,255,255,.96);border:1px solid rgba(15,23,42,.07);border-radius:24px;box-shadow:0 16px 42px rgba(15,35,75,.08);padding:22px;min-height:205px}
.customer-action-card.primary-action{background:linear-gradient(135deg,#fff,#f4f9ff)}
.customer-action-card h2{margin:0;color:#10213f;font-size:20px;font-weight:900}.customer-action-card p{margin:0;color:#526b8d;line-height:1.85}.customer-action-card .btn{align-self:flex-start;margin-top:auto}
.customer-action-icon{display:grid;place-items:center;width:56px;height:56px;border-radius:18px;background:#e8f0ff;font-size:28px;box-shadow:0 10px 24px rgba(15,35,75,.08)}
.customer-soon-badge{align-self:flex-start;margin-top:auto;background:#eef2ff;color:#3730a3;border:1px solid #c7d2fe;border-radius:999px;padding:8px 13px;font-weight:900}.muted-card{opacity:.88}
.customer-requests-card{margin-top:22px}.customer-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.customer-section-head h2{margin:0;color:#10213f;font-size:24px}
.customer-request-list{display:grid;gap:12px}.customer-request-item{display:grid;grid-template-columns:minmax(260px,1fr) 180px 160px;align-items:center;gap:12px;background:#f8fbff;border:1px solid #e4edf8;border-radius:18px;padding:14px 16px}
.customer-request-title{display:flex;align-items:center;gap:12px}.customer-car-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:15px;background:#e8f0ff;font-size:23px}.customer-request-title strong{display:block;color:#10213f;font-weight:900}.customer-request-title small{display:block;color:#64748b;margin-top:4px}.customer-request-price{font-weight:900;color:#0f2746;text-align:center}
.customer-status-badge{display:inline-flex;justify-content:center;align-items:center;border-radius:999px;padding:8px 12px;font-weight:900;font-size:13px}.status-pending{background:#fff7ed;color:#c2410c;border:1px solid #fed7aa}.status-approved{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0}.status-rejected{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}
.customer-empty-state{text-align:center;padding:34px 16px;background:#f8fbff;border:1px dashed #c9d8ea;border-radius:22px;color:#526b8d}.customer-empty-state div{font-size:44px}.customer-empty-state h3{margin:10px 0 6px;color:#10213f}.customer-empty-state p{margin:0 0 16px}
.btn.danger{background:#fee2e2!important;color:#991b1b!important;border-color:#fecaca!important}
@media(max-width:1100px){.customer-dashboard-hero{align-items:flex-start;flex-direction:column}.customer-hero-actions{justify-content:flex-start;min-width:0}.customer-quick-grid{grid-template-columns:repeat(2,1fr)}.customer-dashboard-grid{grid-template-columns:1fr}.customer-request-item{grid-template-columns:1fr;align-items:flex-start}.customer-request-price{text-align:right}.customer-status-badge{justify-content:flex-start;width:max-content}}
@media(max-width:620px){.customer-dashboard-shell{width:min(94vw,620px);padding-top:18px}.customer-dashboard-hero{padding:22px}.customer-hero-main{align-items:flex-start;flex-direction:column}.customer-hero-main h1{font-size:28px}.customer-quick-grid{grid-template-columns:1fr}.customer-hero-actions .btn{width:100%;text-align:center;justify-content:center}.customer-section-head{align-items:flex-start;flex-direction:column}.customer-request-item{padding:13px}.customer-action-card{min-height:0}}


/* Installment contracts UX polish - Audit Stage 8 - 1405/04/15 */
.installment-ux-helper-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 14px;padding:12px 14px;border:1px solid #dbeafe;background:linear-gradient(135deg,#eff6ff,#f8fbff);border-radius:16px;color:#24405f;font-size:13px;line-height:1.9}
.installment-ux-helper-strip b{color:#123a5f}.installment-ux-mini-legend{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-weight:800;color:#51657f}.ux-status-dot{width:10px;height:10px;border-radius:50%;display:inline-block}.ux-status-dot.active{background:#0f5132}.ux-status-dot.settled{background:#047857}.ux-status-dot.waiting{background:#d97706}.ux-status-dot.blocked{background:#64748b}
.installment-status-pill,.contract-status-pill-v4{display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:999px;padding:6px 11px;font-size:12px;font-weight:900;border:1px solid #dbe3ef;background:#f8fafc;color:#334155;white-space:nowrap}.installment-status-pill:before,.contract-status-pill-v4:before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.85}.installment-status-pill.status-active,.contract-status-pill-v4.status-active{background:#ecfdf5;color:#047857;border-color:#a7f3d0}.installment-status-pill.status-settled,.contract-status-pill-v4.status-settled,.installment-status-pill.is-paid{background:#e8fff1;color:#087a35;border-color:#bff0cf}.installment-status-pill.status-waiting,.contract-status-pill-v4.status-waiting,.installment-status-pill.is-due{background:#fff7ed;color:#c2410c;border-color:#fed7aa}.installment-status-pill.status-overdue,.contract-status-pill-v4.status-overdue,.installment-status-pill.is-overdue{background:#fef2f2;color:#b91c1c;border-color:#fecaca}.installment-status-pill.status-locked,.contract-status-pill-v4.status-locked{background:#f1f5f9;color:#475569;border-color:#cbd5e1}.installment-status-pill.is-unpaid{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.installment-row-state.status-settled td{background:linear-gradient(90deg,rgba(236,253,245,.72),rgba(255,255,255,0))}.installment-row-state.status-waiting td{background:linear-gradient(90deg,rgba(255,247,237,.78),rgba(255,255,255,0))}.installment-row-state.status-overdue td{background:linear-gradient(90deg,rgba(254,242,242,.70),rgba(255,255,255,0))}.installment-row-state.status-locked td{background:linear-gradient(90deg,rgba(248,250,252,.85),rgba(255,255,255,0))}.installment-row-state:hover td{filter:brightness(.985)}
.installment-empty-state{background:#f8fafc!important;border:1px dashed #cbd5e1!important;border-radius:14px;color:#64748b!important;font-weight:800}.installment-detail-head-v4.status-settled{border-color:#bbf7d0;background:linear-gradient(135deg,#f0fdf4,#ffffff)}.installment-detail-head-v4.status-waiting{border-color:#fed7aa;background:linear-gradient(135deg,#fff7ed,#ffffff)}.installment-detail-head-v4.status-locked{border-color:#cbd5e1;background:linear-gradient(135deg,#f8fafc,#ffffff)}.installment-detail-head-v4.status-active{border-color:#bfdbfe;background:linear-gradient(135deg,#eff6ff,#ffffff)}
.installment-financial-lock-alert{display:grid;gap:5px;border:1px solid #fed7aa;background:#fff7ed;color:#92400e;border-radius:16px;padding:12px 14px;line-height:1.8}.installment-financial-lock-alert b{color:#7c2d12}.installment-financial-lock-alert small{color:#9a3412;font-weight:800}.installment-detail-ux-note{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0 12px;padding:10px 12px;border:1px solid #e2e8f0;background:#f8fafc;border-radius:14px;color:#475569;font-size:13px}.installment-detail-ux-note b{color:#0f3d70}.installment-detail-toolbar-v4{row-gap:8px}.installment-detail-toolbar-v4 .btn{box-shadow:0 6px 14px rgba(15,35,70,.06)}
@media(max-width:900px){.installment-ux-helper-strip{align-items:flex-start;flex-direction:column}.installment-ux-mini-legend{gap:6px}.installment-detail-toolbar-v4 .btn,.installment-detail-toolbar-v4 form{width:100%}.installment-detail-toolbar-v4 form .btn{width:100%;justify-content:center}.installment-status-pill,.contract-status-pill-v4{white-space:normal;text-align:center}}

/* CHANGELOG_INSTALLMENT_STAGE8_UX_TABLE_CLEANUP_1405
   پاک‌سازی UX جدول قراردادهای اقساط: حذف رنگ زمینه ردیف‌ها و جلوگیری از اثر وضعیت روی منوی عملیات. */
.top-contract-table tr.installment-row-state,
.top-contract-table tr.installment-row-state.status-active,
.top-contract-table tr.installment-row-state.status-settled,
.top-contract-table tr.installment-row-state.status-waiting,
.top-contract-table tr.installment-row-state.status-overdue,
.top-contract-table tr.installment-row-state.status-locked{
  background:transparent!important;
  color:inherit!important;
  border:0!important;
}
.top-contract-table tr.installment-row-state td{
  background:#fff!important;
  color:inherit;
  border-color:#e5edf6;
  filter:none!important;
}
.top-contract-table tr.installment-row-state:hover td{
  background:#f8fbff!important;
  filter:none!important;
}
.top-contract-table tr.installment-row-state.selected-row td{
  background:#eef6ff!important;
  color:#102f54!important;
}
.top-contract-table .installment-row-actions,
.top-contract-table .actions-cell.installment-row-actions{
  display:table-cell!important;
  background:#fff!important;
  position:relative;
  overflow:visible;
}
.top-contract-table tr.installment-row-state:hover .installment-row-actions,
.top-contract-table tr.installment-row-state:hover .actions-cell.installment-row-actions{
  background:#f8fbff!important;
}
.top-contract-table tr.installment-row-state.selected-row .installment-row-actions,
.top-contract-table tr.installment-row-state.selected-row .actions-cell.installment-row-actions{
  background:#eef6ff!important;
}
.top-contract-table .row-action-trigger,
.top-contract-table tr.installment-row-state.status-active .row-action-trigger,
.top-contract-table tr.installment-row-state.status-settled .row-action-trigger,
.top-contract-table tr.installment-row-state.status-waiting .row-action-trigger,
.top-contract-table tr.installment-row-state.status-overdue .row-action-trigger,
.top-contract-table tr.installment-row-state.status-locked .row-action-trigger{
  background:#f8fbff!important;
  color:#0f3d70!important;
  border:1px solid #d6e4f5!important;
  box-shadow:none!important;
}
.top-contract-table .row-action-trigger::before,
.top-contract-table .row-action-trigger::after,
.top-contract-table .row-action-menu::before,
.top-contract-table .row-action-menu::after,
.top-contract-table .installment-row-actions::before,
.top-contract-table .installment-row-actions::after{
  content:none!important;
  display:none!important;
}
.top-contract-table .row-action-menu.is-open .row-action-trigger,
.top-contract-table .row-action-trigger:hover{
  background:#eaf3ff!important;
  color:#0f3d70!important;
}

/* Opportunities / purchase request flexible options */
.request-options-panel{border:1px solid var(--border, #d9e2ec); border-radius:14px; padding:14px; background:rgba(255,255,255,.65)}
.panel-title-row{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px}
.panel-title-row small{display:block; color:var(--muted, #6b7280); margin-top:4px}
.purchase-option-row{display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:10px; padding:12px; margin-top:10px; border:1px dashed var(--border, #d9e2ec); border-radius:12px; background:#fff}
.purchase-option-row .remove-purchase-option{align-self:end; justify-self:start}
.buy-option-chip{padding:6px 8px; margin:4px 0; border-radius:10px; background:rgba(15,118,110,.08); border:1px solid rgba(15,118,110,.18)}
@media (max-width:800px){.purchase-option-row{grid-template-columns:1fr}.panel-title-row{align-items:flex-start; flex-direction:column}}

/* Opportunities module - polished UI */
.opps-page{direction:rtl;color:#0f172a}.opps-hero{display:flex;align-items:stretch;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#ffffff 0%,#eef6ff 55%,#f0fdf4 100%);border:1px solid #dbe7f3;border-radius:24px;padding:22px 24px;margin-bottom:16px;box-shadow:0 16px 42px rgba(15,45,77,.08);overflow:hidden;position:relative}.opps-hero:before{content:"";position:absolute;inset:auto -70px -90px auto;width:230px;height:230px;border-radius:50%;background:rgba(15,81,50,.10)}.opps-hero-text,.opps-hero-actions{position:relative;z-index:1}.opps-kicker{display:inline-flex;align-items:center;gap:8px;background:#eaf7f0;color:#0f5132;border:1px solid #bee7d0;border-radius:999px;padding:6px 12px;font-weight:900;font-size:12px;margin-bottom:10px}.opps-hero h2{margin:0 0 10px;color:#102f54;font-size:26px;font-weight:1000}.opps-hero p{margin:0;color:#64748b;line-height:2;max-width:780px}.opps-hero-actions{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;min-width:300px}.opps-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:14px;padding:11px 16px;text-decoration:none;font-weight:900;white-space:nowrap;border:1px solid transparent}.opps-btn-primary{background:#0f766e;color:#fff;border-color:#0f766e;box-shadow:0 10px 22px rgba(15,118,110,.20)}.opps-btn-light{background:#fff;color:#334155;border-color:#dbe7f3}.opps-mini-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.opps-mini-card{background:#fff;border:1px solid #e2e8f0;border-radius:20px;padding:16px;box-shadow:0 10px 28px rgba(15,23,42,.05)}.opps-mini-card span{display:block;color:#64748b;font-size:12px;margin-bottom:8px}.opps-mini-card strong{display:block;color:#0f172a;font-size:16px;font-weight:1000}.opps-mini-card.warning{border-color:#fed7aa;background:#fffaf5}.opps-mini-card.warning strong{color:#c2410c}.opps-mini-card.ok{border-color:#bbf7d0;background:#f7fff9}.opps-mini-card.ok strong{color:#047857}.opps-panel{background:#fff;border:1px solid #dbe7f3;border-radius:24px;box-shadow:0 16px 42px rgba(15,23,42,.06);overflow:hidden}.opps-toolbar{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:18px 20px;border-bottom:1px solid #eef2f7;background:#fbfdff}.opps-toolbar h3{margin:0 0 7px;color:#102f54;font-size:18px}.opps-toolbar p{margin:0;color:#64748b;line-height:1.9}.opps-tabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.opps-tab{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 14px;border-radius:999px;background:#f1f5f9;color:#334155;text-decoration:none;font-weight:900;border:1px solid #e2e8f0}.opps-tab:hover{background:#eaf7f0;color:#0f5132;border-color:#bee7d0}.opps-tab.active{background:#0f5132;color:#fff;border-color:#0f5132;box-shadow:0 10px 20px rgba(15,81,50,.18)}.opps-table-wrap{width:100%;overflow:auto;max-height:calc(100vh - 330px)}.opps-table{width:100%;min-width:1180px;border-collapse:separate;border-spacing:0}.opps-table th{position:sticky;top:0;z-index:2;background:#f8fafc;color:#334155;font-size:13px;font-weight:1000;border-bottom:1px solid #e2e8f0;padding:13px 12px;text-align:right}.opps-table td{padding:14px 12px;border-bottom:1px solid #eef2f7;vertical-align:middle;background:#fff;white-space:nowrap}.opps-table tbody tr:nth-child(even) td{background:#fbfdff}.opps-table tbody tr:hover td{background:#f7fbff}.opps-row-no{font-weight:1000;color:#64748b;text-align:center}.opps-thumb{width:78px;height:58px;border-radius:14px;object-fit:cover;border:1px solid #e2e8f0;box-shadow:0 5px 14px rgba(15,23,42,.08)}.opps-no-image{width:78px;height:58px;border-radius:14px;background:#f1f5f9;border:1px dashed #cbd5e1;color:#64748b;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900}.opps-car-cell{min-width:240px;max-width:380px;white-space:normal!important}.opps-car-title{font-weight:1000;color:#0f172a;font-size:15px;margin-bottom:7px}.opps-car-meta{display:flex;gap:7px;flex-wrap:wrap}.opps-car-meta span,.opps-date-chip{display:inline-flex;align-items:center;border-radius:999px;background:#f1f5f9;color:#475569;padding:4px 10px;font-size:12px;font-weight:800}.opps-date-chip.muted{color:#64748b}.opps-description{margin-top:8px;color:#64748b;font-size:12px;line-height:1.8;max-width:360px}.opps-price{font-weight:1000;color:#166534;font-size:15px}.opps-required-chip{display:inline-flex;align-items:center;border-radius:999px;background:#fff7ed;color:#c2410c;border:1px solid #fed7aa;padding:4px 10px;font-size:12px;font-weight:900}.opps-source-chip{display:inline-flex;border-radius:999px;padding:5px 11px;font-size:12px;font-weight:900}.opps-source-chip.customer{background:#eef2ff;color:#3730a3;border:1px solid #c7d2fe}.opps-source-chip.showroom{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0}.opps-contact-cell strong{display:block;color:#0f172a;margin-bottom:5px}.opps-contact-cell small{display:block;color:#64748b}.opps-status{display:inline-flex;align-items:center;justify-content:center;min-width:92px;border-radius:999px;padding:7px 12px;font-weight:1000;font-size:12px;border:1px solid transparent}.opps-status.status-pending{background:#fff7ed;color:#c2410c;border-color:#fed7aa}.opps-status.status-approved{background:#ecfdf5;color:#047857;border-color:#a7f3d0}.opps-status.status-converted{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}.opps-status.status-expired{background:#f1f5f9;color:#475569;border-color:#cbd5e1}.opps-status.status-rejected{background:#fef2f2;color:#b91c1c;border-color:#fecaca}.opps-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-width:210px}.opps-actions form{display:inline-flex;margin:0}.opps-action-btn{display:inline-flex;align-items:center;justify-content:center;border-radius:11px;padding:8px 11px;font-size:12px;font-weight:1000;text-decoration:none;border:1px solid transparent;cursor:pointer;font-family:Tahoma}.opps-action-btn.approve{background:#0f5132;color:#fff}.opps-action-btn.convert{background:#0f766e;color:#fff;box-shadow:0 8px 16px rgba(15,118,110,.16)}.opps-action-btn.reject{background:#fee2e2;color:#991b1b;border-color:#fecaca}.opps-empty{padding:34px;text-align:center;color:#64748b;background:#fbfdff;border-radius:18px;font-weight:800}@media(max-width:1100px){.opps-hero,.opps-toolbar{flex-direction:column}.opps-hero-actions{justify-content:flex-start;min-width:0}.opps-mini-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.opps-tabs{justify-content:flex-start}.opps-table-wrap{max-height:none}}@media(max-width:640px){.opps-mini-stats{grid-template-columns:1fr}.opps-hero{padding:18px}.opps-hero h2{font-size:22px}.opps-btn{width:100%}.opps-toolbar{padding:14px}.opps-tab{font-size:12px;padding:8px 10px}.opps-table{min-width:980px}}

/* Opportunities settings / timers / public contact polish */
.opps-settings-panel{padding:22px}.checkbox-line{display:flex!important;align-items:center;gap:10px;min-height:58px}.checkbox-line input{width:auto!important}.opps-timer-chip{display:flex;flex-direction:column;gap:3px;min-width:116px;border-radius:14px;padding:8px 10px;border:1px solid #dbeafe;background:#eff6ff;color:#1d4ed8}.opps-timer-chip small{font-size:11px;color:#64748b}.opps-timer-chip.timer-active{background:#ecfdf5;border-color:#bbf7d0;color:#047857}.opps-timer-chip.timer-near,.opps-timer-chip.timer-today{background:#fffbeb;border-color:#fde68a;color:#b45309}.opps-timer-chip.timer-expired{background:#fef2f2;border-color:#fecaca;color:#b91c1c}.opps-date-chip.insurance{background:#f0f9ff;border-color:#bae6fd;color:#0369a1}.opps-extend-form{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}.opps-extend-form input{width:52px;min-width:52px;border:1px solid #dbe3ef;border-radius:10px;padding:7px 6px;text-align:center}.opps-action-btn.extend{background:#eef2ff;color:#4338ca;border-color:#c7d2fe}.opps-contact-cell small{display:block;line-height:1.8}.inventory-contact-box{margin-top:12px;padding-top:10px;border-top:1px dashed #dbe3ef;display:grid;gap:7px}.inventory-contact-box div{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f8fafc;border:1px solid #edf2f7;border-radius:12px;padding:8px 10px}.inventory-contact-box strong{font-size:12px;color:#475569}.inventory-contact-box span{font-weight:700;color:#0f172a;direction:ltr;text-align:left}.inventory-insurance{display:inline-flex;margin:10px 0 0!important;padding:5px 9px;border-radius:999px;background:#f0f9ff;color:#0369a1;font-size:12px;font-weight:700}@media(max-width:700px){.inventory-contact-box div{align-items:flex-start;flex-direction:column}.opps-extend-form{width:100%}.opps-extend-form input{flex:1}}

/* Opportunities refinement - row operation menu, dashboard, public inventory privacy */
.opps-actions-menu-cell{position:relative;min-width:120px;overflow:visible!important}.opps-row-menu{position:relative;display:inline-block}.opps-row-menu summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:8px;border:1px solid #d6e4f5;background:#f8fbff;color:#0f3d70;border-radius:12px;padding:8px 12px;font-weight:1000;box-shadow:0 6px 14px rgba(15,45,77,.06)}.opps-row-menu summary::-webkit-details-marker{display:none}.opps-row-menu summary:after{content:'⋮';font-size:17px;line-height:1}.opps-row-menu[open] summary{background:#eaf3ff}.opps-row-menu-list{position:absolute;left:0;top:42px;z-index:30;min-width:220px;background:#fff;border:1px solid #dbe7f3;border-radius:16px;padding:8px;box-shadow:0 18px 42px rgba(15,23,42,.18)}.opps-row-menu-list form{margin:0}.opps-menu-item{width:100%;display:flex;align-items:center;justify-content:flex-start;text-align:right;gap:8px;border:0;background:transparent;color:#334155;text-decoration:none;border-radius:11px;padding:9px 10px;font-family:Tahoma;font-size:13px;font-weight:900;cursor:pointer}.opps-menu-item:hover{background:#f1f5f9}.opps-menu-item.primary{color:#0f766e}.opps-menu-item.success{color:#047857}.opps-menu-item.info{color:#4338ca}.opps-menu-item.danger{color:#b91c1c}.opps-menu-extend{display:grid;grid-template-columns:64px 1fr;gap:6px;align-items:center;margin:4px 0}.opps-menu-extend input{width:64px;border:1px solid #dbe3ef;border-radius:10px;padding:8px;text-align:center}.opps-table-wrap{overflow:visible}.opps-panel{overflow:visible}.opps-table{position:relative}.opps-help-box{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:14px;padding:14px;color:#475569;font-weight:800;line-height:2}.opps-dashboard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0}.opps-dashboard-card{display:flex;flex-direction:column;gap:8px;min-height:130px;background:#fff;border:1px solid #e2e8f0;border-radius:22px;padding:18px;text-decoration:none;color:#0f172a;box-shadow:0 12px 28px rgba(15,23,42,.06);position:relative;overflow:hidden}.opps-dashboard-card:before{content:"";position:absolute;inset:0 auto 0 0;width:8px;background:#0f766e}.opps-dashboard-card span{font-weight:1000;color:#334155}.opps-dashboard-card strong{font-size:32px;color:#102f54;line-height:1}.opps-dashboard-card small{color:#64748b;line-height:1.9}.opps-dashboard-card.pending:before{background:#f59e0b}.opps-dashboard-card.buy:before{background:#2563eb}.opps-dashboard-card.approved-buy:before{background:#7c3aed}.opps-dashboard-card.converted:before{background:#0f766e}.opps-dashboard-card.expired:before{background:#64748b}.opps-workflow-panel,.opps-main-actions{background:#fff;border:1px solid #dbe7f3;border-radius:22px;padding:18px;margin-top:16px;box-shadow:0 12px 28px rgba(15,23,42,.05)}.opps-workflow-panel{display:flex;align-items:center;justify-content:space-between;gap:20px}.opps-workflow-panel h3{margin:0 0 8px;color:#102f54}.opps-workflow-panel p{margin:0;color:#64748b;line-height:2}.opps-flow-steps{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.opps-flow-steps span{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:999px;padding:8px 13px;font-weight:900;color:#334155}.opps-flow-steps b{color:#94a3b8}.opps-main-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.opps-action-tile{border:1px solid #e2e8f0;background:#fbfdff;border-radius:18px;padding:16px;text-decoration:none;color:#0f172a}.opps-action-tile strong{display:block;font-size:16px;margin-bottom:8px;color:#102f54}.opps-action-tile span{display:block;color:#64748b;line-height:1.9}.opps-action-tile.primary{background:#ecfdf5;border-color:#a7f3d0}.public-title-grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}.public-inventory-card{box-shadow:0 10px 24px rgba(15,23,42,.06)}.public-inventory-card h2{margin-bottom:8px;color:#102f54}.public-locked-details{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;border-top:1px dashed #dbe3ef;padding-top:10px;color:#64748b;font-size:13px;line-height:1.8}.public-locked-details a{white-space:nowrap;text-decoration:none;color:#0f766e;font-weight:1000}.portal-actions-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}@media(max-width:1000px){.opps-dashboard-grid,.opps-main-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.opps-workflow-panel{flex-direction:column;align-items:flex-start}.opps-table-wrap{overflow:auto}.opps-panel{overflow:hidden}}@media(max-width:640px){.opps-dashboard-grid,.opps-main-actions{grid-template-columns:1fr}.public-locked-details{align-items:flex-start;flex-direction:column}.opps-row-menu-list{left:auto;right:0}}

/* Public anti-bot security check */
.security-check{
  border:1px solid #d9e8ff;
  background:linear-gradient(135deg,#f8fbff,#eef7ff);
  border-radius:16px;
  padding:14px;
  display:grid;
  gap:8px;
}
.security-check strong{color:#0f3b66; font-weight:900; letter-spacing:.5px}
.security-check .bot-field{position:absolute !important; right:-9999px !important; width:1px !important; height:1px !important; overflow:hidden !important; opacity:0 !important}
.opps-dashboard-card.members:before{background:#0891b2}.opps-dashboard-card.members-converted:before{background:#16a34a}.badge.muted{background:#f1f5f9;color:#475569;border:1px solid #cbd5e1}.row-actions-panel .btn.success{background:#dcfce7;color:#166534;border-color:#86efac}.opps-tab b{font-size:12px;background:rgba(255,255,255,.75);border-radius:999px;padding:2px 7px;margin-right:4px}

/* AutoSadra: clear red errors for public/customer forms */
.flash.error,.msg.error,.portal-alert.error{background:#fef2f2!important;color:#991b1b!important;border:1px solid #fecaca!important;box-shadow:0 10px 24px rgba(153,27,27,.08);font-weight:700}
.flash.ok,.msg.ok,.portal-alert.ok{background:#ecfdf5!important;color:#065f46!important;border:1px solid #bbf7d0!important}
.portal-alerts{display:grid;gap:10px;margin:14px 0 18px}
.portal-alert{border-radius:16px;padding:12px 14px;display:grid;gap:6px;line-height:1.9}
.portal-alert strong{font-size:15px}
.portal-alert.error strong:before{content:'⚠️ ';}
.portal-alert.ok strong:before{content:'✅ ';}
.flash.error:before,.msg.error:before{content:'⚠️ ';font-weight:900}
.flash{border-radius:14px;padding:11px 14px;margin:10px 0;line-height:1.8}

/* Opportunities dashboard v2 - cleaner CRM style */
.opps-dashboard-v2 .opps-dashboard-hero-v2{align-items:flex-start;gap:18px}.opps-dashboard-v2 .opps-quick-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start}.opps-dashboard-v2 .opps-quick-actions .opps-btn{min-width:128px;text-align:center;justify-content:center}.opps-primary-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0}.opps-metric-card{position:relative;display:flex;flex-direction:column;gap:10px;min-height:150px;background:#fff;border:1px solid #dfeaf6;border-radius:24px;padding:18px 20px;text-decoration:none;color:#0f172a;box-shadow:0 14px 34px rgba(15,23,42,.07);overflow:hidden;transition:.18s ease}.opps-metric-card:hover,.opps-dashboard-card:hover,.opps-links-panel a:hover{transform:translateY(-2px);box-shadow:0 18px 38px rgba(15,23,42,.1)}.opps-metric-card:before{content:"";position:absolute;inset:0 auto 0 0;width:7px;background:#0f766e}.opps-metric-card:after{content:"";position:absolute;left:18px;bottom:18px;width:76px;height:8px;border-radius:999px;background:linear-gradient(90deg,rgba(15,118,110,.32),rgba(15,118,110,.06))}.opps-metric-card .metric-label{font-size:16px;font-weight:1000;color:#102f54}.opps-metric-card strong{font-size:38px;line-height:1;color:#102f54;font-weight:1000}.opps-metric-card small{color:#64748b;line-height:1.9;font-weight:800}.opps-metric-card.metric-members:before{background:#0891b2}.opps-metric-card.metric-members:after{background:linear-gradient(90deg,rgba(8,145,178,.32),rgba(8,145,178,.06))}.opps-metric-card.metric-sell:before{background:#f59e0b}.opps-metric-card.metric-sell:after{background:linear-gradient(90deg,rgba(245,158,11,.32),rgba(245,158,11,.06))}.opps-metric-card.metric-buy:before{background:#2563eb}.opps-metric-card.metric-buy:after{background:linear-gradient(90deg,rgba(37,99,235,.32),rgba(37,99,235,.06))}.opps-secondary-metrics{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:6px}.opps-secondary-metrics .opps-dashboard-card{min-height:116px;border-radius:20px;padding:15px 16px;box-shadow:0 10px 24px rgba(15,23,42,.05)}.opps-secondary-metrics .opps-dashboard-card strong{font-size:28px}.opps-secondary-metrics .opps-dashboard-card small{font-size:12px}.opps-dashboard-bottom{display:grid;grid-template-columns:2fr 1fr;gap:14px;margin-top:16px}.opps-workflow-panel-v2,.opps-links-panel{background:#fff;border:1px solid #dbe7f3;border-radius:22px;padding:18px;box-shadow:0 12px 28px rgba(15,23,42,.05)}.opps-workflow-panel-v2{margin-top:0}.opps-flow-steps-v2 span{background:#f8fafc;border-color:#dbe7f3;color:#102f54}.opps-links-panel h3{margin:0 0 12px;color:#102f54}.opps-links-panel{display:flex;flex-direction:column;gap:9px}.opps-links-panel a{display:flex;align-items:center;justify-content:space-between;text-decoration:none;color:#0f3d70;background:#f8fbff;border:1px solid #dbe7f3;border-radius:14px;padding:10px 12px;font-weight:1000;transition:.18s ease}.opps-links-panel a:after{content:"‹";color:#94a3b8;font-size:18px}.opps-dashboard-v2 .opps-main-actions{display:none}.opps-dashboard-v2 .opps-action-tile.primary{background:#fff;border-color:#dbe7f3;color:#102f54}.opps-dashboard-v2 .opps-action-tile.primary strong{color:#0f766e}@media(max-width:1200px){.opps-primary-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.opps-secondary-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.opps-dashboard-bottom{grid-template-columns:1fr}}@media(max-width:700px){.opps-primary-metrics,.opps-secondary-metrics{grid-template-columns:1fr}.opps-dashboard-v2 .opps-quick-actions .opps-btn{width:100%}.opps-metric-card{min-height:132px}.opps-workflow-panel-v2{flex-direction:column;align-items:flex-start}}

/* AutoSadra opportunities dashboard v3 - simplified command center */
.opps-dashboard-v3 .opps-dashboard-hero-v3{
  min-height:unset;
  padding:20px 24px;
  align-items:center;
  margin-bottom:16px;
}
.opps-dashboard-v3 .opps-hero h2{font-size:25px;margin-bottom:8px}
.opps-dashboard-v3 .opps-hero p{line-height:1.9;max-width:760px}
.opps-dashboard-v3 .opps-quick-actions-v3{
  min-width:0;
  display:flex;
  gap:8px;
  justify-content:flex-start;
  align-items:center;
}
.opps-dashboard-v3 .opps-quick-actions-v3 .opps-btn{
  min-width:112px;
  padding:10px 14px;
  border-radius:13px;
  box-shadow:none;
}
.opps-dashboard-v3 .opps-quick-actions-v3 .opps-btn-primary{
  background:#0f766e;
  color:#fff;
  box-shadow:0 10px 22px rgba(15,118,110,.18);
}
.opps-primary-metrics-v3{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:14px 0;
}
.opps-primary-metrics-v3 .opps-metric-card{
  min-height:126px;
  border-radius:20px;
  padding:16px 18px;
  gap:8px;
  box-shadow:0 10px 24px rgba(15,23,42,.055);
}
.opps-primary-metrics-v3 .opps-metric-card .metric-label{font-size:15px}
.opps-primary-metrics-v3 .opps-metric-card strong{font-size:34px}
.opps-primary-metrics-v3 .opps-metric-card small{font-size:12px;line-height:1.8}
.opps-primary-metrics-v3 .opps-metric-card:after{width:64px;height:7px;bottom:14px}
.opps-dashboard-compact-grid{
  display:grid;
  grid-template-columns:minmax(280px,420px) 1fr;
  gap:12px;
  margin-top:12px;
}
.opps-summary-panel,
.opps-workflow-panel-v3{
  background:#fff;
  border:1px solid #dbe7f3;
  border-radius:22px;
  padding:18px;
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}
.opps-panel-head h3{
  margin:0 0 7px;
  color:#102f54;
  font-size:18px;
  font-weight:1000;
}
.opps-panel-head p{
  margin:0;
  color:#64748b;
  line-height:1.9;
  font-size:13px;
}
.opps-summary-list{
  display:grid;
  gap:8px;
  margin-top:14px;
}
.opps-summary-list a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  text-decoration:none;
  background:#f8fbff;
  border:1px solid #e3edf8;
  border-radius:14px;
  padding:10px 12px;
  color:#334155;
  font-weight:900;
  transition:.16s ease;
}
.opps-summary-list a:hover{
  background:#eef6ff;
  transform:translateY(-1px);
}
.opps-summary-list strong{
  min-width:34px;
  text-align:center;
  color:#102f54;
  font-size:20px;
  font-weight:1000;
}
.opps-workflow-panel-v3{
  margin-top:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:18px;
}
.opps-flow-steps-v3{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  padding:14px;
  background:#f8fbff;
  border:1px dashed #dbe7f3;
  border-radius:18px;
}
.opps-flow-steps-v3 span{
  background:#fff;
  border-color:#dbe7f3;
  color:#102f54;
  padding:9px 14px;
}
.opps-flow-steps-v3 b{color:#94a3b8;font-weight:1000}
.opps-dashboard-v3 .opps-secondary-metrics,
.opps-dashboard-v3 .opps-dashboard-bottom,
.opps-dashboard-v3 .opps-links-panel{display:none!important}
@media(max-width:1200px){
  .opps-primary-metrics-v3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .opps-dashboard-compact-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
  .opps-dashboard-v3 .opps-dashboard-hero-v3{padding:18px;align-items:flex-start}
  .opps-dashboard-v3 .opps-quick-actions-v3 .opps-btn{width:100%}
  .opps-primary-metrics-v3{grid-template-columns:1fr}
  .opps-primary-metrics-v3 .opps-metric-card{min-height:118px}
  .opps-flow-steps-v3{justify-content:flex-start}
}



/* AutoSadra opportunities: unified request list pages */
.opps-request-stats a.opps-mini-card,
.opps-mini-stats a.opps-mini-card{
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.opps-request-stats a.opps-mini-card:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 32px rgba(15,23,42,.08);
  border-color:#bfd7ef;
}
.opps-mini-card.active{
  outline:3px solid rgba(15,118,110,.10);
  border-color:#7dd3fc;
}
.opps-mini-card.danger{border-color:#fecaca;background:#fff7f7}
.opps-mini-card.danger strong{color:#b91c1c}
.opps-mini-card.info{border-color:#bfdbfe;background:#f8fbff}
.opps-mini-card.info strong{color:#1d4ed8}
.opps-requests-table{min-width:1080px}
.opps-request-options{
  min-width:300px;
  max-width:470px;
  white-space:normal!important;
}
.opps-option-chip{
  display:inline-flex;
  flex-direction:column;
  gap:4px;
  margin:3px 0 3px 6px;
  padding:9px 12px;
  border:1px solid #dbeafe;
  background:#f8fbff;
  border-radius:14px;
  vertical-align:top;
  max-width:100%;
}
.opps-option-chip strong{
  color:#102f54;
  font-size:13px;
  font-weight:1000;
}
.opps-option-chip small{
  color:#64748b;
  font-size:11px;
  line-height:1.7;
}
.opps-price-cell{
  min-width:150px;
  color:#166534;
  font-weight:1000;
}
.opps-price-cell strong{display:block;color:#166534}
.opps-price-cell small{display:block;color:#64748b;margin-top:4px;font-size:11px}
.opps-description-cell{
  min-width:220px;
  max-width:360px;
  white-space:normal!important;
  color:#475569;
  line-height:1.9;
}
.opps-empty-state{
  display:grid;
  gap:8px;
  padding:38px 20px;
}
.opps-empty-state strong{
  color:#102f54;
  font-size:16px;
}
.opps-empty-state span{
  color:#64748b;
  font-size:13px;
  font-weight:700;
}
@media(max-width:700px){
  .opps-requests-table{min-width:960px}
  .opps-request-options{min-width:260px}
}


/* Rubika quick publish */
.rubika-send-btn{white-space:nowrap;}
.rubika-settings-card input[dir="ltr"]{text-align:left;direction:ltr;}
.rubika-enable-line{display:flex;align-items:center;gap:8px;margin:10px 0 18px;font-weight:700;}

/* Rubika quick publish settings */
.rubika-test-panel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  margin-top:14px;
  border:1px dashed #c9d8ea;
  border-radius:16px;
  background:#f8fbff;
}
.rubika-test-panel small{display:block;margin-top:5px;color:#64748b;line-height:1.9;}
.rubika-test-btn{white-space:nowrap;font-weight:800;}
.rubika-last-test{margin-top:10px;padding:9px 12px;border-radius:12px;font-size:13px;line-height:1.8;}
.rubika-last-test.ok{background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0;}
.rubika-last-test.error{background:#fff1f2;color:#991b1b;border:1px solid #fecdd3;}
@media (max-width: 760px){.rubika-test-panel{align-items:stretch;flex-direction:column}.rubika-test-btn{width:100%;}}


.rubika-opps-send{background:#eefdf7!important;color:#065f46!important;border:1px solid #a7f3d0!important;font-weight:800;}
.rubika-opps-send:hover{background:#d1fae5!important;}

/* Rubika Publisher - cleaner settings UI */
.rubika-v2-page{max-width:1180px;margin:0 auto;}
.rubika-clean-topbar{align-items:center;gap:16px;background:linear-gradient(135deg,#f8fbff,#eefdf7);}
.rubika-top-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.rubika-clean-form{display:flex;flex-direction:column;gap:16px;}
.rubika-step-card{background:#fff;border:1px solid #d9e6f5;border-radius:20px;padding:18px 20px;box-shadow:0 10px 28px rgba(15,35,65,.06);}
.rubika-step-head{display:flex;gap:12px;align-items:flex-start;margin-bottom:14px;}
.rubika-step-head h3{margin:0;color:#0f2f55;font-size:18px;font-weight:900;}
.rubika-step-head p{margin:5px 0 0;color:#64748b;line-height:1.9;font-size:13px;}
.rubika-step-no{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;border-radius:12px;background:#075f46;color:#fff;font-weight:900;box-shadow:0 8px 18px rgba(7,95,70,.18);}
.rubika-main-check{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:14px;padding:11px 13px;margin-bottom:14px;}
.rubika-connection-grid label,.rubika-template-label{font-weight:800;color:#102a43;}
.rubika-clean-test{margin-top:14px;background:#f8fbff;border-style:solid;}
.rubika-business-note{background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46;border-radius:14px;padding:10px 12px;margin:0 0 12px;line-height:1.9;font-size:13px;}
.rubika-template-label textarea{width:100%;margin-top:8px;min-height:260px;border:1px solid #ccd9ea;border-radius:14px;padding:14px;line-height:2;font-size:14px;resize:vertical;background:#fff;}
.rubika-vars-box{margin:12px 0;border:1px solid #dbe8f8;border-radius:14px;background:#f8fbff;padding:10px 12px;}
.rubika-vars-box summary{cursor:pointer;font-weight:900;color:#0f2f55;}
.rubika-vars-grid{display:grid;grid-template-columns:auto 1fr;gap:8px 14px;margin-top:12px;align-items:center;}
.rubika-vars-grid code{direction:ltr;text-align:left;background:#fff;border:1px solid #dbe8f8;border-radius:10px;padding:4px 8px;color:#7c2d12;font-weight:800;}
.rubika-vars-grid span{color:#475569;font-size:13px;}
.rubika-auto-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.rubika-auto-grid .checkline{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:12px;line-height:1.8;font-weight:800;}
@media(max-width:900px){.rubika-auto-grid{grid-template-columns:1fr}.rubika-clean-topbar{align-items:flex-start}.rubika-top-actions{width:100%}.rubika-top-actions .btn{flex:1;text-align:center}.rubika-vars-grid{grid-template-columns:1fr}.rubika-vars-grid code{text-align:center}.rubika-step-card{padding:14px}}

/* Rubika Publisher v1.1 - simplified template/contact builder */
.rubika-info-box{background:#f8fbff;border:1px dashed #b7cce8;border-radius:14px;padding:12px 14px;color:#0f2f55;line-height:2;margin-bottom:14px;display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.rubika-contact-head{align-items:center;}
.rubika-contact-head>div{flex:1;}
.rubika-add-contact{white-space:nowrap;font-weight:900;background:#ecfdf5!important;border-color:#a7f3d0!important;color:#065f46!important;}
.rubika-contact-list{display:flex;flex-direction:column;gap:10px;margin-top:12px;}
.rubika-contact-row{display:grid;grid-template-columns:90px minmax(190px,1fr) minmax(190px,1fr) minmax(220px,1fr) 70px;gap:10px;align-items:end;background:#f8fafc;border:1px solid #dbe8f8;border-radius:16px;padding:12px;}
.rubika-contact-row label{font-weight:800;color:#102a43;font-size:13px;}
.rubika-contact-row select,.rubika-contact-row input{width:100%;margin-top:6px;border:1px solid #ccd9ea;border-radius:12px;padding:9px 10px;background:#fff;}
.rubika-contact-row select[name="contact_icon[]"]{font-size:20px;text-align:center;padding:6px;}
.rubika-custom-text-wrap.is-hidden{display:none;}
.danger-light{background:#fff1f2!important;color:#991b1b!important;border:1px solid #fecdd3!important;font-weight:900;}
.rubika-preview-box{white-space:pre-wrap;direction:rtl;text-align:right;background:#0f172a;color:#f8fafc;border-radius:18px;padding:16px 18px;line-height:2;min-height:180px;font-size:14px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);}
@media(max-width:950px){.rubika-contact-row{grid-template-columns:1fr}.rubika-remove-contact{width:100%;}.rubika-info-box{display:block}.rubika-contact-head{align-items:flex-start}.rubika-add-contact{width:100%;}}

/* Rubika Publisher v2 - inventory sync status */
.opps-rubika-mini{
  display:block;
  padding:6px 8px;
  margin:4px 0;
  border-radius:10px;
  font-size:12px;
  line-height:1.7;
  background:#eef6ff;
  color:#16427a;
  border:1px solid #cfe3ff;
}
.opps-rubika-mini.ok{
  background:#eefaf3;
  color:#12633a;
  border-color:#bfeccf;
}
.opps-rubika-mini.error{
  background:#fff0ee;
  color:#9d2118;
  border-color:#ffd1cc;
}
.rubika-edit-behavior-grid{margin-top:14px;align-items:end}

/* Phase 180 - social networks menu + opportunities mobile polish */
.disabled-subnav{display:block;opacity:.62;cursor:not-allowed;background:#f8fafc!important;color:#64748b!important;border:1px dashed #cbd5e1!important}
.social-network-roadmap{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0 18px}
.social-network-card{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #dbe7f3;border-radius:18px;padding:14px 16px;box-shadow:0 10px 24px rgba(15,23,42,.05)}
.social-network-card span{font-size:26px}.social-network-card b{display:block;color:#102f54}.social-network-card small{display:block;color:#64748b;margin-top:3px}.social-network-card.active{background:#ecfdf5;border-color:#a7f3d0}.social-network-card.active b{color:#065f46}

@media(max-width:760px){
  .social-network-roadmap{grid-template-columns:1fr 1fr}.social-network-card{padding:11px 12px;border-radius:15px}.social-network-card small{font-size:11px}
  .opps-page{padding:0 4px}.opps-hero{display:block;border-radius:20px;padding:16px}.opps-hero-text h2{font-size:20px;line-height:1.7}.opps-hero-text p{font-size:13px;line-height:2}.opps-hero-actions{display:grid;grid-template-columns:1fr;gap:8px;margin-top:12px}.opps-btn{width:100%;justify-content:center;text-align:center}
  .opps-mini-stats{grid-template-columns:1fr 1fr;gap:8px}.opps-mini-card{padding:12px;border-radius:16px}.opps-mini-card strong{font-size:15px;line-height:1.8}
  .opps-toolbar{display:block}.opps-toolbar h3{font-size:17px}.opps-toolbar p{font-size:12px}.opps-tabs{display:flex;overflow-x:auto;gap:7px;padding-bottom:6px;scroll-snap-type:x proximity}.opps-tab{white-space:nowrap;scroll-snap-align:start;padding:8px 11px;border-radius:999px;font-size:12px}
  .opps-table-wrap{overflow:visible}.opps-table,.opps-table tbody,.opps-table tr,.opps-table td{display:block;width:100%}.opps-table thead{display:none}.opps-table tr{background:#fff;border:1px solid #dbe7f3;border-radius:20px;margin:0 0 14px;padding:12px;box-shadow:0 12px 26px rgba(15,23,42,.07)}.opps-table td{border:0!important;padding:9px 0!important;text-align:right}.opps-table td:not(.opps-car-cell):not(.opps-actions-menu-cell)::before{content:attr(data-label);display:block;margin-bottom:5px;font-size:11px;font-weight:900;color:#64748b}.opps-row-no{display:none!important}.opps-thumb,.opps-no-image{width:100%;height:180px;border-radius:16px}.opps-car-title{font-size:17px;margin-top:4px}.opps-car-meta{gap:6px}.opps-car-meta span{font-size:12px}.opps-description{font-size:12px;line-height:2}.opps-price{font-size:18px;font-weight:1000;color:#0f766e}.opps-timer-chip{width:100%;box-sizing:border-box}.opps-contact-cell small{font-size:12px}.opps-status{display:inline-flex;width:100%;justify-content:center;padding:8px 10px;border-radius:13px}.opps-actions-menu-cell{padding-top:12px!important}.opps-row-menu,.opps-row-menu summary{width:100%;box-sizing:border-box}.opps-row-menu summary{justify-content:center}.opps-row-menu-list{position:static;min-width:0;width:100%;box-sizing:border-box;margin-top:8px;box-shadow:none;border-radius:14px}.opps-menu-item{justify-content:center;text-align:center;min-height:40px}.opps-menu-extend{grid-template-columns:1fr;gap:8px}.opps-menu-extend input{width:100%;box-sizing:border-box}.opps-rubika-mini{text-align:center}
}
@media(max-width:420px){.social-network-roadmap,.opps-mini-stats{grid-template-columns:1fr}.opps-thumb,.opps-no-image{height:155px}}

/* Phase 181 - Opportunities mobile operations visibility hotfix
   هدف: در موبایل دکمه عملیات داخل کارت فرصت فروش همیشه بالای کارت و قابل دیدن باشد. */
@media(max-width:760px){
  .opps-inventory-page .opps-table tbody tr{
    display:flex!important;
    flex-direction:column!important;
    gap:0!important;
    overflow:visible!important;
  }
  .opps-inventory-page .opps-table td{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .opps-inventory-page .opps-actions-menu-cell{
    display:block!important;
    order:-100!important;
    position:relative!important;
    padding:0 0 10px!important;
    margin:0 0 10px!important;
    border-bottom:1px dashed #dbe7f3!important;
    background:transparent!important;
    overflow:visible!important;
    z-index:5!important;
  }
  .opps-inventory-page .opps-actions-menu-cell::before{
    content:"عملیات"!important;
    display:block!important;
    margin-bottom:7px!important;
    font-size:11px!important;
    font-weight:1000!important;
    color:#64748b!important;
  }
  .opps-inventory-page .opps-row-menu{
    display:block!important;
    width:100%!important;
  }
  .opps-inventory-page .opps-row-menu summary{
    display:flex!important;
    width:100%!important;
    min-height:46px!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:15px!important;
    background:#0f5132!important;
    border-color:#0f5132!important;
    color:#fff!important;
    box-shadow:0 10px 22px rgba(15,81,50,.18)!important;
  }
  .opps-inventory-page .opps-row-menu summary:after{
    color:#fff!important;
    margin-right:6px!important;
  }
  .opps-inventory-page .opps-row-menu[open] summary{
    background:#12345a!important;
    border-color:#12345a!important;
  }
  .opps-inventory-page .opps-row-menu-list{
    display:flex!important;
    flex-direction:column!important;
    gap:7px!important;
    position:static!important;
    width:100%!important;
    min-width:0!important;
    margin-top:9px!important;
    padding:8px!important;
    border-radius:15px!important;
    background:#f8fbff!important;
    border:1px solid #dbe7f3!important;
    box-shadow:none!important;
  }
  .opps-inventory-page .opps-menu-item{
    min-height:42px!important;
    border-radius:12px!important;
    background:#fff!important;
    border:1px solid #e2e8f0!important;
    justify-content:center!important;
    text-align:center!important;
  }
  .opps-inventory-page .opps-menu-item.primary,
  .opps-inventory-page .opps-menu-item.success{
    background:#ecfdf5!important;
    border-color:#a7f3d0!important;
  }
  .opps-inventory-page .opps-menu-item.danger{
    background:#fef2f2!important;
    border-color:#fecaca!important;
  }
  .opps-inventory-page .opps-menu-item.info{
    background:#eef2ff!important;
    border-color:#c7d2fe!important;
  }
  .opps-inventory-page .rubika-opps-send{
    background:#fff7ed!important;
    border-color:#fed7aa!important;
    color:#9a3412!important;
  }
}

/* Phase 183 - Fix row action dropdown falling under table/viewport (desktop)
   منوی عملیات فرصت‌ها در دسکتاپ به صورت شناور باز می‌شود و اگر پایین صفحه جا نداشت به بالا برمی‌گردد. */
@media (min-width:761px){
  .opps-page .opps-panel,
  .opps-page .opps-table-wrap,
  .opps-page .opps-table,
  .opps-page .opps-actions-menu-cell{
    overflow:visible!important;
  }
  .opps-page .opps-row-menu-list{
    max-height:min(70vh, 430px)!important;
    overflow:auto!important;
    overscroll-behavior:contain;
  }
  .opps-page .opps-row-menu[data-floating="1"] .opps-row-menu-list{
    position:fixed!important;
    top:var(--opps-menu-top, auto)!important;
    left:var(--opps-menu-left, auto)!important;
    right:auto!important;
    z-index:99999!important;
    min-width:var(--opps-menu-width, 230px)!important;
    width:max-content!important;
    max-width:min(360px, calc(100vw - 24px))!important;
    box-shadow:0 22px 54px rgba(15,23,42,.24)!important;
  }
  .opps-page .opps-row-menu[data-floating="1"].dropup .opps-row-menu-list{
    top:var(--opps-menu-top, auto)!important;
  }
}

/* Phase 184 - Clean mobile inventory cards and visible actions
   نسخه موبایل موجودی فرصت‌های فروش از جدول جدا شد تا عملیات‌ها، مخصوصاً ارسال به روبیکا، همیشه واضح و قابل لمس باشند. */
.opps-mobile-list{display:none}
@media(max-width:760px){
  .opps-inventory-page .opps-table-wrap{display:none!important}
  .opps-inventory-page .opps-panel{overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important}
  .opps-inventory-page .opps-mobile-list{display:grid!important;grid-template-columns:1fr;gap:14px;margin-top:12px}
  .opps-mobile-card{background:#fff;border:1px solid #dbe7f3;border-radius:22px;padding:13px;box-shadow:0 14px 32px rgba(15,23,42,.08);overflow:hidden}
  .opps-mobile-card-top{display:grid;grid-template-columns:112px 1fr;gap:12px;align-items:start}
  .opps-mobile-image,.opps-mobile-no-image{width:112px;height:92px;border-radius:17px;object-fit:cover;border:1px solid #dbe7f3;background:#f1f5f9}
  .opps-mobile-no-image{display:flex;align-items:center;justify-content:center;border-style:dashed;color:#64748b;font-size:12px;font-weight:900}
  .opps-mobile-title-wrap h4{margin:0 0 8px;color:#0f172a;font-size:18px;line-height:1.7;font-weight:1000}
  .opps-mobile-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
  .opps-mobile-tags span{display:inline-flex;border-radius:999px;background:#f1f5f9;color:#475569;padding:5px 10px;font-size:12px;font-weight:900}
  .opps-mobile-title-wrap .opps-status{width:auto!important;min-width:0;padding:6px 11px;border-radius:999px;font-size:12px}
  .opps-mobile-desc{margin:10px 0 0;color:#64748b;line-height:2;font-size:13px;border-top:1px dashed #e2e8f0;padding-top:9px}
  .opps-mobile-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
  .opps-mobile-fact{background:#f8fafc;border:1px solid #edf2f7;border-radius:16px;padding:10px;min-height:64px}
  .opps-mobile-fact span,.opps-mobile-contact span{display:block;color:#64748b;font-size:11px;font-weight:900;margin-bottom:5px}
  .opps-mobile-fact strong{display:block;color:#0f172a;font-size:14px;font-weight:1000;line-height:1.8}
  .opps-mobile-fact small{display:block;color:#64748b;font-size:11px;margin-top:2px}
  .opps-mobile-fact.price{background:#ecfdf5;border-color:#bbf7d0}
  .opps-mobile-fact.price strong{color:#047857;font-size:17px}
  .opps-mobile-contact{margin-top:10px;background:#fbfdff;border:1px dashed #dbe7f3;border-radius:16px;padding:10px}
  .opps-mobile-contact strong{display:block;color:#0f172a;font-size:14px;margin-bottom:5px}
  .opps-mobile-contact small{display:block;color:#64748b;line-height:1.8;font-size:12px;direction:rtl;text-align:right}
  .opps-mobile-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #eef2f7}
  .opps-mobile-actions form{margin:0;display:block}
  .opps-mobile-action,.opps-mobile-more summary,.opps-mobile-more button,.opps-mobile-more a{width:100%;min-height:44px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;text-align:center;border-radius:14px;border:1px solid #dbe7f3;background:#fff;color:#102f54;text-decoration:none;font-family:Tahoma;font-size:13px;font-weight:1000;cursor:pointer;padding:9px 10px}
  .opps-mobile-action.primary{background:#0f766e;border-color:#0f766e;color:#fff;box-shadow:0 10px 20px rgba(15,118,110,.16)}
  .opps-mobile-action.success{background:#ecfdf5;border-color:#a7f3d0;color:#047857}
  .opps-mobile-action.rubika{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
  .opps-mobile-more{grid-column:1/-1;display:block}
  .opps-mobile-more summary{list-style:none;background:#f8fbff}
  .opps-mobile-more summary::-webkit-details-marker{display:none}
  .opps-mobile-more summary:after{content:'⋯';margin-right:8px;font-size:18px;line-height:1}
  .opps-mobile-more>div{display:grid;grid-template-columns:1fr;gap:8px;margin-top:8px;background:#f8fbff;border:1px solid #dbe7f3;border-radius:15px;padding:8px}
  .opps-mobile-more button{background:#fff;color:#334155}
  .opps-mobile-more button.danger{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
  .opps-mobile-extend{display:grid!important;grid-template-columns:88px 1fr;gap:8px}
  .opps-mobile-extend input{width:100%;min-height:44px;border:1px solid #dbe7f3;border-radius:14px;text-align:center;font-family:Tahoma;font-weight:900;box-sizing:border-box}
}
@media(max-width:390px){
  .opps-mobile-card-top{grid-template-columns:1fr}
  .opps-mobile-image,.opps-mobile-no-image{width:100%;height:170px}
  .opps-mobile-facts,.opps-mobile-actions{grid-template-columns:1fr}
}

/* Phase 186 - Public inventory guest field controls */
.public-inventory-permission-box{background:#f8fbff;border:1px solid #dbe7f3;border-radius:18px;padding:16px;margin-top:8px}
.public-inventory-permission-box h3{margin:0 0 8px;color:#102f54;font-size:18px;font-weight:1000}
.public-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.public-field-card{display:grid;grid-template-columns:auto 1fr;gap:8px 10px;align-items:start;background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:11px;cursor:pointer;min-height:78px}
.public-field-card input{margin-top:3px}
.public-field-title{display:block;color:#0f172a;font-weight:1000;font-size:14px}
.public-field-card small{grid-column:2;color:#64748b;line-height:1.8;font-size:12px}
.public-inventory-image{width:100%;height:190px;background:#f1f5f9;border-bottom:1px solid #e2e8f0;overflow:hidden;border-radius:18px 18px 0 0}
.public-inventory-image img{width:100%;height:100%;object-fit:cover;display:block}
.public-visible-fields{display:grid;gap:7px;margin-top:8px}
.public-visible-fields p{margin:0;color:#475569;line-height:1.9}
.public-price{display:inline-flex;margin-top:4px;color:#047857;background:#ecfdf5;border:1px solid #bbf7d0;border-radius:12px;padding:7px 11px;font-weight:1000}
@media(max-width:760px){
  .public-field-grid{grid-template-columns:1fr}
  .public-inventory-image{height:170px}
}


/* Phase 188 - Compact mobile inventory cards
   کارت‌های موبایل فرصت‌های فروش فشرده‌تر شدند؛ اگر خودرو عکس نداشته باشد، کادر بزرگ خالی حذف می‌شود. */
@media(max-width:760px){
  .opps-inventory-page .opps-mobile-list{gap:10px!important;margin-top:10px!important}
  .opps-inventory-page .opps-mobile-card{
    padding:12px!important;
    border-radius:20px!important;
    box-shadow:0 10px 24px rgba(15,23,42,.07)!important;
  }
  .opps-inventory-page .opps-mobile-card-top{
    grid-template-columns:92px 1fr!important;
    gap:10px!important;
    align-items:start!important;
  }
  .opps-inventory-page .opps-mobile-card-top.no-photo{
    grid-template-columns:1fr!important;
  }
  .opps-inventory-page .opps-mobile-image{
    width:92px!important;
    height:74px!important;
    border-radius:14px!important;
  }
  .opps-inventory-page .opps-mobile-no-image,
  .opps-inventory-page .opps-mobile-card-top.no-photo .opps-mobile-image-wrap{
    display:none!important;
  }
  .opps-inventory-page .opps-mobile-title-wrap h4{
    font-size:16px!important;
    line-height:1.55!important;
    margin:0 0 6px!important;
  }
  .opps-inventory-page .opps-mobile-tags{gap:5px!important;margin-bottom:6px!important}
  .opps-inventory-page .opps-mobile-tags span{
    padding:4px 8px!important;
    font-size:11px!important;
  }
  .opps-inventory-page .opps-mobile-title-wrap .opps-status{
    padding:5px 9px!important;
    font-size:11px!important;
  }
  .opps-inventory-page .opps-mobile-desc{
    margin-top:8px!important;
    padding-top:7px!important;
    line-height:1.8!important;
    font-size:12px!important;
  }
  .opps-inventory-page .opps-mobile-facts{
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
    margin-top:9px!important;
  }
  .opps-inventory-page .opps-mobile-fact{
    min-height:auto!important;
    padding:8px 9px!important;
    border-radius:14px!important;
  }
  .opps-inventory-page .opps-mobile-fact span,
  .opps-inventory-page .opps-mobile-contact span{
    font-size:10.5px!important;
    margin-bottom:3px!important;
  }
  .opps-inventory-page .opps-mobile-fact strong{
    font-size:13px!important;
    line-height:1.55!important;
  }
  .opps-inventory-page .opps-mobile-fact.price strong{
    font-size:15px!important;
  }
  .opps-inventory-page .opps-mobile-fact small{
    font-size:10.5px!important;
    margin-top:0!important;
  }
  .opps-inventory-page .opps-mobile-contact{
    margin-top:8px!important;
    padding:8px 9px!important;
    border-radius:14px!important;
  }
  .opps-inventory-page .opps-mobile-contact strong{
    font-size:13px!important;
    margin-bottom:3px!important;
  }
  .opps-inventory-page .opps-mobile-contact small{
    font-size:11.5px!important;
    line-height:1.65!important;
  }
  .opps-inventory-page .opps-mobile-actions{
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
    margin-top:9px!important;
    padding-top:9px!important;
  }
  .opps-inventory-page .opps-mobile-action,
  .opps-inventory-page .opps-mobile-more summary,
  .opps-inventory-page .opps-mobile-more button,
  .opps-inventory-page .opps-mobile-more a{
    min-height:40px!important;
    border-radius:13px!important;
    font-size:12px!important;
    padding:8px 9px!important;
  }
}
@media(max-width:390px){
  .opps-inventory-page .opps-mobile-card-top{
    grid-template-columns:82px 1fr!important;
  }
  .opps-inventory-page .opps-mobile-card-top.no-photo{
    grid-template-columns:1fr!important;
  }
  .opps-inventory-page .opps-mobile-image{
    width:82px!important;
    height:66px!important;
  }
  .opps-inventory-page .opps-mobile-facts,
  .opps-inventory-page .opps-mobile-actions{
    grid-template-columns:1fr 1fr!important;
  }
}
@media(max-width:340px){
  .opps-inventory-page .opps-mobile-facts,
  .opps-inventory-page .opps-mobile-actions{
    grid-template-columns:1fr!important;
  }
}

/* phase-189-personal-dashboard-quick-access */
.quick-access-designer .page-card-header{align-items:flex-start}
.quick-access-two-col{display:grid;grid-template-columns:1.05fr .95fr;gap:16px;margin-top:18px}
.quick-access-box{background:#fff;border:1px solid #d8e2ee;border-radius:18px;padding:16px;box-shadow:0 10px 28px rgba(15,35,70,.06)}
.quick-access-box-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.quick-access-box-head h3{margin:0;color:#0f2748;font-size:18px}
.quick-access-box-head span{background:#eef6ff;color:#164e7a;border:1px solid #cfe4ff;border-radius:999px;padding:5px 10px;font-weight:800;font-size:12px}
.quick-access-selected-list,.quick-access-add-list{display:flex;flex-direction:column;gap:10px}
.quick-access-selected-row,.quick-access-add-card{display:flex;align-items:center;gap:10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:10px 12px}
.quick-access-selected-row.dragging{opacity:.6;transform:scale(.995)}
.quick-access-drag{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border:1px dashed #cbd5e1;border-radius:10px;background:#fff;color:#64748b;cursor:grab;font-size:20px;letter-spacing:-2px}
.quick-access-row-title,.quick-access-add-title{font-weight:900;color:#102a43;flex:1}
.quick-access-add-card button{white-space:nowrap}
.btn.small{padding:7px 12px;font-size:13px;border-radius:10px}
.btn.danger,.btn.danger.small{background:#fff1f2;color:#9f1239;border:1px solid #fecdd3}
.btn.danger:hover{background:#ffe4e6}
.quick-access-selected-form .form-actions{margin-top:14px}
.quick-access-edit-tile .quick-access-plus{font-size:20px;font-weight:900;margin-left:6px;color:#16a34a}
@media(max-width:900px){.quick-access-two-col{grid-template-columns:1fr}.quick-access-selected-row,.quick-access-add-card{align-items:stretch}.quick-access-add-card{flex-direction:column}.quick-access-add-card button{width:100%}}

/* Phase 191: Rubika locked preview layout editor */
.rubika-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px;color:#64748b;font-size:13px;flex-wrap:wrap;}
.rubika-layout-preview{display:flex;flex-direction:column;gap:6px;white-space:normal;}
.rubika-preview-line{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid rgba(255,255,255,.10);border-radius:12px;padding:7px 9px;background:rgba(255,255,255,.035);}
.rubika-preview-text{white-space:pre-wrap;line-height:1.9;user-select:none;cursor:default;}
.rubika-preview-text::before{content:'🔒';font-size:10px;opacity:.45;margin-left:6px;}
.rubika-preview-actions{display:flex;align-items:center;gap:6px;flex-shrink:0;opacity:.82;}
.rubika-preview-actions button{border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.08);color:#f8fafc;border-radius:10px;padding:5px 9px;font-size:12px;cursor:pointer;}
.rubika-preview-actions button:disabled{opacity:.35;cursor:not-allowed;}
.rubika-preview-gap{min-height:18px;border-radius:10px;border:1px dashed rgba(125,211,252,.32);background:rgba(14,165,233,.08);position:relative;}
.rubika-preview-gap::after{content:'فاصله';position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:11px;color:rgba(224,242,254,.65);}
@media(max-width:700px){.rubika-preview-line{align-items:flex-start;flex-direction:column}.rubika-preview-actions{width:100%;justify-content:flex-end}.rubika-preview-actions button{flex:1}}

/* Phase 192: portal social bottom sheet + site statistics */
.portal-social-trigger{border:0;background:#fff;cursor:pointer;font-family:inherit;text-align:right}
.portal-social-trigger:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(15,23,42,.08)}
.portal-social-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:9997;opacity:0;transition:.18s ease}
.portal-social-backdrop.open{opacity:1}
.portal-social-sheet{position:fixed;left:50%;top:50%;transform:translate(-50%,-46%) scale(.96);width:min(560px,calc(100vw - 32px));background:#fff;border:1px solid #dbe7f5;border-radius:28px;box-shadow:0 30px 80px rgba(15,23,42,.28);z-index:9998;padding:18px;opacity:0;transition:.18s ease;font-family:inherit}
.portal-social-sheet.open{opacity:1;transform:translate(-50%,-50%) scale(1)}
.portal-social-sheet-handle{display:none;width:54px;height:5px;border-radius:99px;background:#cbd5e1;margin:0 auto 12px}
.portal-social-sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px;border-bottom:1px solid #edf2f7;padding-bottom:12px}
.portal-social-sheet-head h3{margin:0;color:#0f2d52;font-size:22px;font-weight:900}
.portal-social-sheet-head p{margin:6px 0 0;color:#64748b;font-size:13px}
.portal-social-close{width:40px;height:40px;border:0;border-radius:14px;background:#eef3f9;color:#0f2d52;font-size:24px;line-height:1;cursor:pointer}
.portal-social-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.portal-social-link{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:112px;padding:14px;text-decoration:none;color:#0f2d52;background:linear-gradient(145deg,#f8fbff,#eef6ff);border:1px solid #dbe7f5;border-radius:22px;transition:.16s ease;text-align:center}
.portal-social-link:hover{transform:translateY(-2px);box-shadow:0 16px 32px rgba(15,23,42,.12)}
.portal-social-link span{width:48px;height:48px;display:grid;place-items:center;border-radius:18px;background:#fff;font-size:26px;box-shadow:0 8px 20px rgba(15,23,42,.08)}
.portal-social-link strong{font-weight:900;font-size:15px}
.portal-social-link small{font-size:12px;color:#64748b}
.portal-social-empty{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:18px;padding:22px;text-align:center;color:#64748b;font-weight:800}
.stats-overview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0}
.stats-card{background:#fff;border:1px solid #dbe7f5;border-radius:20px;padding:18px;box-shadow:0 10px 24px rgba(15,23,42,.06)}
.stats-card small{display:block;color:#64748b;font-weight:800;margin-bottom:8px}.stats-card strong{display:block;color:#0f2d52;font-size:28px;font-weight:950}.stats-card.green strong{color:#047857}.stats-card.blue strong{color:#1d4ed8}
.stats-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0}.stats-panel{background:#fff;border:1px solid #dbe7f5;border-radius:22px;padding:18px;box-shadow:0 10px 24px rgba(15,23,42,.06)}.stats-panel h3{margin:0 0 14px;color:#0f2d52;font-weight:950}.compact-table{width:100%;border-collapse:separate;border-spacing:0 8px}.compact-table th{color:#64748b;text-align:right;font-size:12px}.compact-table td{background:#f8fafc;border-top:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;padding:10px;font-weight:800}.compact-table td:first-child{border-radius:0 12px 12px 0;border-right:1px solid #e2e8f0}.compact-table td:last-child{border-radius:12px 0 0 12px;border-left:1px solid #e2e8f0}.mini-chart{height:190px;display:flex;align-items:flex-end;gap:5px;background:linear-gradient(180deg,#f8fafc,#eef6ff);border:1px solid #e2e8f0;border-radius:18px;padding:14px}.mini-chart span{flex:1;min-width:3px;border-radius:8px 8px 0 0;background:#0f2d52;opacity:.82}.muted{display:block;color:#64748b;margin-top:10px}.empty-state{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:16px;padding:16px;color:#64748b;text-align:center;font-weight:800}
@media(max-width:900px){.portal-contact-card{grid-template-columns:1fr 1fr}.portal-social-sheet{left:0;right:0;bottom:0;top:auto;width:auto;max-height:82vh;overflow:auto;border-radius:26px 26px 0 0;transform:translateY(105%);padding:14px 14px 20px}.portal-social-sheet.open{transform:translateY(0)}.portal-social-sheet-handle{display:block}.portal-social-grid{grid-template-columns:repeat(2,1fr)}.portal-social-link{min-height:104px}.stats-overview-grid,.stats-columns{grid-template-columns:1fr 1fr}.stats-report-page .form-topbar{align-items:stretch}.stats-panel{overflow-x:auto}}
@media(max-width:560px){.portal-contact-card{grid-template-columns:1fr}.portal-social-grid{grid-template-columns:1fr}.portal-social-sheet-head h3{font-size:18px}.stats-overview-grid,.stats-columns{grid-template-columns:1fr}.stats-card strong{font-size:24px}.mini-chart{height:150px}.compact-table{min-width:520px}}

/* Phase 193 fix: fuller social modal + disabled social cards */
.portal-social-sheet{width:min(720px,calc(100vw - 32px));}
.portal-social-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));}
.portal-social-link.disabled{cursor:not-allowed;opacity:.62;filter:grayscale(.25);background:#f8fafc;color:#64748b;}
.portal-social-link.disabled:hover{transform:none;box-shadow:none;}
.portal-social-link.disabled small{color:#b45309;font-weight:800;}
@media(max-width:900px){.portal-social-sheet{width:auto;}.portal-social-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.portal-social-link{min-height:110px;}}
@media(max-width:420px){.portal-social-grid{grid-template-columns:1fr 1fr;gap:10px}.portal-social-link{padding:12px 8px;border-radius:18px}.portal-social-link span{width:44px;height:44px;font-size:24px}.portal-social-link strong{font-size:14px}.portal-social-link small{font-size:11px}}

/* Phase 196 - real social network icons */
.portal-social-link .portal-social-logo-wrap,
.portal-social-link span.portal-social-logo-wrap{
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 20px rgba(15,23,42,.08);
  font-size:0;
}
.portal-social-logo{
  width:34px;
  height:34px;
  object-fit:contain;
  display:block;
}
.portal-social-link.rubika .portal-social-logo-wrap{background:#fff7ed;}
.portal-social-link.telegram .portal-social-logo-wrap{background:#eff6ff;}
.portal-social-link.eitaa .portal-social-logo-wrap{background:#fffbeb;}
.portal-social-link.bale .portal-social-logo-wrap{background:#eff6ff;}
.portal-social-link.instagram .portal-social-logo-wrap{background:#fff1f2;}
.portal-social-link.website .portal-social-logo-wrap{background:#ecfeff;}
.portal-social-link.location .portal-social-logo-wrap{background:#ecfdf5;}
@media(max-width:420px){
  .portal-social-link .portal-social-logo-wrap,
  .portal-social-link span.portal-social-logo-wrap{width:46px;height:46px;border-radius:16px}
  .portal-social-logo{width:30px;height:30px}
}


/* Phase 208 - Opportunities UX polish: showcase cards, formatted price emphasis, welcome cards */
.autosadra-welcome-card{
  margin:16px 0 18px;
  padding:18px 20px;
  border-radius:24px;
  border:1px solid rgba(15,23,42,.08);
  background:linear-gradient(135deg,#ffffff,#f1f7ff 58%,#ecfdf5);
  box-shadow:0 18px 44px rgba(15,35,75,.09);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  overflow:hidden;
  position:relative;
}
.autosadra-welcome-card:before{
  content:"";
  position:absolute;
  inset:auto -60px -80px auto;
  width:220px;
  height:220px;
  border-radius:50%;
  background:rgba(16,185,129,.12);
  pointer-events:none;
}
.autosadra-welcome-card > *{position:relative;z-index:1}
.welcome-eyebrow{display:inline-flex;margin-bottom:5px;color:#047857;font-size:12px;font-weight:1000}
.autosadra-welcome-card h3{margin:0 0 6px;color:#0f2746;font-size:22px}
.autosadra-welcome-card p{margin:0;color:#475569;line-height:1.9}
.welcome-pills{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.welcome-pills span{display:inline-flex;align-items:center;gap:5px;background:#fff;border:1px solid #dbeafe;border-radius:999px;padding:8px 12px;color:#29476d;font-size:13px;font-weight:900}
.welcome-pills b{color:#0f5132}

.public-title-grid{grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:22px}
.public-inventory-card.autosadra-showcase-card{
  border:1px solid rgba(15,23,42,.08);
  border-radius:26px;
  box-shadow:0 18px 42px rgba(15,35,75,.09);
  background:linear-gradient(180deg,#fff,#fbfdff);
  overflow:hidden;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.public-inventory-card.autosadra-showcase-card:hover{
  transform:translateY(-4px);
  box-shadow:0 26px 60px rgba(15,35,75,.14);
  border-color:rgba(15,81,50,.22);
}
.showcase-image{height:215px;position:relative;border-radius:0;border-bottom:0}
.showcase-image:after{
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:54%;
  background:linear-gradient(180deg,transparent,rgba(15,23,42,.46));
  pointer-events:none;
}
.showcase-status{
  position:absolute;
  right:14px;
  top:14px;
  z-index:2;
  background:#dcfce7;
  color:#166534;
  border:1px solid #86efac;
  border-radius:999px;
  padding:6px 11px;
  font-size:12px;
  font-weight:1000;
  box-shadow:0 10px 20px rgba(22,101,52,.14);
}
.showcase-body{padding:18px}
.showcase-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.showcase-title-row h2{font-size:19px;line-height:1.7;margin:0;color:#0f2746;font-weight:1000}
.showcase-mini-icon{width:38px;height:38px;border-radius:14px;background:#eff6ff;display:grid;place-items:center;flex:0 0 38px}
.showcase-badges{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0 12px}
.showcase-badges span{
  border-radius:999px;
  background:#f1f5f9;
  color:#475569;
  border:1px solid #e2e8f0;
  padding:6px 10px;
  font-size:12px;
  font-weight:900;
}
.showcase-price-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-radius:18px;
  background:linear-gradient(135deg,#ecfdf5,#f0fdf4);
  border:1px solid #bbf7d0;
  padding:12px 13px;
  margin:10px 0 12px;
}
.showcase-price-box small{color:#047857;font-weight:900}
.showcase-price-box .public-price{
  margin:0;
  background:transparent;
  border:0;
  padding:0;
  color:#065f46;
  font-size:17px;
  letter-spacing:.2px;
}
.showcase-desc{border-top:1px dashed #e2e8f0;padding-top:10px;margin-top:10px!important}
.showcase-contact-box{
  margin-top:12px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:18px;
  padding:10px 12px;
}
.opps-price,.opps-mobile-fact.price strong{font-variant-numeric:tabular-nums;color:#065f46!important;font-weight:1000!important}
@media(max-width:760px){
  .autosadra-welcome-card{flex-direction:column;align-items:flex-start;border-radius:20px;padding:15px}
  .welcome-pills{justify-content:flex-start;width:100%}
  .welcome-pills span{font-size:12px;padding:7px 10px}
  .autosadra-welcome-card h3{font-size:19px}
  .public-title-grid{grid-template-columns:1fr;gap:14px}
  .showcase-image{height:185px}
  .showcase-body{padding:14px}
  .showcase-title-row h2{font-size:17px}
  .showcase-price-box{align-items:flex-start;flex-direction:column;gap:4px}
  .showcase-price-box .public-price{font-size:16px}
}


.inventory-section-title{
    font-size:24px;
    font-weight:bold;
    margin:25px 0 15px;
    padding:15px;
    border-radius:18px;
    background:#ffffff;
    text-align:center;
}

.highlighted-search{
    padding:12px;
    background:#ffffff;
    border-radius:18px;
    margin-bottom:20px;
}

.inventory-view-toolbar{
    display:flex;
    gap:10px;
    margin:15px 0;
}

.inventory-view-btn{
    padding:10px 18px;
    border-radius:12px;
    border:none;
    cursor:pointer;
}

body.inventory-list-view .inventory-grid{
    display:block !important;
}

body.inventory-list-view .inventory-card{
    width:100% !important;
    margin-bottom:20px;
}


/* Phase 211 - Real public inventory view switcher */
.polished-view-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin:16px 0 12px;
  flex-wrap:wrap;
}
.inventory-view-label{
  color:#64748b;
  font-size:13px;
  font-weight:900;
  margin-left:4px;
}
.polished-view-toolbar .inventory-view-btn{
  min-width:126px;
  display:grid;
  grid-template-columns:30px 1fr;
  grid-template-rows:auto auto;
  align-items:center;
  column-gap:8px;
  text-align:right;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid #dbe7f3;
  background:#fff;
  color:#0f2746;
  box-shadow:0 8px 22px rgba(15,35,75,.06);
  cursor:pointer;
}
.polished-view-toolbar .inventory-view-btn .view-icon{
  grid-row:1/3;
  width:30px;
  height:30px;
  border-radius:12px;
  background:#eef6ff;
  display:grid;
  place-items:center;
  font-weight:1000;
}
.polished-view-toolbar .inventory-view-btn b{font-size:14px;line-height:1.3}
.polished-view-toolbar .inventory-view-btn small{font-size:11px;color:#64748b;line-height:1.5}
.polished-view-toolbar .inventory-view-btn.active{
  background:#0f5132;
  border-color:#0f5132;
  color:#fff;
  box-shadow:0 12px 26px rgba(15,81,50,.18);
}
.polished-view-toolbar .inventory-view-btn.active .view-icon{background:rgba(255,255,255,.16)}
.polished-view-toolbar .inventory-view-btn.active small{color:#d1fae5}

.inventory-list-row{display:none}

body.inventory-list-view .public-title-grid{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:12px!important;
}
body.inventory-list-view .public-inventory-card.autosadra-showcase-card{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  border-radius:20px!important;
  overflow:hidden!important;
}
body.inventory-list-view .public-inventory-card .showcase-image,
body.inventory-list-view .public-inventory-card .showcase-body{
  display:none!important;
}
body.inventory-list-view .inventory-list-row{
  display:grid;
  grid-template-columns:72px minmax(220px,2fr) repeat(3,minmax(92px,.75fr)) minmax(150px,1fr) minmax(130px,1fr);
  gap:12px;
  align-items:center;
  padding:14px 16px;
  background:#fff;
}
.list-car-media{
  width:62px;
  height:52px;
  border-radius:14px;
  background:#eef6ff;
  border:1px solid #dbe7f3;
  overflow:hidden;
  display:grid;
  place-items:center;
}
.list-car-media img{width:100%;height:100%;object-fit:cover;display:block}
.list-car-media span{font-size:25px}
.list-car-main strong{display:block;color:#0f2746;font-size:16px;font-weight:1000;line-height:1.6}
.list-car-main small{display:block;color:#64748b;line-height:1.7;max-width:440px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.list-car-spec,.list-car-price,.list-car-contact{
  min-height:52px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid #edf2f7;
  padding:8px 10px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
}
.list-car-spec span,.list-car-price span,.list-car-contact span{
  color:#64748b;
  font-size:11px;
  font-weight:900;
}
.list-car-spec b,.list-car-contact b{
  color:#0f172a;
  font-size:13px;
  font-weight:1000;
}
.list-car-price{
  background:#ecfdf5;
  border-color:#bbf7d0;
}
.list-car-price b{
  color:#065f46;
  font-size:14px;
  font-weight:1000;
  white-space:nowrap;
}

@media(max-width:900px){
  .polished-view-toolbar{
    justify-content:stretch;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .inventory-view-label{grid-column:1/-1;text-align:right}
  .polished-view-toolbar .inventory-view-btn{min-width:0}
  .highlighted-search{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    padding:14px!important;
    border-radius:20px!important;
    background:#fff!important;
    box-shadow:0 10px 28px rgba(15,35,75,.07)!important;
  }
  .highlighted-search input{
    min-height:52px!important;
    font-size:15px!important;
    border-radius:15px!important;
  }
  .highlighted-search button{
    min-height:52px!important;
    border-radius:15px!important;
    font-size:15px!important;
    font-weight:900!important;
  }
  body.inventory-list-view .inventory-list-row{
    grid-template-columns:54px 1fr;
    gap:10px;
    padding:12px;
  }
  body.inventory-list-view .list-car-media{width:52px;height:48px}
  body.inventory-list-view .list-car-main{grid-column:auto}
  body.inventory-list-view .list-car-spec,
  body.inventory-list-view .list-car-price,
  body.inventory-list-view .list-car-contact{
    grid-column:1/-1;
    min-height:0;
    display:grid;
    grid-template-columns:86px 1fr;
    align-items:center;
  }
}


/* Phase 211 - Dismissible dynamic welcome message */
.welcome-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.welcome-dismiss-btn{
  border:1px solid rgba(4,120,87,.18);
  background:#047857;
  color:#fff;
  border-radius:999px;
  padding:8px 18px;
  font-weight:1000;
  cursor:pointer;
  box-shadow:0 10px 22px rgba(4,120,87,.18);
}
.welcome-dismiss-btn:hover{filter:brightness(1.03)}
.autosadra-welcome-card.welcome-hiding{
  opacity:0;
  transform:translateY(-8px);
  max-height:0;
  margin-top:0;
  margin-bottom:0;
  padding-top:0;
  padding-bottom:0;
  border-width:0;
  transition:opacity .25s ease, transform .25s ease, max-height .28s ease, margin .28s ease, padding .28s ease, border-width .28s ease;
}
@media(max-width:760px){
  .welcome-actions{justify-content:flex-start;width:100%}
  .welcome-dismiss-btn{width:100%;justify-content:center}
}

/* Phase 216 - Car workflow status actions */
.car-workflow-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.car-actions-dropdown .car-workflow-actions{display:flex;flex-direction:column;align-items:stretch;margin:6px 0;padding-top:6px;border-top:1px solid rgba(15,23,42,.08)}
.car-actions-dropdown .car-workflow-actions form{margin:0}
.car-actions-dropdown .car-workflow-actions .btn{width:100%;text-align:center}
.car-view-actions{margin-top:12px}
.car-history-panel .simple-table th,.car-history-panel .simple-table td{white-space:normal}


/* AutoSadra system notification bell */
.system-notification-wrap{
  display:none;
  position:absolute!important;
  top:5px!important;
  right:52px!important;
  left:auto!important;
  bottom:auto!important;
  margin:0!important;
  z-index:1202!important;
}
.system-notification-wrap.has-notifications{display:block}
.app-topbar:has(.system-notification-wrap.has-notifications) .topbar-home-button{right:94px!important}
.app-topbar .app-breadcrumb{right:94px!important}
.app-topbar:has(.system-notification-wrap.has-notifications) .app-breadcrumb{right:132px!important}
.system-notification-bell{position:relative;border:1px solid rgba(148,163,184,.35);background:#fff;border-radius:12px;min-width:34px;width:34px;height:34px;cursor:pointer;box-shadow:0 6px 16px rgba(15,23,42,.10);font-size:17px;display:flex;align-items:center;justify-content:center;padding:0}
.system-notification-badge{position:absolute;top:-7px;left:-7px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ef4444;color:#fff;font-size:11px;line-height:18px;text-align:center;font-weight:900;display:none;border:2px solid #fff}
.system-notification-badge.has-items{display:inline-block}
.system-notification-panel{display:none;position:absolute;top:42px;right:0;left:auto;width:min(330px,92vw);background:#fff;border:1px solid rgba(148,163,184,.35);border-radius:16px;box-shadow:0 18px 45px rgba(15,23,42,.18);padding:12px;direction:rtl;text-align:right}
.system-notification-panel.open{display:block}
.system-notification-list{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.system-notification-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:12px;background:#f8fafc;color:#0f172a;text-decoration:none;border:1px solid #e2e8f0}
.system-notification-item:hover{background:#eef2ff}
.system-notification-count{background:#0f172a;color:#fff;border-radius:999px;min-width:26px;text-align:center;padding:2px 7px;font-size:12px}
.opps-internal-note{margin-top:8px;padding:8px 10px;border-radius:10px;background:#fff7ed;border:1px dashed #fdba74;color:#7c2d12;font-size:.92rem}
@media (max-width:900px){.app-topbar .topbar-home-button{right:52px!important}.app-topbar:has(.system-notification-wrap.has-notifications) .topbar-home-button{right:94px!important}.app-topbar .app-breadcrumb{right:94px!important}.app-topbar:has(.system-notification-wrap.has-notifications) .app-breadcrumb{right:132px!important}}
@media (max-width:640px){.system-notification-panel{right:-42px!important;top:42px!important;width:min(310px,92vw)}}

/* AutoSadra opportunity form fixes */
.money-unit-hint{font-size:12px;color:#64748b;font-weight:400;margin-inline-start:4px}
.internal-note-field textarea{background:#fffdf5;border-color:#fbbf24}
.portal-notification-floating{position:absolute!important;top:5px!important;right:52px!important;left:auto!important;margin:0!important;z-index:1202!important}
.portal-notification-floating .system-notification-panel{right:0;left:auto;top:54px}
@media (max-width:700px){.portal-notification-floating{top:5px!important;right:52px!important;left:auto!important}.portal-notification-floating .system-notification-panel{top:42px!important;right:-42px!important;left:auto!important}}


/* AutoSadra listing image crop/compress */
.autosadra-crop-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.72);z-index:1000000000;display:none;align-items:center;justify-content:center;padding:16px;direction:rtl}
.autosadra-crop-backdrop.open{display:flex}
.autosadra-crop-dialog{width:min(760px,96vw);background:#fff;border-radius:22px;box-shadow:0 24px 70px rgba(0,0,0,.32);padding:16px}
.autosadra-crop-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.autosadra-crop-head strong{font-size:16px;color:#0f172a}
.autosadra-crop-stage{position:relative;width:100%;aspect-ratio:16/9;background:#0f172a;border-radius:18px;overflow:hidden;touch-action:none}
.autosadra-crop-stage img{position:absolute;top:50%;left:50%;max-width:none;user-select:none;pointer-events:none;transform-origin:center center}
.autosadra-crop-frame{position:absolute;inset:0;border:3px solid #22c55e;box-shadow:inset 0 0 0 9999px rgba(0,0,0,.08);border-radius:18px;pointer-events:none}
.autosadra-crop-help{font-size:12px;color:#64748b;line-height:1.9;margin:8px 0}
.autosadra-crop-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}
.autosadra-crop-controls input[type=range]{flex:1;min-width:180px}
.autosadra-crop-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.autosadra-image-preview{margin-top:8px;border:1px dashed #cbd5e1;border-radius:14px;padding:8px;background:#f8fafc}
.autosadra-image-preview img{width:220px;max-width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:12px;display:block}
.autosadra-image-preview small{display:block;color:#64748b;margin-top:6px}


/* AutoSadra 228: public inventory tel links, crop rotation, and refined home typography */
.tel-link,
.inventory-tel-link{
  color:inherit;
  text-decoration:none;
  font-weight:800;
  direction:ltr;
  unicode-bidi:plaintext;
}
.tel-link:hover,
.inventory-tel-link:hover{
  color:var(--primary, #2563eb);
  text-decoration:underline;
}
.list-car-contact .inventory-tel-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(37,99,235,.08);
}
.autosadra-crop-rotate-actions{
  display:flex;
  gap:8px;
  justify-content:center;
  flex-wrap:wrap;
  margin:10px 0 6px;
}
.autosadra-crop-rotate-actions .btn{
  min-width:120px;
  font-weight:800;
}
.home-hero,
.dashboard-hero-v2,
.autosadra-welcome-card,
.dashboard-welcome-card,
.dashboard-quick-v2,
.quick-panel{
  font-family:"Vazirmatn","IRANSans","IranYekan","B Nazanin",Tahoma,Arial,sans-serif;
}
.home-hero h1,
.home-hero h2,
.dashboard-hero-v2 h1,
.dashboard-hero-v2 h2,
.quick-card h3,
.dashboard-module-head h3{
  font-family:"B Titr","BTitr","B Zar","Vazirmatn","IRANSans",Tahoma,sans-serif;
  letter-spacing:-.02em;
}
.home-hero p,
.dashboard-hero-v2 p,
.autosadra-welcome-card p{
  line-height:2.05;
  font-weight:500;
}
.hero-kicker,
.welcome-eyebrow{
  font-family:"IranYekan","Vazirmatn",Tahoma,sans-serif;
  font-weight:800;
}
.hero-inline-num,
.amount,
.public-price{
  font-family:"Vazirmatn","IRANSans",Tahoma,Arial,sans-serif;
  font-variant-numeric:tabular-nums;
}

.rubika-admin-test-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:flex-start}
.rubika-info-box code{background:rgba(15,35,65,.08);padding:3px 8px;border-radius:8px;font-family:monospace}


/* AutoSadra rubika settings mobile final cleanup */
@media(max-width:700px){
  .rubika-v2-page{padding:0 8px!important}
  .rubika-step-card{padding:14px 12px!important;border-radius:18px!important;margin-bottom:12px!important}
  .rubika-step-head{gap:8px!important;margin-bottom:10px!important}
  .rubika-step-head h3{font-size:17px!important}
  .rubika-step-head p{font-size:12px!important;line-height:1.8!important}
  .rubika-step-no{min-width:30px!important;height:30px!important;border-radius:11px!important}
  .rubika-contact-row{display:grid!important;grid-template-columns:52px 1fr!important;gap:8px!important;padding:10px!important;border-radius:14px!important}
  .rubika-contact-row label{font-size:12px!important}
  .rubika-contact-row label:nth-child(3),
  .rubika-contact-row .rubika-custom-text-wrap,
  .rubika-contact-row .rubika-remove-contact{grid-column:1 / -1!important}
  .rubika-contact-row select,.rubika-contact-row input{height:40px!important;padding:7px 9px!important}
  .rubika-contact-row select[name="contact_icon[]"]{font-size:18px!important;text-align:center!important}
  .rubika-preview-box{max-height:55vh!important;overflow:auto!important;padding:12px!important;border-radius:16px!important;font-size:13px!important}
  .rubika-preview-line{padding:6px 8px!important;border-radius:10px!important}
  .rubika-auto-grid .checkline{min-height:0!important;padding:10px!important;display:flex!important;align-items:center!important;gap:10px!important;font-size:14px!important}
  .rubika-auto-grid .checkline input{width:18px!important;height:18px!important;flex:0 0 auto!important}
  .rubika-clean-form .form-actions,.rubika-save-actions{position:sticky;bottom:0;background:rgba(248,250,252,.94);backdrop-filter:blur(10px);z-index:30;padding:10px!important;margin:0 -8px!important;border-top:1px solid #dbe8f8}
  .rubika-clean-form .form-actions .btn,.rubika-save-actions .btn{width:100%!important;min-height:46px!important;font-weight:900!important}
}


/* AutoSadra notifications inbox */
.notifications-page{max-width:1180px;margin:0 auto}
.notifications-head{align-items:flex-start;gap:14px}
.notifications-head-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.notifications-summary-card{
  display:inline-flex;align-items:center;gap:10px;margin:12px 0 18px;padding:12px 18px;
  border:1px solid #d7e6ff;border-radius:18px;background:#f8fbff;color:#0f2f5f;box-shadow:0 10px 30px rgba(15,23,42,.06)
}
.notifications-summary-card strong{
  min-width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:14px;background:#0f766e;color:#fff;font-size:18px
}
.notifications-list-page{display:grid;gap:14px}
.notification-card{
  display:flex;gap:14px;align-items:flex-start;padding:16px;border:1px solid #dbe6f3;border-radius:22px;
  background:#fff;box-shadow:0 12px 34px rgba(15,23,42,.07)
}
.notification-card-icon{
  width:52px;height:52px;border-radius:18px;display:flex;align-items:center;justify-content:center;
  background:#eff6ff;font-size:25px;flex:0 0 auto
}
.notification-card-body{flex:1;min-width:0}
.notification-card-title-row{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
.notification-card-title-row h3{margin:0;font-size:18px;color:#102a43}
.notification-pill{
  display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:5px 12px;
  background:#f1f5f9;color:#64748b;font-weight:800;font-size:12px
}
.notification-pill.active{background:#fee2e2;color:#b91c1c}
.notification-card-meta{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0;color:#64748b;font-size:13px}
.notification-card-meta span{background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:4px 10px}
.notification-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.notification-card-danger{border-color:#fecaca;background:#fffafa}
.notification-card-warning{border-color:#fde68a;background:#fffdf5}
.notification-card.is-read{opacity:.76}
.empty-state-card{text-align:center;padding:32px;border:1px dashed #cbd5e1;border-radius:24px;background:#fff}
.empty-state-icon{font-size:44px;margin-bottom:8px}
.system-notification-inbox-link{font-weight:900;background:#f8fafc}
@media (max-width: 720px){
  .notifications-head-actions{width:100%}
  .notifications-head-actions .btn,.notifications-head-actions form,.notifications-head-actions button{width:100%}
  .notification-card{padding:14px;border-radius:18px}
  .notification-card-icon{width:44px;height:44px;border-radius:14px;font-size:22px}
  .notification-card-title-row h3{font-size:16px}
  .notification-card-actions .btn,.notification-card-actions form,.notification-card-actions button{width:100%}
}


.message-box-settings-page .page-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.settings-status-card{border:1px solid #e5e7eb;background:#f8fafc;border-radius:14px;padding:12px;margin:12px 0;display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
.status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:3px 10px;font-weight:800;font-size:.85rem;margin-inline:6px}
.status-pill.ok{background:#dcfce7;color:#166534}.status-pill.warn{background:#fef3c7;color:#92400e}
.notification-settings-table{border:1px solid #e5e7eb;border-radius:16px;overflow:hidden;background:#fff;margin-top:12px}
.notification-settings-head,.notification-setting-row{display:grid;grid-template-columns:minmax(220px,1fr) 150px 170px;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid #edf2f7}
.notification-settings-head{background:#f1f5f9;font-weight:900;color:#334155}
.notification-setting-row:last-child{border-bottom:none}
.notification-setting-title strong{display:block;color:#111827}.notification-setting-title small{display:block;color:#64748b;margin-top:3px}
.switch-check{display:inline-flex;align-items:center;gap:7px;justify-content:center;border:1px solid #dbe3ef;border-radius:999px;padding:7px 11px;background:#f8fafc;font-weight:800;color:#334155}
.switch-check input{width:18px;height:18px;accent-color:#16a34a}
.message-box-note{margin:12px 0;padding:10px 12px;border-radius:12px;background:#fff7ed;border:1px solid #fed7aa;color:#7c2d12}
@media(max-width:720px){
  .notification-settings-head{display:none}
  .notification-setting-row{grid-template-columns:1fr 1fr;gap:8px;padding:12px}
  .notification-setting-title{grid-column:1/-1}
  .switch-check{justify-content:flex-start;width:100%;box-sizing:border-box}
  .settings-status-card{align-items:stretch}
  .settings-status-card .form-actions{width:100%}
  .settings-status-card .btn{width:100%;justify-content:center}
}

/* Phase 256: showroom staff marker in person management */
.staff-role-box{margin:14px 0 4px}.staff-role-toggle{display:flex!important;align-items:center!important;gap:12px;padding:14px 16px;border:1px solid #cbd5e1;border-radius:14px;background:#f8fafc;cursor:pointer}.staff-role-toggle>input{position:absolute;opacity:0;pointer-events:none}.staff-role-check{display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border:2px solid #94a3b8;border-radius:9px;color:transparent;background:#fff;font-weight:900}.staff-role-toggle input:checked+.staff-role-check{background:#166534;border-color:#166534;color:#fff}.staff-role-toggle b{display:block;color:#0f172a}.staff-role-toggle small{display:block;margin-top:4px;color:#64748b;line-height:1.8}

/* =========================================================
   Customer login/register — modern responsive redesign (269)
   ========================================================= */
.customer-auth-page{
  --customer-green:#0b5d42;
  --customer-green-dark:#074632;
  --customer-green-soft:#eaf7f1;
  --customer-navy:#123a63;
  --customer-text:#172437;
  --customer-muted:#68788d;
  --customer-line:#dbe5ef;
  --customer-bg:#f3f7fc;
  min-height:100vh;
  background:
    radial-gradient(circle at 12% 18%,rgba(11,93,66,.10),transparent 28rem),
    radial-gradient(circle at 88% 86%,rgba(18,58,99,.09),transparent 30rem),
    linear-gradient(145deg,#f8fbff 0%,#eef4fb 100%);
  color:var(--customer-text);
}
.customer-auth-page *{box-sizing:border-box}
.customer-auth-shell{min-height:100vh;width:100%;display:grid;place-items:center;padding:clamp(18px,4vw,54px)}
.customer-auth-card{width:min(1040px,100%);display:grid;grid-template-columns:minmax(0,.9fr) minmax(390px,1fr);overflow:hidden;background:#fff;border:1px solid rgba(18,58,99,.10);border-radius:30px;box-shadow:0 30px 90px rgba(25,52,84,.15)}
.customer-auth-visual{position:relative;overflow:hidden;min-height:620px;padding:36px;display:flex;flex-direction:column;justify-content:space-between;color:#fff;background:linear-gradient(145deg,#123a63 0%,#0b5d42 72%,#087052 100%)}
.customer-auth-brand{display:flex;align-items:center;gap:12px;position:relative;z-index:2}
.customer-auth-logo-wrap,.customer-register-logo-wrap{display:grid;place-items:center;background:#fff;border-radius:18px;box-shadow:0 12px 30px rgba(0,0,0,.14)}
.customer-auth-logo-wrap{width:58px;height:58px}
.customer-auth-logo-wrap img,.customer-register-logo-wrap img{width:78%;height:78%;object-fit:contain}
.customer-auth-brand-name{font-size:19px;font-weight:900;letter-spacing:-.4px}
.customer-auth-visual-copy{position:relative;z-index:2;max-width:390px}
.customer-auth-badge{display:inline-flex;padding:7px 13px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.18);font-size:13px;font-weight:800;margin-bottom:17px;backdrop-filter:blur(8px)}
.customer-auth-visual-copy h2{margin:0 0 15px;font-size:clamp(29px,3vw,42px);line-height:1.45;letter-spacing:-1.1px}
.customer-auth-visual-copy p{margin:0;color:rgba(255,255,255,.80);font-size:15px;line-height:2}
.customer-auth-visual-orb{position:absolute;border-radius:50%;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.07)}
.customer-auth-visual-orb-one{width:280px;height:280px;left:-90px;top:80px}
.customer-auth-visual-orb-two{width:410px;height:410px;right:-220px;bottom:-170px}
.customer-auth-content{padding:clamp(34px,5vw,68px);display:flex;flex-direction:column;justify-content:center}
.customer-auth-mobile-logo{display:none}
.customer-auth-eyebrow{display:block;color:var(--customer-green);font-size:13px;font-weight:900;margin-bottom:8px}
.customer-auth-header h1{margin:0;color:var(--customer-navy);font-size:clamp(29px,3.3vw,40px);letter-spacing:-1px}
.customer-auth-header p{margin:12px 0 0;color:var(--customer-muted);font-size:14px;line-height:2}
.customer-auth-alerts{margin:22px 0 0}
.customer-auth-form{display:grid;gap:18px;margin-top:28px}
.customer-auth-field,.customer-register-field{display:flex;flex-direction:column;gap:8px}
.customer-auth-label,.customer-register-field>span{font-size:14px;font-weight:850;color:#263a50}
.customer-auth-input-wrap{position:relative;display:block}
.customer-auth-field-icon{position:absolute;right:15px;top:50%;transform:translateY(-50%);font-size:16px;filter:grayscale(.2);pointer-events:none}
.customer-auth-form input{width:100%;height:54px;border:1px solid var(--customer-line);border-radius:15px;background:#fbfdff;padding:0 46px 0 15px;font:inherit;font-size:15px;color:var(--customer-text);outline:none;transition:border-color .18s,box-shadow .18s,background .18s}
.customer-auth-form input:focus,.customer-register-field input:focus,.customer-register-field textarea:focus{border-color:#2b8b6c;background:#fff;box-shadow:0 0 0 4px rgba(11,93,66,.10)}
.customer-auth-submit{min-height:54px;border:0;border-radius:15px;padding:0 20px;display:flex;align-items:center;justify-content:center;gap:12px;background:linear-gradient(135deg,var(--customer-green),#087858);color:#fff;font:inherit;font-weight:900;font-size:15px;cursor:pointer;box-shadow:0 14px 28px rgba(11,93,66,.22);transition:transform .18s,box-shadow .18s,filter .18s}
.customer-auth-submit:hover{transform:translateY(-2px);box-shadow:0 18px 34px rgba(11,93,66,.28);filter:saturate(1.06)}
.customer-auth-submit:active{transform:translateY(0)}
.customer-auth-links{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:22px}
.customer-auth-link{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:9px 14px;border-radius:12px;color:#52677e;text-decoration:none;font-size:13px;font-weight:800;transition:background .18s,color .18s}
.customer-auth-link:hover{background:#f1f5f9;color:var(--customer-navy)}
.customer-auth-link-primary{color:var(--customer-green);background:var(--customer-green-soft)}
.customer-auth-link-primary:hover{background:#dff2e9;color:var(--customer-green-dark)}
.customer-auth-footnote{text-align:center;color:#8a98a9;font-size:11px;margin:18px 0 0}

.customer-register-shell{align-items:start;padding-block:clamp(18px,4vw,48px)}
.customer-register-card{width:min(1060px,100%);background:#fff;border:1px solid rgba(18,58,99,.10);border-radius:30px;box-shadow:0 30px 90px rgba(25,52,84,.13);overflow:hidden}
.customer-register-hero{position:relative;padding:34px 38px 30px;background:linear-gradient(135deg,#f9fcff 0%,#edf7f3 100%);border-bottom:1px solid #e3ebf3}
.customer-register-brand{display:flex;align-items:center;gap:16px}
.customer-register-logo-wrap{width:64px;height:64px;border:1px solid #e4ecf3}
.customer-register-brand h1{margin:2px 0 0;color:var(--customer-navy);font-size:clamp(27px,3vw,38px);letter-spacing:-1px}
.customer-register-hero>p{margin:18px 0 0;color:var(--customer-muted);line-height:2;font-size:14px;max-width:820px}
.customer-register-progress{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:24px}
.customer-register-progress span{display:flex;align-items:center;justify-content:center;gap:8px;padding:11px 12px;border-radius:13px;background:#fff;color:#789;box-shadow:0 5px 18px rgba(30,60,90,.05);font-size:12px;font-weight:800;border:1px solid #e2eaf2}
.customer-register-progress i{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#eef3f7;font-style:normal}
.customer-register-progress .is-active{color:var(--customer-green);border-color:#cfe8dc;background:#f8fffb}
.customer-register-progress .is-active i{background:var(--customer-green);color:#fff}
.customer-register-alerts{margin:24px 34px 0}
.customer-register-form{padding:30px 34px 34px;display:grid;gap:22px}
.customer-register-section{border:1px solid #e3ebf3;border-radius:22px;padding:22px;background:#fff}
.customer-register-section-title{display:flex;align-items:center;gap:12px;margin-bottom:20px}
.customer-register-section-icon{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:13px;background:var(--customer-green-soft);font-size:18px}
.customer-register-section-title h2{margin:0;color:var(--customer-navy);font-size:18px}
.customer-register-section-title p{margin:4px 0 0;color:#7b899a;font-size:12px;line-height:1.7}
.customer-register-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 16px;margin:0}
.customer-register-field b{color:#d92d20}
.customer-register-field input,.customer-register-field textarea{width:100%;border:1px solid var(--customer-line);border-radius:14px;background:#fbfdff;padding:12px 14px;font:inherit;font-size:14px;color:var(--customer-text);outline:none;transition:border-color .18s,box-shadow .18s,background .18s}
.customer-register-field input{height:50px}
.customer-register-field textarea{min-height:88px;resize:vertical;line-height:1.9}
.customer-register-field input::placeholder,.customer-register-field textarea::placeholder{color:#a0acba}
.customer-register-wide{grid-column:1/-1}
.customer-security-section{background:linear-gradient(135deg,#f8fbff,#f3f9ff)}
.customer-security-box{display:grid;grid-template-columns:180px 1fr;gap:14px;align-items:end;padding:16px;border:1px dashed #bdd0e3;border-radius:16px;background:#fff}
.customer-security-question{display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;min-height:82px;border-radius:14px;background:#eef6fb;color:#53677e}
.customer-security-question strong{font-size:22px;color:var(--customer-navy)}
.customer-security-answer{grid-column:2}
.customer-security-box .bot-field{position:absolute!important;right:-9999px!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important}
.customer-register-submit-area{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:4px 2px}
.customer-register-consent{display:flex;align-items:center;gap:9px;color:#65768a;font-size:12px;line-height:1.8}
.customer-register-consent span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--customer-green-soft);color:var(--customer-green);font-weight:900}
.customer-register-submit{min-width:240px}
.customer-register-footer{padding:0 34px 30px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}

@media(max-width:820px){
  .customer-auth-shell{padding:16px}
  .customer-auth-card{grid-template-columns:1fr;max-width:560px;border-radius:24px}
  .customer-auth-visual{display:none}
  .customer-auth-content{padding:34px 26px}
  .customer-auth-mobile-logo{display:grid;place-items:center;width:66px;height:66px;margin:0 auto 20px;border-radius:20px;background:#fff;border:1px solid #e4ecf3;box-shadow:0 12px 30px rgba(18,58,99,.11)}
  .customer-auth-mobile-logo img{width:76%;height:76%;object-fit:contain}
  .customer-auth-header{text-align:center}
  .customer-auth-eyebrow{text-align:center}
  .customer-register-card{border-radius:24px}
  .customer-register-hero{padding:26px 22px 24px}
  .customer-register-progress{grid-template-columns:1fr}
  .customer-register-progress span:not(.is-active){display:none}
  .customer-register-alerts{margin:18px 18px 0}
  .customer-register-form{padding:22px 18px 24px;gap:16px}
  .customer-register-section{padding:18px;border-radius:18px}
  .customer-register-grid{grid-template-columns:1fr;gap:15px}
  .customer-register-wide{grid-column:auto}
  .customer-security-box{grid-template-columns:1fr}
  .customer-security-answer{grid-column:auto}
  .customer-register-submit-area{flex-direction:column;align-items:stretch}
  .customer-register-submit{width:100%;min-width:0}
  .customer-register-footer{padding:0 18px 24px}
}
@media(max-width:480px){
  .customer-auth-shell{padding:10px;align-items:start;padding-top:max(12px,env(safe-area-inset-top))}
  .customer-auth-card,.customer-register-card{border-radius:20px}
  .customer-auth-content{padding:28px 18px 24px}
  .customer-auth-header h1{font-size:27px}
  .customer-auth-header p{font-size:13px;line-height:1.9}
  .customer-auth-form{margin-top:22px;gap:15px}
  .customer-auth-form input{height:52px;font-size:16px}
  .customer-auth-submit{width:100%;min-height:52px}
  .customer-auth-links{display:grid;grid-template-columns:1fr;width:100%}
  .customer-auth-link{width:100%}
  .customer-register-hero{padding:22px 17px}
  .customer-register-brand{align-items:flex-start}
  .customer-register-logo-wrap{width:54px;height:54px;flex:0 0 54px;border-radius:16px}
  .customer-register-brand h1{font-size:26px}
  .customer-register-hero>p{font-size:12.5px;line-height:1.9}
  .customer-register-form{padding:16px 10px 20px}
  .customer-register-section{padding:16px 13px}
  .customer-register-section-title{align-items:flex-start;margin-bottom:17px}
  .customer-register-section-title h2{font-size:16px}
  .customer-register-section-title p{font-size:11px}
  .customer-register-field input{height:49px;font-size:16px}
  .customer-register-field textarea{font-size:16px;min-height:82px}
  .customer-register-footer{display:grid;grid-template-columns:1fr;padding:0 12px 20px}
  .customer-register-footer .customer-auth-link{width:100%}
}
@media(prefers-reduced-motion:reduce){.customer-auth-submit,.customer-auth-link,.customer-auth-form input,.customer-register-field input,.customer-register-field textarea{transition:none}}

/* AutoSadra 270: modern inventory wizard + square image crop */
.autosadra-crop-stage{aspect-ratio:1/1!important;max-height:min(76vh,680px)}
.inventory-wizard-page{background:radial-gradient(circle at top right,#e8f3ff 0,#f4f7fb 38%,#eef2f7 100%);min-height:100vh}
.inventory-wizard-shell{width:min(1080px,calc(100% - 28px));margin:0 auto;padding:34px 0 60px}
.inventory-wizard-card{background:rgba(255,255,255,.96);border:1px solid rgba(148,163,184,.22);border-radius:30px;box-shadow:0 28px 80px rgba(15,23,42,.12);overflow:hidden}
.inventory-wizard-header{display:flex;justify-content:space-between;gap:22px;align-items:center;padding:30px 34px;background:linear-gradient(135deg,#0f3f68,#0c6b55);color:#fff}
.inventory-wizard-kicker{display:inline-block;font-size:12px;font-weight:800;background:rgba(255,255,255,.14);padding:7px 12px;border-radius:999px;margin-bottom:10px}.inventory-wizard-header h1{margin:0 0 8px;font-size:28px}.inventory-wizard-header p{margin:0;opacity:.84}.inventory-wizard-car-icon{font-size:56px;background:rgba(255,255,255,.14);width:86px;height:86px;border-radius:25px;display:grid;place-items:center}
.inventory-wizard-alerts{padding:18px 28px 0}.inventory-wizard-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:24px 30px 8px}.inventory-step-tab{border:1px solid #dbe4ef;background:#f8fafc;border-radius:18px;padding:14px;display:grid;grid-template-columns:42px 1fr;grid-template-rows:auto auto;text-align:right;cursor:pointer;color:#475569;transition:.2s}.inventory-step-tab span{grid-row:1/3;width:36px;height:36px;border-radius:12px;background:#e2e8f0;display:grid;place-items:center;font-weight:900}.inventory-step-tab b{font-size:14px}.inventory-step-tab small{font-size:11px;color:#94a3b8}.inventory-step-tab.is-active{background:#ecfdf5;border-color:#6ee7b7;color:#065f46;box-shadow:0 8px 22px rgba(16,185,129,.12)}.inventory-step-tab.is-active span,.inventory-step-tab.is-done span{background:#0f766e;color:#fff}
.inventory-wizard-form{padding:18px 30px 30px}.inventory-wizard-panel{display:none;animation:inventoryFade .25s ease}.inventory-wizard-panel.is-active{display:block}@keyframes inventoryFade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.inventory-panel-title{display:flex;gap:14px;align-items:center;margin:4px 0 22px}.inventory-panel-title>span{width:48px;height:48px;border-radius:16px;background:#eff6ff;display:grid;place-items:center;font-size:23px}.inventory-panel-title h2{margin:0 0 4px;font-size:20px;color:#0f2745}.inventory-panel-title p{margin:0;color:#64748b;font-size:13px}
.inventory-main-image-box{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr);gap:18px}.inventory-upload-card{position:relative;border:2px dashed #b8c7d9;background:#f8fbff;border-radius:22px;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:24px;text-align:center;cursor:pointer;transition:.2s}.inventory-upload-card:hover{border-color:#10b981;background:#f0fdf8;transform:translateY(-2px)}.inventory-upload-card input{position:absolute;inset:0;opacity:0;cursor:pointer}.inventory-main-upload{aspect-ratio:1/1;max-height:560px}.inventory-upload-icon{width:54px;height:54px;border-radius:18px;background:#0f766e;color:#fff;display:grid;place-items:center;font-size:28px}.inventory-upload-card strong{font-size:17px;color:#0f2745}.inventory-upload-card small{color:#64748b;line-height:1.8}.inventory-extra-upload{margin-top:18px;min-height:145px}
.inventory-existing-gallery,.inventory-extra-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start}.inventory-existing-thumb,.inventory-extra-thumb{position:relative;aspect-ratio:1/1;border-radius:16px;overflow:hidden;background:#e2e8f0}.inventory-existing-thumb img,.inventory-extra-thumb img{width:100%;height:100%;object-fit:cover}.inventory-existing-thumb span,.inventory-extra-thumb span{position:absolute;right:8px;bottom:8px;background:rgba(15,23,42,.8);color:#fff;border-radius:999px;padding:5px 9px;font-size:11px}.inventory-existing-thumb.is-primary{outline:3px solid #22c55e}.inventory-extra-preview{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:15px}
.inventory-modern-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.inventory-modern-grid label{font-weight:800;color:#16324f;display:flex;flex-direction:column;gap:8px}.inventory-modern-grid label small{font-weight:500;color:#64748b}.inventory-modern-grid input,.inventory-modern-grid textarea{width:100%;border:1px solid #cbd8e7;border-radius:14px;background:#fff;padding:13px 14px;font:inherit;transition:.2s}.inventory-modern-grid input{height:52px}.inventory-modern-grid textarea{resize:vertical;min-height:110px}.inventory-modern-grid input:focus,.inventory-modern-grid textarea:focus{outline:0;border-color:#0f766e;box-shadow:0 0 0 4px rgba(15,118,110,.11)}.inventory-wide-field{grid-column:1/-1}.inventory-security-check{margin-top:20px;border-radius:18px;background:#f0f7ff;border:1px solid #cfe2fb;padding:18px}.inventory-wizard-actions{display:flex;gap:10px;align-items:center;border-top:1px solid #e8eef5;margin-top:28px;padding-top:22px}.inventory-wizard-actions .btn{min-height:48px;border-radius:14px;padding-inline:22px}.inventory-cancel-btn{margin-right:auto}
@media(max-width:760px){.inventory-wizard-shell{width:100%;padding:0}.inventory-wizard-card{border-radius:0;min-height:100vh}.inventory-wizard-header{padding:22px 18px}.inventory-wizard-header h1{font-size:22px}.inventory-wizard-header p{font-size:12px;line-height:1.8}.inventory-wizard-car-icon{width:58px;height:58px;font-size:34px;border-radius:18px}.inventory-wizard-steps{padding:16px 12px 6px;gap:7px}.inventory-step-tab{display:flex;align-items:center;justify-content:center;padding:10px 5px;text-align:center}.inventory-step-tab span{width:32px;height:32px}.inventory-step-tab b,.inventory-step-tab small{display:none}.inventory-wizard-form{padding:14px 14px 24px}.inventory-main-image-box{grid-template-columns:1fr}.inventory-main-upload{width:100%;aspect-ratio:1/1;min-height:auto}.inventory-existing-gallery{grid-template-columns:repeat(4,1fr)}.inventory-modern-grid{grid-template-columns:1fr;gap:15px}.inventory-wide-field{grid-column:auto}.inventory-extra-preview{grid-template-columns:repeat(2,1fr)}.inventory-wizard-actions{position:sticky;bottom:0;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);margin-inline:-14px;padding:12px 14px calc(12px + env(safe-area-inset-bottom));z-index:5}.inventory-wizard-actions .btn{flex:1;padding-inline:8px}.inventory-cancel-btn{display:none}.autosadra-crop-dialog{width:calc(100vw - 20px)!important;padding:12px!important;border-radius:22px!important}.autosadra-crop-stage{width:100%!important;aspect-ratio:1/1!important;max-height:none!important}.autosadra-crop-help{font-size:12px;line-height:1.8}}

/* full screen public inventory gallery */
.inventory-gallery-trigger{cursor:zoom-in;position:relative}.inventory-gallery-count{position:absolute;left:10px;bottom:10px;background:rgba(15,23,42,.78);color:#fff;border-radius:999px;padding:6px 10px;font-size:12px;z-index:2}.inventory-lightbox{position:fixed;inset:0;background:rgba(2,6,23,.96);z-index:99999;display:none;align-items:center;justify-content:center}.inventory-lightbox.is-open{display:flex}.inventory-lightbox img{max-width:92vw;max-height:86vh;object-fit:contain}.inventory-lightbox-close,.inventory-lightbox-prev,.inventory-lightbox-next{position:absolute;border:0;background:rgba(255,255,255,.13);color:#fff;width:48px;height:48px;border-radius:50%;font-size:25px;cursor:pointer}.inventory-lightbox-close{top:18px;right:18px}.inventory-lightbox-prev{left:18px}.inventory-lightbox-next{right:18px}.inventory-lightbox-counter{position:absolute;bottom:22px;color:#fff;background:rgba(255,255,255,.12);padding:7px 14px;border-radius:999px}.showcase-badges .mileage-badge{background:#eef2ff;color:#3730a3}
@media(max-width:600px){.inventory-lightbox-prev,.inventory-lightbox-next{width:42px;height:42px}.inventory-lightbox img{max-width:100vw;max-height:82vh}.inventory-lightbox-close{top:max(12px,env(safe-area-inset-top));right:12px}}


/* AutoSadra 276: 4:5 cover and immersive gallery */
.autosadra-crop-stage{aspect-ratio:4/5!important;width:min(76vw,520px);max-height:min(76vh,650px);margin-inline:auto;background:#0a0f1b}
.inventory-main-upload{aspect-ratio:4/5!important;max-height:650px}
.inventory-existing-thumb,.inventory-extra-thumb{aspect-ratio:4/5!important;background:#0f172a}
.inventory-existing-thumb img,.inventory-extra-thumb img{object-fit:cover}
.public-inventory-image,.showcase-image{aspect-ratio:4/5;overflow:hidden;background:#0b1220}
.public-inventory-image>img,.showcase-image>img{width:100%;height:100%;object-fit:cover;display:block}
.inventory-lightbox{background:#05070c!important;display:none;flex-direction:column;align-items:stretch;justify-content:stretch;padding:0}
.inventory-lightbox.is-open{display:flex}
.inventory-lightbox-stage{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#05070c}
.inventory-lightbox-stage img{width:100%;height:100%;max-width:none!important;max-height:none!important;object-fit:contain;background:#05070c;transition:opacity .18s ease}
.inventory-lightbox-topbar{position:absolute;top:0;left:0;right:0;z-index:4;display:flex;align-items:center;justify-content:space-between;padding:max(14px,env(safe-area-inset-top)) 16px 14px;background:linear-gradient(to bottom,rgba(0,0,0,.72),transparent);pointer-events:none}
.inventory-lightbox-topbar>*{pointer-events:auto}.inventory-lightbox-title{color:#fff;font-size:14px;font-weight:800;max-width:65vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inventory-lightbox-close{position:static!important;width:46px;height:46px;background:rgba(255,255,255,.16)!important;backdrop-filter:blur(8px)}
.inventory-lightbox-prev,.inventory-lightbox-next{top:50%;transform:translateY(-50%);z-index:4;background:rgba(255,255,255,.16)!important;backdrop-filter:blur(8px)}
.inventory-lightbox-counter{position:static!important;color:#fff;background:rgba(255,255,255,.14);padding:7px 13px;border-radius:999px;font-weight:800}
.inventory-lightbox-thumbs{height:94px;display:flex;gap:9px;align-items:center;justify-content:center;padding:10px 14px calc(10px + env(safe-area-inset-bottom));overflow-x:auto;background:#080b12;border-top:1px solid rgba(255,255,255,.08)}
.inventory-lightbox-thumb{flex:0 0 58px;width:58px;height:72px;border:2px solid transparent;border-radius:10px;overflow:hidden;background:#111827;padding:0;opacity:.58;transition:.18s}
.inventory-lightbox-thumb img{width:100%;height:100%;object-fit:cover}.inventory-lightbox-thumb.is-active{border-color:#22c55e;opacity:1;transform:translateY(-2px)}
@media(max-width:760px){.autosadra-crop-stage{width:100%!important;aspect-ratio:4/5!important;max-height:72vh!important}.inventory-main-upload{aspect-ratio:4/5!important}.inventory-lightbox-prev,.inventory-lightbox-next{display:none}.inventory-lightbox-thumbs{height:88px;justify-content:flex-start}.inventory-lightbox-thumb{flex-basis:52px;width:52px;height:66px}.inventory-lightbox-title{font-size:13px}.inventory-lightbox-stage img{touch-action:pan-y}}


/* AutoSadra 277: natural-ratio vehicle images — no forced crop or padding */
.autosadra-crop-backdrop{display:none!important}
.inventory-main-upload{aspect-ratio:auto!important;min-height:220px;max-height:none!important}
.inventory-existing-thumb,.inventory-extra-thumb{aspect-ratio:auto!important;min-height:120px;background:#0b1220}
.inventory-existing-thumb img,.inventory-extra-thumb img{width:100%;height:auto;max-height:360px;object-fit:contain;background:#0b1220;display:block}
.autosadra-natural-image-preview{grid-column:1/-1;background:#0b1220;border-radius:18px;padding:12px;display:flex;flex-direction:column;gap:9px;align-items:center}
.autosadra-natural-image-preview img{display:block;max-width:100%;max-height:560px;width:auto;height:auto;object-fit:contain;border-radius:12px;background:#0b1220}
.autosadra-natural-image-preview small{color:#dbeafe;text-align:center;line-height:1.8}
.public-inventory-image,.showcase-image{aspect-ratio:auto!important;background:#0b1220;display:flex;align-items:center;justify-content:center}
.public-inventory-image>img,.showcase-image>img{width:100%;height:auto!important;max-height:720px;object-fit:contain!important;background:#0b1220;display:block}
.inventory-lightbox-stage{background:#000!important}
.inventory-lightbox-stage img{object-fit:contain!important;background:#000!important}
.inventory-lightbox-thumb{background:#0b0f16!important}
.inventory-lightbox-thumb img{object-fit:contain!important;background:#0b0f16!important}
@media(max-width:760px){
  .inventory-main-upload{aspect-ratio:auto!important;min-height:190px}
  .inventory-existing-thumb,.inventory-extra-thumb{aspect-ratio:auto!important;min-height:100px}
  .autosadra-natural-image-preview img{max-height:62vh}
  .public-inventory-image>img,.showcase-image>img{max-height:72vh}
}

/* Inventory edit image removal - patch 278 */
.inventory-existing-thumb{position:relative;overflow:hidden}
.inventory-primary-badge{position:absolute;right:8px;top:8px;z-index:2}
.inventory-image-delete{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:8px;padding:9px 10px;border-radius:10px;background:#fff1f1;color:#a71919;border:1px solid #efb5b5;cursor:pointer;font-size:.86rem}
.inventory-image-delete input{width:18px;height:18px;accent-color:#c62828}
.inventory-existing-thumb:has(.inventory-image-delete input:checked){opacity:.48;filter:grayscale(.7)}
.inventory-existing-thumb:has(.inventory-image-delete input:checked)::after{content:'پس از ذخیره حذف می‌شود';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(120,0,0,.64);color:#fff;font-weight:800;text-align:center;padding:10px}

/* Installment contract form - clear financial entry flow (v284) */
.installment-form .redesigned-financial-panel{padding:18px!important;}
.installment-form .financial-intro{margin:-4px 0 14px;color:#64748b;font-size:13px;line-height:1.9;}
.installment-form .money-flow-grid{display:grid;grid-template-columns:1fr .72fr 1fr;gap:12px;align-items:stretch;direction:rtl;}
.installment-form .money-step-card{display:flex!important;flex-direction:column;gap:8px!important;padding:14px;border:1px solid #d8e2ee;border-radius:16px;background:#fbfdff;min-width:0;}
.installment-form .money-step-primary{background:#f8fbff;border-color:#cbdced;}
.installment-form .money-step-final{background:#eefaf3;border-color:#a9dbc0;box-shadow:0 7px 20px rgba(16,112,66,.08);}
.installment-form .money-step-head{display:flex;align-items:center;gap:8px;}
.installment-form .money-step-head i{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;border-radius:9px;background:#e8eef6;color:#173c66;font-style:normal;font-size:12px;font-weight:1000;flex:0 0 auto;}
.installment-form .money-step-final .money-step-head i{background:#d7f2e3;color:#12633c;}
.installment-form .money-step-head strong{font-size:13px;color:#243b56;}
.installment-form .money-step-card small{font-size:11px;color:#718096;line-height:1.7;min-height:38px;}
.installment-form .money-input-wrap,.installment-form .percent-input-wrap,.installment-form .number-input-wrap{position:relative;display:block;}
.installment-form .money-input-wrap input,.installment-form .percent-input-wrap input,.installment-form .number-input-wrap input{padding-left:72px!important;text-align:center!important;direction:ltr!important;font-size:18px!important;font-weight:1000!important;letter-spacing:.2px;min-height:50px!important;background:#fff!important;}
.installment-form .percent-input-wrap input,.installment-form .number-input-wrap input{padding-left:58px!important;}
.installment-form .money-input-wrap em,.installment-form .percent-input-wrap em,.installment-form .number-input-wrap em{position:absolute;left:9px;top:50%;transform:translateY(-50%);font-style:normal;font-size:11px;font-weight:900;color:#5d7087;background:#edf2f7;border-radius:8px;padding:5px 7px;pointer-events:none;white-space:nowrap;}
.installment-form .money-step-final input{border-color:#74bf96!important;background:#fff!important;}
.installment-form .contract-settings-block{margin-top:15px;padding-top:14px;border-top:1px dashed #d7e1ec;}
.installment-form .contract-settings-title{font-size:13px;font-weight:1000;color:#183d66;margin-bottom:10px;}
.installment-form .contract-settings-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:11px!important;}
.installment-form .contract-settings-grid label{min-width:0;}
.installment-form .redesigned-calc-cards{grid-template-columns:1.25fr 1fr .8fr 1fr 1fr!important;}
.installment-form .redesigned-calc-cards div{position:relative;text-align:center;padding:14px 10px!important;}
.installment-form .redesigned-calc-cards .calc-highlight{background:#eefaf3!important;border-color:#a9dbc0!important;}
.installment-form .redesigned-calc-cards b{display:block;direction:ltr;unicode-bidi:embed;font-size:19px!important;line-height:1.5;}
.installment-form .redesigned-calc-cards em{display:block;margin-top:2px;font-style:normal;color:#718096;font-size:10px;font-weight:800;}
@media(max-width:1100px){
  .installment-form .money-flow-grid{grid-template-columns:1fr 1fr;}
  .installment-form .money-step-final{grid-column:1/-1;}
  .installment-form .contract-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .installment-form .redesigned-calc-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
@media(max-width:700px){
  .installment-form .money-flow-grid{grid-template-columns:1fr;}
  .installment-form .money-step-final{grid-column:auto;}
  .installment-form .contract-settings-grid{grid-template-columns:1fr!important;}
  .installment-form .redesigned-calc-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .installment-form .redesigned-calc-cards .calc-highlight{grid-column:1/-1;}
  .installment-form .money-input-wrap input,.installment-form .percent-input-wrap input,.installment-form .number-input-wrap input{font-size:16px!important;}
}

/* v285 - فرم قرارداد اقساط: چیدمان جمع‌وجور و مبنای محاسبه */
.buyer-panel-compact{padding-bottom:12px}
.buyer-compact-row{display:grid;grid-template-columns:minmax(230px,.8fr) minmax(145px,.45fr) minmax(420px,1.6fr);gap:12px;align-items:end}
.buyer-search-compact,.contract-date-compact{margin:0}
.buyer-selected-card-full{min-height:64px;padding:10px 14px}
.person-preview-details{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));gap:7px 12px;margin-top:7px}
.person-preview-details span{display:flex;gap:6px;align-items:center;min-width:0}
.person-preview-details small{white-space:nowrap;color:var(--muted,#64748b)}
.person-preview-details strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.86rem}
.calculation-basis-options{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:12px}
.calculation-basis-options label{display:flex;align-items:flex-start;gap:9px;border:1px solid var(--border,#d7e1ee);border-radius:12px;padding:12px;cursor:pointer;background:var(--card,#fff)}
.calculation-basis-options label:has(input:checked){border-color:#2c9b67;background:#eefbf4;box-shadow:0 0 0 2px rgba(44,155,103,.08)}
.calculation-basis-options span{display:flex;flex-direction:column;gap:4px}.calculation-basis-options small{color:var(--muted,#64748b)}
.calculated-readonly{background:#eef2f7!important;color:#475569!important;cursor:not-allowed}
.executor-row{display:grid;grid-template-columns:minmax(300px,.9fr) minmax(420px,1.4fr);gap:14px;align-items:end}
.executor-selected-card{min-height:68px}
@media(max-width:980px){.buyer-compact-row,.executor-row{grid-template-columns:1fr}.calculation-basis-options{grid-template-columns:1fr}.person-preview-details{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.person-preview-details{grid-template-columns:1fr}}

/* v286 - اصلاح نهایی فرم قرارداد اقساط */
.installment-form .money-flow-grid>*{min-width:0}
.installment-form .money-step-card{overflow:hidden}
.installment-form .money-input-wrap,.installment-form .percent-input-wrap{min-width:0;width:100%}
.installment-form .money-input-wrap input,.installment-form .percent-input-wrap input{box-sizing:border-box;width:100%!important;max-width:100%;font-size:clamp(14px,1.25vw,18px)!important;padding-right:10px!important}
.installment-form .money-input-wrap input{padding-left:12px!important}
.installment-form .money-step-head strong{min-width:0;white-space:normal;line-height:1.7}
.installment-form .contract-description-panel input{min-height:46px}
.installment-form .contract-final-settings-grid{display:grid;grid-template-columns:minmax(260px,.75fr) minmax(520px,1.45fr);gap:14px;align-items:start}
.installment-form .contract-category-box,.installment-form .contract-executor-box{border:1px solid #dce5ef;border-radius:15px;background:#fbfdff;padding:13px;min-width:0}
.installment-form .contract-executor-box{display:grid;grid-template-columns:minmax(240px,.8fr) minmax(300px,1.2fr);gap:12px;align-items:end}
.installment-form .contract-executor-box>label{min-width:0}
.installment-form .contract-executor-box .executor-selected-card{min-width:0;margin:0}
.installment-form .buyer-selected-card>b{display:block;margin-top:3px}
.installment-form .person-preview-details{margin-top:8px}
.installment-form .person-preview-details:empty{display:none}
@media(max-width:1100px){
  .installment-form .contract-final-settings-grid{grid-template-columns:1fr}
  .installment-form .contract-executor-box{grid-template-columns:1fr 1fr}
}
@media(max-width:700px){
  .installment-form .contract-executor-box{grid-template-columns:1fr}
}


/* v287 - فرم اقساط: یکدست‌سازی جریمه، جابه‌جایی محاسبه زنده و موبایل مدرن */
.installment-form .duration-field-unified,
.installment-form .penalty-field-unified,
.installment-form .penalty-period-field-unified{
  display:flex!important;
  flex-direction:column;
  gap:7px!important;
  min-width:0;
}
.installment-form .duration-field-unified .number-input-wrap,
.installment-form .penalty-field-unified .percent-input-wrap,
.installment-form .penalty-period-field-unified .number-input-wrap{
  width:100%;
  min-width:0;
}
.installment-form .duration-field-unified input,
.installment-form .penalty-field-unified input,
.installment-form .penalty-period-field-unified input{
  width:100%!important;
  box-sizing:border-box;
  min-height:50px!important;
}
.installment-form input::placeholder,
.installment-form textarea::placeholder{
  color:#aab5c3!important;
  opacity:.72!important;
  font-weight:600!important;
}
.installment-form .money-step-card input::placeholder{
  color:#b4bdc9!important;
  opacity:.68!important;
  font-size:.82em!important;
}
.installment-form .schedule-live-calculation{
  margin-top:16px;
  padding-top:14px;
  border-top:1px dashed #d7e1ec;
}
.installment-form .schedule-live-head{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
  color:#173c66;
}
.installment-form .schedule-live-head strong{font-size:13px;font-weight:1000}
.installment-form .schedule-live-calculation .redesigned-calc-cards{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:9px!important;
}
.installment-form .schedule-live-calculation .calc-highlight{grid-column:1/-1}
.installment-form .schedule-live-calculation .calc-cards div{
  min-width:0;
  border-radius:13px;
  padding:11px 8px!important;
}
.installment-form .schedule-live-calculation .calc-cards b{
  font-size:clamp(15px,1.1vw,18px)!important;
  overflow-wrap:anywhere;
}

@media(max-width:700px){
  .installment-form{
    padding:10px!important;
    background:linear-gradient(180deg,#f7faff 0,#f3f7fb 100%);
  }
  .installment-form .form-topbar{
    margin:-2px -2px 10px!important;
    padding:14px!important;
    border-radius:18px!important;
    background:linear-gradient(135deg,#0f2f55,#174d7e)!important;
    color:#fff!important;
    box-shadow:0 12px 28px rgba(15,47,85,.16);
  }
  .installment-form .form-topbar h2,
  .installment-form .form-topbar p,
  .installment-form .form-kicker{color:#fff!important}
  .installment-form .form-topbar .quick-actions{width:100%}
  .installment-form .form-topbar .quick-actions .btn{
    width:100%;
    justify-content:center;
    background:rgba(255,255,255,.14)!important;
    color:#fff!important;
    border-color:rgba(255,255,255,.22)!important;
  }
  .installment-form .panel{
    margin-top:10px!important;
    padding:13px!important;
    border-radius:18px!important;
    box-shadow:0 8px 24px rgba(20,49,82,.06);
    border-color:#dbe5ef!important;
  }
  .installment-form .panel-title{
    font-size:15px!important;
    margin-bottom:12px!important;
  }
  .installment-form .calculation-basis-options label{
    padding:11px!important;
    border-radius:14px!important;
  }
  .installment-form .money-step-card{
    border-radius:15px!important;
    padding:12px!important;
  }
  .installment-form .money-step-head strong{font-size:14px!important}
  .installment-form .money-step-card small{min-height:auto!important}
  .installment-form .money-input-wrap input,
  .installment-form .percent-input-wrap input,
  .installment-form .number-input-wrap input{
    min-height:48px!important;
    font-size:17px!important;
    border-radius:13px!important;
  }
  .installment-form .contract-settings-grid,
  .installment-form .regular-schedule,
  .installment-form .buyer-compact-row,
  .installment-form .contract-final-settings-grid,
  .installment-form .contract-executor-box{
    grid-template-columns:1fr!important;
  }
  .installment-form .pay-type-cards{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  .installment-form .pay-type-cards label{
    min-height:46px;
    border-radius:13px!important;
  }
  .installment-form .schedule-live-calculation{
    margin-top:14px;
    padding:12px;
    border:1px solid #dce7f2;
    border-radius:16px;
    background:linear-gradient(180deg,#f8fbff,#f4f8fc);
  }
  .installment-form .schedule-live-calculation .redesigned-calc-cards{
    grid-template-columns:1fr 1fr!important;
  }
  .installment-form .schedule-live-calculation .calc-highlight{
    grid-column:1/-1;
    background:linear-gradient(135deg,#eaf8f0,#f4fcf7)!important;
  }
  .installment-form .schedule-live-calculation .calc-cards div{
    padding:11px 7px!important;
    border-radius:13px!important;
  }
  .installment-form .person-preview-details{grid-template-columns:1fr!important}
  .installment-form .sticky-actions{
    position:sticky!important;
    bottom:0;
    z-index:20;
    margin:12px -10px -10px!important;
    padding:10px!important;
    background:rgba(247,250,255,.94)!important;
    backdrop-filter:blur(10px);
    border-top:1px solid #dbe5ef;
    display:grid!important;
    grid-template-columns:1fr .8fr;
    gap:8px;
  }
  .installment-form .sticky-actions .btn{
    min-height:48px;
    border-radius:13px!important;
    justify-content:center;
  }
}


/* v290: فونت‌های رایج فارسی و فرم مرحله‌ای درخواست خرید */
html[data-app-font="sahel"]{--app-font:Sahel,"Sahel FD",Vazirmatn,Tahoma,Arial,sans-serif}
html[data-app-font="samim"]{--app-font:Samim,"Samim FD",Vazirmatn,Tahoma,Arial,sans-serif}
html[data-app-font="estedad"]{--app-font:Estedad,"Estedad FD",Vazirmatn,Tahoma,Arial,sans-serif}
html[data-app-font="dana"]{--app-font:Dana,"Dana VF",Vazirmatn,Tahoma,Arial,sans-serif}
.purchase-wizard-page{margin:0;background:linear-gradient(145deg,#eef5f3,#f7f9fc 46%,#edf3fb);min-height:100vh;color:#132d4f}
.purchase-wizard-shell{width:min(1120px,calc(100% - 32px));margin:32px auto;padding-bottom:32px}
.purchase-wizard-card{background:rgba(255,255,255,.96);border:1px solid #dbe5ec;border-radius:28px;box-shadow:0 24px 70px rgba(24,50,75,.11);overflow:visible;padding:28px}
.purchase-wizard-header{display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid #e4ebf1;padding-bottom:22px}
.purchase-wizard-heading{display:flex;align-items:center;gap:16px}.purchase-wizard-icon{width:62px;height:62px;border-radius:20px;background:linear-gradient(135deg,#e5f7ef,#edf4ff);display:grid;place-items:center;font-size:30px}
.purchase-wizard-heading h1{margin:0 0 5px;font-size:27px;color:#102f55}.purchase-wizard-heading p{margin:0;color:#718096}
.public-font-picker{display:flex;align-items:center;gap:8px;background:#f4f7fa;border:1px solid #dce5ed;border-radius:13px;padding:7px 10px;font-size:12px;color:#607086}.public-font-picker select{width:auto;min-width:115px;height:36px;border:0;background:transparent;padding:0 6px;font-weight:800;color:#183b60}
.purchase-stepper{display:flex;align-items:center;justify-content:center;margin:24px auto 18px;max-width:780px}.purchase-step{border:0;background:transparent;display:flex;align-items:center;gap:9px;color:#8795a7;font-weight:800;cursor:pointer;padding:5px}.purchase-step b{width:36px;height:36px;border-radius:13px;background:#edf1f5;display:grid;place-items:center;font-size:16px}.purchase-step.active{color:#087a67}.purchase-step.active b{background:#087a67;color:#fff;box-shadow:0 6px 18px rgba(8,122,103,.25)}.purchase-step.done b{background:#d9f3e8;color:#087a67}.purchase-stepper>i{height:2px;flex:1;max-width:120px;background:#e2e8ef;margin:0 8px}
.purchase-wizard-alerts{margin:16px 0}.purchase-wizard-form{margin-top:12px}.purchase-stage{display:none;animation:purchaseStageIn .25s ease}.purchase-stage.active{display:block}@keyframes purchaseStageIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.purchase-stage-title{display:flex;align-items:center;gap:13px;margin:8px 0 22px}.purchase-stage-title>span{width:45px;height:45px;border-radius:15px;background:#eef7f4;display:grid;place-items:center;font-size:22px}.purchase-stage-title h2{margin:0;color:#15385e;font-size:21px}.purchase-stage-title p{margin:4px 0 0;color:#78889b;font-size:13px}.stage-title-with-action .add-purchase-option-modern{margin-right:auto}
.purchase-modern-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.modern-field{display:flex;flex-direction:column;gap:8px;color:#173a5f;font-weight:800;font-size:13px}.modern-field>span small{color:#8a98a9;font-weight:500}.modern-field>span b{color:#dc2626}.modern-field input,.modern-field textarea{width:100%;min-width:0;border:1px solid #cfdae5;border-radius:14px;background:#fff;min-height:50px;padding:11px 14px;color:#152f4e;font-weight:700;box-sizing:border-box;transition:.18s}.modern-field input:focus,.modern-field textarea:focus{border-color:#178a75;box-shadow:0 0 0 4px rgba(23,138,117,.1);outline:0}.modern-field input::placeholder,.modern-field textarea::placeholder{color:#aab4bf;font-weight:500;opacity:1}.field-with-unit{position:relative}.field-with-unit input{padding-left:14px}.field-with-unit em{position:absolute;left:11px;top:50%;transform:translateY(-50%);background:#edf3f7;border-radius:8px;padding:5px 8px;font-size:11px;color:#62758a;font-style:normal}.mobile-field{grid-column:span 1}
.purchase-stage-actions{display:flex;justify-content:flex-end;margin-top:25px;padding-top:18px;border-top:1px solid #e8edf2}.purchase-stage-actions.split{justify-content:space-between}.purchase-stage-actions .btn{min-height:48px;border-radius:13px;padding:10px 20px;font-weight:900}.purchase-stage-actions .purchase-next span{margin-right:8px}
.purchase-options-modern{display:grid;gap:15px}.purchase-option-card{display:block!important;margin:0!important;padding:17px!important;border:1px solid #dbe5ec!important;border-radius:19px!important;background:linear-gradient(180deg,#fff,#fbfcfd)!important;box-shadow:0 5px 18px rgba(22,47,73,.045)}.option-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.option-card-head strong{color:#12385e}.option-number{display:inline-grid;place-items:center;width:25px;height:25px;border-radius:9px;background:#e6f5ef;color:#087a67;margin-right:6px}.remove-purchase-option{border:0;width:32px;height:32px;border-radius:10px;background:#fff0f0;color:#c43d3d;font-size:22px;cursor:pointer}.purchase-option-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.option-note{grid-column:span 1}.smart-vehicle{position:relative}.smart-vehicle input{width:100%}.vehicle-dropdown{z-index:80}
.description-field textarea{resize:vertical;min-height:145px;line-height:2}.purchase-security-modern{display:grid;grid-template-columns:auto minmax(150px,240px);gap:12px;align-items:center;background:#f3f8fb;border:1px solid #d9e7ef;border-radius:17px;padding:15px;margin-top:18px}.purchase-security-modern>div{display:flex;gap:9px;align-items:center}.purchase-security-modern>div span{color:#64748b}.purchase-security-modern>div strong{font-size:18px;color:#15385e}.purchase-security-modern>input{height:47px;border:1px solid #cfdae5;border-radius:12px;padding:9px 12px}.purchase-security-modern small{grid-column:1/-1;color:#7b8999}.purchase-final-note{margin-top:15px;background:#edfaf4;border:1px solid #c8ebdc;color:#196b58;border-radius:13px;padding:11px 14px;font-size:13px}.final-actions{margin-top:18px}
@media(max-width:850px){.purchase-modern-grid,.purchase-option-fields{grid-template-columns:1fr 1fr}.purchase-wizard-card{padding:21px}.purchase-wizard-header{align-items:flex-start}.public-font-picker span{display:none}.stage-title-with-action{flex-wrap:wrap}.stage-title-with-action .add-purchase-option-modern{margin-right:58px}}
@media(max-width:600px){.purchase-wizard-page{background:#f3f6f9}.purchase-wizard-shell{width:100%;margin:0;padding:0}.purchase-wizard-card{border:0;border-radius:0;min-height:100vh;padding:18px 14px 96px;box-shadow:none}.purchase-wizard-header{padding:4px 2px 17px}.purchase-wizard-icon{width:48px;height:48px;border-radius:15px;font-size:24px}.purchase-wizard-heading{gap:10px}.purchase-wizard-heading h1{font-size:20px}.purchase-wizard-heading p{font-size:11.5px;line-height:1.7}.public-font-picker{padding:4px 6px}.public-font-picker select{min-width:76px;width:76px;font-size:11px}.purchase-stepper{margin:17px -4px 20px;justify-content:space-between}.purchase-step{flex-direction:column;gap:4px;padding:0;min-width:66px;font-size:10.5px}.purchase-step b{width:34px;height:34px;border-radius:12px}.purchase-stepper>i{margin:0 -2px 18px;max-width:none}.purchase-stage-title{margin-bottom:16px}.purchase-stage-title>span{width:39px;height:39px;border-radius:13px;font-size:19px}.purchase-stage-title h2{font-size:17px}.purchase-stage-title p{font-size:11.5px;line-height:1.7}.purchase-modern-grid,.purchase-option-fields{grid-template-columns:1fr;gap:12px}.modern-field input,.modern-field textarea{min-height:53px;border-radius:14px;font-size:16px}.field-with-unit input{padding-left:14px}.stage-title-with-action .add-purchase-option-modern{width:100%;margin:9px 0 0;min-height:45px}.purchase-option-card{padding:14px!important;border-radius:17px!important}.purchase-stage-actions{position:sticky;bottom:0;z-index:30;margin:22px -14px -96px;padding:12px 14px calc(12px + env(safe-area-inset-bottom));background:rgba(255,255,255,.94);backdrop-filter:blur(10px);box-shadow:0 -8px 25px rgba(20,45,70,.08)}.purchase-stage-actions .btn{flex:1;min-height:51px;padding:9px 10px}.purchase-stage-actions.split{gap:8px}.purchase-stage-actions.split .purchase-prev{max-width:38%}.purchase-security-modern{grid-template-columns:1fr}.purchase-security-modern>input{font-size:16px}.purchase-security-modern small{grid-column:auto}.description-field textarea{min-height:160px}.portal-notification-floating{top:8px!important;left:8px!important}.purchase-wizard-alerts{margin:10px 0}}


/* v291 — فونت مرکزی کل سامانه و افزایش خوانایی نوشته‌های ریز */
html:not([data-app-font]){--app-font:"B Yekan",Yekan,Vazirmatn,Tahoma,Arial,sans-serif}
body,input,select,button,textarea,table,.btn,.nav,.subnav{font-family:var(--app-font)!important}
/* نوشته‌های ۱۱ و ۱۲ پیکسلی قبلی، دو پله خواناتر شده‌اند. */
small,.smart-hint,.live-search-box small,.person-option small,.person-id-option small,
.hint,.field-error,.badge,.btn.small,.hero-kicker,.money-unit-inline,
.simple-result-panel small,.quick-entry-help,.balance-pill,.nested-submenu .subnav,
.public-form-hint,.purchase-stage-title p,.purchase-wizard-heading p,
.settings-inline-label + select + small,.font-setting-box small,.currency-setting-box small{
  font-size:14px!important;
  line-height:1.75;
}
.submenu-title,.section-toggle.submenu-title,.field label,.people-controls label,
.simple-result-panel span,.auto-meta span,.muted-text{
  font-size:15px!important;
}
@media(max-width:720px){
  small,.hint,.smart-hint,.field-error,.badge,.btn.small,.nested-submenu .subnav{font-size:14px!important}
}

/* v15.24 - جستجوی واقعی رنگ خودرو */
.smart-color-picker{position:relative}
.smart-color-picker .color-search{width:100%;padding-left:36px;background:#fff}
.smart-color-picker:after{content:'🔎';position:absolute;left:10px;top:9px;opacity:.55;pointer-events:none}
.color-dropdown{display:none;position:absolute;z-index:3600;top:calc(100% + 6px);right:0;left:0;max-height:280px;overflow:auto;background:#fff;border:1px solid #cbd5e1;border-radius:14px;box-shadow:0 18px 40px rgba(15,35,70,.18);padding:6px}
.smart-color-picker.open .color-dropdown{display:block}
.color-option,.color-empty{padding:10px 12px;border-radius:11px;border-bottom:1px solid #f1f5f9;color:#183153}
.color-option{cursor:pointer}
.color-option:hover,.color-option.smart-active{background:#e9f7ef;color:#0f5132}
.color-empty{text-align:center;color:#64748b;font-size:12px}

/* v343 - modern user management and RBAC */
.users-hero,.roles-hero{background:linear-gradient(135deg,#fff 0%,#f6fbff 100%);box-shadow:0 14px 34px rgba(15,45,77,.06)}
.users-kicker{display:inline-flex;color:#0f7c59;font-size:12px;font-weight:800;margin-bottom:7px}.users-hero h1,.roles-hero h1{font-size:31px}.users-hero-actions{flex-wrap:wrap}
.users-manager-card{padding:20px}.users-overview{display:grid;grid-template-columns:repeat(3,minmax(0,180px));gap:12px;margin-bottom:16px}.users-stat{border:1px solid #dce7f3;background:#f8fbff;border-radius:16px;padding:13px 16px;display:flex;justify-content:space-between;align-items:center}.users-stat span{color:#64748b}.users-stat b{font-size:22px;color:#173b63}.users-stat.ok{background:#f0fbf5;border-color:#ccebd9}.users-stat.muted{background:#fafafa}
.users-filterbar{display:grid;grid-template-columns:minmax(280px,1fr) 190px;gap:12px;padding:14px;background:#f7faff;border:1px solid #e0eaf5;border-radius:18px;margin-bottom:16px}.users-search-field{height:46px;display:flex;align-items:center;gap:9px;background:#fff;border:1px solid #cad9e9;border-radius:13px;padding:0 13px}.users-search-field input{border:0;outline:0;background:transparent;width:100%;font:inherit}.users-filterbar select{height:46px;border:1px solid #cad9e9;border-radius:13px;background:#fff;padding:0 12px;font:inherit}
.users-table-wrap{overflow:auto;border:1px solid #e0e9f3;border-radius:18px}.users-modern-table th{height:52px;background:#edf5fc}.users-modern-table td{padding:14px 12px}.user-person{display:flex;align-items:center;gap:11px;text-align:right}.user-person>div{display:flex;flex-direction:column;gap:3px}.user-person small{color:#718096}.user-avatar{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,#dff5ed,#eaf2ff);display:grid;place-items:center;color:#0d6c57;font-weight:900;font-size:18px;flex:none}.super-admin-label{color:#a15b00!important}.username-cell{direction:ltr;display:inline-block}.role-cell{display:flex;flex-direction:column;gap:4px}.role-cell small,.last-login{color:#728096;font-size:12px}.status-pill,.protected-chip{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:7px 12px;font-size:12px;font-weight:800;white-space:nowrap}.status-pill.active{background:#e7f8ee;color:#147044}.status-pill.inactive{background:#fff0f0;color:#b42318}.protected-chip{background:#fff6df;color:#8a5900}.compact-actions{display:flex;align-items:center;justify-content:center;gap:7px}.compact-actions form{margin:0}
.protected-admin-notice{display:flex;align-items:center;gap:12px;border:1px solid #f4d38c;background:#fff9ea;border-radius:16px;padding:15px 17px;color:#704b00}.protected-admin-notice b{white-space:nowrap}.protected-admin-notice span{color:#7b6750;line-height:1.9}
.modern-rbac{display:block;margin:0 24px 90px}.modern-rbac .rbac-main{padding:20px;border-radius:22px}.modern-rbac-topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;border-bottom:1px solid #e4edf6;padding-bottom:16px}.modern-rbac-topbar h2{margin:0 0 6px}.modern-rbac .rbac-search-wrap{min-width:330px;height:46px;display:flex;align-items:center;gap:8px;border:1px solid #cbdbea;background:#fff;border-radius:14px;padding:0 13px}.modern-rbac .rbac-search{border:0!important;outline:0;width:100%;height:auto!important;padding:0!important}
.modern-role-tabs{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));gap:10px;margin:18px 0}.modern-role-tabs .rbac-role-tab{border:1px solid #d9e5f1;background:#f8fbff;border-radius:16px;padding:13px 15px;display:flex;align-items:center;justify-content:space-between;color:#244363;cursor:pointer}.modern-role-tabs .rbac-role-tab.active{background:linear-gradient(135deg,#143d68,#0e6e62);color:#fff;border-color:transparent;box-shadow:0 10px 24px rgba(20,61,104,.18)}.modern-role-tabs .rbac-role-tab small{background:rgba(255,255,255,.75);color:#51657b;padding:5px 9px;border-radius:999px}.modern-role-tabs .rbac-role-tab.active small{background:rgba(255,255,255,.18);color:#fff}
.modern-rbac .rbac-panel-head{background:#f8fbff;border:1px solid #e0eaf4;border-radius:16px;padding:14px 16px;margin-bottom:14px}.modern-rbac .modern-workspace{display:grid;grid-template-columns:260px minmax(0,1fr);gap:14px}.modern-rbac .rbac-module-nav{background:#f5f9fd;border:1px solid #e1eaf4;border-radius:17px;padding:9px;max-height:620px;overflow:auto}.modern-rbac .rbac-module-btn{width:100%;border:0;background:transparent;border-radius:12px;padding:11px 12px;display:flex;justify-content:space-between;gap:8px;text-align:right;cursor:pointer;color:#334e68}.modern-rbac .rbac-module-btn.active{background:#fff;color:#0f6c5b;box-shadow:0 5px 16px rgba(15,45,77,.08)}.modern-rbac .rbac-module-btn small{color:#7b8da1}.modern-rbac .rbac-permission-area{border:1px solid #e1eaf4;border-radius:17px;background:#fff;padding:14px}.modern-rbac .rbac-module-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e7eef6;padding-bottom:12px;margin-bottom:12px}.modern-rbac .rbac-module-head h4{margin:0 0 4px}.modern-rbac .rbac-module-head small{color:#7b8da1}.modern-rbac .rbac-table{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.modern-rbac .rbac-row{border:1px solid #e0e9f2;background:#fafcff;border-radius:14px;padding:11px 12px;min-height:58px}.modern-rbac .rbac-row:has(input:checked){border-color:#9fd8c6;background:#f0fbf7}.modern-rbac .rbac-sticky-save{left:24px;right:24px;bottom:14px;border-radius:17px;display:flex;align-items:center;justify-content:space-between}.save-hint{color:#64748b;font-size:12px}
@media(max-width:900px){.users-overview{grid-template-columns:repeat(3,1fr)}.users-filterbar{grid-template-columns:1fr}.users-table-wrap{display:none}.users-mobile-list{display:grid;gap:10px}.user-mobile-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.user-mobile-grid>div{background:#f7faff;border-radius:12px;padding:9px;display:flex;flex-direction:column;gap:4px;min-width:0}.user-mobile-grid span{color:#718096;font-size:11px}.user-mobile-grid b{font-size:12px;overflow-wrap:anywhere}.modern-rbac{margin:0 12px 90px}.modern-rbac-topbar{align-items:stretch;flex-direction:column}.modern-rbac .rbac-search-wrap{min-width:0;width:100%}.modern-role-tabs{display:flex;overflow:auto;padding-bottom:5px}.modern-role-tabs .rbac-role-tab{min-width:150px}.modern-rbac .modern-workspace{grid-template-columns:1fr}.modern-rbac .rbac-module-nav{display:flex;overflow:auto;max-height:none}.modern-rbac .rbac-module-btn{min-width:175px}.modern-rbac .rbac-table{grid-template-columns:1fr}.modern-rbac .rbac-panel-head{align-items:stretch;flex-direction:column}.modern-rbac .rbac-actions{display:grid;grid-template-columns:1fr 1fr}.modern-rbac .rbac-sticky-save{left:12px;right:12px}.save-hint{display:none}}
@media(max-width:560px){.users-overview{grid-template-columns:1fr 1fr}.users-stat:first-child{grid-column:1/-1}.users-hero-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.users-hero-actions .btn.primary{grid-column:1/-1}.user-mobile-card{padding:12px}.user-mobile-actions{display:grid;grid-template-columns:1fr 1fr}.user-mobile-actions form,.user-mobile-actions button,.user-mobile-actions a{width:100%}.modern-rbac .rbac-actions{grid-template-columns:1fr}.modern-rbac .rbac-module-head{align-items:stretch;gap:8px;flex-direction:column}.protected-admin-notice{align-items:flex-start;flex-direction:column}}

/* Phase 344 - Mobile-first management dashboard redesign */
.dashboard-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.dashboard-section-title>div{display:flex;align-items:center;gap:9px}.dashboard-section-title h3{margin:0!important}.dashboard-section-title small{color:#64748b;font-weight:800}.dashboard-section-icon{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:#ecfdf5;border:1px solid #bbf7d0}.hero-stat-icon,.quick-action-icon{display:grid;place-items:center}.hero-stat-copy{display:flex;flex-direction:column;min-width:0}

@media(max-width:760px){
  body:has(.dashboard-mobile-shell) .content{padding-inline:10px!important}
  .dashboard-mobile-shell.dashboard-hero-v2.home-hero{min-height:0!important;padding:14px!important;border-radius:22px!important;display:grid!important;grid-template-columns:minmax(0,1fr) 58px!important;gap:10px!important;align-items:start!important;overflow:hidden!important;background:linear-gradient(145deg,#0b3d2a,#0f5132 58%,#0b6b45)!important;box-shadow:0 14px 34px rgba(15,81,50,.22)!important}
  .dashboard-mobile-shell .hero-text{min-width:0!important;display:block!important}
  .dashboard-mobile-shell .hero-kicker{font-size:10px!important;opacity:.84!important;margin-bottom:3px!important}
  .dashboard-mobile-shell .hero-text h2{font-size:17px!important;line-height:1.65!important;margin:0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .dashboard-mobile-shell .hero-text>p{display:none!important}
  .dashboard-mobile-shell .hero-logo-card{width:58px!important;height:58px!important;min-height:58px!important;padding:6px!important;border-radius:17px!important;margin:0!important;background:rgba(255,255,255,.96)!important}
  .dashboard-mobile-shell .hero-logo-card img{width:100%!important;height:100%!important;object-fit:contain!important}
  .dashboard-mobile-shell .hero-inline-stats{grid-column:1/-1!important;position:static!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin-top:10px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;transform:none!important}
  .dashboard-mobile-shell .hero-inline-stat{min-height:54px!important;padding:8px 9px!important;border:1px solid rgba(255,255,255,.14)!important;border-radius:15px!important;background:rgba(255,255,255,.1)!important;display:flex!important;align-items:center!important;gap:8px!important;text-align:right!important;backdrop-filter:blur(6px)}
  .dashboard-mobile-shell .hero-inline-stat:last-child:nth-child(odd){grid-column:1/-1}
  .dashboard-mobile-shell .hero-stat-icon{width:32px;height:32px;flex:0 0 32px;border-radius:11px;background:rgba(255,255,255,.13);font-size:17px}
  .dashboard-mobile-shell .hero-inline-num{font-size:18px!important;line-height:1.1!important;color:#fff!important;font-weight:1000!important}
  .dashboard-mobile-shell .hero-inline-label{font-size:10.5px!important;line-height:1.35!important;color:#d8f7e8!important;white-space:normal!important}

  .dashboard-welcome-card{margin:10px 0!important;padding:11px 12px!important;border-radius:18px!important;display:grid!important;grid-template-columns:1fr auto!important;gap:8px!important;align-items:center!important;background:#fff!important;box-shadow:0 8px 22px rgba(15,23,42,.06)!important}
  .dashboard-welcome-card:before{display:none!important}.dashboard-welcome-card .welcome-eyebrow,.dashboard-welcome-card p{display:none!important}.dashboard-welcome-card h3{font-size:15px!important;margin:0!important}.dashboard-welcome-card .welcome-actions{display:flex!important;align-items:center!important;gap:7px!important}.dashboard-welcome-card .welcome-pills{display:none!important}.dashboard-welcome-card .welcome-dismiss-btn{min-height:34px!important;padding:6px 12px!important;border-radius:11px!important;font-size:12px!important}

  .dashboard-quick-v2{margin:10px 0!important;padding:0!important}.dashboard-quick-v2 .quick-card{padding:12px!important;border-radius:20px!important;box-shadow:0 10px 26px rgba(15,23,42,.07)!important}.dashboard-section-title{margin-bottom:10px}.dashboard-section-title small{font-size:10px}.dashboard-section-icon{width:30px;height:30px;border-radius:10px}.dashboard-quick-v2 .quick-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}.dashboard-quick-v2 .quick-grid a{min-width:0!important;min-height:70px!important;padding:8px 5px!important;border-radius:16px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:5px!important;text-align:center!important;line-height:1.25!important;background:#f8fafc!important;border:1px solid #e5edf5!important;box-shadow:none!important}.dashboard-quick-v2 .quick-grid a:active{transform:scale(.97)}.dashboard-quick-v2 .quick-action-icon{width:32px;height:32px;border-radius:11px;background:#eef6ff;font-size:18px}.dashboard-quick-v2 .quick-action-title{font-size:10.5px!important;font-weight:1000!important;color:#193a5f!important;white-space:normal!important}.dashboard-quick-v2 .quick-access-edit-tile{border-style:dashed!important;background:#f0fdf4!important}.dashboard-quick-v2 .quick-access-plus{width:32px!important;height:32px!important;font-size:22px!important;margin:0!important}

  .dashboard-stack{gap:10px!important;margin-top:10px!important;padding:0!important}.dashboard-module-card{border-radius:20px!important;box-shadow:0 10px 26px rgba(15,23,42,.065)!important;overflow:hidden!important}.dashboard-module-head{padding:11px 12px!important;min-height:46px!important}.dashboard-module-head h3{font-size:14px!important;margin:0!important}.dashboard-module-tools{top:8px!important;left:8px!important}.dashboard-drag-handle{display:none!important}.dashboard-module-settings{width:29px!important;height:29px!important;border-radius:10px!important}.dashboard-module-body{padding:9px!important}

  .dashboard-mini-table{overflow:visible!important}.dashboard-mini-table table,.dashboard-mini-table tbody{display:block!important;width:100%!important}.dashboard-mini-table tr:first-child{display:none!important}.dashboard-mini-table tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px 8px!important;margin-bottom:8px!important;padding:10px!important;border:1px solid #e6edf5!important;border-radius:15px!important;background:#fbfdff!important}.dashboard-mini-table tr:last-child{margin-bottom:0!important}.dashboard-mini-table td{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:7px!important;min-width:0!important;padding:2px 0!important;border:0!important;font-size:11px!important;text-align:left!important}.dashboard-mini-table td:before{content:attr(data-label);color:#64748b;font-size:9.5px;font-weight:900;white-space:nowrap}.dashboard-mini-table td:nth-child(3){grid-column:1/-1}.dashboard-mini-table td[colspan]{grid-column:1/-1!important;display:block!important;text-align:center!important;padding:12px!important}.dashboard-mini-table td[colspan]:before{display:none}.dashboard-mini-table .amount{font-size:11px!important;font-weight:1000!important;color:#0f5132!important}
}

@media(max-width:380px){.dashboard-quick-v2 .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.dashboard-mobile-shell .hero-text h2{font-size:15px!important}}

/* Phase 345 - Minimal mobile portal home + true card view for dashboard due items */
@media(max-width:760px){
  body.portal-home-body{
    min-height:100vh;
    background:
      radial-gradient(circle at 15% 0,rgba(59,130,246,.12),transparent 32%),
      radial-gradient(circle at 100% 25%,rgba(16,185,129,.08),transparent 28%),
      linear-gradient(180deg,#f4f8fd 0,#eef4fa 100%)!important;
  }
  .portal-home-shell{
    width:100%!important;
    max-width:none!important;
    padding:12px 12px 24px!important;
    margin:0!important;
    box-sizing:border-box;
  }
  .portal-home-hero{
    position:relative;
    display:grid!important;
    grid-template-columns:64px minmax(0,1fr)!important;
    grid-template-areas:"logo copy" "clock clock"!important;
    align-items:center!important;
    gap:10px 12px!important;
    min-height:0!important;
    padding:15px!important;
    border-radius:22px!important;
    background:linear-gradient(145deg,#ffffff,#f8fbff)!important;
    border:1px solid rgba(148,163,184,.22)!important;
    box-shadow:0 12px 35px rgba(30,64,175,.08)!important;
    overflow:hidden;
  }
  .portal-home-hero:before{
    content:"";
    position:absolute;
    width:150px;height:150px;
    left:-62px;top:-76px;
    border-radius:50%;
    background:rgba(59,130,246,.08);
    pointer-events:none;
  }
  .portal-home-logo{
    grid-area:logo!important;
    width:64px!important;
    height:64px!important;
    padding:5px!important;
    border-radius:18px!important;
    object-fit:contain!important;
    background:#fff!important;
    box-shadow:0 8px 22px rgba(15,23,42,.08)!important;
    z-index:1;
  }
  .portal-hero-content{grid-area:copy!important;min-width:0!important;z-index:1}
  .portal-kicker{
    margin:0 0 2px!important;
    font-size:10.5px!important;
    font-weight:900!important;
    color:#2563eb!important;
    letter-spacing:0!important;
  }
  .portal-hero-content h1{
    margin:0!important;
    font-size:21px!important;
    line-height:1.45!important;
    color:#102a43!important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .portal-hero-content p{
    margin:4px 0 0!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    font-size:11px!important;
    line-height:1.75!important;
    color:#64748b!important;
  }
  .portal-clock-card{
    grid-area:clock!important;
    width:100%!important;
    min-width:0!important;
    min-height:48px!important;
    margin:2px 0 0!important;
    padding:8px 10px!important;
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr) auto!important;
    grid-template-areas:"icon date time" "icon sub time"!important;
    gap:0 8px!important;
    align-items:center!important;
    border-radius:15px!important;
    background:#f1f6fd!important;
    border:1px solid #e2eaf4!important;
    box-shadow:none!important;
  }
  .portal-clock-card:before{
    width:34px!important;height:34px!important;
    border-radius:11px!important;
    font-size:18px!important;
  }
  .portal-clock-time{font-size:17px!important;white-space:nowrap!important}
  .portal-clock-date{font-size:11px!important;line-height:1.45!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .portal-clock-subdate{font-size:9.5px!important}
  .portal-messages{margin:10px 0!important}
  .portal-messages .flash{padding:10px 12px!important;border-radius:14px!important;font-size:12px!important}

  .portal-home-options{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
    margin:10px 0 0!important;
  }
  .portal-home-options .portal-option{
    position:relative!important;
    min-height:0!important;
    padding:12px 12px 12px 58px!important;
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr) auto!important;
    grid-template-areas:"icon title arrow" "icon desc arrow"!important;
    align-items:center!important;
    gap:1px 10px!important;
    border-radius:18px!important;
    border:1px solid #e3eaf2!important;
    background:rgba(255,255,255,.94)!important;
    box-shadow:0 8px 22px rgba(15,23,42,.055)!important;
    overflow:hidden!important;
  }
  .portal-home-options .portal-option:before{display:none!important}
  .portal-option-bg{
    display:block!important;
    inset:auto auto 0 0!important;
    width:74px!important;height:74px!important;
    border-radius:0 60px 0 0!important;
    opacity:.42!important;
  }
  .portal-home-options .portal-option-icon{
    grid-area:icon!important;
    width:42px!important;height:42px!important;
    margin:0!important;
    border-radius:14px!important;
    font-size:21px!important;
    box-shadow:none!important;
    border:1px solid rgba(148,163,184,.18)!important;
  }
  .portal-home-options .portal-option strong{
    grid-area:title!important;
    font-size:14px!important;
    line-height:1.35!important;
    margin:0!important;
    color:#102a43!important;
  }
  .portal-home-options .portal-option small{
    grid-area:desc!important;
    display:block!important;
    margin:1px 0 0!important;
    font-size:10px!important;
    line-height:1.45!important;
    color:#748399!important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .portal-option-btn{
    grid-area:arrow!important;
    width:31px!important;height:31px!important;
    min-width:31px!important;
    margin:0!important;
    padding:0!important;
    border-radius:11px!important;
    font-size:0!important;
    box-shadow:none!important;
  }
  .portal-option-btn:before{content:"←"!important;margin:0!important;font-size:18px!important}

  .portal-contact-card{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    margin:10px 0 0!important;
    padding:10px!important;
    border-radius:20px!important;
    background:rgba(255,255,255,.94)!important;
    border:1px solid #e3eaf2!important;
    box-shadow:0 8px 22px rgba(15,23,42,.055)!important;
  }
  .portal-contact-item{
    min-width:0!important;
    min-height:58px!important;
    padding:8px!important;
    gap:8px!important;
    border:0!important;
    border-radius:14px!important;
    background:#f7faff!important;
    box-sizing:border-box;
  }
  .portal-contact-item.wide{grid-column:1/-1!important}
  .portal-contact-icon{
    flex:0 0 34px!important;
    width:34px!important;height:34px!important;
    border-radius:11px!important;
    font-size:17px!important;
  }
  .portal-contact-item strong{font-size:10.5px!important;margin:0 0 2px!important;color:#64748b!important}
  .portal-contact-item span:not(.portal-contact-icon){
    font-size:12px!important;
    line-height:1.45!important;
    color:#14365d!important;
    overflow-wrap:anywhere;
  }
  .portal-contact-item.wide span:not(.portal-contact-icon){font-size:10.5px!important;line-height:1.65!important}
  .portal-home-footer{
    margin-top:10px!important;
    padding:10px!important;
    border-radius:14px!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#7b8798!important;
    font-size:10px!important;
  }

  /* Ensure due installments and checks are actual phone-width cards, never horizontal tables */
  .dashboard-module-card .dashboard-mini-table,
  .dashboard-module-card .dashboard-mini-table.tablewrap{
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
    padding:0!important;
  }
  .dashboard-module-card .dashboard-mini-table table{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:auto!important;
  }
  .dashboard-module-card .dashboard-mini-table tbody{display:block!important;width:100%!important}
  .dashboard-module-card .dashboard-mini-table tr{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  .dashboard-module-card .dashboard-mini-table td{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    white-space:normal!important;
  }
}

@media(max-width:390px){
  .portal-home-shell{padding-inline:9px!important}
  .portal-home-hero{grid-template-columns:56px minmax(0,1fr)!important;padding:12px!important}
  .portal-home-logo{width:56px!important;height:56px!important;border-radius:16px!important}
  .portal-hero-content h1{font-size:18px!important}
  .portal-contact-card{grid-template-columns:1fr!important}
  .portal-contact-item.wide{grid-column:auto!important}
}


/* Phase 346 - Dashboard mobile balance: compact hero, real welcome toast, readable portal home */
@media(max-width:760px){
  /* Compact dashboard hero: visible summary without occupying the first screen */
  .dashboard-mobile-shell.dashboard-hero-v2.home-hero{
    padding:11px 12px!important;
    grid-template-columns:minmax(0,1fr) 50px!important;
    gap:8px!important;
    border-radius:19px!important;
  }
  .dashboard-mobile-shell .hero-kicker{font-size:9px!important;margin-bottom:1px!important}
  .dashboard-mobile-shell .hero-text h2{
    font-size:15px!important;
    line-height:1.5!important;
    -webkit-line-clamp:2!important;
  }
  .dashboard-mobile-shell .hero-logo-card{
    width:50px!important;height:50px!important;min-height:50px!important;
    padding:5px!important;border-radius:14px!important;
  }
  .dashboard-mobile-shell .hero-inline-stats{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:6px!important;
    margin-top:7px!important;
  }
  .dashboard-mobile-shell .hero-inline-stat,
  .dashboard-mobile-shell .hero-inline-stat:last-child:nth-child(odd){
    grid-column:auto!important;
    min-height:45px!important;
    padding:6px 5px!important;
    border-radius:12px!important;
    gap:5px!important;
    justify-content:center!important;
  }
  .dashboard-mobile-shell .hero-stat-icon{
    width:25px!important;height:25px!important;flex:0 0 25px!important;
    border-radius:8px!important;font-size:13px!important;
  }
  .dashboard-mobile-shell .hero-inline-num{font-size:15px!important}
  .dashboard-mobile-shell .hero-inline-label{
    font-size:8.8px!important;
    line-height:1.25!important;
    display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  }

  /* Welcome is an overlay notification, not another dashboard section */
  .dashboard-welcome-toast.autosadra-welcome-card{
    position:fixed!important;
    z-index:1300!important;
    top:76px!important;
    left:12px!important;
    right:12px!important;
    width:auto!important;
    max-width:520px!important;
    margin:0 auto!important;
    padding:11px 12px!important;
    border-radius:17px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:9px!important;
    background:rgba(255,255,255,.97)!important;
    border:1px solid rgba(15,81,50,.18)!important;
    box-shadow:0 16px 42px rgba(15,23,42,.18)!important;
    backdrop-filter:blur(14px);
    animation:dashboardToastIn .32s ease both;
  }
  .dashboard-welcome-toast:before{display:none!important}
  .dashboard-welcome-toast .welcome-toast-copy{display:flex;align-items:center;gap:9px;min-width:0}
  .dashboard-welcome-toast .welcome-toast-icon{
    width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;
    border-radius:13px;background:#eaf8f1;font-size:20px;
  }
  .dashboard-welcome-toast .welcome-eyebrow{font-size:9px!important;margin:0!important;color:#047857!important}
  .dashboard-welcome-toast h3{font-size:14px!important;line-height:1.35!important;margin:0!important}
  .dashboard-welcome-toast p{font-size:10px!important;line-height:1.55!important;margin:2px 0 0!important;color:#64748b!important}
  .dashboard-welcome-toast .welcome-actions{width:auto!important;display:block!important;flex:0 0 auto!important}
  .dashboard-welcome-toast .welcome-pills{display:none!important}
  .dashboard-welcome-toast .welcome-dismiss-btn{
    width:34px!important;height:34px!important;min-width:34px!important;padding:0!important;
    display:grid!important;place-items:center!important;border-radius:11px!important;
    font-size:0!important;box-shadow:none!important;background:#0b7a5b!important;
  }
  .dashboard-welcome-toast .welcome-dismiss-btn:before{content:"✓";font-size:16px;color:#fff}
  .dashboard-welcome-toast.welcome-hiding{position:fixed!important;transform:translateY(-12px)!important}
  @keyframes dashboardToastIn{from{opacity:0;transform:translateY(-14px) scale(.98)}to{opacity:1;transform:none}}

  /* Portal home: restore comfortable readability without returning to oversized cards */
  .portal-home-shell{padding:15px 13px 28px!important}
  .portal-home-hero{
    grid-template-columns:72px minmax(0,1fr)!important;
    gap:12px 14px!important;
    padding:18px!important;
    border-radius:24px!important;
  }
  .portal-home-logo{width:72px!important;height:72px!important;border-radius:19px!important}
  .portal-kicker{font-size:12px!important;margin-bottom:3px!important}
  .portal-hero-content h1{font-size:23px!important;white-space:normal!important;line-height:1.45!important}
  .portal-hero-content p{font-size:12.5px!important;line-height:1.8!important;margin-top:5px!important}
  .portal-clock-card{min-height:57px!important;padding:10px 12px!important;border-radius:17px!important}
  .portal-clock-time{font-size:19px!important}
  .portal-clock-date{font-size:12.5px!important}.portal-clock-subdate{font-size:10.5px!important}
  .portal-home-options{gap:11px!important;margin-top:12px!important}
  .portal-home-options .portal-option{
    min-height:78px!important;
    padding:15px 14px 15px 64px!important;
    grid-template-columns:46px minmax(0,1fr) 34px!important;
    gap:2px 11px!important;border-radius:20px!important;
  }
  .portal-home-options .portal-option-icon{width:46px!important;height:46px!important;font-size:23px!important}
  .portal-home-options .portal-option strong{font-size:16px!important}
  .portal-home-options .portal-option small{font-size:11.5px!important;line-height:1.55!important}
  .portal-option-btn{width:34px!important;height:34px!important;min-width:34px!important}
  .portal-contact-card{gap:10px!important;padding:12px!important;border-radius:22px!important;margin-top:12px!important}
  .portal-contact-item{min-height:68px!important;padding:10px!important}
  .portal-contact-icon{width:39px!important;height:39px!important;flex-basis:39px!important;font-size:19px!important}
  .portal-contact-item strong{font-size:11.5px!important}.portal-contact-item span:not(.portal-contact-icon){font-size:13.5px!important}
}
@media(max-width:390px){
  .dashboard-mobile-shell .hero-inline-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .dashboard-mobile-shell .hero-inline-stat:last-child:nth-child(odd){grid-column:1/-1!important}
  .portal-home-hero{grid-template-columns:64px minmax(0,1fr)!important;padding:15px!important}
  .portal-home-logo{width:64px!important;height:64px!important}
  .portal-hero-content h1{font-size:20px!important}
}


/* Phase 347 - Mobile typography + iconless compact dashboard hero */
@media(max-width:760px){
  /* Keep the hero compact after removing statistic icons */
  .dashboard-mobile-shell.dashboard-hero-v2.home-hero{
    padding:10px 12px!important;
    grid-template-columns:minmax(0,1fr) 48px!important;
    gap:7px!important;
    border-radius:18px!important;
  }
  .dashboard-mobile-shell .hero-logo-card{
    width:48px!important;height:48px!important;min-height:48px!important;
    padding:5px!important;border-radius:13px!important;
  }
  .dashboard-mobile-shell .hero-kicker{font-size:11px!important;line-height:1.45!important}
  .dashboard-mobile-shell .hero-text h2{font-size:17px!important;line-height:1.48!important}
  .dashboard-mobile-shell .hero-inline-stats{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:0!important;
    margin-top:7px!important;
    padding:6px 0 1px!important;
    border-top:1px solid rgba(255,255,255,.16)!important;
  }
  .dashboard-mobile-shell .hero-inline-stat,
  .dashboard-mobile-shell .hero-inline-stat:last-child:nth-child(odd){
    grid-column:auto!important;
    min-width:0!important;
    min-height:0!important;
    padding:3px 5px!important;
    border-radius:0!important;
    gap:1px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:transparent!important;
    border:0!important;
    border-left:1px solid rgba(255,255,255,.17)!important;
    box-shadow:none!important;
  }
  .dashboard-mobile-shell .hero-inline-stat:last-child{border-left:0!important}
  .dashboard-mobile-shell .hero-stat-icon{display:none!important}
  .dashboard-mobile-shell .hero-stat-copy{align-items:center!important;text-align:center!important;width:100%!important}
  .dashboard-mobile-shell .hero-inline-num{font-size:17px!important;line-height:1.15!important}
  .dashboard-mobile-shell .hero-inline-label{
    font-size:10.8px!important;
    line-height:1.35!important;
    white-space:normal!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }

  /* Two-step mobile typography increase for dashboard content */
  .dashboard-section-title h3{font-size:22px!important}
  .dashboard-section-title small{font-size:14px!important}
  .quick-grid .quick-action-title{font-size:14px!important;line-height:1.55!important}
  .dashboard-module-head h3{font-size:19px!important}
  .dashboard-module-body,.dashboard-module-body td{font-size:14px!important}
  .dashboard-welcome-toast .welcome-eyebrow{font-size:11px!important}
  .dashboard-welcome-toast h3{font-size:16px!important}
  .dashboard-welcome-toast p{font-size:12px!important}

  /* Public mobile home typography: +2px while preserving compact cards */
  .portal-kicker{font-size:14px!important}
  .portal-hero-content h1{font-size:25px!important}
  .portal-hero-content p{font-size:14.5px!important}
  .portal-clock-time{font-size:21px!important}
  .portal-clock-date{font-size:14.5px!important}
  .portal-clock-subdate{font-size:12.5px!important}
  .portal-home-options .portal-option strong{font-size:16px!important}
  .portal-home-options .portal-option small{font-size:12px!important}
  .portal-contact-item strong{font-size:12.5px!important}
  .portal-contact-item span:not(.portal-contact-icon){font-size:14px!important}
  .portal-contact-item.wide span:not(.portal-contact-icon){font-size:12.5px!important}
  .portal-home-footer{font-size:12px!important}
}

@media(max-width:420px){
  .dashboard-mobile-shell .hero-inline-stats{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .dashboard-mobile-shell .hero-inline-stat{padding-inline:2px!important}
  .dashboard-mobile-shell .hero-inline-label{font-size:9.8px!important}
}

/* Commit: contact-single-column-mobile
   Keep the public portal contact section single-column on every phone. */
@media (max-width: 900px){
  .portal-home-body .portal-contact-card{
    grid-template-columns:1fr!important;
  }
  .portal-home-body .portal-contact-item,
  .portal-home-body .portal-contact-item.wide{
    grid-column:auto!important;
    width:100%!important;
  }
}

/* vehicle-brand-management-and-excel-import */
.vehicle-catalog-page{display:grid;gap:18px;max-width:1500px;margin:0 auto}
.vehicle-catalog-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 26px;border-radius:22px;background:linear-gradient(135deg,#123d2f,#0f5132);color:#fff;box-shadow:0 14px 36px rgba(15,81,50,.18)}
.vehicle-catalog-kicker{display:inline-flex;padding:5px 11px;border-radius:999px;background:rgba(255,255,255,.13);font-size:12px;font-weight:800}
.vehicle-catalog-hero h2{margin:9px 0 7px;color:#fff;font-size:26px}.vehicle-catalog-hero p{margin:0;color:rgba(255,255,255,.82);line-height:1.9}
.vehicle-catalog-hero-actions{display:flex;gap:9px;flex-wrap:wrap}.vehicle-catalog-hero-actions .btn{background:#fff;color:#123d2f}.vehicle-catalog-hero-actions .primary{background:#d8b35d!important;color:#1d2b23!important}
.vehicle-catalog-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.vehicle-catalog-panel{background:#fff;border:1px solid #dfe6e2;border-radius:20px;padding:20px;box-shadow:0 8px 25px rgba(31,41,55,.055)}
.vehicle-catalog-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}.vehicle-catalog-panel-head h3{margin:0 0 5px;color:#193c31;font-size:19px}.vehicle-catalog-panel-head p{margin:0;color:#718079;font-size:13px;line-height:1.8}
.vehicle-catalog-form{display:grid;grid-template-columns:1fr 1fr;gap:13px}.vehicle-catalog-form label:first-child{grid-column:1/-1}.vehicle-catalog-submit{grid-column:1/-1;min-height:44px;font-weight:800}
.vehicle-import-form{display:grid;gap:13px}.vehicle-file-field input{padding:8px;background:#f8faf9}.vehicle-import-actions{display:flex;gap:8px;flex-wrap:wrap}.vehicle-import-actions>*{flex:1;min-width:130px;text-align:center}
.vehicle-import-note{margin-top:13px;padding:10px 12px;border-radius:12px;background:#f0f8f4;color:#416155;font-size:12px;line-height:1.8}
.vehicle-catalog-list-head{align-items:center}.vehicle-catalog-search{min-width:280px}.vehicle-catalog-search input{width:100%}
.vehicle-brand-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.vehicle-brand-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border:1px solid #e2e9e5;border-radius:16px;background:#fbfdfc;transition:.2s}.vehicle-brand-card:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(31,41,55,.07)}.vehicle-brand-card.is-disabled{opacity:.65;background:#f6f6f6}
.vehicle-brand-card-main{display:flex;align-items:center;gap:10px;min-width:0}.vehicle-brand-card-main>div:last-child{display:grid;gap:6px}.vehicle-brand-card-main strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vehicle-brand-avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#e5f2eb;color:#0f5132;font-weight:900;font-size:18px;flex:0 0 auto}
.vehicle-brand-card-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.vehicle-brand-card-actions form{margin:0}
.vehicle-model-mobile{display:none}.vehicle-model-table{min-width:760px}.vehicle-model-table-wrap{border:1px solid #e5ebe8;border-radius:15px}.vehicle-model-table th{background:#f5f9f7;color:#345148}.vehicle-model-table tr:last-child td{border-bottom:0}
.vehicle-model-card{display:grid;gap:8px;padding:14px;border:1px solid #e1e8e4;border-radius:15px;background:#fbfdfc}.vehicle-model-card.is-disabled{opacity:.65}.vehicle-model-card-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.vehicle-model-brand{color:#0f5132;font-size:12px;font-weight:800}.vehicle-model-card strong{font-size:17px;color:#20362f}.vehicle-model-type{font-size:13px;color:#68776f}.vehicle-model-card form,.vehicle-model-card button{width:100%;margin:0}
@media(max-width:1100px){.vehicle-brand-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
  .vehicle-catalog-page{gap:13px}.vehicle-catalog-hero{display:grid;padding:18px;border-radius:18px}.vehicle-catalog-hero h2{font-size:21px}.vehicle-catalog-hero p{font-size:13px}.vehicle-catalog-hero-actions{display:grid;grid-template-columns:1fr 1fr}.vehicle-catalog-hero-actions .btn{padding:10px 8px;text-align:center;font-size:12px}
  .vehicle-catalog-grid{grid-template-columns:1fr;gap:13px}.vehicle-catalog-panel{padding:15px;border-radius:17px}.vehicle-catalog-form{grid-template-columns:1fr}.vehicle-catalog-form label:first-child,.vehicle-catalog-submit{grid-column:auto}.vehicle-catalog-panel-head{margin-bottom:13px}.vehicle-catalog-list-head{display:grid}.vehicle-catalog-search{min-width:0;width:100%}
  .vehicle-brand-cards{grid-template-columns:1fr}.vehicle-brand-card{align-items:flex-start}.vehicle-brand-card-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.vehicle-brand-card{display:grid}.vehicle-brand-card-actions .btn,.vehicle-brand-card-actions button{width:100%;font-size:12px;padding:9px 7px}
  .vehicle-model-table-wrap{display:none}.vehicle-model-mobile{display:grid;gap:10px}.vehicle-import-actions{display:grid;grid-template-columns:1fr 1fr}.vehicle-import-actions>*{min-width:0}
}

/* vehicle-brand-management: clearer brand/model management + mobile */
.vehicle-catalog-management-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.vehicle-catalog-management-grid .vehicle-excel-panel{grid-column:1/-1}
.vehicle-catalog-section-icon{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#e8f5ef;color:#0f6d4d;font-weight:900;margin-bottom:7px}
.vehicle-brand-create-panel{border-top:4px solid #0f7655}
.vehicle-model-create-panel{border-top:4px solid #2563a6}
.vehicle-brand-create-form{grid-template-columns:minmax(0,1fr) auto}
.vehicle-model-create-form{grid-template-columns:repeat(3,minmax(0,1fr)) auto}
.field-hint{font-size:.78em;color:#64748b;font-weight:600;margin-right:4px}
@media(max-width:760px){
  .vehicle-catalog-management-grid{grid-template-columns:1fr}
  .vehicle-catalog-management-grid .vehicle-excel-panel{grid-column:auto}
  .vehicle-brand-create-form,.vehicle-model-create-form{grid-template-columns:1fr}
  .vehicle-catalog-page .vehicle-catalog-submit{width:100%;min-height:46px}
  .vehicle-catalog-page .vehicle-catalog-panel{padding:16px;border-radius:18px}
  .vehicle-catalog-page .vehicle-catalog-panel-head h3{font-size:18px}
  .vehicle-catalog-page .vehicle-catalog-panel-head p{font-size:14px;line-height:1.8}
}


/* vehicle-form-cleanup-and-excel-fix */
.vehicle-brand-readonly{position:relative}
.vehicle-brand-readonly:after{content:'✓';position:absolute;left:12px;top:50%;transform:translateY(-50%);width:28px;height:28px;border-radius:10px;display:grid;place-items:center;background:#dcfce7;color:#047857;font-weight:900;pointer-events:none}
.vehicle-brand-readonly .vehicle-search[readonly]{background:linear-gradient(180deg,#f8fafc,#f1f5f9);border-color:#dbe4ee;color:#12385e;font-weight:800;cursor:default;padding-left:48px;box-shadow:inset 0 1px 0 rgba(255,255,255,.85)}
.vehicle-brand-readonly .vehicle-search[readonly]:focus{border-color:#dbe4ee;box-shadow:none;outline:0}
.vehicle-brand-display-field .field-hint{color:#0f766e!important;font-weight:700!important}

@media(min-width:1180px){
  .inventory-wizard-shell{width:min(1480px,calc(100% - 52px));padding-top:24px}
  .inventory-wizard-card{border-radius:26px}
  .inventory-wizard-header{padding:24px 30px}
  .inventory-wizard-header h1{font-size:26px}
  .inventory-wizard-car-icon{width:72px;height:72px;font-size:44px;border-radius:21px}
  .inventory-wizard-steps{padding:20px 30px 6px;gap:14px}
  .inventory-wizard-form{padding:14px 30px 28px}
  .inventory-vehicle-details-panel{max-width:1360px;margin-inline:auto}
  .inventory-vehicle-details-panel .inventory-panel-title{margin-bottom:18px;padding:15px 18px;border:1px solid #e1eaf3;border-radius:18px;background:linear-gradient(135deg,#f8fbff,#f2faf7)}
  .inventory-vehicle-details-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 16px;padding:20px;border:1px solid #e2eaf3;border-radius:22px;background:#fbfdff;box-shadow:0 10px 28px rgba(15,47,85,.055)}
  .inventory-vehicle-details-grid label{gap:7px;font-size:14px}
  .inventory-vehicle-details-grid input{height:48px;border-radius:13px;padding:11px 13px}
  .inventory-vehicle-details-grid .smart-vehicle:after,.inventory-vehicle-details-grid .smart-color-picker:after{top:8px}
  .inventory-wizard-actions{margin-top:22px;padding-top:18px}
}
@media(min-width:761px) and (max-width:1179px){
  .inventory-wizard-shell{width:min(1120px,calc(100% - 32px))}
  .inventory-vehicle-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* vehicle-catalog-single-entry-form */
.vehicle-catalog-management-grid{grid-template-columns:minmax(0,1.35fr) minmax(340px,.65fr)}
.vehicle-single-entry-panel{min-width:0}
.vehicle-entry-kind{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:2px 0 18px}
.vehicle-entry-kind-btn{appearance:none;border:1px solid #d9e5df;background:#f8fbf9;border-radius:16px;padding:14px 12px;display:grid;gap:4px;text-align:center;color:#335048;cursor:pointer;transition:.18s ease;min-height:104px}
.vehicle-entry-kind-btn:hover{border-color:#8ab8a4;transform:translateY(-1px)}
.vehicle-entry-kind-btn.is-active{background:linear-gradient(145deg,#eaf7f1,#f8fcfa);border-color:#2d8b66;box-shadow:0 7px 18px rgba(45,139,102,.12);color:#0f5d43}
.vehicle-entry-kind-icon{font-size:24px;line-height:1}.vehicle-entry-kind-btn strong{font-size:15px}.vehicle-entry-kind-btn small{font-size:12px;color:#77867f}
.vehicle-dynamic-entry-form{grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}
.vehicle-dynamic-entry-form label[hidden]{display:none!important}
.vehicle-entry-preview{grid-column:1/-1;display:flex;align-items:center;gap:8px;min-height:42px;padding:10px 13px;border-radius:13px;background:#f3f7f5;border:1px dashed #cbdad3;color:#6d7d76}
.vehicle-entry-preview strong{color:#173e32;overflow-wrap:anywhere}
.vehicle-field-help{display:block;margin-top:6px;color:#77867f}
.vehicle-catalog-management-grid .vehicle-excel-panel{grid-column:auto}

@media (max-width:980px){
  .vehicle-catalog-management-grid{grid-template-columns:1fr}
  .vehicle-catalog-management-grid .vehicle-excel-panel{grid-column:auto}
}
@media (max-width:640px){
  .vehicle-entry-kind{grid-template-columns:1fr;gap:8px}
  .vehicle-entry-kind-btn{grid-template-columns:38px 1fr;grid-template-rows:auto auto;text-align:right;align-items:center;min-height:72px;padding:10px 12px}
  .vehicle-entry-kind-icon{grid-row:1/3;display:grid;place-items:center;font-size:22px}
  .vehicle-entry-kind-btn strong{font-size:15px}.vehicle-entry-kind-btn small{font-size:13px}
  .vehicle-dynamic-entry-form{grid-template-columns:1fr}
  .vehicle-entry-preview{grid-column:auto;align-items:flex-start;flex-direction:column;gap:2px}
}

/* add-check-clearance-date-and-installment-penalty */
.check-status-action-form:has(.check-collection-date-field){display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;padding:8px;border:1px solid var(--border,#dde3ea);border-radius:10px;background:var(--card-bg,#fff)}
.check-collection-date-field{display:flex;flex-direction:column;gap:4px;min-width:145px;font-size:12px;font-weight:700}
.check-collection-date-field input{width:145px;min-height:34px;padding:6px 9px;border:1px solid var(--border,#ccd4df);border-radius:8px;background:var(--input-bg,#fff);color:inherit}
@media(max-width:700px){.check-status-action-form:has(.check-collection-date-field){width:100%;align-items:stretch}.check-collection-date-field,.check-collection-date-field input{width:100%}}

/* Accounting article details modal */
.accounting-docs-layout{grid-template-columns:minmax(0,1fr)}
.accounting-modal-open{overflow:hidden}
.accounting-article-modal{position:fixed;inset:0;z-index:3000;display:flex;align-items:center;justify-content:center;padding:24px;opacity:0;visibility:hidden;transition:opacity .18s ease,visibility .18s ease}
.accounting-article-modal.is-open{opacity:1;visibility:visible}
.accounting-article-modal-backdrop{position:absolute;inset:0;background:rgba(8,24,42,.58);backdrop-filter:blur(3px)}
.accounting-article-modal-dialog{position:relative;z-index:1;width:min(1180px,calc(100vw - 48px));max-height:calc(100vh - 48px);display:flex;flex-direction:column;overflow:hidden;border:1px solid #d9e5f1;border-radius:24px;background:#fff;box-shadow:0 30px 90px rgba(0,24,54,.28);transform:translateY(10px) scale(.99);transition:transform .18s ease}
.accounting-article-modal.is-open .accounting-article-modal-dialog{transform:translateY(0) scale(1)}
.accounting-article-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px 22px;border-bottom:1px solid #e3ebf4;background:linear-gradient(135deg,#fff 0%,#f1f7fd 100%)}
.accounting-article-modal-kicker{display:block;margin-bottom:5px;color:#11704a;font-size:12px;font-weight:900}
.accounting-article-modal-header h3{margin:0;color:#12385f;font-size:22px}
.accounting-article-modal-header p{margin:7px 0 0;color:#708399;font-size:13px}
.accounting-article-modal-close{flex:0 0 40px;width:40px;height:40px;border:1px solid #d7e2ed;border-radius:12px;background:#fff;color:#294d70;font-size:28px;line-height:1;cursor:pointer}
.accounting-article-modal-close:hover{background:#f3f7fb}
.accounting-article-modal-body{min-height:0;overflow:auto;padding:18px 22px}
.article-modal-table-wrap{max-height:none}
.accounting-article-modal-footer{display:flex;justify-content:flex-end;padding:14px 22px;border-top:1px solid #e3ebf4;background:#f8fbfe}
@media(max-width:720px){
  .accounting-article-modal{padding:0;align-items:stretch}
  .accounting-article-modal-dialog{width:100%;max-height:none;height:100%;border:0;border-radius:0}
  .accounting-article-modal-header{padding:15px 14px}
  .accounting-article-modal-header h3{font-size:18px}
  .accounting-article-modal-body{padding:12px;flex:1}
  .accounting-article-modal-footer{padding:10px 12px}
  .accounting-article-modal-footer .btn{width:100%}
  .article-modal-table-wrap{overflow:visible}
}

/* Bale settings - modern responsive layout */
.bale-settings-page{max-width:1320px;margin:0 auto;padding:18px 14px 110px;direction:rtl}
.bale-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;background:linear-gradient(135deg,#fff 0%,#f3f8ff 55%,#e8f2ff 100%);border:1px solid #d8e7f8;border-radius:26px;padding:24px 26px;box-shadow:0 18px 50px rgba(28,70,120,.08);margin-bottom:18px}
.bale-kicker{font-size:.82rem;font-weight:800;color:#5f7796;margin-bottom:10px}
.bale-title-row{display:flex;align-items:center;gap:16px}
.bale-brand-icon{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,#2f8cff,#1763c6);color:#fff;font-size:30px;font-weight:950;box-shadow:0 10px 24px rgba(31,111,214,.28)}
.bale-title-row h1{margin:0 0 5px;color:#153b68;font-size:clamp(1.55rem,2.4vw,2.15rem)}
.bale-title-row p{margin:0;color:#60748c;line-height:1.9;max-width:720px}
.bale-hero-actions{display:flex;gap:10px;flex-wrap:wrap}.bale-soft-btn{background:#fff!important;border:1px solid #d6e4f4!important;color:#24496f!important;border-radius:14px!important;box-shadow:0 6px 18px rgba(30,70,110,.06)}
.bale-settings-form{display:flex;flex-direction:column;gap:16px}
.bale-section{background:#fff;border:1px solid #dce8f5;border-radius:24px;padding:22px;box-shadow:0 12px 36px rgba(24,58,96,.055)}
.bale-section-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;margin-bottom:20px}.bale-section-head.compact{grid-template-columns:auto minmax(0,1fr)}
.bale-section-number{width:40px;height:40px;border-radius:13px;background:#eaf3ff;color:#1768c7;display:grid;place-items:center;font-weight:950;font-size:1.1rem}
.bale-section-head h2{margin:0 0 4px;font-size:1.22rem;color:#173c67}.bale-section-head p{margin:0;color:#71839a;font-size:.92rem;line-height:1.8}
.bale-master-switch{display:flex;align-items:center;gap:11px;padding:10px 13px;border:1px solid #d7e5f5;border-radius:16px;background:#f8fbff;cursor:pointer;min-width:215px}.bale-master-switch input{display:none}.bale-switch-ui{width:48px;height:27px;border-radius:999px;background:#c9d5e4;position:relative;transition:.2s}.bale-switch-ui:after{content:"";position:absolute;width:21px;height:21px;top:3px;right:3px;border-radius:50%;background:#fff;box-shadow:0 2px 7px rgba(0,0,0,.18);transition:.2s}.bale-master-switch input:checked+.bale-switch-ui{background:#2580e8}.bale-master-switch input:checked+.bale-switch-ui:after{transform:translateX(-21px)}.bale-switch-text{display:flex;flex-direction:column}.bale-switch-text b{color:#21466d}.bale-switch-text small{color:#7c8da1;margin-top:2px}
.bale-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.bale-field-wide{grid-column:1/-1}.bale-field{display:flex;flex-direction:column;gap:7px;font-weight:800;color:#264767}.bale-field input,.bale-field select{width:100%;min-height:50px;border:1px solid #cfdded;border-radius:14px;background:#fbfdff;padding:0 14px;font:inherit;color:#173b62;outline:none;transition:.2s}.bale-field input:focus,.bale-field select:focus{border-color:#4593e8;box-shadow:0 0 0 4px rgba(48,137,230,.12);background:#fff}.bale-field small{font-weight:500;color:#7e8fa3;line-height:1.7}
.bale-password-wrap{position:relative}.bale-password-wrap input{padding-left:54px}.bale-eye-btn{position:absolute;left:6px;top:6px;width:39px;height:38px;border:0;border-radius:10px;background:#eaf3fd;cursor:pointer;font-size:1rem}
.bale-test-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;margin-top:18px;padding:15px;border:1px dashed #bcd3ea;border-radius:18px;background:#f7fbff}.bale-test-card.is-success{background:#f4fff9;border-color:#9bd7b8}.bale-test-icon{width:44px;height:44px;border-radius:13px;background:#e5f1ff;display:grid;place-items:center;font-size:1.25rem}.bale-test-copy{display:flex;flex-direction:column;gap:4px}.bale-test-copy b{color:#21476e}.bale-test-copy span,.bale-test-copy small{color:#71869d}.bale-test-result{margin-top:4px;padding-top:6px;border-top:1px solid #dce8f4}.bale-test-button{border-radius:13px!important;background:#fff!important;color:#1768c7!important;border:1px solid #a9caed!important;font-weight:900!important}
.bale-option-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.bale-option-card{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);gap:11px;align-items:center;border:1px solid #d8e5f3;border-radius:18px;padding:16px;background:#fbfdff;cursor:pointer;transition:.2s;min-height:105px}.bale-option-card:hover{transform:translateY(-2px);border-color:#9cc6ef;box-shadow:0 9px 22px rgba(27,83,139,.08)}.bale-option-card input{position:absolute;opacity:0}.bale-option-icon{width:44px;height:44px;border-radius:13px;background:#eaf3ff;display:grid;place-items:center;font-size:1.25rem}.bale-option-card>span:last-child{display:flex;flex-direction:column;gap:5px}.bale-option-card b{color:#25496e}.bale-option-card small{color:#75899f;line-height:1.65}.bale-option-check{position:absolute;left:11px;top:11px;width:23px;height:23px;border-radius:8px;background:#dbe5ef;color:transparent;display:grid;place-items:center;font-weight:950}.bale-option-card input:checked~.bale-option-check{background:#2580e8;color:#fff}.bale-option-card:has(input:checked){border-color:#70ace8;background:#f3f9ff;box-shadow:inset 0 0 0 1px rgba(37,128,232,.08)}
.bale-behavior-box{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(0,1.1fr);gap:14px;margin-top:15px;padding:15px;background:#f7faff;border-radius:18px;border:1px solid #dfebf6}.bale-recommendation{display:flex;align-items:center;gap:11px;background:#fff8e8;border:1px solid #f0dda3;border-radius:14px;padding:13px}.bale-recommendation>span{font-size:1.35rem}.bale-recommendation div{display:flex;flex-direction:column;gap:4px}.bale-recommendation b{color:#745719}.bale-recommendation small{color:#8b7444;line-height:1.7}
.bale-admin-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.8fr);gap:14px}.bale-admin-toggle{min-height:116px}
.bale-save-bar{position:sticky;bottom:12px;z-index:25;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 16px;border:1px solid rgba(194,213,233,.95);border-radius:18px;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);box-shadow:0 16px 44px rgba(25,59,96,.16)}.bale-save-bar>div{display:flex;flex-direction:column}.bale-save-bar b{color:#21476e}.bale-save-bar small{color:#7d8da0;margin-top:3px}.bale-save-button{min-width:210px;border-radius:13px!important;font-weight:950!important}
@media(max-width:900px){.bale-hero{align-items:flex-start;flex-direction:column;padding:18px}.bale-hero-actions{width:100%}.bale-hero-actions .btn{flex:1}.bale-section-head{grid-template-columns:auto minmax(0,1fr)}.bale-master-switch{grid-column:1/-1;width:100%}.bale-field-grid,.bale-option-grid,.bale-behavior-box,.bale-admin-grid{grid-template-columns:1fr}.bale-field-wide{grid-column:auto}.bale-test-card{grid-template-columns:auto minmax(0,1fr)}.bale-test-button{grid-column:1/-1;width:100%}}
@media(max-width:600px){.bale-settings-page{padding:10px 8px 96px}.bale-hero{border-radius:19px;padding:15px}.bale-title-row{align-items:flex-start}.bale-brand-icon{width:48px;height:48px;border-radius:15px;font-size:25px}.bale-title-row h1{font-size:1.45rem}.bale-title-row p{font-size:.87rem;line-height:1.7}.bale-section{padding:14px 12px;border-radius:19px}.bale-section-head{gap:10px;margin-bottom:14px}.bale-section-number{width:35px;height:35px}.bale-section-head h2{font-size:1.05rem}.bale-section-head p{font-size:.82rem}.bale-option-card{min-height:92px;padding:13px}.bale-save-bar{bottom:6px;padding:9px}.bale-save-bar>div{display:none}.bale-save-button{width:100%;min-width:0;min-height:47px}.bale-test-card{padding:12px}.bale-test-copy span{font-size:.83rem}}

/* Fix: linked social network cards must look like the non-link cards */
a.social-network-card,
a.social-network-card:hover,
a.social-network-card:focus,
a.social-network-card:active,
a.social-network-card:visited,
a.social-network-card b,
a.social-network-card small,
a.social-network-card span {
  text-decoration: none !important;
}
a.social-network-card {
  color: inherit !important;
}

/* Phase 396: smart dropdowns stay inside the visible mobile viewport. */
.person-dropdown,.person-id-dropdown,.generic-smart-dropdown,.vehicle-dropdown,
.check-dropdown,.cashbox-id-dropdown,.bank-dropdown,.color-dropdown,
.province-dropdown,.city-dropdown,.location-dropdown{
  max-height:var(--smart-dropdown-max-height,260px);
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.smart-drop-up>.person-dropdown,
.smart-drop-up>.person-id-dropdown,
.smart-drop-up>.generic-smart-dropdown,
.smart-drop-up>.vehicle-dropdown,
.smart-drop-up>.check-dropdown,
.smart-drop-up>.cashbox-id-dropdown,
.smart-drop-up>.bank-dropdown,
.smart-drop-up>.color-dropdown,
.smart-drop-up>.province-dropdown,
.smart-drop-up>.city-dropdown,
.smart-drop-up>.location-dropdown{
  top:auto!important;
  bottom:calc(100% + 7px)!important;
  margin-top:0!important;
  margin-bottom:0!important;
  transform-origin:bottom center;
}
@media(max-width:820px){
  .person-dropdown,.person-id-dropdown,.generic-smart-dropdown,.vehicle-dropdown,
  .check-dropdown,.cashbox-id-dropdown,.bank-dropdown,.color-dropdown,
  .province-dropdown,.city-dropdown,.location-dropdown{
    z-index:10050!important;
    min-height:52px;
  }
}

/* Phase 397 hotfix: native vertical scrolling inside all smart dropdowns. */
.person-dropdown,.person-id-dropdown,.generic-smart-dropdown,.vehicle-dropdown,
.check-dropdown,.cashbox-id-dropdown,.bank-dropdown,.color-dropdown,
.province-dropdown,.city-dropdown,.location-dropdown,.category-filter-dropdown{
  touch-action:pan-y!important;
  overscroll-behavior-y:contain!important;
  -webkit-overflow-scrolling:touch!important;
}

/* v416: فرم مدرن دریافت و پرداخت + نمایش فقط فیلدهای مرتبط با نوع حواله */
.money-doc-form [hidden]{display:none!important}
.money-doc-form{--money-accent:#0d6b4d;--money-accent-dark:#07513a;--money-ink:#15324d;--money-muted:#6b7d8f}
.money-doc-form .form-topbar{border:1px solid #d7e2ec;background:linear-gradient(135deg,#ffffff 0%,#f4f8fb 100%);border-radius:22px;padding:22px 24px;box-shadow:0 10px 30px rgba(30,63,91,.07)}
.money-doc-form .form-kicker{color:var(--money-accent);font-weight:900;font-size:13px}
.money-doc-form .form-topbar h2{color:var(--money-ink);margin:7px 0 5px}
.money-doc-form .form-topbar p{color:var(--money-muted);margin:0}
.money-doc-form .win-fieldset{border:1px solid #d7e1eb;border-radius:18px;padding:20px;background:#fff;box-shadow:0 7px 24px rgba(30,63,91,.045)}
.money-doc-form .win-fieldset legend{color:var(--money-ink);font-size:16px;padding:0 10px}
.money-doc-form .win-grid-2{gap:16px 22px}
.money-doc-form label{color:#304b63;font-weight:700;display:flex;flex-direction:column;gap:8px}
.money-doc-form input,.money-doc-form select,.money-doc-form textarea{min-height:48px;border:1px solid #cbd8e4;border-radius:13px;background:#fff;padding:10px 13px;transition:border-color .18s,box-shadow .18s,background .18s}
.money-doc-form input:focus,.money-doc-form select:focus,.money-doc-form textarea:focus{border-color:var(--money-accent);box-shadow:0 0 0 3px rgba(13,107,77,.11);outline:0}
.money-doc-form .readonly-autofill{background:#f0f5f8!important;border-style:dashed!important;color:#28465f;font-weight:700}
.money-doc-form .pay-method-panel{border-radius:15px;background:#f8fbfd;padding:15px;border:1px solid #e1eaf1}
.money-doc-form .method-transfer{background:linear-gradient(180deg,#f9fcfb,#f5f9fb)}
.money-doc-form .sticky-actions{border:1px solid #dbe5ed;background:rgba(255,255,255,.94);backdrop-filter:blur(10px);border-radius:18px;padding:11px;box-shadow:0 12px 30px rgba(22,52,76,.09)}
.money-doc-form .sticky-actions .btn{min-height:46px;border-radius:12px;font-weight:800}
.money-doc-form .sticky-actions .btn.primary{background:linear-gradient(135deg,var(--money-accent),var(--money-accent-dark))}

@media(max-width:760px){
  .money-doc-form{width:auto!important;max-width:none!important;margin:0 8px 88px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
  .money-doc-form .form-topbar{padding:18px 16px;border-radius:20px;text-align:center;display:flex;flex-direction:column;gap:13px}
  .money-doc-form .form-topbar>div:first-child{width:100%}
  .money-doc-form .form-topbar h2{font-size:24px;line-height:1.45;margin-top:8px}
  .money-doc-form .form-topbar p{font-size:12px;line-height:1.8}
  .money-doc-form .quick-actions,.money-doc-form .quick-actions .btn{width:100%}
  .money-doc-form .quick-actions .btn{display:flex;justify-content:center;align-items:center;min-height:48px;border-radius:14px}
  .money-doc-form .windows-like-form{gap:14px}
  .money-doc-form .win-fieldset{padding:17px 14px 15px;border-radius:19px}
  .money-doc-form .win-fieldset legend{font-size:18px;max-width:90%;white-space:normal;line-height:1.4}
  .money-doc-form .win-grid-2{grid-template-columns:1fr!important;gap:15px}
  .money-doc-form label{font-size:13px;gap:7px}
  .money-doc-form input,.money-doc-form select,.money-doc-form textarea{width:100%;min-width:0;min-height:54px;border-radius:15px;font-size:16px;padding:12px 14px}
  .money-doc-form .person-id-search{min-height:58px}
  .money-doc-form .pay-method-panel{padding:13px;border-radius:16px}
  .money-doc-form .method-cash b{display:block;margin-bottom:5px}
  .money-doc-form .sticky-actions{position:sticky;bottom:7px;z-index:35;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,.9fr);gap:8px;margin-top:4px;padding:9px;border-radius:18px}
  .money-doc-form .sticky-actions .btn{width:100%;min-width:0;min-height:52px;margin:0;display:flex;justify-content:center;align-items:center}
  .money-doc-form .smart-bank{position:relative}
  .money-doc-form .bank-dropdown,.money-doc-form .person-id-dropdown{max-height:42vh;border-radius:15px}
}

@media(max-width:390px){
  .money-doc-form{margin-inline:4px!important}
  .money-doc-form .form-topbar h2{font-size:21px}
  .money-doc-form .win-fieldset{padding-inline:11px}
  .money-doc-form .sticky-actions{grid-template-columns:1fr}
}

/* ============================================================
   PORTAL HOME V2 — PROFESSIONAL LANDING REDESIGN (424)
   ============================================================ */
body.portal-home-v2{margin:0;min-height:100vh;background:
  radial-gradient(circle at 10% 0%,rgba(56,189,248,.11),transparent 28%),
  radial-gradient(circle at 94% 18%,rgba(245,158,11,.09),transparent 30%),
  linear-gradient(180deg,#f7faff 0%,#edf3fb 100%);color:#10213f;overflow-x:hidden}
body.portal-home-v2:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.28;background-image:linear-gradient(rgba(15,39,70,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(15,39,70,.025) 1px,transparent 1px);background-size:38px 38px;mask-image:linear-gradient(to bottom,#000,transparent 70%)}
.portal-home-v2 .portal-home-shell{position:relative;z-index:1;width:min(1560px,calc(100% - 48px));padding:24px 0 28px;margin:0 auto}
.portal-pro-hero{position:relative;min-height:260px;display:grid;grid-template-columns:minmax(250px,.72fr) minmax(420px,1.45fr) minmax(235px,.65fr);align-items:center;gap:34px;padding:34px 42px;overflow:hidden;border:1px solid rgba(255,255,255,.75);border-radius:34px;background:linear-gradient(118deg,#071b36 0%,#0c2f55 58%,#104f49 100%);box-shadow:0 28px 70px rgba(8,28,56,.23)}
.portal-pro-hero:before{content:"";position:absolute;inset:0;background:linear-gradient(120deg,rgba(255,255,255,.03),transparent 42%),repeating-linear-gradient(125deg,transparent 0 28px,rgba(255,255,255,.025) 29px 30px);pointer-events:none}
.portal-pro-hero:after{content:"";position:absolute;width:520px;height:520px;border:1px solid rgba(255,255,255,.08);border-radius:50%;left:35%;top:-360px;box-shadow:0 0 0 70px rgba(255,255,255,.025),0 0 0 150px rgba(255,255,255,.018)}
.portal-pro-glow{position:absolute;border-radius:50%;filter:blur(2px);pointer-events:none}.portal-pro-glow-one{width:300px;height:300px;right:-130px;top:-150px;background:radial-gradient(circle,rgba(34,197,94,.22),transparent 70%)}.portal-pro-glow-two{width:260px;height:260px;left:20%;bottom:-190px;background:radial-gradient(circle,rgba(245,158,11,.17),transparent 70%)}
.portal-pro-brand,.portal-pro-copy,.portal-pro-clock{position:relative;z-index:2}
.portal-pro-brand{display:flex;align-items:center;gap:18px;min-width:0}
.portal-pro-logo-frame{display:grid;place-items:center;flex:0 0 148px;width:148px;height:174px;padding:12px;border:1px solid rgba(255,255,255,.16);border-radius:28px;background:linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.055));box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 18px 36px rgba(0,0,0,.18);backdrop-filter:blur(12px)}
.portal-pro-logo{display:block;width:100%;height:100%;object-fit:contain!important;object-position:center!important;border-radius:18px;filter:drop-shadow(0 12px 18px rgba(0,0,0,.28))}
.portal-pro-brand-caption{display:flex;flex-direction:column;gap:5px;color:#fff}.portal-pro-brand-caption span{font-size:11px;color:#b9cbe2;font-weight:700}.portal-pro-brand-caption strong{font-size:18px;line-height:1.55;font-weight:900}
.portal-pro-copy{padding-right:8px}.portal-pro-eyebrow{display:inline-flex;align-items:center;gap:8px;margin-bottom:12px;color:#83e0b8;font-size:13px;font-weight:900}.portal-pro-eyebrow:before{content:"";width:28px;height:2px;border-radius:8px;background:#37d39a;box-shadow:0 0 15px rgba(55,211,154,.7)}
.portal-pro-copy h1{margin:0;color:#fff;font-size:clamp(36px,3.2vw,58px);font-weight:950;line-height:1.25;letter-spacing:-1.5px}.portal-pro-copy p{max-width:770px;margin:14px 0 0;color:#c8d7e8;font-size:15px;line-height:2}
.portal-pro-trust-row{display:flex;flex-wrap:wrap;gap:20px;margin-top:19px;color:#d8e6f2;font-size:12px;font-weight:800}.portal-pro-trust-row span{display:inline-flex;align-items:center;gap:7px}.portal-pro-trust-row i{display:inline-block;width:7px;height:7px;border:2px solid #49d6a3;border-radius:50%;box-shadow:0 0 0 4px rgba(73,214,163,.09)}
.portal-pro-clock{justify-self:end;min-width:235px;padding:20px 22px;border:1px solid rgba(255,255,255,.13);border-radius:24px;background:rgba(5,22,45,.38);box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 16px 34px rgba(0,0,0,.17);backdrop-filter:blur(12px);display:flex;align-items:center;gap:15px}
.portal-pro-clock-icon{display:grid;place-items:center;flex:0 0 50px;width:50px;height:50px;border-radius:16px;background:linear-gradient(145deg,rgba(255,255,255,.17),rgba(255,255,255,.07));color:#f9c45f;font-size:29px}.portal-pro-clock .portal-clock-time{color:#fff;font-size:23px;font-weight:950;direction:ltr;text-align:right}.portal-pro-clock .portal-clock-date{margin-top:3px;color:#d5e2ef;font-size:12.5px;font-weight:800}.portal-pro-clock .portal-clock-subdate{margin-top:3px;color:#8fa8c2;font-size:11px}
.portal-pro-messages{margin:16px 0 0}.portal-pro-messages .flash{border-radius:18px!important;padding:14px 18px!important;box-shadow:0 12px 30px rgba(15,39,70,.06)}
.portal-pro-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:24px}
.portal-pro-action{--accent:#2563eb;--accent-soft:rgba(37,99,235,.12);position:relative;min-height:305px;display:flex;flex-direction:column;padding:30px;text-decoration:none;color:#10213f;overflow:hidden;border:1px solid rgba(15,39,70,.075);border-radius:28px;background:linear-gradient(160deg,#fff 0%,#f9fbff 100%);box-shadow:0 16px 45px rgba(15,39,70,.09);transition:transform .28s ease,box-shadow .28s ease,border-color .28s ease}
.portal-pro-action:before{content:"";position:absolute;width:280px;height:280px;border-radius:50%;left:-120px;top:-150px;background:radial-gradient(circle,var(--accent-soft),transparent 68%);transition:transform .35s ease}.portal-pro-action:after{content:"";position:absolute;inset:auto 30px 0 30px;height:3px;border-radius:99px;background:linear-gradient(90deg,transparent,var(--accent),transparent);opacity:.45}
.portal-pro-action-user{--accent:#7c3aed;--accent-soft:rgba(124,58,237,.16)}.portal-pro-action-customer{--accent:#d79207;--accent-soft:rgba(245,158,11,.17)}.portal-pro-action-inventory{--accent:#1476e8;--accent-soft:rgba(37,99,235,.16)}
.portal-pro-action:hover{transform:translateY(-7px);border-color:color-mix(in srgb,var(--accent) 30%,transparent);box-shadow:0 26px 60px rgba(15,39,70,.16)}.portal-pro-action:hover:before{transform:scale(1.18) translate(12px,12px)}
.portal-pro-action-number{position:absolute;left:25px;top:23px;color:#dce4ef;font-size:35px;font-weight:950;letter-spacing:-2px}.portal-pro-action-icon{position:relative;z-index:1;display:grid;place-items:center;width:76px;height:76px;border-radius:23px;background:linear-gradient(145deg,#fff,var(--accent-soft));border:1px solid rgba(255,255,255,.9);box-shadow:0 13px 28px rgba(15,39,70,.12);font-size:35px}.portal-pro-action-copy{position:relative;z-index:1;margin-top:26px}.portal-pro-action-label{display:block;margin-bottom:8px;color:var(--accent);font-size:11px;font-weight:950}.portal-pro-action-copy strong{display:block;font-size:25px;font-weight:950;line-height:1.4}.portal-pro-action-copy small{display:block;margin-top:10px;color:#64748b;font-size:13px;line-height:1.85}.portal-pro-action-link{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;padding-top:22px;color:var(--accent);font-size:13px;font-weight:950}.portal-pro-action-link b{display:grid;place-items:center;width:34px;height:34px;border-radius:12px;background:var(--accent-soft);font-size:18px;transition:transform .25s ease}.portal-pro-action:hover .portal-pro-action-link b{transform:translateX(-5px)}
.portal-pro-contact{margin-top:24px;padding:26px;border:1px solid rgba(15,39,70,.07);border-radius:30px;background:rgba(255,255,255,.84);box-shadow:0 18px 48px rgba(15,39,70,.08);backdrop-filter:blur(14px)}
.portal-pro-contact-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:0 4px 20px;border-bottom:1px solid #e8eef6}.portal-pro-contact-head span{color:#2563eb;font-size:11px;font-weight:950}.portal-pro-contact-head h2{margin:5px 0 0;font-size:23px;font-weight:950}.portal-pro-contact-head p{max-width:560px;margin:0;color:#6b7f98;font-size:12px;line-height:1.9}
.portal-pro-contact-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}.portal-pro-contact-item{display:flex;align-items:center;gap:13px;min-height:78px;padding:13px 15px;text-align:right;text-decoration:none;color:#10213f;border:1px solid #e7edf5;border-radius:20px;background:#fbfdff;font-family:inherit;cursor:pointer;transition:.22s ease}.portal-pro-contact-item:hover{transform:translateY(-3px);border-color:#cbdcf0;background:#fff;box-shadow:0 14px 30px rgba(15,39,70,.09)}.portal-pro-contact-item>div{min-width:0;flex:1}.portal-pro-contact-item small{display:block;margin-bottom:4px;color:#7890aa;font-size:10.5px;font-weight:800}.portal-pro-contact-item strong{display:block;overflow:hidden;color:#17345a;font-size:13.5px;font-weight:950;line-height:1.65;text-overflow:ellipsis}.portal-pro-contact-item>b{color:#9db0c5;font-size:18px}.portal-pro-contact-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:15px;background:linear-gradient(145deg,#edf4ff,#fff);color:#1e63bb;border:1px solid #e2ebf7;font-size:20px;font-weight:900}.portal-pro-contact-address{grid-column:span 2}.portal-pro-contact-address strong{white-space:normal}.portal-pro-contact-item.is-disabled{opacity:.58;cursor:not-allowed}.portal-pro-contact-item.is-disabled:hover{transform:none;box-shadow:none}.portal-pro-social-trigger{width:100%;border:1px solid #e7edf5}
.portal-pro-footer{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:18px;margin-top:20px;padding:15px 20px;color:#9fb2c8;border-radius:20px;background:#081d38;box-shadow:0 18px 38px rgba(8,29,56,.16);font-size:11.5px}.portal-pro-footer>div{display:flex;align-items:center;gap:9px;color:#fff}.portal-pro-footer-mark{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:linear-gradient(145deg,#dca638,#f5c965);color:#081d38;font-weight:950}.portal-pro-footer p{margin:0;text-align:center}.portal-pro-footer>span{text-align:left}
.portal-pro-social-backdrop{background:rgba(3,16,32,.64)!important;backdrop-filter:blur(6px);transition:.22s ease!important}.portal-modal-open{overflow:hidden}.portal-pro-social-sheet{width:min(880px,calc(100vw - 36px))!important;padding:0!important;overflow:hidden;border:1px solid rgba(255,255,255,.8)!important;border-radius:30px!important;background:#f8fbff!important;box-shadow:0 38px 110px rgba(2,15,31,.42)!important;transition:.22s cubic-bezier(.2,.8,.2,1)!important}
.portal-pro-social-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:24px 26px;border-bottom:1px solid #e5edf6;background:linear-gradient(135deg,#fff,#f2f7fd)}.portal-pro-social-title{display:flex;align-items:flex-start;gap:15px}.portal-pro-social-title-icon{display:grid;place-items:center;flex:0 0 50px;width:50px;height:50px;border-radius:17px;color:#fff;background:linear-gradient(145deg,#0f3a69,#0d6e68);font-size:25px;box-shadow:0 12px 25px rgba(15,58,105,.2)}.portal-pro-social-title>div>span{color:#1b76c9;font-size:10px;font-weight:950}.portal-pro-social-title h3{margin:3px 0 5px;color:#102b4e;font-size:24px;font-weight:950}.portal-pro-social-title p{margin:0;color:#6f8299;font-size:12px;line-height:1.75}.portal-pro-social-close{flex:0 0 42px;width:42px;height:42px;border-radius:14px!important;background:#eaf1f8!important;transition:.2s ease}.portal-pro-social-close:hover{transform:rotate(90deg);background:#dce8f4!important}
.portal-pro-social-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;gap:14px!important;padding:22px!important}.portal-pro-social-link{position:relative;min-height:138px!important;display:grid!important;grid-template-columns:62px 1fr auto!important;align-items:center!important;justify-items:stretch!important;gap:14px!important;padding:18px!important;text-align:right!important;border:1px solid #e1eaf4!important;border-radius:22px!important;background:linear-gradient(145deg,#fff,#f5f9fe)!important;box-shadow:none!important;overflow:hidden}.portal-pro-social-link:before{content:"";position:absolute;width:120px;height:120px;left:-55px;bottom:-70px;border-radius:50%;background:rgba(37,99,235,.07)}.portal-pro-social-link:hover{transform:translateY(-4px)!important;border-color:#c7daed!important;box-shadow:0 18px 34px rgba(15,39,70,.11)!important}.portal-pro-social-link .portal-social-logo-wrap{width:60px!important;height:60px!important;border-radius:19px!important;box-shadow:0 10px 23px rgba(15,39,70,.08)!important}.portal-pro-social-link .portal-social-logo{width:37px!important;height:37px!important}.portal-pro-social-link>div{min-width:0}.portal-pro-social-link strong{display:block!important;color:#102b4e;font-size:16px!important}.portal-pro-social-link small{display:block!important;margin-top:5px;color:#72869d!important;font-size:11.5px!important;line-height:1.65}.portal-pro-social-status{position:absolute;top:12px;left:12px;width:auto!important;height:auto!important;padding:4px 8px;border-radius:999px!important;box-shadow:none!important;font-size:9px!important;font-weight:950}.portal-pro-social-status.online{color:#078153;background:#e3f8ef!important}.portal-pro-social-status.offline{color:#9a6500;background:#fff3d6!important}.portal-pro-social-status i{display:inline-block;width:6px;height:6px;margin-left:4px;border-radius:50%;background:#14b878}.portal-pro-social-arrow{position:relative;z-index:1;color:#9eb0c3;font-size:19px}.portal-pro-social-link.disabled{grid-template-columns:62px 1fr!important;opacity:.68!important;filter:none!important}
@media (max-width:1180px){.portal-pro-hero{grid-template-columns:220px 1fr;gap:25px}.portal-pro-clock{grid-column:1/-1;justify-self:stretch;display:grid;grid-template-columns:50px 1fr;min-width:0}.portal-pro-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.portal-pro-action{padding:24px}.portal-pro-contact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-pro-contact-address{grid-column:span 2}}
@media (max-width:860px){.portal-home-v2 .portal-home-shell{width:min(94vw,720px);padding-top:14px}.portal-pro-hero{grid-template-columns:1fr;min-height:0;padding:25px}.portal-pro-brand{order:1}.portal-pro-copy{order:2;padding:0}.portal-pro-clock{order:3;grid-column:auto}.portal-pro-brand-caption{display:none}.portal-pro-logo-frame{flex-basis:112px;width:112px;height:126px}.portal-pro-copy h1{font-size:36px}.portal-pro-actions{grid-template-columns:1fr}.portal-pro-action{min-height:230px}.portal-pro-contact-head{align-items:flex-start;flex-direction:column}.portal-pro-contact-grid{grid-template-columns:1fr 1fr}.portal-pro-footer{grid-template-columns:1fr;text-align:center}.portal-pro-footer>div{justify-content:center}.portal-pro-footer>span{text-align:center}}
@media (max-width:620px){body.portal-home-v2{background:#eef4fb}.portal-home-v2 .portal-home-shell{width:100%;padding:0 12px 18px}.portal-pro-hero{margin-top:10px;padding:20px 17px;border-radius:25px;gap:18px}.portal-pro-brand{justify-content:center}.portal-pro-logo-frame{width:128px;height:142px;flex-basis:128px;border-radius:24px}.portal-pro-copy{text-align:center}.portal-pro-eyebrow{justify-content:center;font-size:11px}.portal-pro-copy h1{font-size:29px;letter-spacing:-.5px}.portal-pro-copy p{font-size:12px;line-height:1.9}.portal-pro-trust-row{justify-content:center;gap:12px;font-size:10px}.portal-pro-clock{padding:14px 16px;border-radius:19px}.portal-pro-clock-icon{width:42px;height:42px;flex-basis:42px}.portal-pro-clock .portal-clock-time{font-size:20px}.portal-pro-clock .portal-clock-date{font-size:11px}.portal-pro-actions{gap:12px;margin-top:13px}.portal-pro-action{min-height:0;padding:18px 18px 16px;border-radius:22px;display:grid;grid-template-columns:56px 1fr auto;grid-template-rows:auto auto;align-items:center;column-gap:13px}.portal-pro-action-number{display:none}.portal-pro-action-icon{grid-row:1/3;width:54px;height:54px;border-radius:17px;font-size:26px}.portal-pro-action-copy{margin:0}.portal-pro-action-label{font-size:9px;margin-bottom:3px}.portal-pro-action-copy strong{font-size:17px}.portal-pro-action-copy small{font-size:10.5px;line-height:1.55;margin-top:3px}.portal-pro-action-link{grid-column:3;grid-row:1/3;margin:0;padding:0;font-size:0}.portal-pro-action-link b{width:34px;height:34px}.portal-pro-contact{margin-top:13px;padding:16px 12px;border-radius:24px}.portal-pro-contact-head{gap:8px;padding:0 4px 13px}.portal-pro-contact-head h2{font-size:18px}.portal-pro-contact-head p{font-size:10.5px}.portal-pro-contact-grid{grid-template-columns:1fr;gap:8px;margin-top:12px}.portal-pro-contact-address{grid-column:auto}.portal-pro-contact-item{min-height:66px;padding:10px 11px;border-radius:17px}.portal-pro-contact-icon{width:40px;height:40px;flex-basis:40px;border-radius:13px}.portal-pro-contact-item strong{font-size:12.5px}.portal-pro-footer{margin-top:12px;padding:13px;border-radius:17px;font-size:10px}.portal-pro-footer p{display:none}.portal-pro-social-sheet{left:0!important;right:0!important;bottom:0!important;top:auto!important;width:100%!important;max-height:88vh!important;border-radius:28px 28px 0 0!important;transform:translateY(105%)!important}.portal-pro-social-sheet.open{transform:translateY(0)!important}.portal-pro-social-head{padding:17px 15px}.portal-pro-social-title-icon{width:42px;height:42px;flex-basis:42px}.portal-pro-social-title h3{font-size:18px}.portal-pro-social-title p{font-size:10.5px}.portal-pro-social-grid{grid-template-columns:1fr!important;padding:13px!important;gap:9px!important}.portal-pro-social-link{min-height:100px!important;grid-template-columns:50px 1fr auto!important;padding:13px!important}.portal-pro-social-link .portal-social-logo-wrap{width:48px!important;height:48px!important;border-radius:16px!important}.portal-pro-social-link .portal-social-logo{width:30px!important;height:30px!important}.portal-pro-social-link strong{font-size:14px!important}.portal-pro-social-link small{font-size:10.5px!important}}
@media (prefers-reduced-motion:reduce){.portal-pro-action,.portal-pro-action:before,.portal-pro-action-link b,.portal-pro-contact-item,.portal-pro-social-link,.portal-pro-social-close,.portal-pro-social-sheet,.portal-pro-social-backdrop{transition:none!important}}

/* Commit: portal-hero-business-name-emphasis-425
   Keep the dealership name as the unmistakable primary hero title. */
body.portal-home-v2 .portal-pro-hero .portal-pro-copy h1#portalHomeTitle{
  display:block!important;
  margin:2px 0 0!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  opacity:1!important;
  visibility:visible!important;
  font-family:inherit!important;
  font-size:clamp(52px,4.65vw,78px)!important;
  font-weight:950!important;
  line-height:1.18!important;
  letter-spacing:-2.2px!important;
  text-shadow:0 5px 24px rgba(0,0,0,.28),0 1px 0 rgba(255,255,255,.12)!important;
  filter:none!important;
}

@media (max-width:1180px){
  body.portal-home-v2 .portal-pro-hero .portal-pro-copy h1#portalHomeTitle{
    font-size:clamp(44px,5.2vw,66px)!important;
  }
}

@media (max-width:860px){
  body.portal-home-v2 .portal-pro-hero .portal-pro-copy h1#portalHomeTitle{
    font-size:42px!important;
    line-height:1.25!important;
    letter-spacing:-1.2px!important;
  }
}

@media (max-width:620px){
  body.portal-home-v2 .portal-pro-hero .portal-pro-copy h1#portalHomeTitle{
    font-size:34px!important;
    line-height:1.32!important;
    letter-spacing:-.7px!important;
  }
}


/* Commit: simplify-portal-hero-branding-426
   Keep only the full logo, the service eyebrow and the prominent business name. */
body.portal-home-v2 .portal-pro-hero{
  grid-template-columns:minmax(170px,.42fr) minmax(440px,1.55fr) minmax(235px,.65fr);
}
body.portal-home-v2 .portal-pro-brand{
  justify-content:center;
}
body.portal-home-v2 .portal-pro-brand-caption,
body.portal-home-v2 .portal-pro-trust-row{
  display:none!important;
}
body.portal-home-v2 .portal-pro-copy{
  padding-right:0;
}
@media (max-width:1180px){
  body.portal-home-v2 .portal-pro-hero{
    grid-template-columns:180px minmax(0,1fr);
  }
}
@media (max-width:860px){
  body.portal-home-v2 .portal-pro-hero{
    grid-template-columns:1fr;
  }
}


/* compact portal cards
   Three active portal routes must always consume the full available row width. */
.portal-pro-actions{
display:grid;
grid-template-columns:repeat(3,minmax(0,1fr));
gap:20px;
width:100%;
}
.portal-pro-action-rubika{--accent:#7d2cb4;--accent-soft:rgba(125,44,180,.16)}
.portal-pro-action{
min-height:180px!important;
padding:22px!important;
display:grid!important;
grid-template-columns:88px 1fr!important;
grid-template-areas:
"icon copy"
"num copy"
"link link";
align-items:start;
}
.portal-pro-action-icon{grid-area:icon;justify-self:center;align-self:center;position:static!important;margin:0!important}
.portal-pro-action-copy{grid-area:copy;align-self:center}
.portal-pro-action-number{grid-area:num;align-self:end;opacity:.18}
.portal-pro-action-link{grid-area:link;margin-top:16px}
.portal-pro-action-copy strong{font-size:2rem}
.portal-pro-action-copy small{display:block;margin-top:8px}
@media(max-width:1180px) and (min-width:621px){
.portal-pro-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
.portal-pro-action{grid-template-columns:72px 1fr;min-height:160px!important}
.portal-pro-action-copy strong{font-size:1.5rem}
}

/* Commit: mobile-app-portal-experience-428
   Dedicated mobile application layout for the public portal. */
.portal-mobile-appbar,.portal-mobile-bottom-nav{display:none}

@media (max-width:620px){
  html{scroll-behavior:smooth}
  body.portal-home-v2{
    background:linear-gradient(180deg,#edf4fb 0,#f8fbff 45%,#eef5fb 100%)!important;
    padding-bottom:82px;
    -webkit-tap-highlight-color:transparent;
    overscroll-behavior-y:contain;
  }
  body.portal-home-v2.portal-modal-open{overflow:hidden}
  .portal-home-v2 .portal-home-shell{
    width:100%!important;
    max-width:none!important;
    padding:0 12px 24px!important;
  }

  .portal-mobile-appbar{
    position:sticky;top:0;z-index:80;
    display:flex;align-items:center;justify-content:space-between;
    height:62px;margin:0 -12px 10px;padding:8px 14px;
    background:rgba(247,251,255,.92);
    border-bottom:1px solid rgba(15,39,70,.08);
    backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  }
  .portal-mobile-appbar-brand{display:flex;align-items:center;gap:10px;min-width:0}
  .portal-mobile-appbar-brand img{width:42px;height:42px;object-fit:contain;border-radius:13px;background:#10243e;padding:3px}
  .portal-mobile-appbar-brand div{display:flex;flex-direction:column;min-width:0}
  .portal-mobile-appbar-brand strong{font-size:14px;color:#102b4e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .portal-mobile-appbar-brand small{font-size:9.5px;color:#73879d;margin-top:2px}
  .portal-mobile-appbar-action{position:relative;overflow:hidden;display:grid;place-items:center;width:42px;height:42px;border-radius:14px;text-decoration:none;background:#e7f1fb;color:#176db2;font-size:19px}

  body.portal-home-v2 .portal-pro-hero{
    display:grid!important;grid-template-columns:86px 1fr!important;
    grid-template-areas:"brand copy" "clock clock"!important;
    align-items:center!important;gap:14px!important;
    min-height:0!important;margin:0!important;padding:18px!important;
    border-radius:28px!important;
    box-shadow:0 18px 40px rgba(8,34,64,.16)!important;
    overflow:hidden;
  }
  .portal-pro-brand{grid-area:brand!important;order:initial!important;justify-content:flex-start!important}
  .portal-pro-logo-frame{
    width:84px!important;height:96px!important;flex-basis:84px!important;
    padding:7px!important;border-radius:22px!important;
  }
  .portal-pro-logo{width:100%!important;height:100%!important;object-fit:contain!important}
  .portal-pro-copy{grid-area:copy!important;order:initial!important;text-align:right!important;padding:0!important;min-width:0}
  .portal-pro-eyebrow{justify-content:flex-start!important;font-size:9.5px!important;margin-bottom:5px!important;white-space:nowrap}
  body.portal-home-v2 .portal-pro-hero .portal-pro-copy h1#portalHomeTitle{
    font-size:26px!important;line-height:1.25!important;letter-spacing:-.5px!important;margin:0!important;
  }
  .portal-pro-copy p{font-size:10.5px!important;line-height:1.75!important;margin-top:7px!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .portal-pro-clock{
    grid-area:clock!important;order:initial!important;display:grid!important;
    grid-template-columns:42px 1fr!important;align-items:center!important;
    min-width:0!important;padding:11px 13px!important;border-radius:18px!important;margin-top:2px!important;
  }
  .portal-pro-clock-icon{width:38px!important;height:38px!important;flex-basis:38px!important;border-radius:13px!important;font-size:18px!important}
  .portal-pro-clock .portal-clock-time{font-size:18px!important;line-height:1.2!important}
  .portal-pro-clock .portal-clock-date{font-size:10px!important;margin-top:3px!important}
  .portal-pro-clock .portal-clock-subdate{font-size:9px!important;margin-top:2px!important}

  .portal-pro-actions{
    display:grid!important;grid-template-columns:1fr!important;gap:10px!important;margin-top:12px!important;
  }
  .portal-pro-action{
    position:relative!important;overflow:hidden!important;
    min-height:92px!important;height:auto!important;padding:12px 13px!important;
    display:grid!important;grid-template-columns:54px minmax(0,1fr) 34px!important;
    grid-template-rows:1fr!important;grid-template-areas:"icon copy link"!important;
    align-items:center!important;column-gap:11px!important;
    border-radius:21px!important;
    box-shadow:0 10px 24px rgba(15,39,70,.07)!important;
    transform:none!important;
  }
  .portal-pro-action:active{transform:scale(.985)!important}
  .portal-pro-action-number{display:none!important}
  .portal-pro-action-icon{
    grid-area:icon!important;width:52px!important;height:52px!important;
    margin:0!important;position:static!important;border-radius:16px!important;font-size:25px!important;
    justify-self:start!important;align-self:center!important;
  }
  .portal-pro-action-copy{grid-area:copy!important;align-self:center!important;margin:0!important;min-width:0!important;text-align:right!important}
  .portal-pro-action-label{font-size:8.5px!important;margin:0 0 2px!important}
  .portal-pro-action-copy strong{display:block!important;font-size:15.5px!important;line-height:1.35!important}
  .portal-pro-action-copy small{display:block!important;font-size:9.5px!important;line-height:1.45!important;margin-top:3px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .portal-pro-action-link{grid-area:link!important;margin:0!important;padding:0!important;font-size:0!important;justify-self:end!important}
  .portal-pro-action-link b{width:32px!important;height:32px!important;border-radius:11px!important;font-size:16px!important}

  .portal-pro-contact{
    margin-top:12px!important;padding:14px 11px 12px!important;border-radius:24px!important;
    box-shadow:0 12px 30px rgba(15,39,70,.07)!important;
  }
  .portal-pro-contact-head{padding:0 4px 11px!important;gap:5px!important}
  .portal-pro-contact-head span{font-size:9.5px!important}
  .portal-pro-contact-head h2{font-size:17px!important;margin-top:3px!important}
  .portal-pro-contact-head p{font-size:9.5px!important;line-height:1.65!important;margin:0!important}
  .portal-pro-contact-grid{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;margin-top:10px!important}
  .portal-pro-contact-item{
    position:relative;overflow:hidden;
    display:grid!important;grid-template-columns:40px minmax(0,1fr) 22px!important;align-items:center!important;
    gap:9px!important;min-height:58px!important;padding:8px 10px!important;border-radius:16px!important;
  }
  .portal-pro-contact-item:active{transform:scale(.99)!important}
  .portal-pro-contact-icon{width:38px!important;height:38px!important;flex-basis:38px!important;border-radius:12px!important;font-size:17px!important}
  .portal-pro-contact-item div{min-width:0!important}
  .portal-pro-contact-item small{font-size:9.5px!important;line-height:1.2!important}
  .portal-pro-contact-item strong{font-size:11.5px!important;line-height:1.45!important;margin-top:2px!important;white-space:normal!important}
  .portal-pro-contact-item>b{font-size:15px!important;color:#9cafc2!important}
  .portal-pro-contact-address{grid-column:auto!important}
  .portal-pro-footer{margin:11px 0 0!important;padding:11px 12px!important;border-radius:17px!important;min-height:58px!important}
  .portal-pro-footer>div{justify-content:center!important}
  .portal-pro-footer p{display:none!important}
  .portal-pro-footer>span{font-size:9px!important;margin-top:5px!important}

  .portal-mobile-bottom-nav{
    position:fixed;z-index:100;right:10px;left:10px;bottom:8px;
    display:grid;grid-template-columns:repeat(4,1fr);align-items:center;
    min-height:64px;padding:6px;
    border:1px solid rgba(15,39,70,.09);border-radius:22px;
    background:rgba(255,255,255,.94);
    box-shadow:0 14px 38px rgba(8,34,64,.18);
    backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  }
  .portal-mobile-bottom-nav a,.portal-mobile-bottom-nav button{
    position:relative;overflow:hidden;border:0;background:transparent;text-decoration:none;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
    min-height:50px;border-radius:16px;color:#8092a7;font-family:inherit;cursor:pointer;
  }
  .portal-mobile-bottom-nav span{font-size:20px;line-height:1}
  .portal-mobile-bottom-nav small{font-size:9px;font-weight:800}
  .portal-mobile-bottom-nav .is-active{background:#e9f3fc;color:#176db2}

  .portal-touch-ripple{
    position:absolute;z-index:10;width:12px;height:12px;border-radius:50%;pointer-events:none;
    background:rgba(42,126,193,.18);transform:translate(-50%,-50%) scale(0);
    animation:portalRipple .52s ease-out forwards;
  }
  @keyframes portalRipple{to{transform:translate(-50%,-50%) scale(18);opacity:0}}

  .portal-pro-social-sheet{max-height:84vh!important;padding-bottom:calc(10px + env(safe-area-inset-bottom))!important}
  .portal-pro-social-link{min-height:82px!important}
}

@media (max-width:370px){
  body.portal-home-v2 .portal-pro-hero{grid-template-columns:72px 1fr!important;padding:15px!important}
  .portal-pro-logo-frame{width:70px!important;height:82px!important;flex-basis:70px!important}
  body.portal-home-v2 .portal-pro-hero .portal-pro-copy h1#portalHomeTitle{font-size:22px!important}
  .portal-pro-action{grid-template-columns:48px minmax(0,1fr) 30px!important;padding:10px!important}
  .portal-pro-action-icon{width:46px!important;height:46px!important;font-size:22px!important}
}

/* contact_icons_429: consistent monochrome contact icons */
.portal-pro-contact-icon svg{width:23px;height:23px;display:block;color:currentColor}
@media (max-width:620px){.portal-pro-contact-icon svg{width:21px;height:21px}}

/* portal_top_spacing_430: remove unnecessary blank space above the public portal banner */
@media (min-width:621px){
  body.portal-home-v2 .portal-home-shell{
    padding-top:8px!important;
  }
  body.portal-home-v2 .portal-pro-hero{
    margin-top:0!important;
  }
}


/* Commit: dealership-title-font-web-433 */
html{--dealership-title-font:var(--app-font)}
html[data-dealership-title-font="inherit"]{--dealership-title-font:var(--app-font)}
html[data-dealership-title-font="vazirmatn"]{--dealership-title-font:"Vazirmatn",Tahoma,Arial,sans-serif}
html[data-dealership-title-font="estedad"]{--dealership-title-font:"Estedad",Tahoma,Arial,sans-serif}
html[data-dealership-title-font="lalezar"]{--dealership-title-font:"Lalezar","Vazirmatn",Tahoma,sans-serif}
html[data-dealership-title-font="noto-kufi"]{--dealership-title-font:"Noto Kufi Arabic","Vazirmatn",Tahoma,sans-serif}
html[data-dealership-title-font="markazi"]{--dealership-title-font:"Markazi Text","Vazirmatn",Tahoma,serif}
html[data-dealership-title-font="katibeh"]{--dealership-title-font:"Katibeh","Markazi Text",serif}
html[data-dealership-title-font="nastaliq"]{--dealership-title-font:"Noto Nastaliq Urdu","Markazi Text",serif}
html[data-dealership-title-font="tahoma"]{--dealership-title-font:Tahoma,Arial,sans-serif}
.dealership-title-text{font-family:var(--dealership-title-font)!important}
body.portal-home-v2 .portal-pro-hero .portal-pro-copy h1#portalHomeTitle{font-family:var(--dealership-title-font)!important}
.portal-mobile-appbar-brand strong{font-family:var(--dealership-title-font)!important}
.dealership-title-font-preview{margin-top:10px;padding:11px 12px;border:1px dashed rgba(255,255,255,.26);border-radius:12px;background:rgba(255,255,255,.08);color:#fff;text-align:center;font-size:20px;font-weight:900;line-height:1.7;font-family:var(--dealership-title-font)!important}
.dealership-title-font-setting:has(option[value="inherit"]:checked) .dealership-title-font-preview{font-family:var(--app-font)!important}
.dealership-title-font-setting:has(option[value="vazirmatn"]:checked) .dealership-title-font-preview{font-family:"Vazirmatn",Tahoma,sans-serif!important}
.dealership-title-font-setting:has(option[value="estedad"]:checked) .dealership-title-font-preview{font-family:"Estedad",Tahoma,sans-serif!important}
.dealership-title-font-setting:has(option[value="lalezar"]:checked) .dealership-title-font-preview{font-family:"Lalezar","Vazirmatn",sans-serif!important}
.dealership-title-font-setting:has(option[value="noto-kufi"]:checked) .dealership-title-font-preview{font-family:"Noto Kufi Arabic","Vazirmatn",sans-serif!important}
.dealership-title-font-setting:has(option[value="markazi"]:checked) .dealership-title-font-preview{font-family:"Markazi Text","Vazirmatn",serif!important}
.dealership-title-font-setting:has(option[value="katibeh"]:checked) .dealership-title-font-preview{font-family:"Katibeh","Markazi Text",serif!important}
.dealership-title-font-setting:has(option[value="nastaliq"]:checked) .dealership-title-font-preview{font-family:"Noto Nastaliq Urdu","Markazi Text",serif!important}
.dealership-title-font-setting:has(option[value="tahoma"]:checked) .dealership-title-font-preview{font-family:Tahoma,Arial,sans-serif!important}


/* Mobile contact readability */
@media (max-width:768px){
.contact-card,
.contact-item{
    font-size:1.12rem !important;
}
.contact-card h3,
.contact-item h3,
.contact-title{
    font-size:1.28rem !important;
    font-weight:700;
}
.contact-card p,
.contact-item p,
.contact-value{
    font-size:1.22rem !important;
    font-weight:600;
}
.bottom-nav{
    display:none !important;
}
body{
    padding-bottom:0 !important;
}
}


/* Commit: mobile-contact-title-font-435
   - Larger contact typography on mobile
   - Remove obsolete mobile bottom navigation spacing
   - Force dealership title font setting on every mobile title instance */
@media (max-width:620px){
  body.portal-home-v2{padding-bottom:0!important}
  .portal-home-v2 .portal-home-shell{padding-bottom:18px!important}
  .portal-mobile-bottom-nav{display:none!important}

  .portal-pro-contact-head>div>span{font-size:11.5px!important}
  .portal-pro-contact-head h2{font-size:21px!important;line-height:1.55!important}
  .portal-pro-contact-head p{font-size:12.5px!important;line-height:1.9!important}
  .portal-pro-contact-item small{font-size:11.5px!important;line-height:1.45!important}
  .portal-pro-contact-item strong{font-size:15.5px!important;line-height:1.65!important;font-weight:900!important}

  .portal-mobile-appbar-brand .dealership-title-text,
  body.portal-home-v2 .portal-pro-hero .portal-pro-copy h1#portalHomeTitle.dealership-title-text{
    font-family:var(--dealership-title-font)!important;
  }
}


/* Commit: mobile-scroll-cleanup-436
   Remove the obsolete mobile app bar/bottom navigation and restore native touch scrolling. */
@media (max-width:620px){
  html{
    height:auto!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
    touch-action:pan-y!important;
  }
  body.portal-home-v2{
    height:auto!important;
    min-height:100vh!important;
    overflow-x:hidden!important;
    overflow-y:visible!important;
    overscroll-behavior-y:auto!important;
    touch-action:pan-y!important;
    padding-bottom:0!important;
  }
  body.portal-home-v2:not(.portal-modal-open){
    position:static!important;
    overflow-y:visible!important;
  }
  .portal-home-v2 .portal-home-shell{
    min-height:100vh!important;
    padding-top:12px!important;
    padding-bottom:20px!important;
    overflow:visible!important;
    touch-action:pan-y!important;
  }
  .portal-mobile-appbar,
  .portal-mobile-bottom-nav,
  .bottom-nav{
    display:none!important;
  }
  body.portal-home-v2 .portal-pro-hero{
    margin-top:0!important;
  }
}

/* Commit: portal-contact-pastel-background-437
   Give the public contact section a soft pastel treatment that matches the portal cards. */
.portal-home-v2 .portal-pro-contact{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 12% 12%,rgba(196,181,253,.22),transparent 34%),
    radial-gradient(circle at 88% 18%,rgba(191,219,254,.30),transparent 38%),
    radial-gradient(circle at 76% 88%,rgba(251,207,232,.22),transparent 34%),
    linear-gradient(145deg,rgba(255,255,255,.94),rgba(246,247,255,.94) 52%,rgba(255,247,252,.92));
  border:1px solid rgba(255,255,255,.92);
  box-shadow:0 20px 52px rgba(74,92,135,.10),inset 0 1px 0 rgba(255,255,255,.95);
}
.portal-home-v2 .portal-pro-contact:before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(120deg,rgba(255,255,255,.30),transparent 42%,rgba(255,255,255,.18));
}
.portal-home-v2 .portal-pro-contact>*{
  position:relative;
  z-index:1;
}
.portal-home-v2 .portal-pro-contact-head{
  border-bottom-color:rgba(148,163,184,.20);
}
.portal-home-v2 .portal-pro-contact-item{
  background:rgba(255,255,255,.76);
  border-color:rgba(180,192,216,.32);
  box-shadow:0 8px 22px rgba(84,101,140,.045);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.portal-home-v2 .portal-pro-contact-item:hover{
  background:rgba(255,255,255,.94);
  border-color:rgba(147,170,211,.52);
}
.portal-home-v2 .portal-pro-contact-icon{
  background:linear-gradient(145deg,rgba(232,240,255,.94),rgba(249,244,255,.96));
  border-color:rgba(180,197,226,.42);
}
@media (max-width:620px){
  .portal-home-v2 .portal-pro-contact{
    background:
      radial-gradient(circle at 8% 8%,rgba(221,214,254,.48),transparent 36%),
      radial-gradient(circle at 94% 18%,rgba(219,234,254,.55),transparent 40%),
      radial-gradient(circle at 82% 94%,rgba(252,231,243,.50),transparent 38%),
      linear-gradient(150deg,#fbfbff 0%,#f4f6ff 52%,#fff7fb 100%);
    border-color:rgba(255,255,255,.96);
    box-shadow:0 16px 38px rgba(66,84,125,.09),inset 0 1px 0 #fff;
  }
  .portal-home-v2 .portal-pro-contact-item{
    background:rgba(255,255,255,.72);
    border-color:rgba(177,191,218,.30);
  }
}


/* Commit: portal-compact-footer-438
   Compact, brand-led footer for the public portal. */
.portal-home-v2 .portal-pro-footer.portal-pro-footer-compact{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:72px;
  margin-top:14px;
  padding:12px 18px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:18px;
  background:linear-gradient(135deg,#0b2545,#10345f);
  box-shadow:0 12px 28px rgba(8,29,56,.14);
  color:#fff;
}
.portal-home-v2 .portal-pro-footer-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:11px;
  width:100%;
}
.portal-home-v2 .portal-pro-footer-logo{
  width:40px;
  height:40px;
  flex:0 0 40px;
  object-fit:cover;
  border-radius:11px;
  background:#071a33;
  box-shadow:0 6px 14px rgba(0,0,0,.18);
}
.portal-home-v2 .portal-pro-footer-brand>div{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
  min-width:0;
}
.portal-home-v2 .portal-pro-footer-brand strong{
  color:#fff;
  font-size:14px;
  font-weight:900;
  line-height:1.4;
}
.portal-home-v2 .portal-pro-footer-brand span{
  color:#aebed1;
  font-size:10.5px;
  line-height:1.4;
  white-space:nowrap;
}
@media (max-width:620px){
  .portal-home-v2 .portal-pro-footer.portal-pro-footer-compact{
    min-height:64px!important;
    margin:11px 0 0!important;
    padding:10px 14px!important;
    border-radius:16px!important;
  }
  .portal-home-v2 .portal-pro-footer-logo{
    width:36px;
    height:36px;
    flex-basis:36px;
    border-radius:10px;
  }
  .portal-home-v2 .portal-pro-footer-brand{
    gap:9px;
  }
  .portal-home-v2 .portal-pro-footer-brand strong{
    font-size:13px;
  }
  .portal-home-v2 .portal-pro-footer-brand span{
    margin-top:0!important;
    font-size:9.5px!important;
  }
}

/* ===== User editor visual refresh — commit user-editor-v2-442 ===== */
.user-editor-header{
  margin-top:16px!important;
  padding:18px 22px!important;
  border-color:#d9e7f4!important;
  border-radius:22px!important;
  background:linear-gradient(135deg,#ffffff 0%,#f4f9ff 64%,#f1fbf8 100%)!important;
  box-shadow:0 12px 32px rgba(26,59,91,.07)!important;
}
.user-editor-header h1{font-size:27px!important;color:#153b61!important;margin-bottom:5px!important}
.user-editor-header p{font-size:13px!important;line-height:1.9!important}
.user-editor-header .btn{border:1px solid #d6e3ef!important;border-radius:13px!important;background:#fff!important}

.auth-user-form.user-editor-v2{
  --ue-primary:#2876b7;
  --ue-primary-dark:#175a91;
  --ue-soft:#eaf4ff;
  padding:16px!important;
  border:1px solid #d9e7f4!important;
  border-radius:24px!important;
  background:#f7faff!important;
  box-shadow:0 14px 38px rgba(22,54,86,.065)!important;
}
.auth-user-form.user-editor-v2 .user-form-summary{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  margin-bottom:14px!important;
}
.auth-user-form.user-editor-v2 .summary-chip{
  min-height:58px!important;
  padding:9px 13px!important;
  border:1px solid #dce7f2!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:none!important;
}
.auth-user-form.user-editor-v2 .summary-chip span{
  width:31px!important;height:31px!important;border-radius:10px!important;
  background:#eef4fa!important;color:#456581!important;box-shadow:none!important;
}
.auth-user-form.user-editor-v2 .summary-chip.primary{
  border-color:#b8d7ef!important;
  background:linear-gradient(135deg,#eaf5ff,#f4fbff)!important;
  color:#163f65!important;
  box-shadow:0 7px 18px rgba(40,118,183,.09)!important;
}
.auth-user-form.user-editor-v2 .summary-chip.primary span{
  background:linear-gradient(135deg,var(--ue-primary),var(--ue-primary-dark))!important;
  color:#fff!important;
}
.auth-user-form.user-editor-v2 .summary-chip b{color:#183f64!important;font-size:13px!important}
.auth-user-form.user-editor-v2 .summary-chip small{font-size:11px!important}

.auth-user-form.user-editor-v2 .user-modern-card,
.auth-user-form.user-editor-v2 .user-overrides-card{
  margin-bottom:13px!important;
  padding:14px 15px!important;
  border:1px solid #dce7f2!important;
  border-radius:19px!important;
  background:#fff!important;
  box-shadow:0 7px 20px rgba(31,65,98,.035)!important;
}
.auth-user-form.user-editor-v2 .user-card-head{
  margin-bottom:11px!important;padding-bottom:9px!important;border-bottom-color:#edf3f8!important;
}
.auth-user-form.user-editor-v2 .user-card-head .card-icon{
  width:39px!important;height:39px!important;border-radius:13px!important;
  background:linear-gradient(135deg,#e8f4ff,#eef9f5)!important;
}
.auth-user-form.user-editor-v2 .user-card-head h3{font-size:17px!important;color:#183f64!important}
.auth-user-form.user-editor-v2 .user-card-head small{font-size:11.5px!important}
.auth-user-form.user-editor-v2 .form-grid.three{gap:12px!important}
.auth-user-form.user-editor-v2 .field label{font-size:12.5px!important;color:#294a69!important}
.auth-user-form.user-editor-v2 .field input,
.auth-user-form.user-editor-v2 .field select{
  height:44px!important;min-height:44px!important;
  border:1px solid #cbdbea!important;border-radius:12px!important;
  background:#fff!important;box-shadow:none!important;
}
.auth-user-form.user-editor-v2 .field input:focus,
.auth-user-form.user-editor-v2 .field select:focus{
  outline:0!important;border-color:var(--ue-primary)!important;
  box-shadow:0 0 0 3px rgba(40,118,183,.11)!important;
}
.auth-user-form.user-editor-v2 .field.important-field input{
  border-color:#9ec9e9!important;background:#fafdff!important;
}
.auth-user-form.user-editor-v2 .field.important-field label{color:#1b6198!important}

.auth-user-form.user-editor-v2 .user-status-switch{
  min-height:70px!important;width:100%!important;display:flex!important;align-items:center!important;
  gap:12px!important;padding:11px 13px!important;border:1px solid #d9e6f1!important;
  border-radius:15px!important;background:linear-gradient(180deg,#fbfdff,#f5f9fc)!important;cursor:pointer!important;
}
.auth-user-form.user-editor-v2 .user-status-switch input{position:absolute!important;opacity:0!important;pointer-events:none!important}
.auth-user-form.user-editor-v2 .user-status-switch-ui{
  direction:ltr!important;width:50px!important;height:28px!important;padding:3px!important;border-radius:999px!important;
  background:#cbd6e1!important;box-shadow:inset 0 1px 3px rgba(15,35,55,.15)!important;flex:none!important;transition:.2s!important;
}
.auth-user-form.user-editor-v2 .user-status-switch-ui i{
  display:block!important;width:22px!important;height:22px!important;border-radius:50%!important;background:#fff!important;
  box-shadow:0 2px 6px rgba(15,35,55,.2)!important;transition:.2s!important;
}
.auth-user-form.user-editor-v2 .user-status-switch input:checked + .user-status-switch-ui{background:linear-gradient(135deg,#33a67e,#178767)!important}
.auth-user-form.user-editor-v2 .user-status-switch input:checked + .user-status-switch-ui i{transform:translateX(22px)!important}
.auth-user-form.user-editor-v2 .user-status-switch-text{display:flex!important;flex-direction:column!important;gap:2px!important}
.auth-user-form.user-editor-v2 .user-status-switch-text b{font-size:13px!important;color:#214667!important}
.auth-user-form.user-editor-v2 .user-status-switch-text small{font-size:10.5px!important;color:#718497!important}
.auth-user-form.user-editor-v2 .temporary-password-note{
  min-height:70px!important;padding:10px 12px!important;border:1px solid #c8def1!important;
  border-right:4px solid #5c9ed4!important;border-radius:14px!important;background:#f2f8fd!important;
}
.auth-user-form.user-editor-v2 .temporary-password-note b{color:#276691!important}

.auth-user-form.user-editor-v2 .user-editor-actions{
  position:sticky!important;bottom:10px!important;z-index:45!important;
  display:flex!important;align-items:center!important;gap:9px!important;justify-content:flex-start!important;
  margin-top:14px!important;padding:10px!important;border:1px solid #d7e5f1!important;border-radius:16px!important;
  background:rgba(255,255,255,.95)!important;backdrop-filter:blur(10px)!important;
  box-shadow:0 10px 28px rgba(19,50,80,.13)!important;
}
.auth-user-form.user-editor-v2 .user-editor-actions .btn{min-height:44px!important;border-radius:12px!important;padding:9px 20px!important}
.auth-user-form.user-editor-v2 .user-editor-save{
  background:linear-gradient(135deg,var(--ue-primary),var(--ue-primary-dark))!important;
  color:#fff!important;border:0!important;box-shadow:0 7px 16px rgba(40,118,183,.2)!important;
}
.auth-user-form.user-editor-v2 .user-editor-cancel{background:#eef3f8!important;color:#36536d!important}

@media(max-width:720px){
  .user-editor-header{margin:10px!important;padding:14px!important;border-radius:18px!important}
  .user-editor-header h1{font-size:22px!important}
  .auth-user-form.user-editor-v2{margin:0 10px 12px!important;padding:9px!important;border-radius:19px!important}
  .auth-user-form.user-editor-v2 .user-form-summary{display:flex!important;overflow-x:auto!important;gap:7px!important}
  .auth-user-form.user-editor-v2 .summary-chip{min-width:132px!important;min-height:52px!important;flex-direction:row!important;text-align:right!important}
  .auth-user-form.user-editor-v2 .summary-chip small{display:none!important}
  .auth-user-form.user-editor-v2 .user-modern-card,.auth-user-form.user-editor-v2 .user-overrides-card{padding:11px!important;border-radius:17px!important}
  .auth-user-form.user-editor-v2 .form-grid.three{grid-template-columns:1fr!important}
  .auth-user-form.user-editor-v2 .user-editor-actions{bottom:7px!important;display:grid!important;grid-template-columns:1fr 1fr!important}
  .auth-user-form.user-editor-v2 .user-editor-actions .btn{padding-inline:8px!important;justify-content:center!important;text-align:center!important}
}


/* ========================================================================== 
   v443 - استاندارد سراسری تایپوگرافی و کنترل اندازه متون سامانه
   ========================================================================== */
:root{
  --text-scale:1;
  --fs-caption:calc(12px * var(--text-scale));
  --fs-small:calc(13px * var(--text-scale));
  --fs-body:calc(15px * var(--text-scale));
  --fs-table:calc(14px * var(--text-scale));
  --fs-label:calc(14px * var(--text-scale));
  --fs-control:calc(14px * var(--text-scale));
  --fs-card-title:calc(17px * var(--text-scale));
  --fs-section-title:calc(19px * var(--text-scale));
  --fs-page-title:calc(23px * var(--text-scale));
  --lh-body:1.75;
}
html[data-text-scale="90"]{--text-scale:.90}
html[data-text-scale="100"]{--text-scale:1}
html[data-text-scale="110"]{--text-scale:1.10}
html[data-text-scale="120"]{--text-scale:1.20}
html[data-text-scale="125"]{--text-scale:1.25}

@media screen{
  body{font-size:var(--fs-body);line-height:var(--lh-body)}
  main, .card, .form-card, .panel, .modal, .drawer, .page-content{font-size:var(--fs-body)}
  h1,.page-title,.page-header h1{font-size:var(--fs-page-title)!important;line-height:1.45}
  h2,.form-topbar h2,.page-center-title{font-size:var(--fs-section-title)!important;line-height:1.5}
  h3,.card h3,.panel-title,.section-title,.page-side-title{font-size:var(--fs-card-title)!important;line-height:1.55}
  p,.sub,.muted-text,.help-text,.hint,.description{font-size:var(--fs-small);line-height:1.8}
  small,.small-text,.field-error,.date-error,.form-kicker{font-size:var(--fs-caption)!important;line-height:1.7}
  label,legend,.field-label,.control-label{font-size:var(--fs-label);line-height:1.7}
  input,select,textarea,.btn,button{font-size:var(--fs-control);line-height:1.55}
  th,td{font-size:var(--fs-table);line-height:1.65}
  th{font-weight:800}
  td{font-weight:500}
  td strong,td b,.person-name,.person-title,.ledger-person-name{font-size:calc(var(--fs-table) * 1.05);font-weight:800}
  .badge,.pill,.status-badge{font-size:var(--fs-caption)}
  .nav,.subnav{font-size:var(--fs-small)}
  .toolbar,.form-actions,.actions{font-size:var(--fs-control)}

  /* ارتفاع اجزا متناسب با اندازه متن افزایش می‌یابد تا متن فشرده نشود. */
  input,select,textarea{min-height:calc(40px * var(--text-scale));padding-block:calc(9px * var(--text-scale))}
  .btn,button{min-height:calc(38px * var(--text-scale));padding-block:calc(8px * var(--text-scale))}
  th,td{padding-block:calc(10px * var(--text-scale))}

  /* پیش‌نمایش داخل تنظیمات */
  .text-scale-preview{margin-top:8px;padding:9px 10px;border:1px dashed rgba(255,255,255,.28);border-radius:10px;background:rgba(255,255,255,.08);display:grid;gap:2px;text-align:center}
  .text-scale-preview strong{font-size:var(--fs-card-title)}
  .text-scale-preview span{font-size:var(--fs-table);opacity:.9}
}

@media(max-width:900px){
  :root{
    --fs-body:calc(15px * var(--text-scale));
    --fs-table:calc(14px * var(--text-scale));
    --fs-control:calc(15px * var(--text-scale));
    --fs-page-title:calc(21px * var(--text-scale));
  }
}

@media print{
  html{--text-scale:1!important}
}

/* ========================================================================== 
   v444 - استاندارد قطعی اندازه متن بر اساس رده و مقیاس تنظیمات
   همه اجزای هم‌رده، یک اندازه پایه دارند و data-text-scale فقط همان پایه را
   به‌صورت هماهنگ کوچک/بزرگ می‌کند. این بخش عمداً در انتهای فایل قرار دارد تا
   اندازه‌های پراکنده و قدیمی صفحات را یکپارچه کند.
   ========================================================================== */
:root{
  --type-scale: var(--text-scale, 1);
  --type-caption: calc(12px * var(--type-scale));
  --type-meta: calc(13px * var(--type-scale));
  --type-body: calc(15px * var(--type-scale));
  --type-table: calc(16px * var(--type-scale));
  --type-control: calc(14px * var(--type-scale));
  --type-button: calc(14px * var(--type-scale));
  --type-card-title: calc(17px * var(--type-scale));
  --type-section-title: calc(19px * var(--type-scale));
  --type-page-title: calc(23px * var(--type-scale));
}

@media screen{
  /* متن عمومی */
  html body,
  body main,
  body .page-content,
  body .content,
  body .card,
  body .panel,
  body .form-card,
  body .modal,
  body .drawer{
    font-size:var(--type-body)!important;
  }

  /* تیتر اصلی صفحه */
  body h1,
  body .page-title,
  body .page-header h1,
  body .user-editor-header h1{
    font-size:var(--type-page-title)!important;
    line-height:1.45!important;
  }

  /* تیتر بخش */
  body h2,
  body .page-center-title,
  body .form-topbar h2,
  body .ledger-title-bar h2,
  body .person-profile-copy h2{
    font-size:var(--type-section-title)!important;
    line-height:1.5!important;
  }

  /* عنوان کارت و زیر‌بخش */
  body h3,
  body .card h3,
  body .panel-title,
  body .section-title,
  body .section-heading h3,
  body .user-modern-card h3,
  body .user-overrides-card h3{
    font-size:var(--type-card-title)!important;
    line-height:1.55!important;
  }

  /* توضیحات، راهنما و متادیتا */
  body p,
  body .sub,
  body .description,
  body .muted-text,
  body .help-text,
  body .hint,
  body .advanced-filter-hint small,
  body .section-heading small,
  body .person-profile-label,
  body .ledger-kicker{
    font-size:var(--type-meta)!important;
    line-height:1.8!important;
  }

  body small,
  body .small-text,
  body .field-error,
  body .date-error,
  body .form-kicker,
  body .badge,
  body .pill,
  body .status-badge,
  body .balance-pill,
  body .method-badge{
    font-size:var(--type-caption)!important;
    line-height:1.65!important;
  }

  /* برچسب‌ها و کنترل‌ها */
  body label,
  body legend,
  body .field-label,
  body .control-label,
  body .advanced-field label,
  body .toolbar-date label{
    font-size:var(--type-control)!important;
    line-height:1.65!important;
  }

  body input,
  body select,
  body textarea{
    font-size:var(--type-control)!important;
    line-height:1.55!important;
    min-height:calc(42px * var(--type-scale))!important;
  }

  body button,
  body .btn,
  body a.btn,
  body .open-ledger-btn,
  body .people-mobile-open{
    font-size:var(--type-button)!important;
    line-height:1.5!important;
    min-height:calc(40px * var(--type-scale))!important;
  }

  /* استاندارد تمام جدول‌های سامانه */
  body table,
  body .table,
  body .data-table,
  body .modern-ledger-table,
  body .entries-table,
  body .people-table{
    font-size:var(--type-table)!important;
  }

  body table th,
  body table td,
  body .table th,
  body .table td,
  body .data-table th,
  body .data-table td,
  body .modern-ledger-table th,
  body .modern-ledger-table td,
  body .entries-table th,
  body .entries-table td,
  body .people-table th,
  body .people-table td{
    font-size:var(--type-table)!important;
    line-height:1.6!important;
    padding-block:calc(10px * var(--type-scale))!important;
  }

  body table thead th,
  body .modern-ledger-table thead th,
  body .entries-table thead th,
  body .people-table thead th{
    font-size:var(--type-table)!important;
    font-weight:800!important;
  }

  body table tbody td,
  body .modern-ledger-table tbody td,
  body .entries-table tbody td,
  body .people-table tbody td{
    font-size:var(--type-table)!important;
    font-weight:600!important;
  }

  /* نام‌ها، ارقام مهم و جمع‌ها در جدول، هم‌رده ولی با وزن بیشتر */
  body table td strong,
  body table td b,
  body td.person-name,
  body .person-name,
  body .person-title,
  body .ledger-person-name,
  body .people-mobile-name,
  body .entries-table td.money-cell,
  body .entries-table td.balance-cell,
  body .modern-ledger-table td.money-cell,
  body .modern-ledger-table tfoot th{
    font-size:var(--type-table)!important;
    font-weight:800!important;
    line-height:1.6!important;
  }

  /* ریزشماره، تاریخ و شماره سند هم از اندازه جدول پیروی کنند؛ نه rem ثابت */
  body .entries-table tbody td.ledger-row-number,
  body .entries-table tbody td.ledger-receipt,
  body .entries-table tbody td[data-label="تاریخ"],
  body .people-table tbody td[data-label="ردیف"],
  body .people-table tbody td[data-label="کد ملی"],
  body .people-table tbody td[data-label="موبایل"]{
    font-size:var(--type-table)!important;
    line-height:1.6!important;
  }

  /* دفتر اشخاص: جلوگیری از اندازه‌های قدیمی و پراکنده همین صفحه */
  body .ledger-page .ledger-live-search-head span,
  body .ledger-page .ledger-live-search-head strong,
  body .ledger-page .ledger-live-search-head>b,
  body .ledger-page .advanced-filter-label span,
  body .ledger-page .advanced-filter-label small,
  body .ledger-page .finance-summary-item span,
  body .ledger-page .finance-summary-item strong{
    font-size:inherit!important;
  }
  body .ledger-page .ledger-live-search-head span,
  body .ledger-page .advanced-filter-label small,
  body .ledger-page .finance-summary-item span{
    font-size:var(--type-meta)!important;
  }
  body .ledger-page .ledger-live-search-head strong,
  body .ledger-page .advanced-filter-label span,
  body .ledger-page .finance-summary-item strong{
    font-size:var(--type-body)!important;
  }
  body .ledger-page .ledger-live-search-head>b{
    font-size:var(--type-caption)!important;
  }

  /* کارت‌های موبایل نیز دقیقاً از همان رده‌ها پیروی کنند */
  body .people-mobile-card,
  body .mobile-card,
  body .list-card{
    font-size:var(--type-body)!important;
  }
  body .people-mobile-name,
  body .mobile-card-title,
  body .list-card-title{
    font-size:var(--type-body)!important;
    font-weight:800!important;
  }
  body .people-mobile-meta,
  body .mobile-card-meta,
  body .list-card-meta{
    font-size:var(--type-meta)!important;
  }

  /* منوها و نوارهای ابزار */
  body .nav,
  body .subnav,
  body .breadcrumb,
  body .toolbar,
  body .form-actions,
  body .actions{
    font-size:var(--type-meta)!important;
  }
}

@media(max-width:900px){
  :root{
    --type-caption:calc(12px * var(--type-scale));
    --type-meta:calc(13px * var(--type-scale));
    --type-body:calc(15px * var(--type-scale));
    --type-table:calc(16px * var(--type-scale));
    --type-control:calc(15px * var(--type-scale));
    --type-button:calc(14px * var(--type-scale));
    --type-card-title:calc(17px * var(--type-scale));
    --type-section-title:calc(19px * var(--type-scale));
    --type-page-title:calc(22px * var(--type-scale));
  }
}

@media print{
  :root{--type-scale:1!important}
}


/* ========================================================================== */
/* یکپارچه‌سازی فونت اعداد و داده‌های عددی با فونت انتخاب‌شده سامانه           */
/* Numeric font inheritance normalization - v451                              */
/* ========================================================================== */

/*
  برخی بخش‌های قدیمی برای مبلغ، تاریخ، شماره ردیف و کدها فونت Tahoma/Arial
  یا فونت مستقل داشتند. این قانون‌ها فقط فونت را یکپارچه می‌کنند و جهت نمایش
  اعداد (LTR/RTL)، رنگ، وزن و قالب‌بندی مبلغ را تغییر نمی‌دهند.
*/
body table,
body table thead,
body table tbody,
body table tfoot,
body table tr,
body table th,
body table td,
body table th *,
body table td *,
body .amount,
body .money,
body .money-cell,
body .amount-cell,
body .numeric,
body .number,
body .num,
body .num-cell,
body .date,
body .js-date,
body .shamsi-date,
body .date-cell,
body .due-date,
body .mobile,
body .phone,
body .phone-number,
body .mobile-number,
body .national-code,
body .national-id,
body .document-number,
body .receipt-number,
body .contract-number,
body .check-number,
body .sayadi-cell,
body .balance,
body .remaining,
body .penalty,
body .total,
body .debit,
body .credit,
body .hero-inline-num,
body .home-stat-num,
body .dashboard-module-body,
body .dashboard-module-body *,
body input[type="number"],
body input[type="tel"],
body input[inputmode="numeric"],
body input[inputmode="decimal"]{
  font-family:var(--app-font)!important;
}

/* کلاس‌های LTR فقط جهت نوشتار را کنترل کنند، نه نوع فونت را */
body .ltr:not(code):not(pre),
body [dir="ltr"]:not(code):not(pre),
body .text-ltr:not(code):not(pre){
  font-family:var(--app-font)!important;
}

/* داخل گزارش‌ها، عدد و متن هر دو از فونت انتخابی همان گزارش پیروی کنند. */
body .report-paper,
body .report-paper *,
body .print-paper,
body .print-paper *,
body .report-page,
body .report-page *,
body .account-sum-print,
body .account-sum-print *{
  font-family:var(--report-font-family,var(--app-font))!important;
}

/* کدهای فنی، توکن‌ها و متن‌های واقعاً برنامه‌نویسی همچنان monospace بمانند. */
body code,
body pre,
body kbd,
body samp{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace!important;
}


/* v452: smart dropdown flip is flush with the focused field edge. */
.person-dropdown,.person-id-dropdown,.generic-smart-dropdown,.vehicle-dropdown,
.check-dropdown,.cashbox-id-dropdown,.bank-dropdown,.color-dropdown,
.province-dropdown,.city-dropdown,.location-dropdown{
  margin:0!important;
}
.smart-drop-down>.person-dropdown,
.smart-drop-down>.person-id-dropdown,
.smart-drop-down>.generic-smart-dropdown,
.smart-drop-down>.vehicle-dropdown,
.smart-drop-down>.check-dropdown,
.smart-drop-down>.cashbox-id-dropdown,
.smart-drop-down>.bank-dropdown,
.smart-drop-down>.color-dropdown,
.smart-drop-down>.province-dropdown,
.smart-drop-down>.city-dropdown,
.smart-drop-down>.location-dropdown{
  top:100%!important;
  bottom:auto!important;
  border-top-left-radius:0!important;
  border-top-right-radius:0!important;
}
.smart-drop-up>.person-dropdown,
.smart-drop-up>.person-id-dropdown,
.smart-drop-up>.generic-smart-dropdown,
.smart-drop-up>.vehicle-dropdown,
.smart-drop-up>.check-dropdown,
.smart-drop-up>.cashbox-id-dropdown,
.smart-drop-up>.bank-dropdown,
.smart-drop-up>.color-dropdown,
.smart-drop-up>.province-dropdown,
.smart-drop-up>.city-dropdown,
.smart-drop-up>.location-dropdown{
  top:auto!important;
  bottom:100%!important;
  border-bottom-left-radius:0!important;
  border-bottom-right-radius:0!important;
}
/* Join the input and menu into one visual control. */
.smart-drop-down>input:focus,
.smart-drop-down>.person-search:focus,
.smart-drop-down>.person-id-search:focus,
.smart-drop-down>.vehicle-search:focus,
.smart-drop-down>.bank-search:focus,
.smart-drop-down>.color-search:focus{
  border-bottom-left-radius:0!important;
  border-bottom-right-radius:0!important;
}
.smart-drop-up>input:focus,
.smart-drop-up>.person-search:focus,
.smart-drop-up>.person-id-search:focus,
.smart-drop-up>.vehicle-search:focus,
.smart-drop-up>.bank-search:focus,
.smart-drop-up>.color-search:focus{
  border-top-left-radius:0!important;
  border-top-right-radius:0!important;
}
@media(max-width:820px){
  .person-dropdown,.person-id-dropdown,.generic-smart-dropdown,.vehicle-dropdown,
  .check-dropdown,.cashbox-id-dropdown,.bank-dropdown,.color-dropdown,
  .province-dropdown,.city-dropdown,.location-dropdown{
    max-height:min(var(--smart-dropdown-max-height,220px),calc(100dvh - 16px))!important;
  }
}

/* v440 compact contract basis and payment selectors */
.installment-form .compact-choice-panel{
  padding:14px 16px!important;
}
.installment-form .compact-choice-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.installment-form .compact-choice-heading .panel-title{
  margin:0!important;
  white-space:nowrap;
}
.installment-form .compact-choice-heading>small{
  color:#718096;
  font-size:11px;
  font-weight:750;
}
.installment-form .compact-segmented-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.installment-form .compact-segmented-options label{
  position:relative;
  display:grid;
  grid-template-columns:32px minmax(0,1fr) 24px;
  align-items:center;
  gap:9px;
  min-height:64px;
  padding:9px 11px!important;
  border-radius:13px!important;
  background:#f8fafc;
  overflow:hidden;
}
.installment-form .compact-segmented-options input,
.installment-form .compact-payment-options input{
  position:absolute!important;
  opacity:0!important;
  pointer-events:none;
}
.installment-form .choice-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  border-radius:10px;
  background:#e9f0f7;
  color:#244a70;
  font-weight:1000;
  font-size:15px;
  flex:0 0 auto;
}
.installment-form .choice-copy{
  display:flex!important;
  flex-direction:column;
  gap:1px!important;
  min-width:0;
}
.installment-form .choice-copy b{
  font-size:12.5px;
  line-height:1.6;
  color:#203b59;
}
.installment-form .choice-copy small{
  display:none;
  font-size:10.5px;
  line-height:1.55;
  color:#5f7288;
}
.installment-form .choice-check{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:50%;
  border:1.5px solid #c9d5e2;
  color:transparent;
  background:#fff;
  font-style:normal;
  font-size:12px;
  font-weight:1000;
}
.installment-form .compact-segmented-options label:has(input:checked),
.installment-form .compact-payment-options label:has(input:checked){
  border-color:#43a875!important;
  background:linear-gradient(135deg,#ecfbf3,#f7fffa)!important;
  box-shadow:0 4px 12px rgba(26,130,78,.09)!important;
}
.installment-form .compact-segmented-options label:has(input:checked) .choice-icon,
.installment-form .compact-payment-options label:has(input:checked) .choice-icon{
  background:#d7f3e4;
  color:#11643d;
}
.installment-form .compact-segmented-options label:has(input:checked) .choice-copy small{
  display:block;
}
.installment-form .compact-segmented-options label:has(input:checked) .choice-check,
.installment-form .compact-payment-options label:has(input:checked) .choice-check{
  border-color:#35a36c;
  background:#35a36c;
  color:#fff;
}
.installment-form .compact-payment-options{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:7px!important;
  margin-bottom:11px!important;
}
.installment-form .compact-payment-options label{
  position:relative;
  display:grid!important;
  grid-template-columns:28px minmax(0,1fr) 21px;
  align-items:center;
  gap:7px!important;
  min-height:52px!important;
  padding:7px 9px!important;
  border-radius:12px!important;
  text-align:right;
  font-size:12px!important;
  line-height:1.4;
}
.installment-form .compact-payment-options .choice-icon{
  width:27px;
  height:27px;
  border-radius:9px;
  font-size:13px;
}
.installment-form .compact-payment-options .choice-check{
  width:19px;
  height:19px;
  font-size:10px;
}
@media(max-width:700px){
  .installment-form .compact-choice-panel{padding:11px!important;}
  .installment-form .compact-choice-heading{
    align-items:flex-start;
    margin-bottom:8px;
  }
  .installment-form .compact-choice-heading>small{display:none;}
  .installment-form .compact-segmented-options{
    grid-template-columns:1fr 1fr!important;
    gap:6px;
  }
  .installment-form .compact-segmented-options label{
    grid-template-columns:25px minmax(0,1fr) 19px;
    gap:6px;
    min-height:54px;
    padding:7px!important;
  }
  .installment-form .compact-segmented-options .choice-icon{
    width:24px;height:24px;border-radius:8px;font-size:12px;
  }
  .installment-form .compact-segmented-options .choice-copy b{font-size:11px;}
  .installment-form .compact-segmented-options .choice-copy small{display:none!important;}
  .installment-form .compact-segmented-options .choice-check{width:18px;height:18px;font-size:9px;}
  .installment-form .compact-payment-options{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
  }
  .installment-form .compact-payment-options label{
    display:flex!important;
    flex-direction:column;
    justify-content:center;
    gap:3px!important;
    min-height:58px!important;
    padding:6px 3px!important;
    text-align:center;
    font-size:10.5px!important;
    white-space:nowrap;
  }
  .installment-form .compact-payment-options .choice-icon{width:23px;height:23px;font-size:11px;}
  .installment-form .compact-payment-options .choice-check{
    position:absolute;
    top:4px;
    left:4px;
    width:15px;
    height:15px;
    font-size:8px;
  }
}

/* Commit: compact-equal-mobile-portal-datetime-448
   Keep the mobile portal date/time equal in size, on one row, with a shorter card. */
@media (max-width:620px){
  body.portal-home-v2 .portal-pro-clock{
    grid-area:clock!important;
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr)!important;
    align-items:center!important;
    gap:10px!important;
    min-height:58px!important;
    padding:8px 11px!important;
    margin-top:0!important;
    border-radius:17px!important;
  }

  body.portal-home-v2 .portal-pro-clock-icon{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    flex-basis:34px!important;
    border-radius:11px!important;
    font-size:16px!important;
  }

  body.portal-home-v2 .portal-pro-clock > div:last-child{
    min-width:0!important;
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    column-gap:12px!important;
    direction:rtl!important;
  }

  body.portal-home-v2 .portal-pro-clock .portal-clock-date,
  body.portal-home-v2 .portal-pro-clock .portal-clock-time{
    margin:0!important;
    font-size:var(--ds-datetime-font-size,13px)!important;
    line-height:1.3!important;
    font-weight:900!important;
    white-space:nowrap!important;
  }

  body.portal-home-v2 .portal-pro-clock .portal-clock-date{
    grid-column:1!important;
    text-align:right!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  body.portal-home-v2 .portal-pro-clock .portal-clock-time{
    grid-column:2!important;
    text-align:left!important;
    direction:ltr!important;
    letter-spacing:.15px!important;
  }

  body.portal-home-v2 .portal-pro-clock .portal-clock-subdate{
    display:none!important;
  }
}


/* Commit: mobile-portal-datetime-no-icon-ultracompact-448
   Mobile only: remove clock icon and reduce the date/time box to a single compact text row. */
@media (max-width:620px){
  body.portal-home-v2 .portal-pro-clock{
    display:block!important;
    min-height:0!important;
    height:auto!important;
    padding:5px 10px!important;
    margin-top:0!important;
    border-radius:13px!important;
  }

  body.portal-home-v2 .portal-pro-clock-icon{
    display:none!important;
  }

  body.portal-home-v2 .portal-pro-clock > div:last-child{
    width:100%!important;
    min-width:0!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    column-gap:10px!important;
    min-height:0!important;
    line-height:1!important;
    direction:rtl!important;
  }

  body.portal-home-v2 .portal-pro-clock .portal-clock-date,
  body.portal-home-v2 .portal-pro-clock .portal-clock-time{
    margin:0!important;
    padding:0!important;
    font-size:var(--ds-datetime-font-size,13px)!important;
    line-height:1.2!important;
    font-weight:900!important;
    white-space:nowrap!important;
  }

  body.portal-home-v2 .portal-pro-clock .portal-clock-subdate{
    display:none!important;
  }
}

/* Dashboard due-items mobile cards — compact, clearly separated (car_web_Asli 450) */
@media (max-width:760px){
  .dashboard-due-installments-card,
  .dashboard-due-checks-card{
    padding:10px!important;
  }
  .dashboard-due-installments-card .dashboard-module-head,
  .dashboard-due-checks-card .dashboard-module-head{
    min-height:40px!important;
    margin-bottom:7px!important;
    padding:8px 11px!important;
    border-radius:13px!important;
  }
  .dashboard-due-installments-card .dashboard-module-head h3,
  .dashboard-due-checks-card .dashboard-module-head h3{
    font-size:13.5px!important;
    line-height:1.35!important;
  }
  .dashboard-due-installments-card .dashboard-module-body,
  .dashboard-due-checks-card .dashboard-module-body{
    padding:0!important;
  }
  .due-installments-table tr,
  .due-checks-table tr{
    position:relative!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:4px 10px!important;
    min-height:0!important;
    margin:0 0 7px!important;
    padding:9px 12px 9px 15px!important;
    border:1px solid #dfe7f0!important;
    border-radius:14px!important;
    background:#fff!important;
    box-shadow:0 4px 12px rgba(15,23,42,.045)!important;
    overflow:hidden!important;
  }
  .due-installments-table tr:after,
  .due-checks-table tr:after{
    content:"";
    position:absolute;
    inset-block:7px;
    inset-inline-start:5px;
    width:4px;
    border-radius:999px;
  }
  .due-installments-table tr:after{background:#f59e0b}
  .due-checks-table tr:after{background:#ef4444}
  .due-installments-table tr:last-child,
  .due-checks-table tr:last-child{margin-bottom:0!important}

  .due-installments-table td,
  .due-checks-table td{
    min-height:23px!important;
    padding:0!important;
    gap:5px!important;
    font-size:11px!important;
    line-height:1.45!important;
  }
  .due-installments-table td:before,
  .due-checks-table td:before{
    font-size:9px!important;
    line-height:1.2!important;
    color:#7b8798!important;
  }
  .due-installments-table td:nth-child(1),
  .due-checks-table td:nth-child(1){
    display:none!important;
  }
  .due-installments-table td:nth-child(3),
  .due-checks-table td:nth-child(2){
    grid-column:1/-1!important;
    min-height:26px!important;
    padding-bottom:4px!important;
    margin-bottom:1px!important;
    border-bottom:1px dashed #e5ebf2!important;
    font-size:12px!important;
    font-weight:1000!important;
    color:#173a5e!important;
  }
  .due-installments-table td:nth-child(3):before,
  .due-checks-table td:nth-child(2):before{
    color:#475569!important;
    font-size:9.5px!important;
  }
  .due-installments-table td:nth-child(5),
  .due-checks-table td:nth-child(4){
    color:#0f6b3a!important;
    font-weight:1000!important;
  }
  .due-installments-table td:nth-child(6){
    color:#b45309!important;
    font-weight:900!important;
  }
  .due-checks-table td:nth-child(6){
    color:#b42318!important;
    font-weight:900!important;
  }
  .due-installments-table td[colspan],
  .due-checks-table td[colspan]{
    display:block!important;
    grid-column:1/-1!important;
    border:0!important;
    margin:0!important;
    padding:10px!important;
    text-align:center!important;
  }
  .due-installments-table td[colspan]:before,
  .due-checks-table td[colspan]:before{display:none!important}
}

/* Customer success + customer portal action polish — v475 */
.portal-success-page{background:radial-gradient(circle at 18% 12%,rgba(34,95,168,.14),transparent 31%),radial-gradient(circle at 82% 82%,rgba(23,122,86,.11),transparent 30%),linear-gradient(145deg,#f8fbff,#edf3f8)}
.portal-success-shell{padding:clamp(18px,4vw,46px);align-items:center}
.portal-success-card{position:relative;isolation:isolate;overflow:hidden;width:min(680px,94vw)!important;padding:clamp(28px,5vw,52px)!important;text-align:center;background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(248,251,255,.96))!important;border:1px solid #d7e2ee!important;border-radius:28px!important;box-shadow:0 28px 70px rgba(22,48,78,.16)!important}
.portal-success-card:before{content:"";position:absolute;inset:0 0 auto;height:7px;background:linear-gradient(90deg,#17477f,#225fa8 48%,#177a56)}
.portal-success-glow{position:absolute;z-index:-1;width:300px;height:300px;top:-170px;right:50%;transform:translateX(50%);border-radius:50%;background:rgba(34,95,168,.12);filter:blur(3px)}
.portal-success-mark{position:relative;width:94px;height:94px;margin:0 auto 22px;display:grid;place-items:center;border-radius:30px;background:linear-gradient(145deg,#e9fff6,#dff8ee);box-shadow:0 18px 36px rgba(23,122,86,.17)}
.portal-success-mark svg{width:46px;height:46px;fill:none;stroke:#177a56;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.portal-success-ring{position:absolute;inset:-9px;border:1px solid rgba(23,122,86,.22);border-radius:36px}
.portal-success-eyebrow{display:inline-flex;padding:7px 13px;border-radius:999px;background:#edf5ff;color:#17477f;font-size:13px;font-weight:900;margin-bottom:13px}
.portal-success-copy h1{margin:0!important;color:#132a47;font-size:clamp(27px,5vw,38px)!important;letter-spacing:-.5px}
.portal-success-copy p{max-width:560px;margin:13px auto 0!important;color:#5b6f88!important;font-size:15px;line-height:2!important}
.portal-success-message{display:flex;align-items:flex-start;text-align:right;gap:13px;margin:27px 0 22px;padding:17px 18px;border:1px solid #cbe4d9;border-radius:18px;background:linear-gradient(135deg,#f0fbf6,#f8fffc);color:#225b46}
.portal-success-message-icon{flex:0 0 34px;width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:#177a56;color:#fff;font-family:serif;font-weight:900}
.portal-success-message strong,.portal-success-message span{display:block}.portal-success-message strong{margin-bottom:4px;color:#174f3c}.portal-success-message span{line-height:1.9;color:#416c5d}
.portal-success-steps{display:grid;grid-template-columns:auto 1fr auto 1fr auto;align-items:center;gap:9px;padding:14px 3px 4px}
.portal-success-steps div{display:grid;justify-items:center;gap:7px;color:#7a8a9f;font-size:12px;font-weight:800;white-space:nowrap}
.portal-success-steps b{width:31px;height:31px;display:grid;place-items:center;border-radius:50%;background:#eef2f6;color:#718198}
.portal-success-steps .is-done{color:#177a56}.portal-success-steps .is-done b{background:#177a56;color:#fff;box-shadow:0 7px 16px rgba(23,122,86,.2)}
.portal-success-steps i{height:2px;background:linear-gradient(90deg,#cbd8e5,#e5ebf2);border-radius:99px}
.portal-success-actions{justify-content:center!important;margin-top:28px!important}.portal-success-actions .portal-action-btn{min-height:50px;padding:0 22px!important;border-radius:14px!important;font-weight:900;text-decoration:none!important;transition:transform .18s ease,box-shadow .18s ease}.portal-success-actions .portal-action-btn:hover{transform:translateY(-2px)}
.portal-success-actions .primary{background:linear-gradient(135deg,#225fa8,#17477f)!important;color:#fff!important;border-color:#17477f!important;box-shadow:0 12px 24px rgba(34,95,168,.23)}
.portal-success-actions .secondary{background:#fff!important;color:#284563!important;border:1px solid #cbd9e7!important;box-shadow:0 8px 18px rgba(20,42,70,.07)}
.portal-btn-icon{font-size:20px;line-height:1}

.customer-hero-actions{display:grid!important;grid-template-columns:repeat(2,minmax(145px,1fr));align-items:stretch!important;min-width:min(390px,100%)!important}
.customer-btn{position:relative;overflow:hidden;min-height:48px!important;padding:10px 15px!important;border-radius:14px!important;text-decoration:none!important;font-weight:900!important;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease!important}
.customer-btn:after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 30%,rgba(255,255,255,.20),transparent 70%);transform:translateX(110%);transition:transform .45s ease}
.customer-btn:hover{transform:translateY(-2px)}.customer-btn:hover:after{transform:translateX(-110%)}
.customer-btn-main{grid-column:1/-1;background:linear-gradient(135deg,#225fa8,#17477f)!important;color:#fff!important;border-color:#17477f!important;box-shadow:0 11px 23px rgba(34,95,168,.23)}
.customer-btn-soft{background:rgba(255,255,255,.82)!important;color:#254565!important;border:1px solid #cbd9e7!important;box-shadow:0 7px 17px rgba(20,42,70,.07)}
.customer-btn-danger{background:#fff5f5!important;color:#a33442!important;border:1px solid #f0c8ce!important;box-shadow:none!important}
.customer-btn-icon{width:27px;height:27px;display:grid;place-items:center;border-radius:9px;background:rgba(255,255,255,.18);font-size:18px}.customer-btn-soft .customer-btn-icon{background:#edf4fb}.customer-btn-danger .customer-btn-icon{background:#fde8eb}
.customer-action-card{transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}.customer-action-card:hover{transform:translateY(-3px);border-color:#c6d8eb;box-shadow:0 20px 46px rgba(15,35,75,.12)}
.customer-action-card .customer-card-btn{align-self:stretch!important;justify-content:space-between!important;min-height:47px!important;padding:0 16px!important;border-radius:13px!important;text-decoration:none!important;font-weight:900!important;background:linear-gradient(135deg,#225fa8,#17477f)!important;color:#fff!important;border-color:#17477f!important;box-shadow:0 10px 20px rgba(34,95,168,.18)}
.customer-action-card .customer-card-btn b{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:rgba(255,255,255,.17);font-size:19px}
.customer-action-card .customer-card-btn-soft{background:#f2f7fc!important;color:#254565!important;border:1px solid #cfdeec!important;box-shadow:none!important}.customer-action-card .customer-card-btn-soft b{background:#dfeaf5}
.customer-new-request-btn{min-height:42px!important;padding:8px 14px!important;border-radius:12px!important;background:linear-gradient(135deg,#225fa8,#17477f)!important;color:#fff!important;border-color:#17477f!important;text-decoration:none!important;font-weight:900!important;box-shadow:0 8px 17px rgba(34,95,168,.18)}
.customer-empty-btn{width:min(260px,100%);margin-inline:auto!important}
@media(max-width:620px){.portal-success-shell{place-items:start center;padding:18px 12px}.portal-success-card{margin-top:clamp(12px,6vh,42px);padding:30px 18px 22px!important;border-radius:23px!important}.portal-success-mark{width:78px;height:78px;border-radius:24px}.portal-success-mark svg{width:38px;height:38px}.portal-success-copy h1{font-size:27px!important}.portal-success-message{padding:14px;text-align:right}.portal-success-steps{gap:5px}.portal-success-steps div{font-size:10px}.portal-success-steps b{width:27px;height:27px}.portal-success-actions{display:grid!important;grid-template-columns:1fr;width:100%}.portal-success-actions .portal-action-btn{width:100%}.customer-hero-actions{grid-template-columns:1fr!important;width:100%!important;min-width:0!important}.customer-btn-main{grid-column:auto}.customer-btn{width:100%!important;justify-content:flex-start!important;padding-inline:14px!important}.customer-btn span:last-child{flex:1;text-align:right}.customer-action-card .customer-card-btn{width:100%!important}.customer-section-head .customer-new-request-btn{width:100%;justify-content:center}.customer-action-card:hover{transform:none}}

/* Customer dashboard compact statistics cards - 477 */
.customer-quick-grid{
  align-items:stretch;
}
.customer-stat-card{
  min-height:112px;
  padding:16px 18px;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:5px;
}
.customer-stat-card:after{
  width:82px;
  height:82px;
  left:-25px;
  top:-28px;
  opacity:.09;
}
.customer-stat-icon{
  position:absolute;
  top:14px;
  right:14px;
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:14px;
  background:#f2f6ff;
  font-size:21px;
  line-height:1;
}
.customer-stat-card small{
  display:block;
  width:100%;
  margin-top:26px;
  text-align:center;
  font-size:14px;
  line-height:1.5;
}
.customer-stat-card strong{
  display:block;
  width:100%;
  text-align:center;
  font-size:32px;
  line-height:1.05;
}
@media(max-width:620px){
  .customer-quick-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin-top:14px;
  }
  .customer-stat-card{
    min-height:108px;
    padding:12px 10px;
    border-radius:19px;
    gap:3px;
  }
  .customer-stat-card:after{
    width:64px;
    height:64px;
    left:-20px;
    top:-22px;
  }
  .customer-stat-icon{
    top:10px;
    right:10px;
    width:36px;
    height:36px;
    border-radius:12px;
    font-size:18px;
  }
  .customer-stat-card small{
    margin-top:25px;
    font-size:12px;
    white-space:nowrap;
  }
  .customer-stat-card strong{
    font-size:29px;
  }
}

/* Customer profile/register: shared Shamsi date field hint - v479 */
.customer-register-field .customer-date-hint{
  display:block;
  margin-top:7px;
  color:var(--text-muted,#64748b);
  font-size:.78rem;
  line-height:1.7;
  text-align:right;
}
.customer-register-field input.shamsi-date{
  direction:ltr;
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.customer-register-field input.shamsi-date.invalid-date{
  border-color:#dc2626 !important;
  box-shadow:0 0 0 3px rgba(220,38,38,.10) !important;
}

/* Customer portal header + profile completion final alignment — v480 */
.customer-dashboard-hero .customer-hero-main{
  display:block;
  flex:1 1 auto;
  min-width:0;
}
.customer-dashboard-hero .customer-identity-row{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:12px;
  position:relative;
  z-index:2;
}
.customer-dashboard-hero .customer-identity-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
}
.customer-dashboard-hero .customer-identity-copy .portal-kicker{
  margin:0;
  color:#1768c4;
  font-weight:850;
  line-height:1.6;
}
.customer-dashboard-hero .customer-identity-copy h1{
  margin:0;
  line-height:1.35;
}
.customer-dashboard-hero .customer-profile-completion{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  padding:8px 14px;
  border:1px solid #b9d4ee;
  border-radius:12px;
  background:linear-gradient(135deg,#f8fbff,#eaf4ff);
  color:#17477f;
  text-decoration:none;
  font-weight:850;
  box-shadow:0 6px 16px rgba(26,76,128,.08);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.customer-dashboard-hero .customer-profile-completion:hover{
  transform:translateY(-1px);
  border-color:#7eafe0;
  box-shadow:0 9px 20px rgba(26,76,128,.13);
}
.customer-dashboard-hero .customer-profile-completion.is-incomplete{
  border-color:#99c8af;
  background:linear-gradient(135deg,#f2fff8,#e5f8ee);
  color:#0b6845;
}
.customer-dashboard-hero .customer-profile-completion-icon{
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:8px;
  background:rgba(255,255,255,.82);
  font-size:15px;
}
.customer-dashboard-hero .customer-profile-completion > b{
  padding-inline-start:7px;
  border-inline-start:1px solid currentColor;
  opacity:.9;
}
.customer-profile-edit-shell .customer-register-field .customer-date-hint{
  display:block;
  margin-top:7px;
  color:#6b7f97;
  font-size:12px;
  line-height:1.6;
}
.customer-profile-edit-shell input.date,
.customer-profile-edit-shell input.js-date,
.customer-profile-edit-shell input.shamsi-date{
  direction:ltr;
  text-align:center;
  letter-spacing:.7px;
  font-variant-numeric:tabular-nums;
}
@media(max-width:760px){
  .customer-dashboard-shell{padding-top:8px!important;}
  .customer-dashboard-hero{padding:16px!important;}
  .customer-dashboard-hero .customer-identity-row{
    gap:12px;
    margin-bottom:10px;
  }
  .customer-dashboard-hero .customer-avatar{
    flex-basis:64px;
    width:64px;
    height:64px;
    border-radius:20px;
    font-size:29px;
  }
  .customer-dashboard-hero .customer-identity-copy h1{font-size:25px;}
  .customer-dashboard-hero .customer-identity-copy .portal-kicker{font-size:13px;}
  .customer-dashboard-hero .customer-hero-main > p{margin-top:4px;}
  .customer-dashboard-hero .customer-profile-completion{
    width:auto;
    flex:1 1 100%;
    min-height:44px;
  }
}

/* Phase 484 - Professional public inventory showroom (desktop + mobile) */
body.portal-body:has(.inventory-public-head){background:linear-gradient(180deg,#f7faff 0,#eef4fa 100%)}
body.portal-body:has(.inventory-public-head) .portal-shell{width:min(1580px,calc(100% - 36px));padding-top:22px;padding-bottom:44px}
.inventory-public-head{min-height:0!important;padding:24px 28px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:24px!important;border-radius:24px!important;background:linear-gradient(135deg,#fff 0%,#f8fbff 70%,#eef8f3 100%)!important}
.inventory-head-copy{min-width:0}.inventory-public-head h1{margin:3px 0 7px!important;font-size:28px!important;line-height:1.45!important}.inventory-public-head p{margin:0!important;line-height:1.8!important;font-size:13px!important}.inventory-head-actions{flex:0 0 auto;display:flex;gap:9px;align-items:center}.inventory-head-actions .btn{min-height:44px;border-radius:13px;padding:0 18px}
.polished-view-toolbar{margin:14px 0 10px!important;justify-content:flex-start!important}.inventory-view-label{margin-left:8px!important}.polished-view-toolbar .inventory-view-btn{min-width:116px!important;padding:8px 10px!important;border-radius:14px!important;box-shadow:none!important}.polished-view-toolbar .inventory-view-btn .view-icon{width:28px!important;height:28px!important;border-radius:10px!important}
.highlighted-search{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;align-items:center!important;gap:10px!important;padding:10px!important;margin:0 0 18px!important;border:1px solid #dce7f2!important;border-radius:18px!important;box-shadow:0 10px 28px rgba(15,35,75,.055)!important}
.inventory-search-field{position:relative;display:flex;align-items:center;min-width:0}.inventory-search-field>span{position:absolute;right:15px;color:#64748b;font-size:22px;pointer-events:none}.inventory-search-field input{width:100%;min-height:48px!important;padding:0 48px 0 42px!important;border:1px solid #d7e2ee!important;border-radius:13px!important;background:#fbfdff!important;font-size:14px!important}.inventory-search-field input:focus{background:#fff!important;border-color:#5f8f78!important;box-shadow:0 0 0 3px rgba(15,81,50,.09)!important}.inventory-search-clear{position:absolute;left:12px;width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:#eef2f7;color:#475569;text-decoration:none;font-size:20px}.highlighted-search>.btn{min-height:48px!important;border-radius:13px!important;padding-inline:24px!important}.inventory-result-count{white-space:nowrap;color:#64748b;font-size:12px;font-weight:900;padding:0 8px}
.public-title-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important}.public-inventory-card.autosadra-showcase-card{display:flex;flex-direction:column;border-radius:22px!important;box-shadow:0 12px 30px rgba(15,35,75,.075)!important;min-width:0}.public-inventory-card.autosadra-showcase-card:hover{transform:translateY(-2px)!important;box-shadow:0 18px 38px rgba(15,35,75,.11)!important}.showcase-image{height:205px!important;min-height:205px!important;max-height:205px!important;aspect-ratio:auto!important;background:linear-gradient(145deg,#e8eef5,#dbe6f0)!important}.showcase-image>img{width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important}.inventory-image-placeholder{width:100%;height:100%;display:grid;place-content:center;justify-items:center;gap:6px;color:#64748b}.inventory-image-placeholder span{font-size:48px}.inventory-image-placeholder small{font-weight:800}.showcase-status{right:11px!important;top:11px!important;padding:5px 9px!important;font-size:11px!important}.inventory-gallery-count{left:10px!important;bottom:10px!important;padding:5px 8px!important;font-size:11px!important}.showcase-body{padding:14px!important;display:flex;flex-direction:column;flex:1}.showcase-title-row h2{font-size:16px!important;line-height:1.7!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.showcase-mini-icon{width:32px!important;height:32px!important;flex-basis:32px!important;border-radius:11px!important}.showcase-badges{gap:5px!important;margin:8px 0!important}.showcase-badges span{padding:5px 8px!important;font-size:10.5px!important}.showcase-price-box{margin:6px 0 8px!important;padding:10px 11px!important;border-radius:14px!important}.showcase-price-box .public-price{font-size:15px!important}.showcase-desc{font-size:12px!important;line-height:1.75!important;margin:5px 0 0!important;padding-top:8px!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.showcase-contact-box{margin-top:auto!important;border-radius:14px!important;padding:8px 10px!important}.showcase-contact-box>div{min-height:32px!important}.showcase-contact-box strong,.showcase-contact-box span,.showcase-contact-box a{font-size:11px!important}.public-locked-details{margin-top:auto!important}
.inventory-empty-state{grid-column:1/-1!important;min-height:260px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:9px;border:1px dashed #bfd0e1!important;border-radius:24px!important;background:rgba(255,255,255,.72)!important}.inventory-empty-icon{font-size:48px}.inventory-empty-state strong{font-size:18px;color:#18324f}.inventory-empty-state small{color:#64748b}.inventory-empty-state .btn{margin-top:8px}
/* Clean comparison rows */
body.inventory-list-view .public-title-grid{gap:9px!important}.inventory-list-row{grid-template-columns:74px minmax(240px,2fr) repeat(4,minmax(82px,.72fr)) minmax(150px,1fr) minmax(92px,.65fr) minmax(128px,.85fr)!important;gap:9px!important;padding:11px 12px!important}.list-car-media{width:66px!important;height:58px!important;border-radius:12px!important}.list-car-main strong{font-size:14px!important}.list-car-main small{font-size:11px!important;line-height:1.6!important}.list-car-spec,.list-car-price,.list-car-contact{min-height:55px!important;border-radius:12px!important;padding:7px 9px!important}.list-car-spec b,.list-car-contact b,.list-car-price b,.inventory-tel-link{font-size:12px!important}
@media(max-width:1250px){.public-title-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}body.inventory-list-view .inventory-list-row{grid-template-columns:64px minmax(200px,1.6fr) repeat(4,minmax(72px,.7fr)) minmax(132px,.9fr) minmax(82px,.62fr) minmax(115px,.75fr)!important}}
@media(max-width:900px){body.portal-body:has(.inventory-public-head) .portal-shell{width:min(100% - 22px,760px);padding-top:12px}.inventory-public-head{padding:17px!important;border-radius:20px!important;align-items:flex-start!important}.inventory-public-head h1{font-size:23px!important}.inventory-public-head p{font-size:12px!important}.inventory-head-actions{flex-direction:column;align-items:stretch}.inventory-head-actions .btn{min-height:40px;padding-inline:13px}.public-title-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.highlighted-search{grid-template-columns:1fr auto!important}.inventory-result-count{grid-column:1/-1;padding:0 4px}.showcase-image{height:180px!important;min-height:180px!important;max-height:180px!important}}
@media(max-width:620px){body.portal-body:has(.inventory-public-head) .portal-shell{width:100%;padding:8px 10px 28px}.inventory-public-head{display:grid!important;grid-template-columns:1fr!important;padding:14px!important;gap:12px!important;border-radius:18px!important}.inventory-head-copy .portal-kicker{font-size:11px}.inventory-public-head h1{font-size:20px!important;margin-bottom:4px!important}.inventory-public-head p{font-size:11px!important;line-height:1.7!important}.inventory-head-actions{display:grid;grid-template-columns:1fr 1fr;flex-direction:unset}.inventory-head-actions .btn{min-height:42px!important;font-size:12px!important}.polished-view-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;margin:10px 0 8px!important}.inventory-view-label{grid-column:1/-1;font-size:11px!important}.polished-view-toolbar .inventory-view-btn{min-width:0!important;padding:7px 8px!important}.polished-view-toolbar .inventory-view-btn b{font-size:12px!important}.polished-view-toolbar .inventory-view-btn small{display:none}.highlighted-search{grid-template-columns:1fr auto!important;gap:7px!important;padding:7px!important;margin-bottom:10px!important;border-radius:15px!important}.inventory-search-field input{min-height:44px!important;font-size:12px!important;padding-right:42px!important}.highlighted-search>.btn{min-height:44px!important;padding-inline:15px!important;font-size:12px!important}.inventory-result-count{font-size:10px!important}.public-title-grid{grid-template-columns:1fr!important;gap:9px!important}.public-inventory-card.autosadra-showcase-card{display:grid!important;grid-template-columns:116px minmax(0,1fr)!important;min-height:142px!important;border-radius:17px!important;overflow:hidden!important}.showcase-image{grid-column:1!important;grid-row:1!important;width:116px!important;height:100%!important;min-height:142px!important;max-height:none!important;border-left:1px solid #e2e8f0}.showcase-image:after{height:40%!important}.inventory-image-placeholder span{font-size:34px}.inventory-image-placeholder small{font-size:10px}.showcase-status{right:7px!important;top:7px!important;font-size:9px!important;padding:4px 7px!important}.inventory-gallery-count{left:6px!important;bottom:6px!important;font-size:9px!important;padding:4px 6px!important}.showcase-body{grid-column:2!important;grid-row:1!important;padding:10px!important;min-width:0}.showcase-title-row h2{font-size:14px!important;line-height:1.55!important;-webkit-line-clamp:1}.showcase-mini-icon{display:none!important}.showcase-badges{margin:5px 0!important;gap:4px!important}.showcase-badges span{padding:4px 6px!important;font-size:9px!important}.showcase-price-box{padding:7px 8px!important;margin:4px 0!important;display:block!important}.showcase-price-box small{display:none!important}.showcase-price-box .public-price{font-size:13px!important}.showcase-desc{display:none!important}.showcase-contact-box{padding:5px 7px!important;margin-top:4px!important}.showcase-contact-box>div{min-height:24px!important}.showcase-contact-box>div:not(:first-child){display:none!important}.showcase-contact-box strong{display:none!important}.showcase-contact-box span,.showcase-contact-box a{font-size:10px!important}.public-locked-details{font-size:9px!important;padding:5px!important}.public-locked-details span{display:none}.inventory-empty-state{min-height:220px!important;border-radius:18px!important;padding:20px!important;text-align:center}
body.inventory-list-view .public-inventory-card.autosadra-showcase-card{display:block!important;min-height:0!important}.inventory-list-row{display:none}body.inventory-list-view .inventory-list-row{display:grid!important;grid-template-columns:58px minmax(0,1fr) auto!important;gap:8px!important;padding:9px!important}.list-car-media{grid-column:1!important;grid-row:1/3!important;width:58px!important;height:54px!important}.list-car-main{grid-column:2!important;grid-row:1!important;min-width:0}.list-car-main strong{font-size:12px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.list-car-main small{font-size:9px!important}.list-car-price{grid-column:3!important;grid-row:1/3!important;min-width:92px!important;padding:6px 7px!important}.list-car-price span{font-size:9px!important}.list-car-price b{font-size:10px!important;white-space:normal!important}.list-car-spec,.list-car-contact{display:none!important}}

/* ======================================================================
   Inventory public controls + gallery controls — central design pass 485
   ====================================================================== */
body.portal-body:has(.inventory-public-head){
  --inventory-primary:#0f6847;
  --inventory-primary-dark:#0a5037;
  --inventory-primary-soft:#eaf7f1;
  --inventory-border:#d8e4ee;
  --inventory-text:#17324d;
  --inventory-muted:#64748b;
}

/* Central button language: one size, one radius, one interaction model. */
.inventory-public-head .inventory-head-actions .btn,
.highlighted-search > .btn,
.inventory-empty-state .btn{
  min-height:46px!important;
  height:46px!important;
  padding:0 18px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  border:1px solid var(--inventory-border)!important;
  border-radius:14px!important;
  background:#fff!important;
  color:var(--inventory-text)!important;
  font-size:13px!important;
  font-weight:850!important;
  line-height:1!important;
  box-shadow:0 5px 14px rgba(15,35,75,.06)!important;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease!important;
  text-decoration:none!important;
}
.inventory-public-head .inventory-head-actions .btn.primary,
.highlighted-search > .btn.primary{
  color:#fff!important;
  border-color:var(--inventory-primary-dark)!important;
  background:linear-gradient(135deg,var(--inventory-primary),var(--inventory-primary-dark))!important;
  box-shadow:0 8px 18px rgba(15,104,71,.2)!important;
}
.inventory-public-head .inventory-head-actions .btn:hover,
.highlighted-search > .btn:hover,
.inventory-empty-state .btn:hover{
  transform:translateY(-1px)!important;
  border-color:#b9cad8!important;
  box-shadow:0 9px 20px rgba(15,35,75,.1)!important;
}
.inventory-public-head .inventory-head-actions .btn.primary:hover,
.highlighted-search > .btn.primary:hover{
  border-color:var(--inventory-primary-dark)!important;
  background:linear-gradient(135deg,#117650,#08472f)!important;
  box-shadow:0 11px 23px rgba(15,104,71,.26)!important;
}
.inventory-public-head .inventory-head-actions .btn:focus-visible,
.highlighted-search > .btn:focus-visible,
.inventory-view-btn:focus-visible{
  outline:3px solid rgba(34,95,168,.22)!important;
  outline-offset:3px!important;
}

/* Proper segmented control instead of two unrelated cards. */
.polished-view-toolbar{
  width:max-content!important;
  max-width:100%!important;
  margin:14px 0 10px auto!important;
  padding:5px!important;
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  border:1px solid var(--inventory-border)!important;
  border-radius:17px!important;
  background:rgba(255,255,255,.9)!important;
  box-shadow:0 6px 18px rgba(15,35,75,.055)!important;
}
.polished-view-toolbar .inventory-view-label{
  margin:0 5px 0 9px!important;
  color:var(--inventory-muted)!important;
  font-size:11px!important;
  font-weight:800!important;
  white-space:nowrap!important;
}
.polished-view-toolbar .inventory-view-btn{
  min-width:118px!important;
  min-height:48px!important;
  padding:6px 12px!important;
  display:grid!important;
  grid-template-columns:34px 1fr!important;
  grid-template-rows:auto auto!important;
  column-gap:8px!important;
  align-items:center!important;
  border:1px solid transparent!important;
  border-radius:12px!important;
  background:transparent!important;
  color:var(--inventory-text)!important;
  box-shadow:none!important;
  cursor:pointer!important;
  transition:.16s ease!important;
}
.polished-view-toolbar .inventory-view-btn .view-icon{
  grid-row:1/3!important;
  width:34px!important;
  height:34px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:10px!important;
  background:#eef4fa!important;
  color:#244e78!important;
  font-size:17px!important;
}
.polished-view-toolbar .inventory-view-btn b{font-size:12px!important;line-height:1.25!important;text-align:right!important}
.polished-view-toolbar .inventory-view-btn small{font-size:9.5px!important;line-height:1.25!important;text-align:right!important;color:#718096!important}
.polished-view-toolbar .inventory-view-btn:hover{background:#f5f9fc!important}
.polished-view-toolbar .inventory-view-btn.active{
  color:#fff!important;
  background:linear-gradient(135deg,var(--inventory-primary),var(--inventory-primary-dark))!important;
  box-shadow:0 7px 16px rgba(15,104,71,.2)!important;
}
.polished-view-toolbar .inventory-view-btn.active .view-icon{background:rgba(255,255,255,.15)!important;color:#fff!important}
.polished-view-toolbar .inventory-view-btn.active small{color:rgba(255,255,255,.78)!important}

/* Search action is a real CTA; result count is only informational. */
.highlighted-search > .btn{min-width:92px!important}
.inventory-result-count{
  min-height:32px!important;
  padding:0 10px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #dce7f0!important;
  border-radius:999px!important;
  background:#f5f9fc!important;
  color:#52667b!important;
  font-size:11px!important;
  font-weight:800!important;
  white-space:nowrap!important;
}

/* Fullscreen gallery: large, easy-to-hit, central-design controls. */
.inventory-lightbox-close,
.inventory-lightbox-prev,
.inventory-lightbox-next{
  width:60px!important;
  height:60px!important;
  min-width:60px!important;
  min-height:60px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.3)!important;
  border-radius:18px!important;
  color:#fff!important;
  background:rgba(15,23,42,.56)!important;
  -webkit-backdrop-filter:blur(14px)!important;
  backdrop-filter:blur(14px)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.28)!important;
  font-family:Arial,sans-serif!important;
  font-size:38px!important;
  font-weight:400!important;
  line-height:1!important;
  cursor:pointer!important;
  user-select:none!important;
  touch-action:manipulation!important;
  transition:transform .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease!important;
}
.inventory-lightbox-close{font-size:36px!important;border-radius:17px!important}
.inventory-lightbox-prev{left:24px!important}
.inventory-lightbox-next{right:24px!important}
.inventory-lightbox-close:hover,
.inventory-lightbox-prev:hover,
.inventory-lightbox-next:hover{
  transform:translateY(-50%) scale(1.06)!important;
  background:rgba(255,255,255,.2)!important;
  border-color:rgba(255,255,255,.5)!important;
  box-shadow:0 16px 36px rgba(0,0,0,.36)!important;
}
.inventory-lightbox-close:hover{
  transform:scale(1.06)!important;
  background:rgba(190,24,24,.75)!important;
  border-color:rgba(254,202,202,.72)!important;
}
.inventory-lightbox-close:focus-visible,
.inventory-lightbox-prev:focus-visible,
.inventory-lightbox-next:focus-visible{
  outline:3px solid rgba(147,197,253,.85)!important;
  outline-offset:4px!important;
}
.inventory-lightbox-counter{
  min-width:72px!important;
  min-height:38px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid rgba(255,255,255,.22)!important;
  background:rgba(15,23,42,.5)!important;
  -webkit-backdrop-filter:blur(10px)!important;
  backdrop-filter:blur(10px)!important;
  font-size:13px!important;
}

@media(max-width:760px){
  .inventory-public-head .inventory-head-actions .btn,
  .highlighted-search > .btn{min-height:44px!important;height:44px!important;border-radius:13px!important;padding-inline:13px!important;font-size:12px!important}
  .polished-view-toolbar{width:100%!important;margin:9px 0!important;display:grid!important;grid-template-columns:1fr 1fr!important;padding:4px!important;border-radius:15px!important}
  .polished-view-toolbar .inventory-view-label{grid-column:1/-1!important;margin:2px 5px 4px!important}
  .polished-view-toolbar .inventory-view-btn{min-width:0!important;min-height:44px!important;grid-template-columns:30px 1fr!important;padding:5px 7px!important;border-radius:11px!important}
  .polished-view-toolbar .inventory-view-btn .view-icon{width:30px!important;height:30px!important;font-size:15px!important;border-radius:9px!important}
  .polished-view-toolbar .inventory-view-btn small{display:none!important}
  .inventory-result-count{grid-column:1/-1!important;justify-self:start!important;min-height:28px!important;font-size:10px!important}

  /* Unlike the old implementation, mobile keeps the gallery arrows visible. */
  .inventory-lightbox-prev,
  .inventory-lightbox-next{
    display:grid!important;
    width:54px!important;
    height:54px!important;
    min-width:54px!important;
    min-height:54px!important;
    border-radius:16px!important;
    font-size:34px!important;
    background:rgba(15,23,42,.62)!important;
  }
  .inventory-lightbox-prev{left:10px!important}
  .inventory-lightbox-next{right:10px!important}
  .inventory-lightbox-close{
    width:56px!important;
    height:56px!important;
    min-width:56px!important;
    min-height:56px!important;
    border-radius:16px!important;
    font-size:34px!important;
  }
  .inventory-lightbox-topbar{padding:max(10px,env(safe-area-inset-top)) 10px 10px!important;gap:8px!important}
  .inventory-lightbox-title{max-width:48vw!important;font-size:12px!important}
  .inventory-lightbox-counter{min-width:62px!important;min-height:34px!important;font-size:11px!important;padding:4px 9px!important}
  .inventory-lightbox-thumbs{height:84px!important;padding:8px 10px calc(8px + env(safe-area-inset-bottom))!important}
  .inventory-lightbox-thumb{flex-basis:54px!important;width:54px!important;height:66px!important}
}

/* Phase 486 - compact mobile controls + tap-to-hide gallery chrome */
.inventory-lightbox-topbar,
.inventory-lightbox-prev,
.inventory-lightbox-next,
.inventory-lightbox-thumbs{
  transition:opacity .2s ease,transform .2s ease,visibility .2s ease!important;
}
.inventory-lightbox.controls-hidden .inventory-lightbox-topbar,
.inventory-lightbox.controls-hidden .inventory-lightbox-prev,
.inventory-lightbox.controls-hidden .inventory-lightbox-next,
.inventory-lightbox.controls-hidden .inventory-lightbox-thumbs{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
.inventory-lightbox.controls-hidden .inventory-lightbox-topbar{transform:translateY(-18px)!important}
.inventory-lightbox.controls-hidden .inventory-lightbox-thumbs{transform:translateY(18px)!important}
.inventory-lightbox.controls-hidden .inventory-lightbox-prev{transform:translate(-14px,-50%)!important}
.inventory-lightbox.controls-hidden .inventory-lightbox-next{transform:translate(14px,-50%)!important}
.inventory-lightbox-stage img{cursor:pointer}

@media(max-width:620px){
  .inventory-public-head{padding:12px!important;gap:10px!important}
  .inventory-head-actions{gap:7px!important}
  .inventory-public-head .inventory-head-actions .btn{
    min-height:38px!important;
    height:38px!important;
    padding-inline:10px!important;
    border-radius:11px!important;
    font-size:11px!important;
    box-shadow:none!important;
  }
  .polished-view-toolbar{
    padding:3px!important;
    gap:4px!important;
    border-radius:13px!important;
    box-shadow:none!important;
  }
  .polished-view-toolbar .inventory-view-label{
    margin:1px 4px 3px!important;
    font-size:10px!important;
  }
  .polished-view-toolbar .inventory-view-btn{
    min-height:38px!important;
    height:38px!important;
    grid-template-columns:25px 1fr!important;
    padding:3px 6px!important;
    border-radius:10px!important;
    box-shadow:none!important;
  }
  .polished-view-toolbar .inventory-view-btn .view-icon{
    width:25px!important;
    height:25px!important;
    font-size:13px!important;
    border-radius:8px!important;
  }
  .polished-view-toolbar .inventory-view-btn b{font-size:11px!important}
  .highlighted-search{
    grid-template-columns:minmax(0,1fr) 76px!important;
    padding:5px!important;
    gap:5px!important;
    border-radius:13px!important;
    box-shadow:none!important;
  }
  .inventory-search-field input{
    min-height:40px!important;
    height:40px!important;
    border-radius:10px!important;
    font-size:11px!important;
    padding-right:38px!important;
    padding-left:34px!important;
  }
  .inventory-search-field>span{right:12px!important;font-size:18px!important}
  .inventory-search-clear{left:8px!important;width:25px!important;height:25px!important;font-size:17px!important}
  .highlighted-search>.btn{
    min-width:76px!important;
    min-height:40px!important;
    height:40px!important;
    padding-inline:8px!important;
    border-radius:10px!important;
    font-size:11px!important;
    box-shadow:none!important;
  }
  .inventory-result-count{
    min-height:24px!important;
    padding:0 8px!important;
    font-size:9px!important;
  }
  .inventory-lightbox-prev,
  .inventory-lightbox-next{
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    min-height:50px!important;
    border-radius:15px!important;
    font-size:32px!important;
  }
  .inventory-lightbox-close{
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    min-height:50px!important;
    border-radius:15px!important;
    font-size:31px!important;
  }
}

/* ======================================================================
   Inventory controls — central alignment and readable typography 487
   ====================================================================== */
.polished-view-toolbar .inventory-view-btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  grid-template-columns:none!important;
  grid-template-rows:none!important;
  text-align:center!important;
}
.polished-view-toolbar .inventory-view-btn .view-icon{
  flex:0 0 auto!important;
  grid-row:auto!important;
}
.polished-view-toolbar .inventory-view-btn b{
  display:block!important;
  margin:0!important;
  font-size:14px!important;
  font-weight:900!important;
  line-height:1!important;
  text-align:center!important;
  white-space:nowrap!important;
}
.polished-view-toolbar .inventory-view-btn small{display:none!important}

@media(max-width:620px){
  .inventory-public-head .inventory-head-actions .btn,
  .highlighted-search>.btn{
    font-size:14px!important;
    font-weight:900!important;
    line-height:1.2!important;
  }
  .polished-view-toolbar{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    padding:5px!important;
  }
  .polished-view-toolbar .inventory-view-label{
    font-size:12px!important;
    line-height:1.5!important;
  }
  .polished-view-toolbar .inventory-view-btn{
    width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    height:46px!important;
    padding:0 12px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:9px!important;
    border-radius:12px!important;
  }
  .polished-view-toolbar .inventory-view-btn .view-icon{
    width:30px!important;
    height:30px!important;
    flex:0 0 30px!important;
    font-size:15px!important;
    border-radius:9px!important;
  }
  .polished-view-toolbar .inventory-view-btn b{
    flex:0 0 auto!important;
    font-size:14px!important;
    line-height:1!important;
    text-align:center!important;
  }
  .highlighted-search{
    grid-template-columns:minmax(0,1fr) 88px!important;
  }
  .highlighted-search>.btn{
    min-width:88px!important;
    font-size:14px!important;
  }
  .inventory-result-count{
    justify-self:start!important;
    margin-top:1px!important;
    font-size:11px!important;
    font-weight:850!important;
  }
}

/* ===== Internal user person-ledger scope ===== */
.auth-user-form.user-editor-v2 .ledger-scope-card{border:1px solid #dce8f3;background:linear-gradient(180deg,#fff,#f8fbfe);border-radius:18px;padding:18px;box-shadow:0 10px 28px rgba(24,63,100,.06)}
.auth-user-form.user-editor-v2 .ledger-scope-grid{align-items:start}
.auth-user-form.user-editor-v2 .ledger-selected-box{margin-top:14px;border:1px solid #dbe7f2;border-radius:16px;background:#fff;padding:14px}
.auth-user-form.user-editor-v2 .ledger-selected-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}
.auth-user-form.user-editor-v2 .ledger-selected-head>div{display:flex;flex-direction:column;gap:3px}
.auth-user-form.user-editor-v2 .ledger-selected-head b{color:#183f64}
.auth-user-form.user-editor-v2 .ledger-selected-head small{color:#71859a}
.auth-user-form.user-editor-v2 #ledgerPeopleSearch{width:min(340px,100%);min-height:42px;border:1px solid #d4e1ed;border-radius:12px;padding:8px 12px}
.auth-user-form.user-editor-v2 .ledger-people-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;max-height:310px;overflow:auto;padding:2px}
.auth-user-form.user-editor-v2 .ledger-person-check{display:flex;align-items:center;gap:9px;border:1px solid #e0e9f1;border-radius:12px;padding:10px;background:#fbfdff;cursor:pointer}
.auth-user-form.user-editor-v2 .ledger-person-check:has(input:checked){border-color:#79d5ad;background:#effcf6;box-shadow:0 0 0 2px rgba(26,155,103,.08)}
.auth-user-form.user-editor-v2 .ledger-person-check input{width:18px;height:18px;flex:0 0 auto}
.auth-user-form.user-editor-v2 .ledger-person-check span{display:flex;min-width:0;flex-direction:column;gap:2px}
.auth-user-form.user-editor-v2 .ledger-person-check b{font-size:12.5px;color:#244863;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.auth-user-form.user-editor-v2 .ledger-person-check small{font-size:11px;color:#7b8fa1}
@media(max-width:900px){.auth-user-form.user-editor-v2 .ledger-people-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.auth-user-form.user-editor-v2 .ledger-selected-head{align-items:stretch;flex-direction:column}.auth-user-form.user-editor-v2 #ledgerPeopleSearch{width:100%}.auth-user-form.user-editor-v2 .ledger-people-list{grid-template-columns:1fr;max-height:360px}}


/* v508: daily permission-aware dashboard welcome modal */
html.dashboard-welcome-open, body.dashboard-welcome-open{overflow:hidden!important}
.dashboard-welcome-modal{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;padding:20px;direction:rtl}
.dashboard-welcome-modal[hidden]{display:none!important}
.dashboard-welcome-backdrop{position:absolute;inset:0;background:rgba(7,24,48,.62);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.dashboard-welcome-dialog{position:relative;width:min(620px,100%);border:1px solid rgba(255,255,255,.72);border-radius:28px;background:linear-gradient(145deg,#fff,#f7fbff 55%,#effcf7);box-shadow:0 30px 90px rgba(3,18,38,.34);padding:26px;animation:dashboardWelcomeIn .28s ease both;overflow:hidden}
.dashboard-welcome-dialog:before{content:"";position:absolute;width:220px;height:220px;border-radius:50%;left:-90px;bottom:-120px;background:rgba(16,185,129,.11);pointer-events:none}
.dashboard-welcome-dialog-head{position:relative;display:flex;align-items:center;gap:15px;padding-bottom:18px;border-bottom:1px solid #e5edf6}
.dashboard-welcome-dialog-icon{width:58px;height:58px;display:grid;place-items:center;flex:0 0 58px;border-radius:20px;background:linear-gradient(145deg,#e7fff5,#e6f0ff);font-size:29px;box-shadow:inset 0 0 0 1px #dbeafe}
.dashboard-welcome-dialog h3{margin:2px 0 5px;color:#0f2746;font-size:24px}.dashboard-welcome-dialog p{margin:0;color:#64748b;line-height:1.8;font-size:13px}
.dashboard-welcome-items{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}
.dashboard-welcome-item{display:flex;align-items:center;gap:12px;min-height:92px;padding:15px;border:1px solid #dce8f5;border-radius:20px;background:#fff;color:#17365f;text-decoration:none;transition:.18s ease}
.dashboard-welcome-item:hover{transform:translateY(-2px);border-color:#9bc7b0;box-shadow:0 12px 30px rgba(15,81,50,.09)}
.dashboard-welcome-item-icon{width:44px;height:44px;display:grid;place-items:center;flex:0 0 44px;border-radius:15px;background:#eff6ff;font-size:21px}
.dashboard-welcome-item span:last-child{display:flex;flex-direction:column;gap:3px}.dashboard-welcome-item b{font-size:22px;color:#0f5132}.dashboard-welcome-item small{font-size:12px;color:#64748b;font-weight:800;line-height:1.6}
.dashboard-welcome-empty{grid-column:1/-1;padding:17px;border:1px dashed #b9d6c5;border-radius:18px;background:#f0fdf4;color:#166534;font-weight:900;text-align:center;line-height:1.8}
.dashboard-welcome-dialog-actions{position:relative;display:flex;justify-content:flex-end}.dashboard-welcome-dialog .welcome-dismiss-btn{min-width:190px;border:0;border-radius:14px;padding:12px 18px;background:#0f613d;color:#fff;font-weight:1000;cursor:pointer;box-shadow:0 10px 24px rgba(15,97,61,.2)}
.dashboard-welcome-modal.is-closing{opacity:0;transition:opacity .22s ease}.dashboard-welcome-modal.is-closing .dashboard-welcome-dialog{transform:translateY(10px) scale(.98);transition:.22s ease}
@keyframes dashboardWelcomeIn{from{opacity:0;transform:translateY(18px) scale(.97)}to{opacity:1;transform:none}}
@media(max-width:640px){.dashboard-welcome-modal{padding:12px}.dashboard-welcome-dialog{border-radius:23px;padding:18px}.dashboard-welcome-dialog-head{align-items:flex-start}.dashboard-welcome-dialog-icon{width:48px;height:48px;flex-basis:48px;border-radius:16px;font-size:24px}.dashboard-welcome-dialog h3{font-size:20px}.dashboard-welcome-items{grid-template-columns:1fr;gap:9px;margin:14px 0}.dashboard-welcome-item{min-height:76px;padding:12px;border-radius:17px}.dashboard-welcome-dialog-actions{display:block}.dashboard-welcome-dialog .welcome-dismiss-btn{width:100%;min-width:0}}

/* v510: daily customer welcome popup */
.customer-daily-welcome-dialog{background:linear-gradient(145deg,#fff,#f8fbff 52%,#fff8ed)}
.customer-daily-welcome-dialog:before{background:rgba(245,158,11,.10)}
.customer-daily-welcome-items .customer-welcome-alert{border-color:#fecaca;background:#fff7f7}
.customer-daily-welcome-items .customer-welcome-alert b{color:#b91c1c}
.customer-daily-welcome-modal .dashboard-welcome-dialog-actions{justify-content:center}
.customer-daily-welcome-modal .welcome-dismiss-btn{min-width:220px}
@media(max-width:640px){
  .customer-daily-welcome-modal .dashboard-welcome-dialog{max-height:calc(100vh - 24px);overflow:auto}
  .customer-daily-welcome-modal .welcome-dismiss-btn{width:100%;min-width:0}
}

/* Dashboard title font + mobile collapsible statistics — v512 */
.dashboard-hero-title{
  display:block;
  width:100%;
  max-width:100%;
  margin:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:clip;
  line-height:1.55;
}
.dashboard-business-name{
  display:inline;
  font-family:var(--dealership-title-font)!important;
  font-weight:900;
}
.dashboard-mobile-stats-toggle{
  display:none;
  border:1px solid rgba(255,255,255,.24);
  background:rgba(255,255,255,.1);
  color:#fff;
  border-radius:13px;
  min-height:40px;
  padding:7px 12px;
  align-items:center;
  justify-content:center;
  gap:7px;
  font:inherit;
  font-weight:900;
  cursor:pointer;
}
.dashboard-mobile-stats-toggle-icon{
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:rgba(255,255,255,.14);
  font-size:18px;
  line-height:1;
  transform:rotate(90deg);
}
@media(max-width:640px){
  .dashboard-mobile-shell .dashboard-hero-title{
    display:block!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    line-height:1.5!important;
    margin:0!important;
    -webkit-line-clamp:unset!important;
    -webkit-box-orient:initial!important;
  }
  .dashboard-mobile-stats-toggle{display:inline-flex;margin-top:9px}
  .dashboard-mobile-shell .hero-inline-stats{
    display:none!important;
    margin-top:8px!important;
  }
  .dashboard-mobile-shell .hero-inline-stats.is-open{
    display:grid!important;
    animation:dashboardStatsReveal .18s ease-out;
  }
  .dashboard-mobile-stats-toggle.is-open{background:rgba(255,255,255,.18)}
}
@keyframes dashboardStatsReveal{
  from{opacity:0;transform:translateY(-5px)}
  to{opacity:1;transform:translateY(0)}
}
\n\n/* Dashboard title sizing and reliable mobile statistics toggle — v513 */
.dashboard-hero-v2 .dashboard-hero-title{
  font-size:44px;
  font-weight:950;
  letter-spacing:-.35px;
  line-height:1.42;
}
@media(max-width:1200px) and (min-width:901px){
  .dashboard-hero-v2 .dashboard-hero-title{font-size:38px}
}
@media(max-width:900px){
  .dashboard-mobile-stats-toggle{
    display:inline-flex!important;
    position:relative;
    z-index:3;
    margin-top:10px;
  }
  .dashboard-mobile-shell [data-dashboard-hero-stats]:not(.is-open){
    display:none!important;
    visibility:hidden!important;
    max-height:0!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  .dashboard-mobile-shell [data-dashboard-hero-stats].is-open{
    display:grid!important;
    visibility:visible!important;
    max-height:none!important;
    margin-top:9px!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
  .dashboard-hero-v2 .dashboard-hero-title{
    font-size:25px;
    font-weight:950;
    line-height:1.45!important;
  }
}
@media(min-width:901px){
  .dashboard-mobile-stats-toggle{display:none!important}
  .dashboard-mobile-shell [data-dashboard-hero-stats]{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
}


/* v514: larger dashboard title and Rubika connection test inside its own card */
.dashboard-hero-v2 .dashboard-hero-title{
  font-size:68px!important;
  line-height:1.3!important;
  letter-spacing:-.6px;
}
.dashboard-hero-v2 .dashboard-business-name{
  font-size:1.08em;
}
.rubika-connection-inline-test{
  margin-top:16px!important;
}
@media(max-width:1200px) and (min-width:901px){
  .dashboard-hero-v2 .dashboard-hero-title{font-size:56px!important}
}
@media(max-width:900px){
  .dashboard-hero-v2 .dashboard-hero-title{
    font-size:36px!important;
    line-height:1.35!important;
  }
  .dashboard-hero-v2 .dashboard-business-name{font-size:1.05em}
}


/* v515: definitive dashboard title scale + global super-admin access release */
.dashboard-hero-v2 .dashboard-hero-title{
  --dashboard-title-size:40px;
  font-size:var(--dashboard-title-size)!important;
  line-height:1.5!important;
  overflow:visible!important;
  white-space:nowrap!important;
}
.dashboard-hero-v2 .dashboard-business-name{
  display:inline-block!important;
  font-size:2em!important;
  line-height:.9!important;
  vertical-align:-.08em;
  font-family:var(--dealership-title-font)!important;
  font-weight:900!important;
  margin-inline:4px;
}
@media(max-width:1200px) and (min-width:901px){
  .dashboard-hero-v2 .dashboard-hero-title{--dashboard-title-size:36px}
}
@media(max-width:900px){
  .dashboard-hero-v2 .dashboard-hero-title{
    --dashboard-title-size:34px;
    font-size:var(--dashboard-title-size)!important;
    overflow:hidden!important;
  }
  .dashboard-hero-v2 .dashboard-business-name{font-size:1.75em!important;margin-inline:2px}
}
@media(max-width:520px){
  .dashboard-hero-v2 .dashboard-hero-title{--dashboard-title-size:28px}
  .dashboard-hero-v2 .dashboard-business-name{font-size:1.65em!important}
}

/* system-flash-timer-516: پیام‌های موقت سراسری با تایمر و جمع‌شدن نرم */
.system-flash-stack.messages{
  position:fixed;
  inset-block-start:76px;
  inset-inline-start:24px;
  z-index:10050;
  width:min(430px,calc(100vw - 32px));
  margin:0!important;
  display:grid;
  gap:10px;
  pointer-events:none;
}
.system-flash-item[data-system-flash]{
  --flash-duration:6000ms;
  position:relative;
  overflow:hidden;
  margin:0!important;
  padding:14px 48px 17px 16px!important;
  border-radius:14px!important;
  box-shadow:0 14px 35px rgba(15,23,42,.18)!important;
  opacity:0;
  transform:translateY(-10px) scale(.985);
  transition:opacity .28s ease,transform .28s ease,max-height .35s ease,margin .35s ease,padding .35s ease;
  max-height:180px;
  pointer-events:auto;
}
.system-flash-item[data-system-flash].is-visible{opacity:1;transform:none}
.system-flash-item[data-system-flash].is-dismissing{
  opacity:0;
  transform:translateY(-8px) scale(.98);
  max-height:0;
  margin:0!important;
  padding-block:0!important;
  border-width:0!important;
}
.system-flash-close{
  position:absolute;
  inset-inline-start:10px;
  inset-block-start:9px;
  width:30px;
  height:30px;
  padding:0!important;
  border:0;
  border-radius:9px;
  background:rgba(255,255,255,.58)!important;
  color:inherit!important;
  font-size:20px;
  line-height:1;
  display:grid;
  place-items:center;
  cursor:pointer;
}
.system-flash-progress{
  position:absolute;
  inset-inline:0;
  inset-block-end:0;
  height:4px;
  background:rgba(15,23,42,.10);
  overflow:hidden;
}
.system-flash-progress::after{
  content:"";
  display:block;
  height:100%;
  width:100%;
  background:currentColor;
  opacity:.5;
  transform-origin:right center;
  animation:systemFlashCountdown var(--flash-duration) linear forwards;
}
.system-flash-item.is-paused .system-flash-progress::after{animation-play-state:paused}
@keyframes systemFlashCountdown{from{transform:scaleX(1)}to{transform:scaleX(0)}}
@media(max-width:900px){
  .system-flash-stack.messages{
    inset-block-start:64px;
    inset-inline:12px;
    width:auto;
  }
  .system-flash-item[data-system-flash]{font-size:14px;padding:13px 46px 16px 13px!important}
}
@media(prefers-reduced-motion:reduce){
  .system-flash-item[data-system-flash]{transition:none}
  .system-flash-progress::after{animation:none}
}

/* ===== RBAC permission cards orderly grid - build 519 ===== */
.modern-rbac .rbac-permission-area{
  min-width:0;
  background:#f8fbfe;
  padding:16px;
}
.modern-rbac .rbac-module-panel{
  border:0;
  background:transparent;
  box-shadow:none;
  overflow:visible;
}
.modern-rbac .rbac-module-head{
  position:sticky;
  top:70px;
  z-index:5;
  margin:-2px -2px 14px;
  padding:12px 14px;
  border:1px solid #dde8f2;
  border-radius:14px;
  background:rgba(255,255,255,.96);
  box-shadow:0 8px 20px rgba(15,45,77,.06);
  backdrop-filter:blur(8px);
}
.modern-rbac .rbac-module-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:5px;
}
.modern-rbac .rbac-module-meta small{
  margin:0;
}
.modern-rbac .rbac-module-selected{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 9px;
  border-radius:999px;
  background:#eef3f8;
  color:#5e7185;
  font-size:11px;
  font-weight:800;
}
.modern-rbac .rbac-module-selected.all-selected{
  background:#dcf7ec;
  color:#08785e;
}
.modern-rbac .rbac-table{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:11px;
  align-items:stretch;
}
.modern-rbac .rbac-row{
  position:relative;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 46px;
  align-items:center;
  gap:11px;
  min-width:0;
  min-height:82px;
  padding:13px 14px;
  border:1px solid #dce6f0;
  border-radius:16px;
  background:#fff;
  box-shadow:0 3px 10px rgba(31,59,85,.035);
  overflow:hidden;
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease,background .16s ease;
}
.modern-rbac .rbac-row::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:#d9e4ee;
  transition:.16s ease;
}
.modern-rbac .rbac-row:hover{
  border-color:#b8ccdd;
  background:#fff;
  box-shadow:0 9px 22px rgba(15,45,77,.09);
  transform:translateY(-2px);
}
.modern-rbac .rbac-row:has(input:checked){
  border-color:#9bd6c4;
  background:linear-gradient(135deg,#fff 0%,#f2fbf8 100%);
  box-shadow:0 6px 18px rgba(15,108,91,.08);
}
.modern-rbac .rbac-row:has(input:checked)::before{
  background:#16a085;
}
.modern-rbac .rbac-row-status{
  width:30px;
  height:30px;
  border-radius:10px;
  display:grid;
  place-items:center;
  border:1px solid #d9e4ee;
  background:#f4f7fa;
  color:#8192a3;
  flex:none;
}
.modern-rbac .rbac-row-status::after{
  content:"−";
  font-size:18px;
  line-height:1;
  font-weight:900;
}
.modern-rbac .rbac-row input:checked ~ .rbac-row-status{
  border-color:#9bd6c4;
  background:#def6ee;
  color:#08785e;
}
.modern-rbac .rbac-row input:checked ~ .rbac-row-status::after{
  content:"✓";
  font-size:16px;
}
.modern-rbac .rbac-row-text{
  gap:4px;
  min-width:0;
  align-self:center;
}
.modern-rbac .rbac-row-text b{
  color:#173b58;
  font-size:14px;
  line-height:1.65;
  white-space:normal;
  overflow-wrap:anywhere;
}
.modern-rbac .rbac-row-text small{
  display:block;
  max-width:100%;
  color:#8191a2;
  font-size:10px;
  line-height:1.45;
  direction:ltr;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.modern-rbac .rbac-row .rbac-switch{
  width:44px;
  height:24px;
  margin:0;
  justify-self:end;
}
.modern-rbac .rbac-row .rbac-switch::before{
  width:18px;
  height:18px;
  top:2px;
  right:3px;
}
.modern-rbac .rbac-row input:checked ~ .rbac-switch::before{
  right:21px;
}
.modern-rbac .rbac-row[hidden]{display:none!important}

@media (max-width:1250px){
  .modern-rbac .rbac-table{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:900px){
  .modern-rbac .rbac-module-head{position:static;}
  .modern-rbac .rbac-permission-area{padding:12px;}
}
@media (max-width:650px){
  .modern-rbac .rbac-table{grid-template-columns:1fr;gap:9px;}
  .modern-rbac .rbac-row{min-height:72px;padding:11px 12px;grid-template-columns:30px minmax(0,1fr) 44px;gap:9px;border-radius:14px;}
  .modern-rbac .rbac-row-status{width:28px;height:28px;border-radius:9px;}
  .modern-rbac .rbac-row-text b{font-size:14px;}
  .modern-rbac .rbac-module-head{margin:0 0 11px;}
}

/* unified-system-flash-537: رنگ‌بندی قطعی و یکسان برای همه پیام‌های سراسری */
.system-flash-item[data-system-flash]{
  color:#0f172a!important;
  border:1px solid transparent!important;
  background:#eff6ff!important;
}
.system-flash-item[data-system-flash][data-flash-category="ok"],
.system-flash-item[data-system-flash][data-flash-category="success"],
.system-flash-item[data-system-flash].ok,
.system-flash-item[data-system-flash].success{
  color:#14532d!important;
  background:#ecfdf5!important;
  border-color:#86efac!important;
  box-shadow:0 14px 35px rgba(22,101,52,.18)!important;
}
.system-flash-item[data-system-flash][data-flash-category="error"],
.system-flash-item[data-system-flash][data-flash-category="danger"],
.system-flash-item[data-system-flash].error,
.system-flash-item[data-system-flash].danger{
  color:#7f1d1d!important;
  background:#fef2f2!important;
  border-color:#fca5a5!important;
  box-shadow:0 14px 35px rgba(185,28,28,.16)!important;
}
.system-flash-item[data-system-flash][data-flash-category="warning"],
.system-flash-item[data-system-flash].warning{
  color:#78350f!important;
  background:#fffbeb!important;
  border-color:#fcd34d!important;
  box-shadow:0 14px 35px rgba(180,83,9,.16)!important;
}
.system-flash-item[data-system-flash][data-flash-category="info"],
.system-flash-item[data-system-flash].info{
  color:#1e3a8a!important;
  background:#eff6ff!important;
  border-color:#93c5fd!important;
  box-shadow:0 14px 35px rgba(30,64,175,.15)!important;
}

/* v569 - compact checks dashboard + multi-status filtering */
.checks-page-topbar{
  min-height:0!important;
  padding:11px 14px!important;
  margin-bottom:10px!important;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.checks-page-topbar .title h2{font-size:20px!important;margin:0 0 2px!important}
.checks-page-topbar .title p{margin:0!important;font-size:12px!important}
.checks-page-topbar .actions-bar{margin:0!important;gap:7px!important}
.checks-page-topbar .actions-bar .btn{min-height:36px!important;padding:7px 11px!important}

.checks-dashboard{
  grid-template-columns:repeat(5,minmax(130px,1fr))!important;
  gap:8px!important;
  margin:8px 0 10px!important;
}
.check-dash-card{
  min-height:82px!important;
  border-radius:15px!important;
  padding:9px 11px!important;
  display:flex!important;
  flex-direction:column;
  justify-content:center;
}
.check-dash-card span{font-size:12px!important;margin-bottom:2px!important}
.check-dash-card strong{font-size:19px!important;line-height:1.15!important;margin-bottom:1px!important}
.check-dash-card small{font-size:11px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.check-list-card{padding:12px!important}
.check-filter-bar{
  grid-template-columns:minmax(230px,1.8fr) minmax(160px,1fr) minmax(160px,1fr) minmax(180px,1fr) repeat(4,minmax(130px,.8fr)) minmax(155px,.8fr) minmax(105px,.5fr) auto auto!important;
  gap:8px!important;
  padding:10px!important;
  margin-bottom:9px!important;
  align-items:center!important;
}
.check-filter-bar input,.check-filter-bar select,.check-filter-bar button,.check-filter-bar .btn{
  min-height:42px;
}
.check-status-multiselect{position:relative;min-width:180px;z-index:20}
.check-status-multiselect>summary{
  min-height:42px;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 11px;
  border:1px solid #cbd7e6;
  border-radius:12px;
  background:#fff;
  color:#163b63;
  font-weight:800;
  cursor:pointer;
  list-style:none;
}
.check-status-multiselect>summary::-webkit-details-marker{display:none}
.check-status-multiselect>summary:after{content:'⌄';font-size:16px;color:#64748b}
.check-status-multiselect[open]>summary{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.check-status-multiselect>summary b{
  margin-right:auto;
  min-width:28px;
  height:24px;
  padding:0 7px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#e8f1fb;
  color:#174a78;
  font-size:11px;
}
.check-status-options{
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  width:min(390px,85vw);
  max-height:360px;
  overflow:auto;
  padding:10px;
  border:1px solid #d7e1ed;
  border-radius:16px;
  background:#fff;
  box-shadow:0 18px 45px rgba(15,35,70,.18);
}
.check-status-options-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 3px 8px;border-bottom:1px solid #edf2f7;margin-bottom:7px}
.check-status-options-head strong{font-size:13px;color:#173b61}
.check-status-clear{border:0;background:#f1f5f9;color:#475569;border-radius:9px;padding:6px 9px;font-weight:800;cursor:pointer}
.check-status-option{
  min-height:39px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:9px;
  padding:7px 8px;
  margin:2px 0;
  border-radius:10px;
  cursor:pointer;
  font-weight:750;
}
.check-status-option:hover{background:#f4f8fc}
.check-status-option:has(input:checked){background:#eaf5ef;color:#17613f}
.check-status-option input{width:18px!important;height:18px!important;min-height:0!important;margin:0;accent-color:#159167}
.check-status-option small{min-width:28px;text-align:center;border-radius:999px;background:#edf2f7;padding:3px 7px;color:#52677f;font-weight:800}
.check-status-option:has(input:checked) small{background:#ccebdc;color:#12613d}

.check-list-summary.compact{
  display:flex!important;
  align-items:stretch;
  gap:8px!important;
  margin:7px 0 10px!important;
}
.check-list-summary.compact .check-summary-card{
  flex:0 0 auto;
  min-width:175px;
  min-height:64px;
  padding:8px 12px!important;
  border-radius:13px!important;
  box-shadow:none!important;
}
.check-list-summary.compact .check-summary-card span{margin-bottom:2px!important;font-size:11px!important}
.check-list-summary.compact .check-summary-card strong{font-size:16px!important}
.check-active-statuses{
  flex:1;
  min-height:64px;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  padding:8px 11px;
  border:1px dashed #b8c9dd;
  border-radius:13px;
  background:#f8fbff;
}
.check-active-statuses-title{font-size:12px;font-weight:800;color:#60758c}
.check-active-status-chip{display:inline-flex;align-items:center;border:1px solid #b7ddca;border-radius:999px;background:#eaf7f0;color:#17613f;padding:5px 9px;font-size:12px;font-weight:800}

@media(max-width:1450px){
  .checks-dashboard{grid-template-columns:repeat(4,minmax(130px,1fr))!important}
  .check-filter-bar{grid-template-columns:repeat(4,minmax(150px,1fr))!important}
}
@media(max-width:1000px){
  .checks-dashboard{grid-template-columns:repeat(3,minmax(125px,1fr))!important}
  .check-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:768px){
  .checks-page-topbar{align-items:flex-start!important;padding:10px!important}
  .checks-page-topbar .title p{display:none}
  .checks-dashboard{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .check-dash-card{min-height:72px!important;padding:8px 9px!important}
  .check-dash-card strong{font-size:18px!important}
  .check-filter-bar{padding:10px!important;gap:8px!important}
  .check-status-multiselect{min-width:0;width:100%}
  .check-status-options{position:fixed;right:12px;left:12px;top:18vh;width:auto;max-height:62vh;z-index:9999}
  .check-list-summary.compact{display:grid!important;grid-template-columns:1fr 1fr!important}
  .check-list-summary.compact .check-summary-card{min-width:0!important;min-height:74px!important}
  .check-active-statuses{grid-column:1/-1;min-height:54px}
}

/* Phase 571: responsive live multi-status filters */
.check-filter-bar{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  overflow:visible;
}
.check-filter-bar > *{min-width:0;max-width:100%;box-sizing:border-box}
.check-filter-bar > input[name="q"]{grid-column:span 3}
.check-filter-bar > input[name="owner_q"],
.check-filter-bar > input[name="transferor_q"]{grid-column:span 2}
.check-filter-bar > .check-status-multiselect{grid-column:span 2}
.check-filter-bar > input.date{grid-column:span 2}
.check-filter-bar > select[name="sort"]{grid-column:span 2}
.check-filter-bar > select[name="dir"]{grid-column:span 1}
.check-filter-actions{
  grid-column:span 3;
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);
  gap:8px;
  min-width:0;
}
.check-filter-actions .btn{width:100%;margin:0;white-space:nowrap}
.check-filter-progress{
  grid-column:1/-1;
  color:#2563eb;
  font-size:12px;
  font-weight:800;
  padding:2px 4px 0;
}
.check-filter-bar.is-filtering{opacity:.78;pointer-events:none}
.check-status-multiselect{width:100%;min-width:0!important;z-index:70}
.check-status-options{box-sizing:border-box;max-width:min(390px,calc(100vw - 24px))}
.check-status-options-list{max-height:268px;overflow:auto;overscroll-behavior:contain;padding-left:2px}
.check-status-options-actions{
  position:sticky;
  bottom:-10px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:8px -10px -10px;
  padding:9px 10px 10px;
  border-top:1px solid #e6edf5;
  background:#fff;
  border-radius:0 0 16px 16px;
}
.check-status-options-actions .btn{min-height:38px!important;padding:7px 8px!important;margin:0!important}
.check-active-statuses{min-width:0;overflow:hidden}
.check-active-status-chip{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

@media(max-width:1450px){
  .check-filter-bar > input[name="q"]{grid-column:span 4}
  .check-filter-bar > input[name="owner_q"],
  .check-filter-bar > input[name="transferor_q"],
  .check-filter-bar > .check-status-multiselect{grid-column:span 4}
  .check-filter-bar > input.date{grid-column:span 3}
  .check-filter-bar > select[name="sort"]{grid-column:span 4}
  .check-filter-bar > select[name="dir"]{grid-column:span 2}
  .check-filter-actions{grid-column:span 6}
}
@media(max-width:1000px){
  .check-filter-bar > input[name="q"]{grid-column:1/-1}
  .check-filter-bar > input[name="owner_q"],
  .check-filter-bar > input[name="transferor_q"],
  .check-filter-bar > .check-status-multiselect,
  .check-filter-bar > input.date,
  .check-filter-bar > select[name="sort"],
  .check-filter-bar > select[name="dir"]{grid-column:span 6}
  .check-filter-actions{grid-column:1/-1}
}
@media(max-width:768px){
  .check-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:9px!important;overflow:visible!important}
  .check-filter-bar > input[name="q"],
  .check-filter-bar > input[name="owner_q"],
  .check-filter-bar > input[name="transferor_q"],
  .check-filter-bar > .check-status-multiselect,
  .check-filter-bar > select[name="sort"],
  .check-filter-actions,
  .check-filter-progress{grid-column:1/-1}
  .check-filter-bar > input.date,
  .check-filter-bar > select[name="dir"]{grid-column:span 1}
  .check-filter-actions{grid-template-columns:1fr 1fr;position:sticky;bottom:8px;z-index:25;padding:7px;border:1px solid #dce6f1;border-radius:13px;background:rgba(255,255,255,.96);box-shadow:0 8px 22px rgba(15,35,70,.12);backdrop-filter:blur(8px)}
  .check-status-options{
    position:fixed!important;
    inset:auto 10px 10px 10px!important;
    width:auto!important;
    max-width:none!important;
    max-height:min(72vh,560px)!important;
    display:flex;
    flex-direction:column;
    padding:11px!important;
    border-radius:18px!important;
    z-index:10020!important;
  }
  .check-status-options-list{max-height:none;flex:1;min-height:0;overflow:auto}
  .check-status-options-actions{bottom:-11px;margin:8px -11px -11px;padding:9px 11px 11px}
  body.check-status-picker-open:before{content:'';position:fixed;inset:0;background:rgba(15,23,42,.38);z-index:10010}
  .check-list-summary.compact{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;overflow:hidden}
  .check-list-summary.compact .check-summary-card{width:100%;max-width:100%;overflow:hidden}
  .check-list-summary.compact .check-summary-card strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .check-active-statuses{width:100%;max-width:100%}
}
@media(max-width:480px){
  .check-filter-bar > input.date,
  .check-filter-bar > select[name="dir"]{grid-column:1/-1}
  .check-filter-actions{grid-template-columns:1fr}
  .check-list-summary.compact{grid-template-columns:1fr!important}
}

/* v572: checks page without status dashboard; stable manual multi-status filter */
.checks-page-topbar{margin-bottom:10px!important}
.check-list-card{margin-top:0!important}
.check-filter-bar{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:end!important;
  padding:12px!important;
  overflow:visible!important;
}
.check-filter-bar > *{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
.check-filter-bar > input[name="q"]{grid-column:span 4!important}
.check-filter-bar > input[name="owner_q"],
.check-filter-bar > input[name="transferor_q"]{grid-column:span 2!important}
.check-filter-bar > .check-status-multiselect{grid-column:span 2!important}
.check-filter-bar > input.date{grid-column:span 2!important}
.check-filter-bar > select[name="sort"]{grid-column:span 3!important}
.check-filter-bar > select[name="dir"]{grid-column:span 2!important}
.check-filter-actions{grid-column:span 3!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
.check-filter-actions .btn{width:100%!important;justify-content:center!important;white-space:nowrap!important}
.check-filter-progress{display:none!important}
.check-status-options{max-width:min(420px,calc(100vw - 32px))!important}
.check-status-options-actions{position:sticky!important;bottom:0!important;background:#fff!important;padding-top:8px!important;z-index:2!important}
.check-list-summary.compact{margin-top:10px!important}

@media (max-width:1100px){
  .check-filter-bar{grid-template-columns:repeat(6,minmax(0,1fr))!important}
  .check-filter-bar > input[name="q"]{grid-column:span 6!important}
  .check-filter-bar > input[name="owner_q"],
  .check-filter-bar > input[name="transferor_q"],
  .check-filter-bar > .check-status-multiselect,
  .check-filter-bar > select[name="sort"]{grid-column:span 3!important}
  .check-filter-bar > input.date{grid-column:span 2!important}
  .check-filter-bar > select[name="dir"]{grid-column:span 2!important}
  .check-filter-actions{grid-column:span 4!important}
}

@media (max-width:700px){
  .checks-page-topbar{padding:12px!important}
  .checks-page-topbar .actions-bar{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important;gap:7px!important}
  .checks-page-topbar .actions-bar .btn{width:100%!important;justify-content:center!important}
  .check-list-card{padding:8px!important;overflow:visible!important}
  .check-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:9px!important;gap:7px!important}
  .check-filter-bar > input[name="q"],
  .check-filter-bar > input[name="owner_q"],
  .check-filter-bar > input[name="transferor_q"],
  .check-filter-bar > .check-status-multiselect,
  .check-filter-bar > select[name="sort"]{grid-column:1/-1!important}
  .check-filter-bar > input.date,
  .check-filter-bar > select[name="dir"]{grid-column:span 1!important}
  .check-filter-actions{grid-column:1/-1!important;grid-template-columns:1fr 1fr!important}
  .check-status-multiselect[open] .check-status-options{
    position:fixed!important;
    inset:auto 10px 10px 10px!important;
    width:auto!important;
    max-width:none!important;
    max-height:min(72vh,560px)!important;
    overflow:auto!important;
    border-radius:16px!important;
    z-index:10020!important;
  }
  .check-status-options-list{max-height:44vh!important;overflow:auto!important}
  .check-status-options-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
  .check-list-summary.compact{grid-template-columns:1fr 1fr!important;gap:7px!important}
  .check-active-statuses{grid-column:1/-1!important;display:flex!important;flex-wrap:wrap!important}
}

@media (max-width:420px){
  .check-filter-bar > input.date,
  .check-filter-bar > select[name="dir"]{grid-column:1/-1!important}
  .check-filter-actions{grid-template-columns:1fr!important}
  .check-list-summary.compact{grid-template-columns:1fr!important}
}


/* Checks: restored quick due-date filters - layout hotfix (v580) */
.check-due-quick-filters{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 8px;
  direction:rtl;
}
.check-due-filter{
  flex:0 0 168px;
  width:168px;
  min-width:168px;
  min-height:68px;
  box-sizing:border-box;
  padding:10px 13px;
  border:1px solid #d8e3ef;
  border-radius:15px;
  background:#fff;
  color:#173b61;
  text-decoration:none;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:stretch;
  gap:4px;
  overflow:hidden;
  box-shadow:0 4px 14px rgba(15,43,74,.04);
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.check-due-filter:hover{
  transform:translateY(-1px);
  box-shadow:0 7px 18px rgba(15,43,74,.08);
}
.check-due-filter-title{
  display:block;
  font-weight:900;
  font-size:12px;
  line-height:1.45;
  text-align:center;
  white-space:nowrap;
}
.check-due-filter-count{
  display:block;
  font-size:20px;
  line-height:1.15;
  font-weight:950;
  color:#132f50;
  text-align:center;
  white-space:nowrap;
}
.check-due-filter-amount{
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:10px;
  line-height:1.4;
  font-weight:800;
  color:#64748b;
  text-align:center;
  white-space:nowrap;
}
.check-due-filter.is-today{background:#fffaf2;border-color:#f5cb91}
.check-due-filter.is-overdue{background:#fff5f5;border-color:#f5b8b8}
.check-due-filter.is-today.is-active{border-color:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.15)}
.check-due-filter.is-overdue.is-active{border-color:#ef4444;box-shadow:0 0 0 3px rgba(239,68,68,.13)}
.check-due-filter-clear{
  flex:0 0 auto;
  align-self:center;
  padding:10px 13px;
  border-radius:11px;
  background:#edf3f8;
  color:#36516d;
  text-decoration:none;
  font-weight:900;
  white-space:nowrap;
}
@media(max-width:700px){
  .check-due-quick-filters{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    align-items:stretch;
    gap:8px;
  }
  .check-due-filter{
    width:100%;
    min-width:0;
    min-height:72px;
    padding:9px 7px;
    border-radius:13px;
  }
  .check-due-filter-title{font-size:11px}
  .check-due-filter-count{font-size:18px}
  .check-due-filter-amount{font-size:9px}
  .check-due-filter-clear{
    grid-column:1/-1;
    width:100%;
    box-sizing:border-box;
    text-align:center;
  }
}


/* v581 - checks status picker without internal scroll (desktop + mobile) */
.check-status-options{
  max-height:none!important;
  overflow:visible!important;
}
.check-status-options-list{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:3px 8px!important;
  max-height:none!important;
  overflow:visible!important;
  overscroll-behavior:auto!important;
  padding:0!important;
}
.check-status-option{
  min-width:0!important;
  margin:0!important;
}
.check-status-options-actions{
  position:static!important;
  bottom:auto!important;
  margin:9px -10px -10px!important;
}

@media(max-width:700px){
  .check-status-multiselect[open]{
    grid-column:1/-1!important;
  }
  .check-status-multiselect[open] .check-status-options,
  .check-status-options{
    position:relative!important;
    inset:auto!important;
    top:auto!important;
    right:auto!important;
    left:auto!important;
    bottom:auto!important;
    width:100%!important;
    max-width:100%!important;
    max-height:none!important;
    overflow:visible!important;
    margin-top:7px!important;
    box-shadow:0 10px 26px rgba(15,35,70,.12)!important;
    z-index:1!important;
  }
  .check-status-options-list{
    grid-template-columns:1fr 1fr!important;
    max-height:none!important;
    overflow:visible!important;
    flex:none!important;
  }
  .check-status-options-actions{
    position:static!important;
    margin:9px -11px -11px!important;
  }
  body.check-status-picker-open:before{
    display:none!important;
    content:none!important;
  }
}

@media(max-width:420px){
  .check-status-options-list{
    grid-template-columns:1fr!important;
  }
}

/* AutoSadra 590 - unified notification placement and visibility */
.system-notification-wrap[hidden]{display:none!important}
.system-notification-wrap{
  right:94px!important;
}
.app-topbar .topbar-home-button{right:52px!important}
.app-topbar .app-breadcrumb{right:132px!important}
.app-topbar:not(:has(.system-notification-wrap.has-notifications)) .app-breadcrumb{right:94px!important}
@media (max-width:900px){
  .system-notification-wrap{right:94px!important}
  .app-topbar .topbar-home-button{right:52px!important}
  .app-topbar .app-breadcrumb{right:132px!important}
  .app-topbar:not(:has(.system-notification-wrap.has-notifications)) .app-breadcrumb{right:94px!important}
}

/* ===== Server-side list pagination (installment contracts) ===== */
.list-pagination-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:14px 0 10px;
  padding:12px 14px;
  border:1px solid #dbe7f4;
  border-radius:16px;
  background:linear-gradient(180deg,#fff 0%,#f8fbff 100%);
  box-shadow:0 8px 22px rgba(15,61,112,.06);
}
.list-pagination-summary{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  color:#53657a;
  font-size:13px;
}
.list-pagination-summary strong{
  color:#123b69;
  font-size:16px;
}
.list-pagination-summary span::before{
  content:'•';
  margin-left:8px;
  color:#9fb1c5;
}
.page-size-form{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.page-size-form label{
  color:#42566d;
  font-size:13px;
  font-weight:700;
}
.page-size-form select{
  min-width:84px;
  height:38px;
  padding:0 12px;
  border:1px solid #cfddec;
  border-radius:11px;
  background:#fff;
  color:#123b69;
  font:inherit;
  font-weight:800;
  cursor:pointer;
  outline:none;
}
.page-size-form select:focus{
  border-color:#2b79d3;
  box-shadow:0 0 0 3px rgba(43,121,211,.12);
}
.modern-pagination{
  margin:16px 0 8px;
  padding:12px 14px;
  border:1px solid #dbe7f4;
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 22px rgba(15,61,112,.06);
}
.modern-pagination-desktop,
.modern-pagination-mobile{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.modern-pagination-mobile{ display:none; }
.pagination-pages{
  display:flex;
  align-items:center;
  gap:6px;
}
.pagination-page,
.pagination-nav-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:38px;
  padding:0 12px;
  border:1px solid #d5e1ee;
  border-radius:11px;
  background:#fff;
  color:#173f6b;
  font-size:13px;
  font-weight:800;
  text-decoration:none;
  transition:transform .15s ease,border-color .15s ease,background .15s ease,color .15s ease;
}
a.pagination-page:hover,
a.pagination-nav-btn:hover{
  transform:translateY(-1px);
  border-color:#7da9d8;
  background:#f2f8ff;
}
.pagination-page.is-current{
  border-color:#1769c2;
  background:linear-gradient(135deg,#1769c2,#0f4f92);
  color:#fff;
  box-shadow:0 6px 14px rgba(23,105,194,.22);
}
.pagination-nav-btn.is-disabled{
  opacity:.45;
  cursor:not-allowed;
}
.pagination-ellipsis{
  padding:0 3px;
  color:#718399;
  font-weight:900;
}
.pagination-current-label{
  min-width:120px;
  text-align:center;
  color:#173f6b;
  font-size:13px;
  font-weight:900;
}
@media (max-width: 720px){
  .list-pagination-toolbar{
    align-items:stretch;
    padding:10px 11px;
  }
  .list-pagination-summary{
    flex:1 1 auto;
  }
  .list-pagination-summary span{
    display:none;
  }
  .page-size-form label{
    display:none;
  }
  .page-size-form select{
    min-width:72px;
    height:36px;
  }
  .modern-pagination{
    margin:12px 0 6px;
    padding:10px;
  }
  .modern-pagination-desktop{ display:none; }
  .modern-pagination-mobile{ display:flex; }
  .pagination-nav-btn{
    min-width:72px;
    height:38px;
    padding:0 10px;
  }
}

/* AutoSadra 643 - preserve the original topbar order.
   No notifications: menu -> home -> breadcrumb
   With notifications: menu -> bell -> home -> breadcrumb */
.system-notification-wrap[hidden]{
  display:none!important;
}
.app-topbar .system-notification-wrap{
  position:absolute!important;
  top:5px!important;
  right:52px!important;
  left:auto!important;
  bottom:auto!important;
  margin:0!important;
  display:none!important;
  z-index:1202!important;
}
.app-topbar .system-notification-wrap.has-notifications:not([hidden]){
  display:block!important;
}
.app-topbar .topbar-home-button{
  right:52px!important;
}
.app-topbar.has-system-notifications .topbar-home-button{
  right:94px!important;
}
.app-topbar .app-breadcrumb{
  right:94px!important;
}
.app-topbar.has-system-notifications .app-breadcrumb{
  right:132px!important;
}
@media (max-width:900px){
  .app-topbar .system-notification-wrap{right:52px!important;}
  .app-topbar .topbar-home-button{right:52px!important;}
  .app-topbar.has-system-notifications .topbar-home-button{right:94px!important;}
  .app-topbar .app-breadcrumb{right:94px!important;}
  .app-topbar.has-system-notifications .app-breadcrumb{right:132px!important;}
}

/* Mobile optimization for lump payment */
@media (max-width:768px){
.improved-calc-page{max-width:100%;padding:0 8px}
.form-topbar{display:block}
.calc-topbar .quick-actions{display:grid;grid-template-columns:1fr;gap:10px}
.clean-calc-table{min-width:640px}
.formula-box{display:none}
.calc-line-table input,.calc-line-table .line-amount{min-width:110px}
.action-buttons,.calc-actions{display:grid;grid-template-columns:1fr;gap:10px}
.form-card{padding:12px}
.win-grid-4{grid-template-columns:1fr}
}

/* v649 - modern checks table, category filter, fixed row column and keyboard selection */
.check-filter-bar{
  grid-template-columns:repeat(14,minmax(0,1fr))!important;
}
.check-filter-bar > input[name="q"]{grid-column:span 4!important}
.check-filter-bar > input[name="owner_q"],
.check-filter-bar > input[name="transferor_q"]{grid-column:span 2!important}
.check-filter-bar > .check-status-multiselect{grid-column:span 3!important}
.check-filter-bar > .check-category-filter{grid-column:span 3!important}
.check-filter-bar > input.date{grid-column:span 2!important}
.check-filter-bar > select[name="sort"]{grid-column:span 2!important}
.check-filter-bar > select[name="dir"]{grid-column:span 1!important}
.check-filter-bar > .check-filter-actions{grid-column:span 3!important}
.check-category-filter{
  min-height:42px;
  border:1px solid #cbd7e6!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#163b63!important;
  font-weight:800!important;
}
.check-keyboard-hint{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:8px 16px;
  margin:4px 0 9px;
  padding:8px 12px;
  border:1px solid #dbe7f3;
  border-radius:13px;
  background:linear-gradient(180deg,#fbfdff,#f5f9fd);
  color:#52677f;
  font-size:12px;
  font-weight:800;
}
.check-keyboard-hint span{display:inline-flex;align-items:center;gap:5px}
.check-keyboard-hint kbd{
  min-width:24px;
  height:24px;
  padding:0 6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #cbd8e6;
  border-bottom-width:2px;
  border-radius:7px;
  background:#fff;
  color:#173b61;
  box-shadow:0 1px 2px rgba(15,35,70,.06);
  font-family:Tahoma,Arial,sans-serif;
  font-size:11px;
}
.check-table-wrap{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  border:0!important;
  border-radius:18px!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  background:transparent!important;
  padding:0 3px 7px!important;
}
.check-table{
  width:100%!important;
  min-width:1180px!important;
  table-layout:fixed!important;
  border-collapse:separate!important;
  border-spacing:0 7px!important;
  background:transparent!important;
}
.check-table col.check-col-row{width:66px}
.check-table col.check-col-person{width:230px}
.check-table col.check-col-bank{width:130px}
.check-table col.check-col-sayadi{width:185px}
.check-table col.check-col-amount{width:175px}
.check-table col.check-col-date{width:135px}
.check-table col.check-col-status{width:145px}
.check-table col.check-col-holder{width:155px}
.check-table col.check-col-actions{width:72px}
.check-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:4!important;
  height:46px!important;
  padding:10px 9px!important;
  border-top:1px solid #d6e2ef!important;
  border-bottom:1px solid #d6e2ef!important;
  background:linear-gradient(180deg,#edf5fc 0%,#e7f0f9 100%)!important;
  color:#173b61!important;
  font-size:13px!important;
  font-weight:950!important;
  text-align:center!important;
  white-space:nowrap!important;
}
.check-table thead th:first-child{
  border-right:1px solid #d6e2ef!important;
  border-radius:0 14px 14px 0!important;
}
.check-table thead th:last-child{
  border-left:1px solid #d6e2ef!important;
  border-radius:14px 0 0 14px!important;
}
.check-table thead th a{
  color:#174a78!important;
  text-decoration:none!important;
  border-bottom:1px dashed #8eb1d2;
}
.check-table tbody tr.check-data-row{
  cursor:pointer;
  outline:none;
}
.check-table tbody tr.check-data-row td{
  height:70px!important;
  padding:10px 10px!important;
  border-top:1px solid #e2eaf3!important;
  border-bottom:1px solid #e2eaf3!important;
  background:#fff!important;
  color:#1f3349!important;
  font-size:13px!important;
  text-align:center!important;
  vertical-align:middle!important;
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.check-table tbody tr.check-data-row td:first-child{
  border-right:1px solid #e2eaf3!important;
  border-radius:0 14px 14px 0!important;
}
.check-table tbody tr.check-data-row td:last-child{
  border-left:1px solid #e2eaf3!important;
  border-radius:14px 0 0 14px!important;
}
.check-table tbody tr.check-data-row:nth-child(even) td{background:#fbfdff!important}
.check-table tbody tr.check-data-row:hover td{
  background:#f1f7fd!important;
  border-color:#cbdced!important;
}
.check-table tbody tr.check-data-row:hover td:first-child{box-shadow:inset -4px 0 0 #3b82f6!important}
.check-table tbody tr.check-data-row.is-keyboard-selected td{
  background:#e9f3ff!important;
  border-top-color:#7fb3e8!important;
  border-bottom-color:#7fb3e8!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6)!important;
}
.check-table tbody tr.check-data-row.is-keyboard-selected td:first-child{
  border-right-color:#7fb3e8!important;
  box-shadow:inset -5px 0 0 #1769aa!important;
}
.check-table tbody tr.check-data-row.is-keyboard-selected td:last-child{border-left-color:#7fb3e8!important}
.check-table tbody tr.check-row-overdue td{background:#fff6f6!important;border-color:#f6d0d0!important}
.check-table tbody tr.check-row-due-today td{background:#fffaf1!important;border-color:#f2d8ad!important}
.check-table tbody tr.check-row-overdue.is-keyboard-selected td{background:#ffeaea!important;border-color:#ef9f9f!important}
.check-table tbody tr.check-row-due-today.is-keyboard-selected td{background:#fff1d9!important;border-color:#e7b966!important}
.check-row-number-head,
.check-row-number-cell{
  width:66px!important;
  min-width:66px!important;
  max-width:66px!important;
  overflow:visible!important;
  text-align:center!important;
}
.check-row-number-cell span{
  min-width:34px;
  height:34px;
  padding:0 7px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #cddbea;
  border-radius:10px;
  background:#f2f7fc;
  color:#173b61;
  font-weight:1000;
  direction:ltr;
  box-sizing:border-box;
}
.check-table .check-person-cell{text-align:right!important;white-space:normal!important}
.check-table .check-person-cell strong{
  display:block;
  max-width:100%;
  color:#12385f!important;
  font-size:14px!important;
  font-weight:950!important;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.check-table .check-person-cell small{
  display:block;
  margin-top:4px;
  color:#71849a!important;
  font-size:11px!important;
  font-weight:750!important;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.check-table .check-bank-cell,
.check-table .check-holder-cell{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:800!important;
}
.check-table .sayadi-cell{
  direction:ltr!important;
  text-align:center!important;
  font-family:Tahoma,Arial,sans-serif!important;
  letter-spacing:.7px!important;
  font-weight:800!important;
}
.check-table .strong-amount{
  color:#08633f!important;
  font-size:14px!important;
  font-weight:1000!important;
  white-space:nowrap!important;
}
.check-table .check-date-cell strong{display:block;font-family:Tahoma,Arial,sans-serif;font-size:13px}
.due-today-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:4px;
  padding:3px 7px;
  border-radius:999px;
  background:#fff0cf;
  color:#9a5b00;
  border:1px solid #f2cf8a;
  font-size:10px;
  font-weight:900;
}
.check-table .check-status-badge{min-width:100px!important;max-width:132px!important;white-space:nowrap!important}
.check-table td.actions.checks-actions{
  width:72px!important;
  min-width:72px!important;
  max-width:72px!important;
  padding:8px 5px!important;
  overflow:visible!important;
}
.check-actions-head{width:72px!important;min-width:72px!important;max-width:72px!important}
.check-table .check-actions-menu-wrap{display:flex;justify-content:center;align-items:center}
.check-table .check-actions-trigger{
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  border:1px solid #c9d8e7!important;
  border-radius:11px!important;
  background:#f8fbff!important;
  color:#173b61!important;
  font-size:20px!important;
  box-shadow:0 3px 8px rgba(15,35,70,.06)!important;
}
.check-table .check-actions-trigger:hover{background:#eaf3fc!important;border-color:#96b8d8!important}
.check-mobile-card.is-keyboard-selected{
  border-color:#2f80c5!important;
  box-shadow:0 0 0 3px rgba(47,128,197,.13),0 16px 36px rgba(15,35,70,.10)!important;
}

@media(max-width:1200px){
  .check-filter-bar{grid-template-columns:repeat(6,minmax(0,1fr))!important}
  .check-filter-bar > input[name="q"]{grid-column:span 6!important}
  .check-filter-bar > input[name="owner_q"],
  .check-filter-bar > input[name="transferor_q"],
  .check-filter-bar > .check-status-multiselect,
  .check-filter-bar > .check-category-filter,
  .check-filter-bar > select[name="sort"]{grid-column:span 3!important}
  .check-filter-bar > input.date{grid-column:span 2!important}
  .check-filter-bar > select[name="dir"]{grid-column:span 2!important}
  .check-filter-bar > .check-filter-actions{grid-column:span 4!important}
}
@media(max-width:768px){
  .check-keyboard-hint{display:none!important}
  .check-filter-bar > .check-category-filter{grid-column:1/-1!important}
  .check-mobile-card{cursor:pointer}
}


/* Modern redesign - installment contracts list v659 */
.installment-list-hero{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(340px,.95fr);gap:16px;align-items:stretch;padding:18px 20px;border:1px solid #dbe7f3;border-radius:24px;background:linear-gradient(135deg,#ffffff 0%,#eef6ff 58%,#f6fffb 100%);box-shadow:0 16px 42px rgba(15,23,42,.07);margin-bottom:14px;position:relative;overflow:hidden}.installment-list-hero:before{content:"";position:absolute;inset:auto auto -90px -60px;width:230px;height:230px;border-radius:50%;background:rgba(37,99,235,.07)}.installment-list-hero>*{position:relative;z-index:1}.installment-list-hero-main{display:flex;flex-direction:column;gap:14px}.installment-list-hero-kicker{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;background:#ecfdf5;border:1px solid #b7efcc;color:#0f5132;font-size:12px;font-weight:1000}.installment-list-hero-copy h1{margin:0 0 8px;color:#102f54;font-size:31px;line-height:1.2;font-weight:1000}.installment-list-hero-copy p{margin:0;color:#64748b;line-height:2;max-width:780px}.installment-hero-actions{gap:10px!important}.installment-list-hero-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.installment-mini-stat{display:grid;gap:8px;padding:16px 18px;border-radius:20px;background:rgba(255,255,255,.85);border:1px solid #dbe7f3;box-shadow:0 10px 24px rgba(15,23,42,.05)}.installment-mini-stat small{color:#64748b;font-size:12px;font-weight:800}.installment-mini-stat strong{font-size:22px;line-height:1.35;color:#102f54;font-weight:1000}.installment-mini-stat.active{background:linear-gradient(135deg,#effcf3,#fff)}.installment-mini-stat.active strong{color:#047857}.installment-mini-stat.settled{background:linear-gradient(135deg,#ecfeff,#fff)}.installment-mini-stat.settled strong{color:#0f766e}.installment-mini-stat.waiting{background:linear-gradient(135deg,#fff7ed,#fff)}.installment-mini-stat.waiting strong{color:#c2410c}.installment-mini-stat.total{background:linear-gradient(135deg,#eef6ff,#fff)}.installment-mini-stat.total strong{font-size:20px;color:#1d4ed8}.installment-hero-hint{grid-column:1/-1;padding-top:4px}.installment-ux-helper-strip.modernized{margin-top:0;background:linear-gradient(135deg,#fbfdff,#f8fbff)}
.modern-installment-table-card{padding:0!important;overflow:hidden!important;border-radius:24px!important;border:1px solid #dbe7f3!important;box-shadow:0 16px 42px rgba(15,23,42,.06)!important}.modern-table-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid #eaf0f6;background:linear-gradient(180deg,#ffffff 0%,#f9fbfe 100%)}.modern-table-head h3{margin:0 0 7px;color:#102f54;font-size:18px;font-weight:1000}.modern-table-head p{margin:0;color:#64748b;line-height:1.9}.modern-table-head-chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.head-chip{display:inline-flex;align-items:center;justify-content:center;padding:7px 12px;border-radius:999px;background:#f1f5f9;color:#334155;border:1px solid #e2e8f0;font-size:12px;font-weight:900}.head-chip.accent{background:#eef6ff;color:#1d4ed8;border-color:#bfdbfe}.modern-installment-table{min-width:1320px!important}.modern-installment-table thead th{background:#f8fbff!important;color:#17324d!important;font-size:12.5px!important;font-weight:1000!important;padding:14px 12px!important;border-bottom:1px solid #dbe7f3!important}.modern-installment-table tbody td{padding:14px 12px!important;vertical-align:middle!important;border-bottom:1px solid #edf2f7!important}.modern-installment-table tbody tr:nth-child(even) td{background:#fcfdff!important}.modern-installment-table tbody tr:hover td{background:#f7fbff!important}.modern-installment-table tbody tr.selected-row td{background:#eef6ff!important}.modern-row-index{font-weight:1000;color:#64748b;text-align:center}.modern-customer-cell{min-width:250px;max-width:340px}.customer-name{font-size:15px;font-weight:1000;color:#0f172a;margin-bottom:6px}.customer-meta{display:flex;flex-wrap:wrap;gap:6px}.customer-meta span,.contract-mini-meta span{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:11.5px;font-weight:800}.modern-status-cell{min-width:150px}.contract-mini-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.modern-installment-table td.amount{font-weight:1000;color:#102f54;white-space:nowrap}.modern-installment-table td.amount.positive{color:#047857}.modern-installment-table td.amount.penalty{color:#c2410c}.modern-installment-table td.amount.total-debt{color:#1d4ed8}.modern-installment-table .colored-category-badge{font-weight:900!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.55)}
@media(max-width:1200px){.installment-list-hero{grid-template-columns:1fr}.installment-list-hero-stats{grid-template-columns:repeat(4,minmax(0,1fr))}.modern-table-head{flex-direction:column;align-items:flex-start}.modern-table-head-chips{justify-content:flex-start}}
@media(max-width:900px){.installment-list-hero{padding:16px 14px;border-radius:20px}.installment-list-hero-copy h1{font-size:25px}.installment-list-hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.installment-mini-stat strong{font-size:18px}}
@media(max-width:560px){.installment-list-hero-stats{grid-template-columns:1fr}.installment-mini-stat.total strong{font-size:18px}}

/* Installment contracts list v659 — final modern desktop polish */
.installment-contracts-modern{
  --ic-ink:#102f54;
  --ic-muted:#64748b;
  --ic-line:#dbe7f3;
  --ic-soft:#f7fbff;
  gap:14px!important;
}
.installment-contracts-modern .installment-list-hero{
  margin:0!important;
  border-color:#d7e5f3;
}
.installment-contracts-modern .installment-hero-actions .btn{
  min-height:42px!important;
  border-radius:13px!important;
  padding-inline:15px!important;
  box-shadow:0 6px 16px rgba(15,35,70,.07)!important;
}
.installment-contracts-modern .installment-hero-actions .btn.primary{
  box-shadow:0 9px 20px rgba(4,120,87,.18)!important;
}
.installment-contracts-modern .installment-hero-hint{
  display:inline-flex!important;
  width:max-content;
  max-width:100%;
  padding:7px 11px!important;
  border:1px solid rgba(148,163,184,.25);
  border-radius:999px;
  background:rgba(255,255,255,.68);
  color:#526981!important;
  font-size:12px!important;
}
.installment-contracts-modern .contracts-toolbar-v3{
  padding:14px!important;
  gap:12px!important;
  border-radius:22px!important;
  border:1px solid var(--ic-line)!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:0 12px 30px rgba(15,23,42,.055)!important;
}
.installment-contracts-modern .status-tabs-v3{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:8px!important;
  padding:7px!important;
  border-radius:16px!important;
  background:#f1f6fb!important;
}
.installment-contracts-modern .status-tabs-v3 .status-tab{
  min-width:0!important;
  min-height:42px!important;
  padding:9px 10px!important;
  border-radius:12px!important;
  border:1px solid transparent!important;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease!important;
}
.installment-contracts-modern .status-tabs-v3 .status-tab:not(.is-active):hover{
  background:#fff!important;
  border-color:#dbe7f3!important;
  transform:translateY(-1px);
}
.installment-contracts-modern .status-tabs-v3 .status-tab.is-active{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,41,64,.15)!important;
}
.installment-contracts-modern .filterbar-v3{
  padding-top:12px!important;
  border-top:1px solid #e7eef6!important;
}
.installment-contracts-modern .installment-contract-filter-form{
  grid-template-columns:minmax(320px,1fr) minmax(190px,240px) minmax(150px,190px) 105px 105px!important;
  grid-template-areas:"search category amount button reset"!important;
  gap:10px!important;
}
.installment-contracts-modern .installment-contract-filter-form .clear-btn-v3{
  grid-area:reset!important;
  width:105px!important;
  height:42px!important;
}
.installment-contracts-modern .installment-contract-filter-form .search-btn-v3{
  width:105px!important;
  height:42px!important;
}
.installment-contracts-modern .installment-contract-filter-form input,
.installment-contracts-modern .installment-contract-filter-form select{
  height:42px!important;
  border-radius:12px!important;
  border-color:#cddbea!important;
  background:#fbfdff!important;
}
.installment-contracts-modern .installment-contract-filter-form input:focus,
.installment-contracts-modern .installment-contract-filter-form select:focus{
  outline:0!important;
  border-color:#4c8cc7!important;
  box-shadow:0 0 0 3px rgba(76,140,199,.12)!important;
  background:#fff!important;
}
.installment-contracts-modern .installment-ux-helper-strip.modernized{
  margin:0!important;
  padding:10px 13px!important;
  border-radius:15px!important;
  border-style:dashed!important;
  font-size:12px!important;
  box-shadow:none!important;
}
.installment-contracts-modern .list-pagination{
  border-radius:16px!important;
}
.installment-contracts-modern .modern-installment-table-card{
  margin:0!important;
}
.installment-contracts-modern .top-contract-table.win-fixed-table{
  min-height:430px!important;
  max-height:calc(100vh - 310px)!important;
  scrollbar-gutter:stable both-edges;
}
.installment-contracts-modern .top-contract-table .modern-installment-table{
  min-width:1260px!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
.installment-contracts-modern .modern-installment-table thead th{
  top:0!important;
  z-index:6!important;
  height:50px!important;
  box-shadow:inset 0 -1px 0 #dbe7f3!important;
}
.installment-contracts-modern .modern-installment-table tbody td{
  height:68px;
}
.installment-contracts-modern .modern-installment-table tbody tr{
  cursor:pointer;
  transition:box-shadow .15s ease;
}
.installment-contracts-modern .modern-installment-table tbody tr:focus{
  outline:0;
}
.installment-contracts-modern .modern-installment-table tbody tr.selected-row td:first-child{
  box-shadow:inset -4px 0 0 #2f80c5!important;
}
.installment-contracts-modern .modern-row-index{
  width:58px;
  min-width:58px;
}
.installment-contracts-modern .modern-customer-cell{
  min-width:275px!important;
}
.installment-contracts-modern .modern-installment-table .installment-status-pill{
  min-width:86px;
}
.installment-contracts-modern .modern-installment-table .row-action-trigger{
  width:38px!important;
  height:38px!important;
  border-radius:12px!important;
  box-shadow:0 4px 10px rgba(15,35,70,.07)!important;
}
.installment-contracts-modern .modern-installment-table .row-action-dropdown{
  min-width:190px;
  border-radius:14px!important;
  box-shadow:0 18px 42px rgba(15,23,42,.16)!important;
}
.installment-contracts-modern .list-only-hint-v3{display:none!important}

@media(max-width:1250px){
  .installment-contracts-modern .installment-contract-filter-form{
    grid-template-columns:minmax(270px,1fr) minmax(170px,210px) 160px 96px 96px!important;
  }
  .installment-contracts-modern .installment-list-hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:1050px){
  .installment-contracts-modern .status-tabs-v3{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .installment-contracts-modern .installment-contract-filter-form{
    grid-template-columns:1fr 1fr!important;
    grid-template-areas:"search search" "category amount" "button reset"!important;
  }
  .installment-contracts-modern .installment-contract-filter-form .search-btn-v3,
  .installment-contracts-modern .installment-contract-filter-form .clear-btn-v3{width:100%!important}
}
@media(max-width:900px){
  .installment-contracts-modern .installment-list-hero{display:block!important}
  .installment-contracts-modern .installment-list-hero-stats{margin-top:14px}
  .installment-contracts-modern .installment-hero-hint{display:none!important}
  .installment-contracts-modern .status-tabs-v3{display:flex!important;grid-template-columns:none!important;overflow-x:auto!important}
  .installment-contracts-modern .status-tabs-v3 .status-tab{min-width:120px!important}
}
@media(max-width:620px){
  .installment-contracts-modern .installment-contract-filter-form{
    grid-template-columns:1fr!important;
    grid-template-areas:"search" "category" "amount" "button" "reset"!important;
  }
  .installment-contracts-modern .installment-list-hero-stats{grid-template-columns:1fr 1fr!important}
}

/* installment contract detail - modern installment list v5 - 1405/05/10 */
.installment-list-modern-v5{
  overflow:hidden;
  border:1px solid #dbe6f2;
  border-radius:22px;
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
  box-shadow:0 14px 38px rgba(15,45,78,.07);
}
.installment-list-head-v5{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:18px 20px;
  border-bottom:1px solid #e3ebf4;
  background:linear-gradient(135deg,#f7fbff 0%,#ffffff 55%,#f3fbf7 100%);
}
.installment-list-title-v5{display:flex;align-items:center;gap:13px;min-width:260px}
.installment-list-icon-v5{
  width:48px;height:48px;flex:0 0 48px;border-radius:16px;display:grid;place-items:center;
  color:#fff;background:linear-gradient(145deg,#173f67,#0f766e);font-size:24px;font-weight:900;
  box-shadow:0 10px 22px rgba(16,76,104,.18)
}
.installment-list-title-v5 small{display:block;color:#0f766e;font-size:11px;font-weight:900;margin-bottom:3px}
.installment-list-title-v5 h2{margin:0;color:#102f50;font-size:19px;font-weight:1000;line-height:1.5}
.installment-list-title-v5 p{margin:3px 0 0;color:#6b7f94;font-size:12px;font-weight:700}
.installment-list-stats-v5{display:grid;grid-template-columns:repeat(4,minmax(118px,1fr));gap:9px;min-width:min(100%,610px)}
.installment-list-stats-v5>div{
  position:relative;overflow:hidden;display:flex;flex-direction:column;gap:5px;min-height:62px;
  padding:10px 12px;border:1px solid #dfe8f2;border-radius:15px;background:#fff;
}
.installment-list-stats-v5>div:before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:4px;background:#94a3b8}
.installment-list-stats-v5 span{color:#718096;font-size:11px;font-weight:850}
.installment-list-stats-v5 b{color:#17324d;font-size:15px;font-weight:1000;white-space:nowrap}
.installment-list-stats-v5 .is-paid:before{background:#16a34a}.installment-list-stats-v5 .is-paid b{color:#087a35}
.installment-list-stats-v5 .is-remaining:before{background:#f59e0b}.installment-list-stats-v5 .is-remaining b{color:#b45309}
.installment-list-stats-v5 .is-payable:before{background:#2563eb}.installment-list-stats-v5 .is-payable b{color:#174ea6}
.installment-list-alerts-v5{display:flex;gap:8px;flex-wrap:wrap;padding:10px 20px 0;background:#fff}
.installment-list-alerts-v5 span{display:inline-flex;align-items:center;padding:6px 11px;border-radius:999px;font-size:12px;font-weight:900;border:1px solid}
.installment-list-alerts-v5 .is-overdue{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
.installment-list-alerts-v5 .is-due{background:#fff7ed;color:#c2410c;border-color:#fed7aa}
.installment-modern-table-wrap-v5{
  margin:12px 14px 14px;min-height:0;max-height:none;
  border:1px solid #dbe5f0;border-radius:18px;background:#f4f8fc;overflow-x:auto;overflow-y:visible;
}
.installment-full-table-v4 .installment-modern-table-v5{min-width:1120px;border-collapse:separate;border-spacing:0 8px;padding:0 8px 8px}
.installment-modern-table-v5 thead th{
  position:sticky;top:0;z-index:4;height:48px;padding:10px 12px;
  background:#eaf2fb;color:#173b60;border-top:0;border-bottom:1px solid #cbd9e8;
  font-size:12px;font-weight:1000;text-align:center;white-space:nowrap;
}
.installment-modern-table-v5 thead th:first-child{border-radius:0 12px 12px 0}
.installment-modern-table-v5 thead th:last-child{border-radius:12px 0 0 12px}
.installment-modern-table-v5 tbody tr{--row-accent:#94a3b8;transition:transform .16s ease,filter .16s ease,box-shadow .16s ease}
.installment-modern-table-v5 tbody tr.is-paid{--row-accent:#16a34a}
.installment-modern-table-v5 tbody tr.is-due{--row-accent:#f59e0b}
.installment-modern-table-v5 tbody tr.is-overdue{--row-accent:#dc2626}
.installment-modern-table-v5 tbody tr.is-unpaid{--row-accent:#3b82f6}
.installment-modern-table-v5 tbody tr:hover{transform:translateY(-1px);filter:drop-shadow(0 7px 10px rgba(15,41,64,.08))}
.installment-modern-table-v5 tbody td{
  height:72px;padding:10px 12px;background:#fff;border-top:1px solid #e2eaf3;border-bottom:1px solid #e2eaf3;
  color:#17324d;vertical-align:middle;text-align:center;font-size:13px;
}
.installment-modern-table-v5 tbody td:first-child{border-right:4px solid var(--row-accent);border-radius:0 14px 14px 0}
.installment-modern-table-v5 tbody td:last-child{border-left:1px solid #e2eaf3;border-radius:14px 0 0 14px}
.installment-modern-table-v5 tbody tr.is-selected td{background:#edf6ff!important;box-shadow:inset 0 1px 0 #8cbcf2,inset 0 -1px 0 #8cbcf2!important}
.installment-modern-table-v5 tbody tr.is-selected td:first-child{border-right-color:#165fb4!important;box-shadow:inset 0 1px 0 #8cbcf2,inset 0 -1px 0 #8cbcf2!important}
.installment-modern-table-v5 .col-index{width:64px}.installment-modern-table-v5 .col-installment{width:170px}.installment-modern-table-v5 .col-amount{width:145px}
.installment-modern-table-v5 .col-status{width:135px}.installment-modern-table-v5 .col-payment{width:235px}.installment-modern-table-v5 .col-payable{width:235px}
.installment-modern-table-v5 .col-paid-date{width:135px}.installment-modern-table-v5 .col-guarantee{width:160px}
.installment-index-v5{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#f0f5fb;border:1px solid #d3e0ed;color:#123a60;font-weight:1000}
.installment-identity-v5{display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:right}
.installment-identity-v5 b{font-size:14px;color:#102f50;font-weight:1000}.installment-identity-v5 span{color:#64748b;font-size:12px;font-weight:800}
.installment-identity-v5 small{color:#1260ad;font-size:11px;font-weight:900}
.money-primary-v5{display:block;color:#0f5132;font-size:14px;font-weight:1000;white-space:nowrap}
.installment-money-stack-v5{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.installment-money-stack-v5 span{display:flex;flex-direction:column;gap:3px;padding:7px 8px;border:1px solid #e3ebf4;border-radius:11px;background:#f9fbfd;min-width:0}
.installment-money-stack-v5 small{color:#718096;font-size:10px;font-weight:850;white-space:nowrap}
.installment-money-stack-v5 b{color:#334155;font-size:12px;font-weight:1000;white-space:nowrap}
.installment-money-stack-v5 .is-credit{color:#087a35}.installment-money-stack-v5 .is-debt{color:#b42318}.installment-money-stack-v5 .is-penalty{color:#c2410c}.installment-money-stack-v5 .is-payable{color:#174ea6}
.installment-date-v5{display:flex;flex-direction:column;gap:4px}.installment-date-v5 b{color:#17324d;font-weight:1000;white-space:nowrap}.installment-date-v5 small{color:#94a3b8;font-size:10px;font-weight:800}
.installment-guarantee-chip-v5{display:inline-flex;flex-direction:column;align-items:center;gap:3px;padding:7px 10px;border-radius:12px;background:#eef5ff;border:1px solid #d5e5fa;color:#164e86}
.installment-guarantee-chip-v5 b{font-size:12px;font-weight:1000}.installment-guarantee-chip-v5 small{font-size:10px;font-weight:800;white-space:nowrap}
.installment-no-guarantee-v5{color:#94a3b8;font-size:11px;font-weight:850}
.installment-modern-empty-v5{height:130px!important;border:1px dashed #b9cadc!important;border-radius:14px!important;color:#64748b!important;font-weight:900!important}

@media (max-width:1100px) and (min-width:801px){
  .installment-list-head-v5{align-items:flex-start;flex-direction:column}
  .installment-list-stats-v5{width:100%;min-width:0}
  .installment-modern-table-wrap-v5{max-height:none}
}
@media (max-width:800px){
  .installment-list-head-v5{display:block;padding:14px}
  .installment-list-title-v5{margin-bottom:12px}.installment-list-title-v5 p{display:none}
  .installment-list-icon-v5{width:42px;height:42px;flex-basis:42px;border-radius:14px}
  .installment-list-title-v5 h2{font-size:17px}
  .installment-list-stats-v5{grid-template-columns:1fr 1fr;min-width:0;gap:7px}
  .installment-list-stats-v5>div{min-height:58px;padding:9px 10px}
  .installment-list-stats-v5 .is-payable{grid-column:1/-1}
  .installment-list-alerts-v5{padding:9px 12px 0}
  .installment-modern-table-wrap-v5{display:none!important}
}


/* v668 - checks filters: remove redundant person filters and normalize responsive layout */
.check-filter-bar{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:9px!important;
  align-items:stretch!important;
  overflow:visible!important;
}
.check-filter-bar > *{
  min-width:0!important;
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
.check-filter-bar > input[name="q"]{grid-column:span 4!important}
.check-filter-bar > .check-status-multiselect{grid-column:span 2!important}
.check-filter-bar > .check-category-filter{grid-column:span 2!important}
.check-filter-bar > select[name="sort"]{grid-column:span 3!important}
.check-filter-bar > select[name="dir"]{grid-column:span 1!important}
.check-filter-bar > input.date{grid-column:span 2!important}
.check-filter-bar > .check-filter-actions{
  grid-column:span 4!important;
  display:grid!important;
  grid-template-columns:1.25fr 1fr!important;
  gap:9px!important;
  position:static!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
.check-filter-bar > input,
.check-filter-bar > select,
.check-filter-bar > .check-status-multiselect > summary,
.check-filter-bar > .check-filter-actions .btn{
  min-height:46px!important;
  height:46px!important;
  border-radius:13px!important;
}

@media (max-width:1200px){
  .check-filter-bar{grid-template-columns:repeat(6,minmax(0,1fr))!important}
  .check-filter-bar > input[name="q"]{grid-column:1/-1!important}
  .check-filter-bar > .check-status-multiselect,
  .check-filter-bar > .check-category-filter{grid-column:span 3!important}
  .check-filter-bar > input.date{grid-column:span 3!important}
  .check-filter-bar > select[name="sort"]{grid-column:span 4!important}
  .check-filter-bar > select[name="dir"]{grid-column:span 2!important}
  .check-filter-bar > .check-filter-actions{grid-column:1/-1!important}
}

@media (max-width:768px){
  .check-list-card{padding:8px!important;overflow:visible!important}
  .check-filter-bar{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    padding:9px!important;
    border-radius:17px!important;
  }
  .check-filter-bar > input[name="q"],
  .check-filter-bar > .check-status-multiselect,
  .check-filter-bar > .check-category-filter,
  .check-filter-bar > select[name="sort"],
  .check-filter-bar > select[name="dir"],
  .check-filter-bar > .check-filter-actions,
  .check-filter-bar > .check-filter-progress{
    grid-column:1/-1!important;
  }
  .check-filter-bar > input.date{grid-column:span 1!important}
  .check-filter-bar > input,
  .check-filter-bar > select,
  .check-filter-bar > .check-status-multiselect > summary,
  .check-filter-bar > .check-filter-actions .btn{
    min-height:48px!important;
    height:48px!important;
    font-size:14px!important;
    border-radius:14px!important;
  }
  .check-filter-bar > .check-filter-actions{
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    margin-top:2px!important;
  }
  .check-filter-bar > .check-filter-actions .btn{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    margin:0!important;
  }
  .check-status-multiselect[open]{z-index:10030!important}
  .check-status-multiselect[open] .check-status-options{
    position:fixed!important;
    inset:auto 10px 10px 10px!important;
    width:auto!important;
    max-width:none!important;
    max-height:min(72vh,560px)!important;
    overflow:auto!important;
    border-radius:18px!important;
    z-index:10030!important;
  }
}

@media (max-width:390px){
  .check-filter-bar > input.date{grid-column:1/-1!important}
  .check-filter-bar > .check-filter-actions{grid-template-columns:1fr 1fr!important}
}

/* =========================================================
   Professional public-site analytics — 672
   ========================================================= */
.analytics-page{--analytics-navy:#0f2d52;--analytics-ink:#12243d;--analytics-blue:#2563eb;--analytics-cyan:#0ea5e9;--analytics-green:#0f8a5f;--analytics-soft:#f5f8fc;--analytics-line:#d9e5f2;display:grid;gap:18px}
.analytics-hero{position:relative;display:flex;align-items:flex-start;justify-content:space-between;gap:24px;overflow:hidden;padding:24px 26px;border:1px solid #d6e4f2;border-radius:26px;background:linear-gradient(135deg,#f9fcff 0%,#eef6ff 55%,#edfdf7 100%);box-shadow:0 16px 38px rgba(15,45,82,.08)}
.analytics-hero:before{content:"";position:absolute;inset:auto -70px -100px auto;width:260px;height:260px;border-radius:50%;background:radial-gradient(circle,rgba(37,99,235,.15),transparent 66%);pointer-events:none}
.analytics-hero-copy{position:relative;z-index:1;max-width:980px}.analytics-kicker{margin-bottom:5px;color:#087451;font-size:12px;font-weight:950}.analytics-hero h2{margin:0;color:var(--analytics-navy);font-size:27px;font-weight:950;letter-spacing:-.3px}.analytics-hero p{max-width:900px;margin:9px 0 0;color:#52657d;font-size:13px;font-weight:700;line-height:2}.analytics-hero-actions{position:relative;z-index:1;flex:0 0 auto}.analytics-quality-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}.analytics-quality-chip{display:inline-flex;align-items:center;min-height:30px;padding:5px 10px;border:1px solid #cfe1ef;border-radius:999px;background:rgba(255,255,255,.72);color:#36516d;font-size:11px;font-weight:900;backdrop-filter:blur(8px)}.analytics-quality-chip.ok{border-color:#bce7d5;color:#087451}.analytics-quality-chip.privacy{border-color:#bfdbfe;color:#1d4ed8}
.analytics-notice{display:flex;align-items:center;gap:12px;padding:13px 16px;border:1px solid #bfdbfe;border-radius:16px;background:#eff6ff;color:#294c72}.analytics-notice strong{font-weight:950}.analytics-notice span{font-size:12px;font-weight:700;line-height:1.8}
.analytics-primary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.analytics-metric-card{display:flex;align-items:center;gap:14px;min-height:128px;padding:18px;border:1px solid var(--analytics-line);border-radius:22px;background:#fff;box-shadow:0 12px 30px rgba(15,45,82,.065);transition:transform .18s ease,box-shadow .18s ease}.analytics-metric-card:hover{transform:translateY(-2px);box-shadow:0 16px 36px rgba(15,45,82,.1)}.analytics-metric-card.primary{border-color:#b9d8ff;background:linear-gradient(145deg,#fff,#eff7ff)}.analytics-metric-card.dark{border-color:#183f68;background:linear-gradient(145deg,#102a49,#17436d);color:#fff}.analytics-metric-icon{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;border-radius:15px;background:#edf4fb;color:var(--analytics-navy);font-size:17px;font-weight:950}.analytics-metric-card.primary .analytics-metric-icon{background:#dbeafe;color:#1d4ed8}.analytics-metric-card.dark .analytics-metric-icon{background:rgba(255,255,255,.12);color:#fff}.analytics-metric-card span{display:block;color:#64748b;font-size:12px;font-weight:900}.analytics-metric-card strong{display:block;margin-top:4px;color:var(--analytics-navy);font-size:30px;font-weight:950;line-height:1.2}.analytics-metric-card small{display:block;margin-top:5px;color:#7990a8;font-size:11px;font-weight:800}.analytics-metric-card.dark span,.analytics-metric-card.dark small{color:#d6e6f5}.analytics-metric-card.dark strong{color:#fff}
.analytics-secondary-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.analytics-mini-card{min-height:102px;padding:15px 16px;border:1px solid var(--analytics-line);border-radius:19px;background:#fff;box-shadow:0 8px 22px rgba(15,45,82,.045)}.analytics-mini-card span{display:block;color:#6b7f95;font-size:11px;font-weight:900}.analytics-mini-card strong{display:block;margin-top:8px;color:var(--analytics-navy);font-size:19px;font-weight:950}.analytics-mini-card small{display:block;margin-top:5px;color:#8a9bad;font-size:10px;font-weight:750;line-height:1.5}.analytics-mini-card.trend-up{border-color:#b7e5cf;background:#f4fdf8}.analytics-mini-card.trend-up strong{color:#087451}.analytics-mini-card.trend-down{border-color:#fecaca;background:#fff7f7}.analytics-mini-card.trend-down strong{color:#b42318}.analytics-mini-card.trend-new{border-color:#bfdbfe;background:#f5f9ff}.analytics-mini-card.trend-new strong{color:#1d4ed8}.analytics-mini-card.inventory{border-color:#c7e9df;background:#f5fcfa}.analytics-mini-card.inventory strong{color:#087451}
.analytics-main-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,.85fr);gap:16px}.analytics-panel{min-width:0;padding:19px;border:1px solid var(--analytics-line);border-radius:23px;background:#fff;box-shadow:0 12px 30px rgba(15,45,82,.055)}.analytics-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:15px}.analytics-panel-head h3{margin:0;color:var(--analytics-navy);font-size:17px;font-weight:950}.analytics-panel-head p{margin:5px 0 0;color:#7890a7;font-size:11px;font-weight:750;line-height:1.75}.analytics-panel-badge{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#eaf2fb;color:#244b72;font-size:10px;font-weight:950}.analytics-panel-badge.inventory{background:#e8f8f2;color:#087451}
.analytics-chart{display:flex;align-items:flex-end;gap:5px;height:230px;padding:20px 12px 12px;border:1px solid #e1eaf3;border-radius:18px;background:repeating-linear-gradient(to top,#f8fbfe 0,#f8fbfe 44px,#e9f0f7 45px)}.analytics-chart-day{position:relative;display:flex;align-items:flex-end;justify-content:center;flex:1;min-width:4px;height:100%}.analytics-chart-view,.analytics-chart-unique{position:absolute;bottom:0;border-radius:8px 8px 2px 2px;transition:height .25s ease}.analytics-chart-view{width:72%;background:linear-gradient(180deg,#2563eb,#164b9b);box-shadow:0 4px 10px rgba(37,99,235,.2)}.analytics-chart-unique{width:100%;background:#bde3f8;opacity:.82}.analytics-chart-day:hover .analytics-chart-view{filter:brightness(1.12)}.analytics-chart-legend{display:flex;justify-content:center;gap:18px;margin-top:12px;color:#667b90;font-size:10px;font-weight:850}.analytics-chart-legend span{display:inline-flex;align-items:center;gap:6px}.analytics-chart-legend i{display:inline-block;width:16px;height:7px;border-radius:4px}.analytics-chart-legend i.view{background:#2563eb}.analytics-chart-legend i.unique{background:#bde3f8}
.analytics-ranking-list{display:grid;gap:8px}.analytics-ranking-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px;border:1px solid #e5edf5;border-radius:15px;background:#f9fbfd}.analytics-ranking-row .rank{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#e7f0fa;color:#244b72;font-size:11px;font-weight:950}.analytics-ranking-row .label strong,.analytics-ranking-row .value strong{display:block;color:#193a5e;font-size:12px;font-weight:950}.analytics-ranking-row small{display:block;margin-top:3px;color:#8293a6;font-size:9px;font-weight:800}.analytics-ranking-row .value{text-align:left}.analytics-ranking-row .value strong{font-size:16px}
.analytics-distribution-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.analytics-bars{display:grid;gap:12px}.analytics-bar-row>div{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#46617d;font-size:11px;font-weight:900}.analytics-bar-row>div strong{color:#173a60}.analytics-bar-row>i{display:block;height:8px;margin-top:6px;overflow:hidden;border-radius:999px;background:#edf2f7}.analytics-bar-row>i>b{display:block;height:100%;min-width:2px;border-radius:999px;background:linear-gradient(90deg,#1d4ed8,#38bdf8)}.analytics-bar-row>small{display:block;margin-top:4px;color:#8a9bad;font-size:9px;font-weight:800;text-align:left}
.analytics-table-wrap{overflow:auto;border:1px solid #e1eaf3;border-radius:17px}.analytics-table{width:100%;min-width:760px;border-collapse:collapse}.analytics-table th{padding:11px 13px;background:#f2f7fc;color:#5f748a;font-size:10px;font-weight:950;text-align:right;white-space:nowrap}.analytics-table td{padding:12px 13px;border-top:1px solid #e8eef5;color:#334e68;font-size:11px;font-weight:800;vertical-align:middle}.analytics-table tbody tr:hover{background:#f8fbff}.analytics-table td strong{display:block;color:#153a62;font-size:12px;font-weight:950}.analytics-table td small{display:block;margin-top:4px;color:#8b9bad;font-size:9px;font-weight:750}.analytics-table td b{color:#0b7656;font-size:14px}.analytics-rank-badge{display:grid;place-items:center;width:29px;height:29px;border-radius:9px;background:#e9f1f9;color:#244b72;font-weight:950}
.analytics-lower-grid{grid-template-columns:1fr 1fr}.analytics-recent-list{display:grid;gap:7px}.analytics-recent-row{display:grid;grid-template-columns:52px minmax(0,1fr);align-items:center;gap:10px;padding:10px 11px;border:1px solid #e7edf4;border-radius:14px;background:#fafcfe}.analytics-recent-row .time{display:grid;place-items:center;height:31px;border-radius:9px;background:#eaf2fb;color:#244b72;font-size:11px;font-weight:950;direction:ltr}.analytics-recent-row strong{display:block;color:#1b3d61;font-size:11px;font-weight:950}.analytics-recent-row small{display:block;margin-top:3px;color:#8293a5;font-size:9px;font-weight:750}.analytics-quality-metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px}.analytics-quality-metrics>div{padding:13px;border:1px solid #e1eaf3;border-radius:15px;background:#f9fbfd}.analytics-quality-metrics span{display:block;color:#6d8298;font-size:10px;font-weight:900}.analytics-quality-metrics strong{display:block;margin-top:7px;color:#153a62;font-size:15px;font-weight:950}.analytics-quality-metrics small{display:block;margin-top:4px;color:#8c9bad;font-size:9px;font-weight:750;line-height:1.6}.analytics-empty{padding:20px;border:1px dashed #cbd8e5;border-radius:15px;background:#f8fafc;color:#7b8da0;text-align:center;font-size:11px;font-weight:850}.analytics-empty.compact{padding:12px}

/* Reliable inventory view counters */
.inventory-view-chip{display:inline-flex;align-items:center;gap:5px;min-height:27px;padding:4px 9px;border:1px solid rgba(255,255,255,.72);border-radius:999px;background:rgba(15,45,82,.78);color:#fff;font-size:10px;font-weight:950;box-shadow:0 5px 14px rgba(15,45,82,.18);backdrop-filter:blur(7px)}.public-inventory-image .inventory-view-chip{position:absolute;right:12px;bottom:12px;z-index:3}.inventory-list-view .public-inventory-image .inventory-view-chip{display:none}.inventory-list-view .list-car-views{display:flex}.list-car-views{display:none;flex-direction:column;align-items:center;justify-content:center;min-width:92px;padding:6px 10px;border-right:1px solid #e4ecf4;color:#61768c}.list-car-views span{font-size:9px;font-weight:850}.list-car-views b{margin-top:3px;color:#173d64;font-size:12px;font-weight:950}.opps-view-stat{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border:1px solid #cde1f2;border-radius:999px;background:#eff7fd;color:#245173;font-size:10px;font-weight:950}.opps-mobile-fact.views strong{color:#1d4ed8}

@media(max-width:1200px){.analytics-secondary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.analytics-primary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.analytics-main-grid,.analytics-lower-grid{grid-template-columns:1fr}.analytics-distribution-grid{grid-template-columns:1fr}.analytics-chart{height:200px}.analytics-hero{flex-direction:column}.analytics-hero-actions{width:100%}.analytics-hero-actions .btn{width:100%;justify-content:center}.list-car-views{min-width:78px}}
@media(max-width:640px){.analytics-page{gap:13px}.analytics-hero{padding:18px;border-radius:20px}.analytics-hero h2{font-size:22px}.analytics-hero p{font-size:11px}.analytics-primary-grid{grid-template-columns:1fr 1fr;gap:9px}.analytics-metric-card{min-height:112px;padding:13px;gap:10px;border-radius:18px}.analytics-metric-icon{width:39px;height:39px;flex-basis:39px;border-radius:12px}.analytics-metric-card strong{font-size:23px}.analytics-metric-card span{font-size:10px}.analytics-metric-card small{font-size:9px}.analytics-secondary-grid{grid-template-columns:1fr 1fr;gap:9px}.analytics-mini-card{min-height:94px;padding:12px}.analytics-panel{padding:14px;border-radius:19px}.analytics-panel-head h3{font-size:15px}.analytics-chart{height:170px;gap:3px;padding-inline:7px}.analytics-quality-metrics{grid-template-columns:1fr}.analytics-quality-row{gap:6px}.analytics-quality-chip{font-size:9px;padding:4px 8px}.analytics-notice{align-items:flex-start;flex-direction:column}.public-inventory-image .inventory-view-chip{right:9px;bottom:9px}.inventory-list-view .list-car-views{display:none}}

@media (min-width:641px) and (max-width:900px){body.inventory-list-view .list-car-views{grid-column:1/-1;min-height:0;display:grid;grid-template-columns:86px 1fr;align-items:center;border:1px solid #edf2f7;border-radius:14px;background:#f5f9fd;padding:8px 10px}body.inventory-list-view .list-car-views b{text-align:left}}


/* ===== User editor top layout cleanup — fix-user-editor-top-layout ===== */
.auth-user-form.user-editor-v2 .user-form-summary{
  align-items:stretch!important;
}
.auth-user-form.user-editor-v2 .summary-chip{
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  column-gap:10px!important;
  row-gap:1px!important;
  align-content:center!important;
  align-items:center!important;
  text-align:right!important;
}
.auth-user-form.user-editor-v2 .summary-chip span{
  grid-column:1!important;
  grid-row:1 / span 2!important;
  align-self:center!important;
}
.auth-user-form.user-editor-v2 .summary-chip b{
  grid-column:2!important;
  grid-row:1!important;
  display:block!important;
  min-width:0!important;
  line-height:1.45!important;
}
.auth-user-form.user-editor-v2 .summary-chip small{
  grid-column:2!important;
  grid-row:2!important;
  display:block!important;
  min-width:0!important;
  line-height:1.5!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.auth-user-form.user-editor-v2 .user-identity-card{
  padding:13px 15px 15px!important;
}
.auth-user-form.user-editor-v2 .user-identity-card .user-card-head{
  margin-bottom:10px!important;
  padding-bottom:8px!important;
}
.auth-user-form.user-editor-v2 .user-main-fields{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:stretch!important;
}
.auth-user-form.user-editor-v2 .user-main-fields > .field{
  min-width:0!important;
  justify-content:flex-start!important;
}
.auth-user-form.user-editor-v2 .user-main-fields .field input{
  width:100%!important;
}
.auth-user-form.user-editor-v2 .user-main-fields .field small{
  margin-top:1px!important;
  line-height:1.55!important;
}
.auth-user-form.user-editor-v2 .user-active-field{
  justify-content:stretch!important;
}
.auth-user-form.user-editor-v2 .user-active-field .user-status-switch{
  height:100%!important;
  min-height:68px!important;
  margin:0!important;
  justify-content:center!important;
}
.auth-user-form.user-editor-v2 .user-password-fields{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:stretch!important;
  margin-top:12px!important;
  padding-top:12px!important;
  border-top:1px dashed #dbe6f0!important;
}
.auth-user-form.user-editor-v2 .user-password-fields > *{
  min-width:0!important;
}
.auth-user-form.user-editor-v2 .user-password-fields .temporary-password-note{
  height:100%!important;
  min-height:68px!important;
  justify-content:center!important;
}

@media (max-width:1180px){
  .auth-user-form.user-editor-v2 .user-main-fields{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media (max-width:720px){
  .auth-user-form.user-editor-v2 .user-form-summary{
    display:grid!important;
    grid-template-columns:1fr!important;
    overflow:visible!important;
  }
  .auth-user-form.user-editor-v2 .summary-chip{
    min-width:0!important;
    min-height:56px!important;
  }
  .auth-user-form.user-editor-v2 .summary-chip small{
    display:block!important;
    white-space:normal!important;
  }
  .auth-user-form.user-editor-v2 .user-main-fields,
  .auth-user-form.user-editor-v2 .user-password-fields{
    grid-template-columns:1fr!important;
  }
  .auth-user-form.user-editor-v2 .user-password-fields{
    margin-top:10px!important;
    padding-top:10px!important;
  }
}

/* Commit: reduce-mobile-portal-top-spacing-683
   Keep the public portal banner as close as safely possible to the top edge on phones. */
@media (max-width:620px){
  html,
  body.portal-home-v2{
    margin-top:0!important;
    padding-top:0!important;
  }
  body.portal-home-v2 .portal-home-shell{
    margin-top:0!important;
    padding-top:max(2px, env(safe-area-inset-top, 0px))!important;
  }
  body.portal-home-v2 .portal-pro-hero{
    margin-top:0!important;
  }
}


/* Phase 696: مرکز یکپارچه و مدرن نمایش و ظاهر سایت */
.display-settings-entry{display:flex!important;align-items:center!important;gap:10px!important;padding:10px 12px!important}
.display-settings-entry>span:last-child{display:flex;flex-direction:column;gap:2px;min-width:0}
.display-settings-entry b{font-size:13px}
.display-settings-entry small{font-size:10px;color:rgba(255,255,255,.68);line-height:1.5;white-space:normal}
.display-settings-entry-icon{width:34px;height:34px;border-radius:11px;background:rgba(255,255,255,.12);display:grid;place-items:center;flex:0 0 auto;font-size:18px}
.display-settings-page{max-width:1380px;margin:0 auto;padding:4px 0 32px;direction:rtl}
.display-settings-hero{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);align-items:center;gap:30px;padding:34px;border:1px solid color-mix(in srgb,var(--theme-primary,#0f5132) 14%,#dbe5ef);border-radius:26px;background:linear-gradient(135deg,#fff 0%,color-mix(in srgb,var(--theme-soft,#e9f7ef) 66%,#fff) 100%);box-shadow:0 18px 45px rgba(31,58,95,.08)}
.display-settings-hero:before{content:"";position:absolute;inset:auto -90px -120px auto;width:300px;height:300px;border-radius:50%;background:color-mix(in srgb,var(--theme-primary,#0f5132) 11%,transparent)}
.display-settings-hero-copy{position:relative;z-index:1}
.display-settings-hero h1{margin:8px 0 10px;color:var(--theme-text,#1f3a5f);font-size:clamp(27px,3vw,42px);line-height:1.35}
.display-settings-hero p{margin:0;color:#64748b;font-size:15px;line-height:2}
.display-settings-live-preview{position:relative;z-index:1;min-height:210px;display:grid;grid-template-columns:82px 1fr;border:1px solid rgba(148,163,184,.35);border-radius:20px;overflow:hidden;background:#fff;box-shadow:0 18px 34px rgba(15,23,42,.12);transform:perspective(1000px) rotateY(-4deg)}
.display-preview-sidebar{background:var(--theme-sidebar,#1f3a5f);padding:22px 14px;display:flex;flex-direction:column;gap:13px}
.display-preview-sidebar span{height:14px;border-radius:999px;background:rgba(255,255,255,.25)}
.display-preview-sidebar span:nth-child(2){background:var(--theme-primary,#0f5132)}
.display-preview-body{padding:24px;display:flex;flex-direction:column;gap:20px;background:linear-gradient(180deg,#fff,#f8fafc)}
.display-preview-heading{width:52%;height:17px;border-radius:999px;background:var(--theme-text,#1f3a5f)}
.display-preview-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.display-preview-cards i{height:55px;border:1px solid #dbe5ef;border-radius:12px;background:var(--theme-soft,#e9f7ef)}
.display-preview-table{display:flex;flex-direction:column;gap:8px}.display-preview-table b{height:12px;border-radius:5px;background:#e8eef5}.display-preview-table b:nth-child(2){background:color-mix(in srgb,var(--theme-soft,#e9f7ef) 70%,#fff)}
.display-settings-section-head{display:flex;align-items:center;gap:13px;margin:30px 4px 14px}
.display-settings-section-icon{width:46px;height:46px;display:grid;place-items:center;border-radius:15px;background:var(--theme-soft,#e9f7ef);font-size:23px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--theme-primary,#0f5132) 12%,transparent)}
.display-settings-section-head h2{margin:0 0 3px;color:var(--theme-text,#1f3a5f);font-size:20px}.display-settings-section-head p{margin:0;color:#718096;font-size:12px;line-height:1.7}
.display-settings-panel{border:1px solid #dce6f0;border-radius:22px;background:#fff;padding:20px;box-shadow:0 10px 28px rgba(31,58,95,.055)}
.display-theme-native-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.display-theme-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.display-theme-card{position:relative;min-height:95px;display:flex;align-items:center;gap:14px;padding:15px;border:1px solid #dbe5ef;border-radius:17px;background:#fff;color:#1f2937;text-align:right;cursor:pointer;transition:.18s ease;box-shadow:none}
.display-theme-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--theme-primary,#0f5132) 38%,#dbe5ef);box-shadow:0 10px 20px rgba(31,58,95,.08)}
.display-theme-card.is-active{border-color:var(--theme-primary,#0f5132);background:color-mix(in srgb,var(--theme-soft,#e9f7ef) 58%,#fff);box-shadow:0 0 0 3px var(--theme-ring,rgba(15,81,50,.14))}
.display-theme-colors{width:58px;height:58px;display:flex;overflow:hidden;border-radius:16px;border:3px solid #fff;box-shadow:0 3px 12px rgba(15,23,42,.15);flex:0 0 auto}
.display-theme-colors i{flex:1;background:var(--theme-chip)}
.display-theme-card-copy{display:flex;flex-direction:column;gap:4px;min-width:0}.display-theme-card-copy b{font-size:15px;color:#1f3a5f}.display-theme-card-copy small{font-size:11px;color:#718096;line-height:1.65}
.display-theme-check{margin-right:auto;width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#e8eef5;color:#94a3b8;font-weight:900;opacity:.55}
.display-theme-card.is-active .display-theme-check{background:var(--theme-primary,#0f5132);color:#fff;opacity:1}
.display-settings-note{margin-top:14px;padding:11px 14px;border-radius:13px;background:#f8fafc;color:#64748b;font-size:11px;border:1px dashed #d4dfeb}
.display-settings-control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.display-control-card{display:flex;flex-direction:column;gap:11px;padding:20px;border:1px solid #dce6f0;border-radius:20px;background:#fff;box-shadow:0 10px 26px rgba(31,58,95,.05)}
.display-control-card-head{display:flex;gap:12px;align-items:flex-start}.display-control-card-head>span{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:var(--theme-soft,#e9f7ef);font-size:21px;flex:0 0 auto}
.display-control-card h3{margin:0 0 4px;font-size:16px;color:var(--theme-text,#1f3a5f)}.display-control-card p{margin:0;font-size:11px;color:#718096;line-height:1.75}
.display-control-card label{font-size:12px;font-weight:800;color:#334155}.display-control-card select{width:100%;min-height:45px;border:1px solid #ccd9e6;border-radius:13px;background:#fff;padding:8px 12px;color:#172b45;font-weight:750}
.display-font-sample,.display-title-sample,.display-scale-sample,.display-money-sample{min-height:58px;border:1px solid #e0e8f1;border-radius:14px;background:#f8fafc;padding:13px;display:flex;align-items:center;justify-content:center;color:var(--theme-text,#1f3a5f)}
.display-scale-sample{flex-direction:column;gap:4px}.display-scale-sample b{font-size:16px}.display-scale-sample span{font-size:11px;color:#718096}.display-title-sample{font-size:22px;font-weight:900}.display-money-sample{gap:7px}.display-money-sample b{font-size:20px;color:var(--theme-primary,#0f5132)}.display-money-sample span{font-size:11px;color:#64748b}
.display-settings-links-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.display-settings-link-card{display:grid;grid-template-columns:54px 1fr 30px;align-items:center;gap:13px;padding:19px;border:1px solid #dce6f0;border-radius:20px;background:#fff;text-decoration:none;color:inherit;box-shadow:0 10px 26px rgba(31,58,95,.05);transition:.18s ease}
.display-settings-link-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--theme-primary,#0f5132) 34%,#dce6f0);box-shadow:0 14px 30px rgba(31,58,95,.09)}
.display-settings-link-icon{width:54px;height:54px;border-radius:17px;display:grid;place-items:center;background:linear-gradient(135deg,var(--theme-soft,#e9f7ef),#fff);font-size:25px;border:1px solid color-mix(in srgb,var(--theme-primary,#0f5132) 12%,#e8eef5)}
.display-settings-link-card h3{margin:0 0 5px;color:var(--theme-text,#1f3a5f);font-size:16px}.display-settings-link-card p{margin:0;color:#718096;font-size:11px;line-height:1.75}.display-settings-link-card>i{font-style:normal;width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:#f1f5f9;color:var(--theme-primary,#0f5132);font-size:22px;font-weight:900}
@media(max-width:900px){.display-settings-hero{grid-template-columns:1fr}.display-settings-live-preview{display:none}.display-theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.display-settings-page{padding:0 8px 24px}.display-settings-hero{padding:22px 18px;border-radius:20px}.display-settings-hero h1{font-size:27px}.display-settings-hero p{font-size:13px}.display-settings-section-head{margin-top:24px}.display-settings-control-grid,.display-settings-links-grid,.display-theme-grid{grid-template-columns:1fr}.display-settings-panel{padding:13px}.display-theme-card{min-height:84px}.display-control-card{padding:16px}.display-settings-link-card{grid-template-columns:48px 1fr 28px;padding:15px}.display-settings-link-icon{width:48px;height:48px}.display-settings-section-head h2{font-size:18px}}


/* ===== Permission dependency assistant - build 700 ===== */
.permission-dependency-guide{
  display:flex;
  align-items:center;
  gap:14px;
  margin:14px 0 18px;
  padding:15px 17px;
  border:1px solid #cfe4dc;
  border-radius:18px;
  background:linear-gradient(135deg,#f4fcf8,#f8fbff);
  color:#173f4e;
}
.permission-dependency-guide-icon{
  width:48px;
  height:48px;
  flex:0 0 48px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:#e5f7ef;
  font-size:24px;
}
.permission-dependency-guide b{display:block;margin-bottom:4px;font-size:15px}
.permission-dependency-guide small{display:block;color:#61778a;line-height:1.9}

.permission-aware-row .rbac-row-text{
  min-width:0;
}
.permission-dependency-hint{
  display:block;
  margin-top:7px;
  padding-top:7px;
  border-top:1px dashed #d8e4ed;
  color:#587287;
  font-size:11px;
  line-height:1.8;
}
.permission-dependency-hint em{
  font-style:normal;
  font-weight:900;
  color:#13856c;
}
.permission-aware-row.dependency-required{
  border-color:#9fd9c6 !important;
  box-shadow:inset 0 0 0 1px rgba(28,151,116,.08);
}
.permission-aware-row.dependency-required .permission-dependency-hint{
  color:#356b5c;
}
.permission-aware-row.dependency-auto-added{
  animation:permissionAutoAdded .55s ease;
}
@keyframes permissionAutoAdded{
  0%{transform:scale(.985);background:#daf8eb}
  100%{transform:scale(1)}
}

.permission-dependency-summary{
  margin:0 0 14px;
  padding:13px 15px;
  border:1px solid #cfe4dc;
  border-radius:16px;
  background:#f5fcf9;
}
.permission-dependency-summary[hidden]{display:none !important}
.permission-dependency-summary>div:first-child{
  display:flex;
  align-items:center;
  gap:8px;
  color:#175f50;
  margin-bottom:9px;
}
.permission-dependency-summary small{
  display:block;
  margin-top:8px;
  color:#6c7f8e;
  line-height:1.8;
}
.permission-dependency-chips{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.permission-dependency-chips span{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid #bfe0d4;
  background:#fff;
  color:#2f6658;
  font-size:11px;
  font-weight:800;
}
.permission-dependency-summary.dependency-pulse{
  animation:dependencySummaryPulse .65s ease;
}
@keyframes dependencySummaryPulse{
  0%{box-shadow:0 0 0 0 rgba(28,151,116,.25)}
  100%{box-shadow:0 0 0 12px rgba(28,151,116,0)}
}
.permission-legend .pill.dependency{
  background:#eef9f5;
  border-color:#bfe0d4;
  color:#176a57;
}
.user-dependency-summary{
  margin:12px 0 15px;
}
.rbac-override-row.dependency-required .override-select{
  border-color:#69bda5;
  background:#f3fcf8;
}

@media (max-width:760px){
  .permission-dependency-guide{
    align-items:flex-start;
    padding:13px;
    border-radius:16px;
  }
  .permission-dependency-guide-icon{
    width:42px;
    height:42px;
    flex-basis:42px;
    font-size:21px;
  }
  .permission-dependency-summary{
    padding:12px;
    border-radius:14px;
  }
  .permission-dependency-chips span{
    width:100%;
    justify-content:flex-start;
    border-radius:12px;
  }
  .permission-dependency-hint{
    font-size:10px;
  }
}


/* Inventory internal row/card selection — v691
   Single click on free card/row area is selection only; visual state is shared
   between desktop table and mobile card for the same inventory id. */
.opps-inventory-page .opps-inventory-selectable-row,
.opps-inventory-page .opps-inventory-selectable{cursor:pointer}
.opps-inventory-page .opps-inventory-selectable-row.is-inventory-selected>td{
  background:#eaf5ff!important;
  box-shadow:inset 0 1px #b9d8f5,inset 0 -1px #b9d8f5;
}
.opps-inventory-page .opps-inventory-selectable-row.is-inventory-selected>td:first-child{
  box-shadow:inset -4px 0 #1976c9,inset 0 1px #b9d8f5,inset 0 -1px #b9d8f5;
}
.opps-inventory-page .opps-mobile-card.is-inventory-selected{
  border-color:#6aa9dd!important;
  background:linear-gradient(145deg,#ffffff,#edf7ff)!important;
  box-shadow:0 0 0 3px rgba(25,118,201,.13),0 14px 32px rgba(15,23,42,.09)!important;
}

/* === AutoSadra work calendar + timed site announcements (808) === */
.work-calendar-page{max-width:1480px;margin:0 auto}
.work-calendar-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:24px 26px;border-radius:24px;background:linear-gradient(135deg,rgba(15,81,50,.10),rgba(2,132,199,.08));border:1px solid rgba(148,163,184,.28);margin-bottom:18px}
.work-calendar-hero h2{margin:4px 0 7px;font-size:27px}.work-calendar-hero p{margin:0;color:#64748b}.work-calendar-eyebrow{font-size:12px;font-weight:800;color:#0f766e;letter-spacing:.2px}.work-calendar-hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.work-calendar-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px;align-items:start}.work-calendar-main-card,.work-calendar-agenda{background:#fff;border:1px solid rgba(148,163,184,.28);border-radius:22px;box-shadow:0 14px 34px rgba(15,23,42,.07);overflow:hidden}.work-calendar-toolbar{display:flex;align-items:center;justify-content:center;gap:18px;padding:16px;border-bottom:1px solid #e2e8f0;background:#fbfdff}.calendar-nav-btn{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:#eef6f2;color:#0f5132;text-decoration:none;font-size:28px;font-weight:700}.calendar-current-month{text-align:center;min-width:180px}.calendar-current-month strong{display:block;font-size:20px}.calendar-current-month a{font-size:12px;color:#0284c7;text-decoration:none}
.work-calendar-weekdays,.work-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.work-calendar-weekdays{border-bottom:1px solid #e2e8f0;background:#f8fafc}.work-calendar-weekdays>div{text-align:center;padding:10px 4px;font-weight:800;color:#475569;font-size:13px}.work-calendar-weekdays .is-friday{color:#b91c1c}.calendar-day-cell{min-height:145px;border-left:1px solid #edf2f7;border-bottom:1px solid #edf2f7;padding:8px;background:#fff;transition:background .15s,box-shadow .15s;position:relative}.calendar-day-cell:nth-child(7n){border-left:0}.calendar-day-cell.is-empty{background:#f8fafc;min-height:145px}.calendar-day-cell:not(.is-empty):hover{background:#fbfdff;box-shadow:inset 0 0 0 1px rgba(14,116,144,.12)}.calendar-day-cell.is-today{background:linear-gradient(180deg,#effcf7,#fff);box-shadow:inset 0 0 0 2px rgba(15,118,110,.32)}.calendar-day-cell.is-holiday .calendar-day-number{color:#b91c1c}.calendar-day-cell header{display:flex;align-items:center;gap:6px;min-height:26px}.calendar-day-number{font-weight:900;color:#0f172a}.calendar-today-label{font-size:10px;border-radius:999px;padding:2px 6px;background:#0f766e;color:#fff}.calendar-day-add{margin-right:auto;border:0;background:#edf7f3;color:#0f766e;border-radius:8px;width:24px;height:24px;cursor:pointer;font-size:17px}.calendar-day-content{display:flex;flex-direction:column;gap:5px;margin-top:5px}.calendar-official-event{font-size:10px;line-height:1.5;color:#7c2d12;background:#fff7ed;border-radius:7px;padding:3px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar-more-official,.calendar-more-events{font-size:9px;color:#64748b}.calendar-event-chip{display:flex;align-items:center;gap:5px;width:100%;text-align:right;border:0;border-radius:8px;padding:5px 6px;background:#eef6ff;color:#1e3a5f;cursor:pointer;min-width:0}.calendar-event-chip span{font-size:9px;opacity:.72}.calendar-event-chip b{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar-event-chip.priority-high{background:#fff7ed;color:#9a3412}.calendar-event-chip.priority-urgent{background:#fef2f2;color:#b91c1c}.calendar-event-chip.priority-low{background:#f8fafc;color:#64748b}.calendar-event-chip.is-completed{text-decoration:line-through;opacity:.55}
.work-calendar-agenda{position:sticky;top:62px}.agenda-head{display:flex;align-items:center;justify-content:space-between;padding:17px 18px;border-bottom:1px solid #e2e8f0;background:#fbfdff}.agenda-head>div span,.agenda-head>div strong{display:block}.agenda-head>div span{font-weight:800}.agenda-head>div strong{font-size:11px;color:#64748b;margin-top:2px}.agenda-count{min-width:34px;height:34px;display:grid;place-items:center;background:#0f5132;color:#fff;border-radius:11px;font-weight:900}.agenda-list{padding:10px}.agenda-item{display:grid;grid-template-columns:48px minmax(0,1fr) 30px;gap:10px;padding:11px;border-radius:14px;border:1px solid #e2e8f0;margin-bottom:8px;background:#fff;align-items:start}.agenda-item.priority-high{border-right:4px solid #f59e0b}.agenda-item.priority-urgent{border-right:4px solid #dc2626}.agenda-item.priority-low{opacity:.82}.agenda-item.is-completed{opacity:.55}.agenda-date{text-align:center;background:#f1f5f9;border-radius:10px;padding:7px 3px}.agenda-date strong{display:block;font-size:18px}.agenda-date span{display:block;font-size:9px;color:#64748b}.agenda-copy h4{font-size:13px;margin:0 0 5px}.agenda-copy p{font-size:11px;color:#64748b;margin:6px 0 0;line-height:1.7}.agenda-meta{display:flex;flex-wrap:wrap;gap:5px}.agenda-meta span{font-size:9px;background:#f8fafc;border-radius:999px;padding:3px 6px;color:#475569}.agenda-edit{border:0;background:#f1f5f9;border-radius:8px;height:28px;cursor:pointer}.agenda-empty{text-align:center;padding:28px 10px;color:#64748b}.agenda-empty span{display:grid;place-items:center;margin:0 auto 8px;width:44px;height:44px;border-radius:50%;background:#ecfdf5;color:#047857;font-size:22px}
.calendar-modal[hidden]{display:none!important}.calendar-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:18px}.calendar-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.54);backdrop-filter:blur(4px)}.calendar-modal-dialog{position:relative;z-index:1;width:min(720px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:22px;box-shadow:0 25px 70px rgba(15,23,42,.28)}.calendar-modal-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid #e2e8f0}.calendar-modal-head span{font-size:11px;color:#0f766e;font-weight:800}.calendar-modal-head h3{margin:2px 0 0}.calendar-modal-head>button{width:34px;height:34px;border:0;border-radius:10px;background:#f1f5f9;font-size:23px;cursor:pointer}.calendar-event-form{padding:18px 20px}.calendar-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.calendar-form-grid label{font-size:12px;font-weight:800;color:#334155}.calendar-form-grid label.span-2{grid-column:1/-1}.calendar-form-grid input,.calendar-form-grid select,.calendar-form-grid textarea{width:100%;box-sizing:border-box;margin-top:6px}.calendar-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.calendar-event-manage-actions{border-top:1px solid #e2e8f0;padding:13px 20px;display:flex;justify-content:space-between;gap:8px}.calendar-event-manage-actions[hidden]{display:none!important}.calendar-event-manage-actions form{margin:0}.calendar-modal-open{overflow:hidden}

.site-announcement-runtime{position:fixed;left:0;right:0;z-index:1210;min-height:36px;display:flex;align-items:center;justify-content:center;padding:5px 12px;box-sizing:border-box;box-shadow:0 5px 16px rgba(15,23,42,.14);font-size:12px}.site-announcement-runtime[hidden]{display:none!important}.site-announcement-runtime[data-announcement-scope="internal"]{top:44px}.site-announcement-runtime[data-announcement-scope="public"]{top:0}.site-announcement-runtime.tone-info{background:#0f4c6e;color:#fff}.site-announcement-runtime.tone-success{background:#0f6b4b;color:#fff}.site-announcement-runtime.tone-warning{background:#a16207;color:#fff}.site-announcement-runtime.tone-mourning{background:#252b33;color:#f8fafc}.site-announcement-runtime-inner{display:flex;align-items:center;justify-content:center;gap:8px;width:min(1400px,100%);text-align:center}.site-announcement-runtime-icon{width:18px;height:18px;display:grid;place-items:center;opacity:.9}.site-announcement-runtime-copy{display:flex;gap:7px;align-items:center;min-width:0}.site-announcement-runtime-copy strong{white-space:nowrap}.site-announcement-runtime-copy span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.site-announcement-runtime-expiry{font-size:10px;opacity:.75;direction:ltr}.site-announcement-internal-visible{padding-top:88px!important}.site-announcement-public-visible{padding-top:40px!important}
.site-announcements-page{max-width:1200px;margin:0 auto}.announcement-admin-hero{padding:23px 25px;border-radius:22px;background:linear-gradient(135deg,rgba(2,132,199,.08),rgba(15,81,50,.08));border:1px solid rgba(148,163,184,.28);margin-bottom:18px}.announcement-admin-hero>div>span{font-size:11px;color:#0f766e;font-weight:800}.announcement-admin-hero h2{margin:5px 0 7px}.announcement-admin-hero p{margin:0;color:#64748b}.announcement-admin-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;margin-bottom:18px}.announcement-editor-card,.announcement-help-card,.announcement-history-card{background:#fff;border:1px solid rgba(148,163,184,.28);border-radius:20px;box-shadow:0 12px 30px rgba(15,23,42,.06)}.announcement-editor-card{padding:18px}.announcement-editor-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.announcement-editor-head h3{margin:0}.announcement-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.announcement-form-grid .span-2{grid-column:1/-1}.announcement-form-grid label{font-size:12px;font-weight:800}.announcement-form-grid label>span{font-weight:500;color:#94a3b8}.announcement-form-grid label>strong{color:#b91c1c;font-size:10px}.announcement-form-grid input,.announcement-form-grid select,.announcement-form-grid textarea{width:100%;box-sizing:border-box;margin-top:6px}.announcement-preview-wrap{margin-top:14px}.announcement-preview-wrap>span{font-size:11px;color:#64748b}.site-announcement-preview{margin-top:6px;padding:9px 12px;border-radius:10px;display:flex;justify-content:center;gap:7px;font-size:12px;color:#fff;min-height:37px;align-items:center}.site-announcement-preview.tone-info{background:#0f4c6e}.site-announcement-preview.tone-success{background:#0f6b4b}.site-announcement-preview.tone-warning{background:#a16207}.site-announcement-preview.tone-mourning{background:#252b33}.announcement-save-btn{width:100%;margin-top:14px}.announcement-help-card{padding:22px;align-self:start}.announcement-help-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:#eff6ff;font-size:22px}.announcement-help-card h3{margin:12px 0 7px}.announcement-help-card p{font-size:12px;color:#64748b;line-height:1.9}.announcement-tone-guide{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:10px;color:#475569;margin-top:12px}.tone-dot{width:8px;height:8px;border-radius:50%;display:inline-block}.tone-dot.info{background:#0f4c6e}.tone-dot.success{background:#0f6b4b}.tone-dot.warning{background:#a16207}.tone-dot.mourning{background:#252b33}.announcement-history-card{overflow:hidden}.announcement-history-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid #e2e8f0}.announcement-history-head h3{margin:0}.announcement-history-head span{font-size:11px;color:#64748b}.announcement-history-list{padding:10px}.announcement-history-item{display:grid;grid-template-columns:12px minmax(0,1fr) auto;gap:12px;padding:13px;border:1px solid #e2e8f0;border-radius:14px;margin-bottom:8px}.announcement-history-item.is-disabled{opacity:.5}.announcement-history-status span{display:block;width:6px;height:100%;min-height:50px;border-radius:999px;background:#0f4c6e}.announcement-history-item.tone-success .announcement-history-status span{background:#0f6b4b}.announcement-history-item.tone-warning .announcement-history-status span{background:#a16207}.announcement-history-item.tone-mourning .announcement-history-status span{background:#252b33}.announcement-history-title{display:flex;align-items:center;gap:8px}.announcement-history-title h4{margin:0}.announcement-history-title span{font-size:9px;background:#f1f5f9;padding:3px 7px;border-radius:999px}.announcement-history-copy p{margin:6px 0;font-size:12px;color:#475569}.announcement-history-meta{display:flex;flex-wrap:wrap;gap:8px}.announcement-history-meta span{font-size:9px;color:#64748b}.announcement-history-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}.announcement-history-actions form{margin:0}.announcement-history-actions .btn{padding:7px 9px;font-size:10px}.announcement-history-empty{text-align:center;padding:28px;color:#64748b}
.dashboard-calendar-reminders{display:grid;gap:8px}.dashboard-calendar-reminder{display:flex;align-items:center;gap:10px;padding:9px 10px;border:1px solid #e2e8f0;border-radius:12px;text-decoration:none;color:inherit;background:#fff}.dashboard-calendar-reminder:hover{background:#f8fafc}.dashboard-calendar-reminder-date{min-width:84px;font-size:11px;color:#0f766e;font-weight:800}.dashboard-calendar-reminder-copy{min-width:0}.dashboard-calendar-reminder-copy strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-calendar-reminder-copy span{font-size:10px;color:#64748b}.dashboard-calendar-reminders-footer{margin-top:10px;display:flex;justify-content:flex-end}
@media(max-width:1000px){.work-calendar-layout{grid-template-columns:1fr}.work-calendar-agenda{position:static}.announcement-admin-grid{grid-template-columns:1fr}.announcement-help-card{display:none}}
@media(max-width:700px){.work-calendar-hero{padding:17px;align-items:flex-start;flex-direction:column}.work-calendar-hero h2{font-size:22px}.work-calendar-hero-actions{width:100%}.work-calendar-hero-actions .btn{flex:1}.work-calendar-main-card{border-radius:16px}.calendar-current-month strong{font-size:17px}.work-calendar-weekdays>div{font-size:10px;padding:8px 1px}.calendar-day-cell,.calendar-day-cell.is-empty{min-height:92px;padding:4px}.calendar-day-number{font-size:12px}.calendar-day-add{width:20px;height:20px;font-size:13px}.calendar-today-label{display:none}.calendar-official-event{font-size:8px;padding:2px 3px}.calendar-event-chip{padding:4px}.calendar-event-chip span{display:none}.calendar-event-chip b{font-size:8px}.calendar-more-official,.calendar-more-events{display:none}.calendar-form-grid,.announcement-form-grid{grid-template-columns:1fr}.calendar-form-grid label.span-2,.announcement-form-grid .span-2{grid-column:auto}.calendar-modal{padding:8px}.calendar-modal-dialog{border-radius:16px}.site-announcement-runtime{min-height:40px;font-size:11px}.site-announcement-runtime[data-announcement-scope="internal"]{top:42px}.site-announcement-runtime-copy{display:block;text-align:center;line-height:1.5}.site-announcement-runtime-copy strong{margin-left:5px}.site-announcement-runtime-expiry{display:none}.site-announcement-internal-visible{padding-top:92px!important}.site-announcement-public-visible{padding-top:44px!important}.announcement-history-item{grid-template-columns:8px 1fr}.announcement-history-actions{grid-column:2;justify-content:flex-start}.announcement-history-title{align-items:flex-start;flex-direction:column}.announcement-editor-card{padding:14px}}
@media print{.site-announcement-runtime,.work-calendar-hero-actions,.calendar-day-add{display:none!important}}
.calendar-system-event{display:block;border-radius:7px;padding:4px 5px;text-decoration:none;font-size:9px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar-system-event.installment{background:#fef3c7;color:#92400e}.calendar-system-event.check{background:#ecfeff;color:#155e75}.calendar-system-event:hover{filter:brightness(.97)}
@media(max-width:700px){.calendar-system-event{font-size:7.5px;padding:3px}.calendar-day-cell .calendar-system-event:nth-of-type(n+2){display:none}}

/* === AutoSadra professional multi-user calendar (809) === */
.work-calendar-hero.compact{padding:18px 20px;margin-bottom:12px}.work-calendar-hero.compact h2{font-size:23px;margin:2px 0 5px}.work-calendar-hero.compact p{font-size:12px}
.calendar-commandbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:8px 10px;box-shadow:0 8px 22px rgba(15,23,42,.04)}
.calendar-view-switch,.calendar-scope-switch{display:flex;gap:5px;flex-wrap:wrap}.calendar-view-btn,.calendar-scope-chip{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 11px;border-radius:10px;text-decoration:none;color:#475569;font-size:11px;font-weight:800;background:#f8fafc;border:1px solid transparent}.calendar-view-btn:hover,.calendar-scope-chip:hover{background:#eef6f2;color:#0f5132}.calendar-view-btn.active{background:#0f5132;color:#fff}.calendar-scope-chip.active{background:#e8f5ef;border-color:#b7dfcb;color:#0f5132}
.work-calendar-layout.professional{grid-template-columns:minmax(0,1fr) 265px;gap:12px}.work-calendar-sidebar{display:flex;flex-direction:column;gap:10px;position:sticky;top:58px}.calendar-sidebar-card{background:#fff;border:1px solid #e2e8f0;border-radius:17px;box-shadow:0 10px 28px rgba(15,23,42,.05);overflow:hidden}.work-calendar-toolbar.professional{padding:10px 12px}.work-calendar-toolbar.professional .calendar-nav-btn{width:34px;height:34px;font-size:24px}.work-calendar-toolbar.professional .calendar-current-month strong{font-size:17px}
.work-calendar-grid.rolling-30 .calendar-day-cell{min-height:125px}.calendar-day-number small{font-size:8px;color:#94a3b8;margin-right:3px;font-weight:700}
.calendar-event-chip.source-google{box-shadow:inset -3px 0 #4285f4}.calendar-event-chip.source-task{box-shadow:inset -3px 0 var(--theme-primary,#0f5132)}.calendar-event-chip:not([data-calendar-edit-event]){cursor:default}
.agenda-list.compact{max-height:390px;overflow:auto}.agenda-list.compact .agenda-item{grid-template-columns:43px minmax(0,1fr);padding:8px;margin-bottom:6px}.agenda-list.compact .agenda-item .agenda-edit{display:none}.agenda-list.compact .agenda-copy h4{font-size:11px}.agenda-list.compact .agenda-date strong{font-size:16px}
.calendar-user-filter{padding:12px}.calendar-user-filter h4{font-size:12px;margin:0 0 8px}.calendar-user-list{display:flex;flex-direction:column;gap:4px;max-height:180px;overflow:auto}.calendar-user-list a{display:flex;align-items:center;gap:6px;text-decoration:none;color:#475569;padding:7px 8px;border-radius:9px;font-size:10px}.calendar-user-list a:hover,.calendar-user-list a.active{background:#eef6f2;color:#0f5132}.calendar-user-list a b{font-weight:800}
.google-calendar-card{padding:12px}.google-calendar-head{display:flex;align-items:center;gap:9px;margin-bottom:10px}.google-calendar-logo{display:grid;place-items:center;width:35px;height:35px;border-radius:10px;background:linear-gradient(135deg,#4285f4,#34a853);color:#fff;font-weight:900;font-family:Arial,sans-serif}.google-calendar-head div{min-width:0}.google-calendar-head strong,.google-calendar-head small{display:block}.google-calendar-head strong{font-size:12px}.google-calendar-head small{font-size:9px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.google-calendar-card form{margin:0 0 6px}.google-calendar-card .btn{width:100%;justify-content:center;font-size:10px;padding:8px}.google-sync-meta,.google-sync-error{display:block;font-size:9px;line-height:1.7;margin-top:6px;color:#64748b}.google-sync-error{color:#b91c1c}.google-calendar-card.is-connected{border-color:#bbdfca;background:linear-gradient(180deg,#fff,#f7fffa)}

/* Google-like week/day timeline */
.calendar-timeline{display:grid;grid-template-columns:58px repeat(var(--calendar-days),minmax(120px,1fr));overflow:auto;max-height:72vh;background:#fff;direction:rtl}.calendar-timeline>*{min-width:0}.calendar-timeline-head{position:sticky;top:0;z-index:4;background:#f8fafc;border-bottom:1px solid #e2e8f0;border-left:1px solid #eef2f7;padding:9px 5px;text-align:center}.calendar-timeline-head span,.calendar-timeline-head strong{display:block}.calendar-timeline-head span{font-size:9px;color:#64748b}.calendar-timeline-head strong{font-size:12px;margin-top:2px}.calendar-timeline-head.is-today{background:#ecfdf5;color:#047857}.calendar-timeline-head.time-label{right:0;z-index:5}.calendar-all-day-label,.calendar-hour-label{position:sticky;right:0;z-index:3;background:#fbfdff;border-left:1px solid #e2e8f0;border-bottom:1px solid #eef2f7;padding:8px 4px;text-align:center;font-size:9px;color:#64748b;direction:ltr}.calendar-all-day-cell,.calendar-hour-cell{border-left:1px solid #eef2f7;border-bottom:1px solid #eef2f7;padding:4px;min-height:48px;background:#fff}.calendar-all-day-cell{min-height:58px}.calendar-hour-cell.is-today,.calendar-all-day-cell.is-today{background:#fbfffd}.calendar-hour-cell:hover{background:#f8fcfa}.timeline-event{display:block;width:100%;border:0;border-radius:7px;padding:5px 6px;margin:2px 0;background:#eaf3ff;color:#1d4e7a;text-align:right;font:inherit;font-size:9px;cursor:pointer;white-space:normal}.timeline-event span{opacity:.65;margin-left:4px}.timeline-event.priority-high{background:#fff4df;color:#8a4b09}.timeline-event.priority-urgent{background:#feecec;color:#a91f1f}.timeline-event.is-completed{text-decoration:line-through;opacity:.5}.timeline-system{display:block;font-size:8px;border-radius:6px;padding:4px;margin:2px}.timeline-system.installment{background:#fef3c7;color:#92400e}.timeline-system.check{background:#ecfeff;color:#155e75}

/* Agenda */
.calendar-agenda-full{padding:10px}.calendar-agenda-day{display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px;border-bottom:1px solid #eef2f7;padding:12px 5px}.calendar-agenda-day.is-today{background:#fbfffd}.calendar-agenda-date strong{font-size:24px;display:block;color:#0f5132}.calendar-agenda-date span{font-size:10px;color:#64748b}.calendar-agenda-items{display:flex;flex-direction:column;gap:5px}.calendar-agenda-event{display:grid;grid-template-columns:65px minmax(0,1fr) auto;gap:8px;align-items:center;border:1px solid #e2e8f0;border-right:4px solid #7aa7c7;background:#fff;border-radius:10px;padding:8px 9px;text-align:right;font:inherit;cursor:pointer}.calendar-agenda-event span{font-size:9px;color:#64748b}.calendar-agenda-event b{font-size:11px}.calendar-agenda-event small{font-size:8px;color:#94a3b8}.calendar-agenda-event.priority-high{border-right-color:#f59e0b}.calendar-agenda-event.priority-urgent{border-right-color:#dc2626}.calendar-agenda-system,.calendar-agenda-official{display:block;text-decoration:none;border-radius:8px;padding:7px 9px;font-size:10px}.calendar-agenda-system.installment{background:#fef3c7;color:#92400e}.calendar-agenda-system.check{background:#ecfeff;color:#155e75}.calendar-agenda-official{background:#fff7ed;color:#7c2d12}

/* Year view */
.calendar-year-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:12px;background:#f8fafc}.calendar-mini-month{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:10px}.calendar-mini-title{display:flex;align-items:center;justify-content:space-between;text-decoration:none;color:#0f172a;margin-bottom:8px}.calendar-mini-title strong{font-size:13px}.calendar-mini-title span{display:grid;place-items:center;min-width:22px;height:22px;border-radius:999px;background:#eef6f2;color:#0f5132;font-size:9px}.calendar-mini-weekdays,.calendar-mini-days{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.calendar-mini-weekdays span{text-align:center;font-size:8px;color:#94a3b8;font-weight:800}.calendar-mini-days a,.calendar-mini-days>span{height:27px;display:grid;place-items:center;border-radius:7px;text-decoration:none;color:#334155;font-size:9px}.calendar-mini-days a:hover{background:#eef6f2}.calendar-mini-days a.is-today{background:#0f766e;color:#fff;font-weight:900}.calendar-mini-days a.is-holiday{color:#b91c1c}.calendar-mini-days a.has-event:not(.is-today){box-shadow:inset 0 -2px #34a853}

/* Calendar form ownership/assignment */
.calendar-assignees{border:1px solid #e2e8f0;border-radius:12px;padding:10px;margin:0}.calendar-assignees legend{font-size:11px;font-weight:800;padding:0 5px}.calendar-assignees>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.calendar-assignees label{display:flex;align-items:center;gap:6px;background:#f8fafc;padding:7px;border-radius:8px;font-size:10px!important}.calendar-assignees input{width:auto!important;margin:0!important}.calendar-google-toggle .toggle-line{display:flex;align-items:center;gap:6px;margin-top:8px;padding:7px 8px;border-radius:9px;background:#f8fafc}.calendar-google-toggle .toggle-line input{width:auto;margin:0}.calendar-google-toggle .toggle-line b{font-size:10px}
.announcement-datetime-group{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(110px,.6fr);gap:8px;align-items:end}.announcement-datetime-group.span-2{grid-column:1/-1}.announcement-datetime-group label{min-width:0}

@media(max-width:1100px){.work-calendar-layout.professional{grid-template-columns:1fr}.work-calendar-sidebar{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.calendar-sidebar-card:first-child{grid-column:1/-1}.calendar-year-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.calendar-commandbar{align-items:stretch}.calendar-view-switch{display:grid;grid-template-columns:repeat(3,1fr);width:100%}.calendar-scope-switch{overflow:auto;flex-wrap:nowrap;width:100%;padding-bottom:2px}.calendar-scope-chip{white-space:nowrap}.work-calendar-sidebar{display:block}.calendar-sidebar-card{margin-bottom:8px}.calendar-year-grid{grid-template-columns:1fr}.calendar-timeline{grid-template-columns:48px repeat(var(--calendar-days),minmax(105px,1fr))}.calendar-agenda-day{grid-template-columns:75px 1fr}.calendar-agenda-event{grid-template-columns:55px 1fr}.calendar-agenda-event small{display:none}.calendar-assignees>div{grid-template-columns:1fr 1fr}.announcement-datetime-group{grid-template-columns:1fr}.announcement-datetime-group.span-2{grid-column:auto}.work-calendar-grid.rolling-30 .calendar-day-cell{min-height:95px}}
@media(max-width:480px){.calendar-assignees>div{grid-template-columns:1fr}.calendar-view-switch{grid-template-columns:repeat(2,1fr)}}

/* Calendar financial due-date audit / detail UI */
.calendar-system-event,.timeline-system,.calendar-agenda-system{font-family:inherit;border:0;cursor:pointer;text-align:right;width:100%}
.calendar-system-event small{font-size:8px;font-weight:700;opacity:.8}
.calendar-system-modal .system-dialog{max-width:720px}
.calendar-system-date{padding:0 18px 10px;color:#64748b;font-size:12px;font-weight:700}
.calendar-system-detail-list{display:flex;flex-direction:column;gap:10px;padding:0 18px 18px;max-height:65vh;overflow:auto}
.calendar-system-detail-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;border:1px solid #e2e8f0;border-right:4px solid #d97706;border-radius:12px;background:#fff;padding:12px}
.calendar-system-detail-card.check{border-right-color:#0891b2}
.calendar-system-detail-card h4{margin:0 0 7px;font-size:14px;color:#0f172a}
.system-detail-meta{display:flex;flex-wrap:wrap;gap:6px 12px;color:#64748b;font-size:11px}
.system-detail-linked{margin-top:8px;padding:6px 8px;border-radius:8px;background:#f8fafc;color:#475569;font-size:10px}
.system-detail-linked a{font-weight:800;color:#0f766e;text-decoration:none}
.system-detail-side{min-width:118px;text-align:left;display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.system-detail-side strong{font-size:14px;color:#0f172a}
.system-detail-side small{font-size:9px;color:#94a3b8;margin-bottom:5px}
@media(max-width:600px){.calendar-system-detail-card{grid-template-columns:1fr}.system-detail-side{width:100%;align-items:stretch;text-align:right}.system-detail-side .btn{width:100%}.calendar-system-detail-list{padding:0 10px 12px}.calendar-system-date{padding:0 10px 8px}}

/* === Timed site announcements responsive refresh (810) === */
.site-announcements-page{max-width:1320px;padding-inline:clamp(8px,1.6vw,20px)}
.announcement-admin-hero{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;padding:20px 22px;border-radius:24px;background:linear-gradient(135deg,rgba(2,132,199,.09),rgba(15,81,50,.08));overflow:hidden;position:relative}
.announcement-admin-hero:after{content:"";position:absolute;width:180px;height:180px;border-radius:50%;background:rgba(255,255,255,.34);left:-70px;top:-95px;pointer-events:none}
.announcement-admin-hero-icon{width:52px;height:52px;display:grid;place-items:center;border-radius:16px;background:rgba(255,255,255,.78);box-shadow:0 8px 22px rgba(15,23,42,.08);font-size:24px;position:relative;z-index:1}
.announcement-admin-hero-copy{min-width:0;position:relative;z-index:1}.announcement-admin-hero-copy>span{font-size:11px;color:#0f766e;font-weight:900}.announcement-admin-hero-copy h2{margin:3px 0 5px;font-size:23px}.announcement-admin-hero-copy p{margin:0;color:#64748b;font-size:11px;line-height:1.85;max-width:820px}
.announcement-admin-hero-badge{position:relative;z-index:1;white-space:nowrap;border:1px solid rgba(15,118,110,.16);background:rgba(255,255,255,.68);color:#0f766e;border-radius:999px;padding:7px 11px;font-size:10px;font-weight:900}
.announcement-admin-grid{grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}.announcement-editor-card{padding:0;overflow:hidden}.announcement-editor-head{padding:17px 19px;margin:0;border-bottom:1px solid #e8eef4;background:linear-gradient(180deg,#fff,#fbfdff);gap:12px}.announcement-editor-title-wrap{display:flex;align-items:center;gap:10px;min-width:0}.announcement-editor-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;background:#eaf7f1;color:#0f6b4b;font-size:15px;flex:0 0 auto}.announcement-editor-title-wrap h3{font-size:15px}.announcement-editor-title-wrap p{margin:3px 0 0;color:#7c8a9c;font-size:9.5px;line-height:1.7}.announcement-reset-btn{flex:0 0 auto;padding:7px 10px;font-size:10px}
.announcement-restored-note{display:flex;align-items:center;gap:10px;margin:12px 16px 0;padding:10px 12px;border:1px solid #bbdfca;background:#f1fbf6;color:#16603f;border-radius:12px}.announcement-restored-note>span{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#dff4e8;font-size:16px}.announcement-restored-note strong,.announcement-restored-note small{display:block}.announcement-restored-note strong{font-size:11px}.announcement-restored-note small{margin-top:2px;font-size:9px;color:#5c7568;line-height:1.6}
.announcement-form-section{margin:13px 16px 0;padding:13px;border:1px solid #e7edf3;background:#fbfdff;border-radius:15px}.announcement-section-head{display:flex;align-items:center;gap:8px;margin-bottom:10px}.announcement-section-head>span{width:25px;height:25px;display:grid;place-items:center;border-radius:8px;background:#eaf7f1;color:#0f6b4b;font-weight:900;font-size:10px;flex:0 0 auto}.announcement-section-head strong,.announcement-section-head small{display:block}.announcement-section-head strong{font-size:11px;color:#253345}.announcement-section-head small{font-size:8.5px;color:#8a98a9;margin-top:1px}
.announcement-basic-grid{grid-template-columns:1.25fr .8fr .8fr;gap:10px}.announcement-field{display:block;min-width:0}.announcement-form-grid label,.announcement-datetime-group label{color:#334155;font-size:10.5px}.announcement-form-grid label>span{display:block;margin-top:2px;font-size:8px}.announcement-form-grid input,.announcement-form-grid select,.announcement-form-grid textarea,.announcement-datetime-group input{border:1px solid #d8e1ea;border-radius:11px;background:#fff;min-height:42px;padding:8px 10px;font:inherit;transition:border-color .15s,box-shadow .15s,background .15s}.announcement-form-grid textarea{min-height:96px;resize:vertical;line-height:1.85}.announcement-form-grid input:focus,.announcement-form-grid select:focus,.announcement-form-grid textarea:focus,.announcement-datetime-group input:focus{outline:0;border-color:#4f9d82;box-shadow:0 0 0 3px rgba(15,118,110,.10);background:#fff}.announcement-form-grid input[type="time"],.announcement-datetime-group input[type="time"]{direction:ltr;text-align:center}
.announcement-schedule-section{background:#fff}.announcement-schedule-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.announcement-schedule-card{border:1px solid #e4ebf2;background:#fbfdff;border-radius:13px;padding:10px}.announcement-schedule-card.expiry-card{border-color:#f1dddd;background:#fffafa}.announcement-schedule-card-head{display:flex;align-items:center;gap:7px;margin-bottom:8px}.announcement-schedule-card-head>span{width:25px;height:25px;display:grid;place-items:center;border-radius:8px;background:#e9f6f1;color:#0f766e;font-size:8px}.announcement-schedule-card.expiry-card .announcement-schedule-card-head>span{background:#feecec;color:#b42318}.announcement-schedule-card-head strong,.announcement-schedule-card-head small{display:block}.announcement-schedule-card-head strong{font-size:10px}.announcement-schedule-card-head small{font-size:8px;color:#94a3b8;margin-top:1px}.announcement-datetime-group{grid-template-columns:minmax(0,1.3fr) minmax(104px,.7fr);gap:7px}.announcement-datetime-group label>strong{color:#b91c1c;font-size:8px}
.announcement-message-field{position:relative}.announcement-character-hint{position:absolute;left:8px;bottom:8px;color:#94a3b8;font-size:8px;direction:rtl}
.announcement-channel-section{background:#fff}.announcement-channel-master{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;padding:11px 12px;border:1px solid #dbe8e2;border-radius:13px;background:#f7fcf9;cursor:pointer}.announcement-channel-master>input{position:absolute;opacity:0;pointer-events:none}.announcement-channel-master-switch{width:38px;height:22px;border-radius:999px;background:#cbd5e1;position:relative;transition:.18s;box-shadow:inset 0 0 0 1px rgba(15,23,42,.08)}.announcement-channel-master-switch:after{content:"";position:absolute;width:16px;height:16px;border-radius:50%;background:#fff;top:3px;right:3px;box-shadow:0 2px 5px rgba(15,23,42,.18);transition:.18s}.announcement-channel-master>input:checked+.announcement-channel-master-switch{background:#167657}.announcement-channel-master>input:checked+.announcement-channel-master-switch:after{transform:translateX(-16px)}.announcement-channel-master>input:focus-visible+.announcement-channel-master-switch{outline:3px solid rgba(15,118,110,.16);outline-offset:2px}.announcement-channel-master>span:last-child strong,.announcement-channel-master>span:last-child small{display:block}.announcement-channel-master>span:last-child strong{font-size:10.5px;color:#213548}.announcement-channel-master>span:last-child small{font-size:8.5px;color:#718096;margin-top:2px;line-height:1.7}.announcement-channel-panel{margin-top:9px;transition:opacity .18s}.announcement-channel-panel.is-disabled{opacity:.52}.announcement-channel-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}.announcement-channel-toolbar>span{font-size:8.5px;color:#64748b;font-weight:800}.announcement-channel-toolbar>div{display:flex;gap:5px}.announcement-channel-mini{border:0;background:#edf6f2;color:#176a50;border-radius:8px;padding:5px 7px;font:inherit;font-size:8px;font-weight:900;cursor:pointer}.announcement-channel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.announcement-channel-option{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;padding:9px;border:1px solid #e0e8ef;border-radius:11px;background:#fff;cursor:pointer;min-width:0}.announcement-channel-option:hover{border-color:#b9d5ca;background:#fbfefc}.announcement-channel-option>input{position:absolute;opacity:0;pointer-events:none}.announcement-channel-check{width:22px;height:22px;border-radius:7px;display:grid;place-items:center;border:1px solid #cbd5e1;color:transparent;background:#fff;font-size:11px;font-weight:900;transition:.15s}.announcement-channel-option>input:checked+.announcement-channel-check{background:#167657;border-color:#167657;color:#fff}.announcement-channel-copy{min-width:0}.announcement-channel-copy strong,.announcement-channel-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.announcement-channel-copy strong{font-size:9.5px;color:#334155}.announcement-channel-copy small{font-size:7.5px;color:#94a3b8;margin-top:2px;direction:ltr;text-align:right}.announcement-channel-ready{font-size:7.5px;font-weight:900;color:#167657;background:#eaf7f1;border-radius:999px;padding:4px 6px;white-space:nowrap}.announcement-channel-option.is-not-ready .announcement-channel-ready{color:#9a6700;background:#fff5d6}.announcement-channel-note{margin-top:7px;padding:7px 9px;border-radius:9px;background:#f8fafc;color:#64748b;font-size:8px;line-height:1.7}.announcement-channel-empty{padding:11px;border:1px dashed #cbd5e1;border-radius:11px;text-align:center;background:#f8fafc}.announcement-channel-empty strong,.announcement-channel-empty span{display:block}.announcement-channel-empty strong{font-size:10px}.announcement-channel-empty span{margin-top:3px;font-size:8px;color:#718096}.announcement-history-channels{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}.announcement-history-channels span{font-size:8px;color:#526276;background:#f1f5f9;border-radius:999px;padding:3px 6px}.announcement-delivery-badge.is-sent{color:#166534;background:#ecfdf3}.announcement-delivery-badge.is-error{color:#b42318;background:#fff1f0}.announcement-delivery-badge.is-deleted{color:#475569;background:#eef2f6}.announcement-delivery-badge.is-pending{color:#9a6700;background:#fff8df}
.announcement-preview-wrap{margin:13px 16px 0}.announcement-preview-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}.announcement-preview-head>span{font-size:10px;font-weight:800;color:#475569}.announcement-preview-head>small{font-size:8px;color:#94a3b8}.site-announcement-preview{margin:0;min-height:38px;border-radius:11px;padding:7px 11px;gap:8px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);white-space:nowrap;overflow:hidden}.site-announcement-preview #announcementPreviewText{min-width:0;overflow:hidden;text-overflow:ellipsis}.announcement-preview-dot{flex:0 0 auto;opacity:.9}.announcement-form-actions{display:flex;gap:8px;padding:13px 16px 16px}.announcement-save-btn{margin:0;flex:1;min-height:43px;border-radius:11px}.announcement-save-btn>span{font-size:13px}.announcement-mobile-reset{display:none;min-height:43px;border-radius:11px}
.announcement-help-card{padding:16px;position:sticky;top:62px}.announcement-help-top{display:flex;gap:10px;align-items:flex-start}.announcement-help-icon{width:40px;height:40px;border-radius:12px;font-size:19px;flex:0 0 auto}.announcement-help-card h3{margin:1px 0 4px;font-size:13px}.announcement-help-card p{margin:0;font-size:10px;line-height:1.8}.announcement-help-points{display:grid;gap:6px;margin-top:13px;padding-top:12px;border-top:1px solid #edf2f7}.announcement-help-points span{font-size:9px;color:#526276}.announcement-tone-guide{padding-top:11px;border-top:1px solid #edf2f7}
.announcement-history-card{border-radius:18px}.announcement-history-head{padding:14px 16px}.announcement-history-head>div h3{font-size:14px}.announcement-history-head>div small{display:block;margin-top:2px;color:#94a3b8;font-size:8.5px}.announcement-history-head>span{background:#f1f5f9;border-radius:999px;padding:5px 9px;font-weight:800}.announcement-history-list{padding:9px}.announcement-history-item{grid-template-columns:7px minmax(0,1fr) auto;gap:10px;padding:11px;border-radius:12px;background:#fff}.announcement-history-status span{width:5px;min-height:54px}.announcement-history-title h4{font-size:11px}.announcement-history-copy p{font-size:10.5px;line-height:1.8;overflow-wrap:anywhere}.announcement-history-meta span{background:#f8fafc;border-radius:999px;padding:3px 6px}.announcement-history-actions .btn{min-height:32px;border-radius:9px}

@media(max-width:1000px){
  .announcement-admin-grid{grid-template-columns:1fr}.announcement-help-card{display:block;position:static}.announcement-help-top{align-items:center}.announcement-help-points{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.announcement-help-points span{background:#f8fafc;border-radius:9px;padding:7px}
}
@media(max-width:760px){
  .site-announcements-page.section{padding-left:6px!important;padding-right:6px!important}.announcement-admin-hero{grid-template-columns:auto minmax(0,1fr);gap:10px;padding:14px;border-radius:17px;margin-bottom:10px}.announcement-admin-hero-icon{width:42px;height:42px;border-radius:12px;font-size:20px}.announcement-admin-hero-copy h2{font-size:18px;margin-top:2px}.announcement-admin-hero-copy p{font-size:9px;line-height:1.7}.announcement-admin-hero-badge{display:none}.announcement-admin-grid{gap:10px;margin-bottom:10px}.announcement-editor-card,.announcement-help-card,.announcement-history-card{border-radius:15px;box-shadow:0 7px 20px rgba(15,23,42,.05)}.announcement-editor-head{padding:12px;align-items:flex-start}.announcement-editor-icon{width:32px;height:32px}.announcement-editor-title-wrap h3{font-size:13px}.announcement-editor-title-wrap p{font-size:8px;max-width:220px}.announcement-reset-btn{display:none}.announcement-restored-note{margin:9px 9px 0;padding:8px}.announcement-form-section{margin:9px 9px 0;padding:10px;border-radius:12px}.announcement-basic-grid{grid-template-columns:1fr}.announcement-form-grid{gap:8px}.announcement-form-grid input,.announcement-form-grid select,.announcement-form-grid textarea,.announcement-datetime-group input{min-height:44px;font-size:13px;margin-top:4px}.announcement-schedule-grid{grid-template-columns:1fr}.announcement-datetime-group{grid-template-columns:minmax(0,1.25fr) minmax(100px,.75fr);gap:6px}.announcement-message-field textarea{min-height:112px}.announcement-channel-master{padding:10px}.announcement-channel-grid{grid-template-columns:1fr}.announcement-channel-option{min-height:48px;padding:8px}.announcement-channel-toolbar{align-items:flex-start;flex-direction:column}.announcement-channel-toolbar>div{width:100%}.announcement-channel-mini{flex:1;min-height:32px}.announcement-channel-ready{font-size:7px}.announcement-channel-note{font-size:7.5px}.announcement-preview-wrap{margin:10px 9px 0}.announcement-preview-head>small{display:none}.site-announcement-preview{min-height:40px;font-size:10px}.announcement-form-actions{padding:10px 9px 12px;display:grid;grid-template-columns:minmax(0,1fr) auto}.announcement-save-btn{min-height:46px}.announcement-mobile-reset{display:inline-flex;padding-inline:10px}.announcement-help-card{padding:11px}.announcement-help-top p{font-size:9px}.announcement-help-points{grid-template-columns:1fr;margin-top:9px;padding-top:9px}.announcement-help-points span{padding:6px 8px}.announcement-tone-guide{font-size:8.5px;margin-top:8px;padding-top:8px}.announcement-history-head{padding:11px}.announcement-history-head>div small{display:none}.announcement-history-list{padding:6px}.announcement-history-item{grid-template-columns:5px minmax(0,1fr);gap:8px;padding:9px}.announcement-history-actions{grid-column:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:5px}.announcement-history-actions form{width:100%}.announcement-history-actions .btn{width:100%;justify-content:center;padding:7px 5px;font-size:9px}.announcement-history-title{flex-direction:row;align-items:center;flex-wrap:wrap}.announcement-history-meta{gap:4px}.announcement-history-meta span{font-size:8px}.announcement-history-copy p{font-size:10px}
}
@media(max-width:430px){
  .announcement-admin-hero-copy>span{font-size:9px}.announcement-admin-hero-copy p{display:none}.announcement-datetime-group{grid-template-columns:1fr}.announcement-channel-option{grid-template-columns:auto minmax(0,1fr)}.announcement-channel-ready{grid-column:2;justify-self:start;margin-top:-3px}.announcement-form-actions{grid-template-columns:1fr}.announcement-mobile-reset{width:100%;justify-content:center}.announcement-preview-head{justify-content:flex-start}.announcement-history-actions{grid-template-columns:1fr 1fr}.announcement-history-actions>button:first-child{grid-column:1/-1}.announcement-help-card{display:none}
}


/* === AutoSadra calendar polish + official occasions/holidays (810) === */
.work-calendar-page.section{
  width:100%;
  max-width:1580px;
  min-width:0;
  margin-inline:auto;
  box-sizing:border-box;
  overflow-x:clip;
}
.work-calendar-page *{box-sizing:border-box}
.work-calendar-page .work-calendar-hero,
.work-calendar-page .calendar-commandbar,
.work-calendar-page .work-calendar-layout,
.work-calendar-page .work-calendar-main-card,
.work-calendar-page .work-calendar-sidebar{min-width:0;max-width:100%}

.work-calendar-hero.compact{
  position:relative;
  overflow:hidden;
  padding:18px 20px;
  border:1px solid #dbe6e1;
  border-radius:20px;
  background:
    radial-gradient(circle at 8% 20%,rgba(15,118,110,.08),transparent 30%),
    linear-gradient(135deg,#f7fcfa 0%,#f4f9fd 100%);
  box-shadow:0 10px 28px rgba(15,23,42,.045);
}
.work-calendar-hero.compact:after{
  content:"";
  position:absolute;
  inset:auto -40px -70px auto;
  width:180px;
  height:180px;
  border-radius:50%;
  background:rgba(15,81,50,.035);
  pointer-events:none;
}
.work-calendar-hero.compact>div{position:relative;z-index:1}
.work-calendar-hero.compact h2{font-size:22px;color:#102a43}
.work-calendar-hero.compact p{max-width:760px;font-size:11px;line-height:1.8;color:#6b7c8f}
.work-calendar-hero-actions .btn{border-radius:11px;min-height:40px}

.calendar-commandbar{
  min-width:0;
  padding:7px 9px;
  border-color:#e3e9ef;
  border-radius:14px;
  box-shadow:0 7px 20px rgba(15,23,42,.035);
}
.calendar-view-switch,.calendar-scope-switch{min-width:0}
.calendar-view-btn,.calendar-scope-chip{
  border-radius:9px;
  min-height:32px;
  padding:6px 10px;
  transition:background .16s,border-color .16s,color .16s,transform .16s;
}
.calendar-view-btn:hover,.calendar-scope-chip:hover{transform:translateY(-1px)}
.calendar-view-btn.active{box-shadow:0 6px 16px rgba(15,81,50,.18)}

.work-calendar-layout.professional{
  width:100%;
  min-width:0;
  grid-template-columns:minmax(0,1fr) minmax(225px,250px);
  gap:12px;
}
.work-calendar-main-card{
  width:100%;
  min-width:0;
  border-color:#e1e8ee;
  border-radius:18px;
  box-shadow:0 12px 32px rgba(15,23,42,.055);
  overflow:hidden;
}
.work-calendar-sidebar{
  width:100%;
  min-width:0;
}
.calendar-sidebar-card{
  min-width:0;
  border-color:#e4eaf0;
  border-radius:15px;
  box-shadow:0 8px 24px rgba(15,23,42,.045);
}

.work-calendar-toolbar.professional{
  min-height:62px;
  padding:10px 14px;
  background:linear-gradient(180deg,#fff,#fbfdff);
}
.work-calendar-toolbar.professional .calendar-nav-btn{
  width:36px;
  height:36px;
  border-radius:11px;
  background:#f0f6f3;
  box-shadow:inset 0 0 0 1px #e0ece6;
}
.work-calendar-toolbar.professional .calendar-current-month{min-width:170px}
.work-calendar-toolbar.professional .calendar-current-month strong{font-size:17px;color:#102a43}
.work-calendar-toolbar.professional .calendar-current-month a{
  display:inline-block;
  margin-top:2px;
  padding:2px 8px;
  border-radius:999px;
  background:#f0f9ff;
  color:#0369a1;
}

.work-calendar-weekdays{
  width:100%;
  min-width:0;
  grid-template-columns:repeat(7,minmax(0,1fr));
  background:#f8fafc;
}
.work-calendar-weekdays>div{
  min-width:0;
  padding:9px 2px;
  font-size:11px;
  letter-spacing:-.1px;
  border-left:1px solid #edf1f5;
}
.work-calendar-weekdays>div:last-child{border-left:0}
.work-calendar-grid{
  width:100%;
  min-width:0;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:1px;
  background:#edf1f4;
}
.calendar-day-cell,
.calendar-day-cell.is-empty{
  min-width:0;
  width:auto;
  min-height:132px;
  padding:7px;
  border:0!important;
  background:#fff;
  overflow:hidden;
}
.calendar-day-cell.is-empty{background:#f8fafb}
.calendar-day-cell:not(.is-empty):hover{
  z-index:1;
  background:#fcfefe;
  box-shadow:inset 0 0 0 1px #d9e9e2;
}
.calendar-day-cell.is-today{
  z-index:1;
  background:linear-gradient(180deg,#effaf6 0,#fff 66%);
  box-shadow:inset 0 0 0 2px #81b9a4;
}
.calendar-day-cell.is-holiday:not(.is-today){
  background:linear-gradient(180deg,#fff7f7 0,#fff 72%);
  box-shadow:inset 0 3px #efb4b4;
}
.calendar-day-cell.is-friday:not(.is-today){
  background:linear-gradient(180deg,#fff9f9 0,#fff 75%);
}
.calendar-day-cell header{
  min-width:0;
  min-height:28px;
  gap:5px;
}
.calendar-day-number{
  flex:0 0 auto;
  font-size:13px;
  color:#1d2d3d;
}
.calendar-day-cell.is-holiday .calendar-day-number{color:#b4232d}
.calendar-day-number small{font-size:7.5px}
.calendar-today-label,
.calendar-holiday-label{
  flex:0 0 auto;
  padding:2px 6px;
  border-radius:999px;
  font-size:8px;
  font-weight:800;
  line-height:1.6;
}
.calendar-holiday-label{background:#fff0f1;color:#b4232d;border:1px solid #f5d1d4}
.calendar-day-add{
  flex:0 0 25px;
  width:25px;
  height:25px;
  margin-right:auto;
  border-radius:8px;
  background:#edf8f4;
  transition:transform .15s,background .15s;
}
.calendar-day-add:hover{transform:scale(1.06);background:#dff2ea}
.calendar-day-content{min-width:0;gap:4px;margin-top:4px}
.calendar-day-content>*{min-width:0;max-width:100%}

.calendar-official-event{
  display:flex;
  align-items:flex-start;
  gap:5px;
  width:100%;
  min-width:0;
  padding:4px 6px;
  border:1px solid #eee4fb;
  border-radius:7px;
  background:#faf7ff;
  color:#67419a;
  font-size:8.5px;
  line-height:1.55;
  white-space:normal;
  overflow:hidden;
  text-overflow:clip;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.calendar-official-event>span{
  display:inline-block;
  width:5px;
  height:5px;
  margin-top:4px;
  border-radius:50%;
  background:#8b5fc0;
}
.calendar-more-official{padding:0 3px;color:#7b6b91;font-size:8px}
.calendar-system-event{
  width:100%;
  min-width:0;
  border-radius:7px;
  padding:4px 6px;
}
.calendar-event-chip{
  min-width:0;
  max-width:100%;
  border-radius:7px;
  padding:4px 6px;
}
.calendar-event-chip b{min-width:0}

.calendar-timeline{
  width:100%;
  min-width:0;
  max-width:100%;
  border-top:1px solid #eef2f6;
}
.calendar-timeline-head.is-holiday{background:#fff4f5;color:#a7212b}
.calendar-all-day-cell.is-holiday{background:#fffafa}
.timeline-official{
  min-width:0;
  margin:2px 0;
  padding:4px 6px;
  border-radius:7px;
  background:#faf7ff;
  color:#67419a;
  font-size:8px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.calendar-agenda-day.is-holiday{background:linear-gradient(90deg,#fff,#fff8f8)}
.calendar-agenda-date em{
  display:inline-flex;
  margin-top:5px;
  padding:2px 7px;
  border-radius:999px;
  background:#fff0f1;
  color:#b4232d;
  font-size:8px;
  font-style:normal;
  font-weight:800;
}
.calendar-agenda-official{
  border:1px solid #eee4fb;
  background:#faf7ff;
  color:#67419a;
}

.calendar-mini-days a.is-holiday:not(.is-today){
  background:#fff3f4;
  color:#b4232d;
  font-weight:800;
}
.calendar-mini-days a.has-official:not(.is-today){
  box-shadow:inset 0 -2px #8b5fc0;
}
.calendar-mini-days a.has-event.has-official:not(.is-today){
  box-shadow:inset 0 -2px #8b5fc0,inset 0 -4px #34a853;
}

.agenda-list.compact{max-height:350px}
.calendar-user-list{max-height:160px}

@media(max-width:1280px){
  .work-calendar-layout.professional{grid-template-columns:minmax(0,1fr) 220px}
  .calendar-day-cell,.calendar-day-cell.is-empty{min-height:122px;padding:6px}
}
@media(max-width:1100px){
  .work-calendar-layout.professional{grid-template-columns:1fr}
  .work-calendar-sidebar{
    position:static;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .calendar-sidebar-card:first-child{grid-column:1/-1}
}
@media(max-width:760px){
  .work-calendar-page.section{
    width:100%;
    padding-left:5px!important;
    padding-right:5px!important;
    overflow-x:hidden;
  }
  .work-calendar-hero.compact{
    margin-bottom:8px;
    padding:13px;
    border-radius:15px;
    gap:10px;
  }
  .work-calendar-hero.compact h2{font-size:18px}
  .work-calendar-hero.compact p{font-size:9px;line-height:1.7}
  .work-calendar-hero-actions{gap:6px}
  .work-calendar-hero-actions .btn{min-height:38px;padding:7px 8px;font-size:10px}
  .calendar-commandbar{
    margin-bottom:8px;
    padding:6px;
    border-radius:12px;
    overflow:hidden;
  }
  .calendar-view-switch{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .calendar-view-btn{min-width:0;padding:5px 4px;font-size:9px}
  .calendar-scope-switch{
    max-width:100%;
    scrollbar-width:thin;
  }
  .calendar-scope-chip{font-size:9px;padding:5px 8px}
  .work-calendar-main-card{border-radius:13px}
  .work-calendar-toolbar.professional{min-height:52px;padding:7px 8px}
  .work-calendar-toolbar.professional .calendar-nav-btn{width:31px;height:31px;font-size:20px}
  .work-calendar-toolbar.professional .calendar-current-month{min-width:130px}
  .work-calendar-toolbar.professional .calendar-current-month strong{font-size:14px}
  .work-calendar-weekdays>div{padding:7px 1px;font-size:8px}
  .calendar-day-cell,.calendar-day-cell.is-empty{
    min-height:88px;
    padding:3px;
  }
  .calendar-day-cell header{min-height:22px;gap:2px}
  .calendar-day-number{font-size:10px}
  .calendar-day-number small{display:none}
  .calendar-day-add{flex-basis:19px;width:19px;height:19px;border-radius:6px;font-size:12px}
  .calendar-holiday-label{display:none}
  .calendar-official-event{
    padding:2px 3px;
    border-radius:5px;
    font-size:6.8px;
    line-height:1.45;
    -webkit-line-clamp:1;
  }
  .calendar-official-event:nth-of-type(n+2){display:none}
  .calendar-official-event>span{display:none}
  .calendar-system-event{padding:3px;font-size:6.8px}
  .calendar-event-chip{padding:3px 4px;border-radius:5px}
  .calendar-event-chip b{font-size:7px}
  .calendar-more-official,.calendar-more-events{display:none}
  .work-calendar-sidebar{display:block}
  .calendar-sidebar-card{margin-bottom:8px}
  .calendar-timeline{
    grid-template-columns:43px repeat(var(--calendar-days),minmax(96px,1fr));
    max-width:100%;
  }
  .calendar-year-grid{padding:7px;gap:7px}
}
@media(max-width:480px){
  .work-calendar-hero.compact p{display:none}
  .calendar-view-switch{grid-template-columns:repeat(3,minmax(0,1fr))}
  .calendar-day-cell,.calendar-day-cell.is-empty{min-height:78px}
  .calendar-day-content{gap:2px}
  .calendar-system-event:nth-of-type(n+2){display:none}
  .calendar-event-chip:nth-of-type(n+3){display:none}
}

/* === Calendar access scopes + lunar occasions + day preview (811) === */
.calendar-legend{
  display:flex;align-items:center;gap:9px;flex-wrap:wrap;
  margin:-2px 0 10px;padding:7px 10px;border:1px solid #e5ebef;border-radius:12px;
  background:#fff;color:#64748b;font-size:8.5px;min-width:0;
}
.calendar-legend>span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.calendar-legend i{width:7px;height:7px;border-radius:50%;display:inline-block;background:#7aa7c7}
.calendar-legend .legend-program i{background:#0f766e}
.calendar-legend .legend-system i{background:#d29b28}
.calendar-legend .legend-lunar i{background:#7656a8}
.calendar-legend .legend-holiday i{background:#c94852}
.calendar-legend small{margin-inline-start:auto;color:#94a3b8;font-size:8px;line-height:1.6}

.calendar-hijri-date{
  display:inline-flex;align-items:center;gap:2px;min-width:0;max-width:92px;
  padding:2px 5px;border-radius:999px;background:#f5f1fb;color:#6d4f9d;
  font-size:7.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.calendar-timeline-head small,.calendar-agenda-date small{
  display:block;margin-top:3px;color:#7257a2;font-size:7.5px;font-weight:700;
}
.calendar-official-event.kind-lunar,.timeline-official.kind-lunar,.calendar-agenda-official.kind-lunar{
  border-color:#dfd3f1;background:#f7f3fc;color:#62438f;
}
.calendar-official-event.kind-lunar>span{background:#7656a8}
.calendar-official-event.kind-solar{border-color:#dce9f1;background:#f7fbfd;color:#355d78}
.calendar-official-event.kind-solar>span{background:#5f8fad}
.calendar-official-event.kind-official{border-color:#eee4fb;background:#faf7ff;color:#67419a}
.calendar-mini-days a.has-lunar:not(.is-today){outline:1px dotted #8b69b6;outline-offset:-3px}

.calendar-day-floating-preview{
  position:fixed;z-index:10050;max-height:min(420px,72vh);overflow:auto;
  padding:10px;border:1px solid #dfe7ec;border-radius:14px;background:rgba(255,255,255,.985);
  box-shadow:0 18px 48px rgba(15,23,42,.18);direction:rtl;text-align:right;
  color:#243445;font-family:inherit;pointer-events:none;
}
.calendar-day-floating-preview[hidden]{display:none!important}
.calendar-preview-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:7px;border-bottom:1px solid #edf1f4}
.calendar-preview-head strong{font-size:11px;color:#183247}
.calendar-preview-head em{font-size:7.5px;font-style:normal;font-weight:800;color:#b4232d;background:#fff0f1;border-radius:999px;padding:2px 6px}
.calendar-preview-hijri{margin-top:6px;padding:5px 7px;border-radius:8px;background:#f7f3fc;color:#67419a;font-size:8px}
.calendar-preview-group{display:flex;flex-direction:column;gap:4px;margin-top:8px}
.calendar-preview-group>b{font-size:8px;color:#7a8794}
.calendar-preview-group>span{display:block;padding:5px 7px;border-radius:7px;font-size:9px;line-height:1.5;background:#f8fafc;color:#334155}
.calendar-preview-group .preview-program{border-right:3px solid #0f766e;background:#f2faf7}
.calendar-preview-group .preview-installment{border-right:3px solid #d29b28;background:#fff9e9}
.calendar-preview-group .preview-check{border-right:3px solid #3c8fa0;background:#f0fbfc}
.calendar-preview-group .preview-occasion.kind-lunar{border-right:3px solid #7656a8;background:#f7f3fc;color:#62438f}
.calendar-preview-tip{display:block;margin-top:8px;padding-top:7px;border-top:1px dashed #e4e9ed;color:#9aa5b1;font-size:7.5px;text-align:center}
.calendar-day-cell[data-calendar-has-preview="1"]{cursor:default}
.calendar-day-cell[data-calendar-has-preview="1"] .calendar-more-events{color:#667788;font-weight:700}

.calendar-access-summary h4{margin-bottom:8px}
.calendar-access-chips{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:7px}
.calendar-access-chips span{display:inline-flex;padding:4px 7px;border-radius:999px;background:#eef7f3;color:#1d6b50;border:1px solid #d9ebe3;font-size:8px;font-weight:700}
.calendar-access-summary>small{display:block;color:#8795a3;font-size:7.8px;line-height:1.75}

@media(max-width:760px){
  .calendar-legend{gap:6px;padding:6px 7px;margin-bottom:7px;overflow:hidden}
  .calendar-legend>span{font-size:7px}
  .calendar-legend small{display:none}
  .calendar-hijri-date{max-width:42px;padding:1px 3px;font-size:6.3px}
  .calendar-day-floating-preview{display:none!important}
}
@media(max-width:480px){
  .calendar-legend{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));text-align:center}
  .calendar-legend>span{justify-content:center;white-space:normal;line-height:1.25}
  .calendar-hijri-date{max-width:28px}
}
.calendar-permission-note{
  display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap;margin:0 0 10px;padding:9px 10px;
  border:1px solid #dce9e3;border-radius:10px;background:#f6fbf8;color:#45635a;
}
.calendar-permission-note b{font-size:9px;color:#1d5b48}
.calendar-permission-note span{font-size:8px;line-height:1.7;color:#6f837b}


/* === Calendar sidebar clarity + typography/color refresh (812) === */
.work-calendar-page{
  --cal-ink:#183247;
  --cal-text:#31465a;
  --cal-muted:#74869a;
  --cal-border:#e2e9ef;
  --cal-surface:#ffffff;
  --cal-soft:#f7fafc;
  --cal-green:#176b52;
  --cal-green-soft:#edf7f3;
  --cal-blue:#4a759b;
  --cal-gold:#b9882c;
  --cal-cyan:#4f8792;
  --cal-purple:#74599a;
  --cal-red:#bd4a55;
  font-family:var(--app-font),Tahoma,Arial,sans-serif!important;
  color:var(--cal-text);
}
.work-calendar-page button,
.work-calendar-page input,
.work-calendar-page select,
.work-calendar-page textarea{font-family:inherit!important}

.work-calendar-hero.compact{
  padding:17px 20px;
  border-color:var(--cal-border);
  background:linear-gradient(135deg,#f8fbfa 0%,#f6f9fc 100%);
  box-shadow:none;
}
.work-calendar-hero.compact:after{display:none}
.work-calendar-eyebrow{color:var(--cal-green);font-size:11px;font-weight:800}
.work-calendar-hero.compact h2{font-size:22px;color:var(--cal-ink);font-weight:900;letter-spacing:-.2px}
.work-calendar-hero.compact p{font-size:12px;color:var(--cal-muted);line-height:1.9}
.work-calendar-hero-actions .btn{box-shadow:none}

.calendar-commandbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px;
  border:1px solid var(--cal-border);
  background:#fff;
  box-shadow:none;
}
.calendar-view-switch{display:flex;gap:4px;flex-wrap:wrap}
.calendar-view-btn{
  min-height:34px;
  padding:6px 11px;
  border:1px solid transparent;
  background:transparent;
  color:#617488;
  font-size:10.5px;
  font-weight:800;
}
.calendar-view-btn:hover{transform:none;background:#f2f6f8;color:var(--cal-ink)}
.calendar-view-btn.active{
  background:var(--cal-green);
  color:#fff;
  border-color:var(--cal-green);
  box-shadow:none;
}
.calendar-active-scope{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  padding:6px 9px;
  border-radius:10px;
  background:#f7fafc;
  color:var(--cal-muted);
  font-size:9.5px;
}
.calendar-active-scope strong{color:var(--cal-ink);font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.calendar-mobile-filter-btn{display:none}

.calendar-legend{
  padding:7px 10px;
  border-color:var(--cal-border);
  box-shadow:none;
  color:var(--cal-muted);
  font-size:9px;
}
.calendar-legend .legend-program i{background:var(--cal-green)}
.calendar-legend .legend-system i{background:var(--cal-gold)}
.calendar-legend .legend-lunar i{background:var(--cal-purple)}
.calendar-legend .legend-holiday i{background:var(--cal-red)}

.work-calendar-layout.professional{
  grid-template-columns:minmax(0,1fr) minmax(235px,260px);
  gap:12px;
  align-items:start;
}
.work-calendar-main-card{
  border-color:var(--cal-border);
  border-radius:17px;
  box-shadow:0 8px 24px rgba(35,55,75,.045);
}

/* مهم: خنثی‌سازی استایل عمومی aside که باعث ستون سرمه‌ای شده بود. */
.work-calendar-sidebar{
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  max-height:none!important;
  padding:0!important;
  background:transparent!important;
  color:var(--cal-text)!important;
  overflow:visible!important;
  position:sticky!important;
  top:58px!important;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.calendar-sidebar-card{
  width:100%;
  min-width:0;
  overflow:hidden;
  padding:0;
  border:1px solid var(--cal-border);
  border-radius:16px;
  background:var(--cal-surface);
  color:var(--cal-text);
  box-shadow:0 7px 20px rgba(35,55,75,.04);
}
.calendar-control-card{padding:13px}
.calendar-sidebar-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  padding-bottom:10px;
  border-bottom:1px solid #edf1f4;
}
.calendar-sidebar-kicker{display:block;margin-bottom:3px;color:var(--cal-green);font-size:9px;font-weight:900}
.calendar-sidebar-heading h3{margin:0;color:var(--cal-ink);font-size:13px;font-weight:900;line-height:1.6}
.calendar-filter-close{
  display:none;
  width:30px;height:30px;padding:0;border-radius:9px;background:#f2f5f7;color:#66798d;
  font-size:20px;line-height:1;
}

.calendar-filter-section{padding:11px 0 0}
.calendar-filter-section+.calendar-filter-section{margin-top:9px;border-top:1px solid #edf1f4}
.calendar-filter-title{
  display:block;
  margin-bottom:7px;
  color:#718397;
  font-size:9px;
  font-weight:900;
}
.calendar-scope-list,.calendar-source-filters{display:flex;flex-direction:column;gap:3px}
.calendar-scope-row{
  display:grid;
  grid-template-columns:10px minmax(0,1fr) 12px;
  align-items:center;
  gap:7px;
  min-width:0;
  padding:7px 6px;
  border:1px solid transparent;
  border-radius:10px;
  color:var(--cal-text);
  text-decoration:none;
  transition:background .15s,border-color .15s;
}
.calendar-scope-row:hover{background:#f6f9fa;border-color:#edf1f3}
.calendar-scope-row.active{background:var(--cal-green-soft);border-color:#d5e9df}
.calendar-scope-row>span{min-width:0}
.calendar-scope-row b{display:block;color:var(--cal-ink);font-size:10px;font-weight:900;line-height:1.55}
.calendar-scope-row small{display:block;margin-top:1px;color:#8898a8;font-size:7.8px;line-height:1.55}
.calendar-scope-row em{color:#9aa8b5;font-size:15px;font-style:normal}
.scope-dot,.source-swatch{display:inline-block;width:8px;height:8px;border-radius:50%}
.scope-dot.mine{background:var(--cal-green)}
.scope-dot.assigned{background:var(--cal-blue)}
.scope-dot.shared{background:var(--cal-purple)}
.scope-dot.all{background:#64748b}

.calendar-source-row{
  display:grid;
  grid-template-columns:16px 10px minmax(0,1fr);
  align-items:center;
  gap:7px;
  min-width:0;
  padding:6px;
  border-radius:9px;
  cursor:pointer;
  color:var(--cal-text);
}
.calendar-source-row:hover{background:#f7fafb}
.calendar-source-row input{
  width:15px!important;height:15px!important;margin:0!important;padding:0!important;accent-color:var(--cal-green);
}
.calendar-source-row>span{min-width:0}
.calendar-source-row b{display:block;color:var(--cal-ink);font-size:10px;font-weight:850;line-height:1.5}
.calendar-source-row small{display:block;color:#8b99a7;font-size:7.7px;line-height:1.5}
.source-swatch.events{background:var(--cal-green)}
.source-swatch.installments{background:var(--cal-gold)}
.source-swatch.checks{background:var(--cal-cyan)}
.source-swatch.occasions{background:var(--cal-purple)}
.calendar-filter-note{
  margin:8px 0 0;
  padding:7px 8px;
  border-radius:9px;
  background:#f8fafb;
  color:#8291a0;
  font-size:7.6px;
  line-height:1.8;
}

.calendar-user-list.modern{display:flex;flex-direction:column;gap:3px;max-height:190px;overflow:auto}
.calendar-user-list.modern a{
  display:grid;
  grid-template-columns:28px minmax(0,1fr) auto;
  align-items:center;
  gap:7px;
  min-width:0;
  padding:6px 7px;
  border:1px solid transparent;
  border-radius:10px;
  color:var(--cal-text);
  text-decoration:none;
}
.calendar-user-list.modern a:hover{background:#f7fafb}
.calendar-user-list.modern a.active{background:#f0f7f4;border-color:#d8e9e2}
.calendar-user-avatar{
  display:grid;place-items:center;width:28px;height:28px;border-radius:9px;
  background:#eef3f6;color:#536b80;font-size:10px;font-weight:900;
}
.calendar-user-list.modern a.active .calendar-user-avatar{background:var(--cal-green);color:#fff}
.calendar-user-list.modern b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9.5px}
.calendar-user-list.modern small{font-size:7.3px;color:var(--cal-green);white-space:nowrap}

.calendar-upcoming-card{padding:0}
.calendar-card-heading{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:11px 12px;border-bottom:1px solid #edf1f4;background:#fbfcfd;
}
.calendar-card-heading span{display:block;color:var(--cal-ink);font-size:10.5px;font-weight:900}
.calendar-card-heading small{display:block;margin-top:2px;color:#8a99a8;font-size:7.5px}
.calendar-card-heading>strong{
  display:grid;place-items:center;min-width:30px;height:30px;padding:0 7px;border-radius:10px;
  background:var(--cal-green-soft);color:var(--cal-green);font-size:11px;
}
.calendar-upcoming-card .agenda-list.compact{max-height:285px;padding:7px}
.calendar-upcoming-card .agenda-item{
  border:0;border-bottom:1px solid #edf1f4;border-radius:0;margin:0;padding:8px 4px;background:transparent;
}
.calendar-upcoming-card .agenda-item:last-child{border-bottom:0}
.calendar-upcoming-card .agenda-date{background:#f5f8fa;border-radius:9px}
.calendar-upcoming-card .agenda-copy h4{font-size:9.5px;color:var(--cal-ink);line-height:1.6}
.calendar-upcoming-card .agenda-meta span{font-size:7.4px}
.agenda-empty.compact{padding:18px 8px}

.google-calendar-card.compact-status{padding:10px 11px}
.google-calendar-card.compact-status .google-calendar-head{margin:0;display:grid;grid-template-columns:34px minmax(0,1fr) 8px}
.google-calendar-card.compact-status .google-calendar-logo{width:34px;height:34px;border-radius:10px}
.google-calendar-card.compact-status .google-calendar-head strong{font-size:10px;color:var(--cal-ink)}
.google-calendar-card.compact-status .google-calendar-head small{font-size:7.6px;color:#8696a6}
.google-status-dot{width:7px;height:7px;border-radius:50%;background:#c5ced6}
.google-status-dot.connected{background:#35a16b}
.calendar-google-action{width:100%;margin-top:8px!important;justify-content:center!important;font-size:8.5px!important;padding:7px!important}
.google-calendar-simple-note{margin:8px 0 0;color:#8795a3;font-size:7.5px;line-height:1.75}

/* خوانایی خود تقویم */
.work-calendar-toolbar.professional{background:#fff;border-bottom-color:var(--cal-border)}
.work-calendar-toolbar.professional .calendar-current-month strong{font-size:17px;color:var(--cal-ink)}
.work-calendar-weekdays>div{font-size:11.5px;color:#64788c}
.calendar-day-number{font-size:13px;color:var(--cal-ink)}
.calendar-event-chip{background:#eef6f3;color:#285b49;border-right:3px solid var(--cal-green)}
.calendar-event-chip b{font-size:9.5px;font-weight:850}
.calendar-event-chip span{font-size:8px}
.calendar-event-chip.priority-high{background:#fff8ea;color:#815b18;border-right-color:var(--cal-gold)}
.calendar-event-chip.priority-urgent{background:#fff1f2;color:#9f3941;border-right-color:var(--cal-red)}
.calendar-event-chip.priority-low{background:#f5f7f9;color:#66798b;border-right-color:#9aa7b3}
.calendar-system-event.installment,.timeline-system.installment,.calendar-agenda-system.installment{background:#fff8e7;color:#7d5a1a}
.calendar-system-event.check,.timeline-system.check,.calendar-agenda-system.check{background:#eff8fa;color:#376c77}
.calendar-official-event,.timeline-official,.calendar-agenda-official{background:#f7f4fb;color:#674f86;border-color:#e7dff0}
.calendar-hijri-date{background:#f6f3fa;color:#715b8f}
.calendar-day-cell.is-holiday:not(.is-today){background:linear-gradient(180deg,#fff8f8 0,#fff 72%);box-shadow:inset 0 3px #e6a8ad}
.calendar-day-cell.is-today{background:linear-gradient(180deg,#f0f8f5 0,#fff 68%);box-shadow:inset 0 0 0 2px #81b6a2}

/* source filter state */
[data-calendar-source][hidden]{display:none!important}

.calendar-filter-backdrop{display:none}

/* دسکتاپ متوسط: سایدبار در بالا به دو ستون تبدیل نشود؛ کنترل‌ها خواناتر می‌مانند */
@media(max-width:1100px) and (min-width:761px){
  .work-calendar-layout.professional{grid-template-columns:1fr}
  .work-calendar-sidebar{
    position:static!important;
    display:grid!important;
    grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)!important;
    align-items:start;
  }
  .calendar-control-card{grid-row:span 2}
}

/* موبایل: فیلترها به پنل کشویی تبدیل می‌شوند و تقویم اول دیده می‌شود */
@media(max-width:760px){
  .work-calendar-page.section{padding-inline:5px!important}
  .work-calendar-hero.compact{padding:12px 13px}
  .work-calendar-hero.compact h2{font-size:18px}
  .work-calendar-hero.compact p{font-size:9.5px}
  .calendar-commandbar{align-items:stretch;gap:6px;padding:6px}
  .calendar-view-switch{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .calendar-view-btn{font-size:9px;padding:5px 3px}
  .calendar-active-scope{flex:1;min-height:34px;font-size:8.5px}
  .calendar-active-scope strong{font-size:9px}
  .calendar-mobile-filter-btn{
    display:inline-flex;align-items:center;justify-content:center;gap:5px;
    min-height:34px;padding:5px 9px;border:1px solid #dfe7ec;border-radius:10px;
    background:#fff;color:var(--cal-ink);font-size:9px;font-weight:900;
  }
  .work-calendar-layout.professional{display:block}
  .work-calendar-sidebar{
    position:fixed!important;
    z-index:12050!important;
    top:0!important;right:0!important;
    width:min(340px,88vw)!important;
    height:100dvh!important;
    max-height:100dvh!important;
    padding:10px!important;
    background:#f6f8fa!important;
    overflow-y:auto!important;
    transform:translateX(105%);
    transition:transform .2s ease;
    box-shadow:-18px 0 45px rgba(15,23,42,.18);
  }
  .work-calendar-sidebar.is-mobile-open{transform:translateX(0)}
  .calendar-filter-close{display:grid;place-items:center}
  .calendar-filter-backdrop{
    position:fixed;z-index:12040;inset:0;width:100%;height:100%;padding:0;border:0;
    background:rgba(15,23,42,.28);backdrop-filter:blur(1px);
  }
  .calendar-filter-backdrop:not([hidden]){display:block}
  body.calendar-filter-open{overflow:hidden}
  .calendar-sidebar-card{margin:0 0 8px!important}
  .calendar-control-card{padding:12px}
  .calendar-sidebar-heading h3{font-size:13px}
  .calendar-scope-row b,.calendar-source-row b{font-size:10px}
  .calendar-scope-row small,.calendar-source-row small{font-size:7.7px}
  .calendar-upcoming-card .agenda-list.compact{max-height:none}
  .calendar-legend{font-size:7.5px}
  .work-calendar-weekdays>div{font-size:8.5px}
  .calendar-day-number{font-size:10.5px}
  .calendar-event-chip b{font-size:7.4px}
  .calendar-event-chip span{font-size:6.7px}
}
@media(max-width:430px){
  .calendar-view-switch{grid-template-columns:repeat(3,minmax(0,1fr))}
  .calendar-active-scope{max-width:calc(100% - 104px)}
  .calendar-mobile-filter-btn{flex:0 0 auto}
}

.calendar-day-content>[data-calendar-source].is-calendar-overflow{display:none!important}
@media(max-width:480px){
  .calendar-event-chip[data-calendar-source="events"]:not(.is-calendar-overflow):not([hidden]){display:flex!important}
  .calendar-system-event[data-calendar-source]:not(.is-calendar-overflow):not([hidden]){display:block!important}
  .calendar-official-event[data-calendar-source="occasions"]:not(.is-calendar-overflow):not([hidden]){display:-webkit-box!important}
}

/* Work calendar — tokenized ICS subscription (Google Calendar / phone calendars) */
.calendar-ics-card{padding:12px;overflow:hidden}
.calendar-ics-head{display:grid;grid-template-columns:36px minmax(0,1fr) 9px;align-items:center;gap:9px}
.calendar-ics-logo{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:linear-gradient(135deg,#4285f4,#34a853);color:#fff;font:900 16px/1 Arial,sans-serif}
.calendar-ics-head>div{min-width:0}
.calendar-ics-head strong,.calendar-ics-head small{display:block}
.calendar-ics-head strong{color:var(--cal-ink);font-size:10.5px;line-height:1.5}
.calendar-ics-head small{margin-top:1px;color:#8493a2;font-size:7.8px;line-height:1.5}
.calendar-ics-status{width:8px;height:8px;border-radius:50%;background:#34a853;box-shadow:0 0 0 3px rgba(52,168,83,.10)}
.calendar-ics-intro{margin:9px 0 8px;color:#718191;font-size:8px;line-height:1.8}
.calendar-ics-url-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:stretch;direction:ltr}
.calendar-ics-url-row input{min-width:0;width:100%;height:34px;border:1px solid #dfe6eb;border-radius:9px;background:#f8fafb;color:#64748b;padding:0 8px;font-family:Consolas,monospace;font-size:7.5px;direction:ltr;text-align:left;outline:none}
.calendar-ics-url-row input:focus{border-color:#9bc9b4;background:#fff}
.calendar-ics-url-row .btn{min-width:70px;margin:0!important;padding:7px 9px!important;font-size:8px!important;white-space:nowrap;justify-content:center}
.calendar-ics-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:7px}
.calendar-ics-actions form{margin:0}
.calendar-ics-actions .btn{width:100%;min-height:31px;margin:0!important;padding:7px!important;font-size:8px!important;justify-content:center}
.calendar-ics-warning{margin:8px 0 0;padding:7px 8px;border:1px solid #f0dfb4;border-radius:9px;background:#fffaf0;color:#8a6b27;font-size:7.5px;line-height:1.75}
.calendar-ics-help{margin-top:8px;border-top:1px solid #edf1f3;padding-top:7px;color:#728292;font-size:7.7px;line-height:1.75}
.calendar-ics-help summary{cursor:pointer;color:var(--cal-ink);font-weight:850;font-size:8px;list-style:none}
.calendar-ics-help summary::-webkit-details-marker{display:none}
.calendar-ics-help summary::before{content:'؟';display:inline-grid;place-items:center;width:16px;height:16px;margin-inline-end:5px;border-radius:50%;background:#eef6f2;color:var(--cal-green);font-weight:900}
.calendar-ics-help ol{margin:7px 0 4px;padding-inline-start:18px}
.calendar-ics-help p{margin:5px 0 0;color:#8795a3}
@media (max-width:760px){
  .calendar-ics-card{padding:12px}
  .calendar-ics-head strong{font-size:11px}
  .calendar-ics-head small,.calendar-ics-intro,.calendar-ics-help{font-size:8.5px}
  .calendar-ics-url-row{grid-template-columns:1fr;direction:rtl}
  .calendar-ics-url-row input{height:38px;font-size:8px;direction:ltr}
  .calendar-ics-url-row .btn{width:100%;min-height:36px}
  .calendar-ics-actions{grid-template-columns:1fr 1fr}
  .calendar-ics-actions .btn{min-height:36px;font-size:8.5px!important}
  .calendar-ics-warning{font-size:8px}
}
@media (max-width:420px){.calendar-ics-actions{grid-template-columns:1fr}}


/* Work calendar — focused navigation & clearer day selection */
.work-calendar-toolbar.professional .calendar-current-month{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
}
.work-calendar-toolbar.professional .calendar-today-button{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:28px;
  margin-top:0!important;
  padding:4px 11px!important;
  border:1px solid #cfe5dc;
  border-radius:999px;
  background:#f2faf7!important;
  color:#176a4d!important;
  font-size:10px;
  font-weight:850;
  text-decoration:none;
  transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.work-calendar-toolbar.professional .calendar-today-button:hover{
  background:#e7f6f0!important;
  border-color:#9dceb9;
  transform:translateY(-1px);
}
.calendar-today-button>span{font-size:7px;color:#149066}

/* امروز همیشه نشان ثابت سبز دارد؛ انتخاب کاربر حلقه آبی مستقل می‌گیرد. */
.calendar-day-cell.is-today{
  position:relative;
  background:linear-gradient(180deg,#eef9f5 0,#fff 70%)!important;
  box-shadow:inset 0 0 0 2px #26956e!important;
}
.calendar-day-cell.is-today .calendar-day-number{
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:3px 7px;
  border-radius:999px;
  background:#187a59;
  color:#fff!important;
  font-weight:900;
}
.calendar-day-cell.is-today .calendar-day-number small{color:rgba(255,255,255,.88)}
.calendar-day-cell.is-selected-day{
  outline:3px solid #3974d6;
  outline-offset:-4px;
  z-index:2;
}
.calendar-day-cell.is-today.is-selected-day{
  outline-color:#3974d6;
  box-shadow:inset 0 0 0 2px #26956e!important;
}

.calendar-timeline-head[data-calendar-select-date],
.calendar-agenda-day[data-calendar-select-date],
.calendar-mini-days a[data-calendar-select-date]{
  cursor:pointer;
}
.calendar-timeline-head.is-today{
  box-shadow:inset 0 0 0 2px #26956e;
}
.calendar-timeline-head.is-selected-day{
  outline:2px solid #3974d6;
  outline-offset:-3px;
}
.calendar-agenda-day.is-today{
  box-shadow:inset 4px 0 0 #26956e;
}
.calendar-agenda-day.is-selected-day{
  outline:2px solid #3974d6;
  outline-offset:-3px;
}
.calendar-mini-days a.is-today{
  box-shadow:inset 0 0 0 2px #26956e!important;
  font-weight:900;
}
.calendar-mini-days a.is-selected-day{
  outline:2px solid #3974d6;
  outline-offset:1px;
}

/* مناسبت‌ها باید خوانا باشند، ولی همچنان از رویداد کاری کم‌اهمیت‌تر بمانند. */
.calendar-official-event{
  font-size:10px!important;
  line-height:1.55!important;
  font-weight:700;
  padding:4px 6px!important;
}
.timeline-official{
  font-size:10px!important;
  line-height:1.55!important;
  font-weight:700;
  padding:5px 7px!important;
}
.calendar-agenda-official{
  font-size:11px!important;
  line-height:1.65!important;
  font-weight:700;
  padding:8px 10px!important;
}
.calendar-preview-group .preview-occasion{
  font-size:10px;
  line-height:1.6;
}

@media(max-width:760px){
  .work-calendar-toolbar.professional .calendar-today-button{
    min-height:26px;
    padding:3px 9px!important;
    font-size:9px;
  }
  .calendar-official-event{
    font-size:8.6px!important;
    line-height:1.5!important;
    padding:3px 4px!important;
  }
  .timeline-official{
    font-size:9px!important;
  }
  .calendar-agenda-official{
    font-size:10px!important;
  }
  .calendar-day-cell.is-selected-day{outline-width:2px;outline-offset:-3px}
}

/* AutoSadra 815 — منوی عملیات روز و حذف کلیدهای + داخل تقویم */
[data-calendar-select-date]{touch-action:manipulation}
.calendar-day-actions-dialog{width:min(520px,100%)}
.calendar-day-actions-modal .calendar-modal-head small{display:block;margin-top:5px;color:#64748b;font-size:11px;font-weight:700}
.calendar-day-actions-list{display:grid;gap:9px;padding:14px 16px 17px}
.calendar-day-action{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;width:100%;min-width:0;margin:0;padding:12px 13px;border:1px solid #e1e8ef;border-radius:14px;background:#fff;color:#24384d;text-decoration:none;text-align:right;font:inherit;cursor:pointer;box-sizing:border-box;transition:background .15s ease,border-color .15s ease,transform .15s ease}
.calendar-day-action:hover{background:#f7fafc;border-color:#c8d6e2;transform:translateY(-1px)}
.calendar-day-action .action-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#eef6f2;color:#0f6b4f;font-size:18px;font-weight:900}
.calendar-day-action span:nth-child(2){min-width:0}
.calendar-day-action b{display:block;font-size:13px;color:#1d3348}
.calendar-day-action small{display:block;margin-top:3px;color:#718196;font-size:10px;line-height:1.65}
.calendar-day-action em{font-style:normal;color:#8ca0b3;font-size:20px}
.calendar-day-action.primary-action{border-color:#b9d8cc;background:#f5fbf8}
.calendar-day-action.primary-action .action-icon{background:#0f766e;color:#fff}
.calendar-day-action.muted-action .action-icon{background:#f1f5f9;color:#64748b}
.calendar-day-action.muted-action{color:#64748b}
.calendar-day-add{display:none!important}
@media(max-width:700px){
  .calendar-day-actions-modal{align-items:end;padding:0}
  .calendar-day-actions-dialog{width:100%;max-height:82vh;border-radius:22px 22px 0 0}
  .calendar-day-actions-list{padding:12px 12px max(14px,env(safe-area-inset-bottom))}
  .calendar-day-action{grid-template-columns:40px minmax(0,1fr) auto;padding:11px;border-radius:13px}
  .calendar-day-action b{font-size:12px}.calendar-day-action small{font-size:9.5px}
}

/* AutoSadra 816 — بازطراحی واقعی تقویم در موبایل + Long Press */
@media (max-width:760px){
  .work-calendar-page.section{
    padding-inline:2px!important;
    margin-inline:0!important;
  }
  .work-calendar-hero.compact{
    margin:0 2px 8px!important;
    padding:10px 11px!important;
    border-radius:15px!important;
  }
  .work-calendar-hero.compact h2{font-size:19px!important;line-height:1.5}
  .work-calendar-hero.compact p{display:none!important}
  .work-calendar-eyebrow{font-size:9.5px!important}
  .work-calendar-hero-actions{width:100%;gap:6px!important}
  .work-calendar-hero-actions .btn{min-height:38px!important;padding:7px 9px!important;font-size:10.5px!important;border-radius:11px!important}

  /* نوار نماها در یک ردیف؛ فضای عمودی موبایل هدر نمی‌رود. */
  .calendar-commandbar{
    margin:0 2px 7px!important;
    padding:6px!important;
    gap:6px!important;
    border-radius:14px!important;
  }
  .calendar-view-switch{
    order:1;
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:3px!important;
    overflow:visible!important;
  }
  .calendar-view-btn{
    min-width:0!important;
    min-height:34px!important;
    padding:5px 2px!important;
    border-radius:9px!important;
    font-size:10px!important;
    white-space:nowrap;
  }
  .calendar-mobile-filter-btn{
    order:2;
    flex:0 0 auto!important;
    min-width:82px;
    min-height:35px!important;
    padding:6px 9px!important;
    border-radius:10px!important;
    font-size:10px!important;
  }
  .calendar-active-scope{
    order:2;
    flex:1 1 0!important;
    min-width:0!important;
    max-width:none!important;
    min-height:35px!important;
    padding:6px 9px!important;
    font-size:9px!important;
    border-radius:10px!important;
  }
  .calendar-active-scope strong{font-size:10px!important}
  .calendar-legend{
    margin:0 2px 7px!important;
    padding:6px 8px!important;
    gap:8px!important;
    font-size:8.8px!important;
    overflow-x:auto;
    white-space:nowrap;
    scrollbar-width:none;
  }
  .calendar-legend::-webkit-scrollbar{display:none}
  .calendar-legend small{display:none!important}

  .work-calendar-main-card{
    margin:0!important;
    border-radius:15px!important;
    overflow:hidden!important;
    box-shadow:0 8px 24px rgba(20,46,68,.06)!important;
  }
  .work-calendar-toolbar.professional{
    min-height:64px!important;
    padding:9px 8px!important;
    gap:9px!important;
  }
  .work-calendar-toolbar.professional .calendar-nav-btn{
    width:38px!important;height:38px!important;
    border-radius:12px!important;
    font-size:24px!important;
  }
  .work-calendar-toolbar.professional .calendar-current-month{min-width:0!important;flex:1}
  .work-calendar-toolbar.professional .calendar-current-month strong{font-size:19px!important;line-height:1.4}
  .work-calendar-toolbar.professional .calendar-today-button{font-size:10px!important;min-height:29px!important;padding:4px 10px!important}

  .work-calendar-weekdays{
    border-bottom:1px solid #e3e9ed!important;
    background:#f7faf9!important;
  }
  .work-calendar-weekdays>div{
    padding:9px 0!important;
    font-size:10.5px!important;
    font-weight:900!important;
  }

  /* خود سلول، کارت روز است؛ header عمومی سیستم نباید داخل هر روز کارت جدا بسازد. */
  .work-calendar-grid{
    gap:1px!important;
    background:#e7ecef!important;
  }
  .calendar-day-cell,
  .calendar-day-cell.is-empty,
  .work-calendar-grid.rolling-30 .calendar-day-cell{
    min-width:0!important;
    min-height:132px!important;
    padding:6px 5px!important;
    border:0!important;
    border-radius:0!important;
    margin:0!important;
    overflow:hidden!important;
  }
  .calendar-day-cell header{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    min-width:0!important;
    min-height:30px!important;
    height:auto!important;
    margin:0!important;
    padding:0!important;
    gap:3px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  .calendar-day-number{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:29px!important;
    min-height:29px!important;
    padding:0 3px!important;
    border:0!important;
    border-radius:9px!important;
    background:transparent!important;
    color:#1d3348!important;
    font-size:14px!important;
    line-height:1!important;
    font-weight:950!important;
  }
  .calendar-day-cell.is-holiday .calendar-day-number{color:#b4232d!important}
  .calendar-day-cell.is-today .calendar-day-number{
    min-width:31px!important;
    min-height:31px!important;
    padding:0 5px!important;
    border-radius:10px!important;
    background:#187a59!important;
    color:#fff!important;
  }
  .calendar-today-label,.calendar-holiday-label{display:none!important}
  .calendar-day-content{
    gap:4px!important;
    margin-top:5px!important;
  }
  .calendar-event-chip,
  .calendar-system-event,
  .calendar-official-event{
    min-height:28px!important;
    padding:5px 5px!important;
    border-radius:7px!important;
    line-height:1.35!important;
  }
  .calendar-event-chip{gap:3px!important}
  .calendar-event-chip b{
    font-size:9.5px!important;
    font-weight:900!important;
    line-height:1.35!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .calendar-event-chip span{display:none!important}
  .calendar-system-event{
    font-size:9.5px!important;
    font-weight:900!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .calendar-system-event small{display:none!important}
  .calendar-official-event{
    font-size:9px!important;
    font-weight:800!important;
    -webkit-line-clamp:1!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }
  .calendar-official-event>span{display:none!important}
  .calendar-more-events{
    display:block!important;
    margin-top:1px!important;
    padding:2px 3px!important;
    color:#64788c!important;
    font-size:8.5px!important;
    font-weight:850!important;
  }
  .calendar-more-events[hidden]{display:none!important}

  /* امروز و روز انتخاب‌شده واضح، بدون قاب سنگین داخل سلول. */
  .calendar-day-cell.is-today{
    background:linear-gradient(180deg,#edf9f4 0,#fff 60%)!important;
    box-shadow:inset 0 3px #26956e!important;
  }
  .calendar-day-cell.is-holiday:not(.is-today){box-shadow:inset 0 3px #e6a8ad!important}
  .calendar-day-cell.is-selected-day{
    outline:2px solid #3974d6!important;
    outline-offset:-2px!important;
    z-index:2!important;
  }
  .calendar-day-cell.is-long-press-ready,
  [data-calendar-select-date].is-long-press-ready{
    background:#eaf3ff!important;
    box-shadow:inset 0 0 0 2px #3974d6!important;
    transition:background .08s ease,box-shadow .08s ease!important;
  }
  [data-calendar-select-date]{
    touch-action:pan-y pinch-zoom!important;
    -webkit-touch-callout:none!important;
    -webkit-user-select:none!important;
    user-select:none!important;
    -webkit-tap-highlight-color:transparent;
  }
  [data-calendar-select-date] .calendar-day-number,
  [data-calendar-select-date] .calendar-today-label,
  [data-calendar-select-date] .calendar-holiday-label,
  [data-calendar-select-date] .calendar-day-content,
  [data-calendar-select-date] .calendar-more-events{
    -webkit-user-select:none!important;
    user-select:none!important;
    -webkit-touch-callout:none!important;
  }

  /* مسیر جایگزین Long Press: فقط روی روز انتخاب‌شده یک دکمه سه‌نقطه ظریف نشان بده. */
  .calendar-day-cell{position:relative!important}
  .calendar-day-menu-btn{
    display:none!important;
    position:absolute!important;
    inset-inline-start:5px!important;
    bottom:5px!important;
    width:28px!important;
    min-width:28px!important;
    height:24px!important;
    min-height:24px!important;
    padding:0!important;
    border:1px solid #c8d7e4!important;
    border-radius:9px!important;
    background:rgba(255,255,255,.94)!important;
    color:#31556f!important;
    font-size:15px!important;
    line-height:1!important;
    align-items:center!important;
    justify-content:center!important;
    box-shadow:0 2px 8px rgba(21,55,79,.08)!important;
    z-index:6!important;
  }
  .calendar-day-cell.is-selected-day .calendar-day-menu-btn{display:flex!important}
  .calendar-day-cell.is-selected-day .calendar-day-content{padding-bottom:30px!important}
  .calendar-day-menu-btn:active{transform:scale(.94)}

  /* موبایل: پنل فیلتر و متن‌های آن واقعاً خوانا باشند. */
  .calendar-control-card{padding:14px!important}
  .calendar-sidebar-heading h3{font-size:15px!important}
  .calendar-scope-row,.calendar-source-row{min-height:48px!important;padding:8px 6px!important}
  .calendar-scope-row b,.calendar-source-row b{font-size:12px!important}
  .calendar-scope-row small,.calendar-source-row small{font-size:9.5px!important;line-height:1.6!important}

  .calendar-day-actions-dialog{border-radius:24px 24px 0 0!important}
  .calendar-day-action b{font-size:13px!important}
  .calendar-day-action small{font-size:10.5px!important}
}

@media (max-width:430px){
  .calendar-view-btn{font-size:9.3px!important;padding-inline:1px!important}
  .calendar-day-cell,
  .calendar-day-cell.is-empty,
  .work-calendar-grid.rolling-30 .calendar-day-cell{min-height:126px!important;padding-inline:4px!important}
  .calendar-day-number{font-size:13.5px!important;min-width:28px!important;min-height:28px!important}
  .calendar-event-chip,.calendar-system-event,.calendar-official-event{min-height:27px!important;padding:5px 4px!important}
  .calendar-event-chip b,.calendar-system-event{font-size:9px!important}
  .calendar-official-event{font-size:8.7px!important}
}


/* === Site announcements help panel clarity refresh (818) === */
.site-announcements-page .announcement-help-card{
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  position:sticky!important;
  top:62px!important;
  align-self:start!important;
  padding:17px!important;
  color:#24384d!important;
  background:linear-gradient(180deg,#f8fcfb 0%,#f4f8fb 100%)!important;
  border:1px solid #dbe7e3!important;
  border-radius:18px!important;
  box-shadow:0 10px 28px rgba(31,58,95,.055)!important;
}
.site-announcements-page .announcement-help-top{
  display:flex!important;
  align-items:flex-start!important;
  gap:11px!important;
}
.site-announcements-page .announcement-help-icon{
  width:42px!important;
  height:42px!important;
  flex:0 0 42px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:13px!important;
  background:#e8f5f0!important;
  color:#0f6b4b!important;
  font-size:19px!important;
  box-shadow:inset 0 0 0 1px rgba(15,107,75,.07)!important;
}
.site-announcements-page .announcement-help-card h3{
  margin:1px 0 5px!important;
  color:#20374b!important;
  font-size:14px!important;
  font-weight:900!important;
  line-height:1.6!important;
}
.site-announcements-page .announcement-help-card p{
  margin:0!important;
  color:#56697c!important;
  font-size:11px!important;
  font-weight:500!important;
  line-height:1.95!important;
}
.site-announcements-page .announcement-help-points{
  display:grid!important;
  gap:7px!important;
  margin-top:14px!important;
  padding-top:13px!important;
  border-top:1px solid #dfe9e6!important;
}
.site-announcements-page .announcement-help-points span{
  display:flex!important;
  align-items:center!important;
  min-height:34px!important;
  padding:7px 9px!important;
  border:1px solid #e4ecea!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.76)!important;
  color:#40576a!important;
  font-size:10px!important;
  font-weight:650!important;
  line-height:1.7!important;
}
.site-announcements-page .announcement-tone-guide{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:7px!important;
  margin-top:13px!important;
  padding-top:12px!important;
  border-top:1px solid #dfe9e6!important;
  color:#506579!important;
  font-size:9.5px!important;
  font-weight:650!important;
  line-height:1.7!important;
}
.site-announcements-page .announcement-tone-guide .tone-dot{
  width:8px!important;
  height:8px!important;
  box-shadow:0 0 0 2px rgba(255,255,255,.9)!important;
}
@media(max-width:1000px){
  .site-announcements-page .announcement-help-card{
    position:static!important;
    top:auto!important;
    background:#f8fbfa!important;
  }
  .site-announcements-page .announcement-help-points{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media(max-width:760px){
  .site-announcements-page .announcement-help-card{padding:13px!important}
  .site-announcements-page .announcement-help-card h3{font-size:14px!important}
  .site-announcements-page .announcement-help-card p{font-size:10.5px!important}
  .site-announcements-page .announcement-help-points{grid-template-columns:1fr!important}
  .site-announcements-page .announcement-help-points span{font-size:10px!important}
  .site-announcements-page .announcement-tone-guide{font-size:9.5px!important}
}

/* ===== Work calendar alarm-style reminder snooze - build 819 ===== */
.calendar-reminder-alert[data-system-flash]{
  max-height:none!important;
  padding:15px 15px 14px!important;
  border:1px solid rgba(37,99,235,.18)!important;
  overflow:visible!important;
}
.calendar-reminder-alert .system-flash-close{
  inset-inline-start:10px;
  inset-block-start:10px;
}
.calendar-reminder-alert-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding-inline-start:34px;
}
.calendar-reminder-bell{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:rgba(255,255,255,.72);
  font-size:21px;
  flex:0 0 auto;
}
.calendar-reminder-alert-head>div{min-width:0;display:grid;gap:2px}
.calendar-reminder-alert-head small{font-size:10px;font-weight:800;opacity:.72}
.calendar-reminder-alert-head strong{font-size:14px;line-height:1.65;overflow-wrap:anywhere}
.calendar-reminder-alert-time{
  margin-top:8px;
  padding:7px 9px;
  border-radius:10px;
  background:rgba(255,255,255,.55);
  font-size:11px;
  font-weight:800;
  direction:ltr;
  text-align:right;
}
.calendar-reminder-alert-description{
  margin-top:7px;
  font-size:11px;
  line-height:1.75;
  opacity:.88;
  max-height:62px;
  overflow:auto;
}
.calendar-reminder-snooze-title{margin-top:11px;font-size:10px;font-weight:900;opacity:.72}
.calendar-reminder-snooze-actions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  margin-top:6px;
}
.calendar-reminder-snooze-actions button{
  min-height:34px;
  border:1px solid rgba(37,99,235,.20);
  border-radius:10px;
  background:rgba(255,255,255,.78);
  color:inherit;
  font:inherit;
  font-size:10.5px;
  font-weight:850;
  cursor:pointer;
  padding:6px 7px;
}
.calendar-reminder-snooze-actions button:hover{background:#fff}
.calendar-reminder-snooze-actions button.custom{grid-column:1/-1}
.calendar-reminder-snooze-actions button:disabled{opacity:.55;cursor:wait}
.calendar-reminder-alert.is-busy{opacity:.78}
.calendar-reminder-open{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:31px;
  margin-top:8px;
  border-radius:9px;
  text-decoration:none;
  font-size:10.5px;
  font-weight:850;
  color:inherit;
  background:rgba(255,255,255,.48);
}
.calendar-reminder-readonly{margin-top:9px;font-size:10px;opacity:.72}
.calendar-snooze-modal[hidden]{display:none!important}
.calendar-snooze-modal{
  position:fixed;
  inset:0;
  z-index:11050;
  display:grid;
  place-items:center;
  padding:16px;
}
.calendar-snooze-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.42);backdrop-filter:blur(3px)}
.calendar-snooze-dialog{
  position:relative;
  width:min(430px,100%);
  border-radius:18px;
  background:#fff;
  border:1px solid #dbe5ef;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
  padding:16px;
  direction:rtl;
}
.calendar-snooze-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.calendar-snooze-head small{display:block;color:#64748b;font-size:10px;font-weight:800}
.calendar-snooze-head h3{margin:2px 0 0;font-size:17px;color:#0f172a}
.calendar-snooze-head>button{width:34px;height:34px;border:0;border-radius:10px;background:#f1f5f9;color:#334155;font-size:21px;cursor:pointer}
.calendar-snooze-event{margin-top:13px;padding:10px 12px;border-radius:12px;background:#eff6ff;color:#1e3a8a;font-size:12px;font-weight:850}
.calendar-snooze-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:13px}
.calendar-snooze-fields label{display:grid;gap:5px;color:#475569;font-size:10px;font-weight:800}
.calendar-snooze-fields input{width:100%;min-height:40px;border:1px solid #cbd5e1;border-radius:11px;background:#fff;padding:8px 10px;font:inherit;font-size:12px;color:#0f172a;outline:none}
.calendar-snooze-fields input:focus{border-color:#60a5fa;box-shadow:0 0 0 3px rgba(96,165,250,.16)}
.calendar-snooze-hint{min-height:19px;margin-top:8px;color:#64748b;font-size:9.5px;line-height:1.7}
.calendar-snooze-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
body.calendar-snooze-open{overflow:hidden}
@media(max-width:520px){
  .system-flash-stack.messages{width:calc(100vw - 20px);inset-inline:10px}
  .calendar-reminder-alert[data-system-flash]{padding:13px!important}
  .calendar-reminder-snooze-actions{grid-template-columns:1fr 1fr}
  .calendar-reminder-snooze-actions button.custom{grid-column:1/-1}
  .calendar-snooze-modal{align-items:end;padding:10px}
  .calendar-snooze-dialog{border-radius:18px 18px 14px 14px;padding:14px}
  .calendar-snooze-fields{grid-template-columns:1fr}
  .calendar-snooze-actions .btn{flex:1}
}

/* AutoSadra 820: recurring work-calendar events + actionable notification inbox */
.calendar-form-grid label small{display:block;margin-top:5px;color:#64748b;font-size:10px;font-weight:650;line-height:1.6}
.calendar-recurrence-note{
  display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap;padding:10px 12px;border:1px solid #bfdbfe;
  border-radius:13px;background:#eff6ff;color:#1e3a8a;font-size:11px;line-height:1.7
}
.calendar-recurrence-note[hidden]{display:none!important}
.calendar-recurrence-note b{font-weight:900}.calendar-recurrence-note span{color:#475569;font-weight:650}
.calendar-inbox-description{
  margin-top:10px;padding:11px 12px;border:1px solid #dbeafe;border-radius:14px;background:#f8fbff;
  color:#334155;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85;font-size:13px
}
.calendar-inbox-event-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:11px
}
.calendar-inbox-event-grid>div{
  display:grid;gap:3px;min-width:0;padding:9px 11px;border:1px solid #e2e8f0;border-radius:12px;background:#fff
}
.calendar-inbox-event-grid>div.span-2{grid-column:1/-1}
.calendar-inbox-event-grid small{color:#64748b;font-size:10px;font-weight:800}
.calendar-inbox-event-grid b{color:#0f172a;font-size:12px;line-height:1.65;overflow-wrap:anywhere}
.calendar-inbox-snooze-title{margin-top:13px;color:#475569;font-size:11px;font-weight:900}
.calendar-inbox-snooze-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:7px}
.calendar-inbox-snooze-actions .btn{width:100%;min-height:38px;padding:7px 9px;font-size:11px;justify-content:center}
.notification-card[data-calendar-inbox-reminder].is-busy{opacity:.7;pointer-events:none}
.notification-card[data-calendar-inbox-reminder].is-dismissing{opacity:0;transform:translateY(-6px);transition:opacity .25s ease,transform .25s ease}
@media(max-width:720px){
  .calendar-inbox-event-grid{grid-template-columns:1fr}
  .calendar-inbox-event-grid>div.span-2{grid-column:auto}
  .calendar-inbox-snooze-actions{grid-template-columns:1fr 1fr}
  .calendar-inbox-snooze-actions .btn{width:100%!important}
  .calendar-recurrence-note{display:grid;gap:2px}
}

/* AutoSadra 821: compact/collapsible calendar reminder cards in notification inbox */
.notification-card-title-main{min-width:0;flex:1;display:grid;gap:5px}
.notification-card-title-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.calendar-inbox-compact-summary{display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:#64748b;font-size:11px;font-weight:750;line-height:1.55}
.calendar-inbox-compact-summary span{display:inline-flex;align-items:center;min-height:25px;padding:3px 8px;border:1px solid #e2e8f0;border-radius:999px;background:#f8fafc}
.notification-card-toggle{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:66px;height:34px;padding:0 10px;border:1px solid #cbd5e1;border-radius:11px;background:#fff;color:#334155;font:inherit;font-size:11px;font-weight:850;cursor:pointer;transition:background .18s ease,border-color .18s ease,transform .18s ease}
.notification-card-toggle:hover{background:#f8fafc;border-color:#94a3b8}
.notification-card-toggle:active{transform:translateY(1px)}
.notification-card-toggle-icon{display:inline-flex;align-items:center;justify-content:center;font-size:17px;line-height:1;transition:transform .2s ease}
.calendar-inbox-collapsible:not(.is-collapsed) .notification-card-toggle-icon{transform:rotate(180deg)}
.calendar-inbox-card-details{margin-top:4px}
.calendar-inbox-collapsible.is-collapsed .calendar-inbox-card-details{display:none}
.calendar-inbox-collapsible.is-collapsed{padding-top:13px;padding-bottom:13px}
.calendar-inbox-collapsible.is-collapsed .notification-card-icon{align-self:center}
/* اعلان رویداد در حالت بسته فقط عنوان و دکمه جزئیات را نشان می‌دهد. */
.calendar-inbox-collapsible.is-collapsed .notification-card-title-row{min-height:36px;flex-wrap:nowrap}
.calendar-inbox-collapsible.is-collapsed .notification-card-title-main{min-width:0;flex:1}
.calendar-inbox-collapsible.is-collapsed .notification-card-title-main h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.calendar-inbox-card-details{padding-top:14px;margin-top:14px;border-top:1px solid #e2e8f0}
.system-notification-item.calendar-reminder-title-only{justify-content:flex-start}
@media(max-width:720px){
  .notification-card-title-row{align-items:flex-start}
  .notification-card-title-actions{width:auto;margin-inline-start:auto}
  .notification-card-toggle{min-width:54px;height:32px;padding:0 8px}
  .calendar-inbox-compact-summary{gap:5px;font-size:10px}
  .calendar-inbox-compact-summary span{min-height:23px;padding:2px 7px}
}

/* AutoSadra 822: modern work-calendar event editor + all-day events */
#calendarEventModal .calendar-modal-dialog{
  width:min(860px,calc(100vw - 28px));
  max-height:94vh;
  border:1px solid #dbe5ef;
  border-radius:24px;
  overflow:auto;
  background:#f8fafc;
  box-shadow:0 30px 90px rgba(15,23,42,.30);
  scrollbar-width:thin;
  scrollbar-color:#94a3b8 transparent;
}
#calendarEventModal .calendar-modal-head{
  position:sticky;
  top:0;
  z-index:8;
  padding:16px 20px;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(10px);
}
#calendarEventModal .calendar-modal-head h3{font-size:19px;color:#0f172a}
#calendarEventModal .calendar-modal-head>button{transition:background .18s ease,transform .18s ease}
#calendarEventModal .calendar-modal-head>button:hover{background:#e2e8f0;transform:rotate(4deg)}
.calendar-event-form-modern{padding:14px!important;display:grid;gap:12px}
.calendar-form-section{
  padding:14px;
  border:1px solid #e2e8f0;
  border-radius:17px;
  background:#fff;
  box-shadow:0 5px 18px rgba(15,23,42,.035);
}
.calendar-form-section-primary{border-color:#cfe7e4;background:linear-gradient(180deg,#fff 0%,#fbfefe 100%)}
.calendar-form-section-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.calendar-form-section-head>div:last-child{display:grid;gap:2px;min-width:0}
.calendar-form-section-head b{font-size:12px;font-weight:950;color:#0f172a}
.calendar-form-section-head small{font-size:9.5px;font-weight:700;color:#64748b;line-height:1.55}
.calendar-form-section-icon{
  display:grid!important;
  place-items:center;
  flex:0 0 34px;
  width:34px;height:34px;
  border-radius:11px;
  background:#ecfdf5;
  color:#0f766e;
  font-size:17px;
  font-weight:900;
}
.calendar-event-form-modern .calendar-form-grid{gap:10px 12px}
.calendar-event-form-modern .calendar-form-grid>label,
.calendar-event-form-modern .calendar-description-field{
  display:grid;
  gap:5px;
  margin:0;
  color:#334155;
  font-size:11px;
  font-weight:900;
}
.calendar-event-form-modern .calendar-form-grid input,
.calendar-event-form-modern .calendar-form-grid select,
.calendar-event-form-modern .calendar-form-grid textarea,
.calendar-event-form-modern .calendar-description-field textarea{
  min-height:44px;
  margin-top:0!important;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#fff;
  padding:9px 11px;
  color:#0f172a;
  font:inherit;
  font-size:12px;
  font-weight:750;
  outline:none;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.calendar-event-form-modern .calendar-form-grid input:focus,
.calendar-event-form-modern .calendar-form-grid select:focus,
.calendar-event-form-modern .calendar-form-grid textarea:focus,
.calendar-event-form-modern .calendar-description-field textarea:focus{
  border-color:#0f766e;
  box-shadow:0 0 0 3px rgba(15,118,110,.11);
}
.calendar-event-form-modern .calendar-title-field input{min-height:48px;font-size:13px}
.calendar-time-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.calendar-time-fields[hidden]{display:none!important}
.calendar-time-fields>label{display:grid;gap:5px;color:#334155;font-size:11px;font-weight:900}
.calendar-all-day-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:58px;
  padding:9px 11px;
  border:1px solid #dbe5ef;
  border-radius:14px;
  background:#f8fafc;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.calendar-all-day-row.is-active{border-color:#99d8ce;background:#effcf8;box-shadow:inset 0 0 0 1px rgba(15,118,110,.04)}
.calendar-all-day-copy{display:flex;align-items:center;gap:9px;min-width:0}
.calendar-all-day-copy>span:last-child{display:grid;gap:2px}
.calendar-all-day-copy b{font-size:11px;color:#0f172a;font-weight:950}
.calendar-all-day-copy small{font-size:9.5px;color:#64748b;font-weight:700;line-height:1.5}
.calendar-all-day-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:10px;background:#fff7ed;color:#c2410c;font-size:17px}
.calendar-switch-control{display:flex!important;align-items:center!important;gap:8px!important;margin:0!important;cursor:pointer;white-space:nowrap}
.calendar-switch-control>input{position:absolute;opacity:0;pointer-events:none;width:1px!important;height:1px!important;margin:0!important}
.calendar-switch-control>b{font-size:10px;color:#334155;font-weight:900}
.calendar-switch-track{position:relative;display:block;width:43px;height:24px;border-radius:999px;background:#cbd5e1;box-shadow:inset 0 0 0 1px rgba(15,23,42,.05);transition:background .18s ease}
.calendar-switch-track i{position:absolute;top:3px;right:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(15,23,42,.25);transition:transform .2s ease}
.calendar-switch-control>input:checked+.calendar-switch-track{background:#0f766e}
.calendar-switch-control>input:checked+.calendar-switch-track i{transform:translateX(-19px)}
.calendar-switch-control>input:focus-visible+.calendar-switch-track{outline:3px solid rgba(15,118,110,.18);outline-offset:2px}
.calendar-setting-card{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 11px;
  border:1px solid #dbe5ef;
  border-radius:12px;
  background:#f8fafc;
}
.calendar-setting-card>span:first-child{display:grid;gap:1px}
.calendar-setting-card b{font-size:10.5px;color:#0f172a}
.calendar-setting-card small{font-size:9px;color:#64748b;font-weight:700}
.calendar-event-form-modern .calendar-assignees{padding:11px;border-color:#dbe5ef;border-radius:13px;background:#fbfdff}
.calendar-event-form-modern .calendar-assignees legend{color:#475569;font-size:10px;font-weight:900}
.calendar-event-form-modern .calendar-assignees>div{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.calendar-event-form-modern .calendar-assignees label{min-height:34px;border:1px solid #e2e8f0;background:#fff;padding:7px 9px;border-radius:10px;transition:border-color .16s ease,background .16s ease}
.calendar-event-form-modern .calendar-assignees label:has(input:checked){border-color:#99d8ce;background:#effcf8;color:#0f766e}
.calendar-event-form-modern .calendar-description-field textarea{width:100%;box-sizing:border-box;min-height:82px;resize:vertical;line-height:1.8}
.calendar-modal-actions-sticky{
  position:sticky;
  bottom:-14px;
  z-index:7;
  margin:0!important;
  padding:12px 4px 2px;
  background:linear-gradient(180deg,rgba(248,250,252,0),#f8fafc 32%);
}
.calendar-modal-actions-sticky .btn{min-width:105px;min-height:40px;border-radius:11px}
#calendarEventModal .calendar-event-manage-actions{position:sticky;bottom:0;z-index:7;background:#fff;border-radius:0 0 24px 24px}
@media(max-width:720px){
  #calendarEventModal{padding:6px;align-items:end}
  #calendarEventModal .calendar-modal-dialog{width:100%;max-height:96vh;border-radius:20px 20px 14px 14px}
  #calendarEventModal .calendar-modal-head{padding:13px 14px}
  .calendar-event-form-modern{padding:9px!important;gap:9px}
  .calendar-form-section{padding:11px;border-radius:14px}
  .calendar-form-section-head{margin-bottom:10px}
  .calendar-form-section-head small{display:none}
  .calendar-event-form-modern .calendar-form-grid{grid-template-columns:1fr}
  .calendar-event-form-modern .calendar-form-grid .span-2{grid-column:auto}
  .calendar-time-fields{grid-template-columns:1fr 1fr;grid-column:auto!important}
  .calendar-all-day-row{grid-column:auto!important;min-height:54px;padding:8px 9px}
  .calendar-all-day-copy small{display:none}
  .calendar-event-form-modern .calendar-assignees>div{grid-template-columns:repeat(2,minmax(0,1fr))}
  .calendar-modal-actions-sticky{bottom:-9px;padding-top:10px}
  .calendar-modal-actions-sticky .btn{flex:1;min-width:0}
}
@media(max-width:420px){
  .calendar-time-fields{grid-template-columns:1fr}
  .calendar-all-day-row{align-items:flex-start}
  .calendar-all-day-copy{align-items:flex-start}
  .calendar-switch-control>b{display:none}
}
@media(min-width:721px){
  .calendar-event-form-modern{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .calendar-event-form-modern>.calendar-form-section-primary,
  .calendar-event-form-modern>.calendar-form-section-access,
  .calendar-event-form-modern>.calendar-form-section-notes,
  .calendar-event-form-modern>.calendar-modal-actions-sticky{grid-column:1/-1}
  .calendar-form-section-reminder .calendar-form-grid{grid-template-columns:1fr 1fr}
  .calendar-form-section-recurrence .calendar-form-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:720px){.calendar-event-form-modern{grid-template-columns:1fr}}

/* v824 - accounting documents refined mobile experience */
.accounting-docs-filter-shell{display:block}
.accounting-docs-filter-shell summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:14px;cursor:pointer}
.accounting-docs-filter-shell summary::-webkit-details-marker{display:none}
.accounting-docs-filter-shell[open] .accounting-docs-filter-summary{margin-bottom:14px}
.accounting-docs-filter-summary-text{display:grid;gap:4px}
.accounting-docs-filter-summary-text strong{color:#12355c;font-size:15px}
.accounting-docs-filter-summary-text small{color:#708399;font-size:12px;line-height:1.8}
.accounting-docs-filter-summary-icon{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:14px;background:#eef5ff;color:#174b78;font-size:20px;box-shadow:inset 0 0 0 1px #d7e6f8}
.accounting-docs-list-header{gap:12px;flex-wrap:wrap}
.accounting-docs-mobile-hint{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:#f6f9fc;border:1px solid #e2eaf2;color:#698097;font-size:12px;font-weight:700}
.accounting-docs-desktop-table{display:block}
.accounting-docs-mobile-list{display:none}
.accounting-docs-empty-state{padding:18px;border:1px dashed #d7e3ef;border-radius:18px;background:#fbfdff;text-align:center;color:#50667d}
.accounting-docs-empty-state strong{display:block;color:#173b61;margin-bottom:8px}
.accounting-doc-card{position:relative;padding:14px;border:1px solid #dbe5f0;border-radius:22px;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);box-shadow:0 10px 26px rgba(15,40,70,.05)}
.accounting-doc-card.is-selected{border-color:#b9d6f5;box-shadow:0 14px 32px rgba(23,75,120,.12)}
.accounting-doc-card.is-canceled{background:linear-gradient(180deg,#fff 0%,#fff7f7 100%);border-color:#f0d2d2}
.accounting-doc-card__top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:10px}
.accounting-doc-card__eyebrow{display:block;color:#7b8ea2;font-size:11px;margin-bottom:4px}
.accounting-doc-card__number{display:block;color:#123e6d;font-size:20px;line-height:1.2}
.accounting-doc-card__badges{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.accounting-doc-card__row-index{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#f6f9fc;color:#6a7e94;font-size:11px;font-weight:800}
.accounting-doc-card__title{margin:0 0 12px;color:#12355c;font-size:15px;line-height:1.95;min-height:30px}
.accounting-doc-card__meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}
.accounting-doc-card__meta>div{padding:10px 12px;border:1px solid #e3ebf4;border-radius:16px;background:#f8fbfe}
.accounting-doc-card__meta span,.accounting-doc-card__amount span{display:block;color:#7a8ca0;font-size:11px;margin-bottom:5px}
.accounting-doc-card__meta strong,.accounting-doc-card__amount strong{display:block;color:#173b5f;font-size:13px;line-height:1.8}
.accounting-doc-card__amounts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}
.accounting-doc-card__amount{padding:11px 12px;border-radius:16px;border:1px solid #e3ebf4}
.accounting-doc-card__amount--debit{background:#fff8f8;border-color:#f3dbdb}
.accounting-doc-card__amount--debit strong{color:#a32626;font-weight:900}
.accounting-doc-card__amount--credit{background:#f4fcf7;border-color:#d6edde}
.accounting-doc-card__amount--credit strong{color:#087243;font-weight:900}
.accounting-doc-card__actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.accounting-doc-card__actions .btn{min-height:44px}
.mobile-doc-actions-menu>div{left:auto;right:0;top:46px;min-width:160px}
.mobile-doc-actions-menu summary{width:44px;height:44px;border-radius:14px}
.accounting-docs-table .badge,.accounting-doc-card .badge{font-weight:900}
.article-modal-table-wrap{overflow:auto}

@media(max-width:900px){
  .accounting-docs-hero{padding:18px 18px 16px;border-radius:20px}
  .accounting-docs-hero h2{font-size:26px}
  .accounting-docs-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .doc-summary-card.amount-card{grid-column:auto}
}

@media(max-width:720px){
  .accounting-docs-page{gap:10px;margin:0 -2px}
  .accounting-docs-hero{padding:14px;border-radius:18px;gap:14px}
  .accounting-docs-hero-title{align-items:flex-start}
  .accounting-docs-hero h2{font-size:21px}
  .accounting-docs-kicker{font-size:12px}
  .accounting-docs-hero p{font-size:12px;line-height:1.95}
  .accounting-docs-hero-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .accounting-docs-hero-actions .btn{width:100%;justify-content:center;padding-inline:10px}
  .accounting-docs-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .doc-summary-card{padding:12px 11px;border-radius:16px}
  .doc-summary-card strong{font-size:18px;line-height:1.5;word-break:break-word}
  .doc-summary-card span,.doc-summary-card small{font-size:11px;line-height:1.8}
  .accounting-docs-filter-card{padding:12px;border-radius:16px}
  .accounting-docs-filter-shell[open] .accounting-docs-filter-summary{padding-bottom:12px;border-bottom:1px solid #e9eef5}
  .accounting-docs-filter-summary-text strong{font-size:14px}
  .accounting-docs-filter-summary-text small{display:none}
  .accounting-docs-filter-form{grid-template-columns:1fr;gap:9px}
  .accounting-docs-filter-form input,.accounting-docs-filter-form select{min-height:44px;border-radius:14px}
  .doc-filter-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .doc-filter-actions .btn{width:100%;justify-content:center}
  .accounting-docs-list{padding:12px;border-radius:18px}
  .accounting-docs-list-header{margin-bottom:10px;padding-bottom:8px}
  .section-title-row h3{font-size:18px}
  .section-title-row p{font-size:12px}
  .accounting-docs-mobile-hint{display:none}
  .accounting-docs-desktop-table{display:none}
  .accounting-docs-mobile-list{display:grid;gap:10px}
  .accounting-doc-card{padding:12px;border-radius:18px}
  .accounting-doc-card__number{font-size:18px}
  .accounting-doc-card__title{font-size:14px;line-height:1.9;margin-bottom:10px}
  .accounting-doc-card__meta{grid-template-columns:1fr 1fr}
  .accounting-doc-card__meta>div,.accounting-doc-card__amount{padding:10px}
  .accounting-doc-card__actions{grid-template-columns:minmax(0,1fr) auto}
  .accounting-doc-card__actions .btn{font-size:13px;padding:10px 12px}
  .doc-actions-menu summary{font-size:20px}
  .selected-doc-card{grid-template-columns:1fr}
  .selected-doc-card>div{border-radius:14px}
  .article-modal-table-wrap{border:none;background:transparent}
}

@media(max-width:420px){
  .accounting-docs-hero-actions{grid-template-columns:1fr}
  .accounting-docs-summary{grid-template-columns:1fr}
  .accounting-doc-card__meta,.accounting-doc-card__amounts{grid-template-columns:1fr}
  .doc-filter-actions{grid-template-columns:1fr}
}

/* ========================================================================== 
   v824 - Accounting documents / professional mobile workspace
   Desktop is intentionally untouched. Mobile turns the dense ledger table
   into touch-friendly document cards without changing server-side behavior.
   ========================================================================== */
@media (max-width: 760px){
  .accounting-docs-page{
    width:100%!important;
    max-width:100%!important;
    gap:10px!important;
    padding:0 0 18px!important;
    overflow:visible!important;
    --ad-navy:#123b61;
    --ad-green:#0f6b45;
    --ad-soft:#f4f8fc;
    --ad-border:#dce7f1;
    --ad-muted:#6f8296;
  }

  /* Header */
  .accounting-docs-page .accounting-docs-hero{
    position:relative!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:14px!important;
    width:100%!important;
    padding:14px!important;
    border:1px solid #dbe7f2!important;
    border-radius:18px!important;
    background:linear-gradient(145deg,#ffffff 0%,#f5f9fd 62%,#eef6fb 100%)!important;
    box-shadow:0 8px 24px rgba(17,52,84,.07)!important;
    overflow:hidden!important;
  }
  .accounting-docs-page .accounting-docs-hero::before{
    content:"";
    position:absolute;
    inset:0 0 auto 0;
    height:3px;
    background:linear-gradient(90deg,#0f6b45,#2b7aaa);
  }
  .accounting-docs-page .accounting-docs-hero-title{
    display:grid!important;
    grid-template-columns:46px minmax(0,1fr)!important;
    align-items:center!important;
    gap:11px!important;
    min-width:0!important;
  }
  .accounting-docs-page .accounting-docs-icon{
    width:46px!important;
    height:46px!important;
    border-radius:14px!important;
    background:#e8f3fb!important;
    box-shadow:inset 0 0 0 1px #d7e7f3!important;
    font-size:22px!important;
  }
  .accounting-docs-page .accounting-docs-kicker{
    margin:0 0 2px!important;
    font-size:10px!important;
    line-height:1.6!important;
    color:#3e7a61!important;
  }
  .accounting-docs-page .accounting-docs-hero h2{
    margin:0!important;
    font-size:20px!important;
    line-height:1.45!important;
    color:var(--ad-navy)!important;
  }
  .accounting-docs-page .accounting-docs-hero p{
    grid-column:1/-1!important;
    margin:7px 0 0!important;
    color:#718397!important;
    font-size:11px!important;
    line-height:1.85!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }
  .accounting-docs-page .accounting-docs-hero-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
  }
  .accounting-docs-page .accounting-docs-hero-actions .btn{
    width:100%!important;
    min-height:44px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:9px 10px!important;
    border-radius:12px!important;
    font-size:12px!important;
    font-weight:900!important;
    white-space:nowrap!important;
  }

  /* KPI cards: 3 compact counters + 2 amount cards */
  .accounting-docs-page .accounting-docs-summary{
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
  }
  .accounting-docs-page .doc-summary-card{
    grid-column:span 2!important;
    min-width:0!important;
    padding:10px 8px!important;
    border-radius:14px!important;
    border:1px solid var(--ad-border)!important;
    box-shadow:0 4px 14px rgba(18,55,87,.045)!important;
    text-align:center!important;
  }
  .accounting-docs-page .doc-summary-card.amount-card{
    grid-column:span 3!important;
    padding:11px 8px!important;
  }
  .accounting-docs-page .doc-summary-card span{
    font-size:9.5px!important;
    line-height:1.55!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .accounting-docs-page .doc-summary-card strong{
    margin-top:4px!important;
    font-size:18px!important;
    line-height:1.3!important;
    color:#143b60!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .accounting-docs-page .doc-summary-card.amount-card strong{
    font-size:13px!important;
    direction:ltr!important;
    unicode-bidi:plaintext!important;
  }
  .accounting-docs-page .doc-summary-card small{
    display:none!important;
  }

  /* Search and filters */
  .accounting-docs-page .accounting-docs-filter-card{
    padding:11px!important;
    border-radius:16px!important;
    border:1px solid var(--ad-border)!important;
    box-shadow:0 5px 16px rgba(18,55,87,.04)!important;
  }
  .accounting-docs-page .accounting-docs-filter-form{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
    align-items:end!important;
  }
  .accounting-docs-page .accounting-docs-filter-form .doc-filter-search{
    grid-column:1/-1!important;
  }
  .accounting-docs-page .accounting-docs-filter-form label{
    min-width:0!important;
    gap:5px!important;
  }
  .accounting-docs-page .accounting-docs-filter-form label>span{
    padding-inline:2px!important;
    font-size:10px!important;
    color:#63788f!important;
  }
  .accounting-docs-page .accounting-docs-filter-form input,
  .accounting-docs-page .accounting-docs-filter-form select{
    width:100%!important;
    min-width:0!important;
    height:43px!important;
    min-height:43px!important;
    padding:0 11px!important;
    border:1px solid #d4e0eb!important;
    border-radius:12px!important;
    background:#fbfdff!important;
    color:#1f3f5f!important;
    font-size:12px!important;
    outline:none!important;
  }
  .accounting-docs-page .accounting-docs-filter-form input:focus,
  .accounting-docs-page .accounting-docs-filter-form select:focus{
    border-color:#75a7ca!important;
    box-shadow:0 0 0 3px rgba(74,139,184,.10)!important;
    background:#fff!important;
  }
  .accounting-docs-page .doc-filter-actions{
    grid-column:1/-1!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
  }
  .accounting-docs-page .doc-filter-actions .btn{
    width:100%!important;
    min-height:42px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:8px!important;
    border-radius:12px!important;
    font-size:12px!important;
    font-weight:900!important;
  }

  /* Main list container */
  .accounting-docs-page .accounting-docs-layout{
    display:block!important;
    width:100%!important;
  }
  .accounting-docs-page .accounting-docs-list{
    width:100%!important;
    padding:10px!important;
    border-radius:17px!important;
    border:1px solid var(--ad-border)!important;
    box-shadow:0 7px 22px rgba(17,52,84,.055)!important;
    overflow:visible!important;
  }
  .accounting-docs-page .section-title-row{
    margin:3px 2px 10px!important;
    padding:0 0 9px!important;
    border-bottom:1px solid #e7eef5!important;
  }
  .accounting-docs-page .section-title-row h3{
    font-size:15px!important;
    line-height:1.5!important;
  }
  .accounting-docs-page .section-title-row p{
    margin-top:2px!important;
    font-size:10px!important;
  }

  /* Mobile document cards */
  .accounting-docs-page .accounting-docs-table-wrap{
    width:100%!important;
    max-height:none!important;
    overflow:visible!important;
    border:0!important;
    border-radius:0!important;
  }
  .accounting-docs-page .accounting-docs-table{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    white-space:normal!important;
    font-size:12px!important;
  }
  .accounting-docs-page .accounting-docs-table thead{
    display:none!important;
  }
  .accounting-docs-page .accounting-docs-table tbody{
    display:grid!important;
    width:100%!important;
    gap:9px!important;
  }
  .accounting-docs-page .accounting-docs-table tbody tr{
    position:relative!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-areas:
      "number status"
      "date source"
      "desc desc"
      "debit credit"
      "actions actions"!important;
    gap:0!important;
    width:100%!important;
    min-width:0!important;
    padding:0!important;
    border:1px solid #dce7f1!important;
    border-radius:16px!important;
    background:#fff!important;
    box-shadow:0 5px 16px rgba(16,48,78,.055)!important;
    overflow:visible!important;
  }
  .accounting-docs-page .accounting-docs-table tbody tr::before{
    content:"";
    position:absolute;
    top:0;
    right:0;
    width:4px;
    height:100%;
    border-radius:0 16px 16px 0;
    background:#2c789f;
  }
  .accounting-docs-page .accounting-docs-table tbody tr.selected-row{
    border-color:#a8cde8!important;
    box-shadow:0 7px 20px rgba(27,105,159,.10)!important;
  }
  .accounting-docs-page .accounting-docs-table tbody tr.canceled-row{
    border-color:#efd7d7!important;
    background:#fffafa!important;
  }
  .accounting-docs-page .accounting-docs-table tbody tr.canceled-row::before{
    background:#b75b5b!important;
  }
  .accounting-docs-page .accounting-docs-table tbody tr.selected-row td,
  .accounting-docs-page .accounting-docs-table tbody tr.canceled-row td{
    background:transparent!important;
  }
  .accounting-docs-page .accounting-docs-table td{
    width:auto!important;
    min-width:0!important;
    display:block!important;
    padding:9px 11px!important;
    border:0!important;
    border-bottom:1px solid #edf2f7!important;
    background:transparent!important;
    white-space:normal!important;
    text-align:right!important;
    overflow:visible!important;
  }
  .accounting-docs-page .accounting-docs-table td::before{
    display:block!important;
    content:attr(data-label)!important;
    margin:0 0 3px!important;
    color:#8190a0!important;
    font-size:9px!important;
    font-weight:800!important;
    line-height:1.4!important;
    text-align:right!important;
  }
  .accounting-docs-page .accounting-docs-table td:nth-child(1){grid-area:number!important;border-left:1px solid #edf2f7!important}
  .accounting-docs-page .accounting-docs-table td:nth-child(2){grid-area:date!important;border-left:1px solid #edf2f7!important}
  .accounting-docs-page .accounting-docs-table td:nth-child(3){grid-area:desc!important}
  .accounting-docs-page .accounting-docs-table td:nth-child(4){grid-area:source!important}
  .accounting-docs-page .accounting-docs-table td:nth-child(5){grid-area:debit!important;border-left:1px solid #edf2f7!important}
  .accounting-docs-page .accounting-docs-table td:nth-child(6){grid-area:credit!important}
  .accounting-docs-page .accounting-docs-table td:nth-child(7){grid-area:status!important}
  .accounting-docs-page .accounting-docs-table td:nth-child(8){grid-area:actions!important;border-bottom:0!important}
  .accounting-docs-page .accounting-docs-table .doc-no{
    display:block!important;
    color:#123f66!important;
    font-size:15px!important;
    font-weight:950!important;
    line-height:1.35!important;
  }
  .accounting-docs-page .accounting-docs-table .doc-row-index{
    margin-top:2px!important;
    color:#9aa8b6!important;
    font-size:9px!important;
  }
  .accounting-docs-page .accounting-docs-table .doc-desc{
    max-width:none!important;
    overflow:visible!important;
    text-overflow:clip!important;
    color:#344d66!important;
    line-height:1.85!important;
    background:#fbfdff!important;
  }
  .accounting-docs-page .accounting-docs-table .doc-desc::before{
    color:#708397!important;
  }
  .accounting-docs-page .accounting-docs-table td.amount{
    direction:ltr!important;
    unicode-bidi:plaintext!important;
    text-align:right!important;
    font-size:13px!important;
    font-weight:950!important;
  }
  .accounting-docs-page .accounting-docs-table td.amount::before{
    direction:rtl!important;
  }
  .accounting-docs-page .accounting-docs-table .badge{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    max-width:100%!important;
    min-height:28px!important;
    padding:5px 9px!important;
    border-radius:999px!important;
    font-size:10px!important;
    font-weight:900!important;
    white-space:normal!important;
    line-height:1.45!important;
  }

  /* Row actions: large, finger friendly */
  .accounting-docs-page .accounting-doc-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:7px!important;
    padding:8px 10px 10px!important;
    background:#f8fbfd!important;
  }
  .accounting-docs-page .accounting-doc-actions::before{display:none!important}
  .accounting-docs-page .accounting-doc-actions>.btn{
    width:100%!important;
    min-height:40px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:7px 10px!important;
    border:1px solid #d9e5ef!important;
    border-radius:11px!important;
    background:#fff!important;
    color:#214b70!important;
    font-size:11px!important;
    font-weight:900!important;
  }
  .accounting-docs-page .doc-actions-menu{
    position:relative!important;
    min-width:40px!important;
  }
  .accounting-docs-page .doc-actions-menu summary{
    width:40px!important;
    height:40px!important;
    border-radius:11px!important;
    background:#fff!important;
  }
  .accounting-docs-page .doc-actions-menu>div{
    top:auto!important;
    bottom:46px!important;
    left:0!important;
    right:auto!important;
    min-width:150px!important;
    border-radius:13px!important;
    box-shadow:0 15px 36px rgba(17,43,71,.18)!important;
  }
  .accounting-docs-page .doc-actions-menu .btn{
    width:100%!important;
    min-height:38px!important;
    white-space:nowrap!important;
  }

  /* Empty state */
  .accounting-docs-page .accounting-docs-table td.empty{
    grid-column:1/-1!important;
    display:block!important;
    padding:28px 14px!important;
    border:0!important;
    color:#73869a!important;
    text-align:center!important;
    line-height:1.8!important;
  }
  .accounting-docs-page .accounting-docs-table td.empty::before{display:none!important}

  /* Page navigation -- remains one compact row */
  .accounting-docs-page .as-list-pager{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    grid-template-areas:"size nav"!important;
    align-items:center!important;
    gap:6px!important;
    width:100%!important;
    min-height:46px!important;
    margin:8px 0!important;
    padding:6px 8px!important;
    border:1px solid #dde8f1!important;
    border-radius:13px!important;
    background:#f9fcff!important;
    box-shadow:none!important;
  }
  .accounting-docs-page .as-list-pager__size-wrap{grid-area:size!important;justify-self:start!important}
  .accounting-docs-page .as-list-pager__nav{grid-area:nav!important;justify-self:stretch!important;justify-content:flex-end!important;gap:4px!important}
  .accounting-docs-page .as-list-pager__summary{display:none!important}
  .accounting-docs-page .as-page-numbers{display:none!important}
  .accounting-docs-page .as-page-mobile{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:64px!important;
    height:32px!important;
    padding:0 7px!important;
    border:1px solid #e0e8f0!important;
    border-radius:9px!important;
    background:#fff!important;
    color:#244866!important;
    font-size:10px!important;
  }
  .accounting-docs-page .as-page-nav{
    min-width:48px!important;
    height:32px!important;
    min-height:32px!important;
    padding:0 6px!important;
    border-radius:9px!important;
    font-size:10px!important;
  }
  .accounting-docs-page .as-list-pager__size{
    gap:4px!important;
  }
  .accounting-docs-page .as-list-pager__size>span{
    font-size:0!important;
    line-height:30px!important;
  }
  .accounting-docs-page .as-list-pager__size>span::after{
    content:"نمایش"!important;
    font-size:9px!important;
  }
  .accounting-docs-page .as-list-pager__size select{
    width:54px!important;
    min-width:54px!important;
    height:32px!important;
    min-height:32px!important;
    padding:0 5px!important;
    border-radius:9px!important;
    font-size:11px!important;
  }

  /* Article details: real mobile sheet */
  .accounting-article-modal{
    padding:0!important;
    align-items:stretch!important;
  }
  .accounting-article-modal-dialog{
    width:100%!important;
    height:100%!important;
    max-height:none!important;
    border:0!important;
    border-radius:0!important;
    background:#f4f7fb!important;
  }
  .accounting-article-modal-header{
    position:sticky!important;
    top:0!important;
    z-index:5!important;
    align-items:center!important;
    gap:10px!important;
    padding:13px 12px!important;
    background:rgba(255,255,255,.96)!important;
    backdrop-filter:blur(12px)!important;
    box-shadow:0 4px 15px rgba(17,43,71,.055)!important;
  }
  .accounting-article-modal-kicker{
    margin-bottom:2px!important;
    font-size:9px!important;
  }
  .accounting-article-modal-header h3{
    font-size:15px!important;
    line-height:1.55!important;
  }
  .accounting-article-modal-header p{
    margin-top:3px!important;
    max-width:78vw!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:10px!important;
  }
  .accounting-article-modal-close{
    flex:0 0 38px!important;
    width:38px!important;
    height:38px!important;
    border-radius:11px!important;
    font-size:24px!important;
  }
  .accounting-article-modal-body{
    padding:10px!important;
    flex:1!important;
  }
  .accounting-article-modal .selected-doc-card{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    margin-bottom:9px!important;
  }
  .accounting-article-modal .selected-doc-card>div{
    min-width:0!important;
    padding:9px!important;
    border-radius:12px!important;
    background:#fff!important;
    box-shadow:0 3px 10px rgba(18,55,87,.035)!important;
  }
  .accounting-article-modal .selected-doc-card span{font-size:9px!important}
  .accounting-article-modal .selected-doc-card strong{
    margin-top:3px!important;
    font-size:11px!important;
    line-height:1.65!important;
    overflow-wrap:anywhere!important;
  }
  .accounting-article-modal .selected-doc-desc{grid-column:1/-1!important}

  /* Article rows have their own card areas */
  .accounting-article-modal .lines-table tbody tr{
    grid-template-areas:
      "account person"
      "debit credit"
      "cash cash"
      "desc desc"!important;
  }
  .accounting-article-modal .lines-table tbody tr::before{background:#5b7f9d!important}
  .accounting-article-modal .lines-table td:nth-child(1){grid-area:account!important;border-left:1px solid #edf2f7!important}
  .accounting-article-modal .lines-table td:nth-child(2){grid-area:person!important}
  .accounting-article-modal .lines-table td:nth-child(3){grid-area:debit!important;border-left:1px solid #edf2f7!important}
  .accounting-article-modal .lines-table td:nth-child(4){grid-area:credit!important}
  .accounting-article-modal .lines-table td:nth-child(5){grid-area:cash!important;background:#fbfdff!important}
  .accounting-article-modal .lines-table td:nth-child(6){grid-area:desc!important;border-bottom:0!important;background:#fbfdff!important}
  .accounting-article-modal .lines-table tfoot{
    display:block!important;
    margin-top:9px!important;
  }
  .accounting-article-modal .lines-table tfoot tr{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:0!important;
    overflow:hidden!important;
    border:1px solid #dbe7f1!important;
    border-radius:13px!important;
    background:#fff!important;
  }
  .accounting-article-modal .lines-table tfoot th{
    position:static!important;
    display:block!important;
    padding:9px!important;
    background:#fff!important;
    border-bottom:1px solid #edf2f7!important;
    white-space:normal!important;
    font-size:10px!important;
  }
  .accounting-article-modal .lines-table tfoot th:first-child{
    grid-column:1/-1!important;
    text-align:center!important;
    color:#60758a!important;
    background:#f7fafc!important;
  }
  .accounting-article-modal .lines-table tfoot th:nth-child(2),
  .accounting-article-modal .lines-table tfoot th:nth-child(3){
    direction:ltr!important;
    text-align:center!important;
    font-size:12px!important;
  }
  .accounting-article-modal .lines-table tfoot th:last-child{display:none!important}
  .accounting-article-modal-footer{
    position:sticky!important;
    bottom:0!important;
    z-index:5!important;
    padding:9px 10px calc(9px + env(safe-area-inset-bottom))!important;
    background:rgba(255,255,255,.97)!important;
    backdrop-filter:blur(12px)!important;
    box-shadow:0 -4px 16px rgba(17,43,71,.06)!important;
  }
  .accounting-article-modal-footer .btn{
    width:100%!important;
    min-height:44px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:12px!important;
    font-size:12px!important;
    font-weight:900!important;
  }
}

@media (max-width: 390px){
  .accounting-docs-page .accounting-docs-hero-actions{
    grid-template-columns:1fr!important;
  }
  .accounting-docs-page .accounting-docs-filter-form{
    grid-template-columns:1fr!important;
  }
  .accounting-docs-page .accounting-docs-filter-form .doc-filter-search,
  .accounting-docs-page .doc-filter-actions{
    grid-column:auto!important;
  }
  .accounting-docs-page .doc-summary-card strong{font-size:16px!important}
  .accounting-docs-page .doc-summary-card.amount-card strong{font-size:11.5px!important}
  .accounting-docs-page .as-page-mobile{display:none!important}
  .accounting-docs-page .as-page-nav{min-width:45px!important}
}

/* v825: management dashboard welcome — balanced cards and clearer actions */
#dashboardWelcomeModal .dashboard-welcome-dialog{
  width:min(760px,100%);
  padding:28px;
}
#dashboardWelcomeModal .dashboard-welcome-dialog:before{
  width:190px;
  height:190px;
  left:-105px;
  bottom:-125px;
}
#dashboardWelcomeModal .dashboard-welcome-dialog-head{
  gap:16px;
  padding-bottom:20px;
}
#dashboardWelcomeModal .dashboard-welcome-dialog h3{
  font-size:25px;
}
#dashboardWelcomeModal .dashboard-welcome-dialog p{
  font-size:13.5px;
  color:#5c6f86;
}
#dashboardWelcomeModal .dashboard-welcome-items{
  gap:12px;
  margin:20px 0;
}
#dashboardWelcomeModal .dashboard-welcome-items.welcome-count-1{
  grid-template-columns:1fr;
}
#dashboardWelcomeModal .dashboard-welcome-items.welcome-count-2{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
#dashboardWelcomeModal .dashboard-welcome-items.welcome-count-3{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
#dashboardWelcomeModal .dashboard-welcome-item{
  min-height:100px;
  padding:15px 14px;
}
#dashboardWelcomeModal .dashboard-welcome-item-icon{
  width:46px;
  height:46px;
  flex-basis:46px;
  border-radius:15px;
}
#dashboardWelcomeModal .dashboard-welcome-item b{
  font-size:23px;
}
#dashboardWelcomeModal .dashboard-welcome-item small{
  font-size:11.5px;
  line-height:1.65;
}
#dashboardWelcomeModal .dashboard-welcome-dialog-actions{
  justify-content:center;
}
#dashboardWelcomeModal .welcome-dismiss-btn{
  min-width:220px;
  padding:13px 22px;
}
@media(max-width:760px){
  #dashboardWelcomeModal .dashboard-welcome-items.welcome-count-3{
    grid-template-columns:1fr;
  }
  #dashboardWelcomeModal .dashboard-welcome-items.welcome-count-3 .dashboard-welcome-item{
    min-height:78px;
  }
}
@media(max-width:640px){
  #dashboardWelcomeModal .dashboard-welcome-dialog{
    padding:18px;
  }
  #dashboardWelcomeModal .dashboard-welcome-items.welcome-count-1,
  #dashboardWelcomeModal .dashboard-welcome-items.welcome-count-2,
  #dashboardWelcomeModal .dashboard-welcome-items.welcome-count-3{
    grid-template-columns:1fr;
  }
  #dashboardWelcomeModal .dashboard-welcome-item{
    min-height:76px;
  }
  #dashboardWelcomeModal .dashboard-welcome-dialog h3{
    font-size:20px;
  }
  #dashboardWelcomeModal .welcome-dismiss-btn{
    width:100%;
    min-width:0;
  }
}

/* v826 - installment contract detail: grow list with row count, no inner vertical scroll */
@media (min-width:801px){
  .installment-detail-page-v4 #tab-installments{
    flex:none!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  .installment-detail-page-v4 #tab-installments .installment-full-table-card-v4.installment-list-modern-v5{
    flex:none!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  .installment-detail-page-v4 #tab-installments .installment-full-table-v4.installment-modern-table-wrap-v5{
    flex:none!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
  .installment-detail-page-v4 #tab-installments .installment-modern-table-v5{
    height:auto!important;
    max-height:none!important;
  }
}

/* v827.1 - installment contracts: natural-height list and anchored row menu
   Desktop list grows with its rows; there is no inner vertical scroll area.
   The actions menu stays absolutely anchored to its own three-dot button. */
@media (min-width:901px){
  .installment-contracts-modern.installment-list-page-full{
    min-height:0!important;
  }

  .installment-contracts-modern .modern-installment-table-card,
  .installment-contracts-modern .win-table-card.modern-installment-table-card{
    flex:0 0 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }

  .installment-contracts-modern .top-contract-table.win-fixed-table,
  .installment-contracts-modern .win-fixed-table.top-contract-table{
    flex:0 0 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    scrollbar-gutter:auto!important;
  }

  .installment-contracts-modern .top-contract-table .modern-installment-table{
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    max-height:none!important;
  }

  .installment-contracts-modern .top-contract-table .modern-installment-table tbody{
    height:auto!important;
  }

  .installment-contracts-modern .installment-row-actions,
  .installment-contracts-modern .row-action-menu{
    overflow:visible!important;
  }

  .installment-contracts-modern .row-action-menu{
    z-index:20;
  }

  .installment-contracts-modern .row-action-menu.is-open{
    z-index:1000;
  }

  .installment-contracts-modern .modern-installment-table .row-action-dropdown{
    position:absolute!important;
    top:calc(100% + 6px)!important;
    bottom:auto!important;
    left:0!important;
    right:auto!important;
    margin:0!important;
    z-index:1001!important;
    transform:none!important;
  }

  .installment-contracts-modern .modern-installment-table .row-action-menu.open-up .row-action-dropdown{
    top:auto!important;
    bottom:calc(100% + 6px)!important;
  }
}

/* v857 - installment detail list: align with central soft-card design */
.installment-detail-page-v4 #tab-installments .installment-list-modern-v5{
  border:1px solid #d7e4f1!important;
  border-radius:26px!important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)!important;
  box-shadow:0 16px 42px rgba(20,52,84,.08)!important;
  overflow:hidden!important;
}
.installment-detail-page-v4 #tab-installments .installment-list-head-v5{
  padding:18px 22px!important;
  border-bottom:1px solid #e3ecf5!important;
  border-radius:25px 25px 0 0!important;
  background:linear-gradient(135deg,#f7fbff 0%,#ffffff 58%,#f2fbf7 100%)!important;
}
.installment-detail-page-v4 #tab-installments .installment-list-icon-v5{
  border-radius:17px!important;
  box-shadow:0 10px 24px rgba(16,76,104,.16)!important;
}
.installment-detail-page-v4 #tab-installments .installment-list-stats-v5>div{
  border-radius:16px!important;
  border-color:#dce7f2!important;
  box-shadow:0 4px 12px rgba(20,52,84,.035)!important;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-wrap-v5{
  margin:14px 16px 16px!important;
  padding:10px!important;
  border:1px solid #d8e5f1!important;
  border-radius:22px!important;
  background:#f3f7fb!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.92)!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-v5{
  border-collapse:separate!important;
  border-spacing:0 10px!important;
  padding:0!important;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-v5 thead th{
  height:50px!important;
  padding:10px 12px!important;
  background:#e9f1fa!important;
  color:#173a5d!important;
  border:0!important;
  border-bottom:1px solid #cbd9e7!important;
  box-shadow:none!important;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-v5 thead th:first-child{
  border-radius:0 16px 16px 0!important;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-v5 thead th:last-child{
  border-radius:16px 0 0 16px!important;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-v5 tbody tr{
  --installment-row-bg:#ffffff;
  --installment-row-border:#dfe8f2;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-v5 tbody tr:nth-child(even){
  --installment-row-bg:#f8fbfe;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-v5 tbody tr:hover{
  filter:drop-shadow(0 8px 13px rgba(15,41,64,.09))!important;
  transform:translateY(-1px)!important;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-v5 tbody td{
  height:76px!important;
  background:var(--installment-row-bg)!important;
  border-top:1px solid var(--installment-row-border)!important;
  border-bottom:1px solid var(--installment-row-border)!important;
  border-left:0!important;
  border-right:0!important;
  box-shadow:none!important;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-v5 tbody td:first-child{
  border-right:4px solid var(--row-accent)!important;
  border-radius:0 18px 18px 0!important;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-v5 tbody td:last-child{
  border-left:1px solid var(--installment-row-border)!important;
  border-radius:18px 0 0 18px!important;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-v5 tbody tr.is-selected{
  --installment-row-bg:#eef6ff;
  --installment-row-border:#91bff0;
}
.installment-detail-page-v4 #tab-installments .installment-modern-table-v5 tbody tr.is-selected td{
  background:var(--installment-row-bg)!important;
  box-shadow:none!important;
}
.installment-detail-page-v4 #tab-installments .installment-index-v5{
  border-radius:12px!important;
  background:#f1f6fb!important;
}
.installment-detail-page-v4 #tab-installments .installment-money-stack-v5 span{
  border-radius:13px!important;
  background:rgba(248,251,254,.88)!important;
  border-color:#e0e9f2!important;
}
.installment-detail-page-v4 #tab-installments .installment-status-pill{
  border-radius:999px!important;
  box-shadow:0 3px 10px rgba(15,41,64,.04)!important;
}

@media(max-width:800px){
  .installment-detail-page-v4 #tab-installments .installment-list-modern-v5{
    border-radius:22px!important;
  }
  .installment-detail-page-v4 #tab-installments .installment-list-head-v5{
    border-radius:21px 21px 0 0!important;
  }
  .installment-detail-page-v4 #tab-installments .installment-detail-mobile-cards-v4{
    gap:10px!important;
    padding:12px!important;
    background:#f5f9fd!important;
  }
  .installment-detail-page-v4 #tab-installments .installment-installment-card-v4{
    border-radius:20px!important;
    border-color:#dce7f2!important;
    box-shadow:0 8px 22px rgba(15,41,64,.055)!important;
  }
  .installment-detail-page-v4 #tab-installments .installment-installment-card-v4:nth-child(even){
    background:#f8fbfe!important;
  }
  .installment-detail-page-v4 #tab-installments .installment-installment-card-v4.is-paid:nth-child(even){
    background:linear-gradient(180deg,#fbfffd 0%,#f1fbf5 100%)!important;
  }
}

/* v859 - installment contracts: unified modern row-card selection
   Mouse, keyboard and action-menu selection use one dedicated state, isolated from legacy .selected-row. */
.installment-contracts-modern .top-contract-table .modern-installment-table{
  border-collapse:separate!important;
  border-spacing:0 5px!important;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state{
  outline:none!important;
  cursor:pointer;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state:focus,
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state:focus-visible{
  outline:none!important;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state td{
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease!important;
  border-top:1px solid transparent!important;
  border-bottom:1px solid transparent!important;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state td:first-child{
  border-radius:0 15px 15px 0!important;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state td:last-child{
  border-radius:15px 0 0 15px!important;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state.is-row-selected td,
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state.is-row-selected:hover td{
  background:linear-gradient(180deg,
    color-mix(in srgb,var(--theme-soft,#eaf4ff) 76%,#fff 24%) 0%,
    color-mix(in srgb,var(--theme-soft,#eaf4ff) 90%,#fff 10%) 100%)!important;
  color:inherit!important;
  border-top-color:color-mix(in srgb,var(--theme-primary,#1677ff) 38%,#dbe7f3 62%)!important;
  border-bottom-color:color-mix(in srgb,var(--theme-primary,#1677ff) 38%,#dbe7f3 62%)!important;
  box-shadow:0 8px 18px rgba(15,23,42,.045)!important;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state.is-row-selected td:first-child{
  border-right:1px solid color-mix(in srgb,var(--theme-primary,#1677ff) 42%,#dbe7f3 58%)!important;
  box-shadow:inset -4px 0 0 var(--theme-primary,#1677ff),0 8px 18px rgba(15,23,42,.045)!important;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state.is-row-selected td:last-child{
  border-left:1px solid color-mix(in srgb,var(--theme-primary,#1677ff) 42%,#dbe7f3 58%)!important;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state.is-row-selected .modern-row-index{
  color:var(--theme-primary,#1677ff)!important;
  font-weight:1000!important;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state.is-row-selected .modern-row-index::before{
  content:'✓';
  display:inline-grid;
  place-items:center;
  width:21px;
  height:21px;
  margin-inline-end:6px;
  border-radius:999px;
  background:var(--theme-primary,#1677ff);
  color:#fff;
  font-size:11px;
  font-weight:1000;
  vertical-align:middle;
  box-shadow:0 4px 11px color-mix(in srgb,var(--theme-primary,#1677ff) 24%,transparent)!important;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state.is-row-selected .customer-name{
  color:var(--theme-text,#0f355b)!important;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state.is-row-selected .customer-meta span,
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state.is-row-selected .contract-mini-meta span{
  background:rgba(255,255,255,.84)!important;
  border:1px solid color-mix(in srgb,var(--theme-primary,#1677ff) 17%,#e2e8f0 83%)!important;
}
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state.is-row-selected .row-action-trigger,
.installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state:has(.row-action-menu.is-open) .row-action-trigger{
  border-color:color-mix(in srgb,var(--theme-primary,#1677ff) 45%,#d8e3ef 55%)!important;
  background:#fff!important;
  color:var(--theme-primary,#1677ff)!important;
  box-shadow:0 6px 16px color-mix(in srgb,var(--theme-primary,#1677ff) 14%,transparent)!important;
}
@media (prefers-reduced-motion:no-preference){
  .installment-contracts-modern .top-contract-table .modern-installment-table tbody tr.installment-row-state td{
    transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease!important;
  }
}


/* Smart financial account picker: partial card/account/IBAN suggestion + ownership */
.smart-financial-number-wrap{position:relative;min-width:0}
.smart-financial-number-wrap [data-smart-financial-account]{direction:ltr!important;text-align:left!important;unicode-bidi:plaintext!important;font-variant-numeric:tabular-nums;letter-spacing:.25px}
.smart-financial-results{position:absolute;z-index:180;top:calc(100% + 6px);right:0;left:0;max-height:300px;overflow:auto;background:#fff;border:1px solid #cbd5e1;border-radius:14px;box-shadow:0 18px 42px rgba(15,35,70,.18);padding:6px}
.smart-financial-option{width:100%;display:flex;flex-direction:column;align-items:stretch;gap:5px;text-align:right;border:0;border-bottom:1px solid #eef2f7;background:#fff;padding:10px 12px;border-radius:10px;cursor:pointer;color:inherit}
.smart-financial-option:hover,.smart-financial-option:focus{background:var(--theme-soft,#eef8f3);outline:none}
.smart-financial-option-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.smart-financial-option small{color:#64748b;font-size:11px}
.smart-financial-number{direction:ltr;text-align:left;color:#334155;font-size:12px;letter-spacing:.3px}
.smart-financial-badge{display:inline-flex;padding:3px 7px;border-radius:999px;background:#e8f5ee;color:#16603d;font-size:10px;font-weight:800;white-space:nowrap}
.smart-financial-badge.is-related,.smart-financial-relation.is-related{background:#fff7e6;color:#8a5800}
.smart-financial-owner-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:12px}
.smart-financial-save{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:9px 11px;border:1px dashed #cbd5e1;border-radius:11px;background:#f8fafc;font-size:12px;color:#526274}
.smart-financial-save.is-selected{border-style:solid;background:#eef8f3;color:#145c3b}
.smart-financial-save button{min-height:34px;padding:6px 10px;border-radius:9px}
.smart-financial-relation{padding:7px 9px;border-radius:9px;background:#eef8f3;color:#145c3b;font-size:12px;font-weight:700}
.smart-financial-side{display:grid;gap:12px;padding:14px;border:1px solid #dce5ef;border-radius:14px;background:#fbfcfe}
.smart-financial-side-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0;color:#203c60;font-weight:900}
@media(max-width:760px){.smart-financial-owner-grid{grid-template-columns:1fr}.smart-financial-option-top{align-items:flex-start;flex-direction:column}}
/* Financial account actual-owner identity (v880) */
.smart-financial-owner-identity{display:grid;gap:8px;min-width:0}
.owner-self-check{display:flex!important;align-items:center;gap:8px;min-height:40px;padding:8px 10px!important;border:1px solid #d9e4ec;border-radius:11px;background:#f8fbfd;color:#31485f;font-size:12px;font-weight:750;cursor:pointer}
.owner-self-check input{width:18px!important;height:18px!important;min-height:0!important;flex:none;margin:0!important}
.owner-self-check b{color:#0d6548}
.owner-self-check.is-locked{opacity:.68;cursor:not-allowed;background:#f2f5f8;border-style:dashed}.owner-self-check.is-locked input{cursor:not-allowed}
.smart-financial-owner-details{display:grid;gap:9px;padding:10px;border:1px solid #d8e4ed;border-radius:12px;background:#fbfdff}
.smart-financial-owner-details[hidden],.smart-financial-owner-profile[hidden]{display:none!important}
.smart-financial-owner-national-row{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(280px,1.2fr);gap:9px;align-items:end}
.smart-financial-owner-profile{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.smart-financial-owner-details label{margin:0!important;min-width:0}
.smart-owner-field-label{display:flex;align-items:center;gap:5px;margin-bottom:5px;color:#40556a;font-size:11px;font-weight:850}
.smart-owner-field-label em{font-style:normal;color:#c0392b}.smart-owner-field-label small{font-weight:650;color:#8796a5}
.smart-financial-owner-details input{width:100%;min-height:40px}
.smart-financial-owner-details input.is-autofilled-person{background:#f1f7f4;border-color:#bdd8ca;color:#284b3c}
.smart-financial-owner-status{display:flex;align-items:center;min-height:40px;padding:7px 10px;border-radius:10px;background:#f4f7fa;color:#687b8d;font-size:11px;line-height:1.65}
.smart-financial-owner-status.is-loading{background:#eef5fb;color:#315f86}.smart-financial-owner-status.is-found{background:#edf8f2;color:#1e6a48}.smart-financial-owner-status.is-new{background:#fff8e9;color:#835c17}.smart-financial-owner-status.is-error{background:#fff1f1;color:#8d3f3f}
@media(max-width:900px){.smart-financial-owner-profile{grid-template-columns:repeat(2,minmax(0,1fr))}.smart-financial-owner-national-row{grid-template-columns:1fr}}
@media(max-width:620px){.smart-financial-owner-profile{grid-template-columns:1fr}.owner-self-check{align-items:flex-start}.smart-financial-owner-details{padding:9px}.smart-financial-owner-status{min-height:0}}

/* Financial account links and saved-owner lock (v882) */
.owner-national-unavailable-check{display:flex!important;align-items:center;gap:7px;min-height:42px;padding:8px 10px;border:1px dashed #ccdbe6;border-radius:11px;background:#f9fbfd;color:#526b7d;font-size:11px;font-weight:800}.owner-national-unavailable-check input{width:16px!important;height:16px!important;min-height:auto!important;flex:0 0 auto}.smart-financial-owner-national-row{grid-template-columns:minmax(220px,1fr) auto minmax(220px,1fr)!important}@media(max-width:720px){.smart-financial-owner-national-row{grid-template-columns:1fr!important}.owner-national-unavailable-check{min-height:38px}}

/* Financial owner UX cleanup (v883): progressive owner identity, no stale third-party state */
.smart-owner-self-state{display:none!important}
.smart-owner-primary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 11px;border:1px solid #dbe6ed;border-radius:12px;background:#f8fbfd;min-width:0}
.smart-owner-primary[hidden],.smart-owner-locked-summary[hidden]{display:none!important}
.smart-owner-primary-copy{display:grid;gap:2px;min-width:0}
.smart-owner-primary-copy>span,.smart-owner-locked-summary>div>span{font-size:10px;font-weight:800;color:#7c8c9a}
.smart-owner-primary-copy strong,.smart-owner-locked-summary strong{font-size:12px;font-weight:950;color:#183b57;overflow-wrap:anywhere}
.smart-owner-primary-copy strong b{color:#0d6548}
.smart-owner-primary-copy small,.smart-owner-locked-summary small{font-size:10px;font-weight:650;color:#8795a3;line-height:1.55}
.owner-other-check{display:inline-flex!important;align-items:center;gap:7px;flex:0 0 auto;margin:0!important;padding:7px 9px;border:1px solid #d8e2ea;border-radius:10px;background:#fff;color:#435b70;font-size:11px;font-weight:850;cursor:pointer;white-space:nowrap}
.owner-other-check input{width:16px!important;height:16px!important;min-height:0!important;margin:0!important;flex:none;accent-color:var(--theme-primary,#176a4b)}
.smart-owner-locked-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 11px;border:1px solid #cfe3d8;border-radius:12px;background:#f1f8f4}
.smart-owner-locked-summary>div{display:grid;gap:2px;min-width:0}
.smart-owner-lock-badge{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:3px 8px;border-radius:999px;background:#dff1e7;color:#16603d;font-size:10px;font-weight:900;white-space:nowrap}
.smart-owner-identity-head{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;padding-bottom:7px;border-bottom:1px solid #edf2f5}
.smart-owner-identity-head strong{font-size:11px;color:#29475f}.smart-owner-identity-head small{font-size:10px;color:#8795a3;font-weight:650}
.smart-financial-owner-details{padding:10px!important;background:#fcfdfd!important}
.smart-financial-owner-national-row{grid-template-columns:minmax(220px,1fr) auto minmax(240px,1fr)!important}
.smart-financial-owner-identity.is-locked .smart-financial-owner-details{display:none!important}
@media(max-width:760px){
  .smart-owner-primary{align-items:stretch;flex-direction:column;gap:8px}
  .owner-other-check{width:100%;justify-content:flex-start;white-space:normal}
  .smart-owner-locked-summary{align-items:flex-start}
  .smart-owner-identity-head{align-items:flex-start;flex-direction:column;gap:2px}
  .smart-financial-owner-national-row{grid-template-columns:1fr!important}
}

/* v890: bank field is immutable while a saved smart account is committed. */
.smart-bank.is-locked .bank-search,
.bank-search.is-smart-account-locked{
  cursor:not-allowed;
  background:color-mix(in srgb,var(--card,#fff) 91%,var(--primary,#0b6b47) 9%)!important;
  color:var(--text,#1f2937);
  border-color:color-mix(in srgb,var(--border,#cbd5e1) 75%,var(--primary,#0b6b47) 25%)!important;
}
.smart-bank.is-locked::after{
  content:'🔒';
  position:absolute;
  inset-inline-end:10px;
  top:50%;
  transform:translateY(-50%);
  pointer-events:none;
  font-size:.78rem;
  opacity:.7;
}


/* =========================================================
   v15.18 - Iranian plate editor: stable LTR entry flow
   Visual/input order: 2 digits -> Persian letter -> 3 digits -> 2 Iran digits.
   The plate always stays on one row; the country mark is decorative only.
   ========================================================= */
.car-modern .plate-panel{overflow:visible!important;}
.car-modern .plate-box.modern-plate{
  direction:ltr!important;
  width:100%!important;
  max-width:500px!important;
  min-width:0!important;
  margin:8px auto 10px!important;
  padding:10px!important;
  transform:none!important;
  display:grid!important;
  grid-template-columns:42px minmax(52px,.72fr) minmax(72px,.88fr) minmax(78px,1.08fr) minmax(92px,1.12fr)!important;
  gap:7px!important;
  align-items:stretch!important;
  overflow:visible!important;
  box-sizing:border-box!important;
  border:2px solid #263746!important;
  border-radius:14px!important;
  background:#fff!important;
}
.car-modern .plate-country-mark{
  min-width:0!important;
  min-height:56px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:9px!important;
  background:#0756a8!important;
  color:#fff!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}
.car-modern .plate-country-mark strong{
  font-family:Arial,sans-serif!important;
  font-size:14px!important;
  font-weight:900!important;
  line-height:1!important;
  letter-spacing:.2px!important;
  white-space:nowrap!important;
}
.car-modern .modern-plate .plate-in,
.car-modern .modern-plate .plate-letter-input{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:56px!important;
  min-height:56px!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:5px 7px!important;
  border:1px solid #cbd5e1!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#111827!important;
  text-align:center!important;
  font-size:24px!important;
  font-weight:900!important;
  line-height:1!important;
  direction:ltr!important;
}
.car-modern .modern-plate .plate-letter-input{
  direction:rtl!important;
  font-family:var(--app-font,Tahoma,Arial,sans-serif)!important;
}
.car-modern .modern-plate .plate-in:focus,
.car-modern .modern-plate .plate-letter-input:focus{
  outline:none!important;
  border-color:#0f6ca8!important;
  box-shadow:0 0 0 3px rgba(15,108,168,.13)!important;
}
.car-modern .modern-plate .plate-letter-input.invalid-plate-letter{
  border-color:#dc2626!important;
  background:#fff7f7!important;
}
.car-modern .plate-letter-picker{
  position:relative!important;
  min-width:0!important;
}
.car-modern .plate-letter-dropdown{
  display:none;
  position:absolute;
  z-index:1200;
  top:calc(100% + 6px);
  left:0;
  right:0;
  max-height:210px;
  overflow:auto;
  padding:5px;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#fff;
  box-shadow:0 16px 38px rgba(15,35,70,.18);
  direction:rtl;
}
.car-modern .plate-letter-picker.open .plate-letter-dropdown{display:block;}
.car-modern .plate-letter-option{
  width:100%;
  min-height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 0 3px;
  padding:6px 8px;
  border:0;
  border-radius:8px;
  background:#fff;
  color:#1f2937;
  font-family:var(--app-font,Tahoma,Arial,sans-serif);
  font-size:16px;
  font-weight:800;
  cursor:pointer;
}
.car-modern .plate-letter-option:last-child{margin-bottom:0;}
.car-modern .plate-letter-option:hover,
.car-modern .plate-letter-option.is-active{background:#eaf5ff;color:#0756a8;}
.car-modern .plate-national{
  min-width:0!important;
  height:56px!important;
  display:grid!important;
  grid-template-rows:15px minmax(0,1fr)!important;
  align-items:stretch!important;
  padding:3px 5px 5px!important;
  box-sizing:border-box!important;
  border:1px solid #cbd5e1!important;
  border-radius:10px!important;
  background:#fff!important;
  overflow:hidden!important;
}
.car-modern .plate-national>span{
  display:block!important;
  margin:0!important;
  padding:0!important;
  color:#334155!important;
  font-size:10px!important;
  font-weight:850!important;
  line-height:13px!important;
  text-align:center!important;
  white-space:nowrap!important;
  word-break:keep-all!important;
  overflow:hidden!important;
}
.car-modern .plate-national .plate-in{
  height:31px!important;
  min-height:31px!important;
  padding:0 3px!important;
  border:0!important;
  border-radius:6px!important;
  box-shadow:none!important;
  font-size:21px!important;
}
.car-modern .plate-national .plate-in:focus{
  background:#f7fbff!important;
  box-shadow:inset 0 0 0 2px rgba(15,108,168,.18)!important;
}
.car-modern .plate-hint{
  max-width:500px!important;
  margin:0 auto!important;
  line-height:1.8!important;
}

@media(max-width:560px){
  .car-modern .plate-box.modern-plate{
    grid-template-columns:34px minmax(43px,.72fr) minmax(55px,.88fr) minmax(60px,1.08fr) minmax(76px,1.12fr)!important;
    gap:4px!important;
    padding:7px 6px!important;
    border-radius:12px!important;
  }
  .car-modern .plate-country-mark{min-height:48px!important;border-radius:7px!important;}
  .car-modern .plate-country-mark strong{font-size:11px!important;}
  .car-modern .modern-plate .plate-in,
  .car-modern .modern-plate .plate-letter-input{
    height:48px!important;
    min-height:48px!important;
    padding:3px!important;
    border-radius:8px!important;
    font-size:19px!important;
  }
  .car-modern .plate-national{
    height:48px!important;
    grid-template-rows:13px minmax(0,1fr)!important;
    padding:2px 3px 3px!important;
    border-radius:8px!important;
  }
  .car-modern .plate-national>span{font-size:9px!important;line-height:11px!important;}
  .car-modern .plate-national .plate-in{
    height:28px!important;
    min-height:28px!important;
    font-size:18px!important;
  }
  .car-modern .plate-letter-dropdown{min-width:76px;left:50%;right:auto;transform:translateX(-50%);}
}
@media(max-width:360px){
  .car-modern .plate-box.modern-plate{
    grid-template-columns:29px minmax(38px,.7fr) minmax(48px,.85fr) minmax(53px,1fr) minmax(68px,1.08fr)!important;
    gap:3px!important;
    padding:6px 4px!important;
  }
  .car-modern .modern-plate .plate-in,
  .car-modern .modern-plate .plate-letter-input{font-size:17px!important;}
  .car-modern .plate-country-mark strong{font-size:9px!important;}
}


/* People form: citizenship-specific identity fields (cache v917) */
.person-modern-form .foreign-identity-field,
.person-modern-form .foreign-identity-hint{display:none!important}
.person-modern-form.is-foreign .foreign-identity-field{display:flex!important}
.person-modern-form.is-foreign .foreign-identity-hint{display:block!important}
.person-modern-form.is-foreign #iranianNationalField,
.person-modern-form.is-foreign #iranianIssueLocation{display:none!important}


/* Masked bank-origin identifiers: receipt may hide source card/IBAN/account. */
.smart-financial-number-wrap.has-masked-financial{padding-bottom:30px}
.smart-financial-number-wrap input.is-masked-financial{border-color:#d7a84d!important;background:#fffaf0!important;box-shadow:0 0 0 3px rgba(215,168,77,.10)!important}
.smart-financial-mask-note{position:absolute;right:0;left:0;bottom:2px;display:flex;align-items:center;gap:6px;font-size:11px;line-height:1.6;color:#7a5710;font-weight:700;white-space:normal}
.smart-financial-mask-note[hidden]{display:none!important}
.smart-financial-mask-note::before{content:'◐';display:inline-grid;place-items:center;flex:0 0 18px;width:18px;height:18px;border-radius:999px;background:#fff1c8;color:#8a6400;font-size:10px}
@media(max-width:760px){.smart-financial-number-wrap.has-masked-financial{padding-bottom:42px}.smart-financial-mask-note{font-size:10px}}


/* v931: smart financial owner layout + reliable national-unavailable checkbox */
.smart-financial-owner-details{min-width:0!important;overflow:visible!important}
.smart-financial-owner-national-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(150px,auto)!important;
  grid-template-areas:"national unavailable" "status status"!important;
  gap:9px!important;
  align-items:end!important;
  min-width:0!important;
}
.smart-owner-national-field{grid-area:national;min-width:0!important}
.owner-national-unavailable-check{
  grid-area:unavailable;
  position:relative!important;
  z-index:3!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:42px!important;
  margin:0!important;
  padding:8px 10px!important;
  white-space:normal!important;
  line-height:1.55!important;
  cursor:pointer!important;
  user-select:none!important;
  pointer-events:auto!important;
}
.owner-national-unavailable-check input[type=checkbox]{
  position:relative!important;
  z-index:4!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  margin:0!important;
  padding:0!important;
  flex:0 0 18px!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  accent-color:var(--theme-primary,#176a4b)!important;
}
.smart-financial-owner-status{grid-area:status;min-width:0!important;width:100%!important;overflow-wrap:anywhere!important}
.smart-financial-owner-profile{grid-template-columns:repeat(2,minmax(0,1fr))!important;min-width:0!important}
.smart-financial-owner-profile>label{min-width:0!important}
.smart-financial-owner-profile input,.smart-owner-national-field input{min-width:0!important;max-width:100%!important}
@media(max-width:760px){
  .smart-financial-owner-national-row{grid-template-columns:1fr!important;grid-template-areas:"national" "unavailable" "status"!important}
  .owner-national-unavailable-check{width:100%!important}
}
@media(max-width:520px){
  .smart-financial-owner-profile{grid-template-columns:1fr!important}
}

/* AutoSadra 972 — smart dropdown stacking guard.
   Keep searchable form lists above neighbouring fields/cards. Vertical clipping
   by overflow containers is handled centrally in app.js by flipping the menu. */
:where(.smart-person,.smart-id-person,.generic-smart-box,.smart-vehicle,
       .smart-check-picker,.smart-id-cashbox,.smart-bank,.smart-bank-picker,
       .smart-color-picker,.smart-province,.smart-city,.smart-location,
       .issue-location-picker,.smart-category-filter,.deposit-person-smart,
       .plate-letter-picker,.vcp-third-person):where(.open,.is-open,:focus-within){
  z-index:100000!important;
}
:where(.person-dropdown,.person-id-dropdown,.generic-smart-dropdown,.vehicle-dropdown,
       .check-dropdown,.cashbox-id-dropdown,.bank-dropdown,.smart-bank-dropdown,
       .color-dropdown,.province-dropdown,.city-dropdown,.location-dropdown,
       .category-filter-dropdown,.plate-letter-dropdown,.vcp-third-dropdown){
  z-index:100001!important;
}

/* v977: car record-only workflow + stable validation layout */
.car-modern .plate-required-error{
  display:none;
  max-width:500px;
  margin:2px auto 6px;
  color:#b42318;
  font-size:12px;
  font-weight:800;
  line-height:1.7;
  text-align:right;
}
.car-modern .modern-plate .invalid-smart{
  border-color:#dc2626!important;
  background:#fff7f7!important;
}
.car-modern .car-record-state-note{
  min-height:72px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  padding:10px 12px;
  border:1px solid #dbe5ef;
  border-radius:12px;
  background:#f8fbfd;
}
.car-modern .car-record-state-note small{color:#64748b;font-size:11px;font-weight:700}
.car-modern .car-record-state-note b{color:#17324d;font-size:14px}
.car-modern .car-record-state-note span{color:#64748b;font-size:11px;line-height:1.7}
.car-modern .vehicle-identity-input{text-transform:uppercase;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.4px}
.car-record-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}
.car-record-summary>div{padding:11px 12px;border:1px solid #dbe5ef;border-radius:12px;background:#f8fbfd;min-width:0}
.car-record-summary small{display:block;color:#64748b;font-size:10px;margin-bottom:4px}
.car-record-summary b{display:block;color:#17324d;white-space:normal;overflow-wrap:anywhere}
.car-primary-operations{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
@media(max-width:760px){.car-record-summary{grid-template-columns:1fr 1fr}.car-primary-operations .btn{flex:1 1 100%;text-align:center}}

/* v977: ownership is workflow-controlled; linked owners stay read-only on vehicle edit. */
.owner-locked-field{display:flex;flex-direction:column;gap:6px}
.owner-locked-field>input[readonly]{background:var(--surface-soft,#f8fafc);border-style:dashed;cursor:not-allowed;font-weight:800}
.owner-locked-field .smart-hint{line-height:1.8}
