:root {
  --blue: #245de8;
  --navy: #193977;
  --ink: #18283f;
  --muted: #718299;
  --bg: #f4f7fc;
  --surface: #fff;
  --line: #e2e8f1;
  --shadow: 0 8px 30px #15355e09;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  font:
    14px/1.5 system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  color: var(--ink);
}
body.dark {
  --ink: #e6eefc;
  --muted: #a6b5cc;
  --bg: #0e1929;
  --surface: #16263c;
  --line: #2b3c55;
  --navy: #a8c7ff;
  --shadow: 0 8px 30px #0002;
}
a {
  color: var(--blue);
  text-decoration: none;
}
h1 {
  font-size: 29px;
  color: var(--navy);
  margin: 5px 0 7px;
  letter-spacing: -1px;
}
h2 {
  font-size: 20px;
  margin: 0 0 15px;
}
small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}
p {
  color: var(--muted);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.primary {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  background: var(--blue);
  color: white;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.danger {
  background: #b73340;
}
.success {
  background: #059b77;
}
a.ghost,
a.primary {
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
}
.ghost:not(.danger),
.top-actions .ghost {
  background: linear-gradient(135deg, #ffffffcc, #ffffff73);
  border: 1px solid #ffffffb3;
  outline: 1px solid #245de826;
  outline-offset: -1px;
  color: var(--navy);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    0 6px 18px #15355e1a,
    inset 0 1px 0 #ffffffe6;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    outline-color 0.2s ease;
}
body.dark .ghost:not(.danger),
body.dark .top-actions .ghost {
  background: linear-gradient(135deg, #ffffff1f, #ffffff0a);
  border: 1px solid #ffffff26;
  outline-color: #a8c7ff2e;
  color: var(--ink);
  box-shadow:
    0 6px 20px #0006,
    inset 0 1px 0 #ffffff26;
}
.ghost:not(.danger):hover,
.top-actions .ghost:hover {
  transform: translateY(-2px);
  outline-color: #245de880;
  box-shadow:
    0 10px 26px #245de833,
    inset 0 1px 0 #ffffffe6;
  filter: none;
}
.ghost:not(.danger):active {
  transform: translateY(0);
}
.top-actions a.ghost {
  padding: 10px 16px;
  font-size: 13px;
}
.vcard-actions .primary,
.vm-actions .primary,
.vcard-actions button.primary {
  background: linear-gradient(135deg, #3b74ff, #1b46c2);
  box-shadow:
    0 8px 20px #245de84d,
    inset 0 1px 0 #ffffff59;
  border: 1px solid #ffffff40;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.vcard-actions .primary:hover,
.vm-actions .primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 28px #245de873,
    inset 0 1px 0 #ffffff59;
  filter: none;
}
.vcard-actions {
  align-items: center;
}
.primary:hover,
button:hover {
  filter: brightness(0.95);
}
input,
select,
textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  color: var(--ink);
  width: 100%;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #245de819;
}
textarea {
  min-height: 88px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 15px;
}
label input,
label select,
label textarea {
  margin-top: 6px;
}
input[type="checkbox"] {
  width: auto;
}
.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.sidebar {
  width: 248px;
  background: var(--surface);
  position: fixed;
  top: 0;
  bottom: 0;
  padding: 27px 15px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-weight: 800;
}
.brandmark {
  width: 48px;
  height: 48px;
  background: var(--blue);
  color: #fff;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 8px 20px #245de829;
}
.brand small {
  display: block;
  font-size: 8px;
  margin-top: 3px;
}
nav {
  margin: 32px 0 auto;
}
nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 12px;
  border-radius: 12px;
  color: var(--muted);
  margin: 5px 0;
}
nav a.active {
  background: #eaf1ff;
  color: var(--blue);
  font-weight: 700;
}
nav a > span:first-child {
  font-size: 20px;
  width: 22px;
}
.public-link {
  padding: 16px;
}
.workspace {
  margin-left: 248px;
}
.topbar {
  height: 88px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar strong {
  display: block;
}
.top-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}
main {
  padding: 30px 35px;
  max-width: 1700px;
  margin: auto;
}
.pageheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.pageheading p {
  margin: 0;
}
.pill {
  font-size: 11px;
  font-weight: 650;
  display: inline-flex;
  border-radius: 8px;
  padding: 5px 9px;
  gap: 5px;
}
.blue {
  color: #2355a4;
  background: #ecf3ff;
}
.green {
  color: #04774e;
  background: #dcfce9;
}
.yellow {
  color: #996600;
  background: #fff3c7;
}
.red {
  color: #b52839;
  background: #ffe5e9;
}
.gray {
  color: #697387;
  background: #edf0f5;
}
.toolbar,
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar {
  margin-bottom: 20px;
}
.toolbar select {
  width: 180px;
}
.toolbar input {
  max-width: 250px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
  gap: 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.stat {
  padding: 20px;
}
.stat b {
  display: block;
  font-size: 28px;
  color: var(--navy);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.course-name {
  font-size: 18px;
  font-weight: 750;
  color: var(--navy);
}
.card p {
  margin: 7px 0;
}
.countbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 19px 0;
  background: var(--bg);
  padding: 13px;
  border-radius: 15px;
}
.countbox b {
  font-size: 26px;
}
.countbox button {
  padding: 7px 13px;
  font-size: 20px;
}
.progress {
  height: 5px;
  background: var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.bar {
  height: 5px;
  background: var(--blue);
}
.tablewrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
}
th {
  background: var(--bg);
  color: var(--muted);
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 18px;
}
td {
  border-top: 1px solid var(--line);
  padding: 16px;
  font-size: 13px;
}
td small {
  display: block;
  letter-spacing: 0;
}
td button {
  padding: 7px 12px;
  font-size: 11px;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 18px;
}
.wide {
  grid-column: 1/-1;
}
.formgrid .two {
  grid-column: span 2;
}
.row-editor {
  margin-bottom: 20px;
}
.row-editor header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}
.schedule-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.schedule-row select {
  width: 150px;
}
.schedule-row input {
  width: 130px;
}
.schedule-row button {
  padding: 5px 10px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  width: min(920px, 94vw);
  max-height: 90vh;
  padding: 28px;
}
.vgroups {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.vg-row {
  display: grid;
  grid-template-columns: 170px 1fr 260px;
  gap: 10px;
}
.vg-box {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.vg-box small {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vg-box b {
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vg-count {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  border-width: 1px;
}
.vg-count b {
  font-size: 20px;
}
.vg-count em {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}
.vg-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: none;
}
.vg-green {
  border-color: #16a36a;
  background: #16a36a14;
}
.vg-green .vg-dot {
  background: #16a36a;
  box-shadow: 0 0 0 5px #16a36a33;
}
.vg-green em {
  color: #04774e;
}
.vg-yellow {
  border-color: #e0a100;
  background: #e0a10014;
}
.vg-yellow .vg-dot {
  background: #e0a100;
  box-shadow: 0 0 0 5px #e0a10033;
}
.vg-yellow em {
  color: #996600;
}
.vg-red {
  border-color: #d92d20;
  background: #d92d2014;
}
.vg-red .vg-dot {
  background: #d92d20;
  box-shadow: 0 0 0 5px #d92d2033;
}
.vg-red em {
  color: #b42318;
}
.vg-empty {
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 800px) {
  .vg-row {
    grid-template-columns: 1fr;
  }
}
.vtabs {

  display: flex;
  gap: 6px;
  margin: 20px 0 16px;
  border-bottom: 1px solid var(--line);
}
.vtab {
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 12px 18px;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  transition: color 0.2s, background 0.2s;
}
.vtab:hover {
  background: var(--bg);
  color: var(--ink);
}
.vtab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.vcount {
  background: var(--bg);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 11px;
  margin-left: 6px;
}
.vcards {
  display: grid;
  gap: 12px;
}
.vcard {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 18px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}
.vcard:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
}
.vcard-no {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  background: var(--bg);
  border-radius: 14px;
  padding: 12px 0;
}
.vcard-no small {
  font-size: 10px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vcard-top {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.vcard-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.vcard-reason {
  margin-top: 6px;
  font-size: 13px;
}
.vcard-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.vempty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 16px;
}
.vempty b {
  color: var(--ink);
}
.varch-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.varch-head h2 {
  margin: 0;
}
.varch-head p {
  margin: 4px 0 0;
  color: var(--muted);
}
.varch-head input {
  min-width: 280px;
}
.vm-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.vm-head small {
  color: var(--blue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vm-head h2 {
  margin: 2px 0;
}
.vm-head p,
.vm-reason {
  margin: 0;
  color: var(--muted);
}
.vm-reason {
  margin-top: 10px;
}
.vm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.vm-stats div {
  background: var(--bg);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}
.vm-stats b {
  font-size: 24px;
  color: var(--navy);
}
.vm-stats small {
  color: var(--muted);
}
.vm-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.vgroup {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}
.vgroup > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 650;
  background: var(--bg);
}
.vdiff {
  width: 100%;
  border-collapse: collapse;
}
.vdiff th,
.vdiff td {
  text-align: left;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.vold {
  color: #b42318;
  text-decoration: line-through;
  text-decoration-color: #b4231855;
}
.vnewv {
  color: #04774e;
  font-weight: 650;
}
.vnew {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  padding: 14px 16px;
}
.vnew div {
  display: flex;
  flex-direction: column;
}
.vnew small {
  color: var(--muted);
}
.vtimeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 18px;
  border-left: 2px solid var(--line);
}
.vtimeline li {
  display: flex;
  flex-direction: column;
  padding: 0 0 14px 12px;
  position: relative;
}
.vtimeline li::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}
.vtimeline span,
.vtimeline em {
  color: var(--muted);
  font-size: 12px;
}
.vdecide {
  background: var(--bg);
  border-radius: 14px;
  padding: 4px 18px 10px;
  margin-top: 14px;
}
.vtech {
  margin-top: 16px;
}
.vtech summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 700px) {
  .vcard {
    grid-template-columns: 1fr;
  }
  .vm-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .varch-head input {
    min-width: 0;
    width: 100%;
  }
}
dialog::backdrop {

  background: #102033aa;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--bg);
  padding: 15px;
  border-radius: 12px;
  font-size: 12px;
}
.notice {
  border-left: 3px solid var(--blue);
  padding: 12px 16px;
  color: var(--muted);
  background: var(--surface);
  margin-bottom: 20px;
}
.calgrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.day {
  background: var(--surface);
  min-height: 125px;
  padding: 10px;
}
.day.dim {
  opacity: 0.45;
}
.daynum {
  display: block;
  color: var(--muted);
  margin-bottom: 7px;
}
.cal-event {
  display: block;
  background: #edf3ff;
  color: #2355a4;
  border: 0;
  padding: 6px;
  font-size: 10px;
  border-radius: 6px;
  margin-bottom: 5px;
  text-align: left;
  width: 100%;
  overflow: hidden;
}
.calhead {
  min-height: auto;
  padding: 10px;
  background: var(--bg);
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}
.yeargrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.monthbox {
  min-height: 150px;
}
.monthbox button {
  margin-top: 8px;
}
.login {
  max-width: 530px;
  margin: 6vh auto;
  text-align: center;
}
.login .brandmark {
  margin: auto;
}
.login form {
  text-align: left;
  margin-top: 28px;
}
.login button {
  width: 100%;
  margin-bottom: 15px;
}
.login a {
  display: block;
  text-align: center;
}
footer {
  padding: 24px 35px;
  font-size: 11px;
  color: var(--muted);
}
#toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  max-width: 440px;
  background: #173a6b;
  color: white;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 25px #0003;
  display: none;
  z-index: 5;
}
body.collapsed .sidebar {
  width: 82px;
}
body.collapsed .navtext {
  display: none;
}
body.collapsed .workspace {
  margin-left: 82px;
}
.public-workspace {
  margin-left: 0;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #8eafff;
  outline-offset: 3px;
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: monospace;
}
@media (max-width: 1000px) {
  .sidebar {
    width: 82px;
  }
  .navtext {
    display: none;
  }
  .workspace {
    margin-left: 82px;
  }
  .formgrid {
    grid-template-columns: repeat(2, 1fr);
  }
  .yeargrid {
    grid-template-columns: repeat(2, 1fr);
  }
  main {
    padding: 22px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 650px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 12px;
    flex-direction: row;
    align-items: center;
    overflow: auto;
  }
  .sidebar .brand {
    display: none;
  }
  .sidebar nav {
    display: flex;
    margin: 0;
  }
  .sidebar nav a {
    margin: 0;
  }
  .sidebar nav .navtext {
    display: inline;
    font-size: 10px;
  }
  .sidebar nav a > span:first-child {
    display: none;
  }
  #collapse,
  .public-link {
    display: none;
  }
  .workspace,
  body.collapsed .workspace {
    margin-left: 0;
  }
  .topbar {
    padding: 15px;
    height: auto;
  }
  .top-actions span {
    display: none;
  }
  .pageheading > .pill {
    display: none;
  }
  main {
    padding: 18px;
  }
  h1 {
    font-size: 25px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .formgrid .two {
    grid-column: auto;
  }
  .toolbar select,
  .toolbar input {
    width: 100%;
    max-width: none;
  }
  .calgrid {
    overflow: auto;
    grid-template-columns: repeat(7, 110px);
  }
  .day {
    min-height: 120px;
  }
  .yeargrid {
    grid-template-columns: 1fr;
  }
  .schedule-row {
    flex-wrap: wrap;
  }
  .public-workspace {
    margin-left: 0;
  }
  .topbar strong {
    font-size: 12px;
  }
}

progress {
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: #edf2fa;
}
progress::-webkit-progress-value {
  background: #2563eb;
}
progress::-moz-progress-bar {
  background: #2563eb;
}
/* Centro de alertas; usa la misma paleta clara/oscura. */
.alert-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
.alert-bell svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.alert-badge {
  position: absolute;
  right: -3px;
  top: -5px;
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 20px;
  background: #c82032;
  color: white;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--surface);
}
.alert-badge[hidden] {
  display: none;
}
#alerts-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(540px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 22px;
  overflow: auto;
}
#alerts-drawer::backdrop {
  background: #09152f66;
}
.alert-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.alert-drawer-head h2 {
  margin: 0;
}
.alert-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0;
  overflow-wrap: anywhere;
}
.alert-card.is-unread {
  border-left-color: var(--blue);
}
.alert-card h3 {
  font-size: 16px;
  margin: 10px 0;
}
.alert-meta {
  color: var(--muted);
  font-size: 12px;
}
#alerts-list .alert-card {
  max-width: 1100px;
}
@media (max-width: 620px) {
  .top-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .top-actions > span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #alerts-drawer {
    padding: 16px;
  }
  .alert-card .actions {
    flex-wrap: wrap;
  }
}

