/* ============================================
   מערכת ניהול עסק – מעצבת פנים
   style.css – עיצוב משותף לכל העמודים
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700&display=swap');

/* ---- משתני צבע ועיצוב ---- */
:root {
  --primary: #5B7FA6;
  --primary-dark: #3D618A;
  --primary-light: #EBF0F7;
  --accent: #A0785A;
  --accent-light: #F5EDE6;
  --success: #6BAA75;
  --success-light: #EAF4EC;
  --warning: #E8B84B;
  --warning-light: #FDF6E3;
  --danger: #C0675A;
  --danger-light: #FAEDED;
  --text-main: #2C3E50;
  --text-muted: #7F8C8D;
  --text-light: #B0BEC5;
  --bg-main: #F4F6FA;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  --border: #DDE3EC;
  --border-light: #EEF1F6;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --sidebar-width: 220px;
  --header-height: 64px;
  --font: 'Heebo', sans-serif;
}

/* ═══════════════════════════════════════════════════════════════════
   DARK THEME - Override variables when data-theme="dark" is set on <html>
   ═══════════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  --primary:        #7BA0CC;
  --primary-dark:   #6488B0;
  --primary-light:  #2a3340;
  --accent:         #c89580;
  --accent-light:   #2a2520;
  --success:        #6cb86c;
  --success-light:  #1c3a1c;
  --warning:        #e8b860;
  --warning-light:  #3a3320;
  --danger:         #e08070;
  --danger-light:   #3a1f1f;
  --text-main:      #e8e8e8;
  --text-muted:     #a8a8a8;
  --text-light:     #888;
  --bg-main:        #181818;
  --bg-sidebar:     #1f1f1f;
  --bg-card:        #232323;
  --border:         #3a3a3a;
  --border-light:   #2a2a2a;
  --shadow-sm:      0 1px 4px rgba(0,0,0,0.3);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.7);
}

/* רקע ראשי - חשוב להיות מיד אחרי המשתנים כדי לתפוס את ה-html element */
[data-theme="dark"], [data-theme="dark"] body {
  background: #181818;
  color: #e8e8e8;
}


/* ---- איפוס ובסיס ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font);
  background: var(--bg-main);
  color: var(--text-main);
  direction: rtl;
  font-size: 15px;
  min-height: 100vh;
}

/* ---- מבנה כללי ---- */
#app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- כותרת עליונה ---- */
#app-header {
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

#app-header a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

#app-header img {
  height: 40px;
  width: auto;
}

#app-header .logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.3px;
}

#app-header .logo-text span {
  color: var(--accent);
}

/* ---- פס שמירה ---- */
#save-bar {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--success);
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 9999;
  animation: fadeInUp 0.2s ease;
}

#file-bar {
  background: var(--primary-light);
  border-bottom: 1px solid var(--border);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

#file-bar .file-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

#file-bar .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

#file-bar .dot.connected    { background: var(--success); }
#file-bar .dot.disconnected { background: var(--warning); }

.user-info {
  color: var(--text-muted);
  font-size: 13px;
}

.file-name-display {
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  border-bottom: 1px dashed var(--text-muted);
  font-size: 13px;
}

.file-name-display:hover { color: var(--primary); }

/* ---- גוף המסך ---- */
#app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ---- תפריט צד ---- */
#sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  flex-shrink: 0;
  padding: 16px 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

#sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sidebar ul li a,
#sidebar ul li .nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  white-space: nowrap;
}

#sidebar ul li a:hover,
#sidebar ul li .nav-item:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

#sidebar ul li a.active,
#sidebar ul li .nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  border-right: 3px solid var(--primary);
}

#sidebar ul li a .nav-icon,
#sidebar ul li .nav-item .nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* תת-תפריט */
#sidebar ul.sub-menu {
  padding-right: 20px;
}

#sidebar ul.sub-menu li a {
  font-size: 13px;
  font-weight: 400;
  padding: 7px 20px 7px 12px;
  color: var(--text-muted);
}

#sidebar ul.sub-menu li a:hover {
  color: var(--primary);
}

#sidebar ul.sub-menu li a.active {
  color: var(--primary);
  font-weight: 600;
  border-right: 2px solid var(--primary);
}

#sidebar .nav-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 20px 4px;
}

