/* ============================================================
   DENTSTUDIO UI — v3.0
   Sistema de Citas Dentales
   ============================================================ */

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

/* ─── TOKENS ─── */
:root {
  --navy:       #0B1829;
  --navy-2:     #112240;
  --navy-3:     #1A3461;
  --teal:       #00C9A7;
  --teal-2:     #00A88E;
  --teal-soft:  rgba(0,201,167,.12);
  --gold:       #F5C842;
  --bg:         #F0F4F9;
  --surface:    #FFFFFF;
  --border:     rgba(11,24,41,.08);
  --border-md:  rgba(11,24,41,.14);
  --text:       #0B1829;
  --text-2:     #4A5568;
  --text-3:     #8FA0B4;
  --danger:     #FF4757;
  --warning:    #FFA940;
  --success:    #00C9A7;

  --sidebar-w:  268px;
  --header-h:   66px;
  --r:          12px;
  --r-lg:       18px;
  --shadow:     0 2px 16px rgba(11,24,41,.07);
  --shadow-lg:  0 12px 48px rgba(11,24,41,.14);
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

/* ─── RESET ─── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size:15px; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ─── OVERLAY MOBILE ─── */
#sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(11,24,41,.55);
  backdrop-filter: blur(3px);
  z-index: 1200;
}
#sidebar-overlay.show { display: block; }

/* ─── SIDEBAR ─── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--navy);
  display: flex; flex-direction: column;
  z-index: 1300;
  transition: transform var(--transition);
}
.sidebar::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(180deg, transparent, rgba(0,201,167,.3) 40%, transparent);
}

/* Brand */
.sidebar-brand {
  padding: 26px 22px 20px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.brand-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-icon svg { width: 22px; height: 22px; fill: #fff; }
.brand-name {
  font-family: 'Syne', sans-serif;
  font-size: 17px; font-weight: 800; color: #fff;
  letter-spacing: .02em; line-height: 1.1;
}
.brand-sub {
  font-size: 10.5px; color: rgba(255,255,255,.4);
  letter-spacing: .08em; text-transform: uppercase; margin-top: 2px;
}

/* Nav sections */
.sidebar-section { padding: 18px 14px 6px; }
.sidebar-section-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.28); padding: 0 10px; margin-bottom: 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px; margin-bottom: 2px;
  color: rgba(255,255,255,.62); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: .18s ease; position: relative;
  border: none; background: transparent; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(0,201,167,.18), rgba(0,201,167,.06));
  color: var(--teal);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--teal); border-radius: 0 3px 3px 0;
}
.nav-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); flex-shrink: 0; transition: .18s;
}
.nav-item.active .nav-icon { background: rgba(0,201,167,.2); }
.nav-icon svg {
  width: 17px; height: 17px; stroke: currentColor;
  fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nav-badge {
  margin-left: auto;
  background: var(--teal); color: var(--navy);
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
}

/* Footer */
.sidebar-footer {
  padding: 16px 22px; border-top: 1px solid rgba(255,255,255,.07); margin-top: auto;
}
.user-card {
  display: flex; align-items: center; gap: 11px;
  cursor: pointer; border-radius: 10px; padding: 8px; transition: .18s;
}
.user-card:hover { background: rgba(255,255,255,.06); }
.user-name { font-size: 13px; font-weight: 600; color: #fff; }
.user-role { font-size: 11px; color: rgba(255,255,255,.4); }
.user-chevron { margin-left: auto; color: rgba(255,255,255,.3); }
.user-chevron svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ─── AVATAR ─── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #0097B2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 800;
  color: #fff; flex-shrink: 0; cursor: pointer;
}

/* ─── HEADER ─── */
.header {
  position: fixed; top: 0;
  left: var(--sidebar-w); right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; gap: 16px;
  transition: left var(--transition);
}
.header-left { display: flex; align-items: center; gap: 16px; }

/* Hamburger */
.hamburger {
  display: none;
  width: 36px; height: 36px;
  border: none; background: transparent; cursor: pointer;
  border-radius: 8px; padding: 8px;
  flex-direction: column; justify-content: space-between; align-items: center;
  transition: .18s;
}
.hamburger:hover { background: var(--bg); }
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: .28s cubic-bezier(.4,0,.2,1); transform-origin: center;
}
.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); }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.breadcrumb-root { color: var(--text-3); }
.breadcrumb-sep { color: var(--text-3); }
.breadcrumb-current { color: var(--text); font-weight: 600; }

