/* ============================
   Shift Calendar — Design System
   Minimalistic & Precious
   ============================ */

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

/* --- CSS Variables (Dark Default) --- */
:root {
  --bg-primary: #0C0A09;
  --bg-secondary: #1C1917;
  --bg-card: #1C1917;
  --text-primary: #FAFAF9;
  --text-secondary: #A8A29E;
  --text-muted: #78716C;
  --accent: #F59E0B;
  --accent-light: #451A03;
  --accent-hover: #FBBF24;
  --border: #292524;
  --border-light: #1C1917;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shift colors */
  --shift-shift: #FAFAF9;
  --shift-shift-bg: #57534E;
  --shift-sick: #EF4444;
  --shift-sick-bg: #450a0a;
  --shift-dayoff: #3B82F6;
  --shift-dayoff-bg: #1E3A5F;
  --shift-vacation: #10B981;
  --shift-vacation-bg: #064E3B;
  --shift-custom1: #EC4899;
  --shift-custom1-bg: #500724;
  --shift-custom2: #F59E0B;
  --shift-custom2-bg: #451A03;
}

/* Light mode */
[data-theme="light"] {
  --bg-primary: #FAFAF9;
  --bg-secondary: #F5F5F4;
  --bg-card: #FFFFFF;
  --text-primary: #1C1917;
  --text-secondary: #78716C;
  --text-muted: #A8A29E;
  --accent: #D97706;
  --accent-light: #FEF3C7;
  --accent-hover: #B45309;
  --border: #E7E5E4;
  --border-light: #F5F5F4;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.06);
  --shadow-lg: 0 12px 32px rgba(28, 25, 23, 0.08);
  --shadow-xl: 0 20px 48px rgba(28, 25, 23, 0.12);

  --shift-shift: #F5F5F4;
  --shift-shift-bg: #44403C;
  --shift-sick-bg: #FEF2F2;
  --shift-dayoff-bg: #DBEAFE;
  --shift-vacation-bg: #D1FAE5;
  --shift-custom1-bg: #FCE7F3;
  --shift-custom2-bg: #FEF3C7;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

/* --- Layout --- */
.app-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header --- */
.header {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.logo-icon-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

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

.btn-outline:hover {
  border-color: var(--text-muted);
  background: var(--bg-secondary);
}

.btn-danger {
  background: transparent;
  color: #EF4444;
  padding: 6px 10px;
  font-size: 12px;
}

.btn-danger:hover {
  background: #FEF2F2;
}

[data-theme="dark"] .btn-danger:hover {
  background: #450a0a;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 16px;
}

.btn-icon:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
  background: var(--bg-secondary);
}

#langToggle {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-family: inherit;
}

/* --- Calendar Header --- */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.calendar-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.calendar-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 18px;
}

.nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.today-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.today-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Calendar Grid --- */
.calendar-grid {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.weekday {
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
  min-height: 100px;
  padding: 8px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}

.calendar-day:nth-child(7n) {
  border-right: none;
}

.calendar-day:hover {
  background: var(--bg-secondary);
}

.calendar-day.other-month {
  opacity: 0.35;
}

.calendar-day.today {
  background: var(--accent-light);
}

.calendar-day.today .day-number {
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day.admin-mode {
  cursor: pointer;
}

.calendar-day.admin-mode:hover {
  background: var(--accent-light);
}

.day-number {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.day-shifts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* --- Shift Pills --- */
.shift-pill {
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  transition: all var(--transition);
  position: relative;
}

.shift-pill:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-sm);
}

.shift-pill.admin-mode {
  cursor: pointer;
}

.shift-shift     { background: var(--shift-shift-bg); color: var(--shift-shift); }
.shift-sick      { background: var(--shift-sick-bg); color: var(--shift-sick); }
.shift-dayoff    { background: var(--shift-dayoff-bg); color: var(--shift-dayoff); }
.shift-vacation  { background: var(--shift-vacation-bg); color: var(--shift-vacation); }
.shift-custom1   { background: var(--shift-custom1-bg); color: var(--shift-custom1); }
.shift-custom2   { background: var(--shift-custom2-bg); color: var(--shift-custom2); }

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 420px;
  padding: 32px;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-slow);
  position: relative;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-size: 18px;
}