/* ---- אזור תוכן ---- */
#main-content {
  flex: 1;
  padding: 28px 32px;
  overflow-y: auto;
  min-width: 0;
}

/* ---- כותרות עמוד ---- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- כרטיסים ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

/* ---- כרטיסי סטטיסטיקה ---- */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.brown { background: var(--accent-light); color: var(--accent); }

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- טבלאות ---- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data-table thead tr {
  background: var(--bg-main);
}

table.data-table thead th {
  padding: 11px 14px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

table.data-table thead th:hover { color: var(--primary); }

table.data-table thead th .sort-icon {
  font-size: 10px;
  margin-right: 4px;
  color: var(--text-light);
}

table.data-table thead th.sorted .sort-icon { color: var(--primary); }

table.data-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.12s;
}

table.data-table tbody tr:last-child { border-bottom: none; }
table.data-table tbody tr:hover { background: var(--primary-light); }

table.data-table tbody td {
  padding: 5px 14px;
  color: var(--text-main);
  vertical-align: middle;
}

table.data-table tbody td.muted { color: var(--text-muted); }

table.data-table .row-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}

table.data-table tbody tr:hover .row-actions { opacity: 1; }

/* ---- כפתורים ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #8A6248; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #559960; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #A8544A; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-main); color: var(--text-main); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 6px 8px; }

.btn-dots {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.btn-dots:hover { background: var(--bg-main); color: var(--text-main); }

/* ---- שדות טופס ---- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 5px;
}

.form-label .required {
  color: var(--danger);
  margin-right: 2px;
}

.form-control {
  width: 100%;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-main);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  direction: rtl;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,127,166,0.12);
}

.form-control.is-invalid {
  border-color: var(--danger);
}

.form-control:disabled {
  background: var(--bg-main);
  color: var(--text-muted);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* ---- Select – חץ dropdown טבעי של הדפדפן ---- */
select.form-control {
  -webkit-appearance: auto;
  -moz-appearance: auto;
  appearance: auto;
  cursor: pointer;
}

/* שדות LTR – טלפון, מייל, מספרים */
input.ltr-field {
  direction: ltr;
  text-align: left;
}

