/* ─── RESET & VARIABLES ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@property --banner-h {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}

:root {
  --primary:         #0067d3;
  --primary-light:   rgba(0, 103, 211, 0.08);
  --primary-mid:     rgba(0, 103, 211, 0.22);
  --secondary:       #485e89;
  --ebc-blue:        #0067d3;
  --ebc-blue-light:  rgba(0,103,211,0.08);
  --ebc-blue-mid:    #185FA5;
  --ebc-blue-dark:   #004b99;
  --bg:              #f9f9ff;
  --bg-secondary:    #eef1fa;
  --text:            #181c22;
  --text-secondary:  #414753;
  --text-tertiary:   #727785;
  --border:          rgba(255,255,255,0.5);
  --border-solid:    rgba(0,0,0,0.09);
  --glass:           rgba(255,255,255,0.28);
  --glass-card:      rgba(255,255,255,0.55);
  --glass-intense:   rgba(255,255,255,0.72);
  --blur:            blur(32px) saturate(190%);
  --blur-sm:         blur(16px) saturate(160%);
  --radius-md:       12px;
  --radius-lg:       18px;
  --radius-xl:       24px;
  --radius-2xl:      32px;
  --shadow-card:     0 2px 16px rgba(0,103,211,0.07);
  --shadow-hover:    0 8px 32px rgba(0,103,211,0.15);
  --danger-bg:       rgba(255,235,235,0.9);
  --danger-text:     #b91c1c;
  --danger-border:   rgba(185,28,28,0.25);
  --warning-bg:      rgba(255,251,235,0.9);
  --warning-text:    #92400e;
  --success-bg:      rgba(240,253,244,0.9);
  --success-text:    #166534;
  --sidebar-w:       272px;
  --topbar-h:        66px;
  --banner-h:        0px;
}

html.banner-visible {
  --banner-h: 44px;
}

html, body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: var(--text);
  height: 100%;
  overflow: hidden;
}

html { transition: --banner-h 0.38s cubic-bezier(0.4, 0, 0.2, 1); }

@media (prefers-reduced-motion: reduce) {
  html, .notice-banner { transition: none !important; }
}

body {
  background: radial-gradient(ellipse at 20% 0%, #ffffff 0%, #d8e8ff 40%, #eef2ff 80%, #f4f6ff 100%);
  background-attachment: fixed;
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,103,211,0.2); border-radius: 10px; }

/* ─── NOTICE BANNER ──────────────────────────────────────── */
.notice-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--banner-h);
  z-index: 70;
  background: var(--warning-bg);
  color: var(--warning-text);
  border-bottom: 1px solid rgba(146,64,14,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 44px 0 16px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
html.banner-visible .notice-banner {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.notice-banner i.ti-alert-triangle { font-size: 16px; flex-shrink: 0; }
.notice-banner strong { font-weight: 800; }
.notice-banner-close {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(146,64,14,0.1);
  color: var(--warning-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.notice-banner-close:hover { background: rgba(146,64,14,0.2); }

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 16px;
  top: calc(var(--banner-h) + var(--topbar-h) + 16px);
  bottom: 16px;
  width: calc(var(--sidebar-w) - 32px);
  z-index: 50;
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--radius-2xl);
  box-shadow: 0 8px 32px rgba(0,103,211,0.1), 0 1px 4px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ebc-logo {
  width: 118px;
  height: auto;
  display: block;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 20px 10px 16px;
}
.slabel {
  font-size: 10px;
  font-weight: 700;
  color: rgba(0,103,211,0.5);
  padding: 6px 10px 8px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}
.eje-btn {
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.15s, background 0.15s;
  line-height: 1.3;
}
.eje-btn i { font-size: 17px; flex-shrink: 0; opacity: 0.75; }
.eje-btn span { flex: 1; }
.eje-btn:hover {
  color: var(--primary);
  background: rgba(255,255,255,0.45);
}
.eje-btn:hover i { opacity: 1; }
.eje-btn.active {
  color: var(--primary);
  font-weight: 700;
  background: rgba(0,103,211,0.1);
  box-shadow: inset 0 0 0 1px rgba(0,103,211,0.18);
}
.eje-btn.active i { opacity: 1; }

/* ─── TOPBAR ─────────────────────────────────────────────── */
/* Elemento global (fuera de .app-screen): se muestra en todas las pantallas
   salvo login, sin importar a cuál se cambie — controlado por .visible. */
.topbar {
  display: none;
  position: fixed;
  top: var(--banner-h); right: 0;
  left: 0;
  height: var(--topbar-h);
  z-index: 60;
  background: rgba(255,255,255,0.22);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border-bottom: 1px solid rgba(255,255,255,0.45);
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.topbar.visible { display: flex; }
.topbar-logo {
  display: flex; align-items: center; flex-shrink: 0;
  border: none; background: none; padding: 0; margin: 0;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: opacity 0.15s;
}
.topbar-logo:hover { opacity: 0.75; }
.topbar-logo .ebc-logo { width: 88px; }
.tabs { display: flex; gap: 6px; }
.tab {
  padding: 7px 18px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-tertiary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  padding-bottom: 6px;
}
.tab:hover { color: var(--text-secondary); }
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.avatar-pill {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  border: 1.5px solid rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,103,211,0.12);
  color: var(--primary);
  font-size: 22px;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

/* ─── MAIN WRAPPER ───────────────────────────────────────── */
.main-wrapper {
  position: fixed;
  left: var(--sidebar-w);
  top: calc(var(--topbar-h) + var(--banner-h));
  right: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ─── PANES ──────────────────────────────────────────────── */
.pane { display: none; flex: 1; flex-direction: column; overflow: hidden; min-height: 0; }
.pane.active { display: flex; }

/* ─── SELECTOR LAYOUT ────────────────────────────────────── */
.selector-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ─── CONTENT AREA ───────────────────────────────────────── */
.content {
  flex: 1;
  padding: 28px 24px 24px;
  overflow-y: auto;
  min-width: 0;
}
.eje-hdr { margin-bottom: 22px; }
.eje-hdr h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.eje-hdr p {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.65;
  max-width: 520px;
}

/* ─── CERT SECTIONS ──────────────────────────────────────── */
.cert-sec { margin-bottom: 22px; }
.cert-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  padding: 7px 0 10px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(0,103,211,0.1);
}
.cert-name-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}
.cert-name-wrap::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 3px;
  flex-shrink: 0;
}
.cert-title-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cert-ok {
  font-size: 12px;
  padding: 5px 13px;
  border-radius: 10px;
  background: rgba(22,163,74,0.1);
  color: #15803d;
  font-weight: 700;
  border: 1px solid rgba(22,163,74,0.2);
}
.btn-cert-add {
  font-size: 12px;
  padding: 5px 13px;
  border-radius: 10px;
  background: rgba(0,103,211,0.07);
  color: var(--primary);
  border: 1px solid rgba(0,103,211,0.18);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  display: flex; align-items: center; gap: 3px;
  transition: background 0.15s;
}
.btn-cert-add:hover { background: rgba(0,103,211,0.14); }
.btn-cert-remove {
  font-size: 12px;
  padding: 5px 13px;
  border-radius: 10px;
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  display: flex; align-items: center; gap: 3px;
  transition: background 0.15s;
}
.btn-cert-remove:hover { background: #fee2e2; }

/* ─── CARDS ──────────────────────────────────────────────── */
.mgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mc {
  background: var(--glass-card);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s, background 0.15s;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.mc::after {
  content: '';
  position: absolute;
  top: -24px; right: -24px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(0,103,211,0.04);
  transition: transform 0.4s;
  pointer-events: none;
}
.mc:hover:not(.mc-locked) {
  box-shadow: var(--shadow-hover);
  border-color: rgba(0,103,211,0.28);
  transform: translateY(-2px);
}
.mc:hover:not(.mc-locked)::after { transform: scale(1.5); }
.mc.mc-sel {
  border-color: rgba(0,103,211,0.55);
  background: rgba(0,103,211,0.08);
  box-shadow: 0 4px 20px rgba(0,103,211,0.14);
}
.mc.mc-prop {
  border-color: rgba(124,58,237,0.5);
  background: rgba(124,58,237,0.07);
}
.mc.mc-shared { border-style: dashed; }
.mc.mc-locked { opacity: 0.38; cursor: not-allowed; }
.mc-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 9px;
  color: var(--text);
  transition: color 0.15s;
}
.mc:hover:not(.mc-locked) .mc-name { color: var(--primary); }
.mc-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.055);
}
.mc-code   { font-size: 10px; color: var(--text-tertiary); font-weight: 500; }
.mc-cr     { font-size: 10px; color: var(--text-secondary); margin-left: auto; font-weight: 600; }
.mc-chk       { color: var(--primary); font-size: 14px; }
.mc-prop-icon { color: #7c3aed; font-size: 14px; }
.mc-info      { font-size: 13px; color: var(--text-tertiary); margin-left: auto; opacity: 0.55; }
.mc-stag {
  font-size: 9px;
  background: rgba(255,251,235,0.95);
  color: #92400e;
  border: 1px solid rgba(146,64,14,0.18);
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
}

/* ─── LIMIT BANNER ───────────────────────────────────────── */
.limit-banner {
  background: rgba(0,103,211,0.07);
  border: 1px solid rgba(0,103,211,0.2);
  border-radius: var(--radius-lg);
  padding: 11px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
}
.limit-banner i { font-size: 18px; color: var(--primary); flex-shrink: 0; }
.limit-banner p { font-size: 12px; color: var(--ebc-blue-dark); line-height: 1.4; }

/* ─── RIGHT PANEL ────────────────────────────────────────── */
.right-panel {
  width: 310px;
  flex-shrink: 0;
  padding: 20px 16px 20px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rp-card {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--radius-2xl);
  padding: 22px 20px 18px;
  box-shadow: 0 8px 32px rgba(0,103,211,0.1), 0 1px 4px rgba(0,0,0,0.04);
}
.rp-header { margin-bottom: 16px; }
.rp-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}
.rp-sub { font-size: 12px; color: var(--text-tertiary); }

/* Circles */
.rp-circles {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
  background: rgba(255,255,255,0.38);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 20px;
  padding: 16px 12px;
  margin-bottom: 16px;
}
.rp-circle-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.rp-circle-ring {
  position: relative;
  width: 96px;
  height: 96px;
}
.rp-svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}
.rp-track { stroke: rgba(0,103,211,0.1); }
.rp-track-sec { stroke: rgba(72,94,137,0.1); }
.rp-ring {
  transition: stroke-dashoffset 0.7s cubic-bezier(.4,0,.2,1);
}
.rp-ring-mat  { stroke: var(--primary); filter: drop-shadow(0 0 6px rgba(0,103,211,0.35)); }
.rp-ring-cred { stroke: var(--secondary); filter: drop-shadow(0 0 6px rgba(72,94,137,0.35)); }
.rp-ring-inner {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.rp-count {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.rp-count-mat  { color: var(--primary); }
.rp-count-cred { color: var(--secondary); }
.rp-circle-info { display: flex; flex-direction: column; align-items: center; }
.rp-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.rp-label-mat  { color: rgba(0,103,211,0.65); }
.rp-label-cred { color: rgba(72,94,137,0.65); }

/* Right panel footer */
.rp-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-confirm {
  width: 100%;
  padding: 13px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 6px 24px rgba(0,103,211,0.32);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn-confirm:hover {
  background: #0054b3;
  box-shadow: 0 8px 28px rgba(0,103,211,0.42);
}
.btn-confirm:active { transform: scale(0.98); }
.btn-rp-clear {
  width: 100%;
  padding: 9px 16px;
  background: rgba(255,255,255,0.5);
  color: var(--text-secondary);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.15s;
}
.btn-rp-clear:hover { background: rgba(255,255,255,0.75); }

/* Advisory card */
.advisory-card {
  background: linear-gradient(135deg, rgba(0,103,211,0.11) 0%, rgba(72,94,137,0.07) 100%);
  border: 1px solid rgba(0,103,211,0.18);
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}
.advisory-card::after {
  content: '\ea61'; /* ti-school-like decoration */
  font-family: 'tabler-icons';
  position: absolute;
  right: -12px; bottom: -14px;
  font-size: 72px;
  color: rgba(0,103,211,0.05);
  pointer-events: none;
}
.advisory-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 7px;
  display: flex; align-items: center; gap: 7px;
}
.advisory-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 13px;
}
.btn-advisory {
  padding: 7px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,103,211,0.28);
  transition: background 0.15s;
}
.btn-advisory:hover { background: #0054b3; }

/* ─── GLOBAL BUTTONS ─────────────────────────────────────── */
.btn-primary {
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background 0.15s;
}
.btn-primary:hover { background: #0054b3; }
.btn-secondary {
  padding: 8px 14px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
  transition: background 0.15s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.75); }

/* ─── BOTTOMBAR ──────────────────────────────────────────── */
.bottombar {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 12px 20px;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-bg.open { display: flex; }
.modal {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--radius-2xl);
  width: 540px;
  max-width: 95vw;
  box-shadow: 0 24px 64px rgba(0,103,211,0.16), 0 2px 8px rgba(0,0,0,0.06);
}
.modal-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex; align-items: flex-start; gap: 12px;
}
.modal-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  background: rgba(0,103,211,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.modal-icon i { font-size: 19px; color: var(--primary); }
.modal-title-wrap { flex: 1; min-width: 0; }
.btn-print { margin-left: auto; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.06);
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  align-self: flex-start;
}
.modal-close:hover { background: rgba(0,0,0,0.12); color: var(--text); }
.modal-title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.modal-code  { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.modal-body  { padding: 18px 22px; overflow-y: auto; max-height: 68vh; }
.modal-row   { display: flex; gap: 20px; margin-bottom: 14px; }
.modal-slabel {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  color: var(--text-tertiary);
  margin-bottom: 3px;
}
.modal-desc {
  font-size: 13px;
  color: var(--text);
  line-height: 1.65;
}
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex; gap: 8px; justify-content: flex-end;
  align-items: center; flex-wrap: wrap;
}
.btn-add {
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: background 0.15s;
}
.btn-add:hover { background: #0054b3; }
.btn-proposed {
  padding: 8px 14px;
  background: rgba(109,40,217,0.08);
  color: #6d28d9;
  border: 1px solid rgba(109,40,217,0.2);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: background 0.15s;
}
.btn-proposed:hover { background: rgba(109,40,217,0.14); }
.btn-remove {
  padding: 8px 14px;
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
}
.btn-cancel {
  padding: 8px 14px;
  background: none;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-secondary);
}

