:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef4f8;
  --text: #252a32;
  --muted: #75808f;
  --border: #e2e8f0;
  --brand: #049bf3;
  --brand-strong: #007ac2;
  --brand-soft: #e8f6ff;
  --brand-softer: #f4fbff;
  --sidebar: #11151b;
  --sidebar-2: #181e26;
  --sidebar-text: #f8fbff;
  --success: #15935d;
  --success-soft: #e8f7f0;
  --warning: #ca8611;
  --warning-soft: #fff7df;
  --danger: #d64545;
  --danger-soft: #fff0f0;
  --live: #e53935;
  --shadow-sm: 0 5px 18px rgba(15, 31, 46, .055);
  --shadow: 0 18px 55px rgba(15, 31, 46, .10);
  --radius: 18px;
  --radius-sm: 12px;
  --focus: 0 0 0 3px rgba(4, 155, 243, .18);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14171b;
  --surface: #1e2228;
  --surface-2: #242930;
  --surface-3: #2d333b;
  --text: #edf2f7;
  --muted: #aab3bf;
  --border: #343b45;
  --brand: #28adf7;
  --brand-strong: #5bc0fa;
  --brand-soft: #11354a;
  --brand-softer: #172832;
  --sidebar: #0d1014;
  --sidebar-2: #15191f;
  --sidebar-text: #f6f9fc;
  --success: #61d59c;
  --success-soft: #17382a;
  --warning: #f0bd58;
  --warning-soft: #3b311b;
  --danger: #ff7777;
  --danger-soft: #421f22;
  --live: #ff5f5b;
  --shadow-sm: 0 5px 18px rgba(0, 0, 0, .18);
  --shadow: 0 18px 60px rgba(0, 0, 0, .34);
  --focus: 0 0 0 3px rgba(40, 173, 247, .22);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 85% -10%, rgba(4,155,243,.08), transparent 28rem),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); font-weight: 600; text-decoration: none; }
a:hover { color: var(--brand-strong); }
img { max-width: 100%; }
h1,h2,h3,h4,p { margin-top: 0; }
h1,h2,h3,h4 { line-height: 1.22; }

.studio-container { min-height: 100vh; }
.studio-app { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0,1fr); }