/* dropdown עם כפתור "..." */
.dropdown-with-edit {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dropdown-with-edit select {
  flex: 1;
}


/* ---- שדות תאריך – date-input (text עם מסיכה) ---- */
input.date-input {
  direction: ltr;
  text-align: left;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}
input.date-input::placeholder {
  letter-spacing: normal;
  color: var(--text-light);
}

/* autocomplete */
.autocomplete-wrapper {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 200;
  max-height: 180px;
  overflow-y: auto;
  display: none;
}

.autocomplete-list.show { display: block; }

.autocomplete-list li {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.1s;
}

.autocomplete-list li:hover { background: var(--primary-light); }

/* ---- Modals ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44,62,80,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 580px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.22s ease;
  direction: rtl;
}

.modal-box.modal-lg { max-width: 760px; }
.modal-box.modal-xl { max-width: 960px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.modal-close:hover { background: var(--bg-main); }

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

/* ---- תגיות סטטוס ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-blue { background: var(--primary-light); color: var(--primary-dark); }
.badge-green { background: var(--success-light); color: #3a7a44; }
.badge-orange { background: var(--warning-light); color: #8a6a1a; }
.badge-red { background: var(--danger-light); color: #8a3a32; }
.badge-gray { background: var(--bg-main); color: var(--text-muted); }
.badge-brown { background: var(--accent-light); color: var(--accent); }

/* ---- קנבן ---- */
.kanban-wrapper {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
}

.kanban-column {
  min-width: 220px;
  max-width: 260px;
  flex-shrink: 0;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.kanban-column-header {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.kanban-column-header .count {
  font-size: 11px;
  font-weight: 600;
  background: var(--border);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 12px;
}

.kanban-cards {
  padding: 10px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: grab;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.1s;
  font-size: 13px;
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.kanban-card .card-name {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.kanban-card .card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- הערות שרשרת ---- */
.notes-chain {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.note-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  background: #fff;
}

.note-item:last-child { border-bottom: none; }

.note-item .note-date {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.note-item .note-text {
  font-size: 13px;
  color: var(--text-main);
  white-space: pre-wrap;
}

.note-item .note-expand {
  font-size: 11px;
  color: var(--primary);
  cursor: pointer;
  margin-top: 4px;
  display: inline-block;
}

.note-add-area {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: var(--bg-main);
  border-top: 1px solid var(--border);
}

.note-add-area textarea {
  flex: 1;
  min-height: 56px;
  resize: none;
}

/* ---- טיימר ---- */
.timer-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}

.timer-btn.stopped {
  background: var(--success-light);
  color: #3a7a44;
}

.timer-btn.running {
  background: var(--danger-light);
  color: var(--danger);
  animation: pulse 1.5s infinite;
}

.timer-display {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- מיתוג תצוגה (רשימה/קנבן) ---- */
.view-toggle {
  display: flex;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-toggle button {
  padding: 6px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.view-toggle button.active {
  background: var(--primary);
  color: #fff;
}

/* When view-toggle button is active, force icon white */
.view-toggle button.active .icon {
  filter: brightness(0) invert(1) !important;
}

/* ---- צ'קבוקס מותאם ---- */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-check-label {
  font-size: 14px;
  cursor: pointer;
}

/* ---- חלוקת גריד ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ---- פסי טאבים ---- */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  gap: 2px;
}

.tab-btn {
  padding: 9px 18px;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ---- הודעות ריקות ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 15px;
}

/* ---- כספים: שורת סה"כ וטבלה ריקה ---- */
/* שורת סה"כ בטבלאות כספים - מעוצבת כמו כותרת הטבלה */
table.data-table tfoot tr.finance-total-row,
table.data-table tfoot tr.finance-total-row td {
  background: var(--bg-main) !important;
  color: var(--text-main) !important;
}
table.data-table tfoot tr.finance-total-row td {
  padding: 10px 14px !important;
  border-top: 2px solid var(--border-light) !important;
  vertical-align: middle !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}

.finance-empty-msg {
  text-align: right !important;
  padding: 20px 16px !important;
  color: var(--text-main);
  font-weight: 600;
  font-size: 15px;
  background: var(--bg-card);
}

/* טבלאות תשלומים: רוחב עמודות אחיד */
.payment-table {
  table-layout: fixed;
}

/* ---- spinner ---- */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

/* ---- Tooltip ---- */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  right: 50%;
  transform: translateX(50%);
  background: var(--text-main);
  color: #fff;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
}

/* ---- אנימציות ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ---- שונות ---- */
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.fw-bold { font-weight: 700; }
.fw-medium { font-weight: 500; }
.fs-sm { font-size: 12px; }
.fs-md { font-size: 14px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 14px; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 20px; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }

/* ---- מסך עמוד פרויקט פנימי ---- */
.project-header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}

.back-link:hover { color: var(--primary); }

/* ---- פריסת תשלומים ---- */
.payments-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.payment-item {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  flex: 0 0 auto;
  width: 200px;
}

.payment-item .payment-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  #sidebar {
    width: 54px;
    overflow: hidden;
  }

  #sidebar ul li a span:not(.nav-icon),
  #sidebar ul li .nav-item span:not(.nav-icon),
  #sidebar .nav-section-title {
    display: none;
  }

  /* כשהסיידבר פתוח (מובייל) – הצג טקסט */
  #sidebar.open {
    width: 220px !important;
    overflow: visible;
  }

  #sidebar.open ul li a span:not(.nav-icon),
  #sidebar.open ul li .nav-item span:not(.nav-icon),
  #sidebar.open .nav-section-title {
    display: inline !important;
  }

  #main-content {
    padding: 16px;
  }

  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .modal-box { width: 96%; }
  #main-content { padding: 12px; }
}

/* ---- Modal – סגירה רק דרך כפתורים ---- */
.modal-overlay {
  pointer-events: all;
}
/* ביטול cursor pointer על רקע modal */
.modal-overlay.show {
  cursor: default;
}

/* ---- Date input – רוחב מינימלי ---- */
input.date-input {
  min-width: 155px !important;
}
input.date-input + span { /* אייקון */
  pointer-events: all;
}

/* ---- Mini Date Picker ---- */
.mini-datepicker {
  font-family: var(--font);
  font-size: 13px;
}
.mini-datepicker button {
  font-family: var(--font);
}

