/* ============================================================
   BCG PROJECTS— Estilos personalizados
   ============================================================ */

/* Calibri es fuente del sistema (Windows/Office); fallbacks para otros SO */

:root {
  --bg-primary:    #0f1117;
  --bg-secondary:  #161b27;
  --bg-card:       #1c2333;
  --bg-hover:      #242d40;
  --border:        #2a3347;
  --border-light:  #313d55;
  --text-primary:  #e8eaf0;
  --text-secondary:#8b96b0;
  --text-muted:    #596480;
  --accent:        #6366f1;
  --accent-hover:  #5254cc;
  --accent-glow:   rgba(99,102,241,0.15);
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #3b82f6;
  --sidebar-w:         240px;
  --sidebar-collapsed-w: 64px;
  --header-h:      60px;
  --radius:        10px;
  --radius-sm:     6px;
  --shadow:        0 4px 24px rgba(0,0,0,0.4);
  --transition:    0.18s ease;
}

[data-theme="light"] {
  --bg-primary:    #f1f4fb;
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-hover:      #eaeff8;
  --border:        #dde3f0;
  --border-light:  #c8d2e8;
  --text-primary:  #111827;
  --text-secondary:#4b5568;
  --text-muted:    #9ba8bc;
  --accent-glow:   rgba(99,102,241,0.10);
  --shadow:        0 4px 24px rgba(0,0,0,0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%; /* prevent iOS font scaling */
}

/* Images and media never overflow their container */
img, video, canvas, svg { max-width: 100%; }

/* Touch-friendly tap areas */
a, button, [role="button"] { touch-action: manipulation; }

/* ── SCROLLBAR ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ── LAYOUT ────────────────────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

/* ── SIDEBAR ───────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), width 0.25s cubic-bezier(0.4,0,0.2,1);
}

.sidebar-logo {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

/* Logos por tema: dark muestra blanco, light muestra color */
.logo-light { display: none; }
.logo-dark  { display: block; }
[data-theme="light"] .logo-light { display: block; }
[data-theme="light"] .logo-dark  { display: none; }

.sidebar-logo .logo-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: white;
  flex-shrink: 0;
}

.logo-mark img {
  width: 50%; height: auto;
}

.sidebar-logo .logo-text {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px;
  margin: 16px 0 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  transition: all var(--transition);
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-left: 2px solid var(--accent);
}

.nav-item .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: default;
}

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: white;
  flex-shrink: 0;
}

.avatar-sm { width: 26px; height: 26px; font-size: 10px; }
.avatar-lg { width: 40px; height: 40px; font-size: 15px; }

.user-info .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

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

/* ── MAIN CONTENT ──────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  transition: margin-left 0.25s cubic-bezier(0.4,0,0.2,1);
}

.topbar {
  height: var(--header-h);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--text-primary);
}

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.page-body { padding: 24px 28px; flex: 1; min-width: 0; box-sizing: border-box; }

/* ── CARDS ─────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
}

.card:hover { border-color: var(--border-light); }

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

.card-title {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── STAT CARDS ────────────────────────────────────────── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}

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

.stat-icon.purple { background: rgba(99,102,241,0.15); color: var(--accent); }
.stat-icon.green  { background: rgba(16,185,129,0.15); color: var(--success); }
.stat-icon.yellow { background: rgba(245,158,11,0.15);  color: var(--warning); }
.stat-icon.red    { background: rgba(239,68,68,0.15);   color: var(--danger); }
.stat-icon.blue   { background: rgba(59,130,246,0.15);  color: var(--info); }

.stat-value {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

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

/* ── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); color: var(--text-primary); }

.btn-danger {
  background: rgba(239,68,68,0.1);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.2);
}
.btn-danger:hover { background: var(--danger); color: white; }

.btn-success {
  background: rgba(16,185,129,0.1);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.2);
}
.btn-success:hover { background: var(--success); color: white; }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-icon { padding: 7px; width: 32px; height: 32px; justify-content: center; }

/* ── BADGES ────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-pending       { background: rgba(107,114,128,0.2);  color: #9ca3af; }
.badge-active        { background: rgba(16,185,129,0.15);  color: #10b981; }
.badge-paused        { background: rgba(245,158,11,0.15);  color: #f59e0b; }
.badge-qa_testing    { background: rgba(139,92,246,0.15);  color: #8b5cf6; }
.badge-client_review { background: rgba(8,145,178,0.15);   color: #0891b2; }
.badge-completed     { background: rgba(99,102,241,0.15);  color: #9ca3af; }
.badge-cancelled     { background: rgba(239,68,68,0.15);   color: #ef4444; }

.badge-low      { background: rgba(107,114,128,0.2); color: #9ca3af; }
.badge-medium   { background: rgba(59,130,246,0.15); color: #3b82f6; }
.badge-high     { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-critical { background: rgba(239,68,68,0.15);  color: #ef4444; }

.badge-root  { background: rgba(124,58,237,0.15); color: #7c3aed; }
.badge-admin { background: rgba(219,39,119,0.15); color: #db2777; }
.badge-devp  { background: rgba(59,130,246,0.15); color: #3b82f6; }

/* ── PROGRESS BAR ──────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
  background: var(--accent);
}

.progress-fill.green  { background: var(--success); }
.progress-fill.yellow { background: var(--warning); }
.progress-fill.red    { background: var(--danger); }

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

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

.form-control {
  width: 100%;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-size: 14px;
  padding: 9px 12px;
  transition: border-color var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

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

/* ── TABLES ────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}

thead th {
  background: var(--bg-hover);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

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

tbody tr:hover td { background: var(--bg-hover); }

/* Tabla compacta — para Mis Tareas y Proyectos */
.table-compact thead th { padding: 9px 14px; }
.table-compact tbody td { padding: 9px 14px; }