.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text-primary);
}

/* --- Forms --- */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: all var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* --- Color Picker --- */
.color-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.color-option:hover {
  transform: scale(1.15);
}

.color-option.selected {
  border-color: var(--text-primary);
  transform: scale(1.1);
}

.color-option.selected::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
}

.color-shift    { background: var(--shift-shift-bg); border: 2px solid var(--text-muted); }
.color-shift.selected { border-color: var(--text-primary); }
.color-sick     { background: var(--shift-sick); }
.color-dayoff   { background: var(--shift-dayoff); }
.color-vacation { background: var(--shift-vacation); }
.color-custom1  { background: var(--shift-custom1); }
.color-custom2  { background: var(--shift-custom2); }

/* --- Form Actions --- */
.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* --- Admin Badge --- */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* --- Legend --- */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 32px 0;
  margin-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

.slide-up {
  animation: slideUp 0.5s ease-out forwards;
}

/* Staggered animation for calendar days */
.calendar-day {
  animation: fadeIn 0.3s ease-out forwards;
  opacity: 0;
}

.calendar-day:nth-child(1)  { animation-delay: 0.01s; }
.calendar-day:nth-child(2)  { animation-delay: 0.02s; }
.calendar-day:nth-child(3)  { animation-delay: 0.03s; }
.calendar-day:nth-child(4)  { animation-delay: 0.04s; }
.calendar-day:nth-child(5)  { animation-delay: 0.05s; }
.calendar-day:nth-child(6)  { animation-delay: 0.06s; }
.calendar-day:nth-child(7)  { animation-delay: 0.07s; }
.calendar-day:nth-child(8)  { animation-delay: 0.08s; }
.calendar-day:nth-child(9)  { animation-delay: 0.09s; }
.calendar-day:nth-child(10) { animation-delay: 0.10s; }
.calendar-day:nth-child(11) { animation-delay: 0.11s; }
.calendar-day:nth-child(12) { animation-delay: 0.12s; }
.calendar-day:nth-child(13) { animation-delay: 0.13s; }
.calendar-day:nth-child(14) { animation-delay: 0.14s; }
.calendar-day:nth-child(15) { animation-delay: 0.15s; }
.calendar-day:nth-child(16) { animation-delay: 0.16s; }
.calendar-day:nth-child(17) { animation-delay: 0.17s; }
.calendar-day:nth-child(18) { animation-delay: 0.18s; }
.calendar-day:nth-child(19) { animation-delay: 0.19s; }
.calendar-day:nth-child(20) { animation-delay: 0.20s; }
.calendar-day:nth-child(21) { animation-delay: 0.21s; }
.calendar-day:nth-child(22) { animation-delay: 0.22s; }
.calendar-day:nth-child(23) { animation-delay: 0.23s; }
.calendar-day:nth-child(24) { animation-delay: 0.24s; }
.calendar-day:nth-child(25) { animation-delay: 0.25s; }
.calendar-day:nth-child(26) { animation-delay: 0.26s; }
.calendar-day:nth-child(27) { animation-delay: 0.27s; }
.calendar-day:nth-child(28) { animation-delay: 0.28s; }
.calendar-day:nth-child(29) { animation-delay: 0.29s; }
.calendar-day:nth-child(30) { animation-delay: 0.30s; }
.calendar-day:nth-child(31) { animation-delay: 0.31s; }
.calendar-day:nth-child(32) { animation-delay: 0.32s; }
.calendar-day:nth-child(33) { animation-delay: 0.33s; }
.calendar-day:nth-child(34) { animation-delay: 0.34s; }
.calendar-day:nth-child(35) { animation-delay: 0.35s; }
.calendar-day:nth-child(36) { animation-delay: 0.36s; }
.calendar-day:nth-child(37) { animation-delay: 0.37s; }
.calendar-day:nth-child(38) { animation-delay: 0.38s; }
.calendar-day:nth-child(39) { animation-delay: 0.39s; }
.calendar-day:nth-child(40) { animation-delay: 0.40s; }
.calendar-day:nth-child(41) { animation-delay: 0.41s; }
.calendar-day:nth-child(42) { animation-delay: 0.42s; }