/* Auth */
.auth-card {
  width: min(460px, calc(100% - 32px));
  margin: clamp(48px, 9vh, 110px) auto;
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid var(--border);
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.brand-lockup { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.auth-logo { width: 118px; max-height: 74px; object-fit: contain; }
.brand-lockup h1 { margin: 2px 0 0; font-size: 2rem; }
.theme-fab {
  position: fixed; z-index: 100; top: 20px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer;
}

/* Sidebar */
.studio-sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px;
  color: var(--sidebar-text); background: linear-gradient(180deg, var(--sidebar), #0b0e12);
  display: flex; flex-direction: column; z-index: 40;
  border-right: 1px solid rgba(255,255,255,.055);
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 24px; }
.sidebar-logo { width: 64px; height: 44px; object-fit: contain; flex: none; }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong { font-size: .93rem; }
.sidebar-brand span { color: #99a7b7; font-size: .74rem; margin-top: 2px; text-transform: uppercase; letter-spacing: .16em; }
.studio-nav { display: grid; gap: 4px; }
.nav-item {
  position: relative; width: 100%; min-height: 45px; padding: 0 12px;
  display: flex; align-items: center; gap: 12px; border: 0; border-radius: 11px;
  color: #aeb9c6; background: transparent; cursor: pointer; text-align: left;
  font-size: .86rem; font-weight: 500; transition: .18s ease;
}
.nav-item i { width: 20px; text-align: center; font-size: 1.05rem; }
.nav-item:hover { color: white; background: rgba(255,255,255,.055); transform: translateX(2px); }
.nav-item.active {
  color: white;
  background: linear-gradient(90deg, rgba(4,155,243,.96), rgba(4,155,243,.68));
  box-shadow: 0 8px 25px rgba(4,155,243,.18);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -16px; width: 3px; height: 24px; border-radius: 0 3px 3px 0; background: #fff;
}
.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-user-card {
  width: 100%; padding: 10px 8px; display: grid; grid-template-columns: 38px minmax(0,1fr) 18px;
  gap: 9px; align-items: center; border: 0; border-radius: 12px; color: white; background: transparent; cursor: pointer; text-align: left;
}
.sidebar-user-card:hover { background: rgba(255,255,255,.05); }
.sidebar-user-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #252c34; border: 2px solid rgba(255,255,255,.15); }
.sidebar-user-copy { min-width: 0; }
.sidebar-user-copy strong, .sidebar-user-copy small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-copy strong { font-size: .8rem; }
.sidebar-user-copy small { color: #96a4b3; margin-top: 2px; font-size: .68rem; text-transform: capitalize; }
.sidebar-logout { width: 100%; margin-top: 8px; color: #b6c1cd !important; border-color: rgba(255,255,255,.09) !important; }
.sidebar-logout:hover { color: white !important; background: rgba(255,255,255,.05) !important; }

/* Topbar */
.studio-main { min-width: 0; }
.studio-topbar {
  position: sticky; top: 0; z-index: 30; height: 78px; padding: 0 clamp(18px, 3vw, 38px);
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 12px; }
.studio-topbar h1 { margin: 2px 0 0; font-size: 1.12rem; }
.eyebrow { margin: 0; color: var(--brand); text-transform: uppercase; letter-spacing: .13em; font-size: .65rem; font-weight: 700; }
.muted, .field-help, small { color: var(--muted); }
.icon-button {
  width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border: 1px solid var(--border);
  border-radius: 11px; color: var(--text); background: var(--surface); cursor: pointer; box-shadow: var(--shadow-sm);
}
.icon-button:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.topbar-profile {
  min-width: 190px; padding: 6px 10px 6px 6px; display: grid; grid-template-columns: 36px minmax(0,1fr) 16px;
  align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 13px; color: var(--text); background: var(--surface); cursor: pointer; box-shadow: var(--shadow-sm); text-align: left;
}
.topbar-profile img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.topbar-profile span { min-width: 0; }
.topbar-profile strong, .topbar-profile small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-profile strong { font-size: .77rem; }
.topbar-profile small { font-size: .66rem; text-transform: capitalize; margin-top: 1px; }
.topbar-actions { position: relative; }
.profile-menu {
  position: absolute; right: 0; top: 53px; width: 210px; padding: 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); z-index: 60;
}
.profile-menu button { width: 100%; padding: 10px 11px; display: flex; gap: 10px; align-items: center; border: 0; border-radius: 9px; color: var(--text); background: transparent; cursor: pointer; text-align: left; font-size: .78rem; }
.profile-menu button:hover { background: var(--surface-2); color: var(--brand); }

/* Content */
.studio-content { width: min(1480px, 100%); margin: 0 auto; padding: clamp(24px, 4vw, 42px); }
.studio-view { display: none; animation: viewIn .18s ease; }
.studio-view.active-view { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-heading, .section-heading, .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-heading { margin-bottom: 20px; }
.page-heading h2, .dashboard-welcome h2 { margin: 4px 0 5px; font-size: clamp(1.45rem, 2.4vw, 2rem); }
.page-heading p { margin-bottom: 0; }
.surface {
  margin-bottom: 18px; padding: clamp(18px, 2.4vw, 26px); border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm);
}

/* Dashboard */
.dashboard-welcome { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.dashboard-date { padding: 8px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: .72rem; box-shadow: var(--shadow-sm); }
.dashboard-live-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr); gap: 18px; margin-bottom: 18px; }
.dashboard-live-card {
  position: relative; overflow: hidden; min-height: 240px; margin: 0; padding: 24px;
  background:
    radial-gradient(circle at 88% 10%, rgba(4,155,243,.18), transparent 17rem),
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, var(--brand) 6%), var(--surface));
}
.dashboard-live-card::after { content: ""; position: absolute; width: 230px; height: 230px; border: 1px solid rgba(4,155,243,.12); border-radius: 50%; right: -100px; bottom: -120px; }
.dashboard-live-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.dashboard-live-head .inline-link { margin-left: auto; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 5px color-mix(in srgb, var(--live) 14%, transparent); }
.dashboard-live-content { position: relative; z-index: 2; min-height: 165px; display: flex; align-items: center; }
.dashboard-live-person { display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 16px; align-items: center; }
.dashboard-live-person img { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); box-shadow: var(--shadow-sm); background: var(--surface-3); }
.dashboard-live-person h3 { margin: 0 0 4px; font-size: 1.45rem; }
.dashboard-live-person p { margin: 0; color: var(--muted); }
.dashboard-live-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.dashboard-live-meta span { padding: 5px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .7rem; font-weight: 600; }
.dashboard-live-empty { display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.dashboard-live-empty i { color: var(--brand); font-size: 2.2rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.kpi-card {
  min-height: 112px; padding: 16px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--border); border-radius: 16px;
  color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm); text-align: left; cursor: pointer; transition: .18s ease;
}
.kpi-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 42%, var(--border)); box-shadow: var(--shadow); }
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); font-size: 1.15rem; flex: none; }
.kpi-card strong, .kpi-card small { display: block; }
.kpi-card strong { font-size: 1.45rem; line-height: 1; margin-bottom: 6px; }
.kpi-card small { font-size: .68rem; }
.dashboard-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.dashboard-panel { min-height: 285px; margin: 0 0 18px; }
.panel-heading { margin-bottom: 18px; }
.panel-heading h3 { margin: 3px 0 3px; font-size: 1rem; }
.panel-heading p { margin: 0; font-size: .72rem; }
.inline-link { padding: 0; border: 0; color: var(--brand); background: transparent; cursor: pointer; font-size: .7rem; font-weight: 600; white-space: nowrap; }
.week-chart { min-height: 190px; display: grid; grid-template-columns: repeat(7,1fr); align-items: end; gap: 8px; padding-top: 8px; }
.week-bar { min-width: 0; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 7px; height: 180px; }
.week-bar-track { width: min(34px, 75%); height: 140px; display: flex; align-items: end; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.week-bar-value { width: 100%; min-height: 5px; border-radius: 9px 9px 0 0; background: linear-gradient(180deg, #43b8f9, var(--brand)); transition: height .25s ease; }
.week-bar strong { font-size: .67rem; }
.week-bar small { font-size: .6rem; }
.timeline-list, .ranking-list, .activity-feed { display: grid; gap: 9px; }
.timeline-item, .activity-feed-item { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 11px; padding: 10px; border-radius: 11px; background: var(--surface-2); }
.timeline-icon, .activity-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: var(--brand-soft); }
.timeline-item strong, .timeline-item small, .activity-feed-item strong, .activity-feed-item small { display: block; }
.timeline-item small, .activity-feed-item small { margin-top: 2px; font-size: .66rem; }
.timeline-item.current { outline: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); background: var(--brand-softer); }
.ranking-item { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.ranking-item img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.ranking-copy strong, .ranking-copy small { display: block; }
.ranking-copy small { font-size: .65rem; }
.ranking-track { height: 5px; margin-top: 6px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.ranking-fill { height: 100%; background: var(--brand); border-radius: inherit; }
.ranking-count { font-size: .7rem; color: var(--muted); }
.quick-actions { margin-top: 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.quick-actions button { padding: 15px; display: grid; grid-template-columns: 34px minmax(0,1fr) 18px; align-items: center; gap: 11px; border: 1px solid var(--border); border-radius: 14px; color: var(--text); background: var(--surface); cursor: pointer; text-align: left; box-shadow: var(--shadow-sm); }
.quick-actions button > i:first-child { width: 34px; height: 34px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 10px; }
.quick-actions strong, .quick-actions small { display: block; }
.quick-actions strong { font-size: .78rem; }
.quick-actions small { margin-top: 2px; font-size: .62rem; }

/* Forms and controls */
.form-stack { display: grid; gap: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.form-span { grid-column: 1 / -1; }
.field-group { display: grid; gap: 7px; min-width: 0; }
.field-group label { color: var(--text); font-size: .72rem; font-weight: 600; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 11px; outline: none; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: var(--focus); background: var(--surface); }
.input-with-action { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.form-inline-help { text-align: right; font-size: .72rem; }
.conditional-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding: 16px; border-radius: 13px; background: var(--brand-softer); border: 1px dashed color-mix(in srgb, var(--brand) 28%, var(--border)); }
.form-message { min-height: 1.2rem; color: var(--muted); margin: 10px 0 0; font-size: .72rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.button {
  min-height: 40px; padding: 9px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; font-weight: 600; font-size: .72rem; cursor: pointer; transition: .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--brand); color: white; box-shadow: 0 7px 18px rgba(4,155,243,.16); }
.button-primary:hover { background: var(--brand-strong); }
.button-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.button-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.button-danger, .danger-button { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, var(--border)); }
.button-live { background: var(--live); color: white; }
.disclosure-panel { padding: 0; overflow: hidden; }
.disclosure-panel > summary { padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; }
.disclosure-panel > summary::-webkit-details-marker { display: none; }
.disclosure-panel > summary span:first-child strong, .disclosure-panel > summary span:first-child small { display: block; }
.disclosure-panel > summary small { margin-top: 3px; font-size: .66rem; }
.disclosure-panel > summary + * { border-top: 1px solid var(--border); padding: 20px; }
.editor-panel { border-left: 4px solid var(--brand); }

/* Cards / lists */
.entity-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(285px,1fr)); gap: 14px; }
.host-item, .program-item, .access-user-item, .preset-item, .override-item, .schedule-item {
  padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.host-item, .access-user-item { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 13px; align-items: start; }
.host-item img, .access-user-avatar { width: 58px; height: 58px; min-width: 58px; object-fit: cover; border-radius: 50%; display: block; background: var(--surface-3); }
.access-user-avatar.editable, .profile-avatar.editable { cursor: pointer; }
.host-item strong, .program-item strong { font-size: .86rem; }
.host-item p, .program-item p { margin: 4px 0 0; color: var(--muted); font-size: .7rem; }
.access-user-controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; padding-top: 10px; border-top: 1px solid var(--border); }
.access-user-remove-photo { grid-column: 1; width: 58px; min-height: 28px; padding: 3px; font-size: .62rem; background: transparent; color: var(--muted); border-color: var(--border); }
.profile-header { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.profile-avatar { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; background: var(--surface-3); border: 4px solid var(--surface); box-shadow: var(--shadow-sm); }
.profile-header strong, .profile-header span, .profile-header small { display: block; }
.profile-header span { color: var(--muted); margin-top: 3px; font-size: .75rem; }
.profile-header small { margin-top: 6px; font-size: .64rem; }
.program-host-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.status-pill { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: .62rem; font-weight: 700; background: var(--surface-3); color: var(--muted); }
.status-pill.active { background: var(--success-soft); color: var(--success); }
.status-pill.cancel { background: var(--danger-soft); color: var(--danger); }

/* Weekly schedule */
.schedule-week {
  display: grid; grid-template-columns: repeat(7, minmax(180px,1fr)); gap: 10px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity;
}
.schedule-day-column { min-width: 180px; scroll-snap-align: start; }
.schedule-day-header { position: sticky; top: 78px; z-index: 4; padding: 10px 11px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 11px; background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(8px); }
.schedule-day-header strong, .schedule-day-header small { display: block; }
.schedule-day-header strong { font-size: .72rem; }
.schedule-day-header small { margin-top: 2px; font-size: .58rem; }
.schedule-day-slots { display: grid; gap: 8px; }
.schedule-item { padding: 12px; border-left: 3px solid var(--brand); }
.schedule-item strong, .schedule-item p { display: block; margin: 0; }
.schedule-item p { margin-top: 4px; color: var(--muted); font-size: .65rem; }
.schedule-item .button-row { margin-top: 10px; }
.schedule-empty { padding: 16px 8px; color: var(--muted); text-align: center; font-size: .65rem; border: 1px dashed var(--border); border-radius: 11px; }
.override-calendar { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 12px; }

/* Live */
.live-status-surface { border-top: 4px solid var(--live); }
.live-timer { display: inline-flex; width: fit-content; margin: 8px 0 14px; padding: 7px 11px; border-radius: 999px; background: var(--surface-3); font-variant-numeric: tabular-nums; font-weight: 700; font-size: .72rem; }
.activity-current { padding: 14px; margin-bottom: 16px; border-radius: 13px; background: var(--brand-softer); border: 1px solid color-mix(in srgb, var(--brand) 15%, var(--border)); }
#live-deck-buttons { display: grid; grid-template-columns: repeat(auto-fit,minmax(135px,1fr)); gap: 9px; }
.live-deck-button { padding: 12px; min-height: 58px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; cursor: pointer; }
.live-deck-button-active { color: white; background: var(--brand); border-color: var(--brand); box-shadow: var(--focus); }

.notice { padding: 12px 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.notice.success { background: var(--success-soft); color: var(--success); }
.empty-state { min-height: 160px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); text-align: center; }
.empty-state.compact { min-height: 150px; }
.empty-state i { color: var(--brand); font-size: 1.5rem; }
.empty-state p { margin: 0; font-size: .7rem; }
.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; }
.toast { padding: 12px 14px; background: var(--text); color: var(--surface); border-radius: 12px; box-shadow: var(--shadow); font-size: .72rem; }
.mobile-only { display: none; }

@media (max-width: 1180px) {
  .studio-app { grid-template-columns: 230px minmax(0,1fr); }
  .dashboard-live-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .kpi-card { min-height: 92px; }
}

@media (max-width: 900px) {
  .studio-app { display: block; }
  .studio-sidebar { position: fixed; left: 0; top: 0; width: min(290px, 87vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 22px 0 55px rgba(0,0,0,.28); }
  body.sidebar-open::after { content: ""; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.42); }
  body.sidebar-open .studio-sidebar { transform: translateX(0); }
  .mobile-only { display: grid; }
  .dashboard-columns { grid-template-columns: 1fr; }
  .dashboard-panel { min-height: auto; }
  .quick-actions { grid-template-columns: 1fr; }
  .topbar-profile { min-width: 0; width: 44px; height: 44px; grid-template-columns: 1fr; padding: 3px; }
  .topbar-profile span, .topbar-profile > i { display: none; }
  .topbar-profile img { width: 36px; height: 36px; margin: auto; }
}

@media (max-width: 660px) {
  .studio-topbar { height: 70px; padding: 0 14px; }
  .studio-content { padding: 20px 14px 34px; }
  .studio-topbar .eyebrow { display: none; }
  .studio-topbar h1 { font-size: 1rem; }
  .topbar-actions { gap: 7px; }
  .dashboard-welcome { align-items: flex-start; flex-direction: column; }
  .dashboard-date { align-self: stretch; text-align: center; }
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-live-card { min-height: 220px; }
  .dashboard-live-person { grid-template-columns: 58px minmax(0,1fr); }
  .dashboard-live-person img { width: 58px; height: 58px; }
  .dashboard-live-person h3 { font-size: 1.12rem; }
  .form-grid, .conditional-fields { grid-template-columns: 1fr; }
  .form-span, .conditional-fields { grid-column: 1; }
  .entity-grid { grid-template-columns: 1fr; }
  .page-heading { display: block; }
  .week-chart { gap: 4px; }
  .week-bar-track { width: 24px; }
  .week-bar strong { font-size: .58rem; }
  .panel-heading { gap: 10px; }
  .panel-heading .inline-link { margin-top: 3px; }
  .auth-card { margin-top: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.live-overview-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(320px,.75fr); gap: 18px; }
.live-overview-grid > .surface { margin: 0 0 18px; }
.live-activity-panel { min-height: 250px; }
@media (max-width: 900px) { .live-overview-grid { grid-template-columns: 1fr; } }

/* === UI refresh 33 overrides === */
:root {
  --accent-purple: #7c4dff;
  --accent-purple-soft: #f2ecff;
  --accent-orange: #ff9f1a;
  --accent-orange-soft: #fff3df;
  --accent-pink: #ff5f8f;
  --accent-pink-soft: #fff0f5;
  --accent-teal: #17b7a0;
  --accent-teal-soft: #e7faf6;
}
html[data-theme="dark"] {
  --accent-purple-soft: rgba(124, 77, 255, 0.18);
  --accent-orange-soft: rgba(255, 159, 26, 0.18);
  --accent-pink-soft: rgba(255, 95, 143, 0.18);
  --accent-teal-soft: rgba(23, 183, 160, 0.18);
}
body.auth-page:not(.app-ready) .studio-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 14px;
}
body.auth-page.app-ready .studio-container { display: block; }
.auth-page .auth-card { width: min(100%, 500px); margin: 0; }
.auth-page .auth-logo { width: 120px; }
.topbar-left { gap: 18px; }
.topbar-search {
  min-width: min(43vw, 560px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  height: 46px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.topbar-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
}
.topbar-search i, .topbar-search span { color: var(--muted); }
.section-cta { display: flex; gap: 10px; align-items: center; }
.section-cta .button { white-space: nowrap; }
.host-focus-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.host-focus-card { padding: 18px; }
.host-focus-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.host-focus-head h3 { margin: 0; font-size: 1rem; }
.host-focus-list { display: grid; gap: 10px; }
.host-focus-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.host-focus-item strong, .host-focus-item small { display: block; }
.host-focus-item small { color: var(--muted); margin-top: 4px; }
.host-focus-item:nth-child(1) { border-left: 4px solid var(--accent-purple); }
.host-focus-item:nth-child(2) { border-left: 4px solid var(--accent-teal); }
.host-focus-item:nth-child(3) { border-left: 4px solid var(--accent-orange); }
.host-focus-item .host-focus-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  min-width: 72px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: .7rem;
  font-weight: 700;
}
.kpi-card:nth-child(1) .kpi-icon { background: var(--brand-soft); color: var(--brand-strong); }
.kpi-card:nth-child(2) .kpi-icon { background: var(--accent-teal-soft); color: var(--accent-teal); }
.kpi-card:nth-child(3) .kpi-icon { background: var(--accent-orange-soft); color: var(--accent-orange); }
.kpi-card:nth-child(4) .kpi-icon { background: var(--accent-purple-soft); color: var(--accent-purple); }
.dashboard-panel:nth-of-type(1) { border-top: 4px solid var(--brand); }
.dashboard-panel:nth-of-type(2) { border-top: 4px solid var(--accent-purple); }
.dashboard-panel:nth-of-type(3) { border-top: 4px solid var(--accent-teal); }
.dashboard-panel:nth-of-type(4) { border-top: 4px solid var(--accent-orange); }
.timeline-item.current { border-left-color: var(--accent-purple); background: color-mix(in srgb, var(--accent-purple-soft) 52%, var(--surface)); }
.live-overview-grid { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); }
#live-deck { border-top: 4px solid var(--accent-purple); }
#live-deck-buttons { grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); }
.live-deck-button:nth-child(4n+1) { background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); }
.live-deck-button:nth-child(4n+2) { background: color-mix(in srgb, var(--accent-purple-soft) 65%, var(--surface)); }
.live-deck-button:nth-child(4n+3) { background: color-mix(in srgb, var(--accent-orange-soft) 65%, var(--surface)); }
.live-deck-button:nth-child(4n+4) { background: color-mix(in srgb, var(--accent-teal-soft) 65%, var(--surface)); }
.live-deck-button-active { color: #fff; }
.access-users-demo-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.access-user-item {
  grid-template-columns: 68px minmax(240px,1.1fr) minmax(280px, .9fr);
  align-items: center;
  padding: 18px 20px;
  border-radius: 20px;
}
.access-user-item > div:nth-of-type(1) strong,
.access-user-item > div:nth-of-type(1) span { display: block; }
.access-user-item > div:nth-of-type(1) span { color: var(--muted); margin-top: 4px; }
.access-user-controls {
  grid-column: auto;
  border-top: 0;
  padding-top: 0;
  justify-content: flex-end;
}
.access-user-controls select,
.access-user-controls button { min-height: 42px; }
.access-user-remove-photo {
  position: relative;
  grid-column: 1;
  width: 40px;
  min-height: 40px;
  margin-top: -18px;
  margin-left: 20px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--danger);
  font-size: 0;
  border-width: 1px;
  box-shadow: var(--shadow-sm);
}
.access-user-remove-photo::before { content: "\F62A"; font-family: bootstrap-icons; font-size: .95rem; }
.access-user-item.archived { opacity: .78; }
.program-host-row {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  margin-bottom: 10px;
}
.program-host-row label { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.program-host-checkbox, .program-primary-radio { width: 18px; height: 18px; accent-color: var(--brand); }
.schedule-week {
  grid-template-columns: repeat(7, minmax(220px, 1fr));
  align-items: start;
  overflow-x: auto;
  padding-bottom: 4px;
}
.schedule-day-header {
  position: static;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-soft) 70%, var(--surface)), var(--surface));
}
.schedule-item {
  border-left-width: 4px;
  border-radius: 16px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.schedule-item:nth-child(4n+1) { border-left-color: var(--brand); }
.schedule-item:nth-child(4n+2) { border-left-color: var(--accent-purple); }
.schedule-item:nth-child(4n+3) { border-left-color: var(--accent-orange); }
.schedule-item:nth-child(4n+4) { border-left-color: var(--accent-teal); }
.schedule-item .button-row { margin-top: auto; }
.schedule-item .button-row .button { min-width: 44px; padding-inline: 10px; }
.schedule-item .button-row .button i:last-child,
.schedule-item .button-row .button span:last-child { pointer-events: none; }
.override-item:nth-child(3n+1) { border-top: 4px solid var(--brand); }
.override-item:nth-child(3n+2) { border-top: 4px solid var(--accent-purple); }
.override-item:nth-child(3n+3) { border-top: 4px solid var(--accent-teal); }
.preset-item:nth-child(4n+1) .preset-icon { background: var(--brand-soft); color: var(--brand); }
.preset-item:nth-child(4n+2) .preset-icon { background: var(--accent-purple-soft); color: var(--accent-purple); }
.preset-item:nth-child(4n+3) .preset-icon { background: var(--accent-orange-soft); color: var(--accent-orange); }
.preset-item:nth-child(4n+4) .preset-icon { background: var(--accent-teal-soft); color: var(--accent-teal); }
.notice.error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, var(--border)); }
.button.icon-only { width: 44px; min-width: 44px; padding-inline: 0; justify-content: center; }
.form-message.error { color: var(--danger); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.studio-footer {
  margin-top: 30px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1.25fr 1fr auto;
  gap: 20px;
  align-items: center;
}
.studio-footer-brand { display: flex; align-items: center; gap: 16px; }
.studio-footer-logo { width: 58px; height: auto; }
.studio-footer-brand strong { display: block; margin-bottom: 4px; }
.studio-footer-links { display: flex; flex-wrap: wrap; gap: 10px; }
.studio-footer-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}
.studio-footer-links a:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.studio-footer-meta { justify-self: end; text-align: right; }
.studio-footer-meta small { display: block; margin-top: 8px; color: var(--muted); }
.disclosure-panel { margin-bottom: 18px; }
#official-presets-block, #personal-presets-block { margin-top: 18px; }
@media (max-width: 1180px) {
  .host-focus-strip { grid-template-columns: 1fr; }
  .access-user-item { grid-template-columns: 68px minmax(0,1fr); }
  .access-user-controls { grid-column: 1 / -1; justify-content: flex-start; }
  .studio-footer { grid-template-columns: 1fr; }
  .studio-footer-meta { justify-self: start; text-align: left; }
}
@media (max-width: 900px) {
  .topbar-search { display: none; }
  .schedule-week { grid-template-columns: repeat(7, minmax(200px, 1fr)); }
}
@media (max-width: 660px) {
  .section-cta { margin-top: 12px; }
  .access-user-item { padding: 16px; }
  .access-user-remove-photo { margin-left: 14px; }
  .studio-footer { padding: 18px; }
}