/* Header right */
.header-right { display: flex; align-items: center; gap: 10px; }
.header-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 0 14px; height: 36px;
  transition: .18s;
}
.header-search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.header-search input {
  border: none; background: transparent; outline: none;
  font-size: 13.5px; color: var(--text); width: 200px;
}
.header-search input::placeholder { color: var(--text-3); }
.header-search svg { width: 15px; height: 15px; stroke: var(--text-3); fill: none; stroke-width: 2; flex-shrink: 0; }
.header-divider { width: 1px; height: 22px; background: var(--border); margin: 0 2px; }
.icon-btn {
  width: 36px; height: 36px; border: none; background: transparent;
  cursor: pointer; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: .15s; position: relative;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--danger); border-radius: 50%; border: 1.5px solid #fff;
}

/* ─── MAIN CONTENT ─── */
.main {
  margin-left: var(--sidebar-w);
  padding-top: var(--header-h);
  min-height: 100vh;
  transition: margin-left var(--transition);
}
.page { display: none; padding: 32px; }
.page.active { display: block; }

/* ─── PAGE HEADER ─── */
.page-intro { margin-bottom: 28px; }
.page-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 16px; margin-bottom: 28px;
}
.page-title {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 4px;
}
.page-subtitle { font-size: 14px; color: var(--text-2); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border: none; border-radius: var(--r);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: .18s ease; white-space: nowrap;
}
.btn svg {
  width: 16px; height: 16px; stroke: currentColor;
  fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(11,24,41,.2); }
.btn-teal { background: var(--teal); color: var(--navy); }
.btn-teal:hover { background: var(--teal-2); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border-md); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .88; }
.btn-danger-o { background: transparent; color: var(--danger); border: 1px solid rgba(255,71,87,.25); }
.btn-danger-o:hover { background: rgba(255,71,87,.06); }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 9px; }

