/* ══════════════════════════════════════════════════════════════
   PHARMACIE PLANNING — ATELIER MÉDICAL DESIGN SYSTEM v2.0
   Fonts: Cinzel · Raleway · DM Sans · Space Mono
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Raleway:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=Space+Mono:wght@400;700&display=swap');

/* ─── DESIGN TOKENS ────────────────────────────────────────── */
:root {
  /* Sidebar */
  --sidebar-bg:      #0B1C11;
  --sidebar-width:   240px;
  --sidebar-hover:   rgba(255,255,255,0.055);
  --sidebar-active:  rgba(74,222,128,0.11);
  --sidebar-text:    #8FA897;
  --sidebar-text-hi: #FFFFFF;
  --sidebar-accent:  #4ADE80;
  --sidebar-sep:     rgba(255,255,255,0.07);

  /* Backgrounds */
  --bg:         #F3F0E8;
  --bg-surface: #FFFFFF;
  --bg-subtle:  #EAE6DC;
  --bg-muted:   #F8F6F1;

  /* Text */
  --text:       #0F1714;
  --text-muted: #5A6860;
  --text-light: #9BA8A2;

  /* Border */
  --border:       #DED9CF;
  --border-focus: #15803D;

  /* Brand green */
  --green-900: #052E16;
  --green-800: #14532D;
  --green-700: #15803D;
  --green-600: #16A34A;
  --green-500: #22C55E;
  --green-400: #4ADE80;
  --green-200: #BBF7D0;
  --green-100: #DCFCE7;
  --green-50:  #F0FDF4;

  /* Amber */
  --amber-700: #B45309;
  --amber-600: #D97706;
  --amber-100: #FEF3C7;
  --amber-50:  #FFFBEB;

  /* Red */
  --red-700: #B91C1C;
  --red-600: #DC2626;
  --red-100: #FEE2E2;
  --red-50:  #FEF2F2;

  /* Blue */
  --blue-700: #1D4ED8;
  --blue-600: #2563EB;
  --blue-100: #DBEAFE;
  --blue-50:  #EFF6FF;

  /* Semantic */
  --success:    #15803D;
  --success-bg: #DCFCE7;
  --warning:    #B45309;
  --warning-bg: #FEF3C7;
  --danger:     #B91C1C;
  --danger-bg:  #FEE2E2;
  --info:       #1D4ED8;
  --info-bg:    #DBEAFE;

  /* Fonts */
  --font-display:  'Cinzel', Georgia, serif;
  --font-heading:  'Raleway', 'Segoe UI', sans-serif;
  --font-body:     'DM Sans', 'Helvetica Neue', sans-serif;
  --font-mono:     'Space Mono', 'Courier New', monospace;

  /* Spacing */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* Radius */
  --r-sm: 6px;  --r: 10px;  --r-lg: 14px;  --r-xl: 20px;

  /* Shadows */
  --sh-sm: 0 1px 3px rgba(15,23,20,0.06), 0 1px 2px rgba(15,23,20,0.04);
  --sh:    0 2px 8px rgba(15,23,20,0.08), 0 1px 3px rgba(15,23,20,0.05);
  --sh-lg: 0 8px 24px rgba(15,23,20,0.10), 0 3px 8px rgba(15,23,20,0.06);
  --sh-xl: 0 20px 40px rgba(15,23,20,0.14), 0 6px 16px rgba(15,23,20,0.08);

  /* Transition */
  --ease: 180ms cubic-bezier(.4,0,.2,1);
}

/* ─── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
table { border-collapse: collapse; }
h1,h2,h3,h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }

/* ══════════════════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════════════════ */

.app-body { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
  border-right: 1px solid var(--sidebar-sep);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 17px;
  border-bottom: 1px solid var(--sidebar-sep);
  flex-shrink: 0;
}

.sidebar-logo-rx {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--sidebar-accent);
  letter-spacing: 0.5px;
  line-height: 1;
}

.sidebar-logo-divider {
  width: 1px; height: 18px;
  background: var(--sidebar-sep);
  flex-shrink: 0;
}

.sidebar-logo-label {
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--sidebar-text);
  line-height: 1.3;
}

.sidebar-section {
  padding: 16px 14px 6px;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.22);
  font-family: var(--font-heading);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}