/* === UI refresh 34: dialogs / floating editors / live command === */
#access-user-create[open],
#program-create-section[open],
#schedule-create-section[open],
#override-create-section[open],
#preset-form-panel[open],
#personal-preset-form-panel[open],
#access-user-editor:not([hidden]),
#access-host-editor:not([hidden]),
#program-editor:not([hidden]),
#program-hosts-editor:not([hidden]),
#schedule-editor:not([hidden]) {
  position: fixed;
  z-index: 120;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 30px));
  max-height: min(86vh, 820px);
  overflow: auto;
  margin: 0;
  border-radius: 24px;
  box-shadow: 0 0 0 100vmax rgba(18, 24, 32, .48), 0 30px 90px rgba(0,0,0,.22);
  animation: modalIn .18s ease;
}
#program-hosts-editor:not([hidden]) { width: min(820px, calc(100vw - 30px)); }
#access-user-create[open] > summary,
#program-create-section[open] > summary,
#schedule-create-section[open] > summary,
#override-create-section[open] > summary,
#preset-form-panel[open] > summary,
#personal-preset-form-panel[open] > summary {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
#access-user-create[open] > summary span:last-child,
#program-create-section[open] > summary span:last-child,
#schedule-create-section[open] > summary span:last-child,
#override-create-section[open] > summary span:last-child,
#preset-form-panel[open] > summary span:last-child,
#personal-preset-form-panel[open] > summary span:last-child {
  font-size: 0;
}
#access-user-create[open] > summary span:last-child::after,
#program-create-section[open] > summary span:last-child::after,
#schedule-create-section[open] > summary span:last-child::after,
#override-create-section[open] > summary span:last-child::after,
#preset-form-panel[open] > summary span:last-child::after,
#personal-preset-form-panel[open] > summary span:last-child::after {
  content: "\F62A";
  font-family: bootstrap-icons;
  font-size: 1rem;
}
@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.98); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.studio-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: none;
  max-height: none;
}
.studio-dialog::backdrop {
  background: rgba(18, 24, 32, .55);
  backdrop-filter: blur(3px);
}
.studio-dialog-card {
  position: relative;
  width: min(470px, calc(100vw - 30px));
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  text-align: center;
}
.studio-dialog-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-2);
  cursor: pointer;
}
.studio-dialog-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin: 4px auto 18px;
  border-radius: 18px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.45rem;
}
.studio-dialog-card h3 { margin-bottom: 8px; }
.studio-dialog-card p { white-space: pre-line; line-height: 1.65; }
.studio-dialog-actions { justify-content: center; margin-top: 22px; }
.studio-dialog.danger .studio-dialog-icon { background: var(--danger-soft); color: var(--danger); }
.studio-dialog.danger #studio-confirm-accept { background: var(--danger); border-color: var(--danger); }
.advanced-options {
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}
.advanced-options summary {
  padding: 12px 14px;
  cursor: pointer;
  font-size: .74rem;
  font-weight: 600;
}
.advanced-options > .conditional-fields { padding: 0 14px 14px; }
.live-command-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.live-command-stat {
  min-height: 88px;
  padding: 13px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.live-command-stat:nth-child(1) { background: color-mix(in srgb, var(--brand-soft) 68%, var(--surface)); }
.live-command-stat:nth-child(2) { background: color-mix(in srgb, var(--accent-purple-soft) 70%, var(--surface)); }
.live-command-stat:nth-child(3) { background: color-mix(in srgb, var(--accent-teal-soft) 70%, var(--surface)); }
.live-command-stat i { display: block; margin-bottom: 8px; font-size: 1.1rem; }
.live-command-stat strong, .live-command-stat small { display: block; }
.live-command-stat small { margin-top: 3px; color: var(--muted); font-size: .63rem; }
.live-status-surface { min-height: 330px; }
#live-deck {
  display: grid;
  grid-template-columns: minmax(270px, .7fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: start;
}
#live-deck > .section-heading,
#live-deck > .activity-current,
#live-deck > .field-group,
#live-deck > #live-deck-message { grid-column: 1; }
#live-deck > #live-deck-buttons {
  grid-column: 2;
  grid-row: 1 / span 5;
  align-content: start;
}
@media (max-width: 900px) {
  #live-deck { grid-template-columns: 1fr; }
  #live-deck > .section-heading,
  #live-deck > .activity-current,
  #live-deck > .field-group,
  #live-deck > #live-deck-message,
  #live-deck > #live-deck-buttons { grid-column: 1; grid-row: auto; }
}
@media (max-width: 660px) {
  .live-command-stats { grid-template-columns: 1fr; }
  .studio-dialog-card { padding: 24px 18px 20px; }
  #access-user-create[open],
  #program-create-section[open],
  #schedule-create-section[open],
  #override-create-section[open],
  #preset-form-panel[open],
  #personal-preset-form-panel[open],
  #access-user-editor:not([hidden]),
  #access-host-editor:not([hidden]),
  #program-editor:not([hidden]),
  #program-hosts-editor:not([hidden]),
  #schedule-editor:not([hidden]) {
    width: calc(100vw - 16px);
    max-height: 90vh;
    border-radius: 20px;
  }
}
.program-host-row { gap: 18px; }
.program-host-person { flex: 1; min-width: 0; display: grid !important; grid-template-columns: 20px 48px minmax(0,1fr); }
.program-host-avatar { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; background: var(--surface-3); }
.program-host-person span strong, .program-host-person span small { display: block; }
.program-host-person span small { margin-top: 3px; color: var(--muted); font-weight: 400; }
.program-primary-choice { padding: 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); white-space: nowrap; }
@media (max-width: 660px) {
  .program-host-row { align-items: stretch; flex-direction: column; }
  .program-primary-choice { align-self: flex-start; }
}
.form-message.success { color: var(--success); }
.auth-page .auth-logo { width: 94px; max-height: 60px; }
@media (max-width: 660px) {
  body.auth-page:not(.app-ready) { min-height: 100dvh; }
  body.auth-page:not(.app-ready) .studio-container { min-height: 100dvh; width: 100%; padding: 76px 12px 24px; }
  .auth-page .auth-card { margin: auto; }
  .auth-page .brand-lockup { align-items: center; }
  .auth-page .auth-logo { width: 82px; }
}
.access-users-list-head {
  display: grid;
  grid-template-columns: 68px minmax(240px, 1.1fr) minmax(280px, .9fr);
  gap: 13px;
  padding: 0 20px 8px;
  color: var(--muted);
  font-size: .63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.access-users-list-head span:first-child { grid-column: 1 / span 2; }
.access-users-list-head span:nth-child(2) { display: none; }
.access-users-list-head span:last-child { text-align: right; }
@media (max-width: 1180px) { .access-users-list-head { display: none; } }

/* === UI Refresh 35: recuperar limpieza de v32, conservar funciones v34 === */
.dashboard-panel,
.live-status-surface,
#live-deck,
.override-item {
  border-top: 1px solid var(--border) !important;
}
.host-focus-item { border-left: 1px solid var(--border) !important; }
.host-focus-after-dashboard {
  margin-top: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.host-focus-section-heading {
  grid-column: 1 / -1;
  padding: 4px 2px 0;
}
.host-focus-section-heading h3 { margin: 4px 0 3px; }
.host-focus-section-heading p { margin: 0; }

/* Directorio de locutores: composición de v32 */
.entity-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entity-title-row h3, .entity-title-row strong { margin: 0; min-width: 0; }
.entity-stat-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.entity-stat-row span {
  min-width: 0; padding: 9px 10px; display: grid; grid-template-columns: 18px 1fr;
  grid-template-rows: auto auto; column-gap: 6px; border-radius: 10px; background: var(--surface-2);
}
.entity-stat-row i { grid-row: 1 / 3; align-self: center; color: var(--brand); }
.entity-stat-row strong { font-size: .72rem; }
.entity-stat-row small { font-size: .55rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.program-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
.host-item { align-content: start; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.host-item > div { min-width: 0; }
.host-item:hover, .program-item:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 24%, var(--border)); box-shadow: var(--shadow); }
.host-item .status-pill { flex: none; }

/* Programas: tarjetas equilibradas de v32 */
.program-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 240px;
  padding: 18px;
}
.program-item > button {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-2);
  font-size: .68rem;
  font-weight: 600;
  cursor: pointer;
}
.program-item > button:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.program-item > .status-pill { margin-top: auto; }

