:root {
  --primary: #8B1EA3;
  --primary-dark: #6B1680;
  --primary-light: #f3e8ff;
  --green: #16a34a;
  --green-light: #dcfce7;
  --orange: #d97706;
  --orange-light: #fef3c7;
  --red: #dc2626;
  --red-light: #fee2e2;
  --gray: #6b7280;
  --gray-light: #f3f4f6;
  --gray-border: #e5e7eb;
  --text: #111827;
  --text-muted: #6b7280;
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --header-h: 60px;
  --tabs-h: 48px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-outline { background: white; color: var(--text); border: 1px solid var(--gray-border); }
.btn-outline:hover:not(:disabled) { background: var(--gray-light); }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-secondary { background: #2563eb; color: white; }
.btn-secondary:hover:not(:disabled) { background: #1d4ed8; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 6px 8px; }
.btn-green { background: var(--green); color: white; }
.btn-green:hover:not(:disabled) { background: #15803d; }

/* ===== FORM FIELDS ===== */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: white;
  transition: border 0.15s;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139,30,163,0.12); }
.field input.readonly-input { background: var(--gray-light); color: var(--text-muted); cursor: default; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.field textarea { resize: vertical; min-height: 70px; }
.required { color: var(--red); }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 8px;
}
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

.approval-note {
  background: var(--orange-light);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  color: #92400e;
  margin-top: 4px;
}

/* ===== TOGGLE SWITCH ===== */
.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  user-select: none;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 999px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* ===== APPROVAL BADGES (room table) ===== */
.badge-approval {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.badge-approval-yes {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}
.badge-approval-no {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.error-msg {
  background: var(--red-light);
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--red);
  font-size: 13px;
  margin-bottom: 12px;
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: white;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
}

/* ===== LOGIN PAGE ===== */
.page-center {
  display: flex;
  min-height: 100vh;
}

.login-brand-panel {
  flex: 1;
  position: relative;
  background: linear-gradient(160deg, #6B1680 0%, #8B1EA3 40%, #3B0764 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  overflow: hidden;
}
.login-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://www.oenergy.it/wp-content/uploads/2024/08/sfondo-mobileh.webp') center/cover no-repeat;
  opacity: 0.18;
}
.login-brand-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(107,22,128,0.85) 0%, rgba(139,30,163,0.7) 50%, rgba(59,7,100,0.92) 100%);
}
.login-brand-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}
.login-brand-logo {
  width: 200px;
  filter: brightness(0) invert(1);
}
.login-brand-image {
  width: 340px;
  max-width: 90%;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.35);
  object-fit: cover;
}
.login-brand-tagline {
  color: rgba(255,255,255,0.9);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}
.login-brand-sub {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
}