.sidebar-nav::-webkit-scrollbar { width: 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-heading);
  transition: background var(--ease), color var(--ease);
  cursor: pointer;
  margin-bottom: 2px;
  position: relative;
}

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-hi);
}

.sidebar-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-hi);
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -10px; top: 18%; bottom: 18%;
  width: 3px;
  background: var(--sidebar-accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-icon {
  width: 27px; height: 27px;
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.3px;
  font-family: var(--font-heading);
  flex-shrink: 0;
  transition: background var(--ease), color var(--ease);
  color: var(--sidebar-text);
}

.sidebar-link:hover .sidebar-icon { background: rgba(255,255,255,0.10); color: var(--sidebar-accent); }
.sidebar-link.active .sidebar-icon { background: var(--sidebar-accent); color: var(--sidebar-bg); }

.sidebar-badge {
  margin-left: auto;
  background: #e74c3c;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  border-top: 1px solid var(--sidebar-sep);
  padding: 12px 10px;
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: var(--r-sm);
  margin-bottom: 4px;
}

.sidebar-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }

.sidebar-user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sidebar-text-hi);
  font-family: var(--font-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 10.5px;
  color: var(--sidebar-text);
  text-transform: capitalize;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--sidebar-text);
  font-family: var(--font-heading);
  transition: background var(--ease), color var(--ease);
}

.sidebar-logout:hover { background: rgba(239,68,68,0.10); color: #fca5a5; }

/* ─── MAIN CONTENT ──────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--sp-8);
  min-height: 100vh;
  background: var(--bg);
  max-width: calc(100vw - var(--sidebar-width));
}

/* ─── FLASH MESSAGES ─────────────────────────────────────────── */
.flash-container {
  position: fixed;
  top: 20px; right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.flash {
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--sh-lg);
  animation: flashIn 250ms ease forwards;
  border-left: 4px solid currentColor;
}

.flash-success  { background: var(--success-bg); color: var(--green-800); }
.flash-error    { background: var(--danger-bg);  color: var(--red-700); }
.flash-warning  { background: var(--warning-bg); color: var(--amber-700); }
.flash-info     { background: var(--info-bg);    color: var(--blue-700); }

@keyframes flashIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ══════════════════════════════════════════════════════════════
   PAGE STRUCTURE
   ══════════════════════════════════════════════════════════════ */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-header-left { flex: 1; min-width: 0; }
.page-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-heading);
  margin-bottom: 8px;
  transition: color var(--ease);
}
.back-link:hover { color: var(--green-700); }

/* ─── BADGES ─────────────────────────────────────────────────── */
.week-type-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 3px 10px;
  border-radius: var(--r-xl);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-A { background: var(--green-100); color: var(--green-800); border: 1px solid var(--green-200); }
.badge-B { background: var(--blue-100); color: var(--blue-700); border: 1px solid #bfdbfe; }

.status-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--r-xl);
  font-family: var(--font-heading);
  letter-spacing: 0.3px;
}

.badge-active   { background: var(--green-100); color: var(--green-800); border: 1px solid var(--green-200); }
.badge-inactive { background: var(--bg-subtle); color: var(--text-light); border: 1px solid var(--border); }

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  background: var(--warning-bg);
  color: var(--amber-700);
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
}

.employee-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-xl);
  border: 1.5px solid;
  font-family: var(--font-heading);
}

/* nav-badge kept for JS compat */
.nav-badge {
  background: #e74c3c;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--ease);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

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

.btn-primary { background: var(--green-700); color: white; border-color: var(--green-700); }
.btn-primary:hover:not(:disabled) { background: var(--green-800); border-color: var(--green-800); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg-muted); border-color: var(--border-focus); color: var(--green-700); }

.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text); }

.btn-today { font-weight: 700; color: var(--green-700); }
.btn-today:hover { background: var(--green-50); }

.btn-success { background: var(--success-bg); color: var(--success); border-color: var(--green-200); }
.btn-success:hover { background: var(--green-200); }

.btn-danger  { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fecaca; }

