/* ================================================================
   PODOMAS DASHBOARD — styles.css
   Mobile-first, responsive, accesible
================================================================ */

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
  --teal-900: #003d3d;
  --teal-800: #005555;
  --teal-700: #006e6e;
  --teal-600: #008080;
  --teal-500: #009999;
  --teal-400: #00b3b3;
  --teal-300: #33cccc;
  --teal-200: #80e5e5;
  --teal-100: #ccf5f5;
  --teal-50:  #e6fafa;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --success:   #16a34a;
  --success-bg:#dcfce7;
  --warning:   #d97706;
  --warning-bg:#fef3c7;
  --danger:    #dc2626;
  --danger-bg: #fee2e2;
  --info:      #2563eb;
  --info-bg:   #dbeafe;
  --purple:    #7c3aed;
  --purple-bg: #ede9fe;
  --sidebar-w: 252px;
  --header-h:  58px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--slate-100);
  color: var(--slate-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── LOGIN ──────────────────────────────────────────────────── */
.login-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.login-screen.hidden { display: none; }
.login-card {
  background: white;
  width: 100%; max-width: 420px;
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.35);
}
.login-logo {
  display: block; height: 52px;
  object-fit: contain; margin: 0 auto 8px;
}
.login-logo-fallback {
  display: none;
  font-weight: 700; font-size: 30px;
  letter-spacing: -1px; color: var(--teal-700);
  text-align: center; margin-bottom: 8px;
}
.login-card h2 {
  font-size: 13px; font-weight: 500;
  color: var(--slate-400); text-align: center;
  margin-bottom: 32px; text-transform: uppercase;
  letter-spacing: 1px;
}
.login-field {
  position: relative; margin-bottom: 14px;
}
.login-field input {
  width: 100%; padding: 13px 16px 13px 46px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; color: var(--slate-800);
  transition: border-color 0.15s; outline: none;
}
.login-field input:focus { border-color: var(--teal-500); }
.login-field .fi {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px; color: var(--slate-400);
}
.login-btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  color: white; border: none;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600;
  cursor: pointer; transition: opacity 0.15s; margin-top: 4px;
  letter-spacing: 0.3px;
}
.login-btn:hover { opacity: 0.92; }
.login-error {
  color: var(--danger); font-size: 13px;
  text-align: center; margin-top: 10px; min-height: 18px;
}
.login-footer {
  margin-top: 28px; text-align: center;
  font-size: 11px; color: var(--slate-300);
}

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

/* ── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--teal-900);
  display: flex; flex-direction: column;
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.sidebar-header {
  padding: 20px 24px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo {
  display: block; height: 36px;
  object-fit: contain; object-position: left center;
}
.sidebar-logo-text {
  font-weight: 700; font-size: 22px;
  letter-spacing: -0.3px; color: white;
}
.sidebar-subtitle {
  font-size: 10px; color: rgba(255,255,255,0.35);
  margin-top: 5px; text-transform: uppercase;
  letter-spacing: 1px; font-weight: 500;
}
.sidebar-section-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.28);
  padding: 16px 24px 5px;
}
.nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 24px;
  color: rgba(255,255,255,0.6);
  cursor: pointer; transition: all 0.15s;
  font-size: 13.5px; font-weight: 500;
  border-left: 3px solid transparent;
  user-select: none; text-decoration: none;
  position: relative;
}
.nav-link:hover { color: white; background: rgba(255,255,255,0.07); }
.nav-link.active {
  color: white; background: rgba(255,255,255,0.11);
  border-left-color: var(--teal-300);
}
.nav-link i { font-size: 19px; flex-shrink: 0; }
.sidebar-footer {
  margin-top: auto; padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--teal-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white; flex-shrink: 0;
}
.sidebar-user-name { font-size: 12.5px; color: rgba(255,255,255,0.8); font-weight: 500; }
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,0.35); }
.btn-logout {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; margin-top: 12px;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.5);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; cursor: pointer; transition: all 0.15s;
  width: 100%; justify-content: center;
}
.btn-logout:hover { color: white; border-color: rgba(255,255,255,0.3); }

/* Mobile drawer overlay */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ── MAIN ───────────────────────────────────────────────────── */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* TOPBAR */
.topbar {
  height: var(--header-h);
  background: white;
  border-bottom: 1px solid var(--slate-200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-title { font-size: 17px; font-weight: 600; color: var(--slate-800); }
.topbar-date { font-size: 12px; color: var(--slate-400); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: var(--teal-50); border: 1px solid var(--teal-200);
  border-radius: 99px; font-size: 12px; color: var(--teal-700); font-weight: 600;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.btn-hamburger {
  display: none;
  background: none; border: none;
  color: var(--slate-600); font-size: 22px;
  cursor: pointer; padding: 4px;
  border-radius: var(--radius-sm);
}
.btn-hamburger:hover { color: var(--teal-700); background: var(--slate-100); }

/* PAGE */
.page-content { padding: 24px 28px; flex: 1; }
.tab { display: none; }
.tab.active { display: block; }
.page-header { margin-bottom: 22px; }
.page-header h1 { font-size: 21px; font-weight: 600; color: var(--slate-900); letter-spacing: -0.3px; }
.page-header p { font-size: 13px; color: var(--slate-500); margin-top: 3px; }

/* ── STATS GRID ─────────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 24px;
}
.stat-card {
  background: white; border-radius: var(--radius-lg);
  padding: 20px 22px; border: 1px solid var(--slate-200);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--stripe-color, var(--teal-400));
}
.stat-card .sc-icon {
  width: 38px; height: 38px; border-radius: var(--radius-md);
  background: var(--icon-bg, var(--teal-50));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.stat-card .sc-icon i { font-size: 20px; color: var(--icon-color, var(--teal-600)); }
.stat-card .sc-label { font-size: 11px; font-weight: 600; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .sc-value { font-size: 28px; font-weight: 700; color: var(--slate-900); line-height: 1.1; margin: 3px 0 2px; letter-spacing: -0.5px; }
.stat-card .sc-sub { font-size: 11.5px; color: var(--slate-400); }

/* ── TOOLBAR ────────────────────────────────────────────────── */
.toolbar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.toolbar input, .toolbar select {
  padding: 8px 12px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; color: var(--slate-700);
  background: white; outline: none;
  transition: border-color 0.15s;
}
.toolbar input:focus, .toolbar select:focus { border-color: var(--teal-500); }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: all 0.15s; white-space: nowrap;
}
.btn i { font-size: 15px; }
.btn:hover { filter: brightness(97%); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-teal { background: var(--teal-700); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-ghost { background: white; color: var(--slate-600); border-color: var(--slate-200); }
.btn-ghost:hover { background: var(--slate-50); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-sm i { font-size: 13px; }

/* ── CARD / TABLE ───────────────────────────────────────────── */
.card {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200); overflow: hidden;
}
.card-header {
  padding: 14px 18px; border-bottom: 1px solid var(--slate-100);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--slate-800); }
.card-subtitle { font-size: 12px; color: var(--slate-400); margin-top: 1px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 9px 14px; text-align: left;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--slate-500); background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200); white-space: nowrap;
}
tbody td {
  padding: 10px 14px; border-bottom: 1px solid var(--slate-100);
  font-size: 13px; color: var(--slate-700);
  max-width: 200px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--teal-50); }
.empty-row td { text-align: center; padding: 48px 20px; color: var(--slate-400); }
.empty-icon { font-size: 36px; margin-bottom: 8px; display: block; color: var(--slate-300); }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 9px;
  border-radius: 99px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.badge-confirmada        { background: var(--info-bg);    color: var(--info); }
.badge-confirmada_paciente { background: var(--success-bg); color: var(--success); }
.badge-cancelada         { background: var(--danger-bg);  color: var(--danger); }
.badge-reagendada        { background: var(--warning-bg); color: var(--warning); }
.badge-realizada         { background: var(--purple-bg);  color: var(--purple); }
.badge-pendiente         { background: var(--warning-bg); color: var(--warning); }
.badge-enviado           { background: var(--success-bg); color: var(--success); }
.badge-omitido           { background: var(--slate-100);  color: var(--slate-500); }

/* ── MODAL ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 300; display: none;
  align-items: center; justify-content: center;
  backdrop-filter: blur(3px); padding: 16px;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: white; border-radius: var(--radius-xl);
  padding: 28px; width: 520px; max-width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.modal-title { font-size: 17px; font-weight: 600; color: var(--slate-800); }
.modal-close {
  width: 32px; height: 32px; background: var(--slate-100);
  border: none; border-radius: var(--radius-sm);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--slate-500); transition: all 0.15s; flex-shrink: 0;
}
.modal-close:hover { background: var(--slate-200); color: var(--slate-800); }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--slate-100);
}

/* ── FORMS ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600;
  color: var(--slate-500); text-transform: uppercase;
  letter-spacing: 0.4px; margin-bottom: 5px;
}
.form-control {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px; color: var(--slate-800);
  outline: none; transition: border-color 0.15s;
}
.form-control:focus { border-color: var(--teal-500); }
textarea.form-control { resize: vertical; min-height: 70px; line-height: 1.5; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { font-size: 11.5px; color: var(--slate-400); margin-top: 4px; }

/* ── TOOLTIPS ───────────────────────────────────────────────── */
[data-tip] {
  position: relative; cursor: help;
}
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: var(--slate-900); color: white;
  font-size: 11.5px; font-weight: 400; line-height: 1.4;
  padding: 6px 10px; border-radius: var(--radius-sm);
  white-space: nowrap; max-width: 220px;
  white-space: normal; text-align: center;
  pointer-events: none; opacity: 0;
  transition: opacity 0.15s; z-index: 999;
  font-family: 'DM Sans', sans-serif;
  text-transform: none; letter-spacing: 0;
}
[data-tip]::before {
  content: '';
  position: absolute; bottom: calc(100% + 2px); left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--slate-900);
  pointer-events: none; opacity: 0;
  transition: opacity 0.15s; z-index: 999;
}
[data-tip]:hover::after,
[data-tip]:hover::before { opacity: 1; }