/* ── KANBAN ────────────────────────────────────────────── */
/* ── KANBAN BOARD ───────────────────────────────────────── */

/* Kanban page header */
.kb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.kb-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  transition: all .15s;
  margin-bottom: 6px;
}
.kb-back:hover { color: var(--text-primary); border-color: var(--border-light); }
.kb-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
}
.kb-progress-wrap { display: flex; align-items: center; gap: 10px; }
.kb-progress-pct {
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--accent);
  font-size: 14px;
  min-width: 36px;
}

.kanban-wrapper {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 20px;
  min-height: calc(100vh - 160px);
  align-items: start;
}

.kanban-column {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kc-top-bar { height: 3px; flex-shrink: 0; }

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px 9px;
  /* Sin sticky: .kanban-wrapper tiene overflow-x, así que sería el contenedor de scroll
     y "top: var(--header-h)" empujaba el encabezado encima de la primera tarjeta. */
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.kanban-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.col-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.col-count {
  background: var(--bg-hover);
  color: var(--text-muted);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

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

.kanban-cards.drag-over {
  background: var(--accent-glow);
}

.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  user-select: none;
}

.task-card:hover {
  border-color: color-mix(in srgb, var(--col, var(--accent)) 45%, var(--border));
  box-shadow: 0 6px 18px rgba(15,23,42,.10);
  transform: translateY(-1px);
}

/* La barra de progreso de cada tarjeta toma el color de su columna (cambia sola al arrastrar) */
.kanban-column .task-progress-fill { background: var(--col, var(--accent)) !important; }
.kanban-column .col-count {
  background: color-mix(in srgb, var(--col, var(--text-muted)) 14%, transparent);
  color: var(--col, var(--text-muted));
}
.kanban-cards:not(:has(.task-card))::before {
  content: 'Arrastra tareas aquí';
  display: flex; align-items: center; justify-content: center;
  min-height: 70px; border: 1.5px dashed var(--border); border-radius: 10px;
  font-size: 12px; color: var(--text-muted);
}
.task-card.is-done .task-card-title { text-decoration: line-through; color: var(--text-muted); }
.task-card.is-done { background: color-mix(in srgb, var(--bg-hover) 50%, var(--bg-card)); }

/* Prioridad como bandera de color (igual que la tabla del proyecto) */
.kc-prio {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; color: var(--text-secondary);
}
.kc-prio[data-priority="critical"] { color: #ef4444; }
.kc-prio[data-priority="high"]     svg { color: #f97316; }
.kc-prio[data-priority="medium"]   svg { color: #f59e0b; }
.kc-prio[data-priority="low"]      svg { color: #94a3b8; }

.task-card.dragging {
  opacity: 0.35;
  cursor: grabbing;
  transform: scale(1.02) rotate(0.8deg);
}

.task-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.task-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Due date chip */
.kc-due {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: 6px;
}
.kc-due.overdue {
  color: #ef4444;
  background: rgba(239,68,68,.10);
}
/* Personas de la tarjeta: responsable (punto ámbar) + colaboradores encimados */
.kc-people { display: inline-flex; align-items: center; flex-shrink: 0; }
.kc-av {
  width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 9.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--bg-card); position: relative;
}
.kc-av + .kc-av { margin-left: -6px; }
.kc-lead::after {
  content: ''; position: absolute; top: -2px; right: -2px; width: 7px; height: 7px; border-radius: 50%;
  background: #f59e0b; box-shadow: 0 0 0 1.5px var(--bg-card);
}
.kc-more { background: var(--bg-hover) !important; color: var(--text-secondary); font-size: 9px; }

/* Subtask progress pill */
.subtask-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid rgba(99,102,241,.18);
}
.subtask-pill-done {
  color: #10b981;
  background: rgba(16,185,129,.10);
  border-color: rgba(16,185,129,.2);
}

.add-task-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 10px;
  margin: 0 10px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1.5px dashed var(--border);
  background: transparent;
  width: calc(100% - 20px);
  transition: all .15s;
}

.add-task-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Task status inline select ─────────────────────────── */
.task-status-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 3px 22px 3px 8px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238b96b0'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  outline: none;
}
.task-status-select:hover,
.task-status-select:focus { border-color: var(--accent); background-color: var(--accent-glow); }
.task-status-select option { background: var(--bg-card); color: var(--text-primary); }

.add-task-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 10px;
  margin: 0 10px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  background: transparent;
  width: calc(100% - 20px);
  transition: all var(--transition);
}

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