.btn-warning { background: var(--warning-bg); color: var(--warning); border-color: #fde68a; }
.btn-warning:hover { background: #fde68a; }

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

.btn-template {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.3px;
  transition: opacity var(--ease), transform var(--ease);
}
.btn-template:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-template-a { background: linear-gradient(135deg, var(--green-800), var(--green-600)); color: white; }
.btn-template-b { background: linear-gradient(135deg, #0369a1, #0ea5e9); color: white; }

/* ══════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════ */

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: var(--font-heading);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: var(--bg-surface);
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.10);
}

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

/* Color picker */
.color-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
}

.color-swatch-label { cursor: pointer; position: relative; }
.color-swatch-label input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.color-swatch {
  display: block;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  transition: transform var(--ease), border-color var(--ease);
  box-shadow: var(--sh-sm);
}
.color-swatch-label input[type="radio"]:checked + .color-swatch {
  border-color: var(--text);
  transform: scale(1.2);
}
.color-swatch:hover { transform: scale(1.1); }
.color-custom-label input[type="color"] {
  width: 26px; height: 26px;
  border-radius: 50%; border: none; padding: 0; cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,28,17,0.60);
  backdrop-filter: blur(3px);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 220ms cubic-bezier(.34,1.56,.64,1) forwards;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 { font-size: 16px; font-weight: 800; font-family: var(--font-heading); }

.modal-close {
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--bg-muted);
  color: var(--text-muted);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
  line-height: 1;
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }

.modal-form { padding: 20px 24px; }

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

/* ══════════════════════════════════════════════════════════════
   KPI STATS
   ══════════════════════════════════════════════════════════════ */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--ease), transform var(--ease);
}
.kpi-card:hover { box-shadow: var(--sh); transform: translateY(-1px); }

.kpi-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.kpi-icon-green  { background: var(--green-100); color: var(--green-800); }
.kpi-icon-blue   { background: var(--blue-100); color: var(--blue-700); }
.kpi-icon-orange { background: var(--amber-100); color: var(--amber-700); }
.kpi-icon-red    { background: var(--danger-bg); color: var(--red-700); }

.kpi-body { flex: 1; min-width: 0; }

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

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

/* ══════════════════════════════════════════════════════════════
   WEEK NAVIGATION
   ══════════════════════════════════════════════════════════════ */

.week-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════
   LEGEND
   ══════════════════════════════════════════════════════════════ */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.legend-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: var(--bg-muted);
  transition: all var(--ease);
  font-size: 12px;
}
.legend-link:hover { border-color: var(--border-focus); background: var(--green-50); box-shadow: var(--sh-sm); }

.legend-color { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-name { font-weight: 600; color: var(--text); font-family: var(--font-heading); }
.legend-type { font-size: 10.5px; color: var(--text-light); }

.empty-legend { font-size: 13px; color: var(--text-muted); }
.empty-legend a { color: var(--green-700); text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════
   SCHEDULE GRID — CORE COMPONENT
   ══════════════════════════════════════════════════════════════ */

.schedule-container {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  margin-bottom: 28px;
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  min-width: 640px;
  table-layout: fixed;
}

.schedule-table thead tr {
  background: var(--sidebar-bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.time-col {
  width: 58px;
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.35);
  padding: 12px 8px;
  text-align: center;
  font-weight: 400;
  border-right: 1px solid rgba(255,255,255,0.08);
  vertical-align: middle;
}

.day-col {
  text-align: center;
  padding: 10px 8px;
  vertical-align: middle;
  border-left: 2.5px solid rgba(0,0,0,0.55);
  transition: background var(--ease);
}

.day-col.today-col {
  background: rgba(74,222,128,0.08);
  border-left: 2px solid var(--sidebar-accent) !important;
}

.day-name {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.85);
}

.day-date {
  font-size: 9.5px;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.today-col .day-name { color: var(--sidebar-accent); }
.today-col .day-date { color: rgba(74,222,128,0.6); }

.time-label {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-light);
  text-align: right;
  padding: 0 8px 0 4px;
  white-space: nowrap;
  vertical-align: top;
  padding-top: 2px;
  border-right: 1px solid var(--border);
  background: var(--bg-muted);
  letter-spacing: -0.3px;
  line-height: 14px;
  max-height: 16px;
  overflow: hidden;
}

.slot-hour   td { border-top: 1.5px solid rgba(0,0,0,0.75); }
.slot-half   td { border-top: 1px dashed rgba(0,0,0,0.06); }
.slot-quarter td { border-top: 1px dotted rgba(0,0,0,0.03); }

.slot-hour .time-label { color: var(--text-muted); font-weight: 700; }

/* Row heights */
.overview-mode .slot-cell { height: 14px; }
.editor-mode .slot-cell   { height: 12px; cursor: crosshair; }
.readonly-mode .slot-cell { height: 12px; }

.slot-cell {
  padding: 0;
  vertical-align: middle;
  border-left: none;
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
}

/* Thick black separator between each day column */
.slot-cell + .slot-cell {
  border-left: 2.5px solid #111111 !important;
}

.editor-cell:hover { background: rgba(22,163,74,0.04); }

.cell-fill {
  position: absolute;
  inset: 0;
  transition: background 80ms ease;
}

/* Overview bars — une seule ligne divisée en segments horizontaux */
.cell-bars {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
  gap: 0;
}

.overview-mode .cell-bars {
  position: absolute;
  inset: 0;
  height: auto;
  width: auto;
}

.emp-bar {
  flex: 1;
  height: 100%;
  min-height: 1px;
  min-width: 1px;
}

.emp-bar-vacation {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent, transparent 3px,
    rgba(255,255,255,0.65) 3px, rgba(255,255,255,0.65) 5px
  ) !important;
}

/* Vacation overlays */
.slot-vacation-overlay {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(220,50,50,0.55) 0px, rgba(220,50,50,0.55) 2px,
    transparent 2px, transparent 8px
  ) !important;
}