/* Tooltip que abre hacia abajo (para elementos en topbar) */
[data-tip-down]::after {
  bottom: auto; top: calc(100% + 8px);
}
[data-tip-down]::before {
  bottom: auto; top: calc(100% + 2px);
  border-top-color: transparent;
  border-bottom-color: var(--slate-900);
}

/* Botón de ayuda ? */
.help-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--slate-200); color: var(--slate-500);
  font-size: 10px; font-weight: 700;
  cursor: help; flex-shrink: 0; border: none;
  font-family: 'DM Mono', monospace;
  transition: all 0.15s;
}
.help-btn:hover { background: var(--teal-100); color: var(--teal-700); }

/* ── BOT CONTROL ────────────────────────────────────────────── */
.bot-panel { max-width: 520px; display: flex; flex-direction: column; gap: 18px; }
.bot-card {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200); padding: 24px;
}
.bot-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.bot-card p { font-size: 13px; color: var(--slate-500); line-height: 1.6; margin-bottom: 16px; }
.bot-status-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; background: var(--slate-50);
  border-radius: var(--radius-md); margin-bottom: 14px;
  font-size: 13.5px; font-weight: 500;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--success); }
.dot-red   { background: var(--danger); }
.bot-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── SERVICE CHECKBOXES ─────────────────────────────────────── */
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.svc-checkbox {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--slate-200);
  border-radius: var(--radius-md); cursor: pointer;
  transition: all 0.15s; font-size: 12.5px; color: var(--slate-600);
}
.svc-checkbox:hover { border-color: var(--teal-300); background: var(--teal-50); }
.svc-checkbox input { accent-color: var(--teal-600); }
.svc-checkbox.checked {
  border-color: var(--teal-300); background: var(--teal-50);
  color: var(--teal-800); font-weight: 500;
}

/* ── CONFIG PANELS ──────────────────────────────────────────── */
.cfg-panel.hidden { display: none; }
.cfg-tab-btn.active { background: var(--teal-700); color: white; border-color: var(--teal-700); }
.cfg-item-card {
  background: white; border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 18px;
}
.cfg-item-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.cfg-item-title { font-size: 13.5px; font-weight: 600; color: var(--slate-700); }
.info-banner {
  background: var(--teal-50); border: 1px solid var(--teal-200);
  border-radius: var(--radius-md); padding: 10px 14px;
  font-size: 12.5px; color: var(--teal-800); margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 8px;
}
.info-banner i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── GRILLA DE HORARIOS ─────────────────────────────────────── */
.horarios-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}
.horarios-panel-left {
  background: white; border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 18px;
  position: sticky; top: calc(var(--header-h) + 24px);
}
.horarios-panel-left h3 {
  font-size: 13px; font-weight: 600; color: var(--slate-700);
  margin-bottom: 14px; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.horarios-panel-right {
  background: white; border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); overflow: hidden;
}
.grid-toolbar {
  padding: 14px 16px; border-bottom: 1px solid var(--slate-100);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; background: var(--slate-50);
}
.grid-week-label { font-size: 13px; font-weight: 600; color: var(--slate-700); }
.grid-legend {
  display: flex; gap: 12px; align-items: center;
  font-size: 11.5px; color: var(--slate-500);
}
.legend-dot {
  width: 12px; height: 12px; border-radius: 3px;
  display: inline-block; flex-shrink: 0;
}
.legend-dot.available { background: var(--teal-500); }
.legend-dot.blocked   { background: white; border: 1px solid var(--slate-300); }
.legend-dot.closed    { background: var(--danger-bg); }
.grid-header-row {
  display: flex; border-bottom: 1px solid var(--slate-200);
  background: var(--slate-50);
}
.grid-header-cell {
  flex: 1; padding: 8px 4px; text-align: center;
  font-size: 11px; font-weight: 600; color: var(--slate-500);
  border-right: 1px solid var(--slate-100);
  cursor: pointer; transition: background 0.15s;
  user-select: none;
}
.grid-header-cell:first-child { width: 52px; flex: none; }
.grid-header-cell:hover:not(:first-child) { background: var(--teal-50); color: var(--teal-700); }
.grid-header-cell.closed-day { background: var(--danger-bg); color: var(--danger); }
.grid-body { overflow-y: auto; max-height: 520px; }
.grid-row { display: flex; border-bottom: 1px solid #f5f5f5; }
.time-label {
  width: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; color: var(--slate-400);
  background: var(--slate-50); border-right: 1px solid var(--slate-200);
  font-family: 'DM Mono', monospace;
}
.grid-slot {
  flex: 1; height: 28px; border-right: 1px solid #f0f0f0;
  cursor: pointer; transition: background 0.1s;
}
.grid-slot:hover { filter: brightness(90%); }
.grid-slot.available { background: var(--teal-500); }
.grid-slot.blocked   { background: white; }
.grid-slot.day-closed { background: var(--danger-bg); cursor: not-allowed; }

/* Day options modal */
.day-options { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.day-option-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--slate-200); background: white;
  font-family: 'DM Sans', sans-serif; font-size: 13.5px;
  font-weight: 500; cursor: pointer; transition: all 0.15s;
  text-align: left; color: var(--slate-700);
}
.day-option-btn:hover { border-color: var(--teal-300); background: var(--teal-50); }
.day-option-btn.danger { border-color: var(--danger-bg); }
.day-option-btn.danger:hover { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.day-option-desc { font-size: 11.5px; color: var(--slate-400); font-weight: 400; display: block; margin-top: 2px; }

/* ── TUTORIAL ───────────────────────────────────────────────── */
.tutorial-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; margin-top: 8px;
}
.tutorial-card {
  background: white; border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 20px;
  transition: box-shadow 0.2s;
}
.tutorial-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.tutorial-card-icon {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: var(--teal-50); display: flex; align-items: center;
  justify-content: center; margin-bottom: 12px;
}
.tutorial-card-icon i { font-size: 22px; color: var(--teal-600); }
.tutorial-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.tutorial-card p { font-size: 13px; color: var(--slate-500); line-height: 1.6; }
.tutorial-steps {
  list-style: none; margin-top: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.tutorial-steps li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: var(--slate-600);
}
.tutorial-steps li::before {
  content: attr(data-step);
  min-width: 20px; height: 20px;
  background: var(--teal-100); color: var(--teal-700);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}