/* ─── CARDS ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 15.5px; font-weight: 700; color: var(--text);
}
.card-subtitle { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* ─── KPI GRID ─── */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 24px; }
.kpi-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px 24px;
  position: relative; overflow: hidden; transition: .2s ease;
}
.kpi-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.kpi-accent {
  position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.kpi-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.kpi-icon svg {
  width: 20px; height: 20px; stroke: currentColor;
  fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.kpi-label {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px;
}
.kpi-value {
  font-family: 'Syne', sans-serif;
  font-size: 30px; font-weight: 800; color: var(--text); line-height: 1;
}
.kpi-delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; margin-top: 8px;
  padding: 3px 8px; border-radius: 99px;
}
.kpi-delta svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.kpi-delta.up { background: #ECFDF5; color: #059669; }
.kpi-delta.down { background: #FFF1F2; color: #E11D48; }

/* ─── CHARTS ─── */
.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.mini-chart { height: 90px; display: flex; align-items: flex-end; gap: 4px; }
.bar {
  flex: 1; border-radius: 5px 5px 0 0;
  background: var(--teal-soft); transition: .3s ease;
  min-height: 6px; cursor: pointer;
}
.bar:hover, .bar.active { background: var(--teal); }

.mini-list { display: flex; flex-direction: column; gap: 12px; }
.mini-list-item { display: flex; align-items: flex-start; gap: 10px; }
.mini-list-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.mini-list-label { font-size: 13px; color: var(--text-2); flex: 1; }
.mini-list-pct { font-size: 13px; font-weight: 700; color: var(--text); }
.progress-track { height: 5px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.progress-bar { height: 100%; border-radius: 99px; transition: width .6s ease; }

/* ─── PAGE HEADER CON SEARCH ─── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.page-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.page-header-left .search-box {
  max-width: 260px;
  height: 38px;
  background: var(--surface);
  border: 1.5px solid var(--border-md);
  border-radius: 10px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: .18s;
}
.page-header-left .search-box:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.search-box svg {
  width: 15px;
  height: 15px;
  stroke: var(--text-3);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}
.page-header-left .search-box svg {
  width: 15px; height: 15px;
  stroke: var(--text-3); fill: none; stroke-width: 2; flex-shrink: 0;
}
.page-header-left .search-box input {
  border: none; background: transparent; outline: none;
  font-size: 13.5px; color: var(--text); width: 180px;
}
.page-header-left .search-box input::placeholder { color: var(--text-3); }

/* ─── TABLE PRO ─── */
.table-card {
  padding: 0;
  overflow: hidden;
}
.table-responsive { overflow-x: auto; }

.table-pro {
  width: 100%;
  border-collapse: collapse;
}

.table-pro thead {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-3) 100%);
}

.table-pro thead th {
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  text-align: left;
  border: none;
  white-space: nowrap;
}
.table-pro thead th:first-child { border-radius: 0; }
.table-pro thead th:last-child  { border-radius: 0; }

.table-pro tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .15s, transform .15s;
}
.table-pro tbody tr:last-child { border-bottom: none; }
.table-pro tbody tr:hover {
  background: linear-gradient(90deg, rgba(0,201,167,.04), transparent);
}

.table-pro td {
  padding: 16px 20px;
  font-size: 13.5px;
  color: var(--text);
  vertical-align: middle;
  border: none;
}

/* Cell: nombre con icono */
.cell-name {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cell-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--teal-soft), rgba(0,201,167,.06));
  border: 1px solid rgba(0,201,167,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cell-icon svg {
  width: 16px; height: 16px;
  stroke: var(--teal); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.cell-name strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.cell-sub {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
  font-weight: 400;
}

/* Cell: teléfonos */
.cell-mono {
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

/* Cell: ubicación */
.cell-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-2);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-location svg {
  width: 13px; height: 13px;
  stroke: var(--text-3); fill: none;
  stroke-width: 2; flex-shrink: 0;
}

/* Cell: acciones */
.cell-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid;
  transition: .16s ease;
  white-space: nowrap;
}
.action-btn svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.action-edit {
  background: transparent;
  color: var(--navy);
  border-color: var(--border-md);
}
.action-edit:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11,24,41,.18);
}
.action-delete {
  background: transparent;
  color: var(--danger);
  border-color: rgba(255,71,87,.25);
}
.action-delete:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,71,87,.25);
}

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-success { background: #ECFDF5; color: #059669; } .badge-success::before { background: #059669; }
.badge-danger  { background: #FFF1F2; color: #E11D48; } .badge-danger::before  { background: #E11D48; }
.badge-warning { background: #FFFBEB; color: #D97706; } .badge-warning::before { background: #D97706; }
.badge-info    { background: #EFF6FF; color: #2563EB; } .badge-info::before    { background: #2563EB; }

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-success { background: #ECFDF5; color: #059669; } .badge-success::before { background: #059669; }
.badge-danger  { background: #FFF1F2; color: #E11D48; } .badge-danger::before  { background: #E11D48; }
.badge-warning { background: #FFFBEB; color: #D97706; } .badge-warning::before { background: #D97706; }
.badge-info    { background: #EFF6FF; color: #2563EB; } .badge-info::before    { background: #2563EB; }

/* ─── FORMS ─── */
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 12.5px; font-weight: 700; color: var(--text); letter-spacing: .01em; }
.input {
  height: 42px; border: 1px solid var(--border-md);
  border-radius: 10px; padding: 0 14px;
  font-size: 14px; color: var(--text); outline: none;
  background: #fff; transition: .16s ease; width: 100%;
}
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
select.input { cursor: pointer; }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; min-height: 90px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }


/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(11,24,41,.6);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; border-radius: 22px;
  width: 660px; max-width: 95%;
  height: 90vh; max-height: 90vh;
  overflow: hidden; box-shadow: 0 40px 100px rgba(11,24,41,.28);
  animation: modalIn .24s cubic-bezier(.34,1.36,.64,1);
  display: flex; flex-direction: column;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.93) translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.modal-header {
  padding: 22px 26px;
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-3) 100%);
  position: relative; overflow: hidden;
}
.modal-header::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(0,201,167,.12);
  pointer-events: none;
}
.modal-header::after {
  content: '';
  position: absolute; bottom: -30px; right: 80px;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}
.modal-header-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative; z-index: 1;
}
.modal-header-icon svg {
  width: 20px; height: 20px;
  stroke: #fff; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.modal-header-text { flex: 1; position: relative; z-index: 1; }
.modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 17px; font-weight: 700; color: #fff; line-height: 1.2;
}
.modal-subtitle {
  font-size: 12px; color: rgba(255,255,255,.55);
  margin-top: 2px; font-weight: 400;
}
.modal-close {
  width: 34px; height: 34px; border-radius: 9px; border: none;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.8); transition: .15s;
  position: relative; z-index: 1; flex-shrink: 0;
}
.modal-close:hover { background: rgba(255,255,255,.2); color: #fff; }
.modal-close svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2.5;
  stroke-linecap: round;
}
.modal-body { padding: 26px; overflow-y: auto; flex: 1; min-height: 0; }