/* Usuarios: acciones como iconos, al estilo de la referencia */
.access-user-controls { align-items: center; }
.access-user-controls select { min-width: 170px; flex: 1 1 190px; }
.access-user-controls .user-action-icon {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 1rem;
}
.access-user-controls .user-action-icon:hover {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 22%, var(--border));
}
.access-user-controls .user-action-icon.danger-button,
.access-user-controls .access-user-delete.user-action-icon { color: var(--danger); }
.access-user-controls .user-action-icon.danger-button:hover,
.access-user-controls .access-user-delete.user-action-icon:hover { background: var(--danger-soft); }

/* Horarios: sin código de color por programa */
.schedule-item,
.schedule-item:nth-child(4n+1),
.schedule-item:nth-child(4n+2),
.schedule-item:nth-child(4n+3),
.schedule-item:nth-child(4n+4) {
  border-left: 1px solid var(--border) !important;
}
.schedule-day-header {
  background: var(--surface) !important;
  border-color: var(--border);
}

/* Coberturas: más aire, sin línea de color */
.override-calendar { gap: 16px; }
.override-item { padding: 20px; }
.override-item .button-row { margin-top: 14px; gap: 9px; }
.override-item p { line-height: 1.55; }

/* Presets: espaciado más claro */
.preset-item {
  padding: 21px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 205px;
}
.preset-item .section-heading { margin: 0; }
.preset-item .section-heading h3 { margin: 0 0 8px; line-height: 1.35; }
.preset-item .section-heading p { margin: 0; line-height: 1.55; }
.preset-item > .button-row { margin-top: 0; }
.preset-item > .button-row:last-child { margin-top: auto; padding-top: 4px; }