/* ── PROJECT CARDS ─────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-name {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-area-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}

.area-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
}

.project-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.progress-pct {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 13px;
  min-width: 36px;
  text-align: right;
}

.member-avatars {
  display: flex;
}

.member-avatars .avatar {
  border: 2px solid var(--bg-card);
  margin-left: -6px;
}

.member-avatars .avatar:first-child { margin-left: 0; }

/* ── ALERTS / FLASH ────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2); color: #10b981; }
.alert-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.2);  color: #10b981; }
.alert-info    { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2); color: #10b981; }

/* ── ACTIVITY FEED ─────────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }

.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.activity-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

.activity-text {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── TASK DETAIL PANEL ─────────────────────────────────── */
.task-panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0;
}

.task-panel-overlay.open { display: flex; }

.task-panel {
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  overflow-y: auto;
  padding: 24px;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

/* ── MODAL (quick-create kanban) ────────────────────────── */
.qc-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.qc-overlay.open { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeUp 0.2s ease;
}

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

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

.qc-modal-title {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 16px;
}

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

/* ── LOGIN PAGE ────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.08) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 20%, rgba(16,185,129,0.05) 0%, transparent 50%);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-logo .logo-mark {
  width: 300px; height: 100px;
  background: #ffffff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: white;
}

.login-logo .logo-text {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* ── RANGE SLIDER ──────────────────────────────────────── */
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── CHARTS ────────────────────────────────────────────── */
.chart-container {
  position: relative;
  width: 100%;
}

/* ── EMPTY STATE ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

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

.empty-state p { font-size: 14px; margin-bottom: 16px; }

/* ── DIVIDERS ──────────────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── MISC ──────────────────────────────────────────────── */
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 12px; }
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }

.flex         { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }

.mb-1  { margin-bottom: 4px; }
.mb-2  { margin-bottom: 8px; }
.mb-3  { margin-bottom: 12px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.mt-1  { margin-top: 4px; }
.mt-2  { margin-top: 8px; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }

.w-full { width: 100%; }

/* ── REPORTS ───────────────────────────────────────────── */
.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.report-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
}

.report-section-title {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-count {
  background: var(--accent-glow);
  color: var(--accent);
  padding: 1px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.report-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.report-stat-card {
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  text-align: center;
}
.report-stat-card.accent-purple { background: rgba(99,102,241,0.07);  border-color: rgba(99,102,241,0.2); }
.report-stat-card.accent-green  { background: rgba(16,185,129,0.07);  border-color: rgba(16,185,129,0.2); }
.report-stat-card.accent-blue   { background: rgba(59,130,246,0.07);  border-color: rgba(59,130,246,0.2); }
.report-stat-card.accent-yellow { background: rgba(245,158,11,0.07);  border-color: rgba(245,158,11,0.2); }
.report-stat-card.accent-red    { background: rgba(239,68,68,0.07);   border-color: rgba(239,68,68,0.2);  }

.rs-value {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}
.rs-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.rs-sub   { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.report-table { width: 100%; border-collapse: collapse; background: var(--bg-card); }
.report-table thead th {
  background: var(--bg-hover);
  font-size: 10px; font-weight: 600; letter-spacing: .5px;
  text-transform: uppercase; color: var(--text-muted);
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.report-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
  font-size: 13px;
}
.report-table tbody tr:last-child td { border-bottom: none; }
.report-table tbody tr:hover td { background: var(--bg-hover); }

/* ── PRINT ─────────────────────────────────────────────── */
.print-only { display: none; }

@media print {
  .print-only      { display: block !important; }
  .no-print-hide,
  .sidebar,
  .topbar,
  .theme-toggle    { display: none !important; }

  .main-content    { margin-left: 0 !important; }
  .page-body       { padding: 0 !important; }
  body             { background: #fff !important; color: #111 !important; font-size: 12px; }

  :root {
    --bg-primary:    #fff;
    --bg-secondary:  #fff;
    --bg-card:       #fff;
    --bg-hover:      #f9fafb;
    --border:        #e5e7eb;
    --border-light:  #d1d5db;
    --text-primary:  #111827;
    --text-secondary:#4b5568;
    --text-muted:    #9ca3af;
  }

  .report-section  { border: 1px solid #e5e7eb; break-inside: avoid; margin-bottom: 16px; padding: 16px; }
  .report-stat-card{ border: 1px solid #e5e7eb !important; background: #f9fafb !important; }
  .rs-value        { font-size: 24px; }
  .report-header   { display: none; }
  .card            { border: 1px solid #e5e7eb; }
  .progress-bar    { background: #e5e7eb; }
  a                { color: inherit; text-decoration: none; }
}

/* ── THEME TOGGLE ──────────────────────────────────────── */
.theme-toggle {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-hover);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--border);
  color: var(--text-primary);
  border-color: var(--border-light);
}

/* Light theme adjustments beyond variables */
[data-theme="light"] .login-page {
  background-image: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.06) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 20%, rgba(16,185,129,0.04) 0%, transparent 50%);
}
[data-theme="light"] .task-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.10);
}
[data-theme="light"] .project-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg-primary); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--border-light); }

