* { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== טוקנים - מצב בהיר ===== */
:root {
    --bg: #f5f6fa;
    --surface: #ffffff;
    --surface-2: #f0f2f8;
    --text: #17203b;
    --text-muted: #5d6784;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --on-primary: #ffffff;
    --success: #15803d;
    --success-hover: #166534;
    --success-bg: #f0fdf4;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --danger-bg: #fef2f2;
    --timer: #b45309;
    --timer-bg: #fffbeb;
    --border: #e2e5ef;
    --ring: rgba(79, 70, 229, .35);
    --shadow: 0 1px 2px rgba(23, 32, 59, .06), 0 4px 16px rgba(23, 32, 59, .06);
    --shadow-lg: 0 24px 60px rgba(23, 32, 59, .25);
    --radius: 16px;
    --radius-sm: 10px;
}

/* ===== טוקנים - מצב כהה ===== */
[data-theme="dark"] {
    --bg: #0f1420;
    --surface: #1a2130;
    --surface-2: #232c40;
    --text: #eef1f8;
    --text-muted: #9aa5c0;
    --primary: #818cf8;
    --primary-hover: #a5b0fc;
    --on-primary: #14173d;
    --success: #4ade80;
    --success-hover: #6ee7a0;
    --success-bg: rgba(74, 222, 128, .09);
    --danger: #f87171;
    --danger-hover: #fca5a5;
    --danger-bg: rgba(248, 113, 113, .1);
    --timer: #fbbf24;
    --timer-bg: rgba(251, 191, 36, .1);
    --border: #2c3650;
    --ring: rgba(129, 140, 248, .45);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
}

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
    font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    transition: background .25s, color .25s;
}

button { font-family: inherit; cursor: pointer; touch-action: manipulation; }
svg { flex-shrink: 0; }

:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ring);
    border-radius: var(--radius-sm);
}

/* ===== מסך כניסה ===== */
.login-wrap {
    min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: linear-gradient(160deg, var(--bg), var(--surface-2));
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    padding: 40px 34px;
    width: 100%; max-width: 380px;
    text-align: center;
}
.login-logo {
    width: 72px; height: 72px; margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: var(--on-primary);
    border-radius: 22px;
}
.login-card h1 { font-size: 28px; font-weight: 800; }
.login-sub { color: var(--text-muted); margin-bottom: 26px; }
.login-card .field { text-align: right; }
.login-error {
    background: var(--danger-bg); color: var(--danger);
    border-radius: var(--radius-sm); padding: 10px 14px;
    font-size: 14px; margin-bottom: 14px; font-weight: 500;
}
.btn-block { width: 100%; justify-content: center; }

/* ===== סרגל עליון ===== */
.topbar {
    display: flex; align-items: center; gap: 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 22px;
    position: sticky; top: 0; z-index: 50;
    flex-wrap: wrap;
}
.logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 21px; font-weight: 800; color: var(--primary);
    text-decoration: none; border-radius: var(--radius-sm);
}
.logo:hover { opacity: .85; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; }
.tab-btn {
    display: flex; align-items: center; gap: 7px;
    border: none; background: transparent;
    min-height: 44px; padding: 0 18px;
    border-radius: 9px; font-size: 15px; font-weight: 500;
    color: var(--text-muted);
    transition: background .2s, color .2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--surface); color: var(--primary); font-weight: 700; box-shadow: var(--shadow); }
.topbar-left { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--timer-bg); color: var(--timer);
    padding: 7px 13px; border-radius: 99px;
    font-size: 13px; font-weight: 700; white-space: nowrap;
}
.badge::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: currentColor; animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

main { max-width: 1200px; margin: 0 auto; padding: 26px 18px 60px; }
.tab { display: none; }
.tab.active { display: block; animation: fadeIn .2s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }

/* ===== סרגלי כלים ===== */
.toolbar { display: flex; gap: 10px; margin-bottom: 18px; align-items: center; flex-wrap: wrap; }
.search-box {
    display: flex; align-items: center; gap: 8px;
    flex: 1; min-width: 190px; max-width: 360px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 0 14px; color: var(--text-muted);
    transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.search-box input {
    flex: 1; border: none; background: transparent; outline: none;
    min-height: 44px; font-size: 15px; font-family: inherit; color: var(--text);
}
.month-nav { display: flex; align-items: center; gap: 4px; }
input[type=month], select {
    min-height: 44px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: 12px;
    font-size: 15px; font-family: inherit;
    background: var(--surface); color: var(--text);
    transition: border-color .2s;
}
select { cursor: pointer; }
select:focus, input[type=month]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }

/* ===== כפתורים ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px;
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); color: var(--text);
    font-size: 15px; font-weight: 600;
    transition: background .2s, border-color .2s, color .2s, transform .1s;
}
.btn:active { transform: scale(.97); }
/* hover רק לכפתורים ניטרליים - לא דורס כפתורים צבעוניים */
.btn:not(.btn-primary):not(.btn-success):not(.btn-danger):hover { background: var(--surface-2); border-color: var(--text-muted); }

.btn-primary { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); color: #fff; border-color: transparent; }
.btn-success:hover { background: var(--success-hover); }
.btn-danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn-danger:hover { background: var(--danger-hover); }
[data-theme="dark"] .btn-success { color: #052e16; }
[data-theme="dark"] .btn-danger { color: #450a0a; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-muted); }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 44px;
    border: none; background: transparent; border-radius: 12px;
    color: var(--text-muted);
    transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }

/* מתג ערכת נושא */
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ===== כרטיסי לקוחות ===== */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}
.client-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 12px;
    transition: border-color .25s, box-shadow .25s, transform .15s;
}
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.client-card.working { border-color: var(--success); }
.client-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.client-name { font-size: 18px; font-weight: 700; }
.client-service { color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.client-meta { display: flex; gap: 14px; font-size: 14px; color: var(--text-muted); flex-wrap: wrap; align-items: center; }
.client-meta b { color: var(--text); font-variant-numeric: tabular-nums; }
.price-tag {
    background: var(--surface-2); color: var(--primary);
    padding: 5px 12px; border-radius: 99px;
    font-weight: 700; font-size: 14px; white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.timer-row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--timer-bg); border-radius: var(--radius-sm);
    padding: 10px 14px;
}
.timer-display {
    font-size: 26px; font-weight: 800;
    font-variant-numeric: tabular-nums; direction: ltr;
    color: var(--timer);
}
.timer-info { font-size: 13px; color: var(--text-muted); flex: 1; min-width: 120px; }
.card-actions { display: flex; gap: 8px; align-items: center; }
.card-actions .grow { flex: 1; }