.slot-vacation-day { background: rgba(220,50,50,0.05) !important; }

/* ══════════════════════════════════════════════════════════════
   TOOLBAR
   ══════════════════════════════════════════════════════════════ */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 16px;
  box-shadow: var(--sh-sm);
}

.day-quick-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.toolbar-right  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.total-hours-badge {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--green-700);
  background: var(--green-50);
  padding: 5px 14px;
  border-radius: var(--r-xl);
  border: 1.5px solid var(--green-200);
  letter-spacing: 0.3px;
}

.save-status {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  margin-top: 10px;
  display: inline-block;
}
.save-status.success { background: var(--success-bg); color: var(--success); }
.save-status.error   { background: var(--danger-bg); color: var(--danger); }

.template-notice, .override-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 11px 16px;
  border-radius: var(--r);
  margin-bottom: 14px;
  font-size: 12.5px;
  flex-wrap: wrap;
}

.template-notice {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  color: var(--blue-700);
}

.override-notice {
  background: var(--amber-50);
  border: 1px solid var(--amber-100);
  color: var(--amber-700);
}

/* ══════════════════════════════════════════════════════════════
   EMPLOYEE CARDS
   ══════════════════════════════════════════════════════════════ */

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.employee-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--ease), transform var(--ease);
  display: flex;
  flex-direction: column;
}

.employee-card:hover { box-shadow: var(--sh-lg); transform: translateY(-2px); }
.employee-card.inactive { opacity: 0.6; }
.employee-card.inactive:hover { opacity: 0.8; }

.emp-color-strip { height: 5px; width: 100%; flex-shrink: 0; }

.emp-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emp-header { display: flex; align-items: center; gap: 12px; }

.emp-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

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

.emp-name {
  font-size: 14.5px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-username {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.emp-type-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 3px 10px;
  font-family: var(--font-heading);
}

.emp-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.emp-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.emp-dot-sm { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* ══════════════════════════════════════════════════════════════
   DASHBOARD BOTTOM PANELS
   ══════════════════════════════════════════════════════════════ */

.bottom-panels {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  margin-top: 8px;
  align-items: start;
}

.quick-links h3 {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-heading);
  margin-bottom: 14px;
  color: var(--text);
}

.emp-cards { display: flex; flex-direction: column; gap: 8px; }

.emp-card-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: box-shadow var(--ease);
}
.emp-card-wrapper:hover { box-shadow: var(--sh); }

.emp-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  transition: background var(--ease);
}
.emp-card-main:hover { background: var(--bg-muted); }

.emp-card-color { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.emp-card-info { flex: 1; min-width: 0; }

.emp-card-name {
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text);
}

.emp-card-type { font-size: 11px; color: var(--text-muted); }
.emp-card-arrow { color: var(--text-light); font-size: 20px; font-weight: 300; }

.emp-card-templates {
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
}

/* A/B Config */
.ab-config-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--sh-sm);
}

.ab-config-card h3 {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-heading);
  margin-bottom: 8px;
}