/* ---- Date input בתוך טבלה – תצוגה תקינה ---- */
td input.date-input {
  min-width: 0 !important;
  width: 155px !important;
  box-sizing: border-box;
  display: inline-block;
}
/* wrapper div שנוצר ע"י initDateInput */
td input.date-input ~ span {
  position: absolute !important;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}
td > div[style*="position:relative"],
td .date-wrapper {
  display: inline-flex !important;
  align-items: center;
  width: 155px;
  position: relative;
}

/* ════════════════════════════════════════════
   MOBILE – טבלאות גלילה + file-bar מותאם
   ════════════════════════════════════════════ */

/* ── טבלאות – גלילה רוחבית בכל גודל מסך ── */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  min-width: 600px;  /* מונע קריסה של עמודות */
}

/* ── file-bar – מובייל ── */
@media (max-width: 768px) {

  #file-bar {
    padding: 6px 12px;
    gap: 8px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  /* הסתר שם קובץ ויוזר בטלפון קטן – רק כפתורים */
  #file-bar .user-info,
  #file-bar .file-name-display,
  #file-bar [style*="color:var(--text-muted)"] {
    display: none;
  }

  /* כפתורי file-bar קטנים יותר */
  #file-bar .btn {
    padding: 4px 8px;
    font-size: 12px;
  }

  /* כותרת עמוד */
  .page-title { font-size: 18px; }
  .page-header { flex-wrap: wrap; gap: 8px; }
  .page-header > div:last-child { width: 100%; }

  /* תפריט צד – נסתר לחלוטין, נפתח בלחיצה */
  #sidebar {
    position: fixed;
    right: -220px;
    top: 0;
    bottom: 0;
    z-index: 300;
    transition: right 0.25s ease;
    box-shadow: none;
    width: 220px !important;
  }

  #sidebar.open {
    right: 0;
    box-shadow: -4px 0 20px rgba(0,0,0,.15);
  }

  /* כפתור hamburger */
  #hamburger-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 18px;
    flex-shrink: 0;
  }

  /* overlay מאחורי תפריט פתוח */
  #sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 299;
  }

  #sidebar-overlay.show { display: block; }

  /* תוכן ראשי – רוחב מלא */
  #app-body { flex-direction: column; }
  #main-content { padding: 12px; width: 100%; }

  /* כרטיסי סטטיסטיקה – 2 בשורה */
  .grid-4 { grid-template-columns: 1fr 1fr !important; }
  .grid-3 { grid-template-columns: 1fr 1fr !important; }

  /* modal – מסך מלא במובייל */
  .modal-box {
    width: 100% !important;
    max-width: 100%;
    margin: 0;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    max-height: 90vh;
    overflow-y: auto;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .modal-overlay.show {
    align-items: flex-end;
  }

  /* פריסת תשלומים */
  .payment-item { width: 160px !important; }

  /* header */
  #app-header {
    padding: 10px 14px;
  }

  #app-header .logo-text { font-size: 16px; }

  /* טבלאות – גלילה */
  .table-wrapper {
    border-radius: var(--radius-sm);
  }
}

@media (max-width: 480px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr !important; }
  .stat-card { padding: 10px 12px; }
  .stat-value { font-size: 20px; }
}

/* hamburger תמיד מוסתר בדסקטופ */
#hamburger-btn { display: none; }


/* ══ מחוון שמירה גלובלי ══ */
.global-save-indicator {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-right: 10px;
  transition: all 0.2s;
}
.global-save-indicator.saving {
  background: #5B7FA6;
  color: #fff;
  animation: sm-pulse 1.5s ease-in-out infinite;
}
.global-save-indicator.pending {
  background: #e8a000;
  color: #fff;
}
@keyframes sm-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}


/* ═══════════════════════════════════════════════════════════════════
   THEME: DARK
   ───────────────────────────────────────────────────────────────────
   ערכת נושא כהה ל-Studio Manager.
   נטען דינמית כשהמשתמשת בוחרת בהגדרות בדרופדאון "כהה".
   הופעל ע"י class="theme-dark" על html (מיידי) ועל body (אחרי DOMContentLoaded).
   ═══════════════════════════════════════════════════════════════════ */

/* ═══ משתני CSS - שינוי הצבעים הבסיסיים ═══ */


/* ═══ אלמנטים מבניים ═══ */