.login-form-panel {
  width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 40px 0;
  background: white;
}
.login-card {
  width: 100%;
  max-width: 380px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===== GROUP FOOTER BAR ===== */
.group-footer-bar {
  width: 100%;
  margin-top: 32px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--gray-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.group-footer-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaa;
}
.group-footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.group-logo {
  display: block;
  object-fit: contain;
}
.group-logo-oegreen {
  height: 26px;
  max-width: 100px;
}
.group-logo-tres {
  height: 32px;
  max-width: 90px;
  background: #1a1a2e;
  border-radius: 6px;
  padding: 4px 8px;
  box-sizing: content-box;
}
.group-logo-oegroup {
  height: 28px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
}
.group-logo-m2rc {
  height: 26px;
  max-width: 90px;
}
.group-logo-text {
  font-size: 13px;
  font-weight: 700;
  color: #22c55e;
  letter-spacing: -0.02em;
}
.login-logo {
  text-align: center;
  margin-bottom: 16px;
}
.login-card h1 {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}
.login-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: white;
  border-bottom: 1px solid var(--gray-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: var(--shadow);
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-logo { display: flex; }
.header-title { font-size: 16px; font-weight: 700; color: var(--text); }
.header-right { display: flex; align-items: center; gap: 10px; }
.header-user { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ===== TABS ===== */
.tabs-nav {
  display: flex;
  background: white;
  border-bottom: 1px solid var(--gray-border);
  padding: 0 20px;
  height: var(--tabs-h);
  align-items: flex-end;
}
.tab-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-content { padding: 20px; }

/* ===== CALENDAR ===== */
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.room-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.room-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}
.room-tab:hover { filter: brightness(0.95); }
.room-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.week-nav { display: flex; align-items: center; gap: 12px; }
.week-label { font-size: 14px; font-weight: 600; color: var(--text); min-width: 220px; text-align: center; }

/* ===== VIEW TOGGLE ===== */
.view-toggle {
  display: flex;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  overflow: hidden;
}
.view-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: white;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.view-btn + .view-btn { border-left: 1px solid var(--gray-border); }
.view-btn.active { background: var(--primary); color: white; }
.view-btn:hover:not(.active) { background: var(--gray-light); color: var(--text); }

.calendar-wrap { overflow-x: auto; }

/* ===== MONTH GRID ===== */
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--gray-border);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  gap: 1px;
}
.month-day-header {
  background: var(--gray-light);
  text-align: center;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.month-cell {
  background: white;
  min-height: 120px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background 0.08s;
}
.month-cell:hover { background: #faf5ff; }
.month-cell-empty {
  background: #f9fafb;
  cursor: default;
  min-height: 120px;
}
.month-cell-empty:hover { background: #f9fafb; }
.month-cell-weekend { background: #fafafa; }
.month-cell-weekend:hover { background: #f5f0ff; }

.month-day-num {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border-radius: 50%;
  flex-shrink: 0;
  margin-bottom: 2px;
}
.month-cell-today .month-day-num {
  background: var(--primary);
  color: white;
}

.month-booking-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.12s, transform 0.1s;
  flex-shrink: 0;
}
.month-booking-pill:hover { opacity: 0.85; transform: scale(1.01); }
.month-booking-pending {
  background: #9ca3af !important;
  color: white !important;
  border: 1px dashed #6b7280;
}
.month-pill-time {
  font-weight: 700;
  font-size: 10px;
  flex-shrink: 0;
  opacity: 0.85;
}
.month-pill-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.month-more {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
  padding: 1px 4px;
  cursor: default;
  margin-top: auto;
}

.calendar-grid {
  display: grid;
  grid-template-columns: 52px repeat(5, 1fr);
  grid-template-rows: 44px;
  grid-auto-rows: 32px;
  min-width: 600px;
  background: white;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.cal-header {
  background: var(--gray-light);
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  padding: 6px 4px;
  border-right: 1px solid var(--gray-border);
  border-bottom: 2px solid var(--gray-border);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 44px;
}
.cal-header.day-col { color: var(--text); }
.cal-header.today-col { background: var(--primary-light); color: var(--primary); }
.cal-header-date { font-size: 11px; font-weight: 400; margin-top: 2px; }

.cal-time {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  padding: 0 5px;
  border-right: 1px solid var(--gray-border);
  display: flex;
  align-items: flex-start;
  padding-top: 3px;
  line-height: 1;
  height: 32px;
  overflow: hidden;
}
.cal-time.cal-time-hour { font-weight: 600; color: #374151; }

.cal-slot {
  border-right: 1px solid var(--gray-border);
  border-bottom: 1px solid #ececec;
  height: 32px;
  position: relative;
  cursor: pointer;
  transition: background 0.08s;
  overflow: visible;
}
.cal-slot:last-child { border-right: none; }
.cal-slot:hover { background: rgba(139,30,163,0.04); }
.cal-slot.half-hour { border-bottom-style: dashed; border-bottom-color: #f0f0f0; }
.cal-slot.today-col { background: #fefce8; }
.cal-slot.today-col:hover { background: #fef3c7; }

.booking-block {
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  line-height: 1.3;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: opacity 0.15s, transform 0.1s;
}
.booking-block:hover { opacity: 0.88; transform: scale(1.01); }
.booking-block.pending {
  background: #9ca3af !important;
  color: white !important;
  border: 2px dashed #6b7280;
}
.bk-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-time { font-size: 10px; opacity: 0.85; font-weight: 400; }

/* ===== ROOM COLOR PICKER ===== */
.color-picker-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  font-size: 14px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, border-color 0.1s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.color-btn:hover { transform: scale(1.1); }
.color-btn.active { border-color: #111; transform: scale(1.1); }

.color-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.15s;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--gray-border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.modal-close:hover { background: var(--gray-light); }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--gray-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.modal-footer .error-msg {
  flex: 0 0 100%;
  margin-bottom: 2px;
}

/* ===== DETAIL MODAL ===== */
.detail-row {
  display: flex;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-border);
  gap: 12px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; min-width: 110px; padding-top: 1px; }

/* ===== STATUS PILLS ===== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.status-confirmed { background: var(--green-light); color: var(--green); }
.status-pending { background: #f3f4f6; color: #6b7280; }
.status-rejected { background: var(--red-light); color: var(--red); }

/* ===== ADMIN PANEL ===== */
.admin-subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--gray-light);
  padding: 4px;
  border-radius: var(--radius);
  width: fit-content;
}
.subtab-btn {
  background: none;
  border: none;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.subtab-btn.active { background: white; color: var(--text); box-shadow: var(--shadow); }

.admin-panel { }
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-header h2 { font-size: 16px; font-weight: 700; }

/* ===== APPROVAL CARDS ===== */
.approval-card {
  background: white;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.approval-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.approval-card-title { font-weight: 700; font-size: 15px; }
.approval-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.approval-card-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ===== USER TABLE ===== */
.users-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-border);
}
.users-table th {
  background: var(--gray-light);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--gray-border);
}
.users-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-border);
  font-size: 14px;
  vertical-align: middle;
}
.users-table tr:last-child td { border-bottom: none; }
.users-table tr:hover td { background: #f9fafb; }

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.role-admin { background: var(--primary-light); color: var(--primary); }
.role-user { background: var(--gray-light); color: var(--gray); }

/* ===== AUDIT LOG ===== */
.audit-table { table-layout: auto; }
.audit-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.audit-created   { background: #dcfce7; color: #166534; }
.audit-cancelled { background: #fee2e2; color: #991b1b; }
.audit-approved  { background: #ede9fe; color: #5b21b6; }
.audit-rejected  { background: #fef3c7; color: #92400e; }
.audit-edited    { background: #dbeafe; color: #1e40af; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 12px; display: block; opacity: 0.3; }
.empty-state p { font-size: 15px; }

@media (max-width: 900px) {
  .login-brand-panel { display: none; }
  .login-form-panel { width: 100%; padding: 24px 20px 0; min-height: calc(100vh - 48px); }
  .page-center { background: linear-gradient(160deg, #6B1680 0%, #8B1EA3 100%); }
  .login-form-panel { background: white; border-radius: 20px; margin: 24px; box-shadow: var(--shadow-lg); }
  .group-footer-bar { padding: 12px 0 14px; }
  .group-footer-logos { gap: 14px; }
}

@media (max-width: 640px) {
  header { padding: 0 12px; }
  .header-user { display: none; }
  .tab-content { padding: 12px; }
  .calendar-toolbar { flex-direction: column; align-items: flex-start; }
  .week-nav { width: 100%; justify-content: space-between; }
  .week-label { min-width: unset; font-size: 13px; }
  .users-table { font-size: 12px; }
  .users-table th, .users-table td { padding: 8px 10px; }
  .month-cell { min-height: 72px; padding: 4px; }
  .month-day-num { width: 20px; height: 20px; font-size: 11px; }
  .month-booking-pill { font-size: 10px; padding: 1px 4px; }
  .month-day-header { padding: 6px 2px; font-size: 10px; }
}

/* ===== TOAST NOTIFICATIONS ===== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  max-width: 320px;
  pointer-events: auto;
}
.toast-in { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--green); }
.toast-error { background: var(--red); }
.toast-info { background: var(--primary); }

/* ===== SMALL MODAL ===== */
.modal.modal-sm { max-width: 380px; }

/* ===== DAY BOOKINGS MODAL ===== */
.day-booking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.day-booking-item:hover { background: var(--gray-light); }
.day-booking-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 80px;
}
.day-booking-title {
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== MONTH MORE LINK ===== */
.month-more-link {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
}
.month-more-link:hover { text-decoration: underline; }
