/* קטוף: צבעי המותג ורכיבים של המסכים המיוחדים */
:root { --k-green: #08673A; --k-lime: #8CC63F; --k-yellow: #F4BF19; }
:root, [data-theme="clean-pro"] { --bg: #F3F6F1; --surface-2: #EEF3EA; --hero: #08673A; --on-hero: #FFFFFF; --line: #E1E8DC; }
[data-theme="clean-pro"] .kpi:first-child { background: linear-gradient(135deg, #08673A, #0B7A46); position: relative; overflow: hidden; }
[data-theme="clean-pro"] .kpi:first-child::after { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; background: var(--k-yellow); right: -34px; top: -34px; width: 80px; height: 80px; opacity: .95; }
.kpi { position: relative; }
.kpi b, .kpi span { position: relative; z-index: 1; }
.hint { display: block; font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.hint a { color: var(--accent); font-weight: 700; text-decoration: underline; }
.hint .i { width: 16px; height: 16px; vertical-align: -3px; }
.flip .i { transform: scaleX(-1); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ניווט: במחשב מציגים הכל, בטלפון רק את העיקר */
.nav a.wide { display: none; }
@media (min-width: 960px) { .nav a.wide { display: flex; } .nav a.narrow { display: none !important; } .nav { overflow-y: auto; } }

/* כותרת עם לוגו */
.brandtop .brand-logo { height: 40px; }
[data-theme="bold-dark"] .brand-logo { background: #fff; border-radius: 10px; padding: 3px 6px; }

/* כניסה בקוד */
.pin { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 30px 0 40px; text-align: center; }
.pin__logo { width: 170px; height: auto; margin-bottom: 8px; }
.pin h1 { font-size: 28px; }
.pin__group { width: 100%; max-width: 420px; display: grid; gap: 8px; margin-top: 6px; }
.pin__group small { font-weight: 800; color: var(--muted); }
.pin__names { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pin__names .chip-btn { height: 48px; padding: 0 20px; font-size: 16px; }
.pin__dots { display: flex; gap: 14px; margin: 10px 0; }
.pin__dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); }
.pin__dots i.on { background: var(--accent); }
.pin__dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pin__pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; direction: ltr; }
.pin__pad button { height: 76px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 26px; font-weight: 800; box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; color: var(--text); }
.pin__pad button:active { background: var(--accent); color: var(--on-accent); }
.pin .demo-note { max-width: 420px; }

/* אריחי פעולה */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tile { display: grid; align-content: start; gap: 6px; min-height: 118px; padding: 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tile .i { width: 28px; height: 28px; color: var(--accent); }
.tile b { font-size: 17px; line-height: 1.25; }
.tile small { color: var(--muted); font-size: 13.5px; }
.tile--main { grid-column: 1 / -1; min-height: 130px; color: #fff; background: linear-gradient(135deg, #08673A, #0E8A50); border-color: transparent; position: relative; overflow: hidden; }
.tile--main .i { color: var(--k-yellow); width: 34px; height: 34px; }
.tile--main b { font-size: 22px; }
.tile--main small { color: rgb(255 255 255 / .85); }
.tile--main::after { content: ""; position: absolute; left: -30px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--k-lime); opacity: .35; }
@media (min-width: 960px) { .tiles--hub { grid-template-columns: repeat(3, 1fr); } .tiles--hub .tile--main { grid-column: auto; } }

/* שורות קליטה */
.lines { display: grid; gap: 8px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 76px 88px 44px; gap: 6px; padding: 8px; align-items: center; }
.line--inv { grid-template-columns: minmax(0, 1fr) 70px 76px 44px; }
.line input, .line select { min-height: 46px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; width: 100%; min-width: 0; outline: none; }
.line input:focus, .line select:focus { border-color: var(--accent); }
.line__del { box-shadow: none; color: var(--muted); }
@media (max-width: 420px) {
  .line { grid-template-columns: minmax(0, 1fr) 76px 44px; }
  .line .line__unit { grid-column: 1 / 3; grid-row: 2; }
  .line--inv { grid-template-columns: minmax(0, 1fr) 64px 70px 40px; }
}

/* צ׳קליסט */
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.progress span { display: block; height: 100%; background: var(--k-lime); transition: width .3s; }
.docphoto { padding: 12px 14px; margin-top: 8px; }
.docphoto summary { display: flex; gap: 8px; align-items: center; font-weight: 700; cursor: pointer; }
.docphoto img { width: 100%; border-radius: 12px; margin-top: 10px; }
.ck { padding: 14px; display: grid; gap: 12px; border-inline-start: 5px solid var(--line); }
.ck--ok { border-inline-start-color: var(--c-green); }
.ck--missing { border-inline-start-color: var(--c-red); }
.ck--partial { border-inline-start-color: var(--c-orange); }
.ck--damaged { border-inline-start-color: var(--c-purple); }
.ck--extra { border-inline-start-color: var(--c-blue); }
.ck__head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ck__head > b { font-size: 18px; }
.ck__qty { color: var(--muted); font-size: 14px; white-space: nowrap; }
.ck__qty b { color: var(--text); font-size: 18px; }
.ck__seg { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 6px; }
.ck__seg button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 800; font-size: 15px; cursor: pointer; color: var(--text); }
.ck__seg button .i { width: 18px; height: 18px; }
.ck__seg button.on { color: #fff; background: var(--c); border-color: transparent; }
.ck__more { display: grid; gap: 10px; }
.ck__more .f input { min-height: 48px; }

/* שורות בכרטיס */
.rows { padding: 4px 14px; }
.row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row > div { flex: 1; min-width: 0; }
.row b { display: block; }
.row small { display: block; color: var(--muted); font-size: 13.5px; }
.row em { display: block; font-style: normal; font-weight: 800; font-size: 14px; color: var(--c-red); margin-top: 2px; }
.row img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; }
.row--bad { background: color-mix(in srgb, var(--c-red) 6%, transparent); margin: 0 -14px; padding-inline: 14px; }
.report { padding: 16px; white-space: pre-line; font-size: 15px; line-height: 1.6; }

/* באנרים */
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-lg); margin: 4px 0 12px; }
.banner > div { flex: 1; }
.banner b { display: block; font-size: 17px; }
.banner span { font-size: 14px; }
.banner > .i { width: 28px; height: 28px; }
.banner--ok { background: color-mix(in srgb, var(--c-green) 14%, var(--surface)); color: color-mix(in srgb, var(--c-green) 70%, var(--text)); }
.banner--bad { background: color-mix(in srgb, var(--c-red) 12%, var(--surface)); color: color-mix(in srgb, var(--c-red) 75%, var(--text)); }
.banner--warn { background: color-mix(in srgb, var(--c-yellow) 16%, var(--surface)); }
.banner--lock { background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.banner--lock > .i { color: var(--accent); }
.mavatar.ok { color: #fff; background: var(--c-green); }
.mavatar.bad { color: #fff; background: var(--c-red); }

/* לוח שנה */
.cal { padding: 12px; }
.cal__h, .cal__g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.cal__h span { font-size: 12.5px; font-weight: 800; color: var(--muted); padding-bottom: 6px; }
.cal__d { min-height: 48px; border-radius: 10px; padding: 4px 2px; display: grid; align-content: start; gap: 2px; background: var(--surface-2); }
.cal__d i { font-style: normal; font-size: 12.5px; color: var(--muted); }
.cal__d b { font-size: 12px; font-weight: 800; color: var(--accent); }
.cal__d.has { background: color-mix(in srgb, var(--k-yellow) 30%, var(--surface)); }
.cal__d.today { outline: 2px solid var(--accent); }
.methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.methods .card { padding: 12px; display: grid; gap: 2px; }
.methods small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.methods b { font-size: 17px; }

/* גרפים */
.bars { padding: 14px; display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14.5px; }
.bar span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar i { height: 14px; border-radius: 99px; background: linear-gradient(270deg, var(--k-lime), var(--k-green)); width: var(--w); }
.bar b { font-size: 14px; }

/* הנהלת חשבונות */
.bk { cursor: pointer; }
.bk input { width: 24px; height: 24px; accent-color: var(--accent); flex: none; }
.bk.on { border-color: var(--accent); }
.bk small .i { width: 15px; height: 15px; vertical-align: -3px; }

/* עובד סניף: בלי מחירים */
[data-role="worker"] .money, [data-role="worker"] [data-f="value"], [data-role="worker"] [data-f="reportedBy"], [data-role="worker"] [data-f="total"], [data-role="worker"] [data-f="credit"] { display: none !important; }
[data-role="manager"] [data-f="value"], [data-role="manager"] [data-f="reportedBy"] { display: none !important; }

/* עובד והנה״ח רואים את הסטטוס, אבל לא משנים אותו ידנית */
[data-role="worker"] .detail-hero .statuses button:not(.on), [data-role="bookkeeper"] .detail-hero .statuses button:not(.on) { display: none; }
[data-role="worker"] .detail-hero .statuses button, [data-role="bookkeeper"] .detail-hero .statuses button { pointer-events: none; }

@media (min-width: 960px) { .kpis:has(.kpi:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* תיקיות חודשיות */
.folders { display: flex; gap: 10px; overflow-x: auto; margin: 8px -16px 0; padding: 4px 16px 8px; scrollbar-width: none; }
.folders::-webkit-scrollbar { display: none; }
.folder { flex: none; width: 168px; display: grid; gap: 3px; text-align: right; padding: 14px; border-radius: 6px 18px 18px 18px; border: 1.5px solid var(--line); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; color: var(--text); position: relative; }
.folder::before { content: ""; position: absolute; top: -8px; right: 0; width: 64px; height: 10px; border-radius: 8px 8px 0 0; background: var(--line); }
.folder .i { color: var(--k-yellow); width: 30px; height: 30px; }
.folder b { font-size: 16px; }
.folder small { color: var(--muted); font-size: 13px; }
.folder em { font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--c-orange); }
.folder em.ok { color: var(--c-green); }
.folder.on { border-color: var(--accent); background: color-mix(in srgb, var(--k-lime) 12%, var(--surface)); }
.folder.on::before { background: var(--accent); }
.sendbox h3 { display: flex; align-items: center; gap: 8px; }
.sendbox h3 .i { color: var(--accent); }
a.banner { color: inherit; }
/* עמודי PDF: נבנים מחוץ למסך */
.pdfbox { position: fixed; top: 0; left: -10000px; z-index: -1; }
.pdfpage { width: 794px; height: 1123px; overflow: hidden; padding: 40px; background: #fff; color: #111; font-family: Heebo, Arial, sans-serif; direction: rtl; box-sizing: border-box; }
.pdfpage header { display: flex; gap: 18px; align-items: center; border-bottom: 4px solid #08673A; padding-bottom: 14px; }
.pdfpage header img { height: 58px; }
.pdfpage h2 { margin: 0; color: #08673A; font-size: 24px; }
.pdfpage p { margin: 4px 0; font-size: 15px; }
.pdfpage table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 15px; }
.pdfpage th, .pdfpage td { border-bottom: 1px solid #ddd; padding: 8px; text-align: right; }
.pdfpage th { background: #EEF5E8; }
.pdfpage tr.sum td { font-weight: 800; border-top: 2px solid #08673A; }
.pdfpage .doc { max-width: 100%; max-height: 620px; margin-top: 16px; object-fit: contain; }
.pdfpage .nophoto { color: #888; margin-top: 16px; word-break: break-all; }
.pdfpage footer { margin-top: 18px; font-size: 13px; color: #08673A; font-weight: 700; }