/* Footer reducido: composición inspirada en el demo */
.simple-footer {
  margin-top: 34px;
  padding: 18px 22px;
  grid-template-columns: minmax(0, 1.3fr) auto 48px;
  border-radius: 999px;
  align-items: center;
}
.simple-footer .studio-footer-brand { gap: 12px; }
.simple-footer .studio-footer-logo { width: 40px; }
.simple-footer .studio-footer-brand span { color: var(--muted); font-size: .72rem; }
.simple-footer .studio-footer-brand strong { display: inline; color: var(--text); }
.simple-footer .studio-footer-links { justify-content: center; }
.simple-footer .studio-footer-links a {
  padding: 6px 9px;
  border: 0;
  background: transparent;
  font-size: .7rem;
}
.footer-to-top {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: var(--brand);
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1180px) {
  .host-focus-after-dashboard { grid-template-columns: 1fr; }
  .host-focus-section-heading { grid-column: 1; }
}
@media (max-width: 800px) {
  .simple-footer { grid-template-columns: 1fr auto; border-radius: 22px; }
  .simple-footer .studio-footer-links { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
}
@media (max-width: 660px) {
  .simple-footer { grid-template-columns: 1fr auto; }
  .simple-footer .studio-footer-brand span { font-size: .64rem; }
  .program-stats { grid-template-columns: 1fr; }
  .access-user-controls select { flex-basis: 100%; }
}

/* === UI refresh 36: users table, safe boot, calmer creation === */
.studio-boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  background: var(--bg);
  color: var(--muted);
}
.studio-boot img { width: 104px; max-height: 66px; object-fit: contain; }
.studio-boot p { margin: 0; font-size: .75rem; }
.studio-boot-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  animation: bootSpin .75s linear infinite;
}
@keyframes bootSpin { to { transform: rotate(360deg); } }
body.studio-booting #theme-toggle-login { visibility: hidden; }

/* Solo el CTA azul abre altas. El panel cerrado deja de ocupar espacio. */
#access-user-create:not([open]),
#program-create-section:not([open]),
#schedule-create-section:not([open]),
#override-create-section:not([open]),
#preset-form-panel:not([open]),
#personal-preset-form-panel:not([open]) { display: none; }

/* Users: table/list pattern inspired by the demo, adapted to Difusión Radio. */
.access-users-list-head {
  display: grid;
  grid-template-columns: minmax(280px, 1.8fr) .72fr .72fr .95fr .8fr 150px;
  gap: 14px;
  align-items: center;
  padding: 0 22px 10px;
  color: var(--muted);
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.access-users-demo-list {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.access-users-demo-list .access-user-item {
  display: grid;
  grid-template-columns: minmax(280px, 1.8fr) .72fr .72fr .95fr .8fr 150px;
  gap: 14px;
  align-items: center;
  min-height: 88px;
  padding: 14px 22px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: background .16s ease;
}
.access-users-demo-list .access-user-item:last-child { border-bottom: 0; }
.access-users-demo-list .access-user-item:hover { background: var(--surface-2); }
.user-list-identity { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 12px; align-items: center; min-width: 0; }
.user-list-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.user-list-copy { min-width: 0; }
.user-list-copy strong, .user-list-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-list-copy strong { font-size: .78rem; }
.user-list-copy small { margin-top: 3px; font-size: .64rem; }
.role-badge, .account-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 700;
}
.role-badge::before, .account-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.role-owner { color: #e65371; background: #fff0f4; }
.role-manager { color: #d58a00; background: #fff4d8; }
.role-host { color: #058fd0; background: #e7f6ff; }
html[data-theme="dark"] .role-owner { background: rgba(230,83,113,.15); }
html[data-theme="dark"] .role-manager { background: rgba(213,138,0,.15); }
html[data-theme="dark"] .role-host { background: rgba(5,143,208,.16); }
.account-badge.active { color: var(--success); background: var(--success-soft); }
.account-badge.pending { color: var(--warning); background: var(--warning-soft); }
.account-badge.inactive { color: var(--muted); background: var(--surface-3); }
.user-list-date { color: var(--muted); font-size: .67rem; line-height: 1.45; }
.user-list-actions { display: flex; justify-content: flex-end; gap: 4px; }
.user-list-action {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.user-list-action:hover { color: var(--brand); background: var(--brand-soft); }
.user-list-action.danger:hover { color: var(--danger); background: var(--danger-soft); }
.user-list-action.success:hover { color: var(--success); background: var(--success-soft); }

/* User Edit modal */
.user-edit-modal:not([hidden]) { width: min(940px, calc(100vw - 30px)); }
.user-edit-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 26px; }
.user-edit-profile-card {
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-2);
}
.user-edit-avatar-wrap { position: relative; width: 118px; height: 118px; margin-bottom: 16px; }
#access-user-edit-avatar { width: 118px; height: 118px; object-fit: cover; border-radius: 50%; border: 4px solid var(--surface); box-shadow: var(--shadow-sm); }
.user-edit-camera {
  position: absolute;
  right: 2px;
  bottom: 6px;
  width: 36px;
  height: 36px;
  border: 3px solid var(--surface-2);
  border-radius: 50%;
  color: white;
  background: var(--brand);
  cursor: pointer;
}
.user-edit-profile-card > strong { font-size: 1rem; margin-bottom: 4px; }
.user-edit-profile-card > span:not(.role-badge) { color: var(--muted); font-size: .68rem; margin-bottom: 12px; max-width: 100%; overflow-wrap: anywhere; }
.user-edit-profile-card .role-badge { margin-bottom: 18px; }
.compact-button { padding: 8px 11px; font-size: .66rem; }
.user-edit-main { min-width: 0; }

/* Week headers get color without coloring every schedule card. */
.schedule-day-column:nth-child(7n+1) .schedule-day-header { background: color-mix(in srgb, var(--brand-soft) 78%, var(--surface)); }
.schedule-day-column:nth-child(7n+2) .schedule-day-header { background: color-mix(in srgb, var(--accent-purple-soft) 72%, var(--surface)); }
.schedule-day-column:nth-child(7n+3) .schedule-day-header { background: color-mix(in srgb, var(--accent-teal-soft) 72%, var(--surface)); }
.schedule-day-column:nth-child(7n+4) .schedule-day-header { background: color-mix(in srgb, var(--accent-orange-soft) 72%, var(--surface)); }
.schedule-day-column:nth-child(7n+5) .schedule-day-header { background: color-mix(in srgb, var(--accent-pink-soft) 72%, var(--surface)); }
.schedule-day-column:nth-child(7n+6) .schedule-day-header { background: color-mix(in srgb, var(--brand-soft) 54%, var(--surface)); }
.schedule-day-column:nth-child(7n+7) .schedule-day-header { background: color-mix(in srgb, var(--accent-purple-soft) 52%, var(--surface)); }
.schedule-day-header i { color: var(--brand); }

/* Cover cards breathe a little more. */
.override-item .status-pill { margin-bottom: 10px; }
.override-item h3 { margin: 0 0 14px; }
.override-item p { margin-bottom: 10px; }

@media (max-width: 1100px) {
  .access-users-list-head { display: none; }
  .access-users-demo-list { border: 0; background: transparent; box-shadow: none; display: grid; gap: 12px; }
  .access-users-demo-list .access-user-item {
    grid-template-columns: minmax(0,1fr) auto;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
  }
  .user-list-identity { grid-column: 1 / -1; }
  .user-list-actions { grid-column: 2; grid-row: 2 / span 3; align-self: center; flex-direction: column; }
  .user-edit-layout { grid-template-columns: 1fr; }
  .user-edit-profile-card { padding: 18px; }
}
@media (max-width: 660px) {
  .access-users-demo-list .access-user-item { padding: 15px; grid-template-columns: 1fr; }
  .user-list-actions { grid-column: 1; grid-row: auto; flex-direction: row; justify-content: flex-start; }
  .user-edit-modal:not([hidden]) { width: min(100vw - 18px, 940px); }
}
.clickable-entity { cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.clickable-entity:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); box-shadow: var(--shadow); }
.user-row-highlight { outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent); outline-offset: -3px; }
.users-kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.users-kpi { min-height: 100px; padding: 18px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.users-kpi-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; font-size: 1.15rem; }
.users-kpi-icon.purple { color: #7c4dff; background: var(--accent-purple-soft); }
.users-kpi-icon.green { color: var(--success); background: var(--success-soft); }
.users-kpi-icon.orange { color: var(--accent-orange); background: var(--accent-orange-soft); }
.users-kpi-icon.pink { color: var(--accent-pink); background: var(--accent-pink-soft); }
.users-kpi strong, .users-kpi small { display: block; }
.users-kpi strong { font-size: 1.3rem; }
.users-kpi small { margin-top: 4px; font-size: .65rem; }
.users-toolbar { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.users-filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.users-filter-pills button { padding: 8px 14px; border: 0; border-radius: 999px; background: var(--surface-3); color: var(--muted); cursor: pointer; font-size: .68rem; font-weight: 600; }
.users-filter-pills button.active { color: white; background: var(--brand); }
.users-search { min-width: min(320px,40vw); height: 42px; padding: 0 13px; display: flex; align-items: center; gap: 9px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); }
.users-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); }
@media (max-width: 900px) { .users-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .users-toolbar { align-items: stretch; flex-direction: column; } .users-search { min-width: 0; width: 100%; } }
@media (max-width: 520px) { .users-kpi-grid { grid-template-columns: 1fr; } }
.schedule-item .button-row .button:nth-child(1) { color: var(--brand); }
.schedule-item .button-row .button:nth-child(2) { color: var(--warning); }
.schedule-item .button-row .button:nth-child(3) { color: var(--danger); }
.schedule-item:not(.inactive) .button-row .button:nth-child(2):hover { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 25%, var(--border)); }


