/* בקרת תעודות - אספלט אלפא. שפה של אפליקציית בנק: מרווח, כרטיסים לבנים, פונט גדול. */

:root {
  --bs-font-sans-serif: "Rubik", system-ui, sans-serif;
  --bs-body-font-size: 1rem;
  --bs-body-color: #0f172a;
  --bs-body-bg: #f3f5f7;
  --brand: #12805f;
  --brand-2: #1a9a73;
  --brand-tint: #e3f3ec;
  --ink: #0f172a;
  --mute: #64748b;
  --line: #e6ebe9;
  --ok: #12805f; --ok-bg: #e3f3ec;
  --warn: #b7791f; --warn-bg: #fff4dc;
  --bad: #c62828; --bad-bg: #fdeaea;
  --off: #64748b; --off-bg: #eef1f4;
  --r: 18px;
  --shadow: 0 2px 6px rgba(15,23,42,.05), 0 10px 24px rgba(15,23,42,.07);
}

body { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.btn-primary, .btn-success { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-2); --bs-btn-hover-border-color: var(--brand-2); --bs-btn-active-bg: var(--brand-2); }
.btn { border-radius: 999px; font-weight: 500; padding: .6rem 1.25rem; }
.btn-sm { padding: .4rem 1rem; font-size: .9375rem; }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-light:hover { background: #f6f8f7; border-color: #cbd5e1; color: var(--ink); }
.form-control { border-radius: 999px; padding: .6rem 1.1rem; border-color: var(--line); background: #fff; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(18,128,95,.15); }

/* ---------- ראש ירוק ---------- */
/* כותרת לבנה ושקטה; הירוק נשאר לפעולות ולסטטוסים בלבד */
.hero { background: #fff; color: var(--ink); padding: .9rem 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.hero .brand { font-weight: 600; font-size: 1.3rem; letter-spacing: -.01em; color: var(--ink); }
.hero .brand b { font-weight: 300; color: var(--brand); }
.hero .chip { color: var(--warn); font-size: .875rem; background: var(--warn-bg); border-radius: 999px; padding: .3rem .8rem; }

/* ---------- כרטיס הסיכום ---------- */
.overview { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 1.5rem 1.75rem; margin-top: 1.5rem; }
.overview .eyebrow { color: var(--mute); font-size: .95rem; }
.overview .big { font-size: 2.4rem; font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
.overview .big b { color: var(--brand); font-weight: 600; }
.overview .sub { color: var(--mute); margin-top: .35rem; font-size: 1.05rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1.25rem; }
.stat { background: #f6f8f7; border-radius: 14px; padding: .9rem 1rem; }
.stat .n { font-size: 1.5rem; font-weight: 500; line-height: 1.1; }
.stat .l { color: var(--mute); font-size: .9rem; margin-top: .2rem; }
.stat--warn .n { color: var(--warn); } .stat--bad .n { color: var(--bad); } .stat--ok .n { color: var(--brand); }
.overview .alert { border-radius: 14px; }

/* ---------- מסננים ---------- */
.seg { display: inline-flex; background: #fff; border-radius: 999px; padding: .3rem; box-shadow: var(--shadow); gap: .2rem; }
.seg a { border-radius: 999px; padding: .5rem 1.1rem; color: var(--mute); text-decoration: none; font-weight: 500; white-space: nowrap; }
.seg a.active { background: var(--ink); color: #fff; }
.seg .badge { background: rgba(0,0,0,.07); color: inherit; font-weight: 500; margin-inline-start: .4rem; }
.seg a.active .badge { background: rgba(255,255,255,.22); }

/* ---------- רשימת תעודות ---------- */
.day { color: var(--mute); font-weight: 500; font-size: .95rem; margin: 1.5rem .25rem .6rem; }
.item { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1rem; background: #fff; border-radius: 16px; padding: .9rem 1.1rem; margin-bottom: .6rem; box-shadow: 0 1px 3px rgba(15,23,42,.05); cursor: pointer; transition: transform .12s, box-shadow .12s; border: 2px solid transparent; }
.item:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.item.is-open { border-color: var(--brand); }
.item.is-sel { background: var(--brand-tint); }
.item .check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #cbd5e1; display: grid; place-items: center; color: #fff; font-size: .8rem; }
.item.is-sel .check { background: var(--brand); border-color: var(--brand); }
.item .title { font-weight: 500; font-size: 1.1rem; }
.item .meta { color: var(--mute); font-size: .95rem; margin-top: .1rem; }
.item .kg { text-align: left; direction: ltr; }
.item .kg .v { font-size: 1.2rem; font-weight: 500; }
.item .kg .d { font-size: .85rem; color: var(--mute); }
.item .kg .d.bad { color: var(--bad); font-weight: 500; }
.chip-s { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .35rem .8rem; font-size: .9rem; font-weight: 500; white-space: nowrap; }
.chip-s::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip-s.approved { background: var(--ok-bg); color: var(--ok); }
.chip-s.check { background: var(--warn-bg); color: var(--warn); }
.chip-s.nomatch { background: var(--bad-bg); color: var(--bad); }
.chip-s.rejected { background: var(--off-bg); color: var(--off); }
.tag-manual { font-size: .75rem; color: var(--mute); border: 1px solid var(--line); border-radius: 6px; padding: .05rem .35rem; margin-inline-start: .4rem; }
.plus { font-size: .75rem; color: var(--brand); background: var(--brand-tint); border-radius: 6px; padding: .05rem .35rem; margin-inline-start: .3rem; }

.empty-state { background: #fff; border-radius: var(--r); padding: 3rem 1rem; text-align: center; color: var(--mute); box-shadow: var(--shadow); font-size: 1.05rem; }
.missing-card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 1.25rem 1.5rem; margin-top: 2rem; }
.missing-card .row-m { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.missing-card .row-m:last-child { border-bottom: 0; }

/* ---------- מגירה, מודאל ---------- */
.offcanvas { border-radius: var(--r) 0 0 var(--r); }
.offcanvas-body { padding: 1.25rem 1.5rem; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.kv .k { color: var(--mute); }
.kv .v { text-align: left; }
.kv.is-diff { background: var(--warn-bg); margin: 0 -1.5rem; padding-inline: 1.5rem; border-radius: 0; }
.kv .v small { display: block; color: var(--mute); font-size: .8rem; }
.scan { display: block; background: #f1f4f3; border-radius: 14px; padding: .75rem; cursor: zoom-in; text-align: center; margin-bottom: 1rem; }
.scan img { max-height: 220px; max-width: 100%; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.decide { background: #f6f8f7; border-radius: 14px; padding: 1rem; margin-top: 1rem; }
.modal-content { border-radius: var(--r); border: 0; box-shadow: var(--shadow); }
.dropzone { display: block; border: 2px dashed #cbd5e1; border-radius: 14px; padding: 2.25rem 1rem; text-align: center; cursor: pointer; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-tint); }
.toast { border-radius: 12px; }
@media (max-width: 720px) { .item { grid-template-columns: auto 1fr auto; } .item .chip-s { display: none; } .stats { grid-template-columns: 1fr 1fr 1fr; } .overview .big { font-size: 1.8rem; } }

/* ---------- ארכיון ---------- */
.month-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: .6rem; overflow: hidden; }
.month { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; cursor: pointer; list-style: none; font-weight: 500; font-size: 1.05rem; }
.month::-webkit-details-marker { display: none; }
.month .chev { width: 8px; height: 8px; border-inline-end: 2px solid var(--mute); border-bottom: 2px solid var(--mute); transform: rotate(-45deg); transition: transform .15s; }
.month-box[open] .month .chev { transform: rotate(45deg); }
.month .l { flex: 1; }
.month .s { color: var(--mute); font-weight: 400; font-size: .9rem; }
.month-body { padding: 0 .6rem .6rem; }
.hist { display: block; background: #f6f8f7; border-radius: 14px; padding: .8rem 1rem; margin-bottom: .5rem; cursor: pointer; border: 2px solid transparent; color: inherit; text-decoration: none; }
.hist:hover { color: inherit; }
#archive-bar:not([hidden]) { border-radius: 14px; margin-top: 1.5rem !important; }
#archive-bar:not([hidden]) + .overview { margin-top: 1rem; }
.hist:hover { border-color: var(--brand); }
.hist .t { font-weight: 500; }
.hist .m { color: var(--mute); font-size: .9rem; }
.hist .c { display: flex; gap: .75rem; font-size: .9rem; margin-top: .3rem; }
.hist .c { align-items: center; }
.hist .del { margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--mute); font: inherit; font-size: .8rem; padding: .1rem .6rem; cursor: pointer; }
.hist .del:hover { color: var(--bad); border-color: var(--bad); }

/* ---------- לוגו ---------- */
.hero .brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.hero .brand .logo { height: 46px; width: auto; display: block; }

/* ---------- דף הבית: רשימת כל הבקרות ---------- */
.view-hidden { display: none !important; }
#home-view { margin-top: 1.5rem; }
.hv-head { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 1.25rem 1.75rem; display: flex; justify-content: flex-start; align-items: center; gap: 1.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.hv-head > div { flex: 1 1 auto; }
.hv-head .btn { order: -1; }
.hv-title { font-size: 1.7rem; font-weight: 500; letter-spacing: -.01em; }
.hv-sub { color: var(--mute); margin-top: .2rem; }
.progress-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--brand-tint); border: 2px solid var(--brand); border-radius: 16px; padding: 1rem 1.5rem; margin-bottom: 1rem; cursor: pointer; color: inherit; text-decoration: none; }
.progress-card .t { font-weight: 500; font-size: 1.15rem; }
.progress-card .m { color: var(--mute); margin-top: .15rem; }
#home-view .month-box { background: #fff; box-shadow: var(--shadow); border: 0; margin-bottom: .9rem; }
#home-view .month { padding: 1rem 1.5rem; font-size: 1.15rem; }
#home-view .month-body { padding: 0 1rem 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: .75rem; }
#home-view .hist { margin: 0; }

/* ---------- מראה נקי ומאופק: קווים דקים במקום צללים, רווח נדיב, ירוק רק לפעולה ולסטטוס ---------- */
:root { --bs-body-bg: #f7f8fa; --line: #e7eaee; --shadow: 0 1px 2px rgba(15,23,42,.04); }
.hero { padding: 1.1rem 0; }
.hero .brand .logo { height: 50px; }
.overview, .hv-head, .missing-card, .empty-state, #home-view .month-box { box-shadow: var(--shadow); border: 1px solid var(--line); }
.overview { padding: 2rem 2.25rem; }
.overview .big { font-size: 2.2rem; font-weight: 500; }
.stat { background: transparent; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; }
.stat .n { font-size: 1.6rem; }
.seg { box-shadow: none; border: 1px solid var(--line); }
.seg a.active { background: var(--ink); }
.form-control { border-color: var(--line); }
.item { box-shadow: none; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.25rem; margin-bottom: .5rem; transition: border-color .12s, background .12s; }
.item:hover { transform: none; box-shadow: none; border-color: #cfd6de; background: #fcfcfd; }
.item.is-open { border-color: var(--brand); }
.day { font-size: .9rem; letter-spacing: .01em; margin: 1.75rem .25rem .6rem; }
.hv-head { padding: 1.5rem 2.25rem; gap: 1.75rem; }
.hv-title { font-size: 1.8rem; }
.hv-head .btn { padding: .7rem 1.5rem; }
.progress-card { background: #fff; border: 1px solid var(--line); border-inline-start: 4px solid var(--brand); border-radius: 14px; padding: 1.1rem 1.5rem; }
.progress-card .t { font-size: 1.1rem; }
#home-view .month-box { border-radius: var(--r); margin-bottom: 1rem; }
#home-view .month { padding: 1.1rem 1.75rem; }
#home-view .month .s { font-size: .9rem; }
#home-view .month-body { display: block; padding: 0 .75rem .5rem; }
#home-view .hist { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 1rem 1rem; margin: 0; display: block; }
#home-view .hist:hover { background: #fafbfc; border-color: var(--line); }
#home-view .hist .t { font-size: 1.05rem; }
#home-view .hist .c { grid-column: 1 / -1; margin-top: .35rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); }
.chip-s { font-size: .85rem; padding: .3rem .75rem; }
.offcanvas { box-shadow: -8px 0 30px rgba(15,23,42,.08); }

/* ---------- קצת חיים: פס מותג, רקע עם נגיעה, אייקונים, צבע לפי סטטוס, תנועה עדינה ---------- */
html { background: var(--bs-body-bg); }
body { min-height: 100vh; background-attachment: fixed; background: radial-gradient(900px 340px at 85% -80px, rgba(18,128,95,.13), transparent 70%), radial-gradient(700px 300px at 5% 10%, rgba(18,128,95,.05), transparent 70%), var(--bs-body-bg); }
.hero { border-top: 4px solid var(--brand); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(8px); }
.btn svg { margin-inline-end: .45rem; vertical-align: -3px; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1.05rem; box-shadow: 0 6px 18px rgba(18,128,95,.28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(18,128,95,.34); }
.btn { transition: transform .12s, box-shadow .12s, background .12s; }
.stat--ok { background: var(--ok-bg); border-color: transparent; }
.stat--warn { background: var(--warn-bg); border-color: transparent; }
.stat--bad { background: var(--bad-bg); border-color: transparent; }
.stat { transition: transform .12s; }
.stat:hover { transform: translateY(-2px); }
.item { border-inline-start: 4px solid transparent; }
.item:has(.chip-s.approved) { border-inline-start-color: var(--ok); }
.item:has(.chip-s.check) { border-inline-start-color: var(--warn); }
.item:has(.chip-s.nomatch) { border-inline-start-color: var(--bad); }
.item:has(.chip-s.rejected) { border-inline-start-color: var(--off); }
.item:hover { transform: translateX(-2px); box-shadow: 0 6px 18px rgba(15,23,42,.06); }
.day { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .9rem; color: var(--ink); }
.month .folder { color: var(--brand); display: inline-flex; }
#home-view .month-box:hover { border-color: #cfd6de; }
#home-view .hist .t::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); margin-inline-end: .5rem; vertical-align: 1px; }
.progress-card { background: linear-gradient(90deg, #fff, var(--brand-tint)); }
.hv-head { background: linear-gradient(135deg, #fff 60%, #f1f8f4); }
.empty-state .road { height: 6px; width: 160px; margin: 0 auto 1.25rem; border-radius: 999px; background: repeating-linear-gradient(90deg, var(--brand) 0 22px, transparent 22px 34px); opacity: .5; }
.seg a.active { background: var(--brand); }
.chip-s.approved { background: #dff3e8; }

/* ---------- לוגו גדול במרכז הכותרת, הכפתורים משמאל ---------- */
.hero-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.hero-grid .brand { justify-self: center; }
.hero .brand .logo { height: 78px; }
.hero { padding: .6rem 0; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; justify-items: center; } .hero-grid > span:first-child { display: none; } .hero .brand .logo { height: 60px; } }

/* ---------- תנועה מתמדת ועדינה: כתמי צבע שנעים ברקע, דופק על בקרה בתהליך, כביש זז בזמן העלאה ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.ambient .b1 { width: 520px; height: 520px; inset-inline-end: -140px; top: -180px; background: rgba(18,128,95,.16); animation: drift1 26s ease-in-out infinite alternate; }
.ambient .b2 { width: 420px; height: 420px; inset-inline-start: -160px; bottom: -160px; background: rgba(35,166,124,.10); animation: drift2 32s ease-in-out infinite alternate; }
@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-120px, 90px) scale(1.15); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1); } to { transform: translate(140px, -110px) scale(1.1); } }
.progress-card .t::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-inline-end: .5rem; vertical-align: 1px; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(18,128,95,.45); } 50% { box-shadow: 0 0 0 9px rgba(18,128,95,0); } }
.progress { background: #e6ebe9; }
.progress .progress-bar { background: repeating-linear-gradient(90deg, var(--brand) 0 26px, #1a9a73 26px 40px); background-size: 40px 8px; animation: road 1.1s linear infinite; }
@keyframes road { from { background-position: 0 0; } to { background-position: 40px 0; } }
.hero { border-top-color: transparent; background-image: linear-gradient(90deg, #0f6e52, #23a67c, #0f6e52); background-size: 200% 4px; background-repeat: no-repeat; background-position: 0 0; animation: stripe 9s linear infinite; }
@keyframes stripe { from { background-position: 0 0; } to { background-position: 200% 0; } }
.btn-lg { animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { box-shadow: 0 6px 18px rgba(18,128,95,.28); } 50% { box-shadow: 0 10px 26px rgba(18,128,95,.42); } }
@media (prefers-reduced-motion: reduce) { .ambient span, .progress-card .t::before, .hero, .btn-lg, .progress .progress-bar { animation: none; } }

/* בלי פס ירוק בראש הדף */
.hero { border-top: 0; background-image: none; animation: none; }

/* הפס הירוק העליון נשאר, בלי תנועה */
.hero { animation: none; background-image: linear-gradient(90deg, var(--brand), var(--brand)); background-size: 100% 4px; }

/* ---------- שעון גדול משמאל, כפתורים מימין, לוגו במרכז ---------- */
.hero-grid { grid-template-columns: 1fr auto 1fr; }
.hero-actions { grid-column: 1; grid-row: 1; }
.hero-grid .brand { grid-column: 2; grid-row: 1; }
.clock { grid-column: 3; grid-row: 1; justify-self: end; text-align: left; direction: ltr; line-height: 1.1; }
.clock .time { font-size: 2.6rem; font-weight: 600; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.clock .date { direction: rtl; text-align: left; color: var(--mute); font-size: .95rem; margin-top: .15rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr 1fr; } .hero-grid .brand { grid-column: 1 / -1; grid-row: 1; } .hero-actions { grid-column: 1; grid-row: 2; } .clock { grid-column: 2; grid-row: 2; } .clock .time { font-size: 1.8rem; } }

/* שעון קטן יותר, צמוד לקצה השמאלי של המסך */
.hero .container { position: relative; }
.clock { position: absolute; left: 0; top: 50%; transform: translateY(-50%); justify-self: unset; }
.clock .time { font-size: 1.7rem; }
.clock .date { font-size: .82rem; }
@media (max-width: 900px) { .clock { position: static; transform: none; } }

/* השעון צמוד לקצה השמאלי של המסך, לא של אזור התוכן */
.hero { position: sticky; }
.hero .container { position: static; }
.clock { position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%); }
.clock .date { direction: ltr; text-align: left; font-size: .95rem; letter-spacing: .02em; }
@media (max-width: 900px) { .clock { position: static; transform: none; } }

/* יום בשבוע לצד התאריך */
.clock .date { direction: rtl; display: flex; gap: .5rem; align-items: baseline; }
.clock .date .dt { direction: ltr; unicode-bidi: isolate; }

/* ---------- שעון: בלוק מסודר, שתי שורות באותו יישור ---------- */
.clock { direction: rtl; text-align: right; background: #f6f8f7; border: 1px solid var(--line); border-radius: 14px; padding: .45rem .9rem .5rem; min-width: 168px; }
.clock .time { font-size: 1.9rem; font-weight: 600; line-height: 1; color: var(--ink); direction: ltr; text-align: right; }
.clock .date { display: flex; justify-content: flex-start; align-items: baseline; gap: .45rem; margin-top: .3rem; font-size: .95rem; color: var(--ink); }
.clock .date .dow { font-weight: 500; }
.clock .date .sep { color: #b6bec7; }
.clock .date .dt { color: var(--mute); direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

/* ---------- שעון: שלוש שורות, בלי קופסה, הכל מיושר לשמאל ---------- */
.clock { background: none; border: 0; padding: 0; min-width: 0; direction: ltr; text-align: left; }
.clock .time { font-size: 2rem; font-weight: 600; line-height: 1; text-align: left; }
.clock .date { display: block; margin-top: .25rem; text-align: left; }
.clock .date .dow { display: block; direction: rtl; text-align: left; font-weight: 500; color: var(--ink); font-size: .95rem; line-height: 1.25; }
.clock .date .dt { display: block; direction: ltr; text-align: left; color: var(--mute); font-size: .9rem; line-height: 1.25; }

/* שלוש שורות השעון ממורכזות זו מעל זו */
.clock { text-align: center; }
.clock .time, .clock .date, .clock .date .dow, .clock .date .dt { text-align: center; }

/* ---------- רשימת בקרות: שורות צפופות וקריאות, מתאים ל-30+ בחודש ---------- */
.hist-tools { margin: 0 0 .9rem; }
.hist-tools .form-control { max-width: 360px; background: #fff; }
#home-view .month { display: grid; grid-template-columns: auto auto 1fr 220px; align-items: center; gap: 1rem; padding: 1.1rem 1.5rem; }
#home-view .month .l { font-size: 1.2rem; font-weight: 600; }
.mstats { display: flex; gap: 1.1rem; color: var(--mute); font-size: .92rem; font-weight: 400; }
.mstats b { color: var(--ink); font-weight: 600; }
.mstats .bad, .mstats .bad b { color: var(--bad); }
.mstats .ok { color: var(--ok); }
.mbar .sbar { height: 8px; }
.sbar { display: flex; width: 100%; height: 6px; border-radius: 999px; overflow: hidden; background: #edf0f2; gap: 2px; }
.sbar span { display: block; height: 100%; }
.sbar .s-approved { background: var(--ok); } .sbar .s-check { background: #e0a326; } .sbar .s-nomatch { background: var(--bad); } .sbar .s-rejected { background: #9aa5b1; }
#home-view .month-body { display: block; padding: 0 .5rem .5rem; }
.hhead, .hrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) 90px 220px 110px 40px; align-items: center; gap: 1rem; }
.hhead { padding: .5rem 1rem; color: var(--mute); font-size: .8rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 .5rem; }
.hrow { padding: .75rem 1rem; border-radius: 12px; color: inherit; text-decoration: none; cursor: pointer; transition: background .12s; }
.hrow + .hrow { border-top: 1px solid #f0f2f4; }
.hrow:hover { background: #f7faf8; }
.hrow .when { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 12px; background: #f3f6f5; line-height: 1; }
.hrow .when b { font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.hrow .when small { font-size: .75rem; color: var(--mute); margin-top: .2rem; }
.hrow .main { display: flex; flex-direction: column; min-width: 0; }
.hrow .t { font-weight: 600; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow .m { color: var(--mute); font-size: .85rem; margin-top: .15rem; }
.hrow .num { display: flex; flex-direction: column; line-height: 1.1; }
.hrow .num b { font-size: 1.1rem; font-weight: 600; }
.hrow .num small { color: var(--mute); font-size: .78rem; }
.hrow .stat-col { display: flex; flex-direction: column; gap: .35rem; }
.hrow .legend { font-size: .8rem; color: var(--mute); }
.hrow .legend .ok { color: var(--ok); } .hrow .legend .bad { color: var(--bad); }
.pill { display: inline-block; border-radius: 999px; padding: .25rem .7rem; font-size: .8rem; font-weight: 500; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.hrow .del { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: #a0a9b3; display: grid; place-items: center; opacity: 0; transition: opacity .12s, background .12s, color .12s; }
.hrow:hover .del, .hrow .del:focus { opacity: 1; }
.hrow .del:hover { background: var(--bad-bg); color: var(--bad); }
@media (max-width: 900px) {
  .hhead { display: none; }
  .hrow { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .hrow .num, .hrow .stat-col { display: none; }
  .hrow .del { opacity: 1; grid-column: 3; }
  .hrow .state { grid-column: 2; }
  #home-view .month { grid-template-columns: auto 1fr; }
  .mbar { grid-column: 1 / -1; }
}
.hrow { padding: .55rem 1rem; }
.hrow .when { width: 46px; height: 46px; }

/* ---------- פס בקרה שמורה: ירוק בהיר של המערכת, חזרה כאייקון מימין ---------- */
.archive-bar { display: flex; align-items: center; gap: .75rem; background: var(--brand-tint); border: 1px solid #cfe8dc; border-radius: 14px; padding: .6rem 1rem; margin-top: 1.5rem; color: var(--ink); }
.archive-bar[hidden] { display: none !important; }
.archive-bar .back-btn { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; border: 1px solid #cfe8dc; background: #fff; color: var(--brand); display: grid; place-items: center; cursor: pointer; transition: background .12s, transform .12s; }
.archive-bar .back-btn:hover { background: var(--brand); color: #fff; transform: translateX(2px); }
.archive-bar .ab-icon { color: var(--brand); display: inline-flex; }
#archive-label { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
#archive-label .ab-k { color: var(--brand); font-size: .85rem; font-weight: 500; }
#archive-label b { font-weight: 600; }
#archive-label .ab-d { color: var(--mute); font-size: .9rem; direction: ltr; unicode-bidi: isolate; }
.archive-bar + .overview { margin-top: 1rem; }

/* תיבת בחירה רק לתעודות שדורשות טיפול; לשאר מקום ריק צר לשמירת היישור */
.item .check-slot { width: 0; }

/* כותרת חודש: שם, מספר בקרות, ואדום רק כשיש מה לטפל */
#home-view .month { grid-template-columns: auto auto 1fr; }

/* ייצוא לאקסל בתוך כרטיס התוצאות, בפינה השמאלית העליונה */
.overview { position: relative; }
.ov-export { position: absolute; top: 1.5rem; left: 1.75rem; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 500; font-size: .92rem; text-decoration: none; transition: border-color .12s, color .12s, background .12s; }
.ov-export:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
@media (max-width: 720px) { .ov-export { position: static; margin-top: 1rem; } }



/* ---------- שורת הבקרה צמודה מתחת לכותרת ---------- */
.archive-bar { position: sticky; top: calc(var(--hero-h, 96px) + .5rem); z-index: 15; transition: padding .15s, box-shadow .15s, background .15s; }
.archive-bar.is-stuck { padding-block: .35rem; box-shadow: 0 6px 18px rgba(15,23,42,.08); background: rgba(227,243,236,.96); backdrop-filter: blur(6px); }
.archive-bar.is-stuck .back-btn { width: 32px; height: 32px; flex-basis: 32px; }
.archive-bar.is-live { background: #fff; border-color: var(--line); }
.archive-bar.is-live.is-stuck { background: rgba(255,255,255,.96); }
.archive-bar.is-live .ab-k { color: #b7791f; }
#archive-label { flex: 1 1 auto; }
.bar-finish { display: inline-flex; align-items: center; gap: .4rem; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 500; padding: .45rem 1rem; cursor: pointer; white-space: nowrap; }
.bar-finish:hover { background: var(--brand-2); }
.bar-finish[hidden] { display: none !important; }
.archive-bar { top: var(--hero-h, 96px); }
.archive-bar.is-stuck { box-shadow: 0 -12px 0 var(--bs-body-bg), 0 6px 18px rgba(15,23,42,.08); }
#archive-label .ab-n { color: var(--mute); font-size: .9rem; }

/* ---------- מגירת תעודה: פסיקה, נימוק, תשלום, פרטים ---------- */
.dv-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.dv-kg { font-size: 1.35rem; font-weight: 600; direction: ltr; }
.verdict-chip { display: inline-flex; align-items: center; gap: .45rem; border-radius: 999px; padding: .35rem .9rem; font-weight: 600; font-size: .95rem; }
.verdict-chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.vc-approved { background: var(--ok-bg); color: var(--ok); } .vc-check { background: var(--warn-bg); color: var(--warn); }
.vc-nomatch { background: var(--bad-bg); color: var(--bad); } .vc-rejected { background: var(--off-bg); color: var(--off); }
.checks { list-style: none; padding: 0; margin: 0 0 1.1rem; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ck { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem .9rem; }
.ck + .ck { border-top: 1px solid var(--line); }
.ck-i { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.ck-ok .ck-i { background: var(--ok-bg); color: var(--ok); }
.ck-bad { background: #fff7f7; } .ck-bad .ck-i { background: var(--bad-bg); color: var(--bad); } .ck-bad .ck-t { color: var(--bad); }
.ck-warn .ck-i { background: var(--warn-bg); color: var(--warn); }
.ck-t { display: flex; flex-direction: column; font-weight: 500; }
.ck-t small { color: var(--mute); font-weight: 400; font-size: .85rem; margin-top: .1rem; }
.ck-bad .ck-t small { color: #9b3a3a; }
.pay { background: #f6f8f7; border-radius: 14px; padding: .9rem 1rem; margin-bottom: 1.1rem; }
.pay-h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; }
.pay-h b { font-size: 1.35rem; font-weight: 600; color: var(--ink); }
.pay-l { display: grid; grid-template-columns: 1fr auto auto; gap: .75rem; font-size: .85rem; color: var(--mute); margin-top: .35rem; }
.pay-l span:last-child { min-width: 70px; text-align: left; color: var(--ink); }
.more { border-top: 1px solid var(--line); margin-top: .5rem; }
.more summary { cursor: pointer; padding: .8rem 0; color: var(--mute); font-weight: 500; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "‹"; display: inline-block; margin-inline-end: .5rem; transition: transform .15s; }
.more[open] summary::before { transform: rotate(-90deg); }
.dv-kg { direction: rtl; }

/* הסבר תהליך במצב ריק */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 auto; max-width: 560px; text-align: right; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: .1rem .85rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps li::before { content: counter(s); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); font-weight: 600; display: grid; place-items: center; }
.steps b { color: var(--ink); font-weight: 600; }
.steps span { color: var(--mute); font-size: .92rem; }

/* ---------- שלושה סטטוסים ---------- */
:root { --misc: #b7791f; --misc-bg: #fff4dc; }
.chip-s.misc, .vc-misc { background: var(--misc-bg); color: var(--misc); }
.chip-s.nomatch, .vc-nomatch { background: var(--bad-bg); color: var(--bad); }
.item { grid-template-columns: 1fr auto auto; }
.item:has(.chip-s.misc) { border-inline-start-color: var(--misc); }

/* ---------- רשימת בקרות: שורה נקייה עם תגיות ספירה ---------- */
.hhead { display: none; }
.hrow { grid-template-columns: 56px minmax(0, 1fr) auto 20px; }
.hrow .tags { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.ctag { border-radius: 999px; padding: .25rem .7rem; font-size: .85rem; white-space: nowrap; }
.ctag b { font-weight: 600; }
.ctag-approved { background: var(--ok-bg); color: var(--ok); }
.ctag-misc { background: var(--misc-bg); color: var(--misc); }
.ctag-nomatch { background: var(--bad-bg); color: var(--bad); }
.ctag-rejected { background: var(--off-bg); color: var(--off); }
.hrow .go { color: #b6bec7; font-size: 1.4rem; line-height: 1; }
.hrow:hover .go { color: var(--brand); }
#home-view .month { grid-template-columns: auto auto 1fr; }
.bar-delete { border: 0; background: none; color: var(--mute); font-size: .88rem; padding: .3rem .6rem; border-radius: 8px; }
.bar-delete:hover { color: var(--bad); background: var(--bad-bg); }
.bar-delete[hidden] { display: none !important; }
@media (max-width: 900px) { .hrow { grid-template-columns: 48px minmax(0, 1fr); } .hrow .tags { grid-column: 2; justify-content: flex-start; } .hrow .go { display: none; } }

/* חיפוש בבקרות */
.hist-tools .form-control { max-width: 520px; }
.hitcount { color: var(--brand); font-weight: 500; }
.search-empty { color: var(--mute); padding: 1.25rem .25rem; }
.search-empty[hidden] { display: none !important; }
/* כותרת דף הבקרות */
.hv-title { font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; }
.hv-sub { font-size: .95rem; color: var(--mute); margin-top: .25rem; }

/* ארבעה ריבועי סיכום; כפתור האקסל בשורה משלו, לא מעל ההתראה */
.stats { grid-template-columns: repeat(4, 1fr); }
.stat--off { background: transparent; }
.overview { display: flex; flex-direction: column; }
.ov-export { position: static; order: -1; align-self: flex-end; margin-bottom: .75rem; }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr 1fr; } }
