/* ============================================================
   APPLE DESIGN SYSTEM - REFINED & CLEAN
   ============================================================ */

/* 1. טיפוגרפיה ומערכת מגע */
:root {
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Rubik", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Rubik", system-ui, sans-serif;
}

html {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .page-title, .month-label, .login-brand h1 {
  font-family: var(--display);
  letter-spacing: -0.022em;
}

/* 2. פידבק לחיצה — הועבר ל-styles.css ("APPLE OVERLAY SYSTEM") */

/* 3. לוח ומעטפת במצב כהה */
html[data-theme="dark"] .calendar-wrap {
  background: rgba(24, 26, 31, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 18px !important;
}

html[data-theme="dark"] .day-cell {
  background: rgba(26, 34, 52, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 10px !important;
}

html[data-theme="dark"] .day-cell:hover {
  background: rgba(35, 46, 70, 0.9) !important;
  border-color: rgba(96, 165, 250, 0.5) !important;
}

html[data-theme="dark"] .day-num {
  font-family: var(--display) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 600 !important;
  font-size: 15px !important;
}

/* 4. תגיות משמרות נקיות וקריאות */
.day-shift {
  border-radius: 5px !important;
  padding: 3px 7px !important;
  margin-top: 2px !important;
  border: none !important;
}

html[data-theme="dark"] .day-shift.night,
html[data-theme="dark"] .day-shift.other,
html[data-theme="dark"] .day-security-coverage-marker {
  background: rgba(99, 102, 241, 0.25) !important;
}
html[data-theme="dark"] .day-shift.night .day-shift-names,
html[data-theme="dark"] .day-shift.other .day-shift-names,
html[data-theme="dark"] .day-security-coverage-marker .day-shift-names {
  color: #e0e7ff !important;
  font-weight: 600 !important;
}

html[data-theme="dark"] .day-shift.morning {
  background: rgba(245, 158, 11, 0.25) !important;
}
html[data-theme="dark"] .day-shift.morning .day-shift-names {
  color: #fef3c7 !important;
  font-weight: 600 !important;
}

html[data-theme="dark"] .day-shift.evening {
  background: rgba(20, 184, 166, 0.25) !important;
}
html[data-theme="dark"] .day-shift.evening .day-shift-names {
  color: #ccfbf1 !important;
  font-weight: 600 !important;
}

/* 5. קפסולת ניווט חודש */
.month-nav {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 999px !important;
  padding: 3px 6px !important;
  gap: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
}

.month-label {
  font-family: var(--display) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: -0.015em !important;
  color: rgba(255, 255, 255, 0.95) !important;
  min-width: 120px !important;
}

.month-nav .btn-circle {
  width: 28px !important;
  height: 28px !important;
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 14px !important;
  box-shadow: none !important;
  border-radius: 50% !important;
}

/* 6. אינדיקטור ליום הנוכחי */
.day-cell.is-today .day-num {
  background: var(--brand) !important;
  color: #ffffff !important;
  width: 22px !important;
  height: 22px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-top: -2px;
}

/* 7. יום נבחר */
html[data-theme="dark"] .day-cell.is-selected {
  background: rgba(30, 58, 138, 0.35) !important;
  border: 1.5px solid #3b82f6 !important;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.3) !important;
}

html[data-theme="dark"] .day-cell.is-selected .day-num {
  color: #60a5fa !important;
  font-weight: 700 !important;
}

/* 8. פאנל יום נבחר ומודאלים */
html[data-theme="dark"] .detail-head {
  background: rgba(24, 26, 31, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 2px solid #3b82f6 !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5) !important;
  border-radius: 18px 18px 0 0 !important;
}

.swap-modal, .cmd-palette-box, .bulk-cal-modal, .assign-pop {
  border-radius: 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
}

/* ============================================================
   APPLE MODAL & SHEET SYSTEM (18px, Vibrancy Glass, Hierarchical Buttons)
   ============================================================ */

/* מעטפת המודאל - משטח זכוכית מוגבה ועמוק */
.whats-new-modal,
.whats-new-card,
.swap-modal,
.cmd-palette-box,
.bulk-cal-modal,
.assign-pop,
.modal-content,
.custom-modal-box {
  background: rgba(22, 28, 44, 0.88) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2) !important;
  overflow: hidden !important;
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1), opacity 200ms ease !important;
}

/* רקע עמעום חלון (Backdrop) */
.modal-backdrop,
.whats-new-backdrop {
  background: rgba(5, 10, 20, 0.72) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

/* כותרת המודאל ותגיות */
.whats-new-header,
.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 16px 20px !important;
}

/* כפתור סגירה עגול (iOS Dismiss Button) */
.whats-new-close,
.modal-close-btn {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease, opacity 120ms ease, transform 120ms ease !important;
}
.whats-new-close:hover,
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

/* שורות פריטים בתוך המודאל */
.whats-new-item,
.modal-section-item {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  margin-bottom: 10px !important;
}

/* כפתור אישור ראשי מודגש (iOS Primary Blue) */
.whats-new-btn,
.modal-footer .btn-primary {
  background: #2563eb !important;
  border: 1px solid #3b82f6 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  border-radius: 10px !important;
  padding: 8px 18px !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease, opacity 120ms ease, transform 120ms ease !important;
}
.whats-new-btn:hover,
.modal-footer .btn-primary:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45) !important;
}
