:root {
  --ink: #101827;
  --muted: #697386;
  --line: #dce3e8;
  --paper: #f5f7f8;
  --surface: #ffffff;
  --navy: #0b2340;
  --navy-2: #102639;
  --teal: #2f8fd6;
  --teal-dark: #0a5fa0;
  --gold: #d9aa50;
  --blue: #307ee8;
  --danger: #d4515c;
  --shadow: 0 18px 45px rgba(16, 24, 39, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(24, 184, 164, .35); outline-offset: 3px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; background: white; padding: 10px 14px; }
.skip-link:focus { top: 12px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 30;
  display: flex; flex-direction: column; padding: 26px 18px;
  color: #d9e6ed; background: var(--navy);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 26px; color: white; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: #0c70bb; border-radius: 10px; font-family: Georgia, serif; font-size: 20px; }
.brand small { display: block; color: #85a0b1; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.nav-label { margin: 8px 12px; color: #688294; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-list { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; color: #a8bcc8; font-size: 14px; font-weight: 650; }
.nav-link:hover { color: white; background: rgba(255,255,255,.06); }
.nav-link.active { color: white; background: var(--navy-2); box-shadow: inset 3px 0 0 var(--teal); }
.nav-icon { width: 19px; text-align: center; font-size: 16px; }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.1); }
.profile-mini { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: #1f4e7a; font-size: 13px; font-weight: 800; }
.avatar.teal { color: #0a3f6b; background: #bcd9f3; }
.profile-mini strong { display: block; font-size: 13px; }
.profile-mini span { display: block; color: #7892a3; font-size: 12px; }

.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: 76px; display: flex; align-items: center; gap: 18px; padding: 0 34px; border-bottom: 1px solid rgba(220,227,232,.88); background: rgba(245,247,248,.94); backdrop-filter: blur(16px); }
.menu-button { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.search-box { position: relative; width: min(400px, 46vw); }
.search-box input { width: 100%; height: 42px; padding: 0 42px 0 16px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); }
.search-box span { position: absolute; right: 14px; top: 9px; color: #82909d; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-button { position: relative; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: white; color: #445262; }
.notification-dot { position: absolute; right: 8px; top: 8px; width: 7px; height: 7px; border: 2px solid white; border-radius: 50%; background: var(--danger); }
.page { width: min(1420px, 100%); margin: 0 auto; padding: 34px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 5px; color: var(--teal-dark); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 4vw, 44px); font-weight: 600; line-height: 1.06; letter-spacing: -.035em; }
h2 { margin-bottom: 14px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; line-height: 1.15; }
h3 { margin-bottom: 8px; font-size: 17px; line-height: 1.3; }
.subtle { color: var(--muted); }
.page-heading .subtle { margin-bottom: 0; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 11px; background: var(--navy); color: white; font-weight: 750; }
.button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(9,21,34,.14); }
.button.secondary { border-color: var(--line); background: white; color: var(--ink); }
.button.teal { background: var(--teal-dark); }
.button.small { min-height: 36px; padding: 7px 12px; font-size: 14px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat { position: relative; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.stat::after { content: ""; position: absolute; right: -8px; bottom: -18px; width: 62px; height: 62px; border: 12px solid rgba(47,143,214,.09); border-radius: 50%; }
.stat-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
.stat strong { display: block; font-family: Georgia, serif; font-size: 29px; line-height: 1; }
.stat small { color: var(--teal-dark); font-weight: 700; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, .8fr); gap: 22px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 30px rgba(16,24,39,.035); }
.panel-pad { padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-head h2, .panel-head h3 { margin: 0; }
.course-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 120px auto; align-items: center; gap: 15px; padding: 17px 0; border-top: 1px solid #edf0f2; }
.course-row:first-of-type { border-top: 0; }
.course-code { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; color: #0b534c; background: #d7f5f0; font-family: Georgia, serif; font-size: 17px; font-weight: 700; }
.course-row p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.progress-track { height: 6px; overflow: hidden; border-radius: 10px; background: #e8edef; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.progress-value { margin-top: 6px; color: var(--muted); font-size: 12px; }
.agenda { display: grid; gap: 1px; background: var(--line); }
.agenda-item { display: grid; grid-template-columns: 62px 1fr; gap: 14px; padding: 17px 20px; background: white; }
.agenda-time { color: var(--teal-dark); font-weight: 800; }
.agenda-item p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; color: #a1343e; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.live-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 4px rgba(212,81,92,.13); }

.notice { display: flex; gap: 13px; padding: 16px; border-left: 3px solid var(--gold); background: #fffaf0; }
.notice p { margin: 2px 0 0; color: #725c32; font-size: 14px; }
.stack { display: grid; gap: 18px; }
.list-clean { margin: 0; padding: 0; list-style: none; }
.deadline { display: flex; gap: 13px; padding: 14px 0; border-top: 1px solid #edf0f2; }
.deadline:first-child { border: 0; padding-top: 0; }
.date-box { width: 45px; padding: 5px; flex: 0 0 auto; border-radius: 10px; text-align: center; background: #eef2f4; }
.date-box strong, .date-box span { display: block; }
.date-box strong { font-size: 16px; }
.date-box span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.toolbar input, .toolbar select { min-height: 42px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); }
.toolbar input { min-width: 250px; flex: 1; }
.tabs { display: flex; gap: 3px; padding: 4px; border-radius: 12px; background: #e9eef0; }
.tab { padding: 8px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; }
.tab.active { background: white; color: var(--ink); box-shadow: 0 2px 8px rgba(16,24,39,.08); }

.library-grid, .catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
.book-card, .catalog-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.book-cover { min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; padding: 19px; color: white; background: #16394a; }
.book-card:nth-child(2n) .book-cover { background: #4d3a55; }
.book-card:nth-child(3n) .book-cover { background: #2e4b3d; }
.book-cover span { color: rgba(255,255,255,.68); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.book-cover strong { max-width: 220px; font-family: Georgia, serif; font-size: 23px; line-height: 1.05; }
.book-info, .catalog-info { padding: 17px; }
.meta { color: var(--muted); font-size: 13px; }
.book-actions { display: flex; gap: 8px; margin-top: 14px; }
.tag { display: inline-block; padding: 4px 8px; border-radius: 7px; color: var(--teal-dark); background: #e3eefa; font-size: 12px; font-weight: 750; }

.video-stage { position: relative; min-height: 430px; overflow: hidden; display: flex; align-items: flex-end; padding: 28px; border-radius: 20px; color: white; background: #07111b; box-shadow: var(--shadow); }
.video-stage::before { content: ""; position: absolute; inset: 0 0 0 52%; opacity: .58; background: #153b4c; clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%); }
.video-copy { position: relative; z-index: 2; width: min(630px, 100%); }
.video-copy h2 { margin: 8px 0; font-size: clamp(28px, 4vw, 43px); }
.video-controls { position: absolute; z-index: 2; right: 24px; bottom: 24px; display: flex; gap: 8px; }
.round-control { width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(255,255,255,.1); color: white; }
.round-control.leave { width: auto; padding: 0 18px; border-radius: 24px; background: var(--danger); }
.session-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; margin-top: 20px; }
.person-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #edf0f2; }
.person-row:first-child { border-top: 0; }
.person-row .meta { margin-left: auto; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 13px; border-bottom: 1px solid #edf0f2; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
td { font-size: 14px; }
.status { font-weight: 750; color: var(--teal-dark); }
.status.pending { color: #a26a15; }

.catalog-visual { height: 136px; padding: 20px; display: flex; align-items: flex-end; color: white; background: #15384a; }
.catalog-card:nth-child(2n) .catalog-visual { background: #21483f; }
.catalog-card:nth-child(3n) .catalog-visual { background: #533c51; }
.catalog-visual b { font-family: Georgia, serif; font-size: 26px; }
.price { font-family: Georgia, serif; font-size: 24px; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; background: var(--navy); }
.auth-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(32px, 6vw, 80px); color: white; }
.auth-story::after { content: "A"; position: absolute; right: -4vw; bottom: -20vh; color: rgba(47,143,214,.08); font-family: Georgia, serif; font-size: 70vw; line-height: 1; }
.auth-story > * { position: relative; z-index: 1; }
.auth-story h1 { width: min(650px, 100%); font-size: clamp(42px, 6vw, 72px); }
.auth-story p { max-width: 560px; color: #a9bfca; font-size: 18px; }
.auth-quote { max-width: 520px; padding-left: 18px; border-left: 3px solid var(--gold); }
.auth-card { display: grid; place-items: center; padding: 30px; background: white; }
.auth-form { width: min(420px, 100%); }
.auth-form h2 { font-size: 34px; }
.field { display: grid; gap: 7px; margin: 16px 0; }
.field label { font-size: 14px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.auth-form .button { width: 100%; margin-top: 12px; }
.form-foot { margin-top: 18px; color: var(--muted); font-size: 13px; text-align: center; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 90; max-width: 340px; padding: 14px 17px; border-radius: 12px; color: white; background: var(--navy); box-shadow: var(--shadow); transform: translateY(120px); opacity: 0; transition: .25s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.empty-state { display: none; padding: 48px 20px; text-align: center; color: var(--muted); }
.modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: 20px; background: rgba(4,11,18,.62); }
.modal.open { display: grid; }
.modal-card { width: min(520px, 100%); padding: 26px; border-radius: 18px; background: white; box-shadow: var(--shadow); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

@media (max-width: 1050px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .library-grid, .catalog-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .workspace { width: 100%; }
  .menu-button { display: inline-grid; place-items: center; }
  .topbar { height: 68px; padding: 0 18px; }
  .search-box { flex: 1; width: auto; }
  .page { padding: 24px 18px 38px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .library-grid, .catalog-grid, .session-grid { grid-template-columns: 1fr; }
  .course-row { grid-template-columns: 48px minmax(0,1fr) auto; }
  .course-row .progress-cell { grid-column: 2 / -1; }
  .video-stage { min-height: 490px; }
  .video-controls { left: 24px; right: auto; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-story { min-height: 42vh; }
  .auth-quote { display: none; }
}
@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr; }
  .top-actions .profile-mini { display: none; }
  .topbar { gap: 9px; }
  .course-row { grid-template-columns: 46px 1fr; }
  .course-row > .button { grid-column: 1 / -1; }
  .video-controls { flex-wrap: wrap; }
  .tabs { width: 100%; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* Comunicación: shared tokens, progressive controls and responsive inbox. */
.communications [hidden]{display:none!important}
.communications select,.communications input:not([type=checkbox]),.communications textarea{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:white;color:var(--ink);min-width:0;max-width:100%;font:inherit}
.communications button{font:inherit}
.communications .topbar{gap:12px;flex-wrap:wrap;min-height:76px;height:auto;padding-top:12px;padding-bottom:12px}
.communications .top-actions{flex-wrap:wrap;font-size:.875rem}
.comm-page{max-width:1600px;padding-top:20px}
.comm-demo{display:flex;gap:12px;align-items:center;margin-bottom:22px;padding:10px 14px;border:1px solid #ead7aa;border-radius:10px;background:#fff9eb;color:#715119;font-size:.75rem;font-weight:800;letter-spacing:.04em}
.comm-demo span{font-size:.875rem;font-weight:400;letter-spacing:0}
.comm-count{margin-left:auto;padding:1px 7px;border-radius:6px;background:var(--teal);color:var(--navy)}
.comm-tools{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:20px 0}
.comm-tabs{display:flex;gap:4px;flex-wrap:wrap}
.comm-tabs button{padding:10px 15px;border:0;border-bottom:3px solid transparent;background:transparent;color:var(--muted);font-weight:700}
.comm-tabs button[aria-pressed=true]{border-color:var(--teal-dark);color:var(--ink)}
.comm-tabs span{font-size:.875rem;color:var(--teal-dark)}
.comm-aux{display:flex;flex-wrap:wrap;gap:8px}
.comm-inbox{display:grid;grid-template-columns:minmax(260px,33%) minmax(0,1fr);overflow:hidden;min-height:630px}
.comm-list-pane{border-right:1px solid var(--line);background:#fafdfe;min-width:0}
.comm-filters{padding:20px;border-bottom:1px solid var(--line);display:grid;gap:9px}
.comm-filters label,.comm-field{font-size:.875rem;font-weight:700}
.comm-filters input{width:100%}
.comm-filter-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.comm-filter-pair label{display:grid;gap:5px}
.comm-filter-pair select{width:100%;font-size:.875rem}
.comm-thread-list{max-height:660px;overflow-y:auto}
.comm-thread{display:block;width:100%;padding:20px;text-align:left;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink)}
.comm-thread:hover{background:#f0f7f8}
.comm-thread.selected{background:#e8f1fa;box-shadow:inset 4px 0 var(--teal-dark)}
.comm-thread strong{display:block;font-size:1rem;line-height:1.4;margin:10px 0 6px}
.comm-thread p{margin:0 0 12px;font-size:.875rem;color:var(--muted);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.comm-thread-top,.comm-thread-meta{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}
.comm-thread-meta{font-size:.75rem;color:#566576}
.comm-unread{font-size:.75rem;font-weight:700;color:var(--teal-dark)}
.comm-detail{min-width:0;display:flex;flex-direction:column;background:white}
.comm-detail-head{display:flex;align-items:flex-start;gap:16px;padding:23px 24px 12px}
.comm-detail-head h2{font:700 1.25rem/1.4 Inter,system-ui,sans-serif;letter-spacing:-.02em;margin:2px 0 6px;overflow-wrap:anywhere}
.comm-detail-head .button{flex-shrink:0;font-size:.875rem}
.comm-detail-head .meta{margin:0}
.comm-context{padding:0 24px 15px;display:flex;gap:12px;align-items:center;justify-content:space-between;font-size:.875rem;color:var(--muted);flex-wrap:wrap}
.comm-context .tag{color:var(--teal-dark)}
.comm-management{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;padding:12px 24px;border-block:1px solid var(--line);background:#f8fbfc}
.comm-management .comm-field{margin:0}
.comm-management select{font-size:.875rem;padding:6px 9px}
.comm-context-details{padding:12px 24px;font-size:.875rem;border-bottom:1px solid var(--line)}
.comm-context-details summary{cursor:pointer;color:var(--teal-dark);font-weight:650}
.comm-context-details p{margin:10px 0}
.comm-context-details ul{list-style:none;padding:0;display:grid;gap:8px}
.comm-text-link{color:var(--teal-dark);text-decoration:underline}
.comm-messages{padding:24px;min-height:240px;max-height:440px;overflow-y:auto;display:flex;flex-direction:column;gap:22px;flex:1}
.comm-message{max-width:92%}
.comm-message.own{align-self:flex-end}
.comm-message-meta{font-size:.75rem;display:flex;gap:10px;justify-content:space-between;flex-wrap:wrap;color:var(--muted);margin-bottom:7px}
.comm-message-meta strong{color:var(--ink)}
.comm-bubble{background:#f0f3f6;border-radius:0 14px 14px 14px;padding:15px 18px;overflow-wrap:anywhere}
.comm-message.own .comm-bubble{background:#e5f6f1;border-radius:14px 0 14px 14px}
.comm-bubble p{white-space:pre-wrap;margin:0}
.comm-message>.button{font-size:.75rem;margin-top:6px;border:0;color:var(--muted)}
.comm-composer{padding:18px 24px;border-top:1px solid var(--line);background:#fcfdfd}
.comm-field{display:grid;gap:7px;margin:12px 0}
.comm-field textarea{resize:vertical;min-height:90px;width:100%;font-weight:400}
.comm-compose-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.comm-compose-actions>.button:last-child{margin-left:auto}
.comm-compose-actions select{font-size:.875rem;max-width:170px}
.comm-compose-actions .button{font-size:.875rem}
.comm-composer small{display:block;margin-top:10px;color:var(--muted);font-size:.75rem}
.comm-file-input{position:absolute;width:1px;height:1px;opacity:0}
.comm-compose-actions label:focus-within{outline:3px solid var(--teal);outline-offset:3px}
.comm-file{display:block;margin-top:9px;text-decoration:underline;color:var(--teal-dark);font-size:.875rem}
.comm-attachment{display:inline-flex;gap:4px;align-items:center;background:#edf4f5;padding:3px 7px;margin:4px;border-radius:8px;font-size:.875rem;overflow-wrap:anywhere;max-width:100%}
.comm-attachment button{padding:3px 7px;min-height:30px}
.comm-announcement-actions{padding:22px 24px;border-top:1px solid var(--line);display:flex;gap:12px;flex-direction:column;align-items:flex-start;font-size:.875rem}
.comm-announcement-actions p{margin:0}
.comm-empty{padding:45px 24px;color:var(--muted);text-align:center}
.comm-empty h2,.comm-empty h3{color:var(--ink)}
.comm-footnote{font-size:.875rem;color:var(--muted);margin-top:16px}
#comm-dialog{border:1px solid var(--line);padding:26px;border-radius:20px;width:min(650px,calc(100% - 24px));max-height:88dvh;box-shadow:var(--shadow);color:var(--ink)}
#comm-dialog::backdrop{background:rgba(4,16,25,.58);backdrop-filter:blur(3px)}
.comm-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}
.comm-dialog-head h2{font-size:1.75rem;margin-bottom:12px}
.comm-dialog-head button{flex-shrink:0}
.comm-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.comm-check{display:flex;align-items:center;gap:10px;font-size:.875rem;margin:10px 0}
.comm-check input{accent-color:var(--teal-dark);width:18px;height:18px;flex-shrink:0}
#recipient-picks{border:1px solid var(--line);border-radius:12px;padding:12px 16px}
#recipient-picks legend{font-size:.875rem;font-weight:700}
.comm-recipient-preview{font-size:.875rem;padding:12px 14px;background:#e8f1fa;border-radius:10px;color:#225b51;overflow-wrap:anywhere}
.comm-queue-item,.comm-rule{padding:20px 0;border-bottom:1px solid var(--line)}
.comm-queue-item h3,.comm-rule h3{margin-top:10px}
.comm-queue-item .comm-aux{margin-top:14px}
.comm-error{color:#b22d40;font-size:.875rem}
.comm-preserve{white-space:pre-wrap;overflow-wrap:anywhere}
.communications button:disabled{cursor:not-allowed;opacity:.55;transform:none;box-shadow:none}
.communications .button{white-space:normal}
@media(max-width:1150px){.comm-inbox{grid-template-columns:minmax(240px,36%) minmax(0,1fr)}.comm-detail-head{flex-direction:column}.comm-filter-pair{grid-template-columns:1fr}.comm-page{padding-inline:20px}}
@media(max-width:780px){.comm-inbox{display:block;min-height:480px}.comm-list-pane{border:0}.comm-thread-list{max-height:none}.comm-detail{display:none}.comm-inbox.reading .comm-list-pane{display:none}.comm-inbox.reading .comm-detail{display:flex}.comm-messages{max-height:none}.comm-filter-pair{grid-template-columns:1fr 1fr}.comm-demo{align-items:flex-start;flex-direction:column;gap:4px}.comm-page h1{font-size:2rem}.comm-tools{align-items:stretch}.comm-tabs{width:100%}.comm-tabs button{flex:1;padding:8px;font-size:.875rem}.comm-aux{width:100%}.comm-aux button{flex:1}.communications .topbar>strong{font-size:.875rem}.communications .top-actions{margin-left:0}.comm-detail-head{padding:18px}.comm-context,.comm-management,.comm-context-details,.comm-messages,.comm-composer{padding-inline:18px}.comm-two{grid-template-columns:1fr;gap:0}}
@media(max-width:420px){.comm-compose-actions>.button:last-child{width:100%;margin-left:0}.comm-filter-pair{grid-template-columns:1fr}.comm-message{max-width:100%}.comm-page{padding-inline:12px}}

/* Exam workspace; shared campus stylesheet. */
.exams [hidden]{display:none!important}
.exams input:not([type=checkbox]):not([type=radio]),.exams textarea,.exams select{font:inherit;min-width:0;max-width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:10px;background:white;color:var(--ink)}
.exams .topbar{height:auto;min-height:76px;flex-wrap:wrap;padding-block:12px}
.exam-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.exam-cards h2{margin-top:18px}
.exam-history{margin-top:24px}
.exam-layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:24px;align-items:start}
.exam-map{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:20px 0}
.exam-map button{padding:10px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);min-height:44px}
.exam-map .answered{background:#d6f5ec;border-color:#b3dece;color:#13594b}
.exam-map .current{outline:2px solid var(--navy);outline-offset:2px}
.exam-clock{background:var(--navy);border-radius:14px;padding:12px 22px;color:white;min-width:160px}
.exam-clock span{display:block;font-size:.875rem;color:#bbccd6}
.exam-clock strong{font-size:1.8rem;font-variant-numeric:tabular-nums}
.exam-clock .urgent{color:#ffd39d}
.exam-option{display:flex;gap:12px;padding:17px;margin:10px 0;border:1px solid var(--line);border-radius:12px;align-items:center;cursor:pointer}
.exam-option:has(input:checked){background:#eaf7f3;border-color:var(--teal-dark)}
.exams input[type=checkbox],.exams input[type=radio]{width:18px;height:18px;accent-color:var(--teal-dark);flex-shrink:0}
#exam-answer{border:0;padding:0;margin:24px 0}
#exam-answer textarea{width:100%;resize:vertical}
.exam-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.exam-actions{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin-top:18px}
.exam-review-list{display:grid;gap:10px;margin:20px 0}
.exam-review-list button{text-align:left;justify-content:flex-start}
.exam-score{display:flex;gap:28px;align-items:center;border-left:5px solid var(--teal-dark)}
.exam-score>strong{font-family:Georgia,serif;font-size:3rem;white-space:nowrap}
.exam-score small{font-size:1.5rem;color:var(--muted)}
.exam-score p{margin:0}
.exam-result-row{margin:18px 0}
.exam-result-row h3{margin-top:16px}
.exam-text{white-space:pre-wrap;overflow-wrap:anywhere}
.exam-grade{padding-top:15px;border-top:1px solid var(--line)}
#exam-dialog{width:min(720px,calc(100% - 24px));max-height:88dvh;border:1px solid var(--line);border-radius:18px;padding:26px;color:var(--ink)}
#exam-dialog::backdrop{background:rgba(4,16,25,.6)}
#exam-dialog fieldset{border:1px solid var(--line);border-radius:12px}
.exam-bank{padding:14px;border-bottom:1px solid var(--line)}
.exam-bank summary{cursor:pointer;font-weight:650}
.exams progress{accent-color:var(--teal-dark);width:100%}
#config-error{color:#aa263a}
@media(max-width:950px){.exam-layout{grid-template-columns:1fr}.exam-map{grid-template-columns:repeat(5,1fr)}}
@media(max-width:600px){.exam-cards{grid-template-columns:1fr}.exam-score{align-items:flex-start;flex-direction:column;gap:10px}.exams .top-actions{margin-left:0;flex-wrap:wrap}.exam-clock{width:100%}.exam-layout{gap:16px}.exam-actions .button{flex:1}.exams .panel-pad{padding:20px}}

/* Interactive classroom: one active task, teaching controls and participation. */
.live-class [hidden]{display:none!important}
.live-class input:not([type=radio]):not([type=checkbox]),.live-class textarea,.live-class select{font:inherit;max-width:100%;min-width:0;border:1px solid var(--line);border-radius:10px;padding:10px 12px;color:var(--ink);background:white}
.live-class textarea{width:100%;resize:vertical}
.live-class .topbar{height:auto;min-height:76px;padding-block:12px;flex-wrap:wrap}
.live-class .top-actions{flex-wrap:wrap}
.live-class .page{max-width:1600px}
.live-class .page-heading h1{font-size:2.6rem}
.live-brief{background:var(--navy);color:#eaf5f7;border-radius:18px;display:flex;align-items:center;justify-content:space-between;padding:22px 26px;gap:24px;margin:20px 0}
.live-brief>div:first-child{max-width:680px}
.live-brief strong{display:block;margin:12px 0 6px;font-size:1.125rem}
.live-brief p{margin:0;font-size:.875rem;color:#b5c9d4}
.live-brief .tag{background:#1b3545;color:#b8e5dd}
.live-brief>div:last-child{min-width:160px}
.live-brief>div:last-child p{margin-top:8px}
.live-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(280px,.9fr);gap:22px;align-items:start}
.live-activity{padding:28px;min-height:510px}
.live-activity-head{display:flex;gap:18px;justify-content:space-between;align-items:flex-start}
.live-activity-head h2{font-size:1.8rem;margin-bottom:14px}
.live-clock{font-variant-numeric:tabular-nums;border:1px solid var(--line);padding:8px 12px;border-radius:9px;white-space:nowrap;font-weight:700}
.live-prompt{font-size:1.1rem;line-height:1.65;white-space:pre-wrap}
.live-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0}
.live-controls button[aria-pressed=true]{background:var(--teal-dark);color:white;border-color:var(--teal-dark)}
.live-class button:disabled{opacity:.5;cursor:not-allowed;transform:none;box-shadow:none}
.live-class .button{white-space:normal}
.live-lesson{white-space:pre-wrap;font-family:Georgia,serif;font-size:1.5rem;line-height:1.8;padding:26px;border-left:4px solid var(--teal);background:#f2f7fc}
.live-side{overflow:hidden}
.live-tabs{display:flex;background:#f7fafb;border-bottom:1px solid var(--line)}
.live-tabs button{flex:1;padding:16px 7px;border:0;border-bottom:3px solid transparent;background:transparent;color:var(--muted);font:700 .875rem system-ui}
.live-tabs button[aria-pressed=true]{color:var(--teal-dark);border-bottom-color:var(--teal-dark)}
#live-side-body{padding:22px;max-height:840px;overflow-y:auto}
.live-question{padding:18px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.live-question p{margin:10px 0;white-space:pre-wrap}
.live-question small{color:var(--muted)}
.live-answer{padding:12px;background:#eaf6f2;border-radius:8px}
.live-link{display:inline-block;color:var(--teal-dark);text-decoration:underline;font-size:.875rem;margin-top:8px}
.live-agenda{list-style:none;padding:0;display:grid;gap:12px}
.live-agenda li{padding:12px;border:1px solid var(--line);border-radius:10px;display:grid;gap:8px}
.live-agenda button{justify-self:start}
.live-person{display:flex;gap:10px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}
.live-person strong{font-size:.875rem}
.live-person p{font-size:.875rem;margin:3px 0;color:var(--muted)}
.live-person button{margin-left:auto}
.live-board{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.live-note{background:#f5edca;border-top:3px solid #b89c3b;padding:18px;border-radius:4px 4px 12px 12px;overflow-wrap:anywhere}
.live-note:nth-child(even){background:#daf2ea;border-color:var(--teal-dark)}
.live-note p{white-space:pre-wrap}
.live-note small{font-size:.75rem;color:#526354}
.live-note.muted{opacity:.55}
.live-note button{display:block;margin-top:8px}
.live-teams{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.live-team{padding:18px;border:1px solid var(--line);border-radius:12px;background:#f8fafb}
.live-text{white-space:pre-wrap;overflow-wrap:anywhere}
.live-results{margin:22px 0}
.live-result{margin:14px 0}
.live-result>div{display:flex;justify-content:space-between;gap:14px;font-size:.875rem}
.live-result progress{width:100%;height:10px;accent-color:var(--teal-dark)}
.live-open-answers article{padding:16px 0;border-bottom:1px solid var(--line)}
.live-wait{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:400px;max-width:540px;margin:auto}
.live-wait h2{font-size:2.5rem}
#live-dialog{width:min(800px,calc(100% - 24px));border:1px solid var(--line);border-radius:20px;max-height:88dvh;padding:26px;color:var(--ink)}
#live-dialog::backdrop{background:rgba(3,17,27,.6)}
.live-timeline{padding:0;list-style:none;max-height:300px;overflow:auto}
.live-timeline li{display:flex;gap:20px;padding:10px;border-bottom:1px solid var(--line)}
.live-timeline time{font-variant-numeric:tabular-nums;color:var(--teal-dark)}
.live-chapter{margin:20px 0;padding:22px;background:#f5f8fa;border-radius:14px}
.live-chapter h3{margin-top:12px}
#activity-error{color:#a82d3e}
@media(max-width:1050px){.live-grid{grid-template-columns:1fr}.live-side{max-width:100%}#live-side-body{max-height:600px}.live-brief{flex-wrap:wrap}}
@media(max-width:600px){.live-activity{padding:20px}.live-board,.live-teams{grid-template-columns:1fr}.live-activity-head{flex-wrap:wrap}.live-class .top-actions{margin-left:0}.live-class .page-heading h1{font-size:2rem}.live-brief{padding:20px}.live-lesson{font-size:1.2rem;padding:18px}}

/* Personalización del campus */
.theme-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:10px; }
.theme-choice { border:1px solid var(--line); border-radius:14px; background:#fff; padding:12px; text-align:left; cursor:pointer; transition:.15s ease; }
.theme-choice:hover { transform:translateY(-1px); box-shadow:0 8px 20px rgba(16,24,39,.08); }
.theme-choice.on { border-color:var(--brand-accent,var(--teal)); box-shadow:0 0 0 3px rgba(var(--brand-accent-rgb,47,143,214),.12); }
.theme-choice b { display:block; margin-bottom:8px; font-size:14px; }
.theme-swatches { display:flex; gap:5px; }
.theme-swatches i { display:block; width:30px; height:18px; border-radius:6px; border:1px solid rgba(16,24,39,.08); }
.theme-custom-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; margin-top:12px; padding:12px; border:1px dashed var(--line); border-radius:12px; background:#fbfcfd; }
.theme-custom-grid .field { margin:0; }
.theme-custom-grid input[type="color"] { padding:4px; min-height:44px; }
.theme-preview { margin-top:12px; border:1px solid var(--line); border-radius:16px; overflow:hidden; background:#fff; }
.theme-preview .tp-head { padding:14px 16px; color:#fff; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.theme-preview .tp-body { padding:16px; display:grid; gap:12px; }
.theme-preview .tp-card { border-radius:12px; padding:14px; background:#fff; border:1px solid rgba(16,24,39,.08); }
.theme-preview .tp-btn { display:inline-block; color:#fff; padding:9px 14px; border-radius:9px; font-weight:800; }
.theme-preview small { color:#697386; }
