:root {
  color-scheme: light;
  --primary: #6dff08;
  --primary-600: #3d8f00;
  --primary-700: #2c6700;
  --primary-soft: #e8ffd8;
  --primary-ghost: rgba(109, 255, 8, .08);
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --bg: #f4f7fb;
  --bg-2: #f2ffea;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #f1f5f9;
  --border: #e5eaf2;
  --border-strong: #d6deea;
  --text: #132033;
  --text-soft: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --success: #059669;
  --success-soft: #dcfce7;
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, .06);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, .09);
  --shadow-lg: 0 28px 80px rgba(15, 23, 42, .16);
  --ring: 0 0 0 4px rgba(109, 255, 8, .12);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background:
    radial-gradient(circle at top left, rgba(109, 255, 8, .16), transparent 30rem),
    radial-gradient(circle at 85% 8%, rgba(15, 118, 110, .10), transparent 26rem),
    linear-gradient(180deg, #fcfffa 0%, var(--bg) 54%, #f5f8f3 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
code { color: var(--primary-700); background: var(--primary-ghost); padding: 2px 7px; border-radius: 8px; }

/* Auth */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .86fr);
}
.auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px clamp(28px, 7vw, 104px);
  color: white;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, .28), transparent 20rem),
    linear-gradient(135deg, #0f172a 0%, #245300 52%, #6dff08 100%);
  overflow: hidden;
}
.auth-hero::before,
.auth-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.auth-hero::before {
  width: 540px;
  height: 540px;
  right: -220px;
  top: -160px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.18);
}
.auth-hero::after {
  width: 360px;
  height: 360px;
  left: -170px;
  bottom: -160px;
  background: rgba(20, 184, 166, .18);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 650; letter-spacing: -.02em; position: relative; z-index: 1; }
.logo { width: 48px; height: 48px; border-radius: 16px; box-shadow: 0 16px 44px rgba(0,0,0,.16); background: white; }
.auth-hero h1 {
  position: relative; z-index: 1;
  max-width: 760px;
  margin: 56px 0 18px;
  font-size: clamp(2.35rem, 5vw, 4.75rem);
  line-height: .98;
  letter-spacing: -.075em;
  font-weight: 760;
}
.auth-hero p { position: relative; z-index: 1; max-width: 700px; margin: 0; font-size: 1.05rem; line-height: 1.75; opacity: .88; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 38px; max-width: 760px; }
.hero-card { padding: 18px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 22px; backdrop-filter: blur(18px); box-shadow: 0 18px 50px rgba(0,0,0,.12); }
.hero-card b { display:block; margin-bottom: 5px; font-weight: 680; }
.hero-card span { opacity: .82; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: clamp(24px, 4vw, 48px); }
.panel-card { width: min(100%, 460px); background: rgba(255,255,255,.86); border: 1px solid rgba(214, 222, 234, .85); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 32px; backdrop-filter: blur(18px); }
.panel-card h2 { margin: 0 0 8px; font-size: 1.65rem; font-weight: 720; letter-spacing: -.045em; }
.panel-card p { margin: 0 0 22px; color: var(--muted); line-height: 1.55; }

/* Fields and controls */
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { font-size: .82rem; color: var(--text-soft); font-weight: 650; letter-spacing: -.01em; }
.field small { margin: 0; color: var(--muted); font-size: .82rem; }
.input, input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  background: rgba(255,255,255,.92);
  color: var(--text);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 12px) 19px; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
textarea { min-height: 100px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #c5d0df; background: white; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: var(--ring); background: white; }
input[readonly] { color: var(--muted); background: var(--surface-soft); }

/* v3.12.2 Hotfix controles pequeños y lectura de campos por id */
input[type="checkbox"], input[type="radio"] {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  margin: 0 8px 0 0;
  border-radius: 5px;
  accent-color: var(--primary);
  box-shadow: none;
  flex: 0 0 auto;
  vertical-align: middle;
}
input[type="radio"] { border-radius: 999px; }
.check-card input[type="checkbox"], .check-chip input[type="checkbox"], .option-card input[type="radio"], .option-card input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
}
.check-card { justify-content: flex-start; }
.check-card input[type="checkbox"] + span, .check-chip input[type="checkbox"] + span { flex: 1; }