/* --- Tooltip --- */
.shift-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 100;
}

.shift-pill:hover .shift-tooltip {
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .app-container {
    padding: 0 16px;
  }

  .header {
    padding: 16px 0;
    margin-bottom: 20px;
  }

  .calendar-title {
    font-size: 22px;
  }

  .calendar-day {
    min-height: 72px;
    padding: 4px;
  }

  .day-number {
    font-size: 12px;
    width: 24px;
    height: 24px;
  }

  .shift-pill {
    font-size: 9px;
    padding: 2px 4px;
  }

  .modal {
    margin: 16px;
    padding: 24px;
  }

  .legend {
    gap: 10px;
    padding: 12px 14px;
  }
}

@media (max-width: 480px) {
  .calendar-day {
    min-height: 56px;
    padding: 2px;
  }

  .weekday {
    font-size: 10px;
    padding: 8px 2px;
  }

  .shift-pill {
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 4px;
  }

  .calendar-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .logo-text {
    font-size: 15px;
  }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Selection --- */
::selection {
  background: var(--accent);
  color: white;
}

/* --- Password visibility toggle --- */
.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}

/* --- Event Preview Modal --- */
.preview-modal {
  max-width: 440px;
}

.preview-date-display {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.preview-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
}

.preview-event-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
  transition: all var(--transition);
  position: relative;
}

.preview-event-card:hover {
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
}

.preview-event-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.preview-event-info {
  flex: 1;
  min-width: 0;
}

.preview-event-time {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.preview-event-label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-event-type {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.preview-event-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.preview-event-edit-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.preview-event-edit-btn:hover {
  background: var(--accent);
  color: white;
}

.preview-no-events {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.preview-no-events-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

.preview-actions {
  margin-top: 16px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* --- Request Form & Cards --- */
.request-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0 16px;
}

.request-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.form-textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}

.request-success {
  text-align: center;
  color: #10B981;
  font-size: 13px;
  font-weight: 500;
  margin-top: 10px;
  padding: 8px;
  background: #D1FAE5;
  border-radius: var(--radius-sm);
  animation: fadeIn 0.3s ease-out;
}

[data-theme="dark"] .request-success {
  background: #064E3B;
}

/* Request cards (admin view) */
.request-card {
  padding: 12px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--shift-custom1);
  margin-bottom: 8px;
  animation: fadeIn 0.2s ease-out;
}

.request-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.request-card-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.request-card-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.request-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
}

.request-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: auto;
}

.request-status-pending {
  background: #FEF3C7;
  color: #D97706;
}

.request-status-approved {
  background: #D1FAE5;
  color: #10B981;
}

.request-status-rejected {
  background: #FEF2F2;
  color: #EF4444;
}

[data-theme="dark"] .request-status-pending {
  background: #451A03;
}

[data-theme="dark"] .request-status-approved {
  background: #064E3B;
}

[data-theme="dark"] .request-status-rejected {
  background: #450a0a;
}

.request-action-btn {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.request-approve-btn {
  color: #10B981;
  border-color: #10B981;
}

.request-approve-btn:hover {
  background: #10B981;
  color: white;
}

.request-reject-btn {
  color: #EF4444;
  border-color: #EF4444;
}

.request-reject-btn:hover {
  background: #EF4444;
  color: white;
}

.request-delete-btn {
  color: var(--text-muted);
  border-color: var(--border);
}

.request-delete-btn:hover {
  background: var(--text-muted);
  color: var(--bg-primary);
}

.no-requests-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 12px;
}

.preview-modal {
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
}

