:root {
  --ink: #102f47;
  --muted: #55758c;
  --forest: #174e78;
  --forest-2: #0d3859;
  --mint: #e2f0f8;
  --cream: #edf6fb;
  --line: #bdd8e8;
  --shadow: 0 18px 50px rgba(13, 56, 89, .2);
  background: #edf6fb;
  color: #102f47;
}

body, .module-screen { background: #edf6fb; }
.auth-screen { background: #edf6fb; }
.auth-brand { background: linear-gradient(145deg, #2876a8, #0d3859); }
.auth-brand .brand-mark { background: #fff; color: #174e78; }
.auth-brand p:not(.eyebrow), .auth-brand .eyebrow { color: #fff; }
.brand-mark, .btn.primary { background: #174e78; }
.btn.primary:hover { background: #0d3859; }
.module-card .module-icon, .avatar { background: #e5f3fb; color: #236f9f; }
.repairs-module { border: 2px solid #bddbed; }
.sidebar { background: #123f63; color: #fff; }
.side-brand, .side-user { border-color: rgba(255,255,255,.38); }
.side-brand small, .side-user small, .side-user .icon-btn { color: #eaf7ff; }
.sidebar nav button { color: #eef9ff; }
.sidebar nav button:hover, .sidebar nav button.active { background: #fff; color: #174e78; }
.sidebar nav button.active { box-shadow: inset -3px 0 #0b3150; }
.topbar { background: rgba(255,255,255,.95); border-color: #c8e1f0; }
.topbar #today-label { position: absolute; left: 50%; transform: translateX(-50%); max-width: 390px; color: #174e78; font-weight: 800; text-align: center; white-space: nowrap; }
.view { color: #102f47; }
.panel, .stat-card, .employee-card, .settings-nav button.active { border-color: #c8e1f0; background: #fff; }
.settings-nav button.active, .btn.link, .number-link { color: #216f9e; }
input:focus, select:focus, textarea:focus { border-color: #2d7fae; box-shadow: 0 0 0 3px rgba(33,111,159,.16); }
.disclosure { background: #eef8fd; border-color: #c4e1f1; }
.section-title > div > span, .notice-icon { background: #daedf8; color: #216f9e; }
.logo-preview, .photo-drop, .signature-box canvas { border-color: #8fc2df; }
.toast { background: #16577f; }
.phone-link { color: #1f6f9f; }

.btn.supplier-message { background: #e5f3fb; color: #195d88; border: 1px solid #a9d2e9; }
.btn.supplier-message:hover { background: #d6ebf7; }
.supplier-form { display: grid; grid-template-columns: 1.1fr 1fr 1fr auto; gap: 12px; align-items: end; margin: 24px 0; padding: 18px; background: #f2f9fd; border: 1px solid #c8e1f0; border-radius: 14px; }
.supplier-form-actions { display: flex; gap: 7px; align-items: center; }
.supplier-row { padding: 15px 7px; }
.supplier-row strong, .supplier-row small { display: block; }
.supplier-row small { margin-top: 5px; color: var(--muted); }
.supplier-template { grid-column: 1 / -1; border: 2px solid #8fc2df; background: #f5fbff; }
.customer-filters { grid-template-columns: minmax(280px, 560px); }
.customers-table table { min-width: 700px; }
.repair-count-pill { display: inline-grid; place-items: center; min-width: 38px; height: 30px; border-radius: 18px; background: #e5f3fb; color: #1f6696; font-weight: 800; }
.customer-modal { width: min(940px, 94vw); }
.customer-summary { display: flex; align-items: baseline; gap: 10px; padding: 17px 20px; margin-bottom: 18px; border: 1px solid #c8e1f0; border-radius: 13px; background: #f2f9fd; }
.customer-summary strong { font-size: 28px; color: #1f6696; }
.block-muted { display: block; margin-top: 4px; color: var(--muted); }
.system-setting-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px; margin: 22px 0; border: 1px solid #c8e1f0; border-radius: 14px; background: #f2f9fd; }
.system-setting-card p { margin: 6px 0 0; }
.connection-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 20px; background: #e6edf2; color: #50697a; font-size: 12px; font-weight: 800; white-space: nowrap; }
.connection-badge:before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #8195a2; }
.connection-badge.online { background: #e0f4ea; color: #176b47; }
.connection-badge.online:before { background: #2f9a68; }
.danger-zone { margin-top: 36px; padding: 22px; border: 1px solid #e3a5a3; border-radius: 14px; background: #fff7f7; }
.danger-zone p { line-height: 1.65; color: #8f3835; }
.btn.danger-button { background: #c83f3b; color: #fff; }
.btn.danger-button:hover { background: #a82f2c; }

.sidebar nav .side-new-repair { margin-top: 12px; background: #fff; color: #174e78; box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.sidebar nav .side-new-repair:hover { background: #e8f4fb; color: #0d3859; }
.side-alert-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-inline-start: auto; padding: 0 7px; border-radius: 14px; background: #d53030; color: #fff; font-size: 11px; }
.side-alert-count[hidden] { display: none; }
.recent-footer { display: flex; justify-content: center; padding: 8px 22px 22px; }
.filters { grid-template-columns: minmax(260px,1fr) repeat(3,minmax(135px,180px)) auto auto; }
.alert-filters { grid-template-columns: minmax(270px,1fr) minmax(180px,220px) minmax(150px,180px) minmax(145px,180px) auto auto; }
.alerts-table table { min-width: 1250px; }
.alerts-panel { border-color: #e4b0b0; }
.alerts-table .alert-reasons { min-width: 220px; }
.photo-preview-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: 14px; }
.photo-preview-card { position: relative; min-width: 0; }
.photo-preview-card img { width: 100%; height: 132px; margin: 0; border: 1px solid #bdd8e8; object-fit: cover; background: #edf6fb; }
.photo-preview-card button { position: absolute; top: 6px; left: 6px; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 50%; background: rgba(13,56,89,.9); color: #fff; font-size: 18px; }
.photo-preview-card span { position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.9); color: #174e78; font-weight: 800; }
.excel-columns-list { display: flex; flex-direction: column; gap: 8px; margin: 22px 0; max-width: 720px; }
.excel-column-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 11px 14px; border: 1px solid #bdd8e8; border-radius: 11px; background: #f7fbfe; }
.excel-column-row > div { display: flex; gap: 5px; }
.excel-share-settings { max-width: 720px; padding-top: 20px; border-top: 1px solid #bdd8e8; }
.stale-modal { width: min(1120px,95vw); }
.stale-modal table { min-width: 850px; }
.report-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dashboard-alerts { margin-bottom: 24px; overflow: hidden; border: 2px solid #c93434; border-radius: 17px; background: #fff1f1; box-shadow: 0 10px 28px rgba(171,32,32,.13); }
.dashboard-alerts-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; background: #b62525; color: #fff; }
.dashboard-alerts-head > div { display: flex; align-items: center; gap: 12px; }
.dashboard-alerts-head > div > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #b62525; font-size: 23px; font-weight: 900; }
.dashboard-alerts-head h2, .dashboard-alerts-head p { margin: 0; }
.dashboard-alerts-head p { margin-top: 3px; color: #ffe6e6; font-size: 13px; }
.btn.alert-button { border: 1px solid #fff; background: #fff; color: #a51f1f; }
.dashboard-alert-groups { display: grid; grid-template-columns: repeat(2,1fr); gap: 13px; padding: 15px; }
.dashboard-alert-groups section { overflow: hidden; border: 1px solid #e5a2a2; border-radius: 13px; background: #fff; }
.dashboard-alert-groups h3 { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; background: #ffe3e3; color: #921d1d; }
.dashboard-alert-groups h3 span { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 20px; background: #b62525; color: #fff; }
.dashboard-alert-row { width: 100%; display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 12px; padding: 11px 14px; border: 0; border-bottom: 1px solid #f3d4d4; background: #fff; color: #471515; text-align: right; }
.dashboard-alert-row:last-child { border-bottom: 0; }
.dashboard-alert-row:hover { background: #fff7f7; }
.dashboard-alert-row strong { color: #a51f1f; }
.dashboard-alert-row b { color: #a51f1f; font-size: 12px; }
.alert-reasons { display: flex; flex-direction: column; gap: 4px; color: #a51f1f; font-weight: 700; }
.images-modal { width: min(1080px,95vw); }
.image-selection-note { margin-bottom: 14px; color: #174e78; font-weight: 800; }
.images-view-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.images-view-grid figure { position: relative; overflow: hidden; margin: 0; border: 2px solid #bdd8e8; border-radius: 14px; background: #fff; opacity: .62; transition: .16s; }
.images-view-grid figure.selected { border-color: #216f9e; box-shadow: 0 0 0 3px rgba(33,111,158,.14); opacity: 1; }
.images-view-grid img { display: block; width: 100%; height: 360px; object-fit: contain; background: #edf6fb; }
.images-view-grid figcaption { padding: 11px; border-top: 1px solid #bdd8e8; text-align: center; color: #174e78; font-weight: 800; }
.image-select-control { position: absolute; z-index: 2; top: 10px; right: 10px; display: flex; flex-direction: row; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 20px; background: rgba(255,255,255,.94); box-shadow: 0 4px 12px rgba(13,56,89,.18); color: #174e78; cursor: pointer; }
.image-select-control input { width: 18px; height: 18px; margin: 0; }
.last-change-editor { display: grid; grid-template-columns: 1fr 190px 150px auto; align-items: end; gap: 14px; margin-top: 15px; padding: 14px 16px; border: 1px solid #9fc9e1; border-radius: 13px; background: #f0f8fd; }
.last-change-editor[hidden] { display: none; }
.last-change-editor > div strong, .last-change-editor > div small { display: block; }
.last-change-editor > div small { margin-top: 5px; color: var(--muted); }
.history-item { display: block; margin-bottom: 9px; padding: 12px 14px; border: 1px solid #c8e1f0; border-radius: 12px; background: #f8fcfe; }
.history-summary { display: flex; align-items: center; gap: 9px; }
.history-summary time { margin-right: auto; color: var(--muted); }
.history-changes { display: grid; gap: 7px; margin: 10px 0 0; padding: 10px 24px 0 0; border-top: 1px solid #dceaf2; }
.history-changes li { padding-right: 3px; color: #40657c; }
.history-changes strong { display: inline-block; min-width: 150px; color: #174e78; }

@media(max-width: 1100px) { .filters { grid-template-columns: 1fr 1fr 1fr; } .alert-filters { grid-template-columns: 1fr 1fr 1fr; } }
@media(max-width: 800px) { .filters { grid-template-columns: 1fr; } .photo-preview-grid { grid-template-columns: repeat(3,1fr); } .photo-preview-card img { height: 105px; } .top-actions #today-label { display: inline; max-width: 150px; font-size: 10px; line-height: 1.35; text-align: center; white-space: normal; } .dashboard-alerts-head { align-items: stretch; flex-direction: column; } .dashboard-alert-groups { grid-template-columns: 1fr; } .dashboard-alert-row { grid-template-columns: 55px 1fr; } .dashboard-alert-row b { grid-column: 2; } .images-view-grid { grid-template-columns: 1fr; } .images-view-grid img { height: 280px; } .last-change-editor { grid-template-columns: 1fr 1fr; } .last-change-editor > div { grid-column: 1 / -1; } .history-summary { align-items: flex-start; flex-wrap: wrap; } .history-summary time { width: 100%; margin: 2px 0 0; } .history-changes strong { min-width: 0; margin-left: 7px; } }

@media(max-width: 1100px) { .supplier-form { grid-template-columns: 1fr 1fr; } }
@media(max-width: 800px) { .supplier-form { grid-template-columns: 1fr; } .system-setting-card { align-items: stretch; flex-direction: column; } }

/* צבעי הסטטוס נשארים סמנטיים כדי לשמור על זיהוי מהיר. */