/* ── RESPONSIVE GRID CLASSES ────────────────────────────── */
.rsp-main        { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.rsp-form        { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; }
.rsp-dash-top    { display: grid; grid-template-columns: 1fr minmax(280px, 340px); gap: 16px; margin-bottom: 16px; }
.rsp-dash-charts { display: grid; grid-template-columns: 2fr 1fr;   gap: 16px; margin-bottom: 16px; }
.rsp-dash-bottom { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
/* Prevent grid children from blowing out column widths due to long content */
.rsp-main > *, .rsp-form > *,
.rsp-dash-top > *, .rsp-dash-charts > *, .rsp-dash-bottom > * { min-width: 0; }

/* ── HAMBURGER ──────────────────────────────────────────── */
.hamburger {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--text-primary);
  flex-direction: column;
  gap: 5px;
  transition: background var(--transition);
  flex-shrink: 0;
}
.hamburger:hover { background: var(--bg-hover); }
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.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); }

/* Lock body scroll when sidebar drawer is open — body only, NOT html (html overflow clips fixed elements on iOS) */
html.sidebar-open body { overflow: hidden; }

/* ── SIDEBAR OVERLAY ────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 149;
  animation: overlayIn 0.22s ease forwards;
}
.sidebar-overlay.active { display: block; }

/* ── DESKTOP SIDEBAR COLLAPSE ───────────────────────────── */
html.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-w);
}
html.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-collapsed-w);
}

/* Nav items: icon-only, centered */
html.sidebar-collapsed .nav-section-label { display: none; }
html.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
  font-size: 0;
  gap: 0;
  position: relative;
  overflow: visible;
}
html.sidebar-collapsed .nav-item .nav-icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