/* === UI refresh 37: scrollbars + invite polish + colored week headers === */
:root {
  --scrollbar-thumb: rgba(4, 155, 243, .48);
  --scrollbar-thumb-hover: rgba(4, 155, 243, .72);
  --scrollbar-track: rgba(117, 128, 143, .10);
}
html[data-theme="dark"] {
  --scrollbar-thumb: rgba(40, 173, 247, .42);
  --scrollbar-thumb-hover: rgba(91, 192, 250, .76);
  --scrollbar-track: rgba(255, 255, 255, .06);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  min-height: 34px;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
  background-color: var(--scrollbar-thumb);
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}
::-webkit-scrollbar-corner {
  background: transparent;
}
.studio-sidebar,
.studio-content,
.schedule-week,
textarea,
#access-user-create[open],
#program-create-section[open],
#schedule-create-section[open],
#override-create-section[open],
#preset-form-panel[open],
#personal-preset-form-panel[open],
#access-user-editor:not([hidden]),
#access-host-editor:not([hidden]),
#program-editor:not([hidden]),
#program-hosts-editor:not([hidden]),
#schedule-editor:not([hidden]) {
  scrollbar-gutter: stable both-edges;
}

/* User invitation creation result */
.invite-result-card {
  margin-top: 16px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--success-soft) 74%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--success) 18%, var(--border));
  color: var(--text);
}
.invite-result-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.invite-result-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: color-mix(in srgb, var(--success-soft) 88%, var(--surface));
  color: var(--success);
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}
.invite-result-copy strong {
  display: block;
  margin-bottom: 4px;
  color: var(--success);
  font-size: .94rem;
}
.invite-result-copy p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
  font-size: .72rem;
}
.invite-result-copy small {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: .67rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.invite-result-card .button-row {
  margin-top: 16px;
}
.invite-result-card .button-row .button {
  min-height: 42px;
}

/* Activation and invite landing polish */
.auth-page {
  background:
    radial-gradient(circle at 50% -10%, rgba(4,155,243,.10), transparent 26rem),
    radial-gradient(circle at 100% 0%, rgba(124,77,255,.08), transparent 24rem),
    var(--bg);
}
.activation-card {
  width: min(560px, calc(100% - 28px));
}
.invite-state {
  padding: 20px;
  border-radius: 20px;
}
.invite-state-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.invite-state-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--surface);
  color: var(--brand);
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.notice.success .invite-state-icon {
  color: var(--success);
  background: color-mix(in srgb, var(--success-soft) 82%, var(--surface));
}
.notice.error .invite-state-icon {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger-soft) 84%, var(--surface));
}
.invite-state-body strong {
  display: block;
  font-size: 1.02rem;
  color: var(--text);
}
.invite-state-body p {
  margin: 5px 0 0;
  line-height: 1.65;
  color: var(--muted);
}
.invite-welcome {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.invite-welcome h2 {
  margin: 4px 0 8px;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}
#activate-success .button-row { justify-content: flex-start; }

/* Horarios: recuperar el color de los encabezados como en v32. */
.schedule-day-header {
  position: relative;
  overflow: hidden;
  padding-top: 16px;
}
.schedule-day-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: 11px 11px 0 0;
  background: var(--brand);
}
.schedule-day-column:nth-child(7n+1) .schedule-day-header {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-soft) 90%, var(--surface)), var(--surface)) !important;
  border-color: color-mix(in srgb, var(--brand) 18%, var(--border));
}
.schedule-day-column:nth-child(7n+1) .schedule-day-header::before { background: var(--brand); }
.schedule-day-column:nth-child(7n+2) .schedule-day-header {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-purple-soft) 90%, var(--surface)), var(--surface)) !important;
  border-color: color-mix(in srgb, var(--accent-purple) 18%, var(--border));
}
.schedule-day-column:nth-child(7n+2) .schedule-day-header::before { background: var(--accent-purple); }
.schedule-day-column:nth-child(7n+3) .schedule-day-header {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-teal-soft) 92%, var(--surface)), var(--surface)) !important;
  border-color: color-mix(in srgb, var(--accent-teal) 18%, var(--border));
}
.schedule-day-column:nth-child(7n+3) .schedule-day-header::before { background: var(--accent-teal); }
.schedule-day-column:nth-child(7n+4) .schedule-day-header {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-orange-soft) 90%, var(--surface)), var(--surface)) !important;
  border-color: color-mix(in srgb, var(--accent-orange) 18%, var(--border));
}
.schedule-day-column:nth-child(7n+4) .schedule-day-header::before { background: var(--accent-orange); }
.schedule-day-column:nth-child(7n+5) .schedule-day-header {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-pink-soft) 90%, var(--surface)), var(--surface)) !important;
  border-color: color-mix(in srgb, var(--accent-pink) 18%, var(--border));
}
.schedule-day-column:nth-child(7n+5) .schedule-day-header::before { background: var(--accent-pink); }
.schedule-day-column:nth-child(7n+6) .schedule-day-header {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-soft) 72%, var(--surface)), var(--surface)) !important;
  border-color: color-mix(in srgb, var(--brand) 16%, var(--border));
}
.schedule-day-column:nth-child(7n+6) .schedule-day-header::before { background: var(--brand-strong); }
.schedule-day-column:nth-child(7n+7) .schedule-day-header {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-purple-soft) 74%, var(--surface)), var(--surface)) !important;
  border-color: color-mix(in srgb, var(--accent-purple) 16%, var(--border));
}
.schedule-day-column:nth-child(7n+7) .schedule-day-header::before { background: var(--accent-purple); }
.schedule-day-header strong { font-size: .75rem; }
.schedule-day-header small { color: var(--muted); }
.schedule-item p i { color: var(--brand); }

@media (max-width: 660px) {
  .invite-result-head,
  .invite-state-head { grid-template-columns: 1fr; }
  .invite-result-icon,
  .invite-state-icon { margin-bottom: 2px; }
}


/* === UI refresh 38: spacing entre encabezados y programas en Horarios === */
.schedule-day-header {
  margin-bottom: 14px !important;
  z-index: 1;
}
.schedule-day-slots {
  padding-top: 2px;
}
.schedule-day-slots > .schedule-item:first-child {
  margin-top: 0;
}

/* === UI refresh 39: corrección estructural definitiva de Horarios === */
.schedule-day-column {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  min-width: 220px;
}
.schedule-day-header {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
  flex: 0 0 auto;
  margin: 0 !important;
}
.schedule-day-slots {
  position: relative;
  z-index: 0;
  display: grid !important;
  gap: 12px !important;
  padding: 0 !important;
  margin: 0 !important;
}
.schedule-day-slots > .schedule-item,
.schedule-day-slots > .schedule-empty {
  position: relative;
  z-index: 0;
  margin: 0 !important;
}