/* ─── TOAST ─── */
#toast-stack {
  position: fixed; top: 20px; right: 20px;
  z-index: 99999; display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 12px;
  background: #fff; box-shadow: 0 10px 40px rgba(11,24,41,.18);
  min-width: 280px; max-width: 360px; border-left: 4px solid;
  animation: toastIn .28s cubic-bezier(.34,1.2,.64,1);
  pointer-events: all;
}
.toast.success { border-color: var(--teal); }
.toast.error   { border-color: var(--danger); }
.toast svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.toast.success svg { color: var(--teal); }
.toast.error svg   { color: var(--danger); }
.toast-msg { font-size: 13.5px; font-weight: 600; color: var(--text); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: none; }
}

/* ─── CONFIRM ─── */
#confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(11,24,41,.55); backdrop-filter: blur(3px);
  z-index: 99999; display: none; align-items: center; justify-content: center;
}
#confirm-overlay.show { display: flex; }
.confirm-box {
  background: #fff; border-radius: 18px; padding: 32px;
  width: 400px; max-width: 92%; text-align: center;
  box-shadow: 0 24px 64px rgba(11,24,41,.2);
  animation: modalIn .22s cubic-bezier(.34,1.36,.64,1);
}
.confirm-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: #FFF1F2; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
}
.confirm-icon svg { width: 24px; height: 24px; stroke: var(--danger); fill: none; stroke-width: 2; }
.confirm-title { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.confirm-body { font-size: 13.5px; color: var(--text-2); margin-bottom: 24px; line-height: 1.6; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }

/* ─── EMPTY STATE ─── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state svg { width: 52px; height: 52px; stroke: var(--text-3); fill: none; stroke-width: 1.4; margin: 0 auto 16px; }
.empty-state h3 { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; color: var(--text-2); }

/* ─── AGENDA ─── */
.agenda-week {
  display: grid;
  grid-template-columns: 60px repeat(5,1fr);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; background: var(--surface);
}
.agenda-head { background: #F7F9FC; border-bottom: 1px solid var(--border); }
.agenda-head-cell { padding: 12px; text-align: center; }
.day-name { font-size: 10.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.day-num { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--text); margin-top: 2px; }
.day-num.today { color: var(--teal); }
.agenda-time-cell { font-size: 11px; color: var(--text-3); font-weight: 600; padding: 8px 6px 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.agenda-slot { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); min-height: 54px; position: relative; }
.agenda-slot:last-child { border-right: none; }
.cita-block {
  position: absolute; left: 4px; right: 4px; top: 4px; bottom: 4px;
  border-radius: 7px; padding: 6px 8px; cursor: pointer;
  font-size: 11.5px; font-weight: 600; line-height: 1.3; transition: .15s;
  border-left: 3px solid;
}
.cita-block:hover { opacity: .82; transform: scale(1.02); }
.cita-teal  { background: rgba(0,201,167,.12); color: #007A65; border-color: var(--teal); }
.cita-navy  { background: rgba(17,34,64,.1); color: var(--navy-2); border-color: var(--navy-2); }
.cita-gold  { background: rgba(245,200,66,.18); color: #8A6800; border-color: var(--gold); }

/* ─── LOGIN ─── */
.login-page {
  min-height: 100vh; display: flex;
  background: var(--navy);
}
.login-panel {
  width: 480px; background: #fff; padding: 56px 48px;
  display: flex; flex-direction: column; justify-content: center;
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; }
.login-title { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.login-sub { font-size: 14px; color: var(--text-2); margin-bottom: 32px; }
.login-hero {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-2), var(--navy-3));
  position: relative; overflow: hidden;
}
.login-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(0,201,167,.15) 0%, transparent 60%);
}
.login-hero-text {
  text-align: center; color: #fff; position: relative; z-index: 1; padding: 40px;
}
.login-hero-text h2 { font-family: 'Syne', sans-serif; font-size: 36px; font-weight: 800; margin-bottom: 16px; }
.login-hero-text p { font-size: 16px; color: rgba(255,255,255,.6); line-height: 1.7; }
.form-error { font-size: 12.5px; color: var(--danger); margin-top: 4px; display: none; }
.form-error.show { display: block; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .charts-row { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-268px); }
  .sidebar.open { transform: translateX(0); }
  .header { left: 0; }
  .main { margin-left: 0; }
  .hamburger { display: flex; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .page-header { flex-wrap: wrap; gap: 12px; }
  .page-header-left { flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 768px) {
  :root { --header-h: 58px; }
  .page { padding: 16px; }
  .header { padding: 0 14px; }
  .header-search { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi-value { font-size: 24px; }
  .kpi-card { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header-left { flex-direction: column; align-items: flex-start; width: 100%; }
  .page-header-left .search-box { max-width: 100%; width: 100%; }
  .page-header .btn { width: 100%; justify-content: center; }
  .charts-row { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .table-pro th, .table-pro td { padding: 12px 10px; font-size: 12.5px; }
  .cell-actions { flex-direction: column; gap: 4px; }
  .action-btn { width: 100%; justify-content: center; }
  .modal { border-radius: 16px; }
  .modal-body { padding: 16px; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-value { font-size: 28px; }
  .page-title { font-size: 20px; }
  .table-pro thead { display: none; }
  .table-pro tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 12px;
    padding: 12px;
  }
  .table-pro td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border: none;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
  }
  .table-pro td:last-child { border-bottom: none; }
  .table-pro td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .06em;
    flex-shrink: 0;
    margin-right: 12px;
  }
  .cell-name { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cell-actions { flex-direction: row; flex-wrap: wrap; }
  .modal { max-width: 100%; border-radius: 16px 16px 0 0; align-self: flex-end; }
  .modal-overlay { align-items: flex-end; }
  .login-hero { display: none; }
  .login-panel { padding: 32px 20px; }
}

.table-pro .cell-icon svg,
.table-pro svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
}
.action-schedule {
  background: transparent;
  color: #6366F1;
  border-color: rgba(99,102,241,.25);
}
.action-schedule:hover {
  background: #6366F1;
  color: #fff;
  border-color: #6366F1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,.25);
}

.horario-row {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 6px;
  background: #F8FAFC;
  transition: .18s;
}
.horario-row.activo {
  background: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px var(--teal-soft);
}

/* Modal ancho para horarios */
#ds-modal {
  width: 780px;
  max-width: 96%;
}

/* Modal compacto — para confirmaciones cortas tipo éxito/error */
.modal-compact {
  height: auto !important;
  max-height: 90vh;
  width: 420px !important;
}
.modal-compact .modal-body {
  flex: none !important;
  padding: 0;
}
.modal-auto-height {
  height: auto !important;
  max-height: 90vh;
}
.modal-auto-height .modal-body {
  flex: none !important;
  max-height: calc(90vh - 90px);
  overflow-y: auto;
}







@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(1.3); }
}