/* Tooltip on hover */
html.sidebar-collapsed .nav-item[title]:hover::after {
  content: attr(title);
  position: absolute;
  left: calc(var(--sidebar-collapsed-w) + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 200;
  box-shadow: var(--shadow);
  pointer-events: none;
}

/* Logo: hide text, center */
html.sidebar-collapsed .sidebar-logo {
  justify-content: center;
  padding: 0;
}
html.sidebar-collapsed .sidebar-logo img { display: none; }
html.sidebar-collapsed .sidebar-logo::after {
  content: 'B';
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff;
  flex-shrink: 0;
}

/* Footer: center avatar, hide user info + logout */
html.sidebar-collapsed .user-card { justify-content: center; padding: 8px 0; }
html.sidebar-collapsed .user-info  { display: none; }
html.sidebar-collapsed .sidebar-footer .btn { display: none; }
html.sidebar-collapsed .sidebar-footer { padding: 12px 0; }

/* ── RESPONSIVE ────────────────────────────────────────── */

/* 1920px+ – pantallas grandes: más espacio para respirar */
@media (min-width: 1600px) {
  .page-body   { padding: 28px 40px; }
  .rsp-form    { grid-template-columns: 1fr 300px; }
  .rsp-dash-top { grid-template-columns: 1fr minmax(300px, 360px); }
  .cal-layout  { grid-template-columns: 1fr 300px; }
  .stat-cards  { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* 1440px – pantallas de 1366×768 (laptop típico de 14") */
@media (max-width: 1440px) {
  .page-body   { padding: 20px 24px; }
  .rsp-form    { grid-template-columns: 1fr 250px; }
  .rsp-dash-top { grid-template-columns: 1fr minmax(230px, 270px); }
  .cal-layout  { grid-template-columns: 1fr 250px; }
}

/* 1200px – laptop pequeño: el auto-fill en stat-cards ya se ajusta */
@media (max-width: 1200px) {
  .page-body    { padding: 18px 20px; }
  .rsp-dash-top { grid-template-columns: 1fr minmax(220px, 260px); }
  .rsp-form     { grid-template-columns: 1fr 230px; }
  .cal-layout   { grid-template-columns: 1fr 240px; }
}

/* 768px height – pantallas verticalmente ajustadas (ej: 1366×768) */
@media (max-height: 768px) and (min-width: 901px) {
  .page-body { padding: 16px 20px; }
  .card      { padding: 16px; }
}

/* 900px – tablet portrait: sidebar becomes drawer */
@media (max-width: 900px) {
  /* Sidebar drawer */
  .sidebar {
    transform: translateX(-100%);
    z-index: 150;
    width: var(--sidebar-w) !important; /* reset desktop-collapsed width */
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; transition: none; }

  /* Hamburger */
  .hamburger { display: flex; }

  /* Layouts stack */
  .rsp-main     { grid-template-columns: 1fr; }
  .cal-layout   { grid-template-columns: 1fr; }
  /* rsp-dash-top y charts se colapsan más abajo (≤620px)
     porque sin sidebar hay suficiente ancho (~844px a 900px) */

  /* Kanban – sin sidebar, scrollea horizontalmente */
  .kanban-wrapper {
    grid-template-columns: repeat(5, minmax(220px, 1fr));
    padding-bottom: 12px;
  }

  /* Topbar compact */
  .topbar       { padding: 0 16px; gap: 8px; }
  .topbar-title { font-size: 15px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Hide "Nuevo Proyecto" text, keep accessible via sidebar */
  .topbar-new-project-text { display: none; }
  .topbar-new-project-icon { display: inline; }

  /* Tables scroll */
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Notification dropdown */
  .notif-dropdown { width: min(340px, calc(100vw - 24px)); right: -8px; }

  /* Hide low-priority table columns */
  .col-hide-mobile { display: none; }
}

/* 768px – large phones */
@media (max-width: 768px) {
  .rsp-form    { grid-template-columns: 1fr; }
  /* rsp-dash-bottom usa auto-fill(minmax 280px), se colapsa solo cuando no caben 2 */

  .stat-cards  { grid-template-columns: repeat(2, 1fr); }
  .page-body   { padding: 14px; }
  .card        { padding: 16px; }
  .card-header { flex-wrap: wrap; gap: 8px; }

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

  /* Kanban */
  .kanban-wrapper { grid-template-columns: repeat(5, minmax(220px, 1fr)); }

  /* Prevent iOS Safari auto-zoom on inputs */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  input[type="number"],
  input[type="search"],
  select,
  textarea { font-size: 16px !important; }

  /* Touch targets */
  .btn          { min-height: 40px; }
  .nav-item     { padding: 11px 10px; }
}

/* 800px – 3-col bottom → 2-col; actividad ocupa ancho completo */
@media (max-width: 800px) {
  .rsp-dash-bottom    { grid-template-columns: 1fr 1fr; }
  .dash-activity-col  { grid-column: 1 / -1; }
}

/* 620px – colapsar columnas del dashboard en pantallas pequeñas */
@media (max-width: 620px) {
  .rsp-dash-top    { grid-template-columns: 1fr; }
  .rsp-dash-charts { grid-template-columns: 1fr; }
  .rsp-dash-bottom { grid-template-columns: 1fr; }
}

/* 480px – small phones */
@media (max-width: 480px) {
  .page-body { padding: 10px; }
  .topbar    { padding: 0 10px; height: 52px; }
  .card      { padding: 14px 12px; }

  .stat-cards { gap: 8px; }
  .stat-card  { padding: 12px 10px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .stat-icon  { width: 36px; height: 36px; font-size: 18px; }

  .topbar-title   { font-size: 14px; max-width: 120px; }
  .topbar-actions { gap: 4px; }

  /* Toast full width */
  #toast-container { left: 8px; right: 8px; top: 8px; }
  .toast { min-width: unset; max-width: unset; width: 100%; }

  /* Modal full width */
  .modal-box { padding: 18px 14px; width: calc(100vw - 20px); max-width: none; }

  /* Kanban compact */
  .kanban-wrapper { grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 10px; }
  .kanban-col-header { padding: 9px 10px; }
  .kanban-cards  { padding: 8px; }

  /* Forms */
  .btn-sm { min-height: 36px; padding: 6px 10px; }

  /* Stack card headers */
  .card-header { flex-direction: column; align-items: flex-start; }
  .card-header .btn { align-self: flex-end; }
}

/* ── PROJECT KANBAN RESPONSIVE ─────────────────────────── */
/* columnas del kanban de proyectos (pk-column) */
#viewKanban {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

@media (max-width: 900px) {
  .pk-column { width: 240px !important; }
}
@media (max-width: 480px) {
  .pk-column { width: 200px !important; }
}

/* ── GANTT RESPONSIVE ───────────────────────────────────── */
#ganttScroll {
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 310px);
}
@media (max-width: 900px) {
  #ganttScroll { max-height: calc(100vh - 280px); }
}
@media (max-width: 768px) {
  #ganttScroll { max-height: calc(100vh - 250px); }
}
@media (max-width: 480px) {
  #ganttScroll { max-height: calc(100vh - 220px); }
}

/* ── PAGINATOR ──────────────────────────────────────────── */
.paginator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.pg-btn {
  padding: 4px 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1.6;
}
.pg-btn:hover:not([disabled]) { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }
.pg-btn[disabled]              { opacity: 0.4; cursor: not-allowed; }
.pg-pages { display: flex; gap: 3px; flex-wrap: wrap; }
.pg-page {
  min-width: 28px; height: 28px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.pg-page:hover               { background: var(--bg-hover); color: var(--text-primary); }
.pg-page.pg-active           { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.pg-ellipsis                 { font-size: 12px; color: var(--text-muted); padding: 0 2px; align-self: center; }
.pg-info                     { font-size: 12px; color: var(--text-muted); margin-left: auto; white-space: nowrap; }

/* Filas ocultas por filtro (no deben aparecer nunca, ni por paginador) */
.row-hidden { display: none !important; }

/* Paginador responsive: en pantallas pequeñas ocultar números de página */
@media (max-width: 480px) {
  .paginator { padding: 8px 12px; gap: 4px; justify-content: space-between; }
  .pg-pages  { display: none; }
  .pg-info   { margin-left: 0; }
  .pg-btn    { padding: 6px 14px; font-size: 12px; }
}

/* Tabla con scroll interno adaptado a cada breakpoint */
/* PC/laptop 14": topbar(60) + page-header(80) + filtros(52) + paginator(46) + gaps ~62 = ~300px */
/* tablet sin sidebar: menos overhead, usamos 260px */
/* móvil: header(52) + page-header(70) + filtros(48) + paginator(46) + gaps = ~260px */
@media (max-width: 900px) {
  .table-scroll-wrap { max-height: calc(100vh - 260px) !important; }
}
@media (max-width: 480px) {
  .table-scroll-wrap { max-height: calc(100vh - 240px) !important; }
}

/* ══════════════════════════════════════════════════════════
   CALENDAR & MEETINGS
   ══════════════════════════════════════════════════════════ */

/* Layout: calendar + side panel */
.cal-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .cal-layout { grid-template-columns: 1fr; }
}

/* Calendar main area */
.cal-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Month nav bar */
.cal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.cal-month-label {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 180px;
  text-align: center;
}

/* Day-of-week header */
.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
}

.cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 0;
}

/* Calendar grid */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-height: clamp(80px, 12vh, 120px);
  padding: 6px;
  cursor: pointer;
  transition: background var(--transition);
  vertical-align: top;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--bg-hover); }
.cal-cell-empty {
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-height: clamp(80px, 12vh, 120px);
  cursor: default;
}
.cal-cell-empty:nth-child(7n) { border-right: none; }

.cal-day-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}