/* ===== דוח - כרטיסי סיכום ===== */
.report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px; margin-bottom: 24px;
}
.stat-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px;
    box-shadow: var(--shadow); text-align: center;
}
.stat-card .num { font-size: 27px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.stat-card .lbl { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ===== דוח - פירוט לקוחות ===== */
.report-client {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    margin-bottom: 14px; overflow: hidden;
}
.report-client-head {
    display: flex; align-items: center; gap: 12px;
    width: 100%; text-align: right;
    padding: 15px 20px; border: none; background: transparent;
    color: var(--text); font-size: 15px; font-family: inherit;
    flex-wrap: wrap; transition: background .2s;
}
.report-client-head:hover { background: var(--surface-2); }
.report-client-head .name { font-weight: 700; font-size: 16px; flex: 1; min-width: 120px; }
.report-client-head .hours { font-weight: 800; color: var(--primary); direction: ltr; font-variant-numeric: tabular-nums; }
.report-client-head .chev { transition: transform .2s; color: var(--text-muted); }
.report-client-head[aria-expanded="true"] .chev { transform: rotate(90deg); }
.type-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.type-badge {
    background: var(--surface-2); border-radius: 99px;
    padding: 4px 11px; font-size: 12px; color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.table-wrap { overflow-x: auto; border-top: 1px solid var(--border); }
.sessions-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.sessions-table th, .sessions-table td { padding: 10px 16px; text-align: right; }
.sessions-table tbody tr { border-top: 1px solid var(--border); transition: background .15s; }
.sessions-table tbody tr:hover { background: var(--surface-2); }
.sessions-table th {
    color: var(--text-muted); font-weight: 600; font-size: 12px;
    background: var(--surface-2); white-space: nowrap;
}
.sessions-table .dur { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.sessions-table .row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.running-dot { color: var(--success); font-weight: 700; white-space: nowrap; }

/* ===== מודלים ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(10, 14, 26, .55);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    z-index: 100; padding: 16px;
    animation: fadeIn .15s ease-out;
}
.modal {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; padding: 28px;
    width: 100%; max-width: 470px;
    box-shadow: var(--shadow-lg);
    max-height: 92dvh; overflow-y: auto;
    animation: modalIn .22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes modalIn { from { opacity: 0; transform: scale(.94) translateY(10px); } }
.modal h2 { margin-bottom: 20px; font-size: 20px; font-weight: 700; }

.field { display: block; margin-bottom: 15px; }
.field > span { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
    width: 100%; min-height: 46px; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 16px; font-family: inherit;
    background: var(--bg); color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 0; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; gap: 10px; margin-top: 10px; }
.modal-actions .btn { flex: 1; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    border: 1.5px solid var(--border); background: var(--surface);
    color: var(--text); border-radius: 99px;
    min-height: 42px; padding: 0 17px; font-size: 14px; font-weight: 500;
    transition: background .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); font-weight: 700; }

/* ===== שונות ===== */
.empty { text-align: center; padding: 70px 20px; color: var(--text-muted); }
.empty svg { margin-bottom: 14px; opacity: .55; }
.empty h2 { font-size: 20px; color: var(--text); margin-bottom: 6px; }
.hidden { display: none !important; }

.toast {
    position: fixed; bottom: 24px; right: 50%; transform: translateX(50%);
    background: var(--text); color: var(--bg);
    padding: 13px 24px; border-radius: 14px;
    font-size: 15px; font-weight: 500;
    z-index: 200; box-shadow: var(--shadow-lg);
    animation: slideUp .25s ease-out;
    max-width: calc(100vw - 32px); text-align: center;
}
.toast.error { background: var(--danger); color: #fff; }
@keyframes slideUp { from { opacity: 0; transform: translateX(50%) translateY(14px); } }

/* ===== רספונסיבי ===== */
@media (max-width: 768px) {
    .topbar { padding: 8px 12px; gap: 10px; }
    .logo span { display: none; }
    .tab-btn { padding: 0 13px; }
    .btn span { }
    main { padding: 16px 12px 50px; }
    .clients-grid { grid-template-columns: 1fr; }
    .report-cards { grid-template-columns: repeat(2, 1fr); }
    .badge { display: none; }
    .filters-bar select { flex: 1; min-width: 130px; }
    .search-box { max-width: none; }
}
@media (max-width: 420px) {
    .svc-row { grid-template-columns: 1fr 82px 36px; }
    .svc-row .svc-type { grid-column: 1 / -1; }
    #btnAddTaskTop span { display: none; }
    #btnAddTaskTop { min-width: 44px; padding: 0 12px; }
    .report-cards { gap: 10px; }
    .stat-card { padding: 13px 10px; }
    .stat-card .num { font-size: 21px; }
    .modal { padding: 22px 18px; }
    .row2 { grid-template-columns: 1fr; gap: 0; }
}

/* ===== משימות ===== */
.count-badge {
    background: var(--primary); color: var(--on-primary);
    border-radius: 99px; min-width: 20px; height: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11.5px; font-weight: 700; padding: 0 6px;
}
.tab-btn.active .count-badge { background: var(--primary); }

.task-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--surface); border: 1px solid var(--border);
    border-right: 4px solid var(--border);
    border-radius: var(--radius); padding: 13px 16px;
    box-shadow: var(--shadow); margin-bottom: 10px;
    cursor: pointer; transition: border-color .2s, transform .12s, box-shadow .2s;
}
.task-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.task-card.pr-2 { border-right-color: var(--primary); }
.task-card.pr-3 { border-right-color: #ea8a00; }
.task-card.pr-4 { border-right-color: var(--danger); }
.task-card.is-done { opacity: .62; }
.task-card.is-done .task-title { text-decoration: line-through; }

.task-check {
    width: 30px; height: 30px; min-width: 30px;
    border: 2px solid var(--border); border-radius: 50%;
    background: transparent; color: transparent;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .2s, background .2s, color .2s;
}
.task-check:hover { border-color: var(--success); color: var(--success); }
.task-check.checked { background: var(--success); border-color: var(--success); color: #fff; }
[data-theme="dark"] .task-check.checked { color: #052e16; }

.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 700; font-size: 15.5px; margin-bottom: 4px; word-break: break-word; }
.task-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); }
.client-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--surface-2); border-radius: 99px; padding: 3px 10px;
    font-weight: 600;
}
.prio-badge { border-radius: 99px; padding: 3px 10px; font-weight: 700; font-size: 12px; }
.prio-badge.pr-1 { background: var(--surface-2); color: var(--text-muted); }
.prio-badge.pr-2 { background: var(--surface-2); color: var(--primary); }
.prio-badge.pr-3 { background: rgba(234, 138, 0, .14); color: #c17100; }
.prio-badge.pr-4 { background: var(--danger-bg); color: var(--danger); }
[data-theme="dark"] .prio-badge.pr-3 { background: rgba(251, 191, 36, .14); color: var(--timer); }

.due-badge {
    display: inline-flex; align-items: center; gap: 5px;
    border-radius: 99px; padding: 3px 10px;
    background: var(--surface-2); font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.due-badge.today { background: var(--timer-bg); color: var(--timer); }
.due-badge.overdue { background: var(--danger-bg); color: var(--danger); }
.mini-count { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }

.status-select {
    min-height: 38px; padding: 0 10px; border-radius: 99px;
    font-size: 13px; font-weight: 700; border: none; cursor: pointer;
    -webkit-appearance: none; appearance: none; text-align: center;
}
.status-select.st-new { background: var(--surface-2); color: var(--primary); }
.status-select.st-progress { background: var(--timer-bg); color: var(--timer); }
.status-select.st-waiting { background: rgba(147, 51, 234, .12); color: #9333ea; }
.status-select.st-done { background: var(--success-bg); color: var(--success); }
[data-theme="dark"] .status-select.st-waiting { background: rgba(192, 132, 252, .14); color: #c084fc; }

.task-group { margin-bottom: 26px; }
.task-group-title { font-size: 16px; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.muted-count { color: var(--text-muted); font-weight: 500; font-size: 13px; }

/* ===== מודל משימה - קבצים והערות ===== */
.modal-lg { max-width: 620px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h2 { margin-bottom: 0; }

.task-extras { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 6px; }
.extras-section { margin-top: 18px; }
.extras-section h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.extras-empty { color: var(--text-muted); font-size: 13.5px; padding: 4px 0 8px; }

.attachments { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.attachment { position: relative; }
.attachment.img img {
    width: 96px; height: 96px; object-fit: cover;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    display: block;
}
.attachment.vid video {
    width: 200px; max-width: 100%; border-radius: var(--radius-sm);
    border: 1px solid var(--border); display: block;
}
.attachment.doc { width: 100%; }
.doc-link {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface-2); border-radius: var(--radius-sm);
    padding: 10px 14px; text-decoration: none; color: var(--text);
    border: 1px solid var(--border);
}
.doc-link:hover { border-color: var(--primary); }
.doc-name { flex: 1; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.doc-size { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.att-del {
    position: absolute; top: -8px; left: -8px;
    width: 24px; height: 24px; border-radius: 50%;
    border: none; background: var(--danger); color: #fff;
    font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow);
}
.attachment.doc .att-del { top: 50%; transform: translateY(-50%); left: -8px; }
.upload-btn { cursor: pointer; }
.upload-status { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

.comments { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.comment {
    background: var(--surface-2); border-radius: var(--radius-sm);
    padding: 10px 14px 6px;
}
.comment-body { font-size: 14.5px; word-break: break-word; }
.comment-foot {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; color: var(--text-muted); margin-top: 4px;
}
.comment-add { display: flex; gap: 8px; align-items: flex-end; }
.comment-add textarea {
    flex: 1; padding: 10px 14px; min-height: 46px; resize: vertical;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 15px; font-family: inherit; background: var(--bg); color: var(--text);
}
.comment-add textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }

.icon-btn.sm { min-width: 34px; min-height: 34px; }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn:disabled:hover { background: transparent; color: var(--text-muted); }

/* ===== שירותים חודשיים ===== */
.svc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.svc-row { display: grid; grid-template-columns: 1fr 82px 118px 36px; gap: 8px; align-items: center; }
.svc-row select.svc-type { min-height: 44px; padding: 0 8px; font-size: 13.5px; border-radius: var(--radius-sm); }
.svc-month-wrap {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; color: var(--text-muted);
    background: var(--surface-2); border-radius: var(--radius-sm);
    padding: 7px 12px;
}
.svc-month-wrap input { min-height: 38px !important; width: auto !important; }
.svc-row input {
    min-height: 44px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 15px; font-family: inherit; background: var(--bg); color: var(--text);
}
.svc-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.svc-row .svc-price { font-variant-numeric: tabular-nums; }
.svc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.svc-total { font-size: 14px; color: var(--text-muted); }
.svc-total b { color: var(--primary); font-variant-numeric: tabular-nums; }

.svc-hint {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    background: var(--surface-2); border-radius: var(--radius-sm);
    padding: 9px 13px; margin: -6px 0 15px;
    font-size: 13px; color: var(--text-muted);
}
.svc-hint-label { font-weight: 600; }
.svc-hint-total { color: var(--primary); font-variant-numeric: tabular-nums; }

/* פירוט חיוב חודשי בדוח */
.head-amount {
    font-weight: 800; color: var(--success);
    font-variant-numeric: tabular-nums; direction: ltr;
    background: var(--success-bg); border-radius: 99px; padding: 4px 12px; font-size: 14px;
}
.billing-box {
    background: var(--surface-2); border-bottom: 1px solid var(--border);
    padding: 12px 18px;
}
.billing-title { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 7px; }
.bill-line {
    display: grid; grid-template-columns: minmax(110px, auto) 1fr auto;
    gap: 12px; align-items: baseline;
    padding: 5px 0; font-size: 14px;
}
.bill-line + .bill-line { border-top: 1px dashed var(--border); }
.bill-name { font-weight: 600; }
.bill-desc { color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.bill-amt { font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr; }
.bill-line.bill-total { border-top: 1.5px solid var(--border); margin-top: 3px; padding-top: 8px; }
.bill-line.bill-total .bill-name, .bill-line.bill-total .bill-amt { color: var(--primary); font-weight: 800; }

/* ===== הערכת שעות ===== */
.estimate-note {
    font-size: 12.5px; line-height: 1.5;
    background: var(--surface-2); color: var(--text-muted);
    border-radius: var(--radius-sm); padding: 9px 12px;
}
.estimate-note.warn { background: var(--timer-bg); color: var(--timer); font-weight: 600; }
.estimate-note.ok { background: var(--success-bg); color: var(--success); font-weight: 600; }
.est-text { margin-bottom: 16px; font-size: 15px; line-height: 1.6; }

/* ===== משימות חוזרות ===== */
.recurring-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(79, 70, 229, .1); color: var(--primary);
    border-radius: 99px; padding: 3px 10px; font-weight: 600;
}
[data-theme="dark"] .recurring-chip { background: rgba(129, 140, 248, .14); }

.recurring-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.recurring-row {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface-2); border-radius: var(--radius-sm);
    padding: 12px 14px; transition: opacity .2s;
}
.recurring-row.inactive { opacity: .55; }
.recurring-main { flex: 1; min-width: 0; }
.recurring-title { font-weight: 700; font-size: 15px; margin-bottom: 5px; }

/* מתג הפעלה/השהיה */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; min-width: 42px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; inset: 0; border-radius: 99px;
    background: var(--border); transition: background .2s;
}
.slider::before {
    content: ''; position: absolute; width: 18px; height: 18px;
    right: 3px; top: 3px; border-radius: 50%;
    background: var(--surface); box-shadow: var(--shadow);
    transition: transform .2s;
}
.switch input:checked + .slider { background: var(--success); }
.switch input:checked + .slider::before { transform: translateX(-18px); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px var(--ring); }

/* ===== הגדרות ===== */
.page-title { font-size: 22px; font-weight: 800; margin-bottom: 18px; }
.settings-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 22px; margin-bottom: 18px; max-width: 640px;
}
.settings-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.settings-sub { color: var(--text-muted); font-size: 13.5px; margin-bottom: 16px; line-height: 1.7; }
.settings-sub code {
    background: var(--surface-2); border-radius: 6px; padding: 2px 8px;
    font-size: 13px; direction: ltr; display: inline-block;
}
.wt-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.wt-row { display: flex; align-items: center; gap: 8px; }
.wt-move { display: flex; flex-direction: column; }
.wt-move .icon-btn { min-height: 22px; min-width: 34px; border-radius: 6px; }
.wt-row input {
    flex: 1; min-height: 44px; padding: 0 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 15px; font-family: inherit; background: var(--bg); color: var(--text);
}
.wt-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.wt-add { display: flex; gap: 8px; }
.wt-add input {
    flex: 1; min-height: 44px; padding: 0 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 15px; font-family: inherit; background: var(--bg); color: var(--text);
}
.wt-add input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }

@media (max-width: 640px) {
    .run-label { display: none; }
    .task-card { flex-wrap: wrap; }
    .task-main { min-width: 60%; }
    .status-select { margin-inline-start: auto; }
    .filters-bar select { flex: 1; min-width: 45%; }
}

/* הפחתת אנימציות למי שביקש */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