/* === UI refresh 40: onboarding / role guide === */
.studio-guide-dialog {
  width: min(980px, calc(100vw - 28px));
  max-width: none;
  max-height: min(86vh, 780px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--text);
  background: transparent;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.studio-guide-dialog::backdrop {
  background: rgba(10, 15, 22, .64);
  backdrop-filter: blur(7px);
}
.studio-guide-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 590px;
  background: var(--surface);
}
.studio-guide-aside {
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 20% 0%, rgba(4,155,243,.18), transparent 15rem),
    linear-gradient(180deg, var(--sidebar-2), var(--sidebar));
  color: var(--sidebar-text);
}
.studio-guide-brand { display: flex; align-items: center; gap: 12px; }
.studio-guide-brand img { width: 62px; height: 42px; object-fit: contain; }
.studio-guide-brand span, .studio-guide-brand strong { display: block; }
.studio-guide-brand span { color: #9ba8b7; font-size: .62rem; text-transform: uppercase; letter-spacing: .14em; }
.studio-guide-brand strong { margin-top: 2px; font-size: .95rem; }
.studio-guide-role { margin: 28px 0 22px; }
.studio-guide-role small { display: block; margin-top: 8px; color: #9ba8b7; font-size: .64rem; }
.studio-guide-progress { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.studio-guide-progress li {
  display: grid;
  grid-template-columns: 28px minmax(0,1fr);
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 12px;
  color: #95a3b2;
  font-size: .68rem;
  transition: .16s ease;
}
.studio-guide-progress li::before {
  content: attr(data-step);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: #aeb8c3;
  font-weight: 700;
}
.studio-guide-progress li.active { color: white; background: rgba(4,155,243,.14); }
.studio-guide-progress li.active::before { background: var(--brand); color: white; }
.studio-guide-progress li.done { color: #c5d0db; }
.studio-guide-progress li.done::before { content: "✓"; color: var(--success); background: rgba(97,213,156,.12); }
.studio-guide-skip {
  margin-top: auto;
  width: 100%;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 11px;
  background: rgba(255,255,255,.03);
  color: #aeb9c6;
  cursor: pointer;
  font-size: .68rem;
}
.studio-guide-skip:hover { color: white; background: rgba(255,255,255,.07); }
.studio-guide-content {
  position: relative;
  padding: clamp(30px, 5vw, 54px);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.studio-guide-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-2);
  cursor: pointer;
}
.studio-guide-close:hover { color: var(--text); border-color: color-mix(in srgb, var(--brand) 28%, var(--border)); }
.studio-guide-visual {
  width: 78px;
  height: 78px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: var(--brand);
  background: linear-gradient(145deg, var(--brand-soft), var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border));
  box-shadow: var(--shadow-sm);
  font-size: 2rem;
}
.studio-guide-content h2 { margin: 7px 0 10px; font-size: clamp(1.65rem, 3vw, 2.35rem); }
.studio-guide-copy { margin: 0; max-width: 650px; color: var(--muted); line-height: 1.75; font-size: .82rem; }
.studio-guide-tips {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}
.studio-guide-tip {
  min-height: 88px;
  padding: 14px;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  gap: 11px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
}
.studio-guide-tip i {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--brand);
  background: var(--brand-soft);
}
.studio-guide-tip strong, .studio-guide-tip small { display: block; }
.studio-guide-tip strong { font-size: .72rem; }
.studio-guide-tip small { margin-top: 3px; line-height: 1.5; font-size: .62rem; }
.studio-guide-footer {
  margin-top: auto;
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.studio-guide-counter { color: var(--muted); font-size: .68rem; }
.guide-launch { margin-top: 6px; }

@media (max-width: 760px) {
  .studio-guide-dialog { width: calc(100vw - 16px); max-height: 92vh; overflow: auto; }
  .studio-guide-shell { grid-template-columns: 1fr; min-height: 0; }
  .studio-guide-aside { padding: 18px; }
  .studio-guide-brand, .studio-guide-role { margin-bottom: 0; }
  .studio-guide-role { margin-top: 14px; }
  .studio-guide-progress { grid-template-columns: repeat(auto-fit,minmax(36px,1fr)); margin-top: 14px; }
  .studio-guide-progress li { display: block; padding: 0; text-align: center; font-size: 0; background: transparent !important; }
  .studio-guide-progress li::before { margin: auto; }
  .studio-guide-skip { display: none; }
  .studio-guide-content { padding: 30px 20px 22px; }
  .studio-guide-tips { grid-template-columns: 1fr; }
  .studio-guide-footer { align-items: stretch; flex-direction: column; }
  .studio-guide-footer .button-row { width: 100%; }
  .studio-guide-footer .button { flex: 1; }
}

/* === Studio UI Refresh 41: live-first operation + unified editors === */

/* La vista En vivo se organiza como una pila estable. Cuando la sesión pertenece
   al perfil de locutor del usuario, el deck sube inmediatamente debajo del título. */
#live-section.active-view {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#live-section > .page-heading { order: 0; }
#live-section > .live-overview-grid { order: 1; }
#live-section > #live-deck { order: 2; }
#live-section.live-self-control > #live-deck { order: 1; }
#live-section.live-self-control > .live-overview-grid { order: 2; }

/* Consola: botones más visibles en luz intensa y estado activo inequívoco. */
#live-deck {
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--border)) !important;
  background:
    radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 20rem),
    var(--surface);
}
#live-deck-buttons {
  gap: 12px;
}
.live-deck-button {
  position: relative;
  min-height: 70px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  background: color-mix(in srgb, var(--surface) 76%, var(--brand-soft) 24%) !important;
  color: var(--text);
  font-weight: 700;
  font-size: .78rem;
  box-shadow:
    0 8px 22px rgba(15, 31, 46, .10),
    inset 0 1px 0 rgba(255,255,255,.55);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}
.live-deck-button:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 68%, var(--border));
  box-shadow:
    0 12px 28px rgba(4,155,243,.20),
    0 0 0 2px color-mix(in srgb, var(--brand) 12%, transparent);
}
.live-deck-button:active {
  transform: translateY(1px) scale(.99);
}
.live-deck-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 38%, transparent);
  outline-offset: 3px;
}
.live-deck-button-active,
.live-deck-button-active:hover {
  color: #fff !important;
  background: linear-gradient(145deg, var(--brand), #0077d4) !important;
  border-color: #8cd8ff !important;
  box-shadow:
    0 12px 34px rgba(4,155,243,.42),
    0 0 0 3px rgba(4,155,243,.22),
    0 0 24px rgba(4,155,243,.30),
    inset 0 1px 0 rgba(255,255,255,.34) !important;
}
.live-deck-button-active::after {
  content: "Activo";
  position: absolute;
  top: 7px;
  right: 8px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: .48rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
html[data-theme="dark"] .live-deck-button {
  box-shadow: 0 8px 24px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.06);
}

/* Evita cualquier superposición de las tarjetas de seguimiento en mobile/tablet. */
@media (max-width: 900px) {
  .live-overview-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100%;
    min-width: 0;
  }
  .live-overview-grid > .surface,
  .live-status-surface,
  .live-activity-panel {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0;
    margin: 0 !important;
    transform: none !important;
  }
  .live-activity-panel .activity-feed,
  .live-activity-panel .activity-feed-item,
  #live-current,
  #live-command-stats {
    min-width: 0;
    max-width: 100%;
  }
  .live-activity-panel .activity-feed-item strong,
  .live-activity-panel .activity-feed-item small {
    overflow-wrap: anywhere;
  }
  #live-section.live-self-control > #live-deck {
    margin-bottom: 16px;
  }
}

@media (max-width: 660px) {
  #live-deck {
    padding: 16px;
  }
  #live-deck-buttons {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 9px;
  }
  .live-deck-button {
    min-height: 66px;
    padding: 12px 10px;
    font-size: .72rem;
  }
  .live-deck-button-active::after {
    top: 5px;
    right: 5px;
    font-size: .43rem;
  }
}

/* Editores: mismo patrón visual que los formularios de alta. */
.unified-editor {
  padding: 0 !important;
  overflow: hidden !important;
  border-left: 1px solid var(--border) !important;
}
.editor-modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 92px;
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(16px);
}
.editor-modal-header h3 { margin: 3px 0 4px; }
.editor-modal-header p:last-child { margin: 0; font-size: .7rem; }
.editor-close-button {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-2);
  cursor: pointer;
}
.editor-close-button:hover {
  color: var(--text);
  background: var(--surface-3);
}
.editor-modal-body {
  max-height: calc(86vh - 92px);
  overflow: auto;
  padding: 22px;
}
.editor-modal-actions {
  position: sticky;
  bottom: -22px;
  margin: 18px -22px -22px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(14px);
}
#program-form > .button-row,
#schedule-form > .button-row {
  margin-top: 4px;
}

@media (max-width: 660px) {
  .editor-modal-header { padding: 17px 16px; }
  .editor-modal-body { padding: 16px; }
  .editor-modal-actions { margin: 16px -16px -16px; padding: 13px 16px; }
}


/* === UI Refresh 42: En vivo operativo / sincronizado === */
.live-session-clock {
  width: 100%;
  min-height: 64px;
  margin: 14px 0 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: .035em;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
}
.live-session-clock.safe { color: var(--success); background: color-mix(in srgb, var(--success-soft) 82%, var(--surface)); }
.live-session-clock.warning { color: #8a5a00; background: #fff1bd; border-color: #e9b842; box-shadow: 0 0 0 4px rgba(233,184,66,.12), 0 12px 28px rgba(233,184,66,.14); }
.live-session-clock.danger { color: #8e2020; background: #ffd8d8; border-color: #ff7777; box-shadow: 0 0 0 5px rgba(255,95,91,.14), 0 14px 34px rgba(255,95,91,.18); animation: liveClockPulse 1.4s ease-in-out infinite; }
.live-session-clock.overtime { color: #fff; background: var(--danger); border-color: var(--danger); box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 22%, transparent), 0 14px 34px rgba(214,69,69,.24); animation: liveClockPulse 1s ease-in-out infinite; }
html[data-theme="dark"] .live-session-clock.warning { color: #ffd77d; background: #473919; border-color: #8b6a20; }
html[data-theme="dark"] .live-session-clock.danger { color: #ffb4b4; background: #482226; border-color: #7d3940; }
@keyframes liveClockPulse { 50% { transform: scale(1.012); filter: brightness(1.08); } }
.live-time-alert {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
}
.live-time-alert.warning { color: #7a5100; background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--border)); }
.live-time-alert.danger, .live-time-alert.overtime { color: var(--danger); background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 32%, var(--border)); }

#live-deck-buttons .live-deck-button {
  position: relative;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--border));
  box-shadow: 0 8px 20px rgba(4,155,243,.10), inset 0 1px rgba(255,255,255,.12);
  font-weight: 700;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, filter .14s ease;
}
#live-deck-buttons .live-deck-button:hover,
#live-deck-buttons .live-deck-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(4,155,243,.14), 0 14px 30px rgba(4,155,243,.20);
  filter: brightness(1.08);
}
#live-deck-buttons .live-deck-button:active { transform: translateY(0) scale(.985); filter: brightness(1.12); }
#live-deck-buttons .live-deck-button-active {
  color: #fff !important;
  background: linear-gradient(135deg, #049bf3, #087ec8) !important;
  border-color: #72caff !important;
  box-shadow: 0 0 0 5px rgba(4,155,243,.22), 0 0 28px rgba(4,155,243,.42), 0 16px 34px rgba(4,155,243,.28) !important;
  filter: brightness(1.12) saturate(1.15);
}
#live-deck-buttons .live-deck-button-active::after {
  content: "ACTIVO";
  position: absolute;
  top: 7px;
  right: 8px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0,0,0,.22);
  font-size: .48rem;
  letter-spacing: .08em;
}