.cal-today .cal-day-num {
  background: var(--accent);
  color: #fff;
}
.cal-today { background: var(--accent-glow); }

/* Meeting events inside cells */
.cal-event {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 3px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--transition);
}
.cal-event:hover { opacity: 0.8; }

.cal-event-time {
  font-weight: 700;
  flex-shrink: 0;
  font-size: 10px;
}
.cal-event-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-more {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 1px 4px;
}

/* Day panel (slide-in overlay) */
.day-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  z-index: 400;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}
.day-panel-overlay.hidden { display: none; }

.day-panel {
  width: 360px;
  max-width: 100vw;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  animation: panelSlideIn 0.26s cubic-bezier(0.34,1.2,0.64,1) forwards;
}

@keyframes panelSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

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

.day-event-card {
  display: block;
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg-hover);
  margin-bottom: 10px;
  text-decoration: none;
  transition: background var(--transition);
}
.day-event-card:hover { background: var(--border); }

/* Upcoming meetings sidebar */
.upcoming-meeting-item {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  text-decoration: none;
  transition: background var(--transition);
}
.upcoming-meeting-item:hover { background: var(--border); }

/* Legend */
.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.cal-legend-item span {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Attendee picker */
.attendee-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 2px;
}

.attendee-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-hover);
}
.attendee-option:hover { border-color: var(--accent); background: var(--accent-glow); }
.attendee-option input[type=checkbox] { display: none; }
.attendee-option:has(input:checked),
.attendee-option.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.attendee-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

/* Form actions row */
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

/* Meeting detail view */
.meeting-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.meeting-info-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  min-width: 300px;
  max-width: 400px;
  pointer-events: all;
  backdrop-filter: blur(12px);
  border: 1px solid transparent;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.2);
  animation: toastIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 12px 0 0 12px;
}