/* ─── PLAN COMPLETO MODAL ────────────────────────────────── */
#complete-modal-bg .modal {
  animation: completeModalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes completeModalIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.complete-modal {
  position: relative;
  width: 420px;
  padding: 36px 30px 28px;
  text-align: center;
  overflow: hidden;
}
.complete-modal .modal-close { position: absolute; top: 14px; right: 14px; }
.complete-icon-wrap {
  width: 84px; height: 84px;
  margin: 0 auto 14px;
}
.complete-icon-svg { width: 100%; height: 100%; }
.ci-bg {
  fill: var(--success-bg);
  opacity: 0;
  transform-origin: 36px 36px;
  animation: ciBgPop 0.4s ease forwards;
}
.ci-box {
  fill: none;
  stroke: var(--success-text);
  stroke-width: 2.5;
  opacity: 0;
  transform-origin: center;
  animation: ciPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: var(--d);
}
.ci-check {
  fill: none;
  stroke: var(--success-text);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: ciDraw 0.3s ease forwards;
  animation-delay: calc(var(--d) + 0.18s);
}
.ci-line {
  fill: var(--success-text);
  opacity: 0;
  animation: ciFade 0.3s ease forwards;
  animation-delay: calc(var(--d) + 0.1s);
}
@keyframes ciBgPop {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes ciPop {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes ciDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes ciFade {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 0.35; transform: translateX(0); }
}
.complete-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.complete-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}
.complete-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid rgba(146,64,14,0.18);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  margin-bottom: 20px;
}
.complete-warning i { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.complete-actions { display: flex; justify-content: center; }
.complete-actions .btn-add { padding: 10px 22px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  #complete-modal-bg .modal,
  .ci-bg, .ci-box, .ci-check, .ci-line {
    animation: none !important;
    stroke-dashoffset: 0 !important;
    transform: none !important;
  }
  .ci-bg, .ci-box, .ci-check { opacity: 1 !important; }
  .ci-line { opacity: 0.35 !important; }
}

/* ─── TOAST ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,84,179,0.92);
  backdrop-filter: blur(16px);
  color: #fff;
  padding: 11px 22px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  z-index: 300;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(0,84,179,0.35);
}
.toast.show { opacity: 1; }

/* ─── MODAL PREREQ ───────────────────────────────────────── */
.modal-prereq {
  display: flex; align-items: flex-start; gap: 8px;
  border-radius: 10px; padding: 9px 12px;
  margin-top: 8px; font-size: 12px; line-height: 1.45;
}
.modal-prereq i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.prereq-warn  { background: rgba(255,248,225,0.95); border: 1px solid rgba(249,168,37,0.5); color: #5d4037; }
.prereq-warn i { color: #f9a825; }
.prereq-ok    { background: rgba(232,245,233,0.95); border: 1px solid rgba(67,160,71,0.4); color: #1b5e20; }
.prereq-ok i  { color: #43a047; }
.prereq-label { font-weight: 700; margin-right: 3px; }
.prereq-name  { margin-right: 4px; }
.prereq-code  { opacity: 0.55; font-size: 10.5px; }

/* ─── MODAL TEMAS ────────────────────────────────────────── */
.modal-temas { margin-top: 12px; }
.temas-list  { margin: 6px 0 0; padding-left: 18px; list-style: decimal; }
.temas-list li {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.65;
  padding: 1px 0;
}

/* ─── CARD PROP STYLES ───────────────────────────────────── */
.mc.mc-prop { border-color: rgba(124,58,237,0.5); background: rgba(124,58,237,0.07); }
.mc-prop-icon { color: #7c3aed; font-size: 14px; }
.prop-cell { text-align: center; }
.prop-check { color: #7c3aed; font-size: 14px; }

/* ─── MÁS INFORMACIÓN ───────────────────────────────────── */
.info-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px 32px;
}
.info-content {
  max-width: 860px;
  margin: 0 auto;
}
.info-heading {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Video principal */
.video-main-wrap {
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow: 0 8px 32px rgba(0,103,211,0.14);
  background: #000;
}
.video-main-wrap video {
  width: 100%;
  height: auto;
  display: block;
}

/* Thumbnail fallback (shorts) */
.video-thumb-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s, opacity 0.3s;
}
.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
  transition: transform 0.2s;
}
.video-watch-label {
  position: absolute;
  bottom: 14px; right: 16px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

/* Webinar card */
.webinar-card {
  background: var(--glass-card);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: var(--radius-2xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.webinar-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.webinar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,103,211,0.1);
  color: var(--primary);
  border: 1px solid rgba(0,103,211,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
}
.webinar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.webinar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}
.webinar-meta i { color: var(--primary); font-size: 17px; }
.btn-zoom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0,103,211,0.3);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  width: fit-content;
  margin-top: 4px;
}
.btn-zoom:hover {
  background: #0054b3;
  box-shadow: 0 8px 24px rgba(0,103,211,0.4);
  transform: translateY(-1px);
}

/* Video webinar */
.webinar-short-wrap {
  width: 220px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  background: #000;
}
.webinar-short-wrap video {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── DOC / RESUMEN ──────────────────────────────────────── */
.plan-save-bar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 24px;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 12.5px;
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.plan-save-bar i { font-size: 15px; }

.doc-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-secondary);
  min-height: 0;
}
.doc {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
}
.incomplete-note {
  background: var(--warning-bg);
  border: 1px solid rgba(251,191,36,0.5);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  margin-bottom: 14px;
  font-size: 11px;
  color: var(--warning-text);
  display: flex; gap: 8px; align-items: center;
}
.doc-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.doc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ebc-blue);
  margin-bottom: 4px;
}
.doc-logo-badge {
  background: var(--ebc-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
.df-editable { color: #111; }
.df-select {
  width: 100%;
  height: 100%;
  padding: 4px 9px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #111;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 26px;
}
.df-select:focus { outline: none; background-color: rgba(0,103,211,0.04); }
.df-select option[value=""] { color: #aaa; }
.df-editable:empty::before {
  content: attr(data-placeholder);
  color: rgba(0,103,211,0.35);
  font-weight: 400;
  font-style: italic;
  pointer-events: none;
}
.df-editable:focus {
  outline: none;
  background: rgba(0,103,211,0.04);
  border-radius: 3px;
}
.sign-editable {
  cursor: text;
  min-width: 80px;
  display: block;
}
.sign-editable:empty::before {
  content: attr(data-placeholder);
  color: #aaa;
  font-style: italic;
  font-weight: 400;
}
.sign-editable:focus { outline: none; }

.doc-intro {
  font-size: 10px;
  color: #333;
  line-height: 1.55;
  margin-bottom: 12px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
}
.doc-intro strong { font-weight: 600; }
.doc-fields { border: 1px solid #ccc; font-size: 11px; margin-bottom: 8px; }
.df-row { display: flex; border-bottom: 1px solid #ccc; }
.df-row:last-child { border-bottom: none; }
.df-label-cell {
  background: var(--ebc-blue); color: #fff; font-weight: 600;
  padding: 4px 9px; white-space: nowrap;
  display: flex; align-items: center;
}
.df-val-cell {
  padding: 4px 9px; color: var(--ebc-blue); font-weight: 600;
  flex: 1; border-left: 1px solid #ccc;
  display: flex; align-items: center;
}
.sign-row {
  display: flex; gap: 20px; margin: 8px 0 12px;
  font-size: 10px; color: #333;
}
.sign-field { flex: 1; }
.sign-line {
  display: block; border-bottom: 1px solid #888;
  min-height: 16px; margin-bottom: 2px;
  font-size: 10px; color: var(--text);
}
.doc-subtitle      { text-align: center; font-size: 11px; color: #333; margin-bottom: 4px; }
.doc-table-title   { text-align: center; font-size: 15px; font-weight: 700; color: var(--ebc-blue); margin-bottom: 9px; }
table.plan-tbl { width: 100%; border-collapse: collapse; font-size: 10px; }
table.plan-tbl th {
  background: var(--ebc-blue); color: #fff;
  padding: 4px 5px; text-align: center;
  font-weight: 600; border: 1px solid var(--ebc-blue);
}
table.plan-tbl td {
  padding: 3px 5px; border: 1px solid #ccc;
  color: #222; vertical-align: middle;
}
table.plan-tbl tr:nth-child(even) td { background: #fff5f5; }
table.plan-tbl tr:nth-child(odd)  td { background: #fff; }
table.plan-tbl td.num       { text-align: center; color: #666; width: 22px; }
table.plan-tbl td.cred-cell { text-align: center; color: var(--ebc-blue); font-weight: 600; }
table.plan-tbl td.empty     { background: #ffe8e8 !important; }
table.plan-tbl td.prop-cell { text-align: center; }
.prop-check { color: #7c3aed; font-size: 14px; }
.tbl-footer {
  display: flex; justify-content: flex-end;
  margin-top: 7px; font-size: 12px;
  gap: 10px; align-items: center;
}
.tbl-total { font-size: 13px; font-weight: 700; color: var(--ebc-blue); }
.certs-earned {
  margin-top: 16px;
  border: 1px solid var(--ebc-blue);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.certs-earned-title {
  background: var(--ebc-blue); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 6px 12px;
  display: flex; align-items: center; gap: 6px;
  letter-spacing: 0.3px;
}
.certs-earned-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.certs-earned-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 12px;
  border-right: 0.5px solid rgba(0,0,0,0.1);
  border-bottom: 0.5px solid rgba(0,0,0,0.1);
}
.certs-earned-check { color: var(--ebc-blue); font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.certs-earned-name  { font-size: 11px; font-weight: 600; color: var(--text); line-height: 1.3; }
.certs-earned-eje   { font-size: 10px; color: var(--text-tertiary); margin-top: 1px; }

/* ─── PRINT ──────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .bottombar, .toast, .modal-bg, .notice-banner,
  .incomplete-note, .btn-print, .right-panel, .plan-save-bar { display: none !important; }
  .main-wrapper {
    position: static;
    left: auto; top: auto; right: auto; bottom: auto;
    height: auto; overflow: visible;
  }
  .pane { display: none !important; height: auto; overflow: visible; }
  #pane-resumen { display: flex !important; }
  .doc-wrap { padding: 0; background: #fff; overflow: visible; }
  .doc { border: none; box-shadow: none; border-radius: 0; }
  body { background: #fff; overflow: visible; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --sidebar-w: 220px; }
  .right-panel { width: 260px; }
  .mgrid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .sidebar { transform: translateX(-100%); }
  :root { --sidebar-w: 0px; }
  .right-panel { display: none; }
  .mgrid { grid-template-columns: 1fr 1fr; }
}

/* ─── PANTALLAS DE APP (auth / mis planes / planificador) ──── */
.app-screen { display: none; }
#screen-planner.active { display: block; }

/* ─── PANTALLA DE CARGA ──────────────────────────────────── */
.loading-screen {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}
.loading-screen.active { display: flex; }
.loading-ring-wrap {
  position: relative;
  width: 140px; height: 140px;
  display: flex; align-items: center; justify-content: center;
}
.loading-ring {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transform-origin: center;
  animation: loadingRingSpin 1.1s linear infinite;
}
.loading-ring-track { stroke: rgba(0,103,211,0.12); }
.loading-ring-progress {
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-dasharray: 90 236.8; /* circunferencia r=52 ≈ 326.7 */
}
@keyframes loadingRingSpin {
  to { transform: rotate(360deg); }
}
.loading-logo { width: 60px; height: auto; }
@media (prefers-reduced-motion: reduce) {
  .loading-ring { animation-duration: 2.4s; }
}

/* ─── AUTENTICACIÓN ──────────────────────────────────────── */
.auth-screen {
  position: relative;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}
.auth-screen.active { display: flex; }

/* Fondo animado: partículas muy tenues flotando despacio detrás de la
   tarjeta de login, generadas en js/auth.js. Cada una son dos divs anidados:
   .auth-particle-wrap (posición base + empuje del cursor) y adentro
   .auth-particle (deriva ambiental) — así los dos movimientos no se pisan. */
.auth-bg {
  position: absolute;
  inset: -60px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.auth-particle-wrap {
  position: absolute;
  will-change: transform;
}
.auth-particle {
  position: absolute;
  left: 0; top: 0;
  border-radius: 50%;
  animation-name: authParticleFloat;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  will-change: transform;
}
@keyframes authParticleFloat {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(var(--dx, 20px), var(--dy, -80px)); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-particle { animation: none !important; }
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 380px;
  max-width: 100%;
  background: var(--glass-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-hover);
  padding: 32px 28px 26px;
  text-align: center;
}
.auth-logo {
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.auth-logo .ebc-logo { width: 128px; height: auto; }
.auth-app-title { font-size: 18px; font-weight: 800; color: var(--text); }
.auth-app-sub { font-size: 12px; color: var(--text-tertiary); margin-bottom: 20px; }

.auth-error {
  display: none;
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 12px;
  text-align: left;
  margin-bottom: 14px;
}
.auth-error.show { display: block; }

.auth-view { display: none; flex-direction: column; gap: 12px; text-align: left; }
.auth-view.active { display: flex; }

.auth-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.modal-body .auth-field { margin-bottom: 14px; }
.auth-field input, .auth-field select {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-solid);
  background: rgba(255,255,255,0.6);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-field input:focus, .auth-field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.auth-field select:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-hint { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin: 0 0 2px; }

.auth-submit {
  margin-top: 4px;
  padding: 11px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.15s, opacity 0.15s;
}
.auth-submit:hover { background: #0054b3; }
.auth-submit:disabled { opacity: 0.6; cursor: default; }

.auth-links {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 11.5px;
}
.auth-links a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }

/* ─── MIS PLANES ─────────────────────────────────────────── */
.plans-screen {
  height: 100vh;
  padding: calc(var(--banner-h) + var(--topbar-h) + 40px) 24px 40px;
  overflow-y: auto;
}
.plans-screen.active { display: block; }
.plans-wrap { max-width: 980px; margin: 0 auto; }
.plans-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 24px;
}
.plans-title { font-size: 22px; font-weight: 800; color: var(--text); }
.plans-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }

.plans-error {
  display: none;
  background: var(--danger-bg); color: var(--danger-text);
  border: 1px solid var(--danger-border); border-radius: var(--radius-md);
  padding: 10px 14px; font-size: 12px; margin-bottom: 16px;
}
.plans-error.show { display: block; }

/* ─── INDICADOR DE GUARDADO + MENÚ DE CUENTA ────────────────── */
.admin-editing-pill {
  align-items: center; gap: 8px;
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid rgba(146,64,14,0.25);
  border-radius: 999px;
  padding: 6px 8px 6px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.admin-editing-pill i.ti-user-edit { font-size: 15px; flex-shrink: 0; }
.admin-editing-pill strong { font-weight: 800; }
.admin-editing-pill button {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(146,64,14,0.12);
  color: var(--warning-text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 11px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.admin-editing-pill button:hover { background: rgba(146,64,14,0.22); }

.save-status {
  font-size: 11px; font-weight: 600; color: var(--text-tertiary);
  display: flex; align-items: center; gap: 4px; min-width: 70px;
}
.save-status.saving { color: var(--primary); }
.save-status.saved { color: #166534; }
.save-status.error { color: var(--danger-text); }

.account-dropdown { position: relative; }
.account-menu {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 250px;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  padding: 8px;
  z-index: 90;
}
.account-menu.open { display: block; }
.account-menu-email {
  font-size: 12.5px; color: var(--text-tertiary);
  padding: 8px 10px 12px; border-bottom: 1px solid rgba(0,0,0,0.08); margin-bottom: 6px;
  word-break: break-all;
}
.account-menu-item {
  width: 100%; text-align: left;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: var(--radius-md);
  border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--text);
}
.account-menu-item i { font-size: 16px; color: var(--text-tertiary); flex-shrink: 0; }
.account-menu-item:hover { background: rgba(0,103,211,0.08); }
.account-menu-item:hover i { color: var(--primary); }

/* ─── ADMINISTRACIÓN ─────────────────────────────────────── */
.admin-new-user-form {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  background: var(--glass-card);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}
.admin-new-user-form .auth-field { flex: 1; min-width: 180px; margin: 0; }
.admin-new-user-form .btn-add { flex-shrink: 0; }

.admin-search {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
}
.admin-search i { font-size: 16px; color: var(--text-tertiary); flex-shrink: 0; }
.admin-search input {
  flex: 1;
  border: none; outline: none; background: none;
  font-family: inherit; font-size: 13px; color: var(--text);
}
.admin-search input::-webkit-search-cancel-button { cursor: pointer; }

.admin-table-wrap {
  overflow-x: auto;
  background: var(--glass-card);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.admin-table th {
  text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-tertiary);
  padding: 12px 14px; border-bottom: 1px solid rgba(0,0,0,0.08);
}
.admin-table td { padding: 11px 14px; border-bottom: 1px solid rgba(0,0,0,0.05); color: var(--text); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table-actions { display: flex; gap: 6px; }
.admin-table .btn-remove, .admin-table .btn-edit, .admin-table .btn-add { padding: 6px 10px; font-size: 11px; }
.admin-table-empty { text-align: center; color: var(--text-tertiary); padding: 24px !important; }

.btn-edit {
  padding: 8px 14px;
  background: rgba(0,103,211,0.08);
  color: var(--primary);
  border: 1px solid rgba(0,103,211,0.25);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: background 0.15s;
}
.btn-edit:hover { background: rgba(0,103,211,0.14); }

.role-badge {
  display: inline-block; padding: 3px 9px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
}
.role-badge-admin { background: rgba(0,103,211,0.12); color: var(--primary); }
.role-badge-user  { background: rgba(0,0,0,0.06); color: var(--text-secondary); }

.admin-edit-self-note {
  font-size: 11.5px; color: var(--text-tertiary); line-height: 1.5;
  background: rgba(0,0,0,0.04); border-radius: var(--radius-md);
  padding: 8px 10px; margin-top: -4px;
}