.ab-info {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.ab-form-row { display: flex; flex-direction: column; gap: 10px; }
.ab-form-row .form-group { margin-bottom: 0; }
.ab-save-btn { width: 100%; margin-top: 4px; }

.ab-preview {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.ab-preview-week {
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--bg-muted);
}

.ab-preview-week.ab-current {
  background: var(--green-50);
  color: var(--green-800);
  border: 1px solid var(--green-100);
}

.ab-preview-week strong { color: var(--green-700); }

/* ══════════════════════════════════════════════════════════════
   SECTION CARDS (Vacations)
   ══════════════════════════════════════════════════════════════ */

.section-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--sh-sm);
}

.section-pending { border-left: 3px solid var(--amber-600); }

.section-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
}

.section-title {
  font-size: 14.5px;
  font-weight: 700;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Vacation items */
.vacation-list { display: flex; flex-direction: column; }

.vacation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--ease);
  flex-wrap: wrap;
}
.vacation-item:last-child { border-bottom: none; }
.vacation-item:hover { background: var(--bg-muted); }

.vacation-status-pending  { border-left: 3px solid var(--amber-600); }
.vacation-status-approved { border-left: 3px solid var(--green-600); }
.vacation-status-rejected { border-left: 3px solid var(--red-600); opacity: 0.75; }

.vacation-item-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.vacation-emp-name {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.vacation-date-range {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
}

.vacation-duration {
  font-size: 11px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: var(--r-xl);
  color: var(--text-light);
  font-family: var(--font-body);
}

.vacation-note {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
  font-family: var(--font-body);
}

.vacation-meta {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 3px;
  font-family: var(--font-mono);
}

.vacation-item-actions { display: flex; gap: 6px; flex-shrink: 0; }

.vacation-stripe-preview {
  display: inline-block;
  width: 16px; height: 12px;
  border-radius: 2px;
  background-color: var(--emp-color, #ccc);
  background-image: repeating-linear-gradient(
    -45deg, transparent, transparent 2px,
    rgba(0,0,0,0.3) 2px, rgba(0,0,0,0.3) 3px
  );
  opacity: 0.8;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   EMPLOYEE SCHEDULE — BANNERS & SUMMARY CARDS
   ══════════════════════════════════════════════════════════════ */

.weekly-total-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 4px solid;
  border-radius: var(--r);
  margin-bottom: 16px;
  box-shadow: var(--sh-sm);
}

.wt-label {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
}

.wt-hours {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: -0.5px;
}

.vacation-week-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--amber-50);
  border: 1px solid var(--amber-100);
  border-left: 4px solid var(--amber-600);
  border-radius: var(--r);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--amber-700);
}

.vacation-icon { flex-shrink: 0; margin-top: 2px; }
.vacation-days-list { font-size: 12px; margin-top: 3px; opacity: 0.8; }

/* Summary Cards */
.summary-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.summary-card {
  min-width: 110px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: var(--r);
  padding: 12px 14px;
  flex-shrink: 0;
  box-shadow: var(--sh-sm);
}

.summary-day {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-family: var(--font-heading);
}

.summary-date {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text);
  margin-top: 2px;
}

.summary-hours {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 700;
}

.summary-duration {
  font-size: 11px;
  background: var(--bg-muted);
  border-radius: var(--r-xl);
  padding: 1px 8px;
  display: inline-block;
  margin-top: 4px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.summary-vacation-label { margin-top: 4px; }

/* ══════════════════════════════════════════════════════════════
   CHAT
   ══════════════════════════════════════════════════════════════ */

/* Admin: two-panel */
.admin-chat-layout {
  display: grid;
  grid-template-columns: 256px 1fr;
  height: calc(100vh - 140px);
  min-height: 500px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh);
}

.chat-sidebar {
  background: var(--bg-muted);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.chat-sidebar-title {
  padding: 14px 16px 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  font-family: var(--font-heading);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-muted);
}

.conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--ease);
  position: relative;
}
.conv-item:hover { background: var(--bg-subtle); }

.conv-active {
  background: var(--green-50);
  border-left: 3px solid var(--green-600);
}

.conv-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.conv-avatar-sm { width: 28px; height: 28px; font-size: 12px; margin-right: 4px; }

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