.toast.toast-success {
  background: rgba(16,185,129,0.12);
  border-color: rgba(16,185,129,0.25);
  color: #e8eaf0;
}
.toast.toast-success::before { background: #10b981; }

.toast.toast-error {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.25);
  color: #e8eaf0;
}
.toast.toast-error::before { background: #10b981; }

.toast.toast-info {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.25);
  color: #e8eaf0;
}
.toast.toast-info::before { background: #6366f1; }

.toast.toast-warning {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.25);
  color: #e8eaf0;
}
.toast.toast-warning::before { background: #10b981; }

[data-theme="light"] .toast {
  background: rgba(255,255,255,0.95);
  color: #111827;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
}
[data-theme="light"] .toast.toast-success { background: rgba(236,253,245,0.97); border-color: rgba(16,185,129,0.3); }
[data-theme="light"] .toast.toast-error   { background: rgba(254,242,242,0.97); border-color: rgba(239,68,68,0.3); }
[data-theme="light"] .toast.toast-info    { background: rgba(238,242,255,0.97); border-color: rgba(99,102,241,0.3); }
[data-theme="light"] .toast.toast-warning { background: rgba(255,251,235,0.97); border-color: rgba(245,158,11,0.3); }

.toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}
.toast-success .toast-icon { background: rgba(16,185,129,0.2);  color: #10b981; }
.toast-error   .toast-icon { background: rgba(239,68,68,0.2);   color: #10b981; }
.toast-info    .toast-icon { background: rgba(99,102,241,0.2);  color: #6366f1; }
.toast-warning .toast-icon { background: rgba(245,158,11,0.2);  color: #10b981; }

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

.toast-title {
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 2px;
  line-height: 1.3;
}

.toast-message {
  font-size: 12.5px;
  opacity: 0.82;
  line-height: 1.45;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  margin-top: 1px;
  transition: color var(--transition);
}
.toast-close:hover { color: var(--text-primary); }

.toast-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  border-radius: 0 0 12px 12px;
  animation: toastProgress linear forwards;
}
.toast.toast-success .toast-progress { background: #10b981; }
.toast.toast-error   .toast-progress { background: #10b981; }
.toast.toast-info    .toast-progress { background: #6366f1; }
.toast.toast-warning .toast-progress { background: #10b981; }

.toast.hiding {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(110%) scale(0.92); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); max-height: 200px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(110%) scale(0.92); max-height: 0; margin-bottom: -10px; }
}

@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}

/* ══════════════════════════════════════════════════════════
   CONFIRM MODAL
   ══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: overlayIn 0.22s ease forwards;
}

.modal-overlay.hiding {
  animation: overlayOut 0.22s ease forwards;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 24px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
  animation: modalIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform: scale(0.88) translateY(20px);
}

.modal-overlay.hiding .modal-box {
  animation: modalOut 0.22s ease forwards;
}

.modal-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}
.modal-icon.icon-danger  { background: rgba(239,68,68,0.12);  }
.modal-icon.icon-warning { background: rgba(245,158,11,0.12); }
.modal-icon.icon-info    { background: rgba(99,102,241,0.12); }

.modal-title {
  font-family: 'Calibri', 'Candara', 'Segoe UI', sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.modal-text {
  font-size: 14px;
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}
.modal-actions .btn { flex: 1; justify-content: center; }

@keyframes overlayIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlayOut { from { opacity: 1; } to { opacity: 0; } }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes modalOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.92); }
}

/* ══════════════════════════════════════════════════════════
   NOTIFICATION BELL
   ══════════════════════════════════════════════════════════ */
.notif-bell-wrap {
  position: relative;
}

.notif-bell {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-hover);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  transition: all var(--transition);
  flex-shrink: 0;
  position: relative;
}
.notif-bell:hover {
  background: var(--border);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.notif-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: #10b981;
  color: #fff;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-secondary);
  line-height: 1;
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.notif-badge.hidden { display: none; }

@keyframes badgePop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.35), 0 4px 12px rgba(0,0,0,0.2);
  z-index: 500;
  overflow: hidden;
  transform-origin: top right;
  animation: dropdownIn 0.22s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

.notif-dropdown.hidden { display: none; }

@keyframes dropdownIn {
  from { opacity: 0; transform: scale(0.9) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

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

.notif-header-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}

.notif-mark-all {
  font-size: 11.5px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--transition);
}
.notif-mark-all:hover { color: var(--accent-hover); }

.notif-list {
  max-height: 380px;
  overflow-y: auto;
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.notif-empty-icon { font-size: 32px; margin-bottom: 8px; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  color: inherit;
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: var(--accent-glow); }
.notif-item.unread:hover { background: rgba(99,102,241,0.12); }
.notif-item-link { display: contents; text-decoration: none; color: inherit; cursor: pointer; }

.notif-del-btn {
  position: absolute;
  top: 50%; right: 10px;
  transform: translateY(-50%);
  opacity: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  transition: opacity .15s, color .15s, background .15s;
}
.notif-item:hover .notif-del-btn { opacity: 1; }
.notif-del-btn:hover { color: var(--danger); background: rgba(239,68,68,.1); }

.notif-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.notif-content { flex: 1; min-width: 0; }

.notif-msg {
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 3px;
}

.notif-time {
  font-size: 11px;
  color: var(--text-muted);
}

.notif-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
}

/* flash alert legacy — now hidden (toasts replace them) */
.alert { display: none !important; }

/* --- Fix: Status picker dropdown visibility and opacity --- */
.sp-wrap, .sp-drop {
  opacity: 1 !important;
  position: relative;
  /* z-index: 9999 !important; */
}

.sp-drop {
  /* Si el menú sigue cortándose, usar position: fixed y ajustar el JS */
  /* position: absolute; */
  /* top: auto; left: auto; */
}

/* Si hay problemas con overflow:hidden en padres, considerar:
.parent-class { overflow: visible !important; }
*/
/* --- End fix --- */

/* --- Fix: Status picker dropdown stacking/overlap --- */
.sp-drop {
  position: fixed !important;
  left: unset !important;
  top: unset !important;
  min-width: 180px;
  background: var(--bg-card);
  z-index: 99999 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 1.5px 6px rgba(0,0,0,0.10);
  border: 1.5px solid var(--border);
  margin-top: 0;
  border-radius: 10px;
  padding: 5px;
}

.sp-wrap { position: relative; }

/* --- End fix --- */

/* ── Custom Form Selects (nxf) ──────────────────────────── */
.nxf-wrap { position: relative; display: block; }
.nxf-trigger {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 9px 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; font-size: 13.5px; color: var(--text-primary);
  font-family: inherit; line-height: 1.5;
  transition: border-color var(--transition), box-shadow var(--transition);
  user-select: none; min-height: 38px;
}
.nxf-trigger:hover { border-color: var(--border-light); }
.nxf-trigger.is-open {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.nxf-val { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nxf-chev { transition: transform .2s; color: var(--text-muted); flex-shrink: 0; }
.nxf-panel {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  min-width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  z-index: 9000;
  padding: 4px;
  max-height: 230px;
  overflow-y: auto;
}
.nxf-opt {
  padding: 8px 12px; font-size: 13px; border-radius: 7px;
  cursor: pointer; color: var(--text-secondary);
  transition: background .1s, color .1s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nxf-opt:hover { background: var(--bg-hover); color: var(--text-primary); }
.nxf-opt.nxf-active { background: var(--accent-glow); color: var(--accent); font-weight: 600; }

/* ── Flatpickr custom theme ─────────────────────────────── */
.flatpickr-calendar {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.2) !important;
  font-family: inherit !important;
  padding: 4px 6px 10px !important;
  width: 310px !important;
}
.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after { display: none; }

.flatpickr-months {
  padding: 6px 4px 2px;
  align-items: center;
}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  color: var(--text-muted) !important;
  fill: var(--text-muted) !important;
  top: 10px;
  padding: 0;
  transition: background .15s, color .15s;
}
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  background: var(--bg-hover) !important;
  color: var(--accent) !important;
  fill: var(--accent) !important;
}
.flatpickr-months .flatpickr-month {
  background: transparent !important;
  color: var(--text-primary) !important;
  fill: var(--text-primary) !important;
  height: 36px;
}
.flatpickr-current-month {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  padding-top: 6px;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 4px;
}
.flatpickr-current-month input.cur-year {
  color: var(--text-primary) !important;
  font-weight: 700;
}
.flatpickr-current-month .arrowUp,
.flatpickr-current-month .arrowDown {
  border-color: var(--text-muted) !important;
}

.flatpickr-weekdays { background: transparent !important; margin-top: 4px; }
.flatpickr-weekday {
  background: transparent !important;
  color: var(--text-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.dayContainer { padding: 2px 2px; }
.flatpickr-day {
  color: var(--text-secondary) !important;
  border-radius: 8px !important;
  border: none !important;
  font-size: 13px;
  font-weight: 500;
  max-width: 36px;
  height: 36px;
  line-height: 36px;
  transition: background .12s, color .12s;
}
.flatpickr-day:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
  border-color: transparent !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(99,102,241,.35);
}
.flatpickr-day.today {
  border: 2px solid var(--accent) !important;
  color: var(--accent) !important;
  font-weight: 700;
  background: transparent !important;
}
.flatpickr-day.today.selected { color: #fff !important; }
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: var(--text-muted) !important;
  opacity: .4;
}
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: var(--text-muted) !important;
  opacity: .25;
}

/* The visible input (altInput) matches form-control */
.flatpickr-input.form-control[readonly],
input.flatpickr-input[readonly] {
  cursor: pointer;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13.5px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.flatpickr-input.form-control[readonly]:hover,
input.flatpickr-input[readonly]:hover { border-color: var(--border-light); }
.flatpickr-input.is-open[readonly],
input.flatpickr-input.active[readonly] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
/* Hide original hidden input */
input.flatpickr-input:not([readonly]) { display: none !important; }

/* ── Iconos SVG (app/helpers/icons.php) ─────────────────────── */
.ic { width:1em; height:1em; display:inline-block; vertical-align:-0.14em; flex-shrink:0; }
.ic[width] { width:auto; height:auto; }