/* Cuando el usuario controla su propia sesión, el deck es la primera herramienta. */
#live-section.live-self-control {
  display: flex;
  flex-direction: column;
}
#live-section.live-self-control > .page-heading { order: 0; }
#live-section.live-self-control > #live-deck { order: 1; }
#live-section.live-self-control > .live-overview-grid { order: 2; }
#live-section.live-self-control > *:not(.page-heading):not(#live-deck):not(.live-overview-grid) { order: 3; }

@media (max-width: 660px) {
  #live-section.live-self-control .page-heading { margin-bottom: 10px; }
  #live-section.live-self-control .page-heading p.muted { display: none; }
  #live-section.live-self-control #live-deck {
    margin-bottom: 12px;
    padding: 14px;
  }
  #live-section.live-self-control #live-deck > .section-heading { display: none; }
  #live-section.live-self-control #live-deck {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  #live-section.live-self-control #live-deck > #live-deck-buttons {
    order: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
  }
  #live-section.live-self-control #live-deck > .activity-current { order: 1; margin: 0; padding: 10px 12px; }
  #live-section.live-self-control #live-deck > .activity-current strong { display: none; }
  #live-section.live-self-control #live-deck > .field-group { order: 2; }
  #live-section.live-self-control #live-deck > #live-deck-message { order: 3; margin: 0; min-height: 0; }
  #live-section.live-self-control #live-deck .field-group label { font-size: .62rem; }
  #live-section.live-self-control #live-deck-buttons .live-deck-button { min-height: 70px; font-size: .82rem; }
  .live-session-clock { position: sticky; top: 76px; z-index: 12; min-height: 58px; margin-top: 8px; backdrop-filter: blur(12px); }
  .live-overview-grid { gap: 12px; }
  .live-activity-panel { min-height: 0; }
  .live-activity-panel .section-heading p.muted { display: none; }
  .live-command-stats { grid-template-columns: 1fr 1fr; }
  .live-command-stat:nth-child(3) { grid-column: 1 / -1; }
}

/* Timer dentro del deck cuando el operador controla su propia sesión. */
#live-section.live-self-control #live-deck > .live-session-clock,
#live-section.live-self-control #live-deck > .live-time-alert {
  grid-column: 1 / -1;
}
@media (max-width: 660px) {
  #live-section.live-self-control #live-deck > .live-session-clock { order: -3; margin: 0 0 2px; top: 72px; }
  #live-section.live-self-control #live-deck > .live-time-alert { order: -2; margin: 0 0 2px; }
  #live-section.live-self-control #live-deck > #live-deck-buttons { order: -1; }
}


/* === Studio UI Refresh 43: live render estable + acción principal arriba === */
.live-primary-action-zone {
  width: 100%;
  margin: 12px 0 4px;
}
.live-primary-action-zone .button:not([hidden]) {
  width: 100%;
  min-height: 62px;
  padding: 14px 20px;
  border-radius: 16px;
  font-size: clamp(.88rem, 1.8vw, 1.08rem);
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(15,31,46,.14);
}
#live-start-button:not([hidden]) {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #0076c9);
  border-color: #68caff;
  box-shadow: 0 0 0 4px rgba(4,155,243,.12), 0 14px 32px rgba(4,155,243,.24);
}
#live-stop-button:not([hidden]) {
  color: #fff;
  background: linear-gradient(135deg, #e54b4b, #ba2828);
  border-color: #ff8d8d;
  box-shadow: 0 0 0 4px rgba(214,69,69,.12), 0 14px 32px rgba(214,69,69,.24);
}
#live-force-stop-button:not([hidden]) { width: 100%; }

/* En sesión propia, contador -> acción principal -> presets. */
#live-section.live-self-control #live-deck > .live-session-clock { order: -4; }
#live-section.live-self-control #live-deck > .live-time-alert { order: -3; }
#live-section.live-self-control #live-deck > .live-primary-action-zone { order: -2; grid-column: 1 / -1; margin: 0 0 2px; }
#live-section.live-self-control #live-deck > #live-deck-buttons { order: -1; }

/* Evita parpadeos visuales durante sincronizaciones silenciosas. */
#live-deck-buttons { contain: layout paint; }
.live-deck-button { backface-visibility: hidden; }

@media (max-width: 660px) {
  #live-section.live-self-control #live-deck > .live-primary-action-zone {
    width: 100%;
  }
  #live-section.live-self-control #live-deck > .live-primary-action-zone .button:not([hidden]) {
    min-height: 60px;
    font-size: .88rem;
  }
}


/* === Studio UI Refresh 44: prioridad de inicio + layout desktop del control en vivo === */
/* Antes de iniciar, la acción principal queda inmediatamente después del estado/horario. */
#live-status-surface > .live-primary-action-zone {
  margin: 16px 0 14px;
}
#live-status-surface > .live-primary-action-zone #live-start-button:not([hidden]) {
  min-height: 72px;
  font-size: clamp(1rem, 2vw, 1.22rem);
}

/* Sesión propia en escritorio: contador y finalización arriba; contexto y mensaje visibles a la izquierda; presets a la derecha. */
@media (min-width: 901px) {
  #live-section.live-self-control #live-deck {
    display: grid;
    grid-template-columns: minmax(310px, .72fr) minmax(0, 1.28fr);
    grid-template-rows: auto auto auto auto auto auto;
    column-gap: 22px;
    row-gap: 14px;
    align-items: start;
  }
  #live-section.live-self-control #live-deck > .live-session-clock {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0;
  }
  #live-section.live-self-control #live-deck > .live-time-alert {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
  }
  #live-section.live-self-control #live-deck > .live-primary-action-zone {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0 0 2px;
  }
  #live-section.live-self-control #live-deck > .section-heading {
    grid-column: 1;
    grid-row: 4;
    margin: 2px 0 0;
  }
  #live-section.live-self-control #live-deck > .activity-current {
    grid-column: 1;
    grid-row: 5;
    margin: 0;
  }
  #live-section.live-self-control #live-deck > .field-group {
    grid-column: 1;
    grid-row: 6;
    margin: 0;
  }
  #live-section.live-self-control #live-deck > #live-deck-message {
    grid-column: 1;
    grid-row: 7;
    margin: 0;
    min-height: 0;
  }
  #live-section.live-self-control #live-deck > #live-deck-buttons {
    grid-column: 2;
    grid-row: 4 / span 4;
    align-self: start;
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 12px;
  }
  #live-section.live-self-control #live-deck-buttons .live-deck-button {
    min-height: 88px;
  }
}

@media (max-width: 900px) {
  #live-status-surface > .live-primary-action-zone #live-start-button:not([hidden]) {
    min-height: 70px;
    font-size: 1rem;
  }
}

@media (max-width: 660px) {
  #live-status-surface > .live-primary-action-zone {
    margin: 12px 0;
  }
  #live-status-surface > .live-primary-action-zone #live-start-button:not([hidden]) {
    min-height: 68px;
    border-radius: 18px;
    font-size: 1rem;
  }
}


/* === UI refresh 45: unificar editor de usuario === */
#access-user-editor.unified-editor {
  border-left: 1px solid var(--border) !important;
}
#access-user-editor .editor-modal-body {
  padding: 22px;
}
#access-user-editor .user-edit-main > .section-heading {
  display: none;
}
@media (max-width: 660px) {
  #access-user-editor .editor-modal-body { padding: 16px; }
}


/* === UI Refresh 46: onboarding sync + dashboard live shortcut === */
.dashboard-live-start {
  margin-top: 8px;
  width: fit-content;
  min-height: 38px;
  padding-inline: 13px;
  font-size: .68rem;
}
@media (max-width: 660px) {
  .dashboard-live-start { width: auto; max-width: 100%; margin-top: 10px; align-self: flex-start; }
}


/* === UI Refresh 47: dashboard live shortcut compacto === */
.dashboard-live-start {
  width: auto !important;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: .66rem;
  align-self: flex-start;
}


/* === UI Refresh 48: dashboard live readiness as compact status === */
.dashboard-live-ready {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: .60rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.dashboard-live-ready + .inline-link { margin-left: 4px; }
.dashboard-live-head .inline-link { margin-left: 0; }
@media (max-width: 660px) {
  .dashboard-live-head { flex-wrap: wrap; }
  .dashboard-live-ready { order: 3; margin-left: auto; }
  .dashboard-live-head .inline-link { margin-left: 0; }
}