.tutorial-tip {
  background: var(--warning-bg); border: 1px solid #fde68a;
  border-radius: var(--radius-md); padding: 10px 14px;
  font-size: 12.5px; color: #92400e; margin-top: 12px;
  display: flex; gap: 8px; align-items: flex-start;
}
.tutorial-tip i { flex-shrink: 0; font-size: 15px; margin-top: 1px; }
.tutorial-section-title {
  font-size: 16px; font-weight: 600; color: var(--slate-800);
  margin: 24px 0 12px; display: flex; align-items: center; gap: 8px;
}
.tutorial-section-title i { color: var(--teal-600); }

/* ── TOAST ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px; z-index: 9999;
}
.toast {
  padding: 11px 16px; background: var(--slate-900); color: white;
  border-radius: var(--radius-md); font-size: 13.5px; font-weight: 500;
  display: flex; align-items: center; gap: 8px; min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast.toast-success { background: var(--success); }
.toast.toast-error   { background: var(--danger); }

/* ── MISC ───────────────────────────────────────────────────── */
.page-loader {
  position: fixed; inset: 0; background: white; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px;
}
.page-loader.hidden { display: none; }
.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--teal-600);
  border-radius: 50%; animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-label { font-size: 13px; color: var(--slate-400); }
code {
  font-family: 'DM Mono', monospace; font-size: 11.5px;
  background: var(--slate-100); padding: 2px 6px;
  border-radius: 4px; color: var(--slate-600);
}
.multisede-note {
  background: var(--info-bg); border: 1px solid #bfdbfe;
  border-radius: var(--radius-md); padding: 9px 13px;
  font-size: 12px; color: var(--info); margin-bottom: 14px;
  display: flex; gap: 7px; align-items: center;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .horarios-layout { grid-template-columns: 1fr; }
  .horarios-panel-left { position: static; }
  .tutorial-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  /* Sidebar oculto por defecto en móvil */
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .btn-hamburger { display: flex; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .form-row { grid-template-columns: 1fr; }
  .modal { padding: 20px; }
  .login-card { padding: 32px 24px; }
  .grid-body { max-height: 380px; }
  .svc-grid { grid-template-columns: 1fr; }
  .bot-actions { flex-direction: column; }
  .toolbar { gap: 6px; }
  .toolbar input, .toolbar select { font-size: 12px; }
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar-date { display: none; }
  .topbar-badge span { display: none; }
  .stat-card { padding: 16px; }
  .stat-card .sc-value { font-size: 24px; }
}