:root {
  --navy: #092d5e;
  --blue: #174b87;
  --blue-soft: #eaf1f9;
  --gold: #d6ad4b;
  --gold-dark: #9b7118;
  --ink: #17233b;
  --muted: #667085;
  --line: #e2e8f0;
  --surface: #ffffff;
  --background: #f4f6f8;
  --success: #087f5b;
  --danger: #b42318;
  --radius: 20px;
  --shadow: 0 20px 55px rgba(22, 42, 75, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(1.8rem, 3vw, 2.45rem); line-height: 1.08; letter-spacing: -.035em; }
h2 { margin-bottom: 8px; font-size: 1.2rem; letter-spacing: -.018em; }
p { line-height: 1.65; }
.container, .container-wide { width: min(1240px, calc(100% - 32px)); margin-inline: auto; }
.container-wide { width: min(1440px, calc(100% - 32px)); }
.container.narrow { max-width: 650px; }
.page { padding-block: 34px 64px; }
.page-top-none { padding-top: 16px; }
.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 22px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .76rem; }
.eyebrow { margin: 0 0 8px; color: var(--gold-dark); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.light { color: #f4d98f; }

.app-header { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: 0 6px 24px rgba(20,38,70,.05); backdrop-filter: blur(14px); }
.header-main { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand span:last-child { display: grid; gap: 3px; min-width: 0; }
.brand strong { font-size: .95rem; }
.brand small { color: #8a94a6; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.brand.inverse small { color: #bfd3eb; }
.brand-mark { display: inline-grid; width: 48px; height: 48px; place-items: center; flex: 0 0 auto; border-radius: 14px; background: var(--navy); color: #f5d982; font-size: .72rem; font-weight: 900; }
.account-block { display: flex; align-items: center; gap: 12px; }
.avatar { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--navy); font-size: .72rem; font-weight: 900; }
.account-copy { display: grid; max-width: 230px; }
.account-copy strong, .account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: .78rem; }
.account-copy small { margin-top: 3px; color: #8a94a6; font-size: .65rem; }
.top-nav { display: flex; gap: 5px; overflow-x: auto; padding-block: 9px; border-top: 1px solid #f0f2f5; scrollbar-width: none; }
.top-nav::-webkit-scrollbar { display: none; }
.top-nav a { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 10px 14px; border-radius: 12px; color: #5b6575; font-size: .76rem; font-weight: 800; }
.top-nav a:hover { background: #f3f6f9; }
.top-nav a.active { background: var(--navy); color: white; }
.top-nav a.upcoming { color: #98a2b3; }
.top-nav small { padding: 2px 6px; border-radius: 999px; background: #f0f2f5; font-size: .54rem; text-transform: uppercase; }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 13px; padding: 10px 17px; font-size: .78rem; font-weight: 800; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--navy); color: white; box-shadow: 0 8px 18px rgba(9,45,94,.14); }
.button.primary:hover { background: var(--blue); }
.button.secondary { border-color: #bdd0e5; background: white; color: var(--blue); }
.button.gold { background: var(--gold); color: var(--ink); }
.button.ghost { border-color: var(--line); background: white; color: #566174; }
.button.danger-outline { border-color: #f1b5af; background: #fff; color: var(--danger); }
.button.compact { min-height: 38px; padding: 8px 13px; }
.button.wide { width: 100%; }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; }

label { display: grid; gap: 8px; color: #344054; font-size: .76rem; font-weight: 800; }
input, select, textarea { width: 100%; min-height: 45px; border: 1px solid #d9e0e8; border-radius: 12px; outline: none; background: #fff; padding: 11px 13px; color: var(--ink); font-size: .86rem; transition: .16s ease; }
input:focus, select:focus, textarea:focus { border-color: #6291c5; box-shadow: 0 0 0 4px rgba(42,102,166,.10); }
input[readonly], textarea[readonly], select:disabled { background: #f7f8fa; color: #667085; }
textarea { min-height: 104px; resize: vertical; line-height: 1.55; }
fieldset { display: grid; gap: 16px; margin: 0; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
legend { padding: 0 8px; color: var(--navy); font-size: .78rem; font-weight: 900; }
.grid, .form-grid { display: grid; gap: 16px; }
.grid.two, .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-two { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 11px; border: 1px solid #ead9a7; border-radius: 14px; background: #fffbef; padding: 14px; color: #5e4813; line-height: 1.55; }
.check input { width: 17px; min-height: auto; height: 17px; margin-top: 2px; accent-color: var(--blue); }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: .88rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 26px; box-shadow: 0 8px 26px rgba(20,38,70,.035); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.card-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: .8rem; }
.split-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .75fr); gap: 22px; margin-block: 22px; }
.split-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.sticky-card { position: sticky; top: 145px; }
.back-link { display: inline-flex; margin-bottom: 18px; color: var(--blue); font-size: .78rem; font-weight: 800; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.metrics article { border: 1px solid var(--line); border-radius: 18px; background: white; padding: 20px; }
.metrics strong { display: block; margin-top: 16px; font-size: 1.9rem; letter-spacing: -.04em; }
.metrics p { margin: 4px 0 0; color: #536074; font-size: .75rem; font-weight: 800; }
.metric-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 11px; background: var(--blue-soft); color: var(--blue); font-size: .64rem; font-weight: 900; }

.hero-card, .submit-card { display: grid; grid-template-columns: 1fr 260px; align-items: center; gap: 28px; margin-bottom: 22px; border-radius: 24px; background: linear-gradient(135deg, #07264f, #174b87); padding: 30px; color: white; overflow: hidden; }
.hero-card h2, .submit-card h2 { font-size: 1.55rem; }
.hero-card p, .submit-card p { margin-bottom: 0; color: #d8e6f6; font-size: .86rem; }
.progress-panel { border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(255,255,255,.09); padding: 20px; }
.progress-panel strong { display: block; font-size: 1.8rem; }
.progress-panel span { display: block; margin-top: 3px; color: #c8ddf5; font-size: .7rem; font-weight: 700; }
.progress { height: 7px; margin-top: 16px; border-radius: 99px; background: rgba(255,255,255,.13); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.submit-card { grid-template-columns: 1fr auto; margin-top: 22px; background: #173d6d; }

.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0 0 22px; padding: 0; list-style: none; }
.steps li { position: relative; display: grid; justify-items: center; gap: 8px; color: #98a2b3; text-align: center; font-size: .68rem; font-weight: 800; }
.steps li::before { position: absolute; z-index: 0; top: 15px; right: 50%; left: -50%; height: 2px; background: #dfe5eb; content: ''; }
.steps li:first-child::before { display: none; }
.steps b { position: relative; z-index: 1; display: grid; width: 31px; height: 31px; place-items: center; border: 4px solid var(--background); border-radius: 50%; background: #dce2e9; color: #7a8595; font-size: .65rem; }
.steps .done b, .steps .current b { background: var(--blue); color: white; }
.steps .done::before { background: var(--blue); }
.steps .done, .steps .current { color: var(--ink); }

.details-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0; }
.details-grid dt, .mini-details dt { color: #98a2b3; font-size: .62rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.details-grid dd, .mini-details dd { margin: 6px 0 0; overflow-wrap: anywhere; color: #334155; font-size: .82rem; font-weight: 700; line-height: 1.45; }
.mini-details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; border-radius: 14px; background: #f7f9fb; padding: 15px; }
.account-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.account-chips span { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 13px; background: #f8fafc; padding: 13px; }
.account-chips b { font-size: .75rem; }
.account-chips small { overflow-wrap: anywhere; color: #7b8797; font-size: .64rem; line-height: 1.4; }
.record-switcher { display: flex; gap: 9px; margin: -2px 0 22px; overflow-x: auto; padding: 2px 2px 8px; }
.record-switcher a { display: grid; min-width: 210px; gap: 3px; border: 1px solid var(--line); border-radius: 13px; background: white; padding: 11px 13px; color: var(--ink); }
.record-switcher a.active { border-color: var(--blue); background: #edf5fc; box-shadow: 0 6px 16px rgba(9,45,94,.08); }
.record-switcher strong { color: var(--blue); font-size: .68rem; }
.record-switcher span { font-size: .72rem; font-weight: 750; line-height: 1.3; }

.pill, .status { display: inline-flex; width: fit-content; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: .62rem; font-weight: 900; letter-spacing: .03em; }
.pill { background: #f0f3f6; color: #657083; }
.pill.light { border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: #d7e7f7; }
.status.large { padding: 9px 14px; font-size: .68rem; }
.status-success { border: 1px solid #a9e3cc; background: #eafaf4; color: #087f5b; }
.status-danger { border: 1px solid #f6c7c2; background: #fff1f0; color: #b42318; }
.status-info { border: 1px solid #b9d3ed; background: #edf5fc; color: #175c9c; }
.status-warning { border: 1px solid #efd79d; background: #fff8e6; color: #896014; }
.status-muted { border: 1px solid #dfe4ea; background: #f4f6f8; color: #667085; }

.table-card { margin-top: 22px; padding: 0; overflow: hidden; }
.table-card .card-heading { margin: 0; padding: 22px 24px; border-bottom: 1px solid #edf0f3; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background: #f8fafc; color: #8a94a6; font-size: .6rem; letter-spacing: .09em; text-transform: uppercase; }
th, td { padding: 14px 18px; border-bottom: 1px solid #edf0f3; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td { color: #526074; font-size: .76rem; }
td strong, td small { display: block; }
td strong { color: #29364b; font-size: .78rem; }
td small { margin-top: 4px; color: #98a2b3; }
code { border-radius: 6px; background: #f1f4f7; padding: 4px 7px; color: #34506f; font-family: Consolas, monospace; font-size: .68rem; }
.text-link { color: var(--blue); font-weight: 900; white-space: nowrap; }
.empty { padding: 30px; color: #98a2b3; text-align: center; }

.upload-box { position: relative; min-height: 104px; place-items: center; border: 1px dashed #8aacd1; border-radius: 15px; background: #f2f7fc; padding: 18px; color: var(--blue); text-align: center; cursor: pointer; }
.upload-box input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-box span { color: #78869a; font-size: .68rem; font-weight: 600; }
.note, .success-note { margin-top: 20px; border-radius: 14px; background: #f4f7fa; padding: 15px; }
.note p, .success-note p { margin: 5px 0 0; color: #637083; font-size: .76rem; }
.note.warning { border: 1px solid #efdaa7; background: #fff9ea; }
.success-note { margin-bottom: 16px; background: #ebfaf4; color: var(--success); }

.timeline { position: relative; }
.timeline article { position: relative; display: flex; gap: 16px; padding: 0 0 24px; }
.timeline article::before { position: absolute; top: 14px; bottom: -4px; left: 6px; width: 1px; background: #dce2e8; content: ''; }
.timeline article:last-child::before { display: none; }
.timeline i { position: relative; z-index: 1; width: 13px; height: 13px; flex: 0 0 auto; margin-top: 5px; border: 3px solid white; border-radius: 50%; background: #c8d0da; box-shadow: 0 0 0 1px #dce2e8; }
.timeline article.current i { background: var(--gold); }
.timeline article > div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px 10px; }
.timeline time { color: #98a2b3; font-size: .68rem; }
.timeline strong, .timeline p { grid-column: 1 / -1; }
.timeline strong { font-size: .78rem; }
.timeline p { margin: 0; color: #667085; font-size: .76rem; }

.route-list { display: grid; gap: 11px; }
.route-list article { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 15px; padding: 14px; }
.route-list article > b { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #f0f3f6; color: #8a94a6; }
.route-list article.available { border-color: #bad0e7; background: #f4f8fc; }
.route-list article.available > b { background: var(--blue); color: white; }
.route-list strong { font-size: .8rem; }
.route-list p { margin: 4px 0 0; color: #78869a; font-size: .7rem; }
.route-list span { color: #98a2b3; font-size: .62rem; font-weight: 800; }
.route-list .available span { color: var(--success); }

.login-shell { display: grid; min-height: 100vh; grid-template-columns: 1.06fr .94fr; }
.login-hero { position: relative; display: flex; min-height: 720px; flex-direction: column; justify-content: space-between; overflow: hidden; background: radial-gradient(circle at 90% 10%, rgba(214,173,75,.13), transparent 30%), linear-gradient(145deg, #061f42, #0b356b 65%, #174b87); padding: 50px; color: white; }
.login-hero::after { position: absolute; right: -120px; bottom: -170px; width: 420px; height: 420px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; content: ''; }
.login-message { position: relative; z-index: 1; max-width: 650px; }
.login-message h1 { margin-top: 20px; font-size: clamp(2.4rem, 4.5vw, 4.6rem); line-height: 1.02; }
.login-message > p { max-width: 580px; color: #c5d9ef; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.feature-grid div { display: grid; gap: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.07); padding: 16px; }
.feature-grid b { color: #f2d47d; font-size: .7rem; }
.feature-grid span { font-size: .72rem; font-weight: 800; }
.login-panel { display: grid; place-items: center; padding: 32px; }
.login-card, .auth-card { width: min(460px, 100%); border: 1px solid var(--line); border-radius: 26px; background: white; padding: 38px; box-shadow: var(--shadow); }
.login-card h2 { font-size: 1.8rem; }
.login-note { margin: 24px 0 0; border-top: 1px solid #eef1f4; padding-top: 18px; }
.center-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at top, #eaf1f9, transparent 45%); }
.center-page .brand-mark { margin-bottom: 26px; }

.installer-body { background: #eef2f6; }
.installer-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(300px, .8fr) minmax(540px, 1.2fr); }
.installer-hero { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; justify-content: center; background: linear-gradient(150deg, #061f42, #174b87); padding: clamp(36px, 6vw, 82px); color: white; }
.installer-hero h1 { margin-top: 24px; font-size: clamp(2.2rem, 4vw, 4rem); }
.installer-hero > p:not(.eyebrow) { color: #c4d9ef; }
.installer-features { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.installer-features span { border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(255,255,255,.07); padding: 8px 12px; font-size: .68rem; font-weight: 800; }
.installer-card { align-self: center; width: min(780px, calc(100% - 40px)); margin: 36px auto; border: 1px solid var(--line); border-radius: 28px; background: white; padding: clamp(28px, 5vw, 50px); box-shadow: var(--shadow); }
.installer-card > h2 { font-size: 1.7rem; }
.requirements { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0 26px; }
.requirement { border-radius: 999px; padding: 6px 10px; background: #f1f4f7; color: #657083; font-size: .64rem; font-weight: 800; }
.requirement.ok { background: #e9f8f2; color: var(--success); }
.requirement.bad { background: #fff0ef; color: var(--danger); }
.alert { margin-block: 18px; border-radius: 14px; padding: 14px; font-size: .78rem; }
.alert p { margin: 0; }
.alert.danger { border: 1px solid #f2bbb5; background: #fff1f0; color: var(--danger); }
.success-panel { text-align: center; }
.success-panel .button { margin-top: 18px; }
.success-icon { display: grid; width: 68px; height: 68px; place-items: center; margin: 0 auto 22px; border-radius: 50%; background: #e6f8f1; color: var(--success); font-size: 2rem; }

.toast { position: fixed; z-index: 80; top: 140px; right: 18px; display: grid; max-width: min(390px, calc(100% - 36px)); gap: 3px; border: 1px solid #b7d9c9; border-radius: 14px; background: white; padding: 14px 17px; color: #235943; box-shadow: var(--shadow); }
.toast.error { border-color: #f1b9b4; color: var(--danger); }
.toast strong { font-size: .72rem; }
.toast span { font-size: .76rem; line-height: 1.45; }
.activation-box { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; border: 1px solid #f0d58f; border-radius: 18px; background: #fff9e9; padding: 20px; }
.activation-box p:last-child { margin: 0; color: #745a22; font-size: .76rem; }
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row input { min-width: 0; }
.template-editor { min-height: 430px; font-family: Georgia, serif; line-height: 1.7; }
.token-list { display: flex; flex-wrap: wrap; gap: 8px; }
.upcoming-card, .empty-state { display: grid; min-height: 480px; place-items: center; align-content: center; border: 1px solid var(--line); border-radius: 26px; background: white; padding: 40px; text-align: center; }
.upcoming-card p:not(.eyebrow), .empty-state p { max-width: 620px; color: var(--muted); }
.upcoming-card .metric-icon { margin-bottom: 18px; }
.site-footer { border-top: 1px solid var(--line); background: white; color: #8a94a6; font-size: .66rem; }
.site-footer > div { display: flex; justify-content: space-between; gap: 20px; padding-block: 22px; }

/* Consola administrativa */
.admin-console { position: relative; }
.admin-console::before { position: fixed; z-index: -1; top: 110px; right: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(23,75,135,.065), transparent 68%); content: ''; pointer-events: none; }
.metrics-premium article, .compact-metrics article { position: relative; overflow: hidden; }
.metrics-premium article::after { position: absolute; top: 0; right: 0; width: 72px; height: 72px; border-radius: 0 0 0 72px; background: linear-gradient(135deg, transparent, rgba(23,75,135,.055)); content: ''; }
.metrics strong small { color: #98a2b3; font-size: .85rem; font-weight: 700; }
.compact-metrics article { display: grid; grid-template-columns: 44px 1fr; align-items: center; column-gap: 13px; padding: 16px 18px; }
.compact-metrics .metric-icon { grid-row: 1 / 3; }
.compact-metrics strong { margin: 0; font-size: 1.45rem; }
.compact-metrics p { margin: 2px 0 0; }
.control-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.control-card { position: relative; display: flex; min-height: 270px; flex-direction: column; justify-content: space-between; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 25px; color: white; box-shadow: 0 18px 40px rgba(12,40,75,.13); transition: transform .2s ease, box-shadow .2s ease; }
.control-card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px rgba(12,40,75,.18); }
.control-card::after { position: absolute; right: -52px; bottom: -62px; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; content: ''; }
.control-card.violet { background: linear-gradient(145deg, #3c2c75, #6551a4); }
.control-card.blue { background: linear-gradient(145deg, #082b58, #1c65a8); }
.control-card.gold-card { background: linear-gradient(145deg, #76531a, #b4872d); }
.control-card .control-icon { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: rgba(255,255,255,.10); font-size: .7rem; font-weight: 900; }
.control-card .eyebrow { color: rgba(255,255,255,.68); }
.control-card h2 { font-size: 1.55rem; }
.control-card p { margin-bottom: 0; color: rgba(255,255,255,.76); font-size: .78rem; }
.control-card > b { position: relative; z-index: 1; font-size: .75rem; }
.security-chip { display: inline-flex; align-items: center; border: 1px solid #c7d9ea; border-radius: 999px; background: #f2f7fc; padding: 7px 11px; color: var(--blue); font-size: .62rem; font-weight: 900; }
.user-creator { border-top: 4px solid var(--navy); }
.role-picker-label select { border-color: #aac2dd; background: linear-gradient(180deg, #fff, #f6f9fc); font-weight: 800; }
.role-fields { background: #f8fafc; }
.role-fields[hidden] { display: none; }
.inner-grid { padding-top: 2px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); padding-top: 20px; }
.management-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 20px; margin-top: 22px; }
.management-layout .table-card { margin-top: 0; }
.import-panel { position: sticky; top: 154px; }
.directory-toolbar, .subject-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); background: #fbfcfd; padding: 15px 22px; }
.directory-toolbar label { min-width: 185px; }
.directory-toolbar .search-field { flex: 1; }
.directory-toolbar input, .directory-toolbar select, .subject-toolbar input { min-height: 40px; }
.role-badge { display: inline-flex; margin-bottom: 5px; border-radius: 999px; padding: 4px 8px; background: #eef2f6; color: #516070; font-size: .59rem; font-weight: 900; }
.role-badge.role-superadmin { background: #eee9fb; color: #5c3e99; }
.role-badge.role-director { background: #eaf2fb; color: #155a99; }
.role-badge.role-liaison { background: #e9f8f2; color: #087f5b; }
.role-badge.role-coordination, .role-badge.role-reviewer { background: #fff5dc; color: #805b14; }
.row-actions { position: relative; }
.row-actions summary { color: var(--blue); font-weight: 900; cursor: pointer; list-style: none; white-space: nowrap; }
.row-actions summary::-webkit-details-marker { display: none; }
.action-popover { position: absolute; z-index: 15; top: 28px; right: 0; display: grid; width: 280px; gap: 13px; border: 1px solid var(--line); border-radius: 15px; background: white; padding: 15px; box-shadow: var(--shadow); }
.action-popover form { display: grid; gap: 9px; }
.button.danger-soft { border-color: #f0c7c2; background: #fff4f2; color: var(--danger); }

/* Conexión de asignaturas */
.sheet-connect { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 20px; }
.sheet-form-card { border-top: 4px solid #34a853; }
.sheet-help { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; border-radius: 14px; background: #f6f8fa; padding: 13px; }
.sheet-help span { color: #7a8797; font-size: .66rem; font-weight: 800; }
.sync-meta { margin: 18px 0 0; color: var(--muted); font-size: .72rem; }
.process-card { background: linear-gradient(160deg, #092d5e, #174b87); color: white; }
.process-card .eyebrow { color: #f2d47d; }
.process-card .note { background: rgba(255,255,255,.09); }
.process-card .note p { color: #d3e2f2; }
.mini-process { display: grid; gap: 15px; margin: 22px 0; padding: 0; list-style: none; }
.mini-process li { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 12px; }
.mini-process b { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: rgba(255,255,255,.11); color: #f2d47d; }
.mini-process span { color: #d7e5f4; font-size: .75rem; line-height: 1.5; }
.inline-progress { display: inline-block; width: 90px; height: 6px; border-radius: 99px; background: #edf0f3; overflow: hidden; }
.inline-progress i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.subject-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.subject-preview-grid article { border: 1px solid var(--line); border-radius: 15px; padding: 15px; }
.subject-preview-grid article > div { display: flex; justify-content: space-between; gap: 8px; }
.subject-preview-grid article span { color: var(--blue); font-size: .62rem; font-weight: 900; }
.subject-preview-grid h3 { margin: 14px 0 7px; font-size: .85rem; }
.subject-preview-grid p { margin: 0; color: var(--muted); font-size: .7rem; }

/* Trámite guiado de Dirección */
.director-space { max-width: 1120px; }
.wizard-shell { overflow: hidden; border: 1px solid #d7e1ec; border-radius: 27px; background: white; box-shadow: 0 24px 60px rgba(19,45,80,.10); }
.wizard-header { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 25px; background: radial-gradient(circle at 85% 0, rgba(214,173,75,.20), transparent 32%), linear-gradient(135deg, #071f42, #11477e); padding: 28px 32px; color: white; }
.wizard-header h2 { font-size: 1.55rem; }
.wizard-header p:last-child { margin: 0; color: #c9daec; font-size: .8rem; }
.wizard-progress { display: grid; min-width: 105px; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 17px; background: rgba(255,255,255,.08); padding: 15px; }
.wizard-progress strong { font-size: 1.4rem; }
.wizard-progress span { color: #cbdcee; font-size: .62rem; }
.wizard-nav { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; border-bottom: 1px solid var(--line); background: #f8fafc; padding: 20px 22px; list-style: none; }
.wizard-nav li { position: relative; display: grid; justify-items: center; gap: 7px; color: #9aa5b4; text-align: center; font-size: .64rem; font-weight: 800; }
.wizard-nav li::before { position: absolute; top: 14px; right: 50%; left: -50%; height: 2px; background: #dfe5ec; content: ''; }
.wizard-nav li:first-child::before { display: none; }
.wizard-nav b { position: relative; z-index: 1; display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; background: #dfe5ec; font-size: .65rem; }
.wizard-nav li.done::before, .wizard-nav li.done b { background: #16966d; color: white; }
.wizard-nav li.current b { background: var(--blue); color: white; box-shadow: 0 0 0 5px rgba(23,75,135,.10); }
.wizard-nav li.done, .wizard-nav li.current { color: #344054; }
.wizard-stage { min-height: 480px; padding: clamp(24px, 4vw, 45px); }
.wizard-panel { max-width: 860px; margin-inline: auto; }
.wizard-panel h3 { margin-bottom: 8px; font-size: 1.45rem; letter-spacing: -.03em; }
.step-intro { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.step-intro > span { display: grid; width: 48px; height: 48px; place-items: center; flex: 0 0 auto; border-radius: 14px; background: var(--blue-soft); color: var(--blue); font-weight: 900; }
.step-intro p:last-child { margin: 0; color: var(--muted); font-size: .8rem; }
.step-intro.centered { justify-content: center; text-align: left; }
.centered-panel { display: grid; max-width: 760px; justify-items: center; padding-top: 20px; text-align: center; }
.centered-panel > p:not(.eyebrow) { max-width: 620px; color: var(--muted); }
.success-orb, .waiting-orb { display: grid; width: 74px; height: 74px; place-items: center; margin-bottom: 20px; border-radius: 50%; background: #e7f8f1; color: #087f5b; font-size: 1.9rem; font-weight: 900; box-shadow: 0 0 0 9px #f4fbf8; }
.waiting-orb { background: #edf5fc; color: var(--blue); box-shadow: 0 0 0 9px #f6f9fc; animation: waiting 1.5s ease-in-out infinite; }
@keyframes waiting { 50% { transform: scale(1.05); } }
.review-summary { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 20px 0 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); text-align: left; }
.review-summary div { background: #f9fafb; padding: 14px 16px; }
.review-summary dt { color: #98a2b3; font-size: .6rem; font-weight: 900; text-transform: uppercase; }
.review-summary dd { margin: 5px 0 0; color: #344054; font-size: .78rem; font-weight: 800; }
.wizard-actions { display: flex; align-items: center; justify-content: center; gap: 11px; margin-top: 22px; }
.wizard-actions form { margin: 0; }
.office-redownload { margin: 4px 0 18px; }
.upload-form { display: grid; width: min(600px, 100%); gap: 16px; }
.upload-box.prominent { min-height: 155px; border-width: 2px; background: linear-gradient(180deg, #f7fbff, #edf5fc); }
.document-confirm { display: grid; width: min(540px, 100%); gap: 4px; margin: 18px 0; border: 1px solid #b5dfce; border-radius: 15px; background: #f1fbf7; padding: 16px; text-align: left; }
.document-confirm span, .document-confirm small { color: #678075; font-size: .65rem; }
.document-confirm strong { overflow-wrap: anywhere; color: #176c51; }
.waiting-meta { display: grid; width: min(500px, 100%); grid-template-columns: auto 1fr; gap: 8px 18px; margin: 20px 0; border-radius: 15px; background: #f7f9fb; padding: 16px; text-align: left; }
.waiting-meta span { color: #98a2b3; font-size: .65rem; text-transform: uppercase; }
.waiting-meta strong { color: #344054; font-size: .75rem; }
.review-alert { max-width: 860px; margin: 0 auto 24px; border: 1px solid #efd28f; border-radius: 15px; background: #fff8e6; padding: 16px; color: #785715; }
.review-alert p { margin: 5px 0 0; font-size: .78rem; }
.history-layout { display: grid; gap: 22px; }
.history-layout > .table-card { margin-top: 0; }
.empty-icon { display: grid; width: 58px; height: 58px; place-items: center; margin-bottom: 18px; border-radius: 16px; background: var(--blue-soft); color: var(--blue); font-weight: 900; }

/* Panel operativo del Enlace */
.liaison-hero { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 25px; overflow: hidden; border-radius: 25px; background: radial-gradient(circle at 82% 0, rgba(78,190,151,.18), transparent 32%), linear-gradient(140deg, #06284e, #145587); padding: 30px; color: white; }
.liaison-hero h2 { font-size: 1.55rem; }
.liaison-hero p:last-child { margin: 0; color: #cee0ef; font-size: .8rem; }
.unit-code { display: inline-flex; margin-bottom: 11px; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; background: rgba(255,255,255,.09); padding: 6px 10px; color: #f4d98f; font-size: .64rem; font-weight: 900; }
.completion-ring { --progress: 0; display: grid; width: 112px; height: 112px; place-items: center; align-content: center; border-radius: 50%; background: radial-gradient(closest-side, #124e7e 79%, transparent 80% 100%), conic-gradient(#5dd6aa calc(var(--progress) * 1%), rgba(255,255,255,.13) 0); }
.completion-ring strong { font-size: 1.35rem; }
.completion-ring span { color: #c8dbea; font-size: .62rem; }
.traffic-metrics { margin-top: 18px; }
.traffic-metrics article { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; }
.traffic-metrics .traffic-dot { grid-row: 1 / 3; }
.traffic-metrics strong { margin: 0; font-size: 1.5rem; }
.traffic-dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 0 0 6px #f1f3f6; }
.traffic-dot.green { background: #12a071; box-shadow: 0 0 0 6px #e7f8f1; }
.traffic-dot.yellow { background: #daa125; box-shadow: 0 0 0 6px #fff7df; }
.traffic-dot.red { background: #d04437; box-shadow: 0 0 0 6px #fff0ee; }
.traffic-dot.none { background: #a3adba; }
.subject-catalog { padding: 0; overflow: hidden; }
.subject-catalog .card-heading { margin: 0; padding: 23px 25px; }
.subject-toolbar .search-field { flex: 1; max-width: 460px; }
.filter-pills { display: flex; gap: 6px; overflow-x: auto; }
.filter-pills button { border: 1px solid var(--line); border-radius: 999px; background: white; padding: 8px 11px; color: #687587; font-size: .65rem; font-weight: 900; }
.filter-pills button.active { border-color: var(--navy); background: var(--navy); color: white; }
.subject-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 22px; }
.subject-card { position: relative; display: flex; min-height: 190px; flex-direction: column; border: 1px solid var(--line); border-top: 4px solid #b7c0cc; border-radius: 17px; background: white; padding: 17px; transition: transform .18s ease, box-shadow .18s ease; }
.subject-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20,40,70,.10); }
.subject-card.traffic-green { border-top-color: #12a071; }
.subject-card.traffic-yellow { border-top-color: #daa125; }
.subject-card.traffic-red { border-top-color: #d04437; }
.subject-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.traffic-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: #f0f2f5; padding: 5px 8px; color: #6d7888; font-size: .59rem; font-weight: 900; }
.traffic-badge i { width: 7px; height: 7px; border-radius: 50%; background: #a4adba; }
.traffic-green .traffic-badge, .traffic-badge.traffic-green { background: #e9f8f2; color: #087f5b; }
.traffic-green .traffic-badge i, .traffic-badge.traffic-green i { background: #12a071; }
.traffic-yellow .traffic-badge, .traffic-badge.traffic-yellow { background: #fff6dc; color: #846018; }
.traffic-yellow .traffic-badge i, .traffic-badge.traffic-yellow i { background: #daa125; }
.traffic-red .traffic-badge, .traffic-badge.traffic-red { background: #fff0ee; color: #a53229; }
.traffic-red .traffic-badge i, .traffic-badge.traffic-red i { background: #d04437; }
.traffic-badge.large { padding: 9px 13px; font-size: .67rem; }
.subject-card h3 { margin: 18px 0 7px; font-size: .9rem; line-height: 1.35; }
.subject-card > p { margin: 0 0 17px; color: var(--muted); font-size: .68rem; }
.subject-card footer { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; border-top: 1px solid #eef1f4; padding-top: 13px; color: #7d8897; font-size: .65rem; }
.subject-card footer b { color: var(--blue); }
.subject-filter-empty { grid-column: 1 / -1; padding: 45px; text-align: center; }
.subject-filter-empty p { margin: 6px 0 0; color: var(--muted); font-size: .75rem; }
.subject-empty { min-height: 360px; }
.contact-strip { display: grid; grid-template-columns: 300px 1fr; gap: 26px; margin-top: 22px; }
.contact-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.contact-form .button { align-self: end; }

/* Editor de semaforización y docentes */
.container.narrow-wide { max-width: 1040px; }
.subject-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.subject-heading .unit-code { border-color: #cbd9e8; background: #edf4fb; color: var(--blue); }
.subject-heading p:last-child { margin: 0; color: var(--muted); }
.assessment-form { display: grid; gap: 20px; }
.traffic-options { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.traffic-option { cursor: pointer; }
.traffic-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.traffic-option > span { display: grid; min-height: 125px; place-items: center; align-content: center; gap: 5px; border: 2px solid var(--line); border-radius: 17px; background: #fbfcfd; transition: .18s ease; }
.traffic-option > span i { width: 19px; height: 19px; margin-bottom: 3px; border-radius: 50%; background: #9aa5b4; }
.traffic-option small { color: #8390a1; font-size: .64rem; font-weight: 600; }
.traffic-option.green span i { background: #12a071; box-shadow: 0 0 0 7px #e5f7f0; }
.traffic-option.yellow span i { background: #daa125; box-shadow: 0 0 0 7px #fff5d9; }
.traffic-option.red span i { background: #d04437; box-shadow: 0 0 0 7px #ffefed; }
.traffic-option.green input:checked + span { border-color: #12a071; background: #f0fbf7; box-shadow: 0 0 0 4px #e5f7f0; }
.traffic-option.yellow input:checked + span { border-color: #daa125; background: #fffbef; box-shadow: 0 0 0 4px #fff5d9; }
.traffic-option.red input:checked + span { border-color: #d04437; background: #fff5f3; box-shadow: 0 0 0 4px #ffefed; }
.teacher-list { display: grid; gap: 13px; }
.teacher-row { border: 1px solid var(--line); border-radius: 16px; background: #fafbfc; padding: 15px; }
.teacher-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.leader-choice { display: flex; align-items: center; gap: 8px; color: var(--blue); }
.leader-choice input { width: 16px; height: 16px; min-height: auto; accent-color: var(--blue); }
.remove-teacher { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #ead4d1; border-radius: 9px; background: white; color: var(--danger); font-size: 1.1rem; }
.teacher-fields { display: grid; grid-template-columns: 1.2fr 1fr .7fr; gap: 12px; }
.save-bar { position: sticky; z-index: 10; bottom: 15px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #cedae7; border-radius: 18px; background: rgba(255,255,255,.96); padding: 17px 20px; box-shadow: 0 16px 40px rgba(20,40,70,.13); backdrop-filter: blur(12px); }
.save-bar p { margin: 3px 0 0; color: var(--muted); font-size: .7rem; }
.button.is-loading::before { width: 13px; height: 13px; margin-right: 8px; border: 2px solid rgba(255,255,255,.35); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; content: ''; }
.button.secondary.is-loading::before, .button.ghost.is-loading::before { border-color: rgba(23,75,135,.2); border-top-color: currentColor; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Espacio operativo de la Unidad Académica */
.unit-command-hero { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 270px; align-items: center; gap: 34px; margin-bottom: 22px; border-radius: 28px; background: radial-gradient(circle at 85% 12%, rgba(214,173,75,.28), transparent 28%), linear-gradient(135deg,#061f43,#0d396f 58%,#1a538e); padding: 34px; color: white; overflow: hidden; box-shadow: 0 24px 54px rgba(9,45,94,.18); }
.unit-command-hero h1 { max-width: 850px; margin-bottom: 12px; }
.unit-command-hero p:last-child { max-width: 760px; margin: 0; color: #d6e4f3; font-size: .9rem; }
.inverse-code { border-color: rgba(255,255,255,.3) !important; background: rgba(255,255,255,.1) !important; color: #fff !important; }
.hero-progress { border: 1px solid rgba(255,255,255,.16); border-radius: 20px; background: rgba(255,255,255,.09); padding: 24px; backdrop-filter: blur(8px); }
.hero-progress strong { display: block; color: #f4d98f; font-size: 2.7rem; letter-spacing: -.06em; }
.hero-progress span { color: #d6e4f3; font-size: .72rem; font-weight: 800; }
.hero-progress i { display: block; height: 7px; margin-top: 17px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.hero-progress b { display: block; height: 100%; border-radius: inherit; background: #e7c56f; }
.workflow-board { display: grid; gap: 14px; margin: 22px 0; }
.workflow-card { display: grid; grid-template-columns: 54px minmax(0,1fr) auto; align-items: center; gap: 20px; border: 1px solid var(--line); border-radius: 20px; background: white; padding: 22px 24px; box-shadow: 0 8px 26px rgba(20,38,70,.035); transition: .2s ease; }
.workflow-card:hover { transform: translateY(-2px); border-color: #b8cce2; box-shadow: 0 16px 34px rgba(20,38,70,.08); }
.workflow-card > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: #edf2f7; color: #7b8798; font-size: .72rem; font-weight: 900; }
.workflow-card.current { border-color: #9ebbd9; background: linear-gradient(90deg,#f7fbff,#fff); }
.workflow-card.current > span { background: var(--navy); color: white; }
.workflow-card.complete > span { background: #e4f6ef; color: var(--success); }
.workflow-card h2 { margin-bottom: 4px; }
.workflow-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.workflow-card > b { color: var(--blue); font-size: .75rem; white-space: nowrap; }
.data-trust { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.data-trust h2 { margin: 0; }
.trust-points { display: flex; gap: 24px; }
.trust-points span { display: flex; align-items: center; gap: 9px; color: #536074; font-size: .72rem; font-weight: 800; }
.trust-points b { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: .65rem; }

.designation-digital-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 22px; align-items: start; }
.digital-form .acceptance-block { margin-top: 22px; border: 1px solid #dcc584; border-radius: 18px; background: linear-gradient(135deg,#fffdf6,#fff9e8); padding: 22px; }
.acceptance-block > p:not(.eyebrow) { color: #594918; font-size: .82rem; }
.digital-receipt { display: grid; grid-template-columns: 86px minmax(0,1fr); gap: 24px; border: 1px solid #b8dccf; border-radius: 26px; background: linear-gradient(135deg,#f6fffb,#fff 58%); padding: 30px; box-shadow: var(--shadow); }
.receipt-seal { display: grid; width: 72px; height: 72px; place-items: center; border: 8px solid #dff3eb; border-radius: 50%; background: var(--success); color: white; font-size: 1.7rem; font-weight: 900; }
.receipt-main > p { color: #536074; }
.receipt-main dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 24px 0; }
.receipt-main dl div { border: 1px solid #e1e9e6; border-radius: 14px; background: white; padding: 14px; }
.receipt-main dt { margin-bottom: 6px; color: #7b8792; font-size: .63rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.receipt-main dd { margin: 0; font-size: .82rem; font-weight: 800; }
.hash-box { border-radius: 14px; background: #102b4c; padding: 15px; color: white; }
.hash-box span { display: block; margin-bottom: 7px; color: #bdd3e9; font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.hash-box code { display: block; overflow-wrap: anywhere; color: #f4d98f; font-size: .7rem; }
.notice-card { margin-top: 16px; border: 1px solid #cbd8e6; border-radius: 16px; background: #f7fbff; padding: 17px 20px; }
.notice-card p { margin: 4px 0 0; color: #57677a; font-size: .75rem; }

.program-selector { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; border: 1px solid #cbd8e6; border-radius: 20px; background: linear-gradient(135deg,#f8fbff,#fff); padding: 20px 22px; }
.program-selector form { display: flex; align-items: end; gap: 12px; min-width: min(680px,100%); }
.program-selector form label { flex: 1; }
.program-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 16px; }
.program-stats span { display: inline-flex; align-items: center; gap: 7px; color: #586577; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.program-stats .traffic-dot { width: 9px; height: 9px; margin: 0; }
.semaphore-table-card { padding: 0; overflow: hidden; }
.semaphore-table { min-width: 900px; }
.semaphore-table-card .card-heading { align-items: end; margin: 0; padding: 24px 26px; }
.compact-search { min-width: 280px; }
.semaphore-table td { vertical-align: middle; }
.inline-traffic-form { margin: 0; }
.inline-traffic { display: flex; gap: 7px; }
.inline-traffic button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #d8e0e8; border-radius: 10px; background: white; }
.inline-traffic i { width: 11px; height: 11px; border-radius: 50%; background: #9da8b6; }
.inline-traffic .green i { background: #12a071; }
.inline-traffic .yellow i { background: #daa125; }
.inline-traffic .red i { background: #d04437; }
.inline-traffic button.selected { border-color: currentColor; transform: translateY(-1px); box-shadow: 0 0 0 3px currentColor; }
.inline-traffic .green.selected { color: rgba(18,160,113,.18); background: #f0fbf7; }
.inline-traffic .yellow.selected { color: rgba(218,161,37,.2); background: #fffbef; }
.inline-traffic .red.selected { color: rgba(208,68,55,.16); background: #fff5f3; }
.inline-traffic button.selected i { width: 13px; height: 13px; }
.danger-text { color: var(--danger) !important; }

.teacher-row.trained { border-color: #b8dccf; background: #f7fffb; }
.training-badge { margin-left: auto; margin-right: 10px; border-radius: 999px; background: #eef2f6; padding: 6px 9px; color: #6b7788; font-size: .6rem; font-weight: 900; }
.teacher-row.trained .training-badge { background: #ddf4eb; color: #087f5b; }
.teacher-fields.four { grid-template-columns: 1.2fr .65fr 1fr .7fr; margin-top: 12px; }
.unit-subject-editor .teacher-row > label { margin-top: 5px; }

.council-detail { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 22px; align-items: start; }
.template-wait { border-color: #e5d59f; background: linear-gradient(145deg,#fffdf6,#fff); }
.template-wait ul { display: grid; gap: 9px; margin: 18px 0 0; padding-left: 19px; color: #596577; font-size: .76rem; line-height: 1.45; }

.master-import-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin-bottom: 22px; }
.import-workbench { position: relative; overflow: hidden; }
.file-type { border-radius: 999px; background: #eef3f8; padding: 6px 10px; color: var(--blue); font-size: .6rem; font-weight: 900; }
.column-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 10px; }
.column-chips code { border: 1px solid #d7e0e9; border-radius: 8px; background: #f7f9fb; padding: 6px 8px; color: #405168; font-size: .66rem; }
.import-workbench form { margin-top: 18px; }
.report-downloads { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 22px; }
.report-card { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 18px; background: white; padding: 20px; box-shadow: 0 8px 24px rgba(20,38,70,.035); }
.report-card:hover { border-color: #a8bed6; box-shadow: 0 14px 30px rgba(20,38,70,.08); }
.report-card > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: .65rem; font-weight: 900; }
.report-card h2 { margin-bottom: 3px; font-size: 1rem; }
.report-card p { margin: 0; color: var(--muted); font-size: .72rem; }
.report-card > b { color: var(--blue); font-size: .68rem; }
.account-model { display: grid; gap: 10px; margin: 20px 0; }
.account-model span { display: flex; align-items: center; gap: 10px; color: #566477; font-size: .74rem; font-weight: 700; }
.account-model b { display: grid; width: 27px; height: 27px; place-items: center; flex: 0 0 auto; border-radius: 9px; background: var(--blue-soft); color: var(--blue); font-size: .65rem; }

@media (max-width: 980px) {
  .login-shell, .installer-shell { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { min-height: 100vh; }
  .installer-hero { position: relative; height: auto; min-height: 380px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .split-layout, .split-main { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
  .details-grid { grid-template-columns: repeat(2, 1fr); }
  .account-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control-grid, .subject-grid, .subject-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .management-layout, .sheet-connect, .contact-strip { grid-template-columns: 1fr; }
  .import-panel { position: static; }
  .teacher-fields { grid-template-columns: 1fr 1fr; }
  .designation-digital-grid, .council-detail { grid-template-columns: 1fr; }
  .master-import-grid { grid-template-columns: 1fr; }
  .data-trust, .program-selector { align-items: stretch; flex-direction: column; }
  .trust-points { flex-wrap: wrap; }
  .teacher-fields.four { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .container, .container-wide { width: min(100% - 22px, 1240px); }
  .header-main { min-height: 68px; }
  .brand small, .account-copy { display: none; }
  .brand-mark { width: 42px; height: 42px; border-radius: 12px; }
  .page { padding-top: 24px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .metrics, .grid.two, .form-grid, .details-grid { grid-template-columns: 1fr; }
  .account-chips { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .hero-card, .submit-card { grid-template-columns: 1fr; padding: 23px; }
  .steps { overflow-x: auto; grid-template-columns: repeat(5, 105px); padding-bottom: 8px; }
  .card { padding: 20px; border-radius: 17px; }
  .table-card { padding: 0; }
  .login-card, .auth-card { padding: 27px; }
  .login-panel { padding: 16px; }
  .installer-card { width: calc(100% - 22px); padding: 24px; }
  .installer-hero { min-height: 320px; padding: 32px 22px; }
  .activation-box { grid-template-columns: 1fr; }
  .copy-row { align-items: stretch; flex-direction: column; }
  .route-list article { grid-template-columns: 38px 1fr; }
  .route-list article > span { grid-column: 2; }
  .site-footer > div { align-items: flex-start; flex-direction: column; }
  .control-grid, .subject-grid, .subject-preview-grid, .traffic-options, .review-summary, .contact-form, .teacher-fields { grid-template-columns: 1fr; }
  .control-card { min-height: 225px; }
  .directory-toolbar, .subject-toolbar, .subject-heading, .form-actions, .wizard-actions, .save-bar { align-items: stretch; flex-direction: column; }
  .directory-toolbar label { min-width: 0; width: 100%; }
  .filter-pills { width: 100%; }
  .action-popover { position: fixed; top: auto; right: 11px; bottom: 11px; left: 11px; width: auto; }
  .wizard-header, .liaison-hero { grid-template-columns: 1fr; }
  .wizard-progress { width: 100%; grid-template-columns: auto auto; justify-content: center; gap: 8px; }
  .wizard-nav { overflow-x: auto; grid-template-columns: repeat(5, 112px); justify-content: start; }
  .wizard-stage { min-height: 430px; padding: 22px 17px; }
  .completion-ring { width: 96px; height: 96px; }
  .save-bar { position: static; }
  .unit-command-hero { grid-template-columns: 1fr; padding: 25px; }
  .workflow-card { grid-template-columns: 44px 1fr; padding: 18px; }
  .workflow-card > b { grid-column: 2; }
  .data-trust, .program-selector, .program-selector form { align-items: stretch; flex-direction: column; }
  .program-selector form { min-width: 0; }
  .program-stats { justify-content: flex-start; }
  .receipt-main dl { grid-template-columns: 1fr; }
  .digital-receipt { grid-template-columns: 1fr; }
  .report-downloads { grid-template-columns: 1fr; }
  .report-card { grid-template-columns: 42px 1fr; }
  .report-card > b { grid-column: 2; }
  .teacher-fields.four { grid-template-columns: 1fr; }
  .compact-search { min-width: 0; width: 100%; }
}

@media print {
  .app-header, .site-footer, .button, .toast { display: none !important; }
  body { background: white; }
  .page { padding: 0; }
  .card { break-inside: avoid; box-shadow: none; }
}