.no-underline {
  text-decoration: none !important;
}

.f-avatar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid white;
}
.f-avatar-lg {
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
}
.avatar-group .f-avatar-icon {
  margin-left: -10px;
}
.avatar-group .f-avatar-icon:first-child {
  margin-left: 0;
}

/* Landing Page Styles */
body[data-page="landing"] {
  background: #f8fafc;
  background-image: radial-gradient(circle at 50% -20%, #e0ebff 0%, #f8fafc 50%);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.3);
  position: sticky;
  top: 1.5rem;
  z-index: 100;
  margin: 0 auto 2rem;
  max-width: 1100px;
  border-radius: 100px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.03);
}
.landing-nav .brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.landing-nav .brand span {
  color: #2563eb;
}
.landing-nav .brandmark {
  width: 32px;
  height: 32px;
  font-size: 12px;
  border-radius: 8px;
  box-shadow: none;
}
.landing-nav .links {
  display: flex;
  gap: 2.5rem;
}
.landing-nav .links a {
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
  display: inline;
  margin: 0;
  padding: 0;
}
.landing-nav .links a:hover {
  color: #0f172a;
}
.landing-nav .actions {
  display: flex;
  gap: 0.75rem;
}
.landing-btn {
  padding: 0.6rem 1.5rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.landing-btn-ghost {
  color: #0f172a;
  background: transparent;
}
.landing-btn-ghost:hover {
  background: #f1f5f9;
}
.landing-btn-primary {
  background: #2563eb;
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}
.landing-btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.hero {
  text-align: center;
  padding: 5rem 1rem 6rem;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}
.pill-update {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  padding: 0.4rem 1.25rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #2563eb;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  margin-bottom: 2.5rem;
  border: 1px solid #eff6ff;
}
.pill-update span {
  color: #475569;
  font-weight: 600;
}
.hero h1 {
  font-size: 4.5rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero h1 span {
  color: #2563eb;
  position: relative;
}
.hero h1 span::after {
  content: 'âœ¨';
  position: absolute;
  top: -10px;
  right: -30px;
  font-size: 2rem;
}
.hero > p {
  font-size: 1.25rem;
  color: #475569;
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}
.hero-actions .landing-btn {
  padding: 1.1rem 2.2rem;
  font-size: 1.1rem;
  gap: 0.5rem;
}
.hero-actions .landing-btn-ghost {
  background: white;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}
.floating-cards {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}
.f-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 15px 35px rgba(0,0,0,0.05), 0 5px 15px rgba(0,0,0,0.03);
  animation: float 6s ease-in-out infinite;
  text-align: left;
}
.f-card-1 {
  top: 15%;
  left: -15%;
  animation-delay: 0s;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.f-card-2 {
  top: 65%;
  left: -10%;
  animation-delay: 1.5s;
  width: 200px;
}
.f-card-3 {
  top: 25%;
  right: -15%;
  animation-delay: 2.5s;
  width: 220px;
}
.f-card-4 {
  top: 70%;
  right: -5%;
  animation-delay: 0.5s;
  padding: 1rem 1.5rem;
  width: 180px;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}
.features-list {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 4rem;
  flex-wrap: wrap;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  background: white;
  padding: 0.6rem 1.25rem;
  border-radius: 100px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.feature-item-icon {
  color: #2563eb;
  font-size: 1.2rem;
}
.avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2.5rem;
  gap: 1rem;
  position: relative;
  z-index: 2;
}
.avatar-group {
  display: flex;
}
.avatar-group img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid white;
  margin-left: -10px;
}
.avatar-group img:first-child {
  margin-left: 0;
}
.rating {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rating-star {
  color: #f59e0b;
}
.rating-text {
  color: #94a3b8;
  font-weight: 400;
}
.f-card-title {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}
.f-card-subtitle {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}
.f-card-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.f-card-stat-pill {
  background: #eff6ff;
  color: #2563eb;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
}
.f-card-stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
}
.f-card-bar-container {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.f-card-bar-fill {
  width: 60%;
  height: 100%;
  background: #2563eb;
  border-radius: 6px;
}
.f-card-months {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 500;
}
.f-card-course-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.f-card-course-info img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.f-card-course-author {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}
.f-card-course-status {
  font-size: 0.65rem;
  background: #eff6ff;
  color: #2563eb;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
  font-weight: 600;
  margin-top: 0.2rem;
}
.f-card-course-capacity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
}
.f-card-capacity-label {
  color: #64748b;
}
.f-card-capacity-value {
  color: #0f172a;
}
.f-card-capacity-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  margin-top: 0.25rem;
  overflow: hidden;
}
.f-card-capacity-fill {
  width: 83%;
  height: 100%;
  background: #2563eb;
}
.f-card-completed-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.f-card-completed-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}
.f-card-completed-icon {
  color: #2563eb;
  font-size: 1rem;
}
.f-card-completed-check {
  color: #10b981;
}
.f-card-completed-text {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}
.f-card-completed-stats {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.f-card-completed-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
}
.f-card-completed-growth {
  background: #ecfdf5;
  color: #10b981;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
}
@media (max-width: 1000px) {
  .landing-nav .links { display: none; }
  .hero h1 { font-size: 3.5rem; }
}