.conv-name {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-preview {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.conv-unread {
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-main { display: flex; flex-direction: column; overflow: hidden; }

.chat-main-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 2px solid var(--border);
  background: var(--bg-surface);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-muted);
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.chat-empty {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  font-style: italic;
  padding: 40px 20px;
}

.chat-no-selection {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
}

/* Bubbles */
.chat-bubble { max-width: 72%; display: flex; flex-direction: column; gap: 4px; }
.bubble-mine   { align-self: flex-end; align-items: flex-end; }
.bubble-theirs { align-self: flex-start; align-items: flex-start; }

.bubble-content {
  padding: 10px 14px;
  border-radius: var(--r-lg);
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}

.bubble-mine .bubble-content {
  background: var(--green-700);
  color: white;
  border-bottom-right-radius: var(--r-sm);
}

.bubble-theirs .bubble-content {
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: var(--r-sm);
  box-shadow: var(--sh-sm);
}

.bubble-time {
  font-size: 10px;
  color: var(--text-light);
  font-family: var(--font-mono);
  padding: 0 4px;
}

/* Vacation card in chat */
.vac-request-bubble { max-width: 80%; }

.vac-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--sh-sm);
  min-width: 240px;
}

.vac-card-header {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--amber-700);
  font-family: var(--font-heading);
  margin-bottom: 8px;
}

.vac-card-dates {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.vac-card-note {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
}

.vac-card-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-xl);
  display: inline-block;
  font-family: var(--font-heading);
}

.vac-status-pending  { background: var(--amber-100); color: var(--amber-700); }
.vac-status-approved { background: var(--green-100); color: var(--green-800); }
.vac-status-rejected { background: var(--danger-bg); color: var(--danger); }

.vac-card-actions { display: flex; gap: 8px; margin-top: 10px; }

/* Chat input */
.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.chat-input:focus {
  background: var(--bg-surface);
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.10);
}

.chat-send-btn { border-radius: var(--r-xl); padding: 10px 20px; }

/* Employee chat wrapper */
.chat-wrapper {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh);
  height: calc(100vh - 180px);
  min-height: 420px;
}
.chat-wrapper .chat-messages { flex: 1; }

/* Vacation request panel */
.vac-request-panel {
  background: var(--amber-50);
  border: 1.5px solid var(--amber-100);
  border-radius: var(--r-lg);
  margin-bottom: 16px;
  overflow: hidden;
}

.vac-request-inner { padding: 16px 20px; }

.vac-request-title {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--amber-700);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vac-request-fields {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.vac-request-fields .form-group { margin: 0; flex: 1; min-width: 120px; }

/* ══════════════════════════════════════════════════════════════
   EMPTY STATES
   ══════════════════════════════════════════════════════════════ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 20px;
  text-align: center;
}

.empty-state p { font-size: 14px; color: var(--text-muted); }
.empty-icon { color: var(--text-light); }

/* ══════════════════════════════════════════════════════════════
   LOGIN PAGE (standalone)
   ══════════════════════════════════════════════════════════════ */

.login-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: stretch;
}

.login-split { display: flex; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; }

.login-brand-panel {
  flex: 0 0 42%;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}

.login-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(74,222,128,0.07) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(74,222,128,0.04) 0%, transparent 40%);
  pointer-events: none;
}

.login-brand-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.login-brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 300px;
}

.login-rx-mark {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 700;
  color: var(--sidebar-accent);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -3px;
  display: block;
}

.login-brand-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 3.5px;
  margin-bottom: 10px;
}

.login-brand-sub {
  font-size: 12.5px;
  color: var(--sidebar-text);
  line-height: 1.6;
  margin-bottom: 48px;
}

.login-brand-sep {
  width: 40px;
  height: 1px;
  background: var(--sidebar-sep);
  margin: 0 auto 32px;
}

.login-brand-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  width: 100%;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--sidebar-text);
}

.login-feature-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sidebar-accent);
  flex-shrink: 0;
}

.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--bg);
}

.login-form-box { width: 100%; max-width: 400px; }

.login-form-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--green-700);
  font-family: var(--font-heading);
  margin-bottom: 8px;
}

.login-form-title {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.login-form-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.login-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px 28px;
  box-shadow: var(--sh-lg);
}

.login-submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--green-700);
  color: white;
  border: none;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-heading);
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  margin-top: 4px;
}

.login-submit-btn:hover {
  background: var(--green-800);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21,128,61,0.30);
}
.login-submit-btn:active { transform: translateY(0); }