/* --- Admin Dashboard --- */
.admin-dashboard {
  animation: fadeIn 0.3s ease-out;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dashboard-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.dashboard-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.dashboard-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dashboard-table thead {
  background: var(--bg-secondary);
}

.dashboard-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.dashboard-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: top;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.dashboard-table tbody tr:hover {
  background: var(--bg-secondary);
}

.dashboard-table .td-date {
  font-weight: 600;
  white-space: nowrap;
}

.dashboard-table .td-time {
  white-space: nowrap;
  color: var(--text-secondary);
}

.dashboard-table .td-message {
  max-width: 280px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-secondary);
  line-height: 1.4;
}

.dashboard-table .td-actions {
  white-space: nowrap;
}

.dashboard-table .td-actions .request-action-btn {
  margin-right: 4px;
}

.dashboard-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
  font-size: 15px;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .dashboard-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-table {
    min-width: 600px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* --- Mobile Responsive --- */
@media (max-width: 640px) {
  .header {
    padding: 12px 16px;
    flex-direction: column;
    gap: 10px;
  }

  .header-actions {
    gap: 6px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

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

  .logo-icon-img {
    width: 24px;
    height: 24px;
  }

  .calendar-header {
    padding: 0 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .calendar-title {
    font-size: 22px;
  }

  .calendar-nav {
    width: 100%;
    justify-content: flex-end;
  }

  .calendar-grid {
    padding: 0 8px;
  }

  .calendar-weekdays {
    padding: 8px 4px;
  }

  .weekday {
    font-size: 10px;
    padding: 4px 2px;
  }

  .calendar-days {
    gap: 2px;
  }

  .calendar-day {
    min-height: 52px;
    padding: 3px;
  }

  .day-number {
    font-size: 12px;
    margin-bottom: 1px;
  }

  .shift-pill {
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 3px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .shift-tooltip {
    display: none;
  }

  .day-shifts {
    gap: 1px;
  }

  /* Legend */
  .legend-container {
    padding: 12px 16px;
  }

  .legend-item {
    font-size: 11px;
  }

  .legend-dot {
    width: 6px;
    height: 6px;
  }

  /* Modals */
  .modal {
    width: 95vw;
    max-width: 95vw;
    margin: 12px;
    padding: 20px 16px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .preview-modal {
    max-width: 95vw;
  }

  .modal-title {
    font-size: 18px;
  }

  .form-row {
    flex-direction: row;
    gap: 8px;
  }

  .form-input {
    padding: 8px 10px;
    font-size: 14px;
  }

  .form-textarea {
    min-height: 60px;
  }

  /* Preview cards */
  .preview-event-card {
    padding: 8px 10px;
  }

  .preview-event-time {
    font-size: 13px;
  }

  .preview-event-type {
    font-size: 10px;
    padding: 1px 6px;
  }

  .preview-event-edit-btn {
    font-size: 10px;
    padding: 2px 8px;
  }

  /* Buttons */
  .btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .btn-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .admin-badge {
    font-size: 11px;
    padding: 3px 8px;
  }

  /* Footer */
  .footer {
    padding: 16px;
    font-size: 11px;
  }

  /* Dashboard */
  .dashboard-title {
    font-size: 20px;
  }

  .dashboard-filters {
    gap: 4px;
  }

  .filter-btn {
    padding: 5px 12px;
    font-size: 12px;
  }

  /* Request form */
  .request-section-title {
    font-size: 14px;
  }

  .request-card {
    padding: 10px 12px;
  }

  .request-card-author {
    font-size: 12px;
  }

  .request-card-message {
    font-size: 12px;
  }

  /* Today highlight */
  .today .day-number {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
}

/* Extra small screens */
@media (max-width: 380px) {
  .calendar-day {
    min-height: 44px;
    padding: 2px;
  }

  .day-number {
    font-size: 11px;
  }

  .shift-pill {
    font-size: 7px;
    padding: 1px 2px;
  }

  .header-actions {
    gap: 4px;
  }
}
