/*
 * MENFIS · Acceso y panel administrativo
 * Hoja compartida. Mantener los colores y medidas en las variables de :root.
 * Paleta provisional: pendiente de contrastar con la imagen institucional.
 */

/* 01. Identidad y base */
:root {
    color-scheme: light;
    --brand-950: #0d1e36;
    --brand-900: #142c4e;
    --brand-800: #1e406c;
    --brand-700: #254f85;
    --brand-100: #eaf0f8;
    --gold-600: #90661f;
    --gold-500: #d5ad61;
    --gold-400: #edcc8b;
    --gold-100: #fbf3e3;
    --surface: #ffffff;
    --canvas: #f6f7fa;
    --ink: #1b293d;
    --muted: #626e80;
    --line: #e3e7ee;
    --error: #a22a37;
    --error-bg: #fff0f1;
    --success: #26734d;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --sidebar-width: 264px;
    --shadow-sm: 0 4px 20px rgb(20 44 78 / 4%);
    --shadow-md: 0 12px 32px rgb(20 44 78 / 9%);
    --font-body: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 180ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--font-body); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
svg { flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold-600); outline-offset: 4px; }
::selection { color: var(--brand-950); background: var(--gold-400); }
.icon { display: inline-block; width: 22px; height: 22px; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px; color: var(--surface); background: var(--brand-900); border-radius: var(--radius-sm); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.eyebrow { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .16em; line-height: 1.6; }
.eyebrow--gold { display: flex; align-items: center; gap: 12px; color: var(--gold-400); }
.eyebrow-line { width: 32px; height: 2px; background: var(--gold-500); }
.brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; }
.brand-mark { position: relative; display: grid; flex-shrink: 0; width: 52px; height: 52px; place-items: center; overflow: hidden; color: var(--brand-900); background: var(--surface); border: 1px solid rgb(255 255 255 / 18%); border-radius: 14px; }
.brand-mark img { position: relative; z-index: 1; display: block; width: 46px; height: 46px; object-fit: contain; background: var(--surface); }
.brand-fallback { position: absolute; font-family: Georgia, serif; font-size: 32px; font-weight: 700; }
.brand-text { display: flex; flex-direction: column; gap: 0; }
.brand-text strong { font-size: 22px; font-weight: 750; letter-spacing: .12em; line-height: 1.3; }
.brand-text > span { font-size: 11px; letter-spacing: .07em; opacity: .72; }
.brand--light { color: var(--surface); }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 12px; padding: 12px 20px; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 14px; font-weight: 650; transition: background var(--transition), box-shadow var(--transition), transform var(--transition); }
.button--primary { color: var(--surface); background: var(--brand-900); box-shadow: 0 4px 10px rgb(20 44 78 / 12%); }
.button--primary:hover { background: var(--brand-800); box-shadow: var(--shadow-md); }
.button--primary:active { transform: translateY(1px); }
.button--primary:disabled { opacity: .75; }
.button--secondary { color: var(--brand-900); background: var(--surface); border-color: var(--line); }
.button--secondary:hover { background: var(--brand-100); }
.button--full { width: 100%; }
.icon-button { display: inline-grid; flex-shrink: 0; width: 42px; height: 42px; padding: 0; place-items: center; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.icon-button:hover { background: var(--brand-100); }
.button-spinner { width: 18px; height: 18px; border: 2px solid rgb(255 255 255 / 35%); border-top-color: var(--surface); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 02. Acceso administrativo */
.login-page { background: var(--surface); }
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100%; padding: 48px 10% 38px; overflow: hidden; color: var(--surface); background: var(--brand-900); }
.login-story::before { position: absolute; right: -260px; bottom: -280px; width: 700px; height: 700px; border: 1px solid rgb(213 173 97 / 20%); border-radius: 50%; content: ""; pointer-events: none; }
.login-story::after { position: absolute; top: -280px; right: -380px; width: 760px; height: 760px; border: 1px solid rgb(255 255 255 / 6%); border-radius: 50%; box-shadow: 0 0 0 70px rgb(255 255 255 / 2%), 0 0 0 140px rgb(255 255 255 / 1%); content: ""; pointer-events: none; }
.login-story > * { position: relative; z-index: 1; }
.story-content { padding: 72px 0; }
.story-content h1 { margin-top: 26px; font-size: clamp(36px, 4vw, 60px); font-weight: 550; letter-spacing: -.045em; line-height: 1.13; }
.story-content h1 em { color: var(--gold-400); font-family: Georgia, serif; font-weight: 400; }
.story-content > p { max-width: 390px; margin-top: 25px; color: #bdcbdf; font-size: 15px; line-height: 1.85; }
.story-values { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 32px; color: #e2e8f1; font-size: 11px; font-weight: 500; }
.story-values span { display: flex; align-items: center; gap: 8px; }
.story-values span::before { width: 4px; height: 4px; background: var(--gold-500); border-radius: 50%; content: ""; }
.story-footer { display: flex; align-items: center; gap: 14px; }
.story-footer-rule { width: 3px; height: 35px; background: var(--gold-500); border-radius: 3px; }
.story-footer p { color: #e2e8f1; font-size: 12px; line-height: 1.7; }
.story-footer p span { color: #a9bad1; font-size: 11px; }
.login-main { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: 42px 10% 28px; }
.back-link { display: inline-flex; width: fit-content; min-height: 32px; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.back-link .icon { width: 17px; height: 17px; }
.back-link:hover { color: var(--brand-900); }
.login-form-wrap { width: 100%; max-width: 390px; margin: 42px auto; }
.login-emblem { display: grid; width: 52px; height: 52px; margin-bottom: 26px; place-items: center; color: var(--gold-600); background: var(--gold-100); border: 1px solid #f1e5cd; border-radius: 15px; }
.login-emblem .icon { width: 26px; height: 26px; }
.login-form-wrap h2 { margin-top: 10px; font-size: clamp(24px, 2.3vw, 30px); font-weight: 700; letter-spacing: -.04em; }
.login-intro { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.auth-steps { display: flex; align-items: center; gap: 16px; margin: 26px 0 28px; padding: 0 0 22px; border-bottom: 1px solid var(--line); list-style: none; }
.auth-steps li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.auth-steps li + li::before { width: 22px; height: 1px; margin-right: 5px; background: var(--line); content: ""; }
.auth-steps li > span { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 10px; font-weight: 700; }
.auth-steps .is-current { color: var(--brand-900); font-weight: 650; }
.auth-steps .is-current > span { color: var(--surface); background: var(--brand-900); border-color: var(--brand-900); }
.form-field { margin-bottom: 21px; }
.form-field label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 12px; font-weight: 650; }
.input-wrap { position: relative; display: flex; min-height: 50px; align-items: center; background: var(--surface); border: 1px solid #dce1e9; border-radius: var(--radius-sm); transition: border-color var(--transition), box-shadow var(--transition); }
.input-wrap:focus-within { border-color: var(--brand-700); box-shadow: 0 0 0 3px rgb(37 79 133 / 10%); }
.input-wrap > .icon { width: 19px; height: 19px; margin-left: 15px; color: #78849a; }
.input-wrap input { width: 100%; min-width: 0; min-height: 49px; padding: 13px 14px 13px 12px; color: var(--ink); background: transparent; border: 0; outline: none; border-radius: var(--radius-sm); font-size: 13px; }
.input-wrap input::placeholder { color: #626e80; opacity: 1; }
.input-wrap input:focus-visible { outline: none; }
.input-wrap--password input { padding-right: 47px; }
.password-toggle { position: absolute; top: 3px; right: 4px; display: grid; width: 42px; height: 42px; padding: 0; place-items: center; color: var(--muted); background: transparent; border: 0; border-radius: 7px; }
.password-toggle:hover { color: var(--brand-900); background: var(--brand-100); }
.password-toggle .icon { width: 19px; height: 19px; }
.field-note { margin-top: 7px; color: var(--gold-600); font-size: 12px; }
.alert { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 23px; padding: 13px; border: 1px solid; border-radius: var(--radius-sm); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.alert .icon { width: 18px; height: 18px; margin-top: 1px; }
.alert--error { color: var(--error); background: var(--error-bg); border-color: #f2ccd1; }
.login-form > .button { margin-top: 3px; }
.login-form .button .icon { width: 18px; height: 18px; }
.login-help { margin-top: 22px; text-align: center; color: var(--ink); font-size: 11px; font-weight: 600; line-height: 1.8; }
.login-help span { color: var(--muted); font-weight: 400; }
.login-security { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; padding-top: 22px; color: var(--muted); border-top: 1px solid var(--line); }
.login-security .icon { width: 20px; height: 20px; color: var(--gold-600); }
.login-security p { font-size: 10px; line-height: 1.7; }
.login-footer { color: var(--muted); font-size: 10px; text-align: center; }

/* 03. Estructura del panel */
.dashboard-layout { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; flex-direction: column; width: var(--sidebar-width); height: 100vh; height: 100dvh; padding: 34px 22px 22px; overflow-y: auto; overscroll-behavior: contain; color: var(--surface); background: var(--brand-900); }
.sidebar-brand-row { display: flex; align-items: center; justify-content: space-between; }
.sidebar .brand { gap: 10px; padding-left: 6px; }
.sidebar .brand-mark { width: 45px; height: 45px; border-radius: 12px; }
.sidebar .brand-mark img { width: 39px; height: 39px; }
.sidebar .brand-text strong { font-size: 20px; }
.sidebar .brand-text > span { font-size: 10px; }
.sidebar-label { margin: 50px 12px 16px; color: #a9bad1; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.sidebar-nav { display: grid; gap: 7px; }
.nav-link { display: flex; width: 100%; min-height: 46px; align-items: center; gap: 12px; padding: 12px 14px; color: #c1cde0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; font-size: 12px; font-weight: 500; text-align: left; transition: background var(--transition), color var(--transition); }
.nav-link .icon { width: 20px; height: 20px; }
.nav-link:hover { color: var(--surface); background: rgb(255 255 255 / 7%); }
.nav-link.is-active { color: var(--gold-400); background: rgb(213 173 97 / 12%); border-color: rgb(213 173 97 / 12%); }
.nav-active-dot { width: 5px; height: 5px; margin-left: auto; background: var(--gold-500); border-radius: 50%; }
.sidebar-bottom { margin-top: auto; padding-top: 70px; }
.sidebar-note { margin: 0 12px 25px; padding-bottom: 25px; border-bottom: 1px solid rgb(255 255 255 / 10%); }
.sidebar-note > .icon { width: 26px; height: 26px; margin-bottom: 12px; color: var(--gold-400); }
.sidebar-note p { color: #e0e6ef; font-size: 11px; line-height: 1.9; }
.sidebar-note p span { color: #a9bad1; font-size: 10px; }
.logout-button:hover { color: #ffe4de; background: rgb(255 255 255 / 8%); }
.sidebar-close { color: var(--surface); border-color: rgb(255 255 255 / 15%); }
.sidebar-close:hover { color: var(--brand-900); }
.sidebar-open, .sidebar-close { display: none; }
.dashboard-workspace { min-width: 0; margin-left: var(--sidebar-width); }
.topbar { display: flex; min-height: 84px; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 44px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-location { display: flex; min-width: 0; align-items: center; gap: 12px; }
.breadcrumb { color: var(--muted); font-size: 11px; white-space: nowrap; }
.breadcrumb > span { margin: 0 12px; color: #bdc5d1; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.topbar-account { display: flex; min-width: 0; align-items: center; gap: 12px; }
.verified-badge { display: inline-flex; align-items: center; gap: 6px; margin-right: 9px; padding-right: 22px; color: var(--success); border-right: 1px solid var(--line); font-size: 10px; white-space: nowrap; }
.verified-badge .icon { width: 16px; height: 16px; }
.account-avatar { display: grid; flex-shrink: 0; width: 35px; height: 35px; place-items: center; color: var(--brand-700); background: var(--brand-100); border: 1px solid #dce5f0; border-radius: 50%; }
.account-avatar .icon { width: 18px; height: 18px; }
.account-name { max-width: 170px; overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-main { max-width: 1460px; margin: 0 auto; padding: 38px 44px 22px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading > div { min-width: 0; }
.page-heading h1 { margin-top: 8px; font-size: clamp(23px, 2.1vw, 30px); font-weight: 700; letter-spacing: -.035em; overflow-wrap: anywhere; }
.page-heading p { margin-top: 8px; color: var(--muted); font-size: 12px; }
.date-chip { display: inline-flex; flex-shrink: 0; align-items: center; gap: 8px; padding: 9px 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 10px; white-space: nowrap; }
.date-chip .icon { width: 16px; height: 16px; }

/* 04. Presentación y módulos */
.welcome-banner { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 219px; padding: 31px 38px; overflow: hidden; color: var(--surface); background: var(--brand-900); border-radius: var(--radius-lg); }
.banner-copy { position: relative; z-index: 2; max-width: 560px; padding-right: 110px; }
.banner-kicker { color: var(--gold-400); font-size: 9px; font-weight: 650; letter-spacing: .13em; }
.banner-copy h2 { margin-top: 10px; font-size: clamp(23px, 2vw, 30px); font-weight: 550; letter-spacing: -.035em; }
.banner-copy p { max-width: 390px; margin-top: 10px; color: #bdcbdf; font-size: 12px; line-height: 1.85; }
.banner-link { display: inline-flex; min-height: 32px; align-items: center; gap: 8px; margin-top: 14px; color: var(--gold-400); font-size: 11px; font-weight: 650; }
.banner-link:hover { color: var(--surface); }
.banner-link .icon { width: 15px; height: 15px; }
.banner-art { position: absolute; top: 50%; right: 70px; display: grid; width: 132px; height: 132px; place-items: center; transform: translateY(-50%); }
.banner-seal { position: relative; z-index: 1; display: grid; width: 106px; height: 106px; place-items: center; color: var(--gold-400); background: #213b5d; border: 1px solid rgb(213 173 97 / 36%); border-radius: 28px; transform: rotate(-8deg); }
.banner-seal .icon { width: 53px; height: 53px; transform: rotate(8deg); }
.banner-orbit { position: absolute; width: 220px; height: 220px; border: 1px solid rgb(255 255 255 / 9%); border-radius: 50%; }
.banner-orbit--two { width: 315px; height: 315px; }
.banner-spark { position: absolute; top: -6px; right: -19px; z-index: 1; width: 12px; height: 12px; border: 2px solid var(--brand-900); border-radius: 4px; background: var(--gold-500); transform: rotate(22deg); }
.modules-section { margin-top: 35px; scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 20px; }
.section-heading h2 { font-size: 19px; font-weight: 700; letter-spacing: -.025em; }
.section-heading p { margin-top: 6px; color: var(--muted); font-size: 11px; }
.module-search { display: flex; width: 240px; min-height: 42px; align-items: center; gap: 8px; padding: 0 11px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.module-search:focus-within { border-color: var(--brand-700); box-shadow: 0 0 0 3px rgb(37 79 133 / 8%); }
.module-search > .icon { width: 17px; height: 17px; color: var(--muted); }
.module-search input { width: 100%; min-width: 0; min-height: 41px; padding: 8px 0; color: var(--ink); background: transparent; border: 0; outline: none; font-size: 11px; }
.module-search input:focus-visible { outline: none; }
.module-search input::placeholder { color: var(--muted); opacity: 1; }
.module-search kbd { min-width: 20px; padding: 0 5px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; font-family: inherit; font-size: 10px; text-align: center; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.module-card { --module-color: #315d9b; --module-bg: #edf2fa; position: relative; display: flex; min-width: 0; min-height: 233px; flex-direction: column; padding: 25px 27px 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition); }
.module-card:hover { border-color: var(--module-color); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.module-card--gold { --module-color: #90661f; --module-bg: #fbf3e3; }
.module-card--teal { --module-color: #2b746c; --module-bg: #eaf5f2; }
.module-card--violet { --module-color: #6d5b97; --module-bg: #f2eef9; }
.module-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.module-icon { display: grid; width: 44px; height: 44px; place-items: center; color: var(--module-color); background: var(--module-bg); border-radius: 12px; }
.module-icon .icon { width: 24px; height: 24px; }
.module-open-icon { display: grid; width: 27px; height: 27px; place-items: center; color: #8590a0; border: 1px solid var(--line); border-radius: 50%; transition: color var(--transition), background var(--transition); }
.module-open-icon .icon { width: 14px; height: 14px; }
.module-card:hover .module-open-icon { color: var(--surface); background: var(--module-color); border-color: var(--module-color); }
.module-category { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.module-card h3 { margin-top: 6px; font-size: 19px; font-weight: 650; letter-spacing: -.025em; overflow-wrap: anywhere; }
.module-card > p { margin-top: 8px; margin-bottom: 20px; color: var(--muted); font-size: 11px; line-height: 1.75; }
.module-card-link { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 13px; color: var(--module-color); border-top: 1px solid var(--line); font-size: 11px; font-weight: 650; }
.module-card-link .icon { width: 16px; height: 16px; }
.empty-state { display: grid; justify-items: center; gap: 13px; padding: 44px 24px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-md); }
.empty-state > .icon { width: 28px; height: 28px; color: var(--muted); }
.empty-state h3 { font-size: 17px; }
.empty-state p { color: var(--muted); font-size: 12px; }
.workspace-note { display: flex; align-items: center; gap: 10px; margin-top: 25px; padding: 16px 18px; color: var(--muted); background: #edf0f5; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.workspace-note > .icon { width: 18px; height: 18px; color: var(--brand-700); }
.workspace-note p { font-size: 10px; }
.workspace-note a { display: inline-flex; flex-shrink: 0; align-items: center; gap: 5px; margin-left: auto; color: var(--brand-700); font-size: 10px; font-weight: 600; }
.workspace-note a:hover { text-decoration: underline; }
.workspace-note a .icon { width: 13px; height: 13px; }
.dashboard-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 26px; padding-top: 18px; color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; }

/* 05. Adaptación a tabletas y teléfonos. Sin JS, la navegación sigue visible. */
@media (min-width: 1600px) {
    .module-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .module-card { padding-right: 22px; padding-left: 22px; }
}
@media (max-width: 1199px) {
    :root { --sidebar-width: 238px; }
    .topbar { padding-right: 28px; padding-left: 28px; }
    .dashboard-main { padding-right: 28px; padding-left: 28px; }
    .page-heading { align-items: flex-start; }
    .date-chip { margin-top: 6px; font-size: 9px; }
    .verified-badge { padding-right: 12px; margin-right: 0; }
    .account-name { max-width: 100px; }
    .banner-art { right: 45px; }
    .login-story, .login-main { padding-right: 9%; padding-left: 9%; }
}
@media (max-width: 1023px) {
    .sidebar { position: static; width: 100%; height: auto; padding: 22px; }
    .sidebar-label { margin-top: 25px; }
    .sidebar-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sidebar-bottom { padding-top: 20px; }
    .sidebar-note { display: none; }
    .dashboard-workspace { margin-left: 0; }
    .js .sidebar { position: fixed; width: 280px; height: 100vh; height: 100dvh; transition: transform var(--transition), visibility var(--transition); transform: translateX(-100%); visibility: hidden; }
    .js .sidebar-nav { grid-template-columns: 1fr; }
    .js .sidebar-bottom { padding-top: 60px; }
    .js .sidebar-note { display: block; }
    .js .sidebar-open, .js .sidebar-close { display: inline-grid; }
    .js .nav-is-open .sidebar { transform: translateX(0); visibility: visible; }
    .nav-is-open { overflow: hidden; }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 30; display: block; width: 100%; height: 100%; padding: 0; background: rgb(8 18 33 / 55%); border: 0; cursor: default; }
    .dashboard-main { padding-top: 30px; }
    .login-story { padding-right: 10%; padding-left: 10%; }
    .story-values { gap: 10px 14px; }
    .story-content { padding: 65px 0; }
    .story-content h1 { font-size: 43px; }
    .login-main { padding-right: 9%; padding-left: 9%; }
    .login-form-wrap { margin-top: 35px; margin-bottom: 35px; }
}
@media (max-width: 767px) {
    .login-layout { grid-template-columns: 1fr; }
    .login-story { min-height: auto; padding: 25px 28px; }
    .login-story .brand-mark { width: 42px; height: 42px; border-radius: 11px; }
    .login-story .brand-mark img { width: 36px; height: 36px; }
    .login-story .brand-text strong { font-size: 19px; }
    .story-content { padding: 30px 0 0; }
    .story-content .eyebrow { font-size: 9px; }
    .story-content h1 { margin-top: 13px; font-size: 34px; }
    .story-content h1 br { display: none; }
    .story-content > p, .story-footer { display: none; }
    .story-values { margin-top: 18px; font-size: 10px; }
    .login-main { padding: 22px 28px 25px; }
    .login-form-wrap { max-width: 440px; margin-top: 25px; margin-bottom: 32px; }
    .login-emblem { margin-bottom: 20px; }
    .login-form-wrap h2 { font-size: 28px; }
    .login-intro { font-size: 13px; }
    .login-security { margin-top: 24px; }
    .topbar { min-height: 74px; padding: 14px 20px; }
    .verified-badge { display: none; }
    .account-name { max-width: 120px; }
    .breadcrumb { font-size: 10px; }
    .breadcrumb > span { margin: 0 7px; }
    .dashboard-main { padding: 26px 20px 20px; }
    .page-heading { flex-direction: column; gap: 14px; margin-bottom: 22px; }
    .page-heading h1 { font-size: 26px; }
    .date-chip { margin-top: 0; font-size: 10px; }
    .welcome-banner { min-height: 224px; padding: 26px; border-radius: 18px; }
    .banner-copy { padding-right: 60px; }
    .banner-copy h2 { max-width: 260px; font-size: 26px; }
    .banner-copy p { max-width: 280px; font-size: 11px; }
    .banner-kicker { font-size: 8px; }
    .banner-art { right: -37px; opacity: .5; }
    .banner-seal { width: 80px; height: 80px; border-radius: 20px; }
    .banner-seal .icon { width: 40px; height: 40px; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
    .module-search { width: 100%; }
    .module-search input { font-size: 13px; }
    .module-search kbd { display: none; }
    .module-grid { gap: 14px; }
    .module-card { padding: 21px 20px 17px; }
    .module-card h3 { font-size: 18px; }
    .module-card > p { font-size: 11px; }
    .module-category { font-size: 7px; }
    .workspace-note { flex-wrap: wrap; align-items: flex-start; padding: 14px; }
    .workspace-note p { flex: 1; }
    .workspace-note a { margin-left: 28px; }
    .dashboard-footer { flex-direction: column; gap: 5px; }
}
@media (max-width: 479px) {
    .login-story { padding: 23px 22px; }
    .story-content h1 { font-size: 30px; }
    .login-main { padding-right: 22px; padding-left: 22px; }
    .login-form-wrap h2 { font-size: 26px; }
    .auth-steps { gap: 12px; }
    .auth-steps li { gap: 6px; font-size: 10px; }
    .auth-steps li + li::before { width: 13px; margin-right: 0; }
    .account-name { display: none; }
    .topbar { padding-right: 18px; padding-left: 18px; }
    .topbar-account { gap: 0; }
    .dashboard-main { padding-right: 18px; padding-left: 18px; }
    .module-grid { grid-template-columns: 1fr; }
    .module-card { min-height: 230px; padding: 23px; }
    .module-category { font-size: 8px; }
    .module-card h3 { font-size: 20px; }
    .module-card > p { font-size: 12px; }
    .banner-copy { padding-right: 23px; }
    .banner-copy h2 { max-width: 220px; }
    .banner-copy p { max-width: 230px; }
    .banner-art { right: -62px; opacity: .3; }
    .sidebar-nav { grid-template-columns: 1fr; }
    .desktop-break { display: none; }
}

/* 06. Preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
    .module-card, .button, .input-wrap, .module-search, .brand-mark { border: 1px solid CanvasText; }
    .nav-link.is-active { outline: 1px solid Highlight; }
}