.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 42px;
  padding: 10px 16px;
  font-weight: 650;
  color: #102a00;
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(109, 255, 8, .22);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(109, 255, 8, .28); }
.btn.secondary { color: var(--text); background: white; box-shadow: var(--shadow-sm); border-color: var(--border); }
.btn.secondary:hover { border-color: var(--primary); box-shadow: 0 14px 30px rgba(15, 23, 42, .10); }
.btn.ghost { background: rgba(255,255,255,.72); color: var(--text-soft); border-color: var(--border); box-shadow: none; }
.btn.ghost:hover { color: var(--primary-700); border-color: rgba(109,255,8,.26); background: var(--primary-ghost); }
.btn.danger { color: white; background: var(--danger); box-shadow: 0 12px 26px rgba(220,38,38,.18); }
.btn.success { color: white; background: var(--success); box-shadow: 0 12px 26px rgba(22, 163, 74, .18); }
.error, .success {
  padding: 12px 14px;
  border-radius: 16px;
  margin-bottom: 14px;
  font-size: .92rem;
}
.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.success { background: #ecfdf5; color: #065f46; border: 1px solid #bbf7d0; }

/* App shell */
.app-layout { min-height: 100vh; display: grid; grid-template-columns: 292px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(255,255,255,.78);
  border-right: 1px solid rgba(226,232,240,.85);
  padding: 20px 14px;
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.sidebar .brand { padding: 2px 10px 16px; border-bottom: 1px solid var(--border); }
.sidebar .brand span { font-size: 1rem; }
.sidebar-nav { display: grid; gap: 5px; overflow: auto; padding-right: 4px; }
.sidebar-nav::-webkit-scrollbar { width: 7px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.nav-link {
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 11px 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  text-decoration: none;
  font-weight: 610;
  display: flex;
  gap: 10px;
  align-items: center;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, border-color .16s ease, transform .16s ease;
}
.nav-link span:first-child { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--surface-soft); }
.nav-link:hover { color: var(--text); background: white; border-color: var(--border); transform: translateX(2px); }
.nav-link.active { color: var(--primary-700); background: var(--primary-ghost); border-color: rgba(109,255,8,.18); box-shadow: inset 3px 0 0 var(--primary); }
.nav-link.active span:first-child { background: white; }
.sidebar-footer { margin-top: auto; padding: 16px 10px 4px; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.sidebar-footer b { color: var(--text); font-weight: 680; }
.main { min-width: 0; padding: 28px clamp(18px, 3vw, 34px); }
.topbar {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom: 22px;
  padding: 4px 2px;
}
.topbar h1 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.1; letter-spacing: -.06em; font-weight: 730; }
.topbar p { margin: 7px 0 0; color: var(--muted); max-width: 880px; }
.mobile-menu { display:none; margin-bottom: 10px; }

/* Surfaces */
.card {
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(226,232,240,.88);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  backdrop-filter: blur(16px);
}
.card h2 { margin: 0 0 8px; font-size: 1.16rem; letter-spacing: -.03em; font-weight: 700; }
.card p { color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { position: relative; overflow: hidden; padding: 20px; border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.92)); border: 1px solid var(--border); box-shadow: 0 10px 24px rgba(15,23,42,.045); }
.stat::after { content:""; position:absolute; inset:auto 18px 0 auto; width:52px; height:4px; border-radius:999px; background: var(--primary); opacity:.26; }
.stat span { color: var(--muted); font-size: .82rem; font-weight: 650; }
.stat strong { display:block; margin-top: 7px; font-size: 2rem; letter-spacing: -.055em; font-weight: 760; }
.stat small { display:block; margin-top:6px; color: var(--muted); }
.empty { padding: 34px; text-align:center; color:var(--muted); border:1px dashed var(--border-strong); border-radius: 20px; background: rgba(255,255,255,.75); }

/* Toolbars and tables */
.toolbar { display:flex; gap: 12px; flex-wrap: wrap; align-items:center; justify-content:space-between; margin-bottom: 16px; }
.toolbar h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.04em; }
.toolbar p { margin: 4px 0 0; color: var(--muted); }
.toolbar-left, .toolbar-right { display:flex; gap: 10px; flex-wrap: wrap; align-items:center; }
.toolbar-left input { min-width: min(360px, 100%); }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 20px; background: white; box-shadow: 0 1px 0 rgba(15,23,42,.03); }
table { width:100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
th, td { padding: 14px 15px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 1; font-size: .72rem; text-transform: uppercase; color: var(--muted); background: #f8fafc; letter-spacing: .075em; font-weight: 740; }
td { font-size: .91rem; color: var(--text-soft); }
td b { color: var(--text); font-weight: 700; }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #fcfffa; }
tbody tr:last-child td { border-bottom: 0; }
td small { display:block; color: var(--muted); font-size:.76rem; margin-top:4px; line-height:1.35; }
.badge { display:inline-flex; align-items:center; border-radius:999px; padding: 6px 10px; font-size:.76rem; font-weight:700; background: var(--primary-soft); color:#2c6700; border: 1px solid rgba(109,255,8,.12); }
.badge.success { background: var(--success-soft); color:#166534; border-color:#bbf7d0; margin:0; }
.badge.warn { background: var(--warning-soft); color:#92400e; border-color:#fde68a; }
.badge.danger { background: var(--danger-soft); color:#991b1b; border-color:#fecaca; }

/* Screen forms */
.screen-form-host { animation: formEnter .18s ease both; }
.screen-form {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 30px);
  border-radius: 30px;
}
.form-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.form-page-header h2 { margin: 3px 0 6px; font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 730; letter-spacing: -.055em; }
.form-page-header p { margin: 0; max-width: 820px; color: var(--muted); }
.form-page-kicker { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; color: var(--primary-700); background: var(--primary-ghost); border: 1px solid rgba(109,255,8,.16); font-size: .75rem; font-weight: 720; text-transform: uppercase; letter-spacing: .065em; }
.form-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.form-grid .field { margin-bottom: 0; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .toolbar-right.full, .full.toolbar-right { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 8px; justify-content: flex-end; gap: 10px; }
.form-section { grid-column: 1 / -1; border: 1px solid var(--border); background: linear-gradient(180deg, #ffffff, #fcfffa); border-radius: 20px; padding: 14px 16px; margin: 6px 0 0; }
.form-section h3, .conditional-panel h3 { margin: 0 0 4px; font-size: 1rem; letter-spacing: -.025em; font-weight: 700; }
.form-section p, .conditional-panel p { margin: 0; color: var(--muted); font-size: .86rem; }
.phone-row { display: grid; grid-template-columns: minmax(155px, 200px) 1fr; gap: 8px; }
.conditional-panel { display: none; border: 1px solid rgba(109, 255, 8, .16); background: linear-gradient(180deg, rgba(232, 255, 216, .55), rgba(255,255,255,.92)); border-radius: 22px; padding: 16px; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.conditional-panel.visible { display: block; }
.form-grid.nested { margin-top: 12px; }
.photo-preview { margin-top: 10px; min-height: 110px; border: 1px dashed #cbd5e1; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: var(--muted); overflow: hidden; background: linear-gradient(135deg, #f8fafc, #f2ffea); }
.photo-preview img { max-height: 170px; max-width: 100%; object-fit: contain; display: block; }

/* Agenda */
.agenda-card .table-wrap table { min-width: 1120px; }
.agenda-filters input, .agenda-filters select { width: auto; min-width: 180px; }
.quick-strip { display:flex; flex-wrap:wrap; gap:8px; margin:-4px 0 14px; }
.action-stack { display:flex; flex-wrap:wrap; gap:6px; min-width:240px; }
.action-stack .btn { min-height: 32px; padding:6px 10px; border-radius:999px; font-size:.77rem; box-shadow: none; }
.action-stack .btn.danger { color:#991b1b; background:#fee2e2; border-color:#fecaca; }
#appointmentForm .field { margin-bottom:0; }
@keyframes formEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Portals */
.portal-shell { min-height: 100vh; padding: 28px; }
.portal-header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:22px; }
.kiosk { min-height: 100vh; display:grid; place-items:center; padding:24px; }

@media (max-width: 1180px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { min-height: 42vh; }
  .hero-grid, .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 292px; transform: translateX(-105%); z-index: 10; transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display:inline-flex; }
  .main { padding: 18px; }
  .topbar { align-items:flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .agenda-filters input, .agenda-filters select { width: 100%; min-width: 100%; }
  .agenda-toolbar .toolbar-left, .agenda-toolbar .toolbar-right { width: 100%; }
  .agenda-toolbar .toolbar-right .btn, .agenda-toolbar .toolbar-right .badge { flex: 1; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .auth-panel, .portal-shell { padding: 18px; }
  .auth-hero { padding: 42px 22px; }
  .panel-card, .card { border-radius: 22px; padding: 18px; }
  .form-page-header { flex-direction: column; }
  .form-page-header .btn { width: 100%; }
  .toolbar-left, .toolbar-right, .toolbar-left input, .toolbar-left .btn, .toolbar-right .btn { width: 100%; }
  .btn { width: auto; }
  .phone-row { grid-template-columns: 1fr; }
  .main { padding: 14px; }
}
.module-title-icon { display:inline-grid; place-items:center; width: 42px; height: 42px; margin-right: 10px; border-radius: 15px; background: white; border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: 1.16rem; vertical-align: middle; }

/* Patient expediente */
.link-button {
  display: block;
  border: 0;
  background: transparent;
  color: var(--primary-700);
  font: inherit;
  font-weight: 740;
  text-align: left;
  padding: 0;
  cursor: pointer;
}
.link-button:hover { text-decoration: underline; }
.action-stack.horizontal { min-width: unset; align-items: center; }
.patient-record-page { width: min(1320px, 100%); margin: 0 auto; }
.record-layout { display: grid; gap: 16px; }
.patient-record-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
}
.patient-avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, #f3ffeb, #ffffff);
  border: 1px solid var(--border);
  color: var(--primary-700);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.patient-avatar.large { width: 94px; height: 94px; border-radius: 30px; font-size: 2rem; }
.patient-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.patient-record-hero h2 { margin: 4px 0 4px; font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -.055em; }
.patient-record-hero p { margin: 0; color: var(--muted); }
.record-kicker { color: var(--muted); font-size: .82rem; font-weight: 760; text-transform: uppercase; letter-spacing: .065em; }
.record-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.record-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.observation-card { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb, #ffffff); }
.observation-card h3 { color: #92400e; }
.record-stats { margin: 0; }
.record-sections { align-items: stretch; }
.detail-card h3, .patient-record-page .card h3 { margin-top: 0; }
.detail-list { margin: 0; display: grid; gap: 9px; }
.detail-list div { display: grid; grid-template-columns: 165px 1fr; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--border); }
.detail-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: .82rem; font-weight: 680; }
.detail-list dd { margin: 0; font-weight: 650; color: var(--text); }
.patient-record-page .table-wrap table { min-width: 900px; }

@media (max-width: 820px) {
  .patient-record-hero { grid-template-columns: 1fr; text-align: left; }
  .record-actions { justify-content: flex-start; }
  .detail-list div { grid-template-columns: 1fr; gap: 3px; }
}

/* v3.6 doctor/clinic filters */
.toolbar-select {
  min-width: 220px;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(15, 23, 42, .04));
}
.info-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #bfff93;
  background: linear-gradient(180deg, #f3ffeb, #ffffff);
  color: #245300;
  border-radius: 16px;
  font-weight: 650;
  line-height: 1.4;
}
.info-note::before { content: 'ℹ️'; }
.clinic-record-page .record-summary { align-self: stretch; }
@media (max-width: 640px) {
  .toolbar-left .toolbar-select { width: 100%; min-width: 100%; }
}

/* v3.7 Configuración operativa */
.config-tabs-card { padding: 0; overflow: hidden; }
.config-tabs { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--border); background: rgba(248,250,252,.8); }
.config-tab { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 10px 14px; font-weight: 800; cursor: pointer; color: var(--muted); }
.config-tab.active { background: var(--primary); color: #102a00; border-color: var(--primary); box-shadow: 0 10px 24px rgba(109,255,8,.18); }
.config-resource-title { padding: 20px 20px 0; }
.config-resource-title h2 { margin: 0 0 4px; }
.config-resource-title p { margin: 0; color: var(--muted); }
.config-tabs-card > .card { border: 0; box-shadow: none; border-radius: 0; margin-top: 0; }
.config-form .form-section { margin-top: 6px; background: linear-gradient(135deg, rgba(109,255,8,.08), rgba(109,255,8,.06)); border: 1px solid rgba(109,255,8,.12); border-radius: 18px; padding: 16px; }
.config-form .form-section h3 { margin: 0 0 4px; }
.config-form .form-section p { margin: 0; color: var(--muted); }
.schedule-editor { display: grid; gap: 10px; }
.schedule-row { display: grid; grid-template-columns: minmax(130px, 1fr) 140px auto 140px; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.schedule-row label { font-weight: 800; color: var(--text); }
.config-list { display: grid; gap: 10px; }
.config-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) 150px 150px 150px minmax(150px, 1fr); align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.supply-row { grid-template-columns: minmax(220px, 1fr) 140px; }
.config-row label { font-weight: 800; color: var(--text); }
.check-chip { display: inline-flex; align-items: center; gap: 8px; margin: 5px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-weight: 750; color: var(--muted); }
.color-dot { display:inline-block; width:16px; height:16px; border-radius:50%; border:1px solid rgba(15,23,42,.18); margin-right:8px; vertical-align:middle; }
.btn.ghost.danger { color: #b91c1c; border-color: rgba(185,28,28,.18); }
@media (max-width: 760px) {
  .schedule-row { grid-template-columns: 1fr; }
  .config-row, .supply-row { grid-template-columns: 1fr; }
}

/* v3.8 Insumos */
.inventory-page .table-wrap table { min-width: 1120px; }
.inventory-alert-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 14px; margin-bottom: 16px; }
.alert-card { border: 1px solid var(--border); border-radius: 20px; padding: 16px; background: #fff; display: grid; gap: 4px; box-shadow: var(--shadow-xs, 0 1px 2px rgba(15, 23, 42, .04)); }
.alert-card b { font-size: 2rem; line-height: 1; color: var(--text); }
.alert-card span { font-weight: 850; color: var(--text); }
.alert-card small { color: var(--muted); }
.alert-card.ok { border-color: #bbf7d0; background: linear-gradient(180deg, #f0fdf4, #fff); }
.alert-card.warn { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb, #fff); }
.alert-card.danger { border-color: #fecaca; background: linear-gradient(180deg, #fef2f2, #fff); }
.inventory-alert-details { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.inventory-alert-details > div { border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; background: rgba(248,250,252,.86); }
.inventory-alert-details h3 { margin: 0 0 8px; font-size: .98rem; }
.inventory-alert-details ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 6px; }
.stock-chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; max-width: 360px; }
.stock-chip { display: inline-flex; gap: 5px; align-items: center; border: 1px solid #cbd5e1; border-radius: 999px; padding: 6px 10px; background: #fff; color: var(--muted); font-size: .82rem; font-weight: 750; }
.stock-chip.low { border-color: #f59e0b; color: #92400e; background: #fffbeb; }
.inventory-form .form-grid { align-items: end; }
@media (max-width: 760px) {
  .inventory-alert-grid, .inventory-alert-details { grid-template-columns: 1fr; }
}

/* v3.9 Agenda calendario y asistente por pasos */
.calendar-main-toolbar{align-items:flex-start;gap:14px;flex-wrap:wrap}.calendar-header-line{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:18px 0}.calendar-header-line h2{margin:0;font-size:1.45rem}.calendar-header-line p{margin:4px 0 0;color:var(--muted);max-width:760px}.segmented{display:inline-flex;background:#f2ffea;border:1px solid #dcffc4;border-radius:999px;padding:4px;gap:2px}.segmented button{border:0;background:transparent;padding:9px 14px;border-radius:999px;font-weight:800;color:#5b6b84;cursor:pointer}.segmented button.active{background:#fff;color:#245300;box-shadow:0 8px 24px rgba(36,83,0,.12)}
.calendar-week-view{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));border:1px solid #dbe5f3;border-radius:24px;overflow:auto;background:#fff}.calendar-week-day{min-height:560px;border-right:1px solid #e7edf6;padding:12px;background:linear-gradient(180deg,#fff,#fbfdff)}.calendar-week-day:last-child{border-right:0}.calendar-week-day.today{background:#fbfff8}.calendar-day-head{display:flex;justify-content:space-between;align-items:center;padding-bottom:10px;border-bottom:1px solid #edf2f7;margin-bottom:10px}.calendar-day-head strong{text-transform:uppercase;letter-spacing:.06em;font-size:.78rem;color:#64748b}.calendar-day-head span{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#f3ffeb;color:#3d8f00;font-weight:900}.calendar-day-events{display:flex;flex-direction:column;gap:8px}.calendar-no-events{border:1px dashed #dbe5f3;border-radius:14px;padding:16px;text-align:center;color:#94a3b8;font-size:.85rem}.calendar-event{width:100%;text-align:left;border:1px solid #dbe5f3;border-left:5px solid var(--event-color,#6dff08);border-radius:14px;padding:9px 10px;background:#fff;cursor:pointer;box-shadow:0 6px 16px rgba(15,23,42,.06)}.calendar-event:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(15,23,42,.10)}.calendar-event span{display:block;font-weight:900;color:#0f172a;font-size:.82rem}.calendar-event small{display:block;color:#64748b;font-weight:650;margin-top:3px;line-height:1.35}.calendar-day-view{border:1px solid #dbe5f3;border-radius:24px;background:#fff;overflow:hidden}.calendar-time-row{display:grid;grid-template-columns:82px 1fr;min-height:56px;border-bottom:1px solid #edf2f7}.calendar-time-row:last-child{border-bottom:0}.calendar-time-label{padding:14px;color:#64748b;font-weight:800;background:#f8fafc;border-right:1px solid #edf2f7}.calendar-time-cell{padding:9px;display:grid;gap:7px}.calendar-empty-line{display:block;height:20px;border-bottom:1px dashed #e2e8f0}.calendar-month-view{display:grid;grid-template-columns:repeat(7,minmax(130px,1fr));border:1px solid #dbe5f3;border-radius:24px;overflow:auto;background:#fff}.calendar-month-weekday{background:#f8fafc;color:#64748b;font-weight:900;text-transform:uppercase;font-size:.75rem;letter-spacing:.06em;padding:12px;border-right:1px solid #edf2f7}.calendar-month-cell{min-height:150px;padding:10px;border-top:1px solid #edf2f7;border-right:1px solid #edf2f7;background:#fff}.calendar-month-cell.muted{background:#f8fafc;color:#94a3b8}.calendar-month-cell.today{box-shadow:inset 0 0 0 2px #bfff93}.calendar-month-number{font-weight:900;margin-bottom:8px;color:#0f172a}.appointment-wizard{max-width:1180px;margin:0 auto}.wizard-steps{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin:18px 0 24px}.wizard-steps button{border:1px solid #dbe5f3;background:#fff;border-radius:16px;padding:12px 8px;font-weight:900;color:#64748b;cursor:pointer}.wizard-steps button span{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:999px;background:#e2e8f0;color:#475569;margin-right:6px}.wizard-steps button.active{border-color:#8fff42;background:#f3ffeb;color:#3d8f00}.wizard-steps button.active span,.wizard-steps button.done span{background:#6dff08;color:#102a00}.wizard-section h3{font-size:1.25rem;margin-bottom:4px}.wizard-section p{color:#64748b;margin-top:0}.toggle-row{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.toggle-row .active{background:#6dff08;color:#102a00;border-color:#6dff08}.search-box{position:relative;margin-bottom:14px}.search-results{display:grid;gap:8px;margin-top:8px}.result-item{border:1px solid #dbe5f3;background:#fff;border-radius:16px;padding:12px;text-align:left;cursor:pointer}.result-item:hover{border-color:#8fff42;background:#fcfffa}.result-item b,.result-item small{display:block}.result-item small{color:#64748b;margin-top:3px}.selected-card{display:grid;grid-template-columns:78px 1fr;gap:14px;border:1px solid #dbe5f3;border-radius:22px;background:#fff;padding:16px;box-shadow:0 12px 30px rgba(15,23,42,.06)}.selected-card img,.avatar-placeholder{width:78px;height:78px;border-radius:18px;object-fit:cover;background:#efffe5;display:grid;place-items:center;font-size:2rem}.selected-card b,.selected-card small{display:block}.selected-card small{color:#64748b;margin-top:4px}.subcard{border:1px solid #dbe5f3;border-radius:22px;background:#fff;padding:16px}.subcard h4{margin-top:0}.choice-list{display:grid;gap:8px;max-height:420px;overflow:auto;margin-top:10px}.choice-item{display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:center;border:1px solid #dbe5f3;border-radius:16px;background:#fff;padding:12px;text-align:left;cursor:pointer}.choice-item small{grid-column:2;color:#64748b}.choice-item.selected{border-color:#6dff08;background:#f3ffeb}.summary-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:16px}.slot-box{margin-top:14px}.slot-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px}.slot-btn{border:1px solid #dbe5f3;border-radius:14px;background:#fff;padding:12px;font-weight:900;cursor:pointer}.slot-btn:hover:not(:disabled),.slot-btn.selected{background:#6dff08;border-color:#6dff08;color:#102a00}.slot-btn:disabled{opacity:.45;cursor:not-allowed;background:#f1f5f9}.delivery-options{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:12px}.option-card{display:block;border:1px solid #dbe5f3;border-radius:22px;background:#fff;padding:16px;cursor:pointer}.option-card input{margin-right:8px}.option-card b,.option-card small{display:block}.option-card small{color:#64748b;margin-top:4px}.express-option{margin-top:14px}.verify-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px}.verify-block p{line-height:1.55;color:#334155}.color-dot{display:inline-block;width:14px;height:14px;border-radius:999px;margin-right:6px;vertical-align:middle}
@media (max-width: 980px){.wizard-steps{grid-template-columns:repeat(2,1fr)}.calendar-week-view,.calendar-month-view{grid-template-columns:repeat(7,170px)}.delivery-options,.verify-grid{grid-template-columns:1fr}.summary-strip{grid-template-columns:1fr}.selected-card{grid-template-columns:1fr}.calendar-header-line{align-items:flex-start;flex-direction:column}}

/* v3.10 Bloqueos y sala de espera */
.agenda-subsection{margin-top:20px;border:1px solid #dbe5f3;border-radius:24px;background:rgba(255,255,255,.82);padding:18px;box-shadow:0 14px 36px rgba(15,23,42,.06)}
.section-title-row{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px}.section-title-row h3{margin:0;font-size:1.15rem}.section-title-row p{margin:4px 0 0;color:#64748b}.block-list{display:grid;gap:10px}.block-item{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid #fde68a;background:linear-gradient(180deg,#fffbeb,#fff);border-radius:18px;padding:14px}.block-item b,.block-item small{display:block}.block-item small{color:#92400e;margin-top:3px}.block-item p{margin:8px 0 0;color:#64748b}.btn.tiny{padding:7px 9px;border-radius:999px;font-size:.75rem;box-shadow:none}.btn.danger,.btn.danger.ghost{border-color:#fecaca;color:#b91c1c;background:#fff}.btn.danger:hover{background:#fee2e2}.waiting-grid{display:grid;grid-template-columns:repeat(5,minmax(180px,1fr));gap:12px;overflow:auto}.waiting-column{border:1px solid #dbe5f3;border-radius:18px;background:#f8fafc;padding:12px;min-height:160px}.waiting-column h4{margin:0 0 10px;color:#0f172a;font-size:.95rem}.waiting-card{display:grid;gap:4px;border:1px solid #dbe5f3;background:#fff;border-radius:16px;padding:12px;margin-bottom:10px}.waiting-card.walk-in{border-color:#bfff93;background:linear-gradient(180deg,#f3ffeb,#fff)}.waiting-card b{font-size:.92rem}.waiting-card small{color:#64748b}.waiting-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.wizard-steps{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}
@media (max-width: 980px){.waiting-grid{grid-template-columns:repeat(5,220px)}.block-item{align-items:flex-start;flex-direction:column}}

/* v3.11 Caja rediseñada */
.cash-shell { display: grid; gap: 18px; }
.cash-session-bar { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:18px 20px; border-radius:24px; background:linear-gradient(135deg,#ffffff,#f3ffeb); border:1px solid var(--border); box-shadow:var(--shadow-sm); }
.cash-open-card { max-width:760px; margin:0 auto; }
.cash-wizard { overflow:hidden; }
.wizard-steps { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; margin-bottom:22px; }
.wizard-step { border:1px solid var(--border); border-radius:18px; padding:12px; display:flex; gap:10px; align-items:center; background:#fff; color:var(--muted); }
.wizard-step span { width:28px; height:28px; border-radius:999px; display:grid; place-items:center; background:#f3ffec; color:#2c6700; font-weight:800; }
.wizard-step.active { border-color:#6dff08; box-shadow:0 8px 30px rgba(109,255,8,.12); color:var(--text); }
.wizard-step.active span { background:#6dff08; color:#102a00; }
.wizard-step.done span { background:#0f766e; color:white; }
.cash-step-body { min-height:420px; }
.choice-grid { display:grid; gap:14px; }
.choice-grid.cols-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.choice-card { text-align:left; border:1px solid var(--border); background:#fff; border-radius:22px; padding:18px; box-shadow:var(--shadow-sm); cursor:pointer; display:grid; gap:8px; }
.choice-card:hover, .choice-card.selected { border-color:#6dff08; box-shadow:0 14px 36px rgba(109,255,8,.14); transform:translateY(-1px); }
.choice-card[disabled] { opacity:.5; cursor:not-allowed; }
.search-panel { display:grid; gap:10px; margin-bottom:16px; }
.choice-list { display:grid; gap:8px; }
.choice-list.compact { margin:8px 0 12px; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
.choice-item { border:1px solid var(--border); background:#fff; border-radius:16px; padding:12px 14px; text-align:left; cursor:pointer; display:grid; gap:2px; }
.choice-item:hover { border-color:#0f766e; background:#f0fdfa; }
.selected-summary { display:flex; gap:14px; align-items:flex-start; padding:14px; border:1px solid var(--border); border-radius:20px; background:#fff; margin:12px 0; }
.appointment-pick-list { display:grid; gap:10px; }
.appointment-pick { border:1px solid var(--border); border-radius:18px; padding:13px 14px; background:#fff; text-align:left; display:grid; gap:4px; cursor:pointer; }
.appointment-pick.selected { border-color:#0f766e; background:#ecfdf5; }
.appointment-pick:disabled { opacity:.55; cursor:not-allowed; }
.cash-item-manager { margin:18px 0; padding:16px; border:1px solid var(--border); border-radius:24px; background:#f8fafc; }
.cash-item-qty { max-width:84px; padding:8px 10px; }
.total-panel { margin-top:18px; padding:18px 20px; border-radius:22px; background:#0f172a; color:#fff; display:flex; align-items:center; justify-content:space-between; }
.total-panel b { font-size:1.7rem; }
.wizard-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }
.card.soft { background:#fbfdff; box-shadow:none; }
.check-card { border:1px solid var(--border); border-radius:18px; padding:14px; background:#fff; display:flex; align-items:center; gap:10px; }
.chip-grid { display:flex; flex-wrap:wrap; gap:8px; }
.check-chip { border:1px solid var(--border); border-radius:999px; padding:8px 12px; background:#fff; display:inline-flex; gap:6px; align-items:center; }
.hidden { display:none !important; }
.mixed-payments { display:grid; gap:10px; }
.payment-line { display:grid; grid-template-columns:150px minmax(120px,180px) 1fr; gap:10px; align-items:center; border:1px solid var(--border); border-radius:16px; padding:10px; background:#fff; }
.card-extra { display:flex; gap:8px; }
.summary-list { display:grid; grid-template-columns:1fr auto; gap:10px 18px; align-items:center; }
.summary-list b:last-child { font-size:1.4rem; color:#0f766e; }
@media (max-width: 900px) { .wizard-steps { grid-template-columns:1fr 1fr; } .choice-grid.cols-3 { grid-template-columns:1fr; } .cash-session-bar { flex-direction:column; align-items:flex-start; } .payment-line { grid-template-columns:1fr; } }

.ticket-logo-card .ticket-logo-preview { width: 74px; height: 74px; object-fit: contain; border-radius: 18px; border: 1px solid var(--border); background: #fff; padding: 10px; box-shadow: var(--shadow-soft); }
.cash-expense-form .hidden, .cash-close-form .hidden { display: none !important; }
.input-like { min-height: 44px; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface-soft); font-weight: 800; display:flex; align-items:center; }
.cash-close-form .card.soft { margin-top: 14px; }
.cash-session-bar .toolbar-right { gap: 10px; flex-wrap: wrap; }
@media (max-width: 780px) { .cash-session-bar { align-items: stretch; } .cash-session-bar .toolbar-right { justify-content: stretch; } .cash-session-bar .toolbar-right .btn { width: 100%; } }
.ticket-logo-card .ticket-logo-preview.wide { width: 160px; height: 74px; object-fit: contain; }

/* v3.12.7 Agenda hover, detalles y diálogos internos */
.app-dialog-overlay{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;background:rgba(15,23,42,.48);backdrop-filter:blur(8px);padding:18px;animation:dialogFade .15s ease both}.app-dialog-overlay.closing{animation:dialogFadeOut .12s ease both}.app-dialog{width:min(520px,100%);max-height:88vh;overflow:auto;border:1px solid rgba(219,229,243,.95);border-radius:24px;background:#fff;box-shadow:0 30px 90px rgba(15,23,42,.28)}.app-dialog.wide{width:min(900px,100%)}.app-dialog-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:22px 24px;border-bottom:1px solid #e7edf6;background:linear-gradient(180deg,#fff,#fcfffa)}.app-dialog-kicker{display:block;color:#64748b;font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;margin-bottom:4px}.app-dialog h3{margin:0;font-size:1.35rem;letter-spacing:-.03em}.app-dialog-close{width:36px;height:36px;border:1px solid #dbe5f3;border-radius:999px;background:#fff;color:#64748b;font-size:1.35rem;line-height:1;cursor:pointer}.app-dialog-close:hover{background:#f3ffeb;color:#3d8f00}.app-dialog-body{padding:22px 24px;color:#334155}.app-dialog-body p{margin:.35rem 0;white-space:pre-wrap}.app-dialog-input{width:100%;min-height:110px;margin-top:12px;border:1px solid #dbe5f3;border-radius:16px;padding:14px;font:inherit;resize:vertical}.app-dialog-actions{display:flex;justify-content:flex-end;gap:10px;padding:16px 24px 22px;border-top:1px solid #eef2f7;background:#fbfdff}@keyframes dialogFade{from{opacity:0}to{opacity:1}}@keyframes dialogFadeOut{from{opacity:1}to{opacity:0}}
.calendar-week-view,.calendar-day-view,.calendar-month-view{overflow:visible;position:relative;z-index:1}.calendar-week-day,.calendar-month-cell,.calendar-time-cell{position:relative;z-index:1;overflow:visible}.calendar-time-row,.calendar-day-events{overflow:visible}.calendar-week-day:hover,.calendar-month-cell:hover,.calendar-time-cell:hover,.calendar-time-row:hover{z-index:5000}.calendar-time-cell.drag-over,.calendar-week-day.drag-over,.calendar-month-cell.drag-over{outline:3px solid rgba(109,255,8,.32);outline-offset:-4px;background:#f3ffeb}.calendar-event{position:relative;overflow:visible;z-index:2}.calendar-event:hover,.calendar-event:focus-visible{z-index:6000}.calendar-event.dragging{opacity:.42}.appointment-event{touch-action:none}.agenda-hover-card{display:none;position:absolute;z-index:7000;left:calc(100% + 12px);top:0;width:340px;border:2px solid #baff8a;border-radius:18px;background:#fff;padding:16px;text-align:left;box-shadow:0 28px 90px rgba(15,23,42,.26);color:#1e293b;white-space:normal;pointer-events:none}.calendar-event:hover .agenda-hover-card,.calendar-event:focus-visible .agenda-hover-card{display:block}.calendar-month-cell:nth-child(7n) .agenda-hover-card,.calendar-week-day:nth-child(7n) .agenda-hover-card{left:auto;right:calc(100% + 12px)}.agenda-hover-card p{margin:6px 0;font-size:.86rem;line-height:1.35;color:#334155;font-weight:600}.agenda-hover-card small{margin-top:12px;border-top:1px solid #dbe5f3;padding-top:10px;color:#64748b;font-weight:700}.hover-head{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;background:#f3ffeb;border-left:4px solid #8fff42;padding:10px 12px;margin-bottom:10px}.hover-head b{font-size:1rem;color:#0f172a}.hover-head img,.hover-avatar{width:62px;height:62px;border-radius:14px;background:#fff;object-fit:cover;display:grid;place-items:center;font-size:2rem}.appointment-detail-modal{display:grid;gap:14px}.detail-status-row{display:flex;align-items:center;gap:10px;justify-content:flex-start;flex-wrap:wrap}.detail-status-row b{margin-left:auto;font-size:1.1rem;letter-spacing:.04em}.detail-panel{border:1px solid #dbe5f3;border-radius:18px;background:#fff;padding:16px}.detail-panel h4{margin:0 0 12px;text-transform:uppercase;letter-spacing:.07em;font-size:.8rem;color:#64748b}.detail-panel h5{margin:14px 0 6px}.detail-grid.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 20px}.detail-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}.btn.success{background:#16a34a;color:#fff;border-color:#16a34a}.btn.success:disabled{opacity:.55;cursor:not-allowed}@media(max-width:900px){.agenda-hover-card{position:static;width:auto;margin-top:10px}.detail-grid.two{grid-template-columns:1fr}}

/* v3.12.8: evita que la tarjeta hover de agenda quede detrás de otras celdas */
.calendar-week-view:has(.calendar-event:hover),
.calendar-day-view:has(.calendar-event:hover),
.calendar-month-view:has(.calendar-event:hover){z-index:4000}
.calendar-week-day:has(.calendar-event:hover),
.calendar-month-cell:has(.calendar-event:hover),
.calendar-time-cell:has(.calendar-event:hover),
.calendar-time-row:has(.calendar-event:hover){z-index:6500}
.main-content:has(.calendar-event:hover),
.card:has(.calendar-event:hover){overflow:visible}

/* v3.12.9 Producción tipo checklist */
.production-page{display:grid;gap:22px}.section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.section-head h2{margin:0 0 6px;font-size:1.35rem;letter-spacing:-.035em}.section-head p{margin:0;color:var(--muted)}.quick-status-card{padding:0;overflow:hidden}.quick-status-card>.section-head{padding:20px 24px;border-bottom:1px solid var(--border);background:#fbfdff}.production-status-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;padding:18px}.production-status-card{border:1px solid var(--border);border-radius:20px;background:#fff;padding:16px;text-align:left;display:flex;justify-content:space-between;gap:12px;min-height:122px;cursor:pointer;box-shadow:var(--shadow-xs,0 1px 2px rgba(15,23,42,.04));transition:.18s ease}.production-status-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm)}.production-status-card b{display:block;font-size:1rem;color:var(--text)}.production-status-card span{display:block;color:var(--muted);font-size:.85rem;margin-top:3px}.production-status-card strong{display:block;margin-top:16px;font-size:1.8rem;line-height:1}.production-status-card i{width:42px;height:42px;border-radius:18px;display:grid;place-items:center;background:rgba(255,255,255,.7);font-style:normal}.production-status-card.danger{background:#fff1f2;border-color:#fecaca;color:#991b1b}.production-status-card.success{background:#ecfdf5;border-color:#bbf7d0}.production-status-card.info{background:#ecfeff;border-color:#a5f3fc}.production-status-card.purple{background:#faf5ff;border-color:#e9d5ff;color:#6b21a8}.production-list-card{padding:0;overflow:hidden}.production-green-head{padding:22px 24px;background:linear-gradient(90deg,#fff,#f0fdf4);border-bottom:1px solid var(--border)}.production-filters{display:grid;grid-template-columns:1.4fr .7fr .7fr;gap:12px;margin:24px;border:1px solid var(--border);border-radius:18px;padding:12px;background:#fcfffa}.production-list{display:grid;gap:12px;padding:0 24px 24px}.production-row{display:grid;grid-template-columns:1.35fr 1fr 1fr 1.25fr auto;border:1px solid var(--border);border-radius:20px;background:#fff;overflow:hidden;box-shadow:var(--shadow-xs);}.production-row.late{border-color:#fecaca}.production-col{padding:18px;border-right:1px solid #edf2f7;min-width:0}.production-col:last-child{border-right:0}.production-col>span{text-transform:uppercase;letter-spacing:.06em;color:#64748b;font-size:.76rem;font-weight:900}.production-col h3{margin:6px 0 5px;font-size:1.05rem;line-height:1.25;letter-spacing:-.025em}.production-col p{margin:4px 0;color:var(--muted);font-weight:650}.chips-line{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.progress-title{display:flex;justify-content:space-between;gap:8px}.progress-title strong{color:#4d7c0f}.mini-progress{height:10px;border-radius:999px;background:#e9eef6;overflow:hidden;margin:10px 0}.mini-progress i{display:block;height:100%;background:linear-gradient(90deg,#84cc16,#22c55e);border-radius:inherit}.mini-progress.full{grid-column:1/-1}.production-col.actions{display:grid;place-items:center;min-width:150px}.badge.purple{background:#f3e8ff;color:#6b21a8;border-color:#d8b4fe}.badge.muted{background:#f1f5f9;color:#64748b;border-color:#cbd5e1}.production-detail-page{display:grid;gap:22px}.production-hero{position:relative;overflow:hidden;border:0;background:linear-gradient(135deg,#4dff00,#d7ffca);padding:28px}.production-hero .btn{background:rgba(255,255,255,.72);color:#0f172a}.production-hero-badges{position:absolute;right:24px;top:24px;display:flex;gap:8px;flex-wrap:wrap}.production-hero>span{text-transform:uppercase;letter-spacing:.22em;font-weight:900;font-size:.76rem}.production-hero h2{margin:12px 0;font-size:clamp(2rem,4vw,3.35rem);letter-spacing:-.07em;line-height:.98;max-width:1050px}.production-hero p{font-weight:850;font-size:1rem;margin:0}.production-detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:22px}.production-detail-main{display:grid;gap:22px}.soft-green{background:linear-gradient(180deg,#fbfffb,#fff)}.summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}.summary-tile{border:1px solid var(--border);border-radius:18px;background:#fcfffa;padding:14px}.summary-tile span{display:block;text-transform:uppercase;letter-spacing:.06em;font-size:.75rem;font-weight:900;color:#64748b}.summary-tile b{display:block;margin-top:7px;font-size:1rem}.appointment-comments{border:1px solid #fde68a;background:#fffbeb;border-radius:18px;padding:14px;margin-top:18px;color:#92400e}.appointment-comments b{text-transform:uppercase;letter-spacing:.06em}.appointment-comments p{margin:8px 0 0}.progress-box{border:1px solid var(--border);border-radius:20px;background:#fff;padding:18px;margin-top:18px;display:grid;grid-template-columns:1fr auto;gap:6px 14px}.progress-box span{color:var(--muted)}.progress-box strong,.big-percent{font-size:2rem;font-weight:950;letter-spacing:-.06em}.production-step-list{display:grid;gap:12px;margin-top:20px}.production-step-item{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:14px;border:1px solid var(--border);border-radius:20px;background:#fff;padding:16px}.production-step-item.current,.production-step-item.in_progress{border-color:#84cc16;background:#f7fee7}.production-step-item.blocked{border-color:#fde68a;background:#fffbeb}.production-step-item.done{border-color:#bbf7d0;background:#f0fdf4}.production-step-item.skipped{border-color:#fed7aa;background:#fff7ed}.step-index{width:42px;height:42px;border-radius:999px;background:#f3ffeb;color:#3d8f00;display:grid;place-items:center;font-weight:950}.production-step-item.done .step-index{background:#22c55e;color:white}.production-step-item.current .step-index,.production-step-item.in_progress .step-index{background:#84cc16;color:white}.production-step-item h3{margin:0 0 5px;font-size:1.05rem}.production-step-item p{margin:0;color:var(--muted)}.step-badges{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.step-actions{display:flex;gap:8px}.step-actions .btn:disabled{opacity:.5;cursor:not-allowed}.production-side{display:grid;gap:18px;align-content:start}.production-side .card h2{margin-top:0}.current-stage{border:1px solid var(--border);border-radius:18px;background:#f8fafc;padding:14px;margin-top:14px}.current-stage span{text-transform:uppercase;letter-spacing:.06em;font-size:.75rem;color:#64748b;font-weight:900}.coming-soon{border:1px dashed #86efac;border-radius:16px;padding:16px;text-align:center;color:#0f766e;font-weight:800;background:#f0fdf4}.warn-note{background:#fffbeb;border-color:#fde68a;color:#92400e}.tracing-card .badge{margin:4px}.big-percent{font-size:3rem}@media(max-width:1100px){.production-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.production-filters{grid-template-columns:1fr}.production-row{grid-template-columns:1fr}.production-col{border-right:0;border-bottom:1px solid #edf2f7}.production-detail-layout{grid-template-columns:1fr}.summary-grid{grid-template-columns:1fr 1fr}.production-step-item{grid-template-columns:auto 1fr}.step-badges,.step-actions{grid-column:2/-1;justify-content:flex-start}}@media(max-width:640px){.production-status-grid,.summary-grid{grid-template-columns:1fr}.production-hero h2{font-size:2rem}.production-hero-badges{position:static;margin:12px 0}.production-step-item{grid-template-columns:1fr}.step-index{width:36px;height:36px}.step-badges,.step-actions{grid-column:auto}}

.production-step-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  transition: .18s ease;
  cursor: pointer;
}
.production-step-card:hover { border-color: rgba(109,255,8,.35); box-shadow: 0 12px 26px rgba(15,23,42,.08); }
.production-step-card.selected { border-color: #84cc16; background: linear-gradient(135deg, #f7fee7, #fff); }
.production-step-card input { margin-top: 3px; }
.production-step-card span { display: grid; gap: 4px; }
.production-step-card b { color: var(--ink); font-size: 15px; }
.production-step-card small { color: var(--muted); line-height: 1.35; }
#productionConfigPanel.hidden { display: none; }

/* v3.13 Reportes generales */
.reports-page{display:flex;flex-direction:column;gap:18px}.reports-title h1{font-size:2.8rem;line-height:1;margin:0;color:var(--ink)}.reports-title p{margin:.65rem 0 0;color:var(--muted);font-size:1.05rem}.report-filter-card{padding:22px}.report-filter-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr)) 160px;gap:14px;align-items:end}.report-tabs{display:flex;gap:6px;align-items:center;background:rgba(236,243,250,.72);border-radius:18px;padding:8px;overflow:auto}.report-tab{border:0;background:transparent;border-radius:16px;padding:16px 18px;color:#50627d;font-weight:750;white-space:nowrap;cursor:pointer}.report-tab.active{background:#ecffcf;color:#102447;box-shadow:inset 0 0 0 1px #a5ec35}.reports-section{display:flex;flex-direction:column;gap:16px}.report-metrics{gap:16px}.report-metric{min-height:110px;border:1px solid #d7e2ef;border-radius:18px;background:#fff;padding:20px;box-shadow:0 10px 24px rgba(15,32,62,.05);display:flex;align-items:flex-start;justify-content:space-between}.report-metric span,.report-mini span{display:block;color:#667894;font-weight:600}.report-metric strong{display:block;margin-top:10px;font-size:1.55rem;color:#0b1730}.report-metric small{display:block;margin-top:10px;color:#6a7c97}.report-metric i{font-style:normal;min-width:38px;height:38px;border-radius:15px;display:grid;place-items:center;background:#f3ffeb;color:#3d8f00;font-weight:900}.report-metric.success{background:#f2fff9;border-color:#a9f2cf}.report-metric.warning{background:#fffaf0;border-color:#ffd567}.report-metric.danger{background:#fff5f6;border-color:#ffbfc5}.report-metric.purple{background:#f8f4ff;border-color:#d6c3ff}.report-mini-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;padding:16px 20px}.report-mini-summary.ivory{background:#fffdf7}.report-mini b{display:block;margin-top:8px;color:#17233a}.report-table-card{overflow:hidden;padding:0}.report-card-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px 24px;border-bottom:1px solid #dbe5f0}.report-card-head h2{margin:0;font-size:1.25rem}.report-card-head p{margin:4px 0 0;color:#6a7c97}.report-table-card table{font-size:.92rem}.report-table-card th{background:#f3f7fb;color:#61728c;text-transform:none;letter-spacing:0}.report-table-card td{vertical-align:middle}.report-table-actions{display:flex;gap:10px;padding:14px 24px;border-bottom:1px solid #e5edf5;align-items:center;justify-content:flex-end}.report-local-search{flex:1}.pill{display:inline-flex;align-items:center;gap:4px;padding:6px 10px;border-radius:999px;font-size:.78rem;font-weight:800;background:#eff4fa;color:#33435d;border:1px solid #dbe6f2}.pill.success{background:#e9fff2;border-color:#9bf0bf;color:#047044}.pill.warning{background:#fff5d8;border-color:#ffd877;color:#9b5300}.pill.muted{background:#f2f6fb;border-color:#dce6f2;color:#4a5b73}.icon-btn{border:1px solid #dbe5f0;background:#fff;border-radius:12px;min-width:38px;height:38px;display:inline-grid;place-items:center;cursor:pointer;box-shadow:0 6px 14px rgba(15,32,62,.05)}.report-charts-grid{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:18px}.report-chart-card{padding:0;min-height:310px;overflow:hidden}.chart-icon{width:36px;height:36px;border-radius:14px;background:#e6ffc6;display:grid;place-items:center;font-weight:900;color:#0f2519}.chart-empty{margin:26px;min-height:220px;border:1px dashed #cddbea;border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#8b9bb1;font-size:2rem}.chart-empty b{font-size:1rem;color:#667894;margin-top:8px}.chart-empty small{font-size:.86rem}.bar-chart{padding:24px;display:flex;flex-direction:column;gap:12px}.bar-row{display:grid;grid-template-columns:140px 1fr 90px;align-items:center;gap:12px}.bar-row label{font-size:.82rem;color:#657690;text-align:right}.bar-row div{height:34px;background:#f4f8fc;border-radius:10px;overflow:hidden;border:1px dashed #dbe7f3}.bar-row span{height:100%;display:block;background:linear-gradient(90deg,#19a24b,#84df00);border-radius:10px}.bar-row b{font-size:.85rem;color:#17233a}.donut-chart{--p:70;width:180px;height:180px;margin:28px auto 14px;border-radius:50%;background:conic-gradient(#75d900 calc(var(--p)*1%),#16a14e 0);position:relative}.donut-chart:after{content:"";position:absolute;inset:42px;border-radius:50%;background:#fff}.chart-legend{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;padding:0 20px 24px}.chart-legend span{display:inline-flex;gap:6px;align-items:center;color:#41536c;font-weight:700}.chart-legend i{width:12px;height:12px;background:#75d900;border-radius:2px}@media(max-width:1100px){.report-filter-grid{grid-template-columns:repeat(2,1fr)}.report-mini-summary{grid-template-columns:repeat(2,1fr)}.report-charts-grid{grid-template-columns:1fr}.reports-title h1{font-size:2.2rem}}@media(max-width:680px){.report-filter-grid,.report-mini-summary{grid-template-columns:1fr}.report-tabs{align-items:stretch}.report-tab{padding:12px}.bar-row{grid-template-columns:1fr}.bar-row label{text-align:left}.reports-title h1{font-size:1.9rem}}

/* v3.14 Programa de lealtad y paginación */
.table-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 4px 4px;color:var(--muted);font-size:.92rem;flex-wrap:wrap}.pagination-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.pagination-controls label{font-size:.82rem;color:var(--muted);font-weight:700}.page-size-select{min-width:78px;border:1px solid var(--border);border-radius:14px;padding:10px 12px;background:#fff;font-weight:700;color:var(--text)}.loyalty-page{display:flex;flex-direction:column;gap:18px}.loyalty-stats .stat{min-height:116px}.loyalty-layout{display:grid;grid-template-columns:330px 1fr;gap:18px;align-items:start}.loyalty-owner-panel{position:sticky;top:18px}.loyalty-owner-panel h2,.loyalty-main-panel h3{margin:0 0 8px}.loyalty-owner-panel p{color:var(--muted);line-height:1.45}.loyalty-owner-card{border:1px dashed var(--border);border-radius:20px;min-height:150px;padding:20px;margin:18px 0;background:linear-gradient(135deg,#f8fafc,#f1f5f9);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px}.loyalty-owner-card b{font-size:1.05rem}.loyalty-owner-card strong{font-size:2rem;color:var(--primary)}.empty-medal{font-size:4rem;opacity:.14}.loyalty-main-panel{display:flex;flex-direction:column;gap:16px}.loyalty-filters{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr)) auto;gap:14px;align-items:end}.loyalty-owners-table,.loyalty-movements-table{box-shadow:none}.loyalty-movements-table .table-wrap{max-height:420px}@media(max-width:980px){.loyalty-layout{grid-template-columns:1fr}.loyalty-owner-panel{position:static}.loyalty-filters{grid-template-columns:1fr 1fr}.table-pagination{align-items:flex-start}.pagination-controls{width:100%}}@media(max-width:640px){.loyalty-filters{grid-template-columns:1fr}.pagination-controls{flex-direction:column;align-items:stretch}.page-size-select,.pagination-controls .btn{width:100%}}

/* v3.14.2 Branding y logos */
.logo-preview-stack { display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap; justify-content:flex-end; }
.logo-preview-stack > div { display:flex; flex-direction:column; gap:6px; align-items:center; color:var(--muted); font-weight:800; font-size:12px; }
.ticket-logo-card .ticket-logo-preview { background:#fff; }
.sidebar .brand .logo, .auth-hero .brand .logo, .portal-header .brand .logo { object-fit:contain; }

/* v3.14.3 Logo completo en barra lateral */
.sidebar .sidebar-brand-logo-only {
  justify-content: center;
  padding: 4px 8px 18px;
  min-height: 86px;
}
.sidebar .sidebar-brand-logo-only span { display: none; }
.sidebar .sidebar-brand-logo-only .logo {
  width: min(214px, 100%);
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(15, 32, 62, .10);
  background: #fff;
  padding: 8px 12px;
  object-fit: contain;
}
@media(max-width: 840px) {
  .sidebar .sidebar-brand-logo-only { min-height: 76px; }
  .sidebar .sidebar-brand-logo-only .logo { width: 188px; height: 62px; }
}

/* v3.14.5 Tema sólido: login, botones y sidebar */
:root {
  --sidebar-green: #245300;
}

/* Login y portales: superficies sólidas, sin degradados ni desenfoque */
.auth-shell {
  background: #f4f7fb;
}
.auth-hero {
  color: #102a00;
  background: #6dff08;
}
.auth-hero::before,
.auth-hero::after {
  display: none;
}
.auth-hero p,
.hero-card span {
  opacity: 1;
}
.hero-card {
  background: #6dff08;
  border-color: rgba(16, 42, 0, .28);
  backdrop-filter: none;
  box-shadow: none;
}
.auth-panel {
  background: #f4f7fb;
}
.panel-card {
  background: #ffffff;
  backdrop-filter: none;
}
.auth-hero .logo {
  box-shadow: none;
}

/* Botones principales: color exacto, sólido y sin resplandor */
.btn {
  color: #102a00;
  background: #6dff08;
  box-shadow: none;
}
.btn:hover {
  color: #102a00;
  background: #6dff08;
  box-shadow: none;
}
.btn.secondary,
.btn.secondary:hover,
.btn.ghost,
.btn.ghost:hover,
.btn.danger,
.btn.danger:hover,
.btn.success,
.btn.success:hover {
  box-shadow: none;
}

/* Menú lateral: verde sólido y más marcado */
.sidebar {
  background: var(--sidebar-green);
  border-right-color: #193c00;
  backdrop-filter: none;
}
.sidebar .brand {
  border-bottom-color: rgba(255, 255, 255, .20);
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: #6dff08;
}
.nav-link {
  color: rgba(255, 255, 255, .86);
}
.nav-link span:first-child {
  background: rgba(255, 255, 255, .12);
}
.nav-link:hover {
  color: #ffffff;
  background: #356f12;
  border-color: rgba(255, 255, 255, .16);
}
.nav-link.active {
  color: #102a00;
  background: #6dff08;
  border-color: #6dff08;
  box-shadow: none;
}
.nav-link.active span:first-child {
  background: rgba(255, 255, 255, .72);
}
.sidebar-footer {
  color: rgba(255, 255, 255, .76);
  border-top-color: rgba(255, 255, 255, .20);
}
.sidebar-footer b {
  color: #ffffff;
}



/* v3.14.6 Login administrativo limpio */
.brand-logo-only span { display: none; }
.auth-hero--login-clean { align-items: flex-start; }
.auth-hero--login-clean .brand { margin-bottom: 8px; }
.auth-hero--login-clean .logo { width: 62px; height: 62px; border-radius: 18px; }
.auth-hero--login-clean h1 { max-width: 760px; margin-top: 40px; }
.auth-hero--login-clean p { max-width: 640px; color: rgba(16, 42, 0, .92); }
.auth-hero--login-clean .brand,
.auth-hero--login-clean h1 { color: #102a00; }
.auth-hero--login-clean .hero-grid,
.auth-hero--login-clean .hero-card { display: none !important; }

/* v3.14.7 Marketing por correo */
.marketing-shell { display: grid; gap: 18px; }
.marketing-tabs { width: fit-content; min-width: 270px; }
.marketing-tabs button { min-width: 130px; }
.marketing-composer { padding: 0; display: grid; grid-template-columns: minmax(320px, 390px) minmax(0, 1fr); overflow: hidden; }
.marketing-recipient-panel { padding: 30px 24px; border-right: 1px solid var(--border); background: #fbfcfe; }
.marketing-editor-panel { padding: 30px; min-width: 0; }
.marketing-panel-title { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: start; margin-bottom: 16px; }
.marketing-panel-title h2, .marketing-info-banner h2 { margin: 0; }
.marketing-panel-title p, .marketing-info-banner p { margin: 5px 0 0; color: var(--muted); }
.marketing-selection-counts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 190px; }
.marketing-selection-counts span { padding: 5px 10px; border-radius: 999px; background: var(--primary-soft); color: #234d05; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.marketing-recipient-box { border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface); padding: 16px; }
.marketing-scope-tabs { width: 100%; }
.marketing-scope-tabs button { flex: 1; }
.marketing-search-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 14px; }
.marketing-search-row .btn { border-radius: var(--radius-sm); }
.marketing-recipient-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.marketing-recipient-tools .btn { min-height: 36px; padding: 7px 10px; font-size: .78rem; }
.marketing-recipient-list { display: grid; gap: 10px; max-height: 500px; overflow: auto; padding: 14px 4px 4px 0; }
.marketing-recipient-card { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 11px; align-items: start; border: 1px solid var(--border-strong); border-radius: 15px; padding: 12px; cursor: pointer; background: #fff; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.marketing-recipient-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.marketing-recipient-card.selected { border-color: var(--primary); background: var(--primary-soft); }
.marketing-recipient-card input { margin-top: 3px; accent-color: var(--primary); }
.marketing-recipient-main { min-width: 0; display: grid; gap: 3px; }
.marketing-recipient-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marketing-recipient-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marketing-recipient-main em { width: fit-content; max-width: 100%; padding: 3px 7px; border-radius: 7px; background: #eef7f1; color: #365346; font-size: .65rem; font-style: normal; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marketing-recipient-type { border-radius: 999px; padding: 5px 9px; background: var(--primary); color: #102a00; font-size: .7rem; font-weight: 800; }
.marketing-recipient-type.patient { background: #dbeafe; color: #1d4ed8; }
.marketing-mini-pagination { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; align-items: center; gap: 7px; margin-top: 14px; }
.marketing-mini-pagination .btn { min-height: 36px; padding: 7px 12px; }
.marketing-result-note { display: block; color: var(--muted); margin-top: 8px; }
.marketing-info-banner { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 13px; border: 1px solid var(--border-strong); border-radius: 18px; padding: 18px; margin-bottom: 22px; background: #fbfcff; }
.marketing-info-banner > span { color: var(--primary-600); font-size: 1.7rem; line-height: 1; }
.marketing-editor-panel textarea { min-height: 170px; }
.marketing-upload-head { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 9px; }
.marketing-upload-zone { min-height: 165px; border: 2px dashed #cfdaea; border-radius: 17px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; cursor: pointer; background: #fff; transition: border-color .16s ease, background .16s ease; }
.marketing-upload-zone:hover { border-color: var(--primary); background: var(--primary-ghost); }
.marketing-upload-zone.loading { opacity: .72; cursor: wait; }
.marketing-upload-zone input { display: none; }
.marketing-upload-zone b { font-size: 1rem; }
.marketing-upload-zone small { color: var(--muted); }
.marketing-upload-icon { font-size: 2.3rem; color: var(--muted); }
.marketing-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 14px; }
.marketing-image-grid figure { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-muted); }
.marketing-image-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.marketing-remove-image { position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border: 0; border-radius: 999px; background: rgba(15,23,42,.82); color: white; font-size: 1.1rem; line-height: 1; }
.marketing-send-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.marketing-send-bar > span { color: var(--muted); }
.marketing-progress { display: grid; gap: 10px; border: 1px solid #b8e99a; background: var(--primary-soft); border-radius: 15px; padding: 14px; margin-top: 14px; }
.marketing-progress div { display: flex; justify-content: space-between; gap: 12px; }
.marketing-progress span { color: var(--text-soft); }
.marketing-progress progress { width: 100%; accent-color: var(--primary-600); }
.marketing-history-card .table-subline { display: block; color: var(--muted); margin-top: 3px; }
.marketing-success-count { color: #15803d; font-weight: 800; }
.marketing-error-count { color: #dc2626; font-weight: 800; }
.marketing-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
.marketing-detail-grid > div { display: grid; gap: 4px; padding: 13px; border-radius: 13px; border: 1px solid var(--border); }
.marketing-detail-grid span { color: var(--muted); font-size: .78rem; }
.marketing-error-list { display: grid; gap: 8px; max-height: 300px; overflow: auto; }
.marketing-error-list > div { display: grid; gap: 2px; border: 1px solid #fecaca; background: #fff7f7; border-radius: 12px; padding: 10px; }
.marketing-error-list span, .marketing-error-list small { color: #7f1d1d; }

@media (max-width: 1080px) {
  .marketing-composer { grid-template-columns: 1fr; }
  .marketing-recipient-panel { border-right: 0; border-bottom: 1px solid var(--border); }
  .marketing-recipient-list { max-height: 390px; }
}
@media (max-width: 680px) {
  .marketing-recipient-panel, .marketing-editor-panel { padding: 20px 14px; }
  .marketing-panel-title { grid-template-columns: 1fr; }
  .marketing-selection-counts { justify-content: flex-start; max-width: none; }
  .marketing-search-row { grid-template-columns: 1fr; }
  .marketing-recipient-tools, .marketing-send-bar, .marketing-progress div { align-items: stretch; flex-direction: column; }
  .marketing-mini-pagination { grid-template-columns: 1fr auto auto auto; }
  .marketing-detail-grid { grid-template-columns: 1fr; }
}


/* v3.14.9 Hotfix fotos actuales en Agenda */
.agenda-photo-frame { width:62px; height:62px; display:grid; place-items:center; border-radius:14px; overflow:hidden; background:#fff; }
.agenda-photo-frame > img { width:62px; height:62px; border-radius:14px; object-fit:cover; display:block; }
.agenda-photo-frame .agenda-photo-fallback { display:none; width:62px; height:62px; border-radius:14px; }

/* v3.14.11 Caja: doctor y producción independiente por estudio */
.badge.info { background:#e0f2fe; color:#075985; border-color:#bae6fd; }
.section-head.compact h3 { margin:2px 0 0; }
.cash-party-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin:20px 0; }
.cash-party-grid.single { grid-template-columns:1fr; }
.cash-party-card { min-width:0; padding:18px; border:1px solid var(--border); border-radius:22px; background:#fbfdff; }
.cash-party-card .search-panel { margin:14px 0; }
.cash-production-title { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:18px; }
.cash-production-title h2 { margin:3px 0 5px; }
.cash-production-title p { margin:0; color:var(--muted); }
.cash-study-production-list { display:grid; gap:20px; }
.cash-study-production-card { border:1px solid #cfdbea; border-radius:22px; background:#fff; padding:18px; box-shadow:0 8px 24px rgba(15,23,42,.04); }
.cash-study-head { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px, .42fr); gap:18px; align-items:center; padding:2px 2px 16px; }
.cash-study-head h3 { margin:4px 0 8px; font-size:1.15rem; letter-spacing:-.025em; }
.cash-study-type { display:grid; gap:6px; }
.cash-study-type label { font-size:.78rem; color:var(--text-soft); font-weight:750; }
.cash-study-type select { border-color:var(--primary); background:#fff; }
.cash-delivery-card, .cash-tracing-card { border-radius:18px; padding:16px; margin-top:12px; }
.cash-delivery-card { border:1px solid #b7dfa2; background:#f8fff4; }
.cash-tracing-card { border:1px solid #e3c8ff; background:#fdfaff; }
.cash-card-title { display:flex; align-items:flex-start; gap:12px; }
.cash-card-title > div { flex:1; min-width:0; }
.cash-card-title h4 { margin:0 0 2px; font-size:1.02rem; }
.cash-card-title p { margin:0; color:var(--muted); font-size:.87rem; }
.cash-card-icon { width:38px; height:38px; border-radius:999px; display:grid; place-items:center; flex:0 0 auto; background:#e7f7db; color:#4d7c0f; font-weight:900; }
.cash-card-icon.purple { background:#f3e8ff; color:#7e22ce; }
.cash-delivery-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,1fr); gap:16px; align-items:end; margin-top:16px; }
.cash-same-day-card { min-height:68px; border:1px solid #cfdaea; border-radius:16px; background:#f8fafc; padding:12px 14px; display:flex; align-items:center; justify-content:space-between; gap:16px; cursor:pointer; }
.cash-same-day-card span { display:grid; gap:2px; }
.cash-same-day-card small { color:var(--muted); }
.cash-same-day-card input { margin:0; }
.cash-delivery-warning { margin-top:12px; padding:10px 12px; border:1px solid #f8d16c; border-radius:14px; background:#fffbeb; color:#a04a08; font-size:.86rem; }
.cash-tracing-study-box { margin-top:14px; border:1px solid #d6dfeb; border-radius:17px; background:#f8fafc; padding:14px; }
.cash-tracing-meta { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; margin-bottom:13px; }
.cash-tracing-meta > div { display:grid; gap:3px; }
.cash-tracing-meta small { color:var(--muted); }
.cash-tracing-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.cash-tracing-option { min-height:46px; display:flex; align-items:center; gap:8px; border:1px solid #d5dfeb; border-radius:14px; background:#fff; padding:9px 12px; cursor:pointer; transition:border-color .15s ease, background .15s ease; }
.cash-tracing-option input { margin:0; }
.cash-tracing-option.selected { border-color:#d8b4fe; background:#f3e8ff; color:#6b21a8; }
.cash-tracing-other { margin-top:12px; }
.cash-tracing-summary { margin-top:12px; padding:9px 12px; border:1px solid #e9d5ff; border-radius:14px; background:#faf5ff; color:#7e22ce; font-size:.84rem; }
.cash-production-total { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:18px; padding:14px 16px; border:1px solid #b7dfa2; border-radius:18px; background:#f8fff4; }
.cash-production-total b { font-size:1.3rem; margin-left:auto; }
.cash-production-total small { width:100%; color:var(--muted); }
.cash-production-review { display:grid; gap:9px; margin:12px 0 18px; }
.cash-production-review > div { display:grid; gap:3px; padding:12px 14px; border:1px solid var(--border); border-radius:15px; background:#fbfdff; }
.cash-production-review span, .cash-production-review small { color:var(--muted); }
@media (max-width:900px) {
  .cash-party-grid, .cash-study-head, .cash-delivery-grid { grid-template-columns:1fr; }
  .cash-tracing-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cash-production-title, .cash-tracing-meta { flex-direction:column; }
  .cash-production-total b { margin-left:0; }
}
@media (max-width:560px) {
  .cash-study-production-card { padding:13px; }
  .cash-delivery-card, .cash-tracing-card { padding:13px; }
  .cash-tracing-grid { grid-template-columns:1fr; }
}

/* v3.14.15 Producción libre, express y trazadores */
.production-operations {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px 20px;
}
.production-operations h2 { margin: 0 0 3px; }
.production-operations p { margin: 0; color: var(--muted); }
.production-operation-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.production-payment-alert {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 13px 16px;
  border: 1px solid #f4c76c;
  border-radius: var(--radius-md);
  background: #fff9e9;
  color: #7c4a00;
}
.cash-delivery-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr); }
.cash-express-card {
  grid-column: 1 / -1;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #cbb8ff;
  border-radius: 16px;
  background: #faf7ff;
}
.cash-express-card span { display: grid; gap: 3px; }
.cash-express-card small { color: var(--muted); }
.cash-express-card input { width: 20px; height: 20px; min-height: 20px; flex: 0 0 auto; accent-color: var(--primary); }
.production-payments-page { display: grid; gap: 16px; }
.production-payments-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px; }
.production-payments-header h2 { margin: 4px 0; font-size: 1.7rem; }
.production-payments-header p { margin: 0; color: var(--muted); }
.production-payment-metrics .stat { min-height: 118px; }
.production-payment-list-card { padding: 18px; }
.production-payment-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 210px 150px auto;
  gap: 10px;
  margin-bottom: 16px;
}
.production-payment-list { display: grid; gap: 12px; }
.production-payment-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, .9fr) minmax(250px, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: var(--surface);
}
.production-payment-study h3 { margin: 4px 0; }
.production-payment-study p { margin: 0 0 8px; color: var(--muted); }
.production-payment-detail { display: grid; gap: 5px; }
.production-payment-detail strong { font-size: 1.4rem; }
.production-payment-detail small { color: var(--muted); }
.production-payment-detail p { margin: 4px 0 0; color: var(--text-soft); }
.production-payment-actions { display: grid; gap: 8px; }
.production-payment-actions textarea { min-height: 70px; }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--muted); }
.pagination-bar > div { display: flex; gap: 8px; }
.production-payment-history { display: grid; gap: 10px; }
.payment-history-item { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.payment-history-item > div { display: flex; justify-content: space-between; gap: 8px; }
.payment-history-item small { color: var(--muted); }
.payment-history-item p { margin: 2px 0 0; }
.production-step-item.current { border-color: rgba(109,255,8,.6); background: #fbfff8; }
.production-step-item.blocked { opacity: .7; }

@media (max-width: 1000px) {
  .production-operations, .production-payments-header, .production-payment-alert { align-items: stretch; flex-direction: column; }
  .production-operation-actions { justify-content: flex-start; }
  .production-payment-filters { grid-template-columns: 1fr 1fr; }
  .production-payment-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .production-operation-actions { display: grid; grid-template-columns: 1fr; }
  .production-operation-actions .btn { width: 100%; }
  .production-payment-filters { grid-template-columns: 1fr; }
  .cash-delivery-grid { grid-template-columns: 1fr; }
  .pagination-bar { align-items: stretch; flex-direction: column; }
  .pagination-bar > div { display: grid; grid-template-columns: 1fr 1fr; }
}


/* v3.14.16 Agenda operativa, estados y vista semanal por horas */
.calendar-week-timed { border: 1px solid #dbe5f3; border-radius: 24px; background: #fff; overflow: hidden; }
.calendar-week-scroll { max-height: 760px; overflow: auto; position: relative; background: #fff; }
.calendar-week-inner { min-width: 1685px; }
.calendar-week-timed-head { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 72px repeat(7, minmax(230px, 1fr)); background: #fff; border-bottom: 1px solid #dbe5f3; box-shadow: 0 4px 12px rgba(15,23,42,.05); }
.calendar-week-corner { display: grid; place-items: center; color: #64748b; font-size: .72rem; font-weight: 850; text-transform: uppercase; border-right: 1px solid #e5edf6; }
.calendar-week-timed-day-head { min-height: 72px; display: flex; align-items: center; justify-content: center; gap: 12px; border-right: 1px solid #e5edf6; color: #64748b; }
.calendar-week-timed-day-head:last-child { border-right: 0; }
.calendar-week-timed-day-head strong { text-transform: uppercase; font-size: .78rem; letter-spacing: .05em; }
.calendar-week-timed-day-head span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; color: #0f172a; font-size: 1.05rem; font-weight: 900; }
.calendar-week-timed-day-head.today { background: #f7fff2; }
.calendar-week-timed-day-head.today span { background: #6dff08; color: #102a00; }
.calendar-week-timed-body { position: relative; display: grid; grid-template-columns: 72px repeat(7, minmax(230px, 1fr)); }
.calendar-week-time-axis { position: relative; border-right: 1px solid #dbe5f3; background: #fbfdff; }
.calendar-week-time-axis span { position: absolute; right: 10px; transform: translateY(-50%); color: #64748b; font-size: .78rem; font-weight: 700; }
.calendar-week-lane { position: relative; border-right: 1px solid #e5edf6; background: #fff; min-width: 0; }
.calendar-week-lane:last-of-type { border-right: 0; }
.calendar-week-lane.today { background: rgba(109,255,8,.035); }
.calendar-week-hour-line { position: absolute; left: 0; right: 0; height: 1px; background: #edf2f7; pointer-events: none; }
.calendar-week-drop-slot { position: absolute; left: 0; right: 0; z-index: 1; border-top: 1px solid transparent; }
.calendar-week-drop-slot:nth-of-type(4n + 1) { border-top-color: #edf2f7; }
.calendar-week-drop-slot.drag-over { background: rgba(109,255,8,.17); outline: 1px solid rgba(61,143,0,.35); }
.calendar-current-time-line { position: absolute; left: 68px; right: 0; height: 2px; z-index: 40; background: #ef4444; pointer-events: none; box-shadow: 0 0 0 1px rgba(255,255,255,.7); }
.calendar-current-time-line::before { content: ''; position: absolute; left: 10px; top: 50%; width: 12px; height: 12px; border-radius: 50%; transform: translateY(-50%); background: #ef4444; }
.calendar-event { background: var(--event-background, #fff); border-color: #cbd5e1; border-left: 5px solid var(--event-status-color, #2563eb); color: #0f172a; }
.calendar-event-positioned { position: absolute; z-index: 10; left: 5px; right: 5px; width: auto; min-height: 40px; padding: 7px 8px; overflow: visible; }
.calendar-event-positioned:hover, .calendar-event-positioned:focus-visible { z-index: 90; }
.calendar-event-positioned > strong { font-size: .77rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-event-positioned > small { font-size: .69rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-event-topline { display: flex !important; align-items: center; gap: 5px; color: #0f172a; }
.calendar-event-topline b { flex: 1; min-width: 0; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-event > strong { display: block; margin-top: 2px; color: #0f172a; font-size: .82rem; line-height: 1.25; }
.appointment-status-icon { width: 17px; height: 17px; display: inline-grid; place-items: center; flex: 0 0 auto; }
.appointment-status-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.appointment-payment-icon { width: 22px; height: 22px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 999px; font-style: normal; font-size: .74rem; font-weight: 950; color: #fff; }
.appointment-payment-icon.paid { background: #16a34a; }
.appointment-payment-icon.unpaid { background: #dc2626; }
.appointment-management-actions { display: flex; flex-wrap: wrap; gap: 9px; padding: 12px; border: 1px solid #dbe5f3; border-radius: 17px; background: #f8fafc; }
.appointment-management-actions .btn { box-shadow: none; }
.appointment-attended-btn { border-color: #86efac !important; background: #f0fdf4 !important; color: #166534 !important; }
.appointment-reschedule-btn { border-color: #d8b4fe !important; background: #faf5ff !important; color: #7e22ce !important; }
.appointment-missed-btn { border-color: #fecaca !important; background: #fff1f2 !important; color: #b91c1c !important; }
.waiting-complete-badge { margin-top: 8px; justify-self: start; }
.waiting-actions .btn { background: #6dff08; color: #102a00; border-color: #6dff08; }
.waiting-actions .btn:hover { background: #5ae000; }
.badge.purple { background: #f3e8ff; color: #7e22ce; border-color: #d8b4fe; }
@media (max-width: 720px) {
  .calendar-week-scroll { max-height: 650px; }
  .calendar-week-inner { min-width: 1685px; }
  .appointment-management-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appointment-management-actions .btn { width: 100%; }
}

.agenda-legend-programmed { background:#dbeafe; color:#1d4ed8; border-color:#93c5fd; }


/* v3.14.17 — Vista semanal ampliada y citas concurrentes legibles */
.calendar-week-drop-slot { min-height: 32px; }
.calendar-event-positioned {
  padding: 8px 9px;
  box-shadow: 0 4px 12px rgba(15,23,42,.08);
}
.calendar-event-positioned > strong,
.calendar-event-positioned > small,
.calendar-event-positioned .calendar-event-topline b {
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.calendar-event-positioned .calendar-event-topline { align-items: flex-start; }


/* v3.14.18 — Citas semanales apiladas verticalmente */
.calendar-event-positioned {
  left: 7px !important;
  right: 7px !important;
  width: calc(100% - 14px) !important;
}


/* v3.14.19 — Apilado semanal sin superposición visual */
.calendar-event-positioned {
  box-sizing: border-box;
  overflow: hidden !important;
  min-height: 128px;
}
.calendar-event-positioned .agenda-hover-card {
  overflow: visible;
}
.calendar-event-positioned > strong,
.calendar-event-positioned > small {
  max-width: 100%;
}


/* v3.14.20 — Renglones horarios dinámicos según cantidad de citas */
.calendar-week-hour-line {
  border-top: 1px solid #dbe5f3;
  background: transparent;
}
.calendar-week-hour-line:nth-child(even) {
  background: rgba(248, 250, 252, .38);
}
.calendar-week-time-axis span {
  z-index: 2;
  background: #fbfdff;
  padding: 1px 4px;
  border-radius: 5px;
}


/* v3.14.23 — Asistente de Agenda unificado y calendario compacto */
.unified-catalog-card { padding: 18px; }
.unified-catalog-toolbar { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,420px); gap:18px; align-items:end; }
.unified-catalog-toolbar h4 { margin:0 0 3px; }
.unified-catalog-toolbar small { color:var(--muted); }
.unified-choice-list { grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); max-height:500px; padding-right:4px; }
.catalog-choice { grid-template-columns:auto minmax(0,1fr); align-items:center; min-height:86px; }
.catalog-choice-copy { display:grid; gap:3px; min-width:0; }
.catalog-choice-copy b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.catalog-kind { width:max-content; border-radius:999px; padding:3px 8px; font-size:.68rem; line-height:1; font-weight:900; text-transform:uppercase; letter-spacing:.04em; }
.catalog-kind.study { background:#e0f2fe; color:#0369a1; }
.catalog-kind.service { background:#f3e8ff; color:#7e22ce; }
.catalog-service-icon { width:18px; height:18px; border-radius:999px; display:grid; place-items:center; background:#efe4ff; color:#7e22ce; font-weight:900; }
.schedule-branch-field { max-width:480px; }
.schedule-picker-grid { display:grid; grid-template-columns:minmax(280px,340px) minmax(0,1fr); gap:18px; align-items:start; }
.mini-calendar-card { padding:14px; position:sticky; top:16px; }
.mini-calendar-head { display:grid; grid-template-columns:38px 1fr 38px; align-items:center; gap:6px; margin-bottom:12px; }
.mini-calendar-head strong { text-align:center; text-transform:capitalize; font-size:1rem; }
.mini-calendar-nav { border:0; background:#f1f5f9; border-radius:12px; width:38px; height:38px; font-size:1.5rem; color:#334155; }
.mini-calendar-nav:hover { background:var(--primary-soft); color:var(--primary-700); }
.mini-calendar-weekdays,.mini-calendar-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.mini-calendar-weekdays { margin-bottom:5px; }
.mini-calendar-weekdays span { text-align:center; color:#64748b; font-size:.72rem; font-weight:800; padding:4px 0; }
.mini-calendar-day { border:1px solid transparent; background:transparent; min-height:38px; border-radius:12px; font-weight:750; color:#1e293b; padding:0; }
.mini-calendar-day:hover:not(:disabled) { background:#f1ffe8; border-color:#b8ff87; }
.mini-calendar-day.outside { color:#94a3b8; }
.mini-calendar-day.today { box-shadow:inset 0 0 0 1px #6dff08; color:#2c6700; }
.mini-calendar-day.selected { background:#6dff08; border-color:#6dff08; color:#102a00; box-shadow:0 6px 16px rgba(109,255,8,.22); }
.mini-calendar-day:disabled { color:#cbd5e1; cursor:not-allowed; text-decoration:line-through; }
.mini-calendar-selected { margin-top:12px; border-top:1px solid var(--border); padding-top:10px; display:grid; gap:2px; }
.mini-calendar-selected span { color:var(--muted); font-size:.75rem; }
.mini-calendar-selected b { text-transform:capitalize; font-size:.88rem; }
.schedule-slots-card { min-height:360px; }
.schedule-slots-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; border-bottom:1px solid var(--border); padding-bottom:12px; }
.schedule-slots-head h4 { margin:0 0 3px; }
.schedule-slots-head small { color:var(--muted); text-transform:capitalize; }
.selected-time-chip { border-radius:999px; padding:7px 12px; background:var(--primary); color:#102a00; font-weight:900; }
@media (max-width:900px) {
  .unified-catalog-toolbar,.schedule-picker-grid { grid-template-columns:1fr; }
  .mini-calendar-card { position:static; }
  .unified-choice-list { grid-template-columns:1fr; }
}

/* v3.14.24 — Agenda pública escalonada y vinculación de citas digitales */
.public-booking-page { min-height: 100vh; background: #f4f7fb; color: var(--text); }
.public-booking-header { min-height: 82px; padding: 16px clamp(18px,4vw,56px); display:flex; align-items:center; gap:14px; background:#fff; border-bottom:1px solid var(--border); position:sticky; top:0; z-index:20; }
.public-booking-header img { width:52px; height:52px; object-fit:contain; border-radius:14px; background:#fff; }
.public-booking-header div { display:grid; }
.public-booking-header b { font-size:1rem; }
.public-booking-header span { color:var(--muted); font-size:.86rem; }
.public-booking-layout { width:min(1440px,100%); margin:0 auto; padding:clamp(18px,3vw,42px); display:grid; grid-template-columns:minmax(0,1fr) minmax(270px,360px); gap:26px; align-items:start; }
.public-booking-main { min-width:0; }
.public-booking-promo { position:sticky; top:106px; border-radius:24px; overflow:hidden; box-shadow:var(--shadow-md); background:#fff; padding:14px; display:grid; place-items:center; }
.public-booking-promo img { display:block; width:100%; height:auto; max-height:min(78vh, 960px); object-fit:contain; border-radius:18px; background:#fff; }
.public-stepper { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:18px; }
.public-step { display:flex; align-items:center; justify-content:center; gap:8px; padding:12px 8px; border-radius:16px; color:var(--muted); background:#edf2f7; font-size:.84rem; }
.public-step span { display:grid; place-items:center; width:26px; height:26px; border-radius:999px; background:#fff; font-weight:800; }
.public-step.active { background:#eaffdc; color:#245300; box-shadow:inset 0 0 0 1px #a7e77c; }
.public-step.active span, .public-step.done span { background:#6dff08; color:#102a00; }
.public-step.done { color:#3d8f00; background:#f5ffef; }
.public-step-card { background:#fff; border:1px solid var(--border); border-radius:28px; padding:clamp(22px,4vw,42px); box-shadow:var(--shadow-sm); }
.public-step-card h2 { margin:4px 0 8px; font-size:clamp(1.65rem,3vw,2.45rem); letter-spacing:-.05em; }
.public-kicker { display:block; color:#3d8f00; font-size:.76rem; letter-spacing:.14em; text-transform:uppercase; font-weight:800; }
.public-instruction { margin:0 0 26px; color:var(--muted); font-size:1rem; }
.public-choice-grid { display:grid; gap:14px; }
.public-choice-grid.branches { grid-template-columns:repeat(2,minmax(0,1fr)); }
.public-choice-card { position:relative; text-align:left; border:1px solid var(--border-strong); border-radius:20px; background:#fff; padding:20px; color:var(--text); transition:.16s ease; }
.public-choice-card:hover { border-color:#72d72c; transform:translateY(-1px); box-shadow:var(--shadow-sm); }
.public-choice-card.selected { border-color:#6dff08; background:#f4ffed; box-shadow:0 0 0 3px rgba(109,255,8,.12); }
.public-choice-card h3 { margin:0 0 6px; font-size:1.03rem; }
.public-choice-card p { margin:3px 0; color:var(--muted); }
.public-choice-check { position:absolute; right:14px; top:14px; display:grid; place-items:center; width:25px; height:25px; border-radius:999px; border:1px solid #a7d88a; color:#245300; font-weight:900; }
.public-choice-card.selected .public-choice-check { background:#6dff08; border-color:#6dff08; }
.public-choice-card .btn.compact { margin-top:12px; min-height:34px; padding:7px 12px; }
.public-choice-list { display:grid; gap:10px; margin-top:16px; }
.public-choice-card.study { width:100%; display:flex; align-items:center; gap:16px; padding:17px 18px; }
.public-choice-card.study .public-choice-check { position:static; flex:0 0 auto; }
.public-search-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; }
.public-selection-summary { margin:16px 0; padding:13px 16px; background:#f2ffea; border:1px solid #b8e99a; border-radius:15px; display:flex; justify-content:space-between; gap:12px; color:#245300; }
.public-pagination { margin-top:16px; }
.public-actions { margin-top:28px; padding-top:20px; border-top:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; gap:12px; }
.public-date-layout { display:grid; grid-template-columns:minmax(270px,360px) minmax(0,1fr); gap:20px; }
.public-calendar { border:1px solid var(--border); border-radius:22px; padding:16px; background:#fbfcfe; }
.public-calendar-head { display:grid; grid-template-columns:36px 1fr 36px; align-items:center; text-align:center; text-transform:capitalize; }
.icon-button { width:36px; height:36px; border:0; border-radius:999px; background:#fff; font-size:1.4rem; color:var(--text); }
.icon-button:hover { background:#eaffdc; }
.public-calendar-weekdays, .public-calendar-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:5px; }
.public-calendar-weekdays { margin:14px 0 8px; color:var(--muted); text-align:center; font-size:.78rem; font-weight:700; }
.public-calendar-day, .public-calendar-empty { aspect-ratio:1; display:grid; place-items:center; border-radius:12px; }
.public-calendar-day { border:0; background:transparent; color:var(--text); }
.public-calendar-day:hover:not(:disabled) { background:#eaffdc; }
.public-calendar-day.today { box-shadow:inset 0 0 0 1px #9be36b; }
.public-calendar-day.selected { background:#6dff08; color:#102a00; font-weight:900; }
.public-calendar-day:disabled { color:#c5ceda; cursor:not-allowed; }
.public-slots-panel { border:1px solid var(--border); border-radius:22px; padding:20px; }
.public-slots-panel h3 { margin:0 0 5px; }
.public-slots-panel > p { color:var(--muted); margin:0 0 18px; }
.public-slot-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:9px; }
.public-slot { min-height:44px; border:1px solid var(--border-strong); border-radius:13px; background:#fff; font-weight:700; }
.public-slot:hover:not(:disabled), .public-slot.selected { border-color:#6dff08; background:#eaffdc; color:#245300; }
.public-slot:disabled { background:#f2f4f7; color:#a5adba; text-decoration:line-through; cursor:not-allowed; }
.public-data-layout { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr); gap:22px; align-items:start; }
.public-data-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 14px; }
.public-data-form .full { grid-column:1/-1; }
.public-consent { grid-column:1/-1; display:flex; align-items:flex-start; gap:10px; padding:14px; border:1px solid #b8e99a; border-radius:15px; background:#f7fff2; font-size:.9rem; }
.public-consent input { margin-top:3px; }
.public-booking-summary { border:1px solid #b8e99a; background:#f7fff2; border-radius:20px; padding:20px; }
.public-booking-summary h3 { margin:0 0 14px; }
.public-booking-summary dl { margin:0; display:grid; gap:12px; }
.public-booking-summary dl div { border-bottom:1px solid rgba(91,150,50,.18); padding-bottom:10px; }
.public-booking-summary dl div:last-child { border-bottom:0; padding-bottom:0; }
.public-booking-summary dt { font-size:.75rem; color:#5d7350; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.public-booking-summary dd { margin:3px 0 0; font-weight:650; }
.public-confirmation { text-align:center; }
.public-confirmation .public-booking-summary { max-width:720px; margin:22px auto; text-align:left; }
.public-success-icon { width:76px; height:76px; border-radius:999px; display:grid; place-items:center; margin:0 auto 14px; background:#6dff08; color:#102a00; font-size:2.2rem; font-weight:900; }
.public-confirmation-actions { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; }
.public-instructions { margin:24px auto 0; max-width:860px; text-align:left; background:#effbe8; border:1px solid #b8e99a; border-left:7px solid #6dff08; border-radius:18px; padding:22px; }
.public-instructions h3 { margin-top:0; }
.public-instructions li { margin-bottom:9px; }
.public-booking-disabled, .appointment-confirm-page { min-height:100vh; display:grid; place-items:center; padding:24px; background:#f4f7fb; text-align:center; }
.public-booking-disabled img { width:min(220px,55vw); max-height:120px; object-fit:contain; margin-bottom:20px; }
.appointment-confirm-card { width:min(680px,100%); background:#fff; border:1px solid var(--border); border-radius:28px; box-shadow:var(--shadow-lg); padding:clamp(24px,5vw,48px); }
.appointment-confirm-card > img { width:90px; height:90px; object-fit:contain; }
.appointment-confirm-card .public-booking-summary { text-align:left; margin:22px 0; }
.appointment-confirm-actions { display:flex; justify-content:center; gap:12px; margin:18px 0; }
.public-settings-screen { position:relative; }
.public-settings-toolbar { display:flex; justify-content:flex-end; margin:-8px 0 18px; }
.setting-toggle-card { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:18px; border:1px solid #b8e99a; background:#f7fff2; border-radius:18px; }
.setting-toggle-card span { display:grid; gap:3px; }
.setting-toggle-card small { color:var(--muted); }
.setting-toggle-card input { width:22px; height:22px; }
.public-custom-schedule { display:none; border:1px solid var(--border); border-radius:20px; padding:18px; }
.public-custom-schedule.visible { display:block; }
.public-schedule-row { display:grid; grid-template-columns:minmax(160px,1fr) 140px 25px 140px; gap:10px; align-items:center; padding:9px 0; border-bottom:1px solid var(--border); }
.public-schedule-row:last-child { border-bottom:0; }
.public-promo-preview { min-height:160px; margin-top:12px; padding:14px; border:1px dashed var(--border-strong); border-radius:18px; display:flex; align-items:center; gap:15px; flex-wrap:wrap; }
.public-promo-preview img { width:min(180px, 100%); max-height:220px; height:auto; object-fit:contain; border-radius:14px; background:#fff; }
.public-promo-meta { font-size:.88rem; color:var(--muted); }
.public-link-panel { margin:16px 0; border:1px solid #f1c973; border-left:6px solid #e7a600; background:#fff9e9; border-radius:18px; padding:18px; display:flex; justify-content:space-between; gap:16px; align-items:center; }
.public-link-panel.ready { border-color:#94df67; border-left-color:#18a54d; background:#f3ffed; }
.public-link-panel h4 { margin:3px 0; }
.public-link-panel p { margin:0; color:var(--muted); }
.public-link-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.public-link-dialog > p { color:var(--muted); }
.public-link-candidates { display:grid; gap:10px; margin:16px 0; }
.public-link-candidate { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:14px; border:1px solid var(--border); border-radius:16px; }
.public-link-candidate div { display:grid; }
.public-link-candidate span, .public-link-candidate small { color:var(--muted); }
.subtle-notification-host { position:fixed; top:18px; right:18px; z-index:9999; width:min(390px,calc(100vw - 36px)); display:grid; gap:10px; }
.subtle-notification { opacity:0; transform:translateY(-12px); border:1px solid #b8e99a; background:#fff; border-radius:18px; box-shadow:var(--shadow-lg); padding:15px; display:flex; gap:12px; text-align:left; color:var(--text); transition:.22s ease; }
.subtle-notification.visible { opacity:1; transform:none; }
.subtle-notification > span { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; background:#eaffdc; }
.subtle-notification b { display:block; }
.subtle-notification p { margin:3px 0 0; color:var(--muted); }

@media (max-width: 900px) {
  .public-booking-layout { grid-template-columns:1fr; }
  .public-booking-promo { position:static; order:-1; max-width:430px; width:100%; margin:0 auto; }
  .public-choice-grid.branches, .public-date-layout, .public-data-layout { grid-template-columns:1fr; }
  .public-step b { display:none; }
  .public-stepper { max-width:420px; margin-left:auto; margin-right:auto; }
}
@media (max-width: 560px) {
  .public-booking-header { position:static; }
  .public-booking-layout { padding:12px; }
  .public-step-card { padding:20px 16px; border-radius:22px; }
  .public-data-form { grid-template-columns:1fr; }
  .public-data-form .field { grid-column:1/-1; }
  .public-selection-summary, .public-link-panel { flex-direction:column; align-items:flex-start; }
  .public-actions { flex-wrap:wrap; }
  .public-actions .btn { flex:1; }
  .public-schedule-row { grid-template-columns:1fr 1fr; }
  .public-schedule-row span { display:none; }
}
.public-branch-select { display:block; width:100%; padding:0; border:0; background:transparent; color:inherit; text-align:left; }
.public-booking-layout:not(.has-promo) { grid-template-columns:minmax(0,1fr); max-width:1100px; }

/* v3.14.25 Sincronización global en tiempo real */
.realtime-pending-notice {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10020;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(109,255,8,.55);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15,23,42,.18);
  color: var(--text);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .18s ease, transform .18s ease;
}
.realtime-pending-notice.visible { opacity: 1; transform: translateY(0); }
.realtime-pending-notice > span { display:grid; place-items:center; width:34px; height:34px; border-radius:999px; background:var(--primary); color:#102a00; font-size:1.1rem; font-weight:800; }
.realtime-pending-notice b, .realtime-pending-notice small { display:block; }
.realtime-pending-notice small { margin-top:2px; color:var(--muted); }


/* v3.14.26 — Ajuste visual de encabezado en agenda pública */
.public-booking-header { justify-content:flex-start; min-height: 110px; padding: 18px clamp(18px,4vw,56px); }
.public-booking-header img { width: 132px; height: 76px; max-width: min(38vw, 180px); object-fit: contain; border-radius: 0; background: transparent; }
.public-booking-page-title { margin-bottom: 18px; }
.public-booking-page-title .public-kicker { display:inline-flex; margin-bottom:10px; }
.public-booking-page-title h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1; letter-spacing: .02em; }
.public-booking-page-title p { margin: 10px 0 0; color: var(--muted); font-size: 1rem; max-width: 680px; }
@media (max-width: 760px) {
  .public-booking-header { min-height: 88px; padding: 14px 18px; }
  .public-booking-header img { width: 150px; height: 56px; max-width: 52vw; }
  .public-booking-page-title h1 { font-size: 2rem; }
}


/* v3.14.29 — Sucursal activa y restricciones visuales por rol */
.global-branch-filter {
  display:grid;
  gap:5px;
  min-width:210px;
  color:var(--text-soft);
  font-size:.78rem;
  font-weight:750;
}
.global-branch-filter span { padding-left:4px; }
.global-branch-filter select { min-height:42px; background:#fff; }
.readonly-branch {
  display:grid;
  gap:3px;
  min-width:190px;
  padding:9px 13px;
  border:1px solid rgba(109,255,8,.42);
  border-radius:14px;
  background:var(--primary-soft);
  color:#214800;
}
.readonly-branch span { font-size:.72rem; font-weight:750; text-transform:uppercase; letter-spacing:.04em; }
.readonly-branch b { font-size:.9rem; line-height:1.25; overflow-wrap:anywhere; }
.readonly-branch.compact { min-width:170px; padding:8px 11px; }
.readonly-branch.field-value { min-width:0; min-height:44px; display:flex; align-items:center; padding:10px 13px; }
.readonly-branch.field-value b { font-size:.94rem; }
@media (max-width: 900px) {
  .global-branch-filter, .readonly-branch { width:100%; min-width:0; }
  .toolbar-right { align-items:stretch; }
}


/* v3.14.31 — Credenciales y prueba del Portal de Doctores */
.portal-credentials-dialog { display:grid; gap:18px; }
.portal-password-warning { border:1px solid #f2c46d; background:#fff8e8; color:#7a4a00; border-radius:18px; padding:16px; }
.portal-password-warning b { display:block; margin-bottom:5px; }
.portal-password-warning p { margin:0; }
.portal-credential-grid { display:grid; gap:10px; }
.portal-credential-grid > div { display:grid; gap:4px; padding:14px 16px; border:1px solid var(--border); border-radius:16px; background:var(--surface-soft); }
.portal-credential-grid span { color:var(--muted); font-size:.78rem; font-weight:750; text-transform:uppercase; letter-spacing:.05em; }
.portal-credential-grid strong { font-size:1.08rem; overflow-wrap:anywhere; user-select:all; }
.doctor-portal-test-page { background:var(--bg); }
.doctor-portal-success-card { max-width:760px; margin:8vh auto 0; text-align:center; padding:clamp(26px,5vw,52px); }
.doctor-portal-success-icon { display:grid; place-items:center; width:78px; height:78px; margin:0 auto 18px; border-radius:999px; background:var(--primary); color:#102a00; font-size:2.3rem; font-weight:900; }
.doctor-portal-success-card h1 { margin:0 0 12px; font-size:clamp(2rem,5vw,3.4rem); }
.doctor-portal-success-card p { max-width:620px; margin:8px auto; color:var(--text-soft); }
.doctor-portal-success-card .success { margin-top:24px; text-align:left; }

/* v3.14.35 — Portal de Doctores: inicio, slider, video y configuración */
.doctor-portal-config-card { margin-top: 20px; }
.doctor-portal-config-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:18px; }
.doctor-portal-upload-box { border:1px solid var(--border); border-radius:20px; padding:20px; background:var(--surface-soft); display:grid; gap:13px; }
.doctor-portal-upload-box h3, .doctor-portal-content-section h3 { margin:0; }
.doctor-portal-upload-box p { margin:0; color:var(--muted); }
.doctor-portal-upload-box input[type="file"] { background:#fff; }
.doctor-portal-audience { display:flex; flex-wrap:wrap; gap:8px; }
.doctor-portal-audience label { cursor:pointer; }
.doctor-portal-audience input { position:absolute; opacity:0; pointer-events:none; }
.doctor-portal-audience span { display:inline-flex; align-items:center; min-height:34px; padding:7px 12px; border:1px solid var(--border-strong); border-radius:999px; background:#fff; color:var(--text-soft); font-size:.84rem; font-weight:700; }
.doctor-portal-audience input:checked + span { background:var(--primary-soft); border-color:var(--primary); color:#285900; }
.doctor-portal-content-section { margin-top:24px; }
.doctor-portal-content-list { display:grid; gap:14px; margin-top:14px; }
.doctor-portal-content-item { display:grid; grid-template-columns:150px minmax(0,1fr); gap:16px; padding:14px; border:1px solid var(--border); border-radius:20px; background:#fff; }
.doctor-portal-content-preview { display:grid; place-items:center; min-height:150px; border-radius:16px; overflow:hidden; background:#f4f7fb; }
.doctor-portal-content-preview img, .doctor-portal-content-preview video { width:100%; height:180px; object-fit:contain; background:#fff; }
.doctor-portal-content-body { display:grid; align-content:center; gap:12px; }
.doctor-portal-content-body > div:first-child { display:flex; align-items:center; gap:10px; }

.portal-loading { min-height:100vh; display:grid; place-items:center; background:#f4f7fb; }
.doctor-portal-app { min-height:100vh; background:#f4f7fb; color:var(--text); }
.doctor-portal-topbar { min-height:88px; padding:14px clamp(18px,3vw,42px); display:flex; align-items:center; justify-content:space-between; gap:18px; background:#fff; border-bottom:1px solid var(--border); position:sticky; top:0; z-index:30; }
.doctor-portal-brand, .doctor-portal-user { display:flex; align-items:center; gap:13px; }
.doctor-portal-brand img { width:120px; height:58px; object-fit:contain; }
.doctor-portal-brand div, .doctor-portal-user div { display:grid; }
.doctor-portal-brand b { font-size:1rem; }
.doctor-portal-brand span, .doctor-portal-user span { color:var(--muted); font-size:.82rem; }
.doctor-portal-user { text-align:right; }
.doctor-portal-layout { width:min(1600px,100%); min-height:calc(100vh - 88px); margin:0 auto; display:grid; grid-template-columns:250px minmax(0,1fr); }
.doctor-portal-menu { padding:24px 16px; border-right:1px solid var(--border); background:#fff; display:grid; align-content:start; gap:7px; position:sticky; top:88px; height:calc(100vh - 88px); }
.doctor-portal-menu-item { width:100%; border:1px solid transparent; border-radius:16px; padding:12px 14px; background:transparent; color:var(--text-soft); display:flex; align-items:center; gap:12px; text-align:left; }
.doctor-portal-menu-item span { display:grid; place-items:center; width:30px; height:30px; border-radius:10px; background:var(--surface-muted); font-size:1.05rem; }
.doctor-portal-menu-item:hover { background:var(--primary-ghost); border-color:rgba(109,255,8,.28); }
.doctor-portal-menu-item.active { background:#6dff08; color:#102a00; box-shadow:0 10px 24px rgba(109,255,8,.20); }
.doctor-portal-menu-item.active span { background:#ffffff; color:#102a00; }
.doctor-portal-content { min-width:0; padding:clamp(18px,3vw,42px); }
.doctor-welcome-card { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:clamp(22px,3vw,34px); border-radius:28px; background:#6dff08; color:#102a00; box-shadow:var(--shadow-md); }
.doctor-welcome-card h1 { margin:5px 0 8px; font-size:clamp(1.8rem,4vw,3.1rem); line-height:1.05; }
.doctor-welcome-card p { margin:0; color:rgba(16,42,0,.82); }
.doctor-welcome-card .record-kicker { color:#245300; }
.doctor-tier-card { min-width:190px; padding:18px; border-radius:20px; background:rgba(255,255,255,.58); border:1px solid rgba(16,42,0,.16); display:grid; text-align:center; }
.doctor-tier-card span { font-size:.76rem; text-transform:uppercase; letter-spacing:.08em; color:rgba(16,42,0,.68); }
.doctor-tier-card b { font-size:1.65rem; color:#102a00; }
.doctor-tier-card small { color:rgba(16,42,0,.72); }
.doctor-home-media-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr); gap:22px; margin-top:24px; align-items:start; }
.doctor-promo-panel, .doctor-video-panel { min-width:0; border:1px solid var(--border); border-radius:26px; background:#fff; padding:18px; box-shadow:var(--shadow-sm); }
.doctor-panel-title { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.doctor-panel-title h2 { margin:2px 0 0; }
.doctor-slider, .doctor-video-frame { position:relative; aspect-ratio:1080/1350; border-radius:22px; overflow:hidden; background:#eef2f6; display:grid; place-items:center; }
.doctor-slider > img, .doctor-video-frame video { width:100%; height:100%; object-fit:contain; background:#f8fafc; }
.doctor-slider-arrow { position:absolute; top:50%; z-index:2; transform:translateY(-50%); width:42px; height:42px; border:0; border-radius:999px; background:rgba(15,23,42,.72); color:#fff; font-size:1.8rem; display:grid; place-items:center; }
.doctor-slider-arrow.prev { left:12px; }
.doctor-slider-arrow.next { right:12px; }
.doctor-slider-dots { position:absolute; left:50%; bottom:14px; transform:translateX(-50%); z-index:2; display:flex; gap:7px; padding:7px 10px; border-radius:999px; background:rgba(15,23,42,.48); }
.doctor-slider-dots button { width:8px; height:8px; padding:0; border:0; border-radius:999px; background:rgba(255,255,255,.55); }
.doctor-slider-dots button.active { width:24px; background:var(--primary); }
.doctor-media-empty { min-height:430px; border:1px dashed var(--border-strong); border-radius:22px; display:grid; place-content:center; justify-items:center; text-align:center; padding:24px; color:var(--muted); }
.doctor-media-empty.vertical { min-height:520px; }
.doctor-media-empty span { font-size:3rem; }
.doctor-media-empty b { color:var(--text); font-size:1.1rem; }
.doctor-media-empty p { max-width:300px; margin:4px 0 0; }
.doctor-placeholder-card { min-height:60vh; border:1px solid var(--border); border-radius:28px; background:#fff; box-shadow:var(--shadow-sm); display:grid; place-content:center; justify-items:center; text-align:center; padding:36px; }
.doctor-placeholder-card h1 { margin:10px 0 6px; font-size:clamp(2rem,5vw,3.4rem); }
.doctor-placeholder-card p { max-width:620px; color:var(--muted); }
.doctor-placeholder-icon { display:grid; place-items:center; width:82px; height:82px; border-radius:24px; background:var(--primary); color:#102a00; font-size:2.4rem; font-weight:900; }

@media (max-width: 1050px) {
  .doctor-portal-layout { grid-template-columns:1fr; }
  .doctor-portal-menu { position:sticky; top:88px; z-index:20; height:auto; border-right:0; border-bottom:1px solid var(--border); padding:10px 14px; display:flex; overflow-x:auto; }
  .doctor-portal-menu-item { width:auto; flex:0 0 auto; }
  .doctor-home-media-grid { grid-template-columns:1fr; }
  .doctor-video-panel { max-width:620px; width:100%; }
}
@media (max-width: 720px) {
  .doctor-portal-topbar { min-height:74px; padding:10px 14px; }
  .doctor-portal-brand img { width:88px; height:48px; }
  .doctor-portal-brand div { display:none; }
  .doctor-portal-user div { display:none; }
  .doctor-portal-menu { top:74px; }
  .doctor-portal-menu-item { padding:9px 11px; }
  .doctor-portal-menu-item b { font-size:.82rem; }
  .doctor-portal-content { padding:14px; }
  .doctor-welcome-card { align-items:flex-start; flex-direction:column; }
  .doctor-tier-card { width:100%; }
  .doctor-portal-config-grid { grid-template-columns:1fr; }
  .doctor-portal-content-item { grid-template-columns:1fr; }
}