.row-border { border-bottom: 1px solid var(--border); }
.pad-10 { padding: 10px; }
.text-right { text-align: right; }
.editor-td { padding: 0; background: var(--bg-alt); white-space: normal; overflow: hidden; }
.row-editor-embedded { border: none !important; border-radius: 0 !important; margin: 0 !important; padding: 1.5rem !important; box-shadow: inset 0 3px 6px rgba(0,0,0,0.1) !important; }
.panel.no-pad { padding: 0 !important; }
.plan-table { width: 100%; border-collapse: collapse; text-align: left; }
.table-header { border-bottom: 2px solid var(--border); background: var(--bg-alt); }
.editor-td .formgrid input, .editor-td .formgrid select, .editor-td .formgrid textarea { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
.editor-td .formgrid { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 650px) { .editor-td .formgrid { grid-template-columns: minmax(0, 1fr) !important; } }
.tablewrap-plan { border: none !important; border-radius: 0 !important; }
@media (max-width: 650px) { .plan-table, .plan-table tbody, .plan-table tr, .plan-table td, .plan-table th, .plan-table thead { display: block; width: 100%; box-sizing: border-box; } .plan-table thead { display: none; } .plan-table tr.row-border { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 15px; padding: 10px; background: var(--surface); } .plan-table td.pad-10 { padding: 5px 0; text-align: left !important; } .row-editor-container { border: none !important; margin: 0 !important; padding: 0 !important; } }
.modal-confirm-label { padding: 1rem 0; margin: 1rem 0 1.5rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.modal-confirm-actions { margin-bottom: 1rem; }
.modal-success-container { text-align: center; padding: 2rem; }
.modal-success-icon { font-size: 3rem; color: var(--green); margin-bottom: 1rem; }
.modal-success-title { color: var(--green); }
.modal-success-btn { margin-top: 1.5rem; }
.mfa-qr-container { background: white; display: inline-block; padding: 10px; border-radius: 8px; margin-bottom: 1rem; }
.modal-danger-icon { font-size: 3rem; color: var(--red); margin-bottom: 1rem; }
.modal-danger-title { color: var(--red); }

#glass-notifier { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 10000; pointer-events: none; }
#glass-notifier.show { transform: translate(-50%, -50%) scale(1); opacity: 1; visibility: visible; pointer-events: auto; }
.glass-toast { display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 24px; padding: 40px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); text-align: center; min-width: 320px; }
@media (prefers-color-scheme: dark) { .glass-toast { background: rgba(30, 41, 59, 0.85); border-color: rgba(255, 255, 255, 0.1); } }

/* ===== Menú móvil tipo hamburguesa (drawer glass) ===== */
.burger,
#menu-close,
#nav-overlay,
.mobile-only {
  display: none;
}
@media (max-width: 650px) {
  .burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-right: 12px;
    flex: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffffcc, #ffffff73);
    border: 1px solid #ffffffb3;
    outline: 1px solid #245de826;
    outline-offset: -1px;
    box-shadow: 0 6px 18px #15355e1a, inset 0 1px 0 #ffffffe6;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  body.dark .burger {
    background: linear-gradient(135deg, #ffffff1f, #ffffff0a);
    border-color: #ffffff26;
    box-shadow: 0 6px 20px #0006, inset 0 1px 0 #ffffff26;
  }
  .burger span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--navy);
    transition: transform 0.3s ease, opacity 0.2s ease;
  }
  body.nav-open .burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  body.nav-open .burger span:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .topbar {
    gap: 8px;
  }
  .topbar-title {
    flex: 1;
    min-width: 0;
  }
  .topbar-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .top-actions {
    gap: 8px;
  }
  .top-actions a.ghost,
  .top-actions > span {
    display: none;
  }
  #nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: #0b1a33a6;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 40;
  }
  body.nav-open #nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }
  body.nav-open {
    overflow: hidden;
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, 86vw);
    padding: 22px 16px;
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto;
    z-index: 50;
    background: linear-gradient(160deg, #ffffffeb, #eef3fff2);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    backdrop-filter: blur(24px) saturate(170%);
    border-right: 1px solid #ffffffb3;
    box-shadow: 24px 0 60px #0b1a3359;
    transform: translateX(-105%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
  body.dark .sidebar {
    background: linear-gradient(160deg, #16263cf2, #0e1929f5);
    border-right-color: #ffffff1f;
  }
  body.nav-open .sidebar {
    transform: translateX(0);
  }
  .sidebar .brand {
    display: flex;
    padding: 4px 48px 18px 4px;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .navtext,
  .sidebar nav .navtext {
    display: inline;
    font-size: 14px;
  }
  .sidebar .brand .navtext {
    font-size: 15px;
  }
  .sidebar nav {
    display: block;
    margin: 18px 0 auto;
  }
  .sidebar nav a {
    margin: 4px 0;
    padding: 14px;
    border: 1px solid transparent;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .sidebar nav a:hover {
    background: #245de812;
    transform: translateX(3px);
  }
  .sidebar nav a.active {
    background: linear-gradient(135deg, #245de826, #245de80d);
    border-color: #245de833;
    box-shadow: inset 3px 0 0 var(--blue);
  }
  .sidebar nav a > span:first-child {
    display: inline-block;
    text-align: center;
    font-size: 18px;
  }
  .sidebar .public-link,
  .sidebar .mobile-only {
    display: block;
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    text-align: center;
    font-weight: 650;
  }
  #collapse {
    display: none;
  }
  body.collapsed .sidebar {
    width: min(320px, 86vw);
  }
  body.collapsed .navtext {
    display: inline;
  }
  #menu-close {
    display: inline-flex;
    position: absolute;
    top: 18px;
    right: 14px;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 12px;
  }
}
/* ===== Gestión de sedes: iconos 3D y botones de color ===== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.card .card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.card .card-actions .btn-c {
  flex: 1 1 auto;
}
.cicon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 0.3s ease;
}
.cicon svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 4px 4px #0b1a3366);
  transition: transform 0.3s ease;
}
.cicon.on {
  background: radial-gradient(circle at 30% 20%, #6c9bff, #245de8 55%, #1a3fa8);
  box-shadow:
    0 12px 22px #245de855,
    0 3px 0 #153383,
    inset 0 2px 0 #ffffff80,
    inset 0 -6px 10px #0b1a3359;
}
.cicon.off {
  background: radial-gradient(circle at 30% 20%, #b4c0d4, #8494ad 55%, #5f6f89);
  box-shadow:
    0 12px 22px #5f6f8944,
    0 3px 0 #46546b,
    inset 0 2px 0 #ffffff80,
    inset 0 -6px 10px #0b1a3340;
}
.card:hover .cicon {
  transform: translateY(-3px);
}
.card:hover .cicon svg {
  transform: rotate(-6deg) scale(1.08);
}
.btn-c {
  border: 1px solid #ffffff59;
  color: #fff;
  font-weight: 650;
  border-radius: 12px;
  padding: 11px 16px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.btn-c:hover {
  transform: translateY(-2px);
  filter: none;
}
.btn-c-blue {
  background: linear-gradient(135deg, #3b74ff, #1b46c2);
  box-shadow: 0 8px 18px #245de84d, inset 0 1px 0 #ffffff59;
}
.btn-c-teal {
  background: linear-gradient(135deg, #14b8a6, #0b7f78);
  box-shadow: 0 8px 18px #0f9d8f4d, inset 0 1px 0 #ffffff59;
}
.btn-c-violet {
  background: linear-gradient(135deg, #8b5cf6, #5b32c9);
  box-shadow: 0 8px 18px #7044dc4d, inset 0 1px 0 #ffffff59;
}
.btn-c-amber {
  background: linear-gradient(135deg, #f5a524, #c27a05);
  box-shadow: 0 8px 18px #d98a0a4d, inset 0 1px 0 #ffffff59;
}
.btn-c-blue:hover { box-shadow: 0 12px 26px #245de880, inset 0 1px 0 #ffffff59; }
.btn-c-teal:hover { box-shadow: 0 12px 26px #0f9d8f80, inset 0 1px 0 #ffffff59; }
.btn-c-violet:hover { box-shadow: 0 12px 26px #7044dc80, inset 0 1px 0 #ffffff59; }
.btn-c-amber:hover { box-shadow: 0 12px 26px #d98a0a80, inset 0 1px 0 #ffffff59; }
.glass-toast-icon { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: bold; margin-bottom: 20px; }
.glass-toast-success .glass-toast-icon { background: #10b981; color: white; box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4); }
.glass-toast-danger .glass-toast-icon { background: #ef4444; color: white; box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4); }
.glass-toast-title { font-size: 28px; font-weight: 800; margin: 0 0 10px 0; color: var(--text); }
.glass-toast-subtitle { font-size: 16px; color: var(--muted); margin: 0 0 25px 0; }
.glass-toast-actions button { width: 100%; border-radius: 12px; padding: 12px 20px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.2s; }
.glass-toast-success button { background: #10b981; color: white; border: none; }
.glass-toast-success button:hover { background: #059669; transform: translateY(-2px); }
.glass-toast-danger button { background: #ef4444; color: white; border: none; }
.glass-toast-danger button:hover { background: #dc2626; transform: translateY(-2px); }

 / *   T a b s   a n d   R B A C   U I   * / 
 . t a b s - c o n t a i n e r   { 
     d i s p l a y :   f l e x ; 
     f l e x - d i r e c t i o n :   c o l u m n ; 
     g a p :   2 0 p x ; 
 } 
 . t a b s   { 
     d i s p l a y :   f l e x ; 
     g a p :   1 0 p x ; 
     b o r d e r - b o t t o m :   2 p x   s o l i d   v a r ( - - l i n e ) ; 
     p a d d i n g - b o t t o m :   1 0 p x ; 
     m a r g i n - t o p :   1 5 p x ; 
 } 
 . t a b - b t n   { 
     b a c k g r o u n d :   t r a n s p a r e n t ; 
     c o l o r :   v a r ( - - m u t e d ) ; 
     f o n t - w e i g h t :   6 0 0 ; 
     b o r d e r :   n o n e ; 
     p a d d i n g :   1 0 p x   1 8 p x ; 
     b o r d e r - r a d i u s :   8 p x ; 
     c u r s o r :   p o i n t e r ; 
     t r a n s i t i o n :   a l l   0 . 2 s ; 
     f o n t - s i z e :   1 4 p x ; 
 } 
 . t a b - b t n : h o v e r   { 
     b a c k g r o u n d :   # 2 4 5 d e 8 1 a ; 
     c o l o r :   v a r ( - - b l u e ) ; 
 } 
 . t a b - b t n . a c t i v e   { 
     b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # e e f 3 f f ,   # e 4 e b f c ) ; 
     c o l o r :   v a r ( - - b l u e ) ; 
     b o x - s h a d o w :   0   4 p x   1 2 p x   # 2 4 5 d e 8 2 2 ; 
     b o r d e r :   1 p x   s o l i d   # 2 4 5 d e 8 4 0 ; 
 } 
 b o d y . d a r k   . t a b - b t n . a c t i v e   { 
     b a c k g r o u n d :   # 2 4 5 d e 8 2 a ; 
     b o x - s h a d o w :   n o n e ; 
 } 
 . t a b - c o n t e n t   { 
     d i s p l a y :   n o n e ; 
     a n i m a t i o n :   f a d e I n   0 . 3 s   e a s e ; 
 } 
 . t a b - c o n t e n t . a c t i v e   { 
     d i s p l a y :   b l o c k ; 
 } 
 
 / *   R B A C   S t a t s   C a r d s   * / 
 . r b a c - h e a d e r   { 
     d i s p l a y :   g r i d ; 
     g r i d - t e m p l a t e - c o l u m n s :   r e p e a t ( a u t o - f i t ,   m i n m a x ( 2 0 0 p x ,   1 f r ) ) ; 
     g a p :   2 0 p x ; 
     m a r g i n - b o t t o m :   2 5 p x ; 
 } 
 . s t a t - c a r d   { 
     b a c k g r o u n d :   v a r ( - - s u r f a c e ) ; 
     b o r d e r - r a d i u s :   1 6 p x ; 
     p a d d i n g :   2 0 p x ; 
     d i s p l a y :   f l e x ; 
     a l i g n - i t e m s :   c e n t e r ; 
     g a p :   1 5 p x ; 
     b o x - s h a d o w :   v a r ( - - s h a d o w ) ; 
     b o r d e r :   1 p x   s o l i d   v a r ( - - l i n e ) ; 
     p o s i t i o n :   r e l a t i v e ; 
     o v e r f l o w :   h i d d e n ; 
 } 
 . s t a t - c a r d . s t a t - g r e e n   {   b o r d e r - l e f t :   5 p x   s o l i d   # 0 5 9 b 7 7 ;   } 
 . s t a t - c a r d . s t a t - p u r p l e   {   b o r d e r - l e f t :   5 p x   s o l i d   # 7 c 3 a e d ;   } 
 . s t a t - c a r d . s t a t - b l u e   {   b o r d e r - l e f t :   5 p x   s o l i d   # 2 4 5 d e 8 ;   } 
 . s t a t - c a r d . s t a t - o r a n g e   {   b o r d e r - l e f t :   5 p x   s o l i d   # f 5 9 e 0 b ;   } 
 
 . s t a t - c a r d   . i c o n   { 
     f o n t - s i z e :   2 8 p x ; 
     b a c k g r o u n d :   # f 4 f 7 f c ; 
     p a d d i n g :   1 2 p x ; 
     b o r d e r - r a d i u s :   1 2 p x ; 
 } 
 b o d y . d a r k   . s t a t - c a r d   . i c o n   {   b a c k g r o u n d :   # 0 e 1 9 2 9 ;   } 
 . s t a t - c a r d   . i n f o   { 
     d i s p l a y :   f l e x ; 
     f l e x - d i r e c t i o n :   c o l u m n ; 
 } 
 . s t a t - c a r d   . i n f o   s p a n   { 
     f o n t - s i z e :   1 3 p x ; 
     c o l o r :   v a r ( - - m u t e d ) ; 
     f o n t - w e i g h t :   6 0 0 ; 
 } 
 . s t a t - c a r d   . i n f o   s t r o n g   { 
     f o n t - s i z e :   2 4 p x ; 
     c o l o r :   v a r ( - - n a v y ) ; 
     l i n e - h e i g h t :   1 . 2 ; 
 } 
 
 / *   R B A C   M a t r i x   * / 
 . r b a c - c o n t r o l s   { 
     d i s p l a y :   f l e x ; 
     g a p :   1 5 p x ; 
     m a r g i n - b o t t o m :   2 0 p x ; 
     a l i g n - i t e m s :   c e n t e r ; 
 } 
 . r b a c - c o n t r o l s   s e l e c t   { 
     p a d d i n g :   1 0 p x ; 
     b o r d e r - r a d i u s :   8 p x ; 
     b o r d e r :   1 p x   s o l i d   v a r ( - - l i n e ) ; 
     b a c k g r o u n d :   v a r ( - - s u r f a c e ) ; 
     c o l o r :   v a r ( - - i n k ) ; 
     f o n t - w e i g h t :   6 0 0 ; 
 } 
 
 . r b a c - m a t r i x - c o n t a i n e r   { 
     b a c k g r o u n d :   v a r ( - - s u r f a c e ) ; 
     b o r d e r - r a d i u s :   1 2 p x ; 
     o v e r f l o w :   h i d d e n ; 
     b o x - s h a d o w :   v a r ( - - s h a d o w ) ; 
     b o r d e r :   1 p x   s o l i d   v a r ( - - l i n e ) ; 
 } 
 . r b a c - m a t r i x   { 
     w i d t h :   1 0 0 % ; 
     b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 } 
 . r b a c - m a t r i x   t h   { 
     b a c k g r o u n d :   # f 8 f a f c ; 
     p a d d i n g :   1 6 p x ; 
     t e x t - a l i g n :   c e n t e r ; 
     f o n t - w e i g h t :   6 0 0 ; 
     c o l o r :   v a r ( - - n a v y ) ; 
     b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - l i n e ) ; 
 } 
 b o d y . d a r k   . r b a c - m a t r i x   t h   {   b a c k g r o u n d :   # 1 a 2 9 4 2 ;   } 
 . r b a c - m a t r i x   t h : f i r s t - c h i l d   { 
     t e x t - a l i g n :   l e f t ; 
 } 
 . r b a c - m a t r i x   t d   { 
     p a d d i n g :   1 6 p x ; 
     t e x t - a l i g n :   c e n t e r ; 
     b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - l i n e ) ; 
 } 
 . r b a c - m a t r i x   t d : f i r s t - c h i l d   { 
     t e x t - a l i g n :   l e f t ; 
     f o n t - w e i g h t :   6 0 0 ; 
     c o l o r :   v a r ( - - i n k ) ; 
     d i s p l a y :   f l e x ; 
     a l i g n - i t e m s :   c e n t e r ; 
     g a p :   1 0 p x ; 
 } 
 . r b a c - m a t r i x   t r : l a s t - c h i l d   t d   {   b o r d e r - b o t t o m :   n o n e ;   } 
 . r b a c - m a t r i x   t d   i n p u t [ t y p e = \  
 c h e c k b o x \ ]   { 
     w i d t h :   1 8 p x ; 
     h e i g h t :   1 8 p x ; 
     a c c e n t - c o l o r :   # 0 5 9 b 7 7 ; 
     c u r s o r :   p o i n t e r ; 
 } 
 . r b a c - m a t r i x   t d . a d m i n - c h e c k   i n p u t [ t y p e = \ c h e c k b o x \ ]   { 
     a c c e n t - c o l o r :   # e 4 7 e 2 5 ; 
 } 
 
 . r o l e - b a d g e   { 
     b a c k g r o u n d :   # e e f 3 f f ; 
     c o l o r :   # 2 4 5 d e 8 ; 
     p a d d i n g :   4 p x   1 0 p x ; 
     b o r d e r - r a d i u s :   2 0 p x ; 
     f o n t - s i z e :   1 2 p x ; 
     f o n t - w e i g h t :   6 0 0 ; 
     b o r d e r :   1 p x   s o l i d   # c 8 d 9 f f ; 
     d i s p l a y :   i n l i n e - b l o c k ; 
 } 
 b o d y . d a r k   . r o l e - b a d g e   {   b a c k g r o u n d :   # 1 a 2 c 5 a ;   b o r d e r - c o l o r :   # 2 a 4 1 7 a ;   } 
 . s t a t u s - b a d g e   { 
     p a d d i n g :   4 p x   1 0 p x ; 
     b o r d e r - r a d i u s :   2 0 p x ; 
     f o n t - s i z e :   1 2 p x ; 
     f o n t - w e i g h t :   6 0 0 ; 
     d i s p l a y :   i n l i n e - b l o c k ; 
 } 
 . s t a t u s - g r e e n   {   b a c k g r o u n d :   # d c f c e 7 ;   c o l o r :   # 1 6 6 5 3 4 ;   b o r d e r :   1 p x   s o l i d   # b b f 7 d 0 ;   } 
 . s t a t u s - r e d   {   b a c k g r o u n d :   # f e e 2 e 2 ;   c o l o r :   # 9 9 1 b 1 b ;   b o r d e r :   1 p x   s o l i d   # f e c a c a ;   } 
 b o d y . d a r k   . s t a t u s - g r e e n   {   b a c k g r o u n d :   # 0 6 4 e 3 b ;   c o l o r :   # 3 4 d 3 9 9 ;   b o r d e r - c o l o r :   # 0 6 5 f 4 6 ;   } 
 b o d y . d a r k   . s t a t u s - r e d   {   b a c k g r o u n d :   # 7 f 1 d 1 d ;   c o l o r :   # f 8 7 1 7 1 ;   b o r d e r - c o l o r :   # 9 9 1 b 1 b ;   } 
  
 
 . m b - 2 0   {   m a r g i n - b o t t o m :   2 0 p x ;   } 
 . m t - 3 0   {   m a r g i n - t o p :   3 0 p x ;   } 
 . b t n - s m   {   p a d d i n g :   6 p x   1 2 p x ;   b o r d e r - r a d i u s :   8 p x ;   f o n t - s i z e :   1 3 p x ;   } 
 . f l e x - 1   {   f l e x :   1 ;   } 
 . p e r m - i c o n   {   b a c k g r o u n d :   v a r ( - - b g ) ;   p a d d i n g :   4 p x ;   b o r d e r - r a d i u s :   4 p x ;   m a r g i n - r i g h t :   8 p x ;   } 
  
 


/* Tabs and RBAC UI */
.tabs-container { display: flex; flex-direction: column; gap: 20px; }
.tabs { display: flex; gap: 10px; border-bottom: 2px solid var(--line); padding-bottom: 10px; margin-top: 15px; }
.tab-btn { background: transparent; color: var(--muted); font-weight: 600; border: none; padding: 10px 18px; border-radius: 8px; cursor: pointer; transition: all 0.2s; font-size: 14px; }
.tab-btn:hover { background: #245de81a; color: var(--blue); }
.tab-btn.active { background: linear-gradient(135deg, #eef3ff, #e4ebfc); color: var(--blue); box-shadow: 0 4px 12px #245de822; border: 1px solid #245de840; }
body.dark .tab-btn.active { background: #245de82a; box-shadow: none; }
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

/* RBAC Stats Cards */
.rbac-header { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-card { background: var(--surface); border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 15px; box-shadow: var(--shadow); border: 1px solid var(--line); position: relative; overflow: hidden; }
.stat-card.stat-green { border-left: 5px solid #059b77; }
.stat-card.stat-purple { border-left: 5px solid #7c3aed; }
.stat-card.stat-blue { border-left: 5px solid #245de8; }
.stat-card.stat-orange { border-left: 5px solid #f59e0b; }
.stat-card .icon { font-size: 28px; background: #f4f7fc; padding: 12px; border-radius: 12px; }
body.dark .stat-card .icon { background: #0e1929; }
.stat-card .info { display: flex; flex-direction: column; }
.stat-card .info span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-card .info strong { font-size: 24px; color: var(--navy); line-height: 1.2; }

/* RBAC Matrix */
.rbac-controls { display: flex; gap: 15px; margin-bottom: 20px; align-items: center; }
.rbac-controls select { padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; }
.rbac-matrix-container { background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.rbac-matrix { width: 100%; border-collapse: collapse; }
.rbac-matrix th { background: #f8fafc; padding: 16px; text-align: center; font-weight: 600; color: var(--navy); border-bottom: 1px solid var(--line); }
body.dark .rbac-matrix th { background: #1a2942; }
.rbac-matrix th:first-child { text-align: left; }
.rbac-matrix td { padding: 16px; text-align: center; border-bottom: 1px solid var(--line); }
.rbac-matrix td:first-child { text-align: left; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.rbac-matrix tr:last-child td { border-bottom: none; }
.rbac-matrix td input[type="checkbox"] { width: 18px; height: 18px; accent-color: #059b77; cursor: pointer; }
.rbac-matrix td.admin-check input[type="checkbox"] { accent-color: #e47e25; }

.role-badge { background: #eef3ff; color: #245de8; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid #c8d9ff; display: inline-block; }
body.dark .role-badge { background: #1a2c5a; border-color: #2a417a; }
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block; }
.status-green { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.status-red { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
body.dark .status-green { background: #064e3b; color: #34d399; border-color: #065f46; }
body.dark .status-red { background: #7f1d1d; color: #f87171; border-color: #991b1b; }

.mb-20 { margin-bottom: 20px; }
.mt-30 { margin-top: 30px; }
.btn-sm { padding: 6px 12px; border-radius: 8px; font-size: 13px; }
.flex-1 { flex: 1; }
.perm-icon { background: var(--bg); padding: 4px; border-radius: 4px; margin-right: 8px; }