[data-theme="dark"] #app-wrapper { background: #181818; }
[data-theme="dark"] #app-body { background: #181818; }
[data-theme="dark"] #main-content { background: #181818; }
[data-theme="dark"] #app-header { background: #1f1f1f; border-color: #3a3a3a; }
[data-theme="dark"] #app-header .logo-text { color: #e8e8e8; }
[data-theme="dark"] #app-header .logo-text span { color: #7BA0CC; }
[data-theme="dark"] #file-bar { background: #2a3340 !important; border-bottom-color: #3a3a3a; color: #e8e8e8; }
[data-theme="dark"] #file-bar .user-info { color: #c8c8c8; }
[data-theme="dark"] #file-bar .file-name-display { color: #e8e8e8; }
[data-theme="dark"] #file-bar .file-name-display:hover { color: #7BA0CC; }
[data-theme="dark"] #sidebar { background: #1f1f1f; border-color: #3a3a3a; }
[data-theme="dark"] #sidebar a { color: #c8c8c8; }
[data-theme="dark"] #sidebar a:hover { background: #2a3340; color: #e8e8e8; }
[data-theme="dark"] #sidebar a.active { background: #2a3340; color: #7BA0CC; }
[data-theme="dark"] .settings-gear { color: #a8a8a8 !important; }
[data-theme="dark"] .settings-gear:hover { color: #e8e8e8 !important; }

/* ═══ Cards ═══ */
[data-theme="dark"] .card { background: #232323; border-color: #3a3a3a; color: #e8e8e8; }
[data-theme="dark"] .card-header { background: #1f1f1f; border-color: #3a3a3a; }
[data-theme="dark"] .card-title { color: #e8e8e8; }
[data-theme="dark"] .stat-card { background: #232323; color: #e8e8e8; border-color: #3a3a3a; }
[data-theme="dark"] .stat-card:hover { background: #2a3340; }
[data-theme="dark"] .stat-card .stat-value { color: #7BA0CC; }
[data-theme="dark"] .stat-card .stat-label { color: #a8a8a8; }

/* ═══ Page header ═══ */
[data-theme="dark"] .page-title { color: #e8e8e8; }
[data-theme="dark"] .page-subtitle { color: #a8a8a8; }
[data-theme="dark"] .muted, [data-theme="dark"] .text-muted { color: #a8a8a8 !important; }

/* ═══ Tables ═══ */
[data-theme="dark"] table.data-table { background: #232323; }
[data-theme="dark"] table.data-table thead th {
  background: #1f1f1f;
  color: #c8c8c8;
  border-color: #3a3a3a;
}
[data-theme="dark"] table.data-table tbody td { color: #e8e8e8; border-color: #2a2a2a; }
[data-theme="dark"] table.data-table tbody tr:hover { background: #2a3340; }

/* ═══ Forms ═══ */
[data-theme="dark"] .form-control,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #1f1f1f !important;
  border-color: #3a3a3a !important;
  color: #e8e8e8 !important;
}
[data-theme="dark"] .form-control:focus { border-color: #7BA0CC !important; }
[data-theme="dark"] .form-label { color: #c8c8c8; }
[data-theme="dark"] select option { background: #1f1f1f; color: #e8e8e8; }
[data-theme="dark"] input[type="checkbox"],
[data-theme="dark"] input[type="radio"] { accent-color: #7BA0CC; }

/* ═══ Buttons ═══ */
[data-theme="dark"] .btn-primary { background: #7BA0CC; color: #fff; border-color: #7BA0CC; }
[data-theme="dark"] .btn-primary:hover { background: #6488B0; }
[data-theme="dark"] .btn-ghost { color: #c8c8c8; }
[data-theme="dark"] .btn-ghost:hover { background: #2a3340; color: #e8e8e8; }
[data-theme="dark"] .btn-danger { background: #c0675a; color: #fff; }
[data-theme="dark"] .btn-google { background: #1f1f1f !important; color: #e8e8e8 !important; border-color: #3a3a3a !important; }
[data-theme="dark"] .btn-google:hover { background: #2a3340 !important; }
[data-theme="dark"] .filter-mode-btn { background: #1f1f1f !important; color: #e8e8e8; border-color: #3a3a3a; }

/* ═══ Modals ═══ */
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.7); }
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-dialog,
[data-theme="dark"] .modal { background: #232323; color: #e8e8e8; }
[data-theme="dark"] .modal-header { background: #1f1f1f; color: #e8e8e8; border-bottom-color: #3a3a3a; }
[data-theme="dark"] .modal-title { color: #e8e8e8; }
[data-theme="dark"] .modal-body { background: #232323; color: #e8e8e8; }
[data-theme="dark"] .modal-footer { background: #1f1f1f; border-top-color: #3a3a3a; }

/* ═══ Empty states ═══ */
[data-theme="dark"] table.data-table tfoot tr.finance-total-row,
[data-theme="dark"] table.data-table tfoot tr.finance-total-row td {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-main) !important;
}
[data-theme="dark"] table.data-table tfoot tr.finance-total-row td {
  border-top-color: var(--border-light) !important;
}

[data-theme="dark"] .finance-empty-msg {
  background: var(--bg-card);
  color: var(--text-main);
}

[data-theme="dark"] .empty-state,
[data-theme="dark"] .empty,
[data-theme="dark"] .no-data,
[data-theme="dark"] .file-empty,
[data-theme="dark"] [class*="empty-"] { background: #232323 !important; color: #a8a8a8 !important; }
[data-theme="dark"] .empty-icon { opacity: 0.6; }

/* ═══ Badges ═══ */
[data-theme="dark"] .badge-blue { background: #2a3340; color: #7BA0CC; }
[data-theme="dark"] .badge-green { background: #1c3a1c; color: #6cb86c; }
[data-theme="dark"] .badge-gray { background: #2a2a2a; color: #a8a8a8; }
[data-theme="dark"] .badge-red { background: #3a1f1f; color: #e08070; }
[data-theme="dark"] .badge-yellow { background: #3a3320; color: #e8b860; }

/* ═══ Alerts ═══ */
[data-theme="dark"] .alert { background: #232323; color: #e8e8e8; border-color: #3a3a3a; }
[data-theme="dark"] .alert-info { background: #1c3340; border-color: #7BA0CC; color: #e8e8e8; }
[data-theme="dark"] .alert-success { background: #1c3a1c; border-color: #6cb86c; color: #e8e8e8; }
[data-theme="dark"] .alert-warning { background: #3a3320; border-color: #e8b860; color: #e8e8e8; }
[data-theme="dark"] .alert-danger { background: #3a1f1f; border-color: #e08070; color: #e8e8e8; }

/* ═══ Login screen / file selection ═══ */
[data-theme="dark"] #login-screen { background: #181818 !important; }
[data-theme="dark"] #file-screen { background: #181818 !important; }
[data-theme="dark"] .login-card,
[data-theme="dark"] .file-card {
  background: #232323 !important;
  border-color: #3a3a3a !important;
  color: #e8e8e8;
}
[data-theme="dark"] .file-item {
  background: #1f1f1f !important;
  color: #e8e8e8 !important;
  border: 1px solid #3a3a3a !important;
}
[data-theme="dark"] .file-item:hover { background: #2a3340 !important; }
[data-theme="dark"] .file-item .file-name { color: #e8e8e8 !important; }
[data-theme="dark"] .file-item .file-date { color: #a8a8a8 !important; }
[data-theme="dark"] .login-logo { color: #7BA0CC; }
[data-theme="dark"] .login-subtitle { color: #a8a8a8; }

/* ═══ Marketing page ═══ */
[data-theme="dark"] .marketing-row,
[data-theme="dark"] .marketing-item,
[data-theme="dark"] .content-item,
[data-theme="dark"] .item-row,
[data-theme="dark"] .task-row { background: #232323; color: #e8e8e8; border-color: #3a3a3a; }
[data-theme="dark"] .marketing-row:hover,
[data-theme="dark"] .marketing-item:hover,
[data-theme="dark"] .content-item:hover,
[data-theme="dark"] .item-row:hover,
[data-theme="dark"] .task-row:hover { background: #2a3340; }

/* ═══ Calendar ═══ */
[data-theme="dark"] .calendar-day,
[data-theme="dark"] .calendar-cell,
[data-theme="dark"] .cal-cell,
[data-theme="dark"] .day-cell,
[data-theme="dark"] .month-cell,
[data-theme="dark"] .week-col,
[data-theme="dark"] .day-view { background: #1f1f1f !important; color: #e8e8e8; border-color: #3a3a3a; }
[data-theme="dark"] .calendar-day:hover,
[data-theme="dark"] .cal-cell:hover,
[data-theme="dark"] .month-cell:hover,
[data-theme="dark"] .day-cell:hover { background: #2a3340 !important; }
[data-theme="dark"] .calendar-day.today,
[data-theme="dark"] .cal-cell.today,
[data-theme="dark"] .day-cell.today,
[data-theme="dark"] .calendar-day.selected,
[data-theme="dark"] .day-cell.selected { background: #2a3340 !important; border-color: #7BA0CC; }
[data-theme="dark"] .calendar-day.other-month,
[data-theme="dark"] .cal-cell.cal-other-month,
[data-theme="dark"] .day-cell.other-month { background: #181818 !important; color: #666; opacity: 0.5; }
[data-theme="dark"] .calendar-header,
[data-theme="dark"] .calendar-weekday,
[data-theme="dark"] .day-header { background: #1f1f1f; color: #c8c8c8; border-color: #3a3a3a; }

/* ═══ Date picker (litepicker / date-input) ═══ */
[data-theme="dark"] .litepicker,
[data-theme="dark"] .litepicker .container__main,
[data-theme="dark"] .litepicker .container__months,
[data-theme="dark"] .litepicker .container__predefined-ranges {
  background: #232323 !important;
  color: #e8e8e8 !important;
  border-color: #3a3a3a !important;
}
[data-theme="dark"] .litepicker .month-item-header,
[data-theme="dark"] .litepicker .month-item-weekdays-row {
  color: #c8c8c8 !important;
}
[data-theme="dark"] .litepicker .day-item {
  color: #e8e8e8 !important;
}
[data-theme="dark"] .litepicker .day-item:hover {
  background: #2a3340 !important;
  color: #e8e8e8 !important;
}
[data-theme="dark"] .litepicker .day-item.is-today {
  color: #7BA0CC !important;
  font-weight: 600;
}
[data-theme="dark"] .litepicker .day-item.is-locked {
  color: #555 !important;
}
[data-theme="dark"] .litepicker .button-previous-month,
[data-theme="dark"] .litepicker .button-next-month {
  color: #e8e8e8 !important;
}
[data-theme="dark"] .litepicker .button-previous-month:hover,
[data-theme="dark"] .litepicker .button-next-month:hover {
  background: #2a3340 !important;
}
[data-theme="dark"] .litepicker .month-item {
  background: #232323 !important;
}

/* date input native (browser-rendered) - חלקי, לא נשלט במלואו */
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input.date-input {
  background: #1f1f1f !important;
  color: #e8e8e8 !important;
  border-color: #3a3a3a !important;
  color-scheme: dark;
}

/* ═══ Dropdown menus ═══ */
[data-theme="dark"] .dropdown-menu { background: #1f1f1f; border-color: #3a3a3a; }
[data-theme="dark"] .dropdown-item { color: #e8e8e8; }
[data-theme="dark"] .dropdown-item:hover { background: #2a3340; }
[data-theme="dark"] .autocomplete-list { background: #1f1f1f; border-color: #3a3a3a; }
[data-theme="dark"] .autocomplete-list li { color: #e8e8e8; }
[data-theme="dark"] .autocomplete-list li:hover { background: #2a3340; }

/* ═══ Misc ═══ */
[data-theme="dark"] hr { border-color: #3a3a3a; }
[data-theme="dark"] code,
[data-theme="dark"] pre { background: #1f1f1f; color: #e8e8e8; }
[data-theme="dark"] .bg-light { background: #2a2a2a !important; color: #e8e8e8; }
[data-theme="dark"] .bg-white { background: #232323 !important; color: #e8e8e8; }
[data-theme="dark"] .toast { background: #232323; color: #e8e8e8; border-color: #3a3a3a; }
[data-theme="dark"] #global-save-indicator { background: #1f1f1f; color: #c8c8c8; }
[data-theme="dark"] .dropdown-with-edit .btn-dots { background: #1f1f1f; color: #c8c8c8; border-color: #3a3a3a; }
[data-theme="dark"] .note-item { background: #232323; border-color: #3a3a3a; color: #e8e8e8; }
[data-theme="dark"] .stage-section,
[data-theme="dark"] .stage-header { background: #232323; border-color: #3a3a3a; color: #e8e8e8; }
[data-theme="dark"] .timer-btn.stopped { background: #1c3a1c; color: #6cb86c; }
[data-theme="dark"] .timer-btn.running { background: #3a1f1f; color: #e08070; }

/* ═══ Mini date picker (custom Hebrew) ═══ */
[data-theme="dark"] .mini-datepicker {
  background: #232323 !important;
  color: #e8e8e8 !important;
  border-color: #3a3a3a !important;
}
[data-theme="dark"] .mini-datepicker button { color: #e8e8e8 !important; }
[data-theme="dark"] .mini-datepicker strong { color: #e8e8e8 !important; }
[data-theme="dark"] .mini-datepicker div { color: #e8e8e8; }


/* ═══════════════════════════════════════════════════════════════
   Icon System - SVG icons from icons/ folder
   Source files are 48x48 black icons on transparent background
   Sizes are controlled by CSS, color via filters
   ═══════════════════════════════════════════════════════════════ */
/* ═══ Icon System ═══ */
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  /* Default size if no size class specified */
  width: 20px;
  height: 20px;
  /* Light theme: keep dark, slightly muted to match text */
  filter: brightness(0) saturate(100%) opacity(0.85);
}

/* Size variants */
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 18px; height: 18px; }
.icon-md { width: 24px; height: 24px; }
.icon-lg { width: 32px; height: 32px; }
.icon-xl { width: 48px; height: 48px; }
.icon-2xl { width: 64px; height: 64px; }

/* Color: white (for colored backgrounds and dark theme) */
.icon-white,
[data-theme="dark"] .icon {
  filter: brightness(0) invert(1);
}

/* On primary buttons (dark blue): always white */
.btn-primary .icon,
.colored-bg .icon {
  filter: brightness(0) invert(1) !important;
}

/* In stat-icon (colored backgrounds with colored content): 
   Use color filters to match the brand colors */
.stat-icon .icon {
  width: 24px;
  height: 24px;
  /* Match the stat-icon text color */
}
/* Blue stat icon */
.stat-icon.blue .icon {
  filter: brightness(0) saturate(100%) invert(45%) sepia(13%) saturate(2018%) hue-rotate(176deg) brightness(91%) contrast(85%);
}
/* Green stat icon */
.stat-icon.green .icon {
  filter: brightness(0) saturate(100%) invert(54%) sepia(8%) saturate(1654%) hue-rotate(60deg) brightness(94%) contrast(85%);
}
/* Orange stat icon */
.stat-icon.orange .icon {
  filter: brightness(0) saturate(100%) invert(64%) sepia(33%) saturate(835%) hue-rotate(346deg) brightness(95%) contrast(91%);
}
/* Red stat icon */
.stat-icon.red .icon {
  filter: brightness(0) saturate(100%) invert(48%) sepia(34%) saturate(645%) hue-rotate(326deg) brightness(95%) contrast(85%);
}
/* Brown/accent stat icon */
.stat-icon.brown .icon {
  filter: brightness(0) saturate(100%) invert(45%) sepia(15%) saturate(720%) hue-rotate(16deg) brightness(93%) contrast(85%);
}

/* Empty state icons - centered, light grey */
.empty-icon .icon,
.empty-state .icon {
  width: 48px;
  height: 48px;
  filter: brightness(0) opacity(0.3);
}

[data-theme="dark"] .empty-icon .icon,
[data-theme="dark"] .empty-state .icon {
  filter: brightness(0) invert(1) opacity(0.4);
}

/* Icon button (icon-only buttons in tables) */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
}
.btn-icon:hover {
  background: var(--bg-hover, rgba(0,0,0,0.06));
}
.btn-icon .icon {
  width: 16px;
  height: 16px;
}

/* Icon + text inline (e.g. in buttons with text) */
.btn .icon {
  margin-left: 4px;
  margin-right: 0;
}
[dir="ltr"] .btn .icon {
  margin-left: 0;
  margin-right: 4px;
}

/* Side menu icons - bigger */
.sidebar .icon,
.side-menu .icon,
.menu-item .icon {
  width: 20px;
  height: 20px;
}