.login-footer-note {
  text-align: center;
  margin-top: 20px;
  font-size: 11.5px;
  color: var(--text-light);
}

.pw-wrapper { position: relative; }
.pw-wrapper input { padding-right: 52px; }

.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 4px;
  transition: color var(--ease);
}
.pw-toggle:hover { color: var(--green-700); }

.login-flash {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  border-left: 3px solid;
}
.login-flash.flash-error   { background: var(--danger-bg); color: var(--red-700); border-color: var(--red-600); }
.login-flash.flash-success { background: var(--success-bg); color: var(--green-800); border-color: var(--green-700); }

@media (max-width: 768px) {
  .login-brand-panel { display: none; }
  .login-form-panel {
    padding: 24px;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    align-items: center;
    justify-content: center;
  }
}

/* ══════════════════════════════════════════════════════════════
   PRINT
   ══════════════════════════════════════════════════════════════ */

@media print {
  .sidebar, .flash-container, .week-nav, .toolbar,
  .bottom-panels, .page-header-right { display: none !important; }
  .main-content { margin-left: 0 !important; padding: 10mm !important; }
  body { background: white !important; }
  .schedule-container { box-shadow: none !important; border: 1px solid #ccc !important; }
  .schedule-table thead tr {
    background: #0B1C11 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .day-name { color: white !important; }
  .day-date { color: rgba(255,255,255,0.6) !important; }
}

/* ══════════════════════════════════════════════════════════════
   MAIN WRAPPER
   ══════════════════════════════════════════════════════════════ */

.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}

/* ══════════════════════════════════════════════════════════════
   HAMBURGER
   ══════════════════════════════════════════════════════════════ */

.hamburger {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 400;
  background: var(--sidebar-bg);
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  padding: 0;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.28s ease;
}

/* Animation croix quand ouvert */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════════════════════════
   OVERLAY
   ══════════════════════════════════════════════════════════════ */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 250;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
  .bottom-panels { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  /* ── Hamburger toujours visible et fixe ── */
  .hamburger { display: flex; }

  /* ── Sidebar cachée par défaut, glisse depuis la gauche ── */
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
    transition: transform 0.3s ease;
    z-index: 300;
  }
  .sidebar.open { transform: translateX(0); }

  /* ── Overlay ── */
  .sidebar-overlay { display: block; }

  /* ── Contenu plein écran, ne déborde PAS (pas overflow hidden
        pour laisser le schedule scroller en interne) ── */
  .main-wrapper {
    margin-left: 0;
    max-width: 100vw;
  }

  .main-content {
    padding: 12px;
    padding-top: 68px;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .form-row { grid-template-columns: 1fr; }

  /* ── Page header ── */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* ── Week nav sur une seule ligne, texte court ── */
  .week-nav {
    flex-wrap: nowrap;
    gap: 4px;
    margin-bottom: 12px;
  }
  .week-nav .btn {
    font-size: 11px;
    padding: 5px 8px;
    white-space: nowrap;
  }

  /* ── Tableau : scroll horizontal, colonne heure fixe ── */
  .schedule-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    /* Pas de overflow-x: hidden ici — on veut le scroll */
  }

  .schedule-table {
    min-width: 520px;
    width: max-content;
  }

  /* Colonne heure collée à gauche pendant le scroll */
  .time-label {
    position: sticky;
    left: 0;
    z-index: 6;
    /* background déjà défini dans le CSS de base */
  }

  .time-col {
    position: sticky;
    left: 0;
    z-index: 16; /* au-dessus du sticky header (z-index:10) + time-label */
    background: var(--sidebar-bg);
  }

  /* ── Bottom panels ── */
  .bottom-panels { grid-template-columns: 1fr; }

  /* ── KPI ── */
  .kpi-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .employee-grid { grid-template-columns: 1fr; }
  .admin-chat-layout { grid-template-columns: 1fr; height: auto; }

  /* Boutons d'actions plus compacts */
  .emp-actions { flex-wrap: wrap; gap: 4px; }
  .emp-actions .btn-sm { font-size: 11px; padding: 4px 8px; }

  /* Modal remonte du bas (bottom sheet) */
  .modal {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-overlay { align-items: flex-end; }

  /* Toolbar */
  .toolbar { flex-wrap: wrap; gap: 8px; }
}
