/* Login corporativo: independiente del diseño de las páginas interiores. */
body.login-modern {
    box-sizing: border-box;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: #f5f8fb;
    color: #243f60;
    font: 16px/1.5 Arial, Helvetica, sans-serif;
}
.login-modern *, .login-modern *::before, .login-modern *::after { box-sizing: border-box; }
.login-modern .lm-card {
    width: 100%;
    max-width: 420px;
    margin: auto;
    padding: clamp(24px, 5vw, 38px);
    background: #fff;
    border: 1px solid #d6e1eb;
    border-radius: 20px;
    box-shadow: 0 12px 36px #243f6010;
    overflow-wrap: anywhere;
}
.login-modern .lm-brand { text-align: center; }
.login-modern .lm-logo { display: block; width: 96px; max-width: 100%; height: auto; object-fit: contain; margin: 0 auto 16px; }
.login-modern .lm-platform { margin: 0; font-size: 20px; font-weight: 700; }
.login-modern .lm-identity { margin: 6px 0 0; color: #64788c; font-size: 15px; }
.login-modern h1 { margin: 28px 0 24px; font-size: 25px; line-height: 1.25; text-align: center; }
.login-modern form { display: grid; gap: 20px; }
.login-modern .lm-field { display: grid; gap: 7px; min-width: 0; }
.login-modern label { font-size: 14px; font-weight: 600; }
.login-modern input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #bdcbd7;
    border-radius: 9px;
    background: #fff;
    color: #243f60;
    font: inherit;
}
.login-modern .lm-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    padding: 12px 16px;
    border: 0;
    border-radius: 9px;
    background: #243f60;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.login-modern .lm-submit:hover { background: #31547e; }
.login-modern :is(input, button):focus-visible { outline: 3px solid #3975aa; outline-offset: 3px; }
.login-modern .lm-error { margin: 0 0 20px; padding: 12px; border: 1px solid #efb5b5; border-radius: 9px; background: #fff0f0; color: #9d2727; font-size: 14px; }

/* Interfaz moderna del piloto. Todas las reglas quedan aisladas del diseño clásico. */
body.pilot-modern, body.gps-live-page {
    /* Paleta 13A optativa: los interiores conservan sus variables actuales. */
    --mp-brand: #243F63;
    --mp-deep: #06366F;
    --mp-blue: #0878E7;
    --mp-orange: #FF7900;
    --mp-green: #22B827;
    --mp-turquoise: #00AFA8;
    --mp-violet: #6847D9;
    --mp-canvas: #F2F7FC;
    --mp-surface: #FFFFFF;
    --mp-ink: #17345A;
    --mp-shadow: 0 3px 10px #06366f12;
}
body.pilot-modern {
    --mp-primary: #243f60;
    --mp-action: #3975aa;
    --mp-bg: #f5f8fb;
    --mp-panel: #fff;
    --mp-soft: #edf4fa;
    --mp-border: #d6e1eb;
    --mp-muted: #64788c;
    background: var(--mp-bg);
    color: var(--mp-primary);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    min-height: 100dvh;
    height: auto;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}
.pilot-modern [hidden] { display: none !important; }
.pilot-modern .mp-icon { width: 22px; height: 22px; flex: 0 0 auto; vertical-align: middle; }
.pilot-modern :is(a, button, select, input, textarea, summary):focus-visible { outline: 3px solid #3975aa; outline-offset: 3px; }
.pilot-modern .mp-header {
    position: relative; isolation: isolate;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: radial-gradient(ellipse at 45% 100%, #0878e750, transparent 60%), linear-gradient(110deg, var(--mp-deep), #07518b 55%, var(--mp-deep)); color: white;
    padding: 8px max(18px, calc((100vw - 1360px) / 2));
    min-height: 60px;
}
.pilot-modern .mp-header::before {
    content: ""; position: absolute; z-index: -1; inset: 0 19% 0 26%;
    background: url('../images/modern/cabecera_decoracion_original.png') center bottom / auto 100% no-repeat;
    pointer-events: none;
}
.pilot-modern .mp-brand-logo { width: 76px; height: 52px; object-fit: contain; flex: 0 0 auto; }
.pilot-modern .mp-brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; min-width: 0; }
.pilot-modern .mp-brand strong { font-size: 22px; letter-spacing: .015em; display: block; }
.pilot-modern .mp-brand small { display: block; font-size: 13px; opacity: .9; max-width: 60vw; overflow-wrap: anywhere; }
.pilot-modern .mp-pilot { display: flex; align-items: center; gap: 10px; }
.pilot-modern .mp-pilot > span { display: none; }
.pilot-modern .mp-profile { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; color: inherit; background: transparent; cursor: pointer; }
.pilot-modern .mp-profile:hover { background: #ffffff18; }
.pilot-modern .mp-desktop-nav { display: none; }
.pilot-modern .mp-bottom-nav {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
    position: fixed; inset: auto 0 0; z-index: 1200;
    border-top: 1px solid var(--mp-border); background: #fff;
    padding: 8px max(10px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
    box-shadow: 0 -3px 14px #243f6005;
}
.pilot-modern .mp-bottom-nav > :is(a, button) {
    display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center;
    min-height: 54px; padding: 6px; border: 0; border-radius: 9px; background: transparent;
    color: var(--mp-muted); text-decoration: none; font: inherit; font-size: 11px; cursor: pointer;
}
.pilot-modern .mp-bottom-nav .mp-icon { width: 20px; height: 20px; }
.pilot-modern .mp-bottom-nav :is([aria-current="page"], .is-active) { background: #e7f0f8; color: var(--mp-primary); }
.pilot-modern .mp-more-menu { border: 1px solid var(--mp-border); border-radius: 18px; color: var(--mp-primary); background: white; padding: 22px; width: min(460px, calc(100% - 24px)); max-height: calc(100dvh - 40px); overflow-y: auto; }
.pilot-modern .mp-more-menu::backdrop { background: #142a4266; }
.pilot-modern .mp-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pilot-modern .mp-menu-heading h2 { margin: 0; font-size: 20px; }
.pilot-modern .mp-menu-heading button { border: 0; border-radius: 8px; background: var(--mp-soft); color: var(--mp-primary); min-width: 44px; min-height: 44px; cursor: pointer; }
.pilot-modern .mp-menu-pilot { color: var(--mp-muted); margin: 8px 0 16px; }
.pilot-modern .mp-menu-links { display: grid; }
.pilot-modern :is(.mp-menu-links a, .mp-logout) { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 4px; color: var(--mp-primary); text-decoration: none; border-bottom: 1px solid var(--mp-border); }
.pilot-modern .mp-menu-links a:hover { background: var(--mp-soft); }
.pilot-modern .mp-logout { margin-top: 12px; color: #9d3333; border: 0; }
.pilot-modern .mp-design-label { display: block; margin: 20px 0 6px; color: var(--mp-muted); font-size: 13px; }
.pilot-modern :is(#userDesignSelector, #mp-aircraft-select) { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--mp-border); background: white; border-radius: 24px; color: var(--mp-primary); font: inherit; text-overflow: ellipsis; }
.pilot-modern .mp-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.pilot-modern .mp-skip { position: fixed; left: 12px; top: -100px; z-index: 2000; padding: 12px; background: white; color: var(--mp-primary); }
.pilot-modern .mp-skip:focus { top: 12px; }
/* Se conservan los interiores existentes; se adapta el contenedor al nuevo shell. */
.pilot-modern .app-container { width: 100%; flex: 1; }
.pilot-modern .main-footer { margin-top: auto; background: linear-gradient(110deg, var(--mp-deep), #07518b, var(--mp-deep)); border-top: 3px solid var(--mp-orange); }
.pilot-modern .mp-dashboard { position: relative; isolation: isolate; color: var(--mp-ink); background: linear-gradient(#f7fbff, var(--mp-canvas)); box-shadow: none; border-radius: 0; overflow: visible; max-width: 1400px; margin: 0 auto; padding: 20px 18px 24px; }
.pilot-modern .mp-dashboard::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 280px; background: url('../images/modern/paisaje_cielo.svg') center top / cover no-repeat; opacity: .35; pointer-events: none; }
.pilot-modern .mp-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.pilot-modern .mp-dashboard :is(h1, h2, h3, p) { overflow-wrap: anywhere; }
.pilot-modern .mp-dashboard h1 { font-size: 24px; font-weight: 700; line-height: 1.3; margin: 0 0 5px; color: var(--mp-ink); }
.pilot-modern .mp-dashboard h2 { color: var(--mp-ink); font-size: 18px; font-weight: 600; line-height: 1.4; margin: 0 0 10px; border: 0; padding: 0; }
.pilot-modern .mp-intro { font-size: 13px; color: var(--mp-muted); margin: 0 0 14px; }
.pilot-modern :is(.mp-card, .mp-aircraft-panel, .mp-activity, .mp-other, .mp-help) { background: var(--mp-panel); border: 1px solid var(--mp-border); border-radius: 14px; padding: 14px; min-width: 0; box-shadow: var(--mp-shadow); }
.pilot-modern .mp-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.pilot-modern .mp-panel-heading h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.pilot-modern .mp-panel-heading > .mp-icon { width: 18px; color: var(--mp-action); }
.pilot-modern .mp-panel-heading h2 .mp-icon { width: 19px; color: var(--mp-action); }
.pilot-modern .mp-aircraft-heading-status { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.pilot-modern .mp-aircraft-panel > .mp-panel-heading { flex-wrap: wrap; }
.pilot-modern .mp-airborne { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 20px; background: #fce9e8; color: #b42318; font-size: 10px; font-weight: 600; white-space: nowrap; }
.pilot-modern .mp-flight-banner { display: flex; align-items: center; gap: 11px; margin: 0 0 6px; padding: 13px 14px; border: 1px solid #f2c5c0; border-radius: 12px; background: #fff3f1; color: #a52820; }
.pilot-modern .mp-flight-banner > div { min-width: 0; }
.pilot-modern .mp-flight-banner .mp-flight-icon { width: 25px; height: 25px; }
.pilot-modern .mp-flight-banner strong { display: block; font-size: 15px; line-height: 1.35; }
.pilot-modern .mp-flight-banner p { margin: 3px 0 0; color: #795b58; font-size: 12px; line-height: 1.4; }
.pilot-modern .mp-flight-registration { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.pilot-modern .mp-favorite { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #796126; white-space: nowrap; }
.pilot-modern .mp-favorite .mp-icon { width: 15px; height: 15px; }
.pilot-modern .mp-dashboard .dashboard-card { margin: 0; padding: 14px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; max-width: none; width: 100%; text-align: left; }
.pilot-modern .mp-dashboard .dashboard-card-header { gap: 10px; }
.pilot-modern .mp-dashboard .dashboard-card-header > div { width: 100%; }
.pilot-modern .mp-dashboard .aircraft-title { font-size: 24px; color: var(--mp-ink); font-weight: 700; }
.pilot-modern .mp-dashboard .aircraft-subtitle { margin-top: 2px; color: var(--mp-muted); font-size: 15px; }
.pilot-modern .mp-dashboard .dashboard-card-badges { margin-top: 10px; gap: 5px; }
.pilot-modern .mp-dashboard .badge { font-size: 10px; padding: 3px 7px; border-radius: 5px; }
.pilot-modern .mp-aircraft-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.pilot-modern .mp-aircraft-actions > :is(a, button) {
    display: flex; align-items: center; justify-content: flex-start; gap: 10px;
    min-height: 64px; padding: 12px; border: 1px solid var(--mp-border); border-radius: 9px; background: var(--mp-soft);
    color: var(--mp-primary); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer;
}
.pilot-modern :is(.mp-aircraft-actions, .mp-operation-grid) .mp-icon { color: var(--mp-action); }
.pilot-modern .mp-dashboard .dashboard-card-summary { font-size: 12px; color: var(--mp-muted); margin-top: 12px; }
.pilot-modern .mp-dashboard .dashboard-card-footer { margin-top: 10px; gap: 8px; }
.pilot-modern .mp-dashboard .dashboard-card-footer .btn { min-height: 44px; font-size: 12px; border-radius: 8px; padding: 10px 12px; }
.pilot-modern .mp-dashboard .btn-secondary { color: var(--mp-primary); background: var(--mp-soft); border: 1px solid var(--mp-border); }
.pilot-modern .mp-dashboard .btn-primary { background: var(--mp-action); color: white; }
.pilot-modern .mp-dashboard .dashboard-card-details { border-color: var(--mp-border); }
.pilot-modern .mp-dashboard .form-group :is(input, textarea) { max-width: 100%; min-height: 44px; font: inherit; border: 1px solid var(--mp-border); border-radius: 8px; padding: 10px; }
.pilot-modern .mp-operation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pilot-modern .mp-operation-grid a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 105px; padding: 18px 10px; border: 1px solid var(--mp-border); border-radius: 14px; background: white; color: var(--mp-primary); font-size: 13px; text-align: center; text-decoration: none; }
.pilot-modern .mp-operation-grid small { font-size: 10px; line-height: 1.1; color: var(--mp-muted); margin-top: -5px; }
.pilot-modern :is(.mp-aircraft-actions, .mp-operation-grid) a:hover, .pilot-modern .mp-aircraft-actions button:hover { background: #e3eef7; }
.pilot-modern .mp-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 4px; background: var(--mp-soft); border-radius: 50%; color: var(--mp-action); font-size: 11px; }
.pilot-modern .mp-activity .panel { padding: 12px 0; margin: 0; border: 0; box-shadow: none; width: 100%; text-align: left; background: transparent; }
.pilot-modern .mp-activity .panel h2 { font-size: 15px; }
.pilot-modern .mp-activity > br, .pilot-modern .mp-activity-content > br, .pilot-modern .mp-activity .panel + br { display: none; }
.pilot-modern .mp-activity .dashboard-card { padding: 0; }
.pilot-modern .mp-activity .dashboard-card-title { font-size: 15px; }
.pilot-modern .mp-activity .dashboard-card-body { margin-top: 6px; }
.pilot-modern .mp-text-link { color: var(--mp-action); font-size: 13px; text-underline-offset: 3px; }
.pilot-modern :is(.mp-other, .mp-help) summary { cursor: pointer; padding: 9px 0; min-height: 44px; font-size: 14px; }
.pilot-modern .mp-help .panel { width: 100%; padding: 10px 0; border: 0; box-shadow: none; }
.pilot-modern .mp-help .legal-content { max-height: 360px; overflow-y: auto; }
.pilot-modern .mp-empty { padding: 20px 0; color: var(--mp-muted); }
@media (min-width: 600px) {
    .pilot-modern .mp-dashboard { padding: 28px; }
    .pilot-modern .mp-aircraft-panel { padding: 22px; }
    .pilot-modern .mp-aircraft-actions > :is(a, button) { min-height: 72px; font-size: 14px; }
    .pilot-modern .mp-dashboard-grid { gap: 22px; }
    .pilot-modern .mp-pilot > span { display: block; font-size: 13px; }
    .pilot-modern .mp-mobile-identity { display: none; }
}
@media (min-width: 900px) {
    body.pilot-modern { padding-bottom: 0; }
    .pilot-modern .mp-header { padding-top: 12px; padding-bottom: 12px; }
    .pilot-modern .mp-bottom-nav { display: none; }
    .pilot-modern .mp-desktop-nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 10px 24px; border-bottom: 3px solid var(--mp-orange); background: white; }
    .pilot-modern .mp-desktop-nav :is(a, button) { display: inline-flex; align-items: center; gap: 9px; font: inherit; color: var(--mp-ink); text-decoration: none; padding: 10px 18px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
    .pilot-modern .mp-desktop-nav :is([aria-current="page"], [data-mp-more][aria-expanded="true"]) { color: white; background: linear-gradient(120deg, var(--mp-deep), #07518b); box-shadow: var(--mp-shadow); }
    .pilot-modern .mp-dashboard { padding: 32px; }
    .pilot-modern .mp-dashboard-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; }
    .pilot-modern .mp-prepare { grid-column: 1; grid-row: 1 / span 2; }
    .pilot-modern .mp-operations { grid-column: 2; grid-row: 1; padding-top: 2px; }
    .pilot-modern .mp-activity { grid-column: 2; grid-row: 2; }
    .pilot-modern .mp-other { grid-column: 1; }
    .pilot-modern .mp-help { grid-column: 2; }
    .pilot-modern .mp-operation-grid a { min-height: 125px; }
    .pilot-modern .mp-dashboard h1 { font-size: 26px; }
    .pilot-modern .mp-dashboard h2 { font-size: 19px; }
}
/* Fase 13A: componentes optativos reutilizables, sin alterar otras vistas. */
.pilot-modern .mp-tone-blue { --mp-accent: var(--mp-blue); --mp-tint: #e7f3ff; }
.pilot-modern .mp-tone-orange { --mp-accent: var(--mp-orange); --mp-tint: #fff1df; }
.pilot-modern .mp-tone-green { --mp-accent: var(--mp-green); --mp-tint: #e7f7e8; }
.pilot-modern .mp-tone-violet { --mp-accent: var(--mp-violet); --mp-tint: #efe4ff; }
.pilot-modern .mp-tone-turquoise { --mp-accent: var(--mp-turquoise); --mp-tint: #b3f3ef; }
.pilot-modern .mp-section-title,
.pilot-modern .mp-dashboard h1.mp-section-title,
.pilot-modern .mp-dashboard h2.mp-section-title { border-left: 4px solid var(--mp-orange); padding-left: 12px; }
.pilot-modern .mp-tool,
.pilot-modern .mp-dashboard :is(.mp-aircraft-actions, .mp-operation-grid) .mp-tool {
    background: linear-gradient(135deg, var(--mp-surface), var(--mp-tint));
    border: 1px solid var(--mp-border); border-left: 4px solid var(--mp-accent);
    box-shadow: var(--mp-shadow); color: var(--mp-ink); font-weight: 600;
    overflow-wrap: anywhere; min-width: 0;
}
.pilot-modern .mp-tool .mp-icon { color: var(--mp-accent); }
.pilot-modern .mp-tool:hover { border-color: var(--mp-accent); filter: brightness(.98); }
.pilot-modern .mp-dashboard .mp-operation-grid small { font-weight: 400; }
.pilot-modern .mp-dashboard .mp-count { background: #15751b; color: white; }
.pilot-modern .mp-dashboard .mp-aircraft-panel > .mp-panel-heading {
    margin: -14px -14px 14px; padding: 10px 14px; border-radius: 13px 13px 0 0;
    background: linear-gradient(110deg, var(--mp-deep), #07518b); color: white;
}
.pilot-modern .mp-dashboard .mp-aircraft-panel > .mp-panel-heading :is(h2, .mp-icon) { color: white; }
.pilot-modern .mp-dashboard .mp-favorite { color: #ffe28a; font-size: 13px; }
.pilot-modern .mp-dashboard .mp-favorite .mp-icon { fill: currentColor; color: inherit; }
.pilot-modern .mp-dashboard #mp-aircraft-select { border-radius: 10px; border-color: #b8cde4; font-weight: 600; color: var(--mp-ink); }
.pilot-modern .mp-dashboard .badge { border: 1px solid transparent; border-radius: 20px; }
.pilot-modern .mp-dashboard .badge-neutral { background: #e9eef5; color: var(--mp-ink); }
.pilot-modern .mp-dashboard :is(.badge-info, .badge-ok) { background: #e0f5e2; color: #166521; }
.pilot-modern .mp-dashboard :is(.badge-warning, .badge-secondary) { background: #fff0dc; color: #884000; }
.pilot-modern .mp-dashboard .badge-danger { background: #ffebeb; color: #a52820; }
.pilot-modern .mp-dashboard .mp-airborne { border: 1px solid #f5afa7; color: #9d1b14; background: #fff0ed; }
.pilot-modern .mp-dashboard .btn-danger { background: #b42318; color: white; border: 1px solid #921b12; font-weight: 700; }
.pilot-modern .mp-dashboard .btn-success { background: #197525; color: white; border: 1px solid #14621f; }
.pilot-modern .mp-dashboard :is(.mp-other, .mp-help) { border-left: 4px solid var(--mp-green); }
.pilot-modern .mp-dashboard :is(.mp-other, .mp-help) summary { color: var(--mp-ink); font-weight: 600; }
.pilot-modern .mp-dashboard .mp-text-link { color: var(--mp-deep); font-weight: 600; }
@media (min-width: 600px) {
    .pilot-modern .mp-dashboard .mp-aircraft-panel > .mp-panel-heading { margin: -22px -22px 16px; padding: 10px 22px; }
}
@media (max-width: 899px) {
    body.pilot-modern :is(.mp-header, .main-footer) { display: none; }
}
/* 13A.1: ilustraciones suministradas, siempre decorativas y sin capturar eventos. */
.pilot-modern .mp-prepare-heading { position: relative; isolation: isolate; padding: 0 85px 0 66px; }
.pilot-modern .mp-dashboard .mp-prepare-heading h1 { border: 0; padding: 0; }
.pilot-modern .mp-intro-plane { position: absolute; left: 0; top: 0; width: 58px; height: 58px; object-fit: contain; pointer-events: none; z-index: -1; }
.pilot-modern .mp-intro-windsock { position: absolute; right: 0; top: -14px; width: 85px; height: 96px; object-fit: contain; pointer-events: none; z-index: -1; }
.pilot-modern .mp-dashboard h2#mp-operations-title { display: flex; align-items: center; gap: 15px; border: 0; padding: 0; font-size: 26px; font-weight: 700; font-style: normal; }
.pilot-modern .mp-operations-mark { position: relative; display: block; flex: 0 0 30px; width: 30px; height: 20px; margin: 0 3px 8px; border: 3px solid #0c5b9c; transform: rotate(30deg) skewX(-30deg) scaleY(.75); }
.pilot-modern .mp-operations-mark::before, .pilot-modern .mp-operations-mark::after { content: ""; position: absolute; inset: 4px -3px -9px; border-right: 3px solid #0c5b9c; border-bottom: 3px solid #0c5b9c; }
.pilot-modern .mp-operations-mark::after { inset: 4px -3px -16px; }
.pilot-modern .mp-dashboard :is(.mp-aircraft-panel, .mp-activity, .mp-other, .mp-help) { border-color: #b4cee6; box-shadow: 0 3px 9px #07518b26, inset 0 0 0 3px white; }
.pilot-modern .mp-dashboard .dashboard-card-header > div { display: flow-root; }
.pilot-modern .mp-dashboard [data-modern-aircraft] .dashboard-card-header > div {
    display: grid; grid-template-columns: 35% minmax(0, 1fr); column-gap: 12px;
    min-height: 130px; padding: 10px; border-radius: 15px;
    background: url('../images/aviation/paisaje_aeronave.svg') center / cover no-repeat;
}
.pilot-modern .mp-dashboard .mp-aircraft-image { grid-column: 1; grid-row: 1 / span 3; display: block; align-self: center; width: 100%; height: 100px; min-width: 0; pointer-events: none; }
.pilot-modern .mp-dashboard .mp-aircraft-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pilot-modern .mp-dashboard [data-modern-aircraft] :is(.aircraft-title, .aircraft-subtitle, .dashboard-card-badges) { grid-column: 2; }
/* 13A.2: botones completos con degradados e iconos originales, sin acento lateral. */
.pilot-modern :is(.mp-dashboard, .ma-page) .mp-aircraft-actions { gap: 10px; }
.pilot-modern :is(.mp-dashboard, .ma-page) .mp-aircraft-actions .mp-tone-blue { --mp-tool-top: #e5f6ff; --mp-tool-bottom: #91cfff; --mp-tool-edge: #96caed; --mp-tool-arrow: #0756ae; }
.pilot-modern :is(.mp-dashboard, .ma-page) .mp-aircraft-actions .mp-tone-green { --mp-tool-top: #eaffdf; --mp-tool-bottom: #acf08f; --mp-tool-edge: #b3dba6; --mp-tool-arrow: #167d13; }
.pilot-modern :is(.mp-dashboard, .ma-page) .mp-aircraft-actions .mp-tone-orange { --mp-tool-top: #fff6dd; --mp-tool-bottom: #ffd78b; --mp-tool-edge: #ead0a2; --mp-tool-arrow: #c26909; }
.pilot-modern :is(.mp-dashboard, .ma-page) .mp-aircraft-actions .mp-tone-violet { --mp-tool-top: #f8f0ff; --mp-tool-bottom: #bc96ee; --mp-tool-edge: #ccb6e7; --mp-tool-arrow: #6717bd; }
body.pilot-modern :is(.mp-dashboard, .ma-page) .mp-aircraft-actions > .mp-tool {
    display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 9px;
    min-height: 68px; padding: 5px 10px; border: 1px solid var(--mp-tool-edge); border-radius: 14px;
    background: linear-gradient(170deg, var(--mp-tool-top), var(--mp-tool-bottom));
    box-shadow: 0 3px 5px #234f7c26, inset 0 0 0 2px #ffffff99;
    color: var(--mp-ink); font-size: 14px; font-weight: 600; text-align: left;
}
body.pilot-modern :is(.mp-dashboard, .ma-page) .mp-aircraft-actions > .mp-tool:hover {
    background: linear-gradient(170deg, var(--mp-tool-top), var(--mp-tool-bottom));
    border-color: var(--mp-tool-arrow); filter: brightness(1.025);
}
.pilot-modern .mp-aircraft-tool-icon { width: 56px; height: 56px; flex: 0 0 56px; object-fit: contain; pointer-events: none; }
.pilot-modern :is(.mp-dashboard, .ma-page) .mp-aircraft-actions .mp-tool::after { content: "›"; margin-left: auto; font-size: 30px; line-height: 1; color: var(--mp-tool-arrow); }
.pilot-modern .mp-dashboard [data-modern-aircraft]:has(.badge-info) .dashboard-card-summary::before { content: "⟳"; display: inline-block; margin-right: 8px; color: #0863b7; font-size: 20px; line-height: 1; vertical-align: middle; }
.pilot-modern .mp-dashboard .mp-operation-grid .mp-tool {
    --mp-operation-top: #ddf6ff; --mp-operation-bottom: #93d5fc; --mp-operation-outline: #b6d9ee;
    position: relative; isolation: isolate; align-items: center; justify-content: center; text-align: center;
    height: 144px; min-height: 144px; padding: 10px 12px; gap: 3px; border: 4px solid white; border-radius: 20px;
    outline: 1px solid var(--mp-operation-outline); background: linear-gradient(165deg, var(--mp-operation-top), var(--mp-operation-bottom));
    box-shadow: 0 4px 8px #07518b2b; font-size: 17px; line-height: 1.25;
}
.pilot-modern .mp-dashboard .mp-operation-grid .mp-operation-pending { --mp-operation-top: #e6ffdf; --mp-operation-bottom: #b8f39e; --mp-operation-outline: #c2e9b8; }
.pilot-modern .mp-dashboard .mp-operation-grid .mp-operation-routes { --mp-operation-top: #c9fafb; --mp-operation-bottom: #83e6e5; --mp-operation-outline: #afe5e8; }
.pilot-modern .mp-dashboard .mp-operation-grid .mp-operation-aircraft { --mp-operation-top: #d1ebff; --mp-operation-bottom: #8fc6fa; }
.pilot-modern .mp-dashboard .mp-operation-grid .mp-tool:hover { background: linear-gradient(165deg, var(--mp-operation-top), var(--mp-operation-bottom)); filter: brightness(1.035); }
.pilot-modern .mp-operation-icon { width: 64px; height: 64px; flex: 0 0 64px; object-fit: contain; pointer-events: none; }
.pilot-modern .mp-ornament { position: absolute; right: 3px; bottom: 3px; object-fit: contain; object-position: right bottom; pointer-events: none; z-index: -1; opacity: .45; }
.pilot-modern .mp-dashboard .mp-operation-grid small { font-size: 12px; line-height: 1.3; margin-top: 0; }
.pilot-modern .mp-dashboard .mp-operation-grid .mp-count { position: absolute; right: 16px; top: 12px; min-width: 24px; height: 24px; border-radius: 14px; font-size: 13px; border: 2px solid white; }
.pilot-modern .mp-dashboard .mp-activity { position: relative; isolation: isolate; min-height: 190px; padding-bottom: 30px; border-radius: 20px; background: url('../images/aviation/10_fondo_aviso.svg') center bottom / 100% auto no-repeat, white; }
.pilot-modern .mp-activity::after { content: ""; position: absolute; z-index: -1; inset: auto 1px 1px; height: 22px; border-radius: 0 0 18px 18px; background: linear-gradient(177deg, transparent 0 20%, #a8dd29 22% 48%, #6ac322 50% 68%, #c9ed38 70%); pointer-events: none; }
.pilot-modern .mp-dashboard .mp-activity > .mp-panel-heading { margin: 0 0 4px; padding: 0; background: transparent; }
.pilot-modern .mp-dashboard .mp-activity > .mp-panel-heading h2 { color: var(--mp-ink); font-size: 23px; font-weight: 700; gap: 9px; }
.pilot-modern .mp-activity-bell { width: 42px; height: 42px; object-fit: contain; pointer-events: none; }
.pilot-modern .mp-activity-tower { position: absolute; z-index: -1; right: 8px; bottom: 10px; width: 110px; height: auto; pointer-events: none; }
.pilot-modern .mp-activity-content { margin-right: 114px; min-width: 0; }
.pilot-modern .mp-dashboard .mp-text-link { display: inline-flex; align-items: center; gap: 9px; padding: 5px 0; }
.pilot-modern .mp-document-button, .pilot-modern .mp-dashboard .mp-document-button { display: flex; width: fit-content; max-width: 100%; min-height: 44px; gap: 8px; padding: 7px 10px; border: 1px solid #b7cde4; border-radius: 12px; background: linear-gradient(#f8fbff, #dfedff); box-shadow: 0 2px 4px #174d7e20; text-decoration: none; }
.pilot-modern .mp-document-button img { width: 28px; height: 28px; flex: 0 0 28px; object-fit: contain; filter: hue-rotate(35deg) saturate(2.5) brightness(.75); }
.pilot-modern .mp-document-button > span:first-of-type { min-width: 0; }
.pilot-modern .mp-document-button > span:last-child { margin-left: auto; color: #0764c7; font-size: 28px; line-height: 1; }
.pilot-modern .mp-document-button:hover { border-color: #0878e7; }
.pilot-modern .mp-dashboard :is(.mp-other, .mp-help) { border-left-color: #1c9f20; background: url('../images/modern/avion_silueta.svg') right center / 160px 90px no-repeat, linear-gradient(120deg, white, #f5faff); }
.pilot-modern .mp-dashboard .mp-help { background-image: url('../images/modern/pista_aterrizaje.svg'), linear-gradient(120deg, white, #f1faf2); background-size: 125px 85px, auto; }
.pilot-modern .mp-dashboard :is(.mp-other, .mp-help):has(details[open]) { background: white; }
.pilot-modern .mp-help summary .mp-icon { margin-right: 10px; }
@media (min-width: 900px) {
    .pilot-modern .main-footer { background: linear-gradient(90deg, transparent, var(--mp-orange)) left 15% center / 16% 3px no-repeat, linear-gradient(90deg, var(--mp-orange), transparent) right 15% center / 16% 3px no-repeat, linear-gradient(110deg, var(--mp-deep), #07518b, var(--mp-deep)); border-top: 0; }
    .pilot-modern .mp-dashboard-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 20px 26px; }
    .pilot-modern .mp-operations { padding-top: 0; }
    .pilot-modern .mp-operations > h2 { margin-bottom: 18px; }
}
@media (max-width: 899px) {
    body.pilot-modern .mp-prepare-heading { padding-left: 48px; padding-right: 45px; }
    body.pilot-modern .mp-dashboard .mp-intro-plane { display: block; width: 42px; height: 48px; }
    body.pilot-modern .mp-intro-windsock { width: 52px; height: 68px; top: 0; opacity: .8; }
    body.pilot-modern .mp-dashboard .mp-operation-grid .mp-tool { height: 150px; min-height: 150px; padding: 8px; font-size: 15px; }
    body.pilot-modern .mp-dashboard h2#mp-operations-title { font-size: 22px; }
    body.pilot-modern .mp-dashboard .mp-activity > .mp-panel-heading h2 { font-size: 21px; }
    body.pilot-modern .mp-activity-content { margin-right: 82px; }
    body.pilot-modern .mp-activity-tower { width: 78px; right: 5px; }
    body.pilot-modern .mp-dashboard [data-modern-aircraft] .dashboard-card-header > div {
        display: grid; grid-template-columns: 39% minmax(0, 1fr); min-height: 130px; padding: 10px;
    }
    body.pilot-modern .mp-dashboard .mp-aircraft-image { grid-row: 1 / span 2; height: 64px; }
    body.pilot-modern .mp-dashboard [data-modern-aircraft] :is(.aircraft-title, .aircraft-subtitle) { grid-column: 2; }
    body.pilot-modern .mp-dashboard [data-modern-aircraft] .dashboard-card-badges { grid-column: 1 / -1; margin-top: 16px; padding-top: 5px; align-self: end; }
    body.pilot-modern :is(.mp-dashboard, .ma-page) .mp-aircraft-actions { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    body.pilot-modern :is(.mp-dashboard, .ma-page) .mp-aircraft-actions > .mp-tool { min-height: 56px; padding: 6px 10px; }
    body.pilot-modern .mp-aircraft-tool-icon { width: 40px; height: 40px; flex-basis: 40px; }
    body.pilot-modern .mp-dashboard .mp-ornament { opacity: .2; }
    body.pilot-modern .mp-dashboard :is(.mp-other, .mp-help) { background-image: none; }
}
/* Mis aeronaves: presentación exclusiva del piloto moderno. */
.pilot-modern.pilot-aircraft-page .app-container { margin: 0; padding: 20px 16px 28px; background: transparent; border-radius: 0; box-shadow: none; overflow: visible; }
.pilot-modern.pilot-aircraft-page .app-container > .container { max-width: 1520px; width: 100%; margin: 0 auto; padding: 0; background: transparent; }
.pilot-modern.pilot-aircraft-page .app-container > .container > .panel { background: white; border: 1px solid var(--mp-border); border-radius: 14px; box-shadow: none; padding: 20px; }
.pilot-modern .ma-page { min-width: 0; }
.pilot-modern .ma-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 16px; }
.pilot-modern .ma-page-heading h1 { margin: 0; font-size: 23px; font-weight: 500; line-height: 1.3; color: var(--mp-primary); }
.pilot-modern .ma-page-heading p { margin: 5px 0 0; color: var(--mp-muted); font-size: 12px; }
.pilot-modern .ma-count { flex: 0 0 auto; padding: 5px 9px; background: var(--mp-soft); border-radius: 15px; color: var(--mp-primary); font-size: 11px; }
.pilot-modern .ma-toolbar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-bottom: 14px; }
.pilot-modern .ma-toolbar > :is(a,button) { min-height: 62px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 10px; border: 1px solid var(--mp-border); border-radius: 11px; font: inherit; font-size: 12px; text-decoration: none; text-align: center; background: white; color: var(--mp-primary); cursor: pointer; white-space: normal; }
.pilot-modern .ma-toolbar > .ma-create { grid-column: 1 / -1; flex-direction: row; min-height: 48px; gap: 8px; background: var(--mp-action); color: white; border-color: var(--mp-action); font-weight: 600; }
.pilot-modern .ma-toolbar .mp-icon { width: 19px; height: 19px; color: var(--mp-action); }
.pilot-modern .ma-grid { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 14px; }
.pilot-modern .ma-card { display: flex; flex-direction: column; min-width: 0; padding: 15px; border: 1px solid var(--mp-border); border-radius: 14px; background: white; }
.pilot-modern .ma-card-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 10px; align-items: start; order: 0; }
.pilot-modern .ma-aircraft-identity { min-width: 0; }
.pilot-modern .ma-card h2 { margin: 0; padding: 0; border: 0; color: var(--mp-primary); font-size: 21px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.pilot-modern .ma-aircraft-identity p { margin: 4px 0 0; color: var(--mp-muted); font-size: 13px; overflow-wrap: anywhere; }
.pilot-modern .ma-favorite { display: flex; align-items: center; gap: 4px; color: #856a28; font-size: 11px; min-height: 36px; }
.pilot-modern .ma-favorite > .mp-icon { width: 15px; height: 15px; }
.pilot-modern .ma-favorite form { margin: 0; padding: 0; }
.pilot-modern .ma-favorite button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; max-width: 120px; min-height: 44px; padding: 5px 7px; border: 0; border-radius: 7px; background: var(--mp-soft); color: var(--mp-action); font-size: 10px; line-height: 1.3; white-space: normal; }
.pilot-modern .ma-favorite button .mp-icon { width: 14px; height: 14px; }
.pilot-modern .ma-badges { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1px; }
.pilot-modern .ma-badges > span { padding: 3px 7px; border-radius: 7px; background: var(--mp-soft); color: var(--mp-primary); font-size: 10px; line-height: 1.4; }
.pilot-modern .ma-badges > .ma-shared { color: #24644f; background: #e6f4ec; }
.pilot-modern .ma-badges > .ma-private { color: var(--mp-muted); background: #f2f4f6; }
.pilot-modern .ma-tools { order: 1; min-width: 0; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--mp-border); }
.pilot-modern .ma-tools h3 { margin: 0 0 9px; color: var(--mp-muted); font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; }
.pilot-modern .ma-tools .aircraft-logbook-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; width: 100%; margin: 0; padding: 0; }
.pilot-modern .ma-tools .aircraft-logbook-actions > :is(a,button) { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; min-height: 77px; padding: 12px 7px; background: var(--mp-soft); color: var(--mp-primary); border: 1px solid var(--mp-border); border-radius: 9px; font: inherit; font-size: 11px; line-height: 1.35; text-align: center; white-space: normal; text-decoration: none; cursor: pointer; }
.pilot-modern .ma-tools .mp-icon { width: 20px; height: 20px; color: var(--mp-action); }
.pilot-modern .ma-tools [data-wb-aircraft] { order: 1; }
.pilot-modern .ma-tools a[href^="aircraft_logbook.php"] { order: 2; }
.pilot-modern .ma-tools a[href^="engine_logbook.php"], .pilot-modern .ma-tools button[onclick*="openEngineLogbookDialog"] { order: 3; }
.pilot-modern .ma-tools a[href^="aircraft_documents.php"] { order: 4; }
.pilot-modern .ma-details-toggle { order: 2; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 14px 0 0; padding: 11px 0 0; min-height: 44px; border: 0; border-top: 1px solid var(--mp-border); background: transparent; color: var(--mp-action); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.pilot-modern .ma-details-toggle > span { font-size: 20px; line-height: 1; }
.pilot-modern .ma-details-toggle[aria-expanded="true"] > span { transform: rotate(180deg); }
.pilot-modern .ma-secondary { display: none; order: 3; min-width: 0; }
.pilot-modern .ma-details-open > .ma-secondary { display: block; }
.pilot-modern .ma-secondary-data { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr)); gap: 16px; min-width: 0; }
.pilot-modern :is(.ma-tracker,.ma-sharing) { min-width: 0; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--mp-border); overflow-wrap: anywhere; font-size: 13px; }
.pilot-modern :is(.ma-tracker,.ma-sharing) > strong { display: flex; align-items: center; gap: 7px; color: var(--mp-primary); font-size: 14px; font-weight: 500; }
.pilot-modern :is(.ma-tracker,.ma-sharing) > strong .mp-icon { width: 17px; height: 17px; color: var(--mp-action); }
.pilot-modern .ma-tracker b { color: var(--mp-muted); font-size: 11px; font-weight: 500; }
.pilot-modern .ma-tracker > div > br:nth-of-type(n+4) { display: none; }
.pilot-modern .ma-tracker-settings { margin-top: 12px; padding: 9px 11px; background: var(--mp-bg); border-radius: 9px; }
.pilot-modern .ma-tracker-settings label { display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: center; gap: 8px; min-height: 44px; font-size: 12px; line-height: 1.4; cursor: pointer; }
.pilot-modern .ma-tracker-settings input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--mp-action); }
.pilot-modern .ma-tracker-settings > br { display: none; }
.pilot-modern .ma-sharing > div { padding: 11px; border-radius: 9px; background: var(--mp-bg); font-size: 12px; }
.pilot-modern .ma-sharing .tabla-admin { display: block; width: 100%; min-width: 0; border: 0; background: transparent; }
.pilot-modern .ma-sharing .tabla-admin thead { display: none; }
.pilot-modern .ma-sharing .tabla-admin tbody { display: grid; gap: 8px; }
.pilot-modern .ma-sharing .tabla-admin tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 2px 8px; padding: 10px; background: var(--mp-bg); border-radius: 9px; }
.pilot-modern .ma-sharing .tabla-admin tbody td { display: block; min-width: 0; padding: 0; border: 0; white-space: normal; color: var(--mp-primary); font-size: 12px; }
.pilot-modern .ma-sharing .tabla-admin tbody td:nth-child(2) { grid-column: 1; color: var(--mp-muted); font-size: 11px; }
.pilot-modern .ma-sharing .tabla-admin tbody td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
.pilot-modern .ma-sharing .btn-danger { min-width: 44px; min-height: 40px; padding: 8px; border-radius: 7px; background: #fde9e8; color: #a52820; border: 0; font-size: 11px; }
.pilot-modern .ma-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--mp-border); }
.pilot-modern .ma-admin .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 12px; border: 0; border-radius: 8px; font-size: 12px; text-decoration: none; }
.pilot-modern .ma-admin .btn-info { background: var(--mp-soft); color: var(--mp-action); }
.pilot-modern .ma-admin :is(.btn-danger,.btn-warning) { background: #fde9e8; color: #a52820; }
.pilot-modern .ma-admin > form { margin-left: auto; }
.pilot-modern .ma-empty { color: var(--mp-muted); }
.pilot-modern.pilot-aircraft-page #assignAircraftModal .password-modal-box { width: min(440px,calc(100% - 24px)); max-height: 80dvh; overflow-y: auto; padding: 22px; border: 1px solid var(--mp-border); border-radius: 14px; background: white; }
.pilot-modern.pilot-aircraft-page .app-container > .container > .panel :is(input:not([type="checkbox"]), select) { width: 100%; min-height: 44px; border: 1px solid var(--mp-border); border-radius: 8px; padding: 9px 11px; font: inherit; color: var(--mp-primary); }
@media (min-width: 900px) {
    .pilot-modern.pilot-aircraft-page .app-container { padding: 28px 30px 36px; }
    .pilot-modern .ma-toolbar { grid-template-columns: minmax(250px,1.2fr) repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
    .pilot-modern .ma-toolbar > .ma-create { grid-column: auto; }
    .pilot-modern .ma-toolbar > :is(a,button) { min-height: 52px; flex-direction: row; gap: 8px; font-size: 13px; }
    .pilot-modern .ma-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,570px),1fr)); gap: 20px; }
    .pilot-modern .ma-card { padding: 20px; }
    .pilot-modern .ma-page-heading h1 { font-size: 27px; }
    .pilot-modern .ma-details-toggle { display: none; }
    .pilot-modern .ma-secondary, .pilot-modern .ma-details-open > .ma-secondary { display: contents; }
    .pilot-modern .ma-secondary-data { order: 1; }
    .pilot-modern .ma-tools { order: 2; }
    .pilot-modern .ma-admin { order: 3; }
    .pilot-modern .ma-tools .aircraft-logbook-actions > :is(a,button) { min-height: 80px; font-size: 12px; }
}
/* Fase 3: interiores, formularios y modales del piloto moderno. */
body.pilot-modern.pilot-modern-interior .app-container { margin: 0; padding: 24px 20px; background: transparent; border-radius: 0; box-shadow: none; overflow: visible; }
body.pilot-modern.pilot-modern-interior .container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0; background: transparent; }
body.pilot-modern.pilot-modern-interior .panel { width: 100%; min-width: 0; margin: 0 0 18px; padding: 22px; border: 1px solid var(--mp-border); border-radius: 14px; background: white; box-shadow: none; }
body.pilot-modern :is(.engine-logbook-page,.wb-history-container) { min-width: 0; }
body.pilot-modern :is(.engine-logbook-page-header,.engine-maintenance-heading) { align-items: center; gap: 16px; }
body.pilot-modern :is(.engine-logbook-page-header h1,.pilot-aircraft-documents h1) { color: var(--mp-primary); font-size: 27px; font-weight: 500; line-height: 1.3; margin: 0; }
body.pilot-modern.pilot-modern-interior :is(h2,h3,h4) { color: var(--mp-primary); line-height: 1.4; overflow-wrap: anywhere; }
body.pilot-modern.pilot-modern-interior h2 { font-size: 21px; border: 0; padding: 0; }
body.pilot-modern .engine-logbook-registration { color: var(--mp-muted); margin: 8px 0 0; }
body.pilot-modern :is(.engine-logbook-page-actions,.engine-maintenance-form-actions,.engine-maintenance-actions,.engine-reconstruction-actions,.wb-history-actions,.modal-actions) { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; min-width: 0; max-width: 100%; overflow: visible; }
body.pilot-modern :is(.btn,button) { min-height: 44px; border-radius: 8px; white-space: normal; overflow-wrap: anywhere; }
body.pilot-modern .btn { padding: 10px 14px; line-height: 1.4; text-align: center; text-decoration: none; }
body.pilot-modern .btn-primary { background: var(--mp-action); border-color: var(--mp-action); color: white; }
body.pilot-modern .btn-secondary { background: var(--mp-soft); border: 1px solid var(--mp-border); color: var(--mp-primary); }
body.pilot-modern :is(.btn-danger,.btn-warning) { border-color: transparent; }
body.pilot-modern :is(.form-group,fieldset,label) { min-width: 0; max-width: 100%; }
body.pilot-modern :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea) { min-width: 0; max-width: 100%; min-height: 44px; border: 1px solid var(--mp-border); border-radius: 8px; padding: 10px 12px; background: white; color: var(--mp-primary); font: inherit; }
body.pilot-modern textarea { resize: vertical; }
body.pilot-modern input[readonly] { background: var(--mp-bg); color: var(--mp-muted); }
body.pilot-modern input[type="file"] { width: 100%; padding: 8px; }
body.pilot-modern input[type="file"]::file-selector-button { max-width: 100%; min-height: 44px; margin: 0 8px 0 0; padding: 8px 10px; border: 1px solid var(--mp-border); border-radius: 7px; background: var(--mp-soft); color: var(--mp-primary); font: inherit; white-space: normal; }
body.pilot-modern :is(.alert,.badge) { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
body.pilot-modern .alert { border-radius: 10px; padding: 12px 14px; line-height: 1.5; }
body.pilot-modern :is(.alert-error,.alert-danger) { background: #fff3f1; color: #a52820; border: 1px solid #f2c5c0; }
body.pilot-modern .alert-success { background: #edf8f0; color: #24644a; border: 1px solid #c6e5d0; }
body.pilot-modern .alert-warning { background: #fff8e8; color: #79550e; border: 1px solid #ead9ac; }
body.pilot-modern .alert-info { background: var(--mp-soft); color: var(--mp-primary); border: 1px solid var(--mp-border); }
/* Diálogos existentes: sus IDs, campos y manejadores no cambian. */
body.pilot-modern :is(.engine-logbook-dialog,.wb-dialog) { width: min(1140px,calc(100% - 24px)); max-width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--mp-border); border-radius: 16px; background: white; color: var(--mp-primary); overflow: hidden; }
body.pilot-modern :is(.engine-logbook-dialog,.wb-dialog)[open] { display: flex; flex-direction: column; }
body.pilot-modern :is(.engine-logbook-dialog,.wb-dialog)::backdrop { background: #152b4566; }
body.pilot-modern :is(.engine-logbook-dialog-header,.wb-heading) { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--mp-border); background: white; }
body.pilot-modern :is(.engine-logbook-dialog-header,.wb-heading) h2 { margin: 0; color: var(--mp-primary); font-size: 21px; line-height: 1.35; }
body.pilot-modern :is(.engine-logbook-dialog-body,.wb-body) { flex: 1 1 auto; min-height: 0; max-height: none; min-width: 0; overflow: auto; overscroll-behavior: contain; padding: 18px; }
body.pilot-modern :is(.engine-logbook-dialog-body,.wb-body) form { min-width: 0; max-width: 100%; }
body.pilot-modern :is(.engine-logbook-dialog-body,.wb-body) :is(input:not([type="hidden"]):not([type="checkbox"]),select,textarea) { width: 100%; }
body.pilot-modern :is(.engine-logbook-dialog-body,.wb-body) details { border: 1px solid var(--mp-border); border-radius: 10px; padding: 12px; background: white; }
body.pilot-modern :is(.engine-logbook-dialog-body,.wb-body) summary { min-height: 44px; padding: 9px 0; color: var(--mp-action); cursor: pointer; }
body.pilot-modern :is(#assignAircraftModal,#documentModal) { padding: max(16px,env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) max(16px,env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px)); overflow-y: auto; overscroll-behavior: contain; }
body.pilot-modern :is(#assignAircraftModal,#documentModal) .password-modal-box { width: min(520px,100%); max-width: 100%; max-height: calc(100dvh - 32px); margin: 0 auto !important; padding: 22px; border: 1px solid var(--mp-border); border-radius: 14px; background: white; overflow-y: auto; color: var(--mp-primary); }
body.pilot-modern :is(#assignAircraftModal,#documentModal) :is(input,select,textarea) { width: 100%; }
body.pilot-modern :is(#assignAircraftModal,#documentModal) h3 { margin: 0 0 18px; color: var(--mp-primary); font-size: 22px; }
body.pilot-modern :is(#assignAircraftModal,#documentModal) .form-group { margin-bottom: 16px; }
/* Historial, ficha consultada y detalle web: el PDF usa exclusivamente style.css. */
body.pilot-modern #wb-history-panel { min-width: 0; }
body.pilot-modern .wb-history-actions { margin: 10px 0; }
body.pilot-modern #wb-history-panel > p { color: var(--mp-muted); }
body.pilot-modern .wb-document { width: 100%; max-width: 100%; min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--mp-border); border-radius: 12px; background: white; font-family: Arial,Helvetica,sans-serif; font-size: 15px; color: var(--mp-primary); overflow-wrap: anywhere; }
body.pilot-modern .wb-document :is(h2,h3) { color: var(--mp-primary); }
body.pilot-modern .wb-document :is(table,img) { max-width: 100%; }
body.pilot-modern .wb-document .wb-document-table-scroll { max-width: 100%; overflow-x: auto; }
body.pilot-modern :is(.wb-card,.engine-logbook-section) { background: white; border-color: var(--mp-border); border-radius: 12px; }
body.pilot-modern .engine-logbook-section { padding: 16px; border: 1px solid var(--mp-border); }
body.pilot-modern .engine-logbook-data-grid { gap: 12px; }
body.pilot-modern .engine-logbook-data-grid > div { padding: 14px; border: 1px solid var(--mp-border); border-radius: 9px; background: var(--mp-bg); }
body.pilot-modern .engine-logbook-data-grid dt { color: var(--mp-muted); }
body.pilot-modern .engine-logbook-data-grid dd { color: var(--mp-primary); font-size: 22px; }
body.pilot-modern .engine-maintenance-form { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr)); gap: 14px; max-width: 920px; padding: 16px; border: 1px solid var(--mp-border); border-radius: 10px; background: var(--mp-bg); }
body.pilot-modern .engine-maintenance-form :is(label,input,textarea) { min-width: 0; width: 100%; }
body.pilot-modern .engine-maintenance-description, body.pilot-modern .engine-maintenance-form-actions { grid-column: 1 / -1; }
body.pilot-modern :is(.aircraft-logbook-config-form,.aircraft-cell-initialization-form) { max-width: 940px; }
body.pilot-modern :is(.aircraft-logbook-config-form,.aircraft-cell-initialization-form) label { min-width: min(260px,100%); flex: 1 1 260px; }
body.pilot-modern fieldset { min-inline-size: 0; border: 1px solid var(--mp-border); border-radius: 9px; padding: 12px; }
body.pilot-modern legend { max-width: 100%; white-space: normal; overflow-wrap: anywhere; color: var(--mp-primary); }
body.pilot-modern :is(.engine-reconstruction-correction-form,.engine-reconstruction-time-form) { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
body.pilot-modern .tabla-scroll { max-width: 100%; min-width: 0; overflow-x: auto; }
body.pilot-modern :is(.tabla-admin,.engine-logbook-table) th { background: var(--mp-soft); color: var(--mp-primary); }
body.pilot-modern :is(.tabla-admin,.engine-logbook-table) :is(th,td) { border-color: var(--mp-border); }
body.pilot-modern .engine-activity-badge { border-radius: 7px; white-space: normal; }
body.pilot-modern.pilot-aircraft-documents .form-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr)); gap: 14px; }
body.pilot-modern.pilot-aircraft-documents .form-grid > div { min-width: 0; padding: 12px; border-radius: 9px; background: var(--mp-bg); overflow-wrap: anywhere; }
@media (max-width: 899px) {
    body.pilot-modern { font-size: 16px; padding-bottom: calc(100px + env(safe-area-inset-bottom,0px)); }
    body.pilot-modern.pilot-modern-interior .app-container { padding: 18px 12px 24px; }
    body.pilot-modern.pilot-modern-interior .panel { padding: 16px; }
    body.pilot-modern :is(p,label,input,select,textarea,button,.btn) { font-size: 16px; }
    body.pilot-modern :is(input,select,textarea,button,.btn) { min-height: 44px; }
    body.pilot-modern :is(label,small,.badge,.alert,.engine-activity-badge,.engine-logbook-empty,.wb-advice,.wb-draft-status,.wb-document-warning) { font-size: 15px; line-height: 1.45; }
    body.pilot-modern label { font-size: 16px; }
    body.pilot-modern :is(.engine-logbook-dialog-body,.wb-body) { padding: 12px; }
    body.pilot-modern :is(.engine-logbook-dialog-header,.wb-heading) { padding: 12px; }
    body.pilot-modern :is(.engine-logbook-dialog-header,.wb-heading) h2 { font-size: 20px; }
    body.pilot-modern :is(.engine-logbook-page-header,.engine-maintenance-heading,.engine-logbook-page-actions,.engine-maintenance-form-actions,.engine-reconstruction-actions) { flex-direction: column; align-items: stretch; }
    body.pilot-modern .engine-logbook-page-header h1 { font-size: 24px; }
    body.pilot-modern .engine-logbook-section { padding: 12px; }
    body.pilot-modern .engine-logbook-data-grid { grid-template-columns: minmax(0,1fr); }
    body.pilot-modern .engine-logbook-data-grid dt { font-size: 15px; }
    body.pilot-modern .engine-logbook-data-grid dd { font-size: 22px; }
    body.pilot-modern .engine-maintenance-form { grid-template-columns: minmax(0,1fr); padding: 12px; }
    body.pilot-modern :is(.aircraft-logbook-config-form,.aircraft-cell-initialization-form) { display: grid; grid-template-columns: minmax(0,1fr); }
    body.pilot-modern .wb-toolbar { display: grid; grid-template-columns: minmax(0,1fr); }
    body.pilot-modern .wb-toolbar > *, body.pilot-modern .wb-profile-picker { min-width: 0; width: 100%; }
    body.pilot-modern .wb-profile-picker { display: grid; grid-template-columns: minmax(0,1fr); }
    body.pilot-modern .wb-dialog :is(label,input,select,textarea,.btn) { font-size: 16px; }
    body.pilot-modern .wb-dialog .wb-buttons { flex-wrap: wrap; }
    body.pilot-modern .wb-buttons > .btn { flex: 1 1 180px; }
    body.pilot-modern .wb-document { padding: 12px; font-size: 16px; }
    body.pilot-modern .wb-document :is(p,td,th,small) { font-size: 15px; }
    body.pilot-modern .wb-history-actions > :is(button,a) { flex: 1 1 150px; }
    /* Tablas simples: tarjetas conservando filas, campos y eventos originales. */
    body.pilot-modern table.mp-table-cards { display: block; width: 100%; min-width: 0 !important; max-width: 100%; border: 0; background: transparent; }
    body.pilot-modern table.mp-table-cards > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    body.pilot-modern table.mp-table-cards > tbody { display: grid; gap: 14px; width: 100%; }
    body.pilot-modern table.mp-table-cards tr.mp-table-card-row { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; padding: 12px; border: 1px solid var(--mp-border); border-radius: 11px; background: white; }
    body.pilot-modern table.mp-table-cards tr.mp-table-card-row > :is(td,th) { display: block; min-width: 0; width: auto; padding: 7px 0; border: 0; white-space: normal; overflow-wrap: anywhere; font-size: 16px; text-align: left; }
    body.pilot-modern table.mp-table-cards tr.mp-table-card-row > [data-label]::before { display: block; margin-bottom: 4px; content: attr(data-label); color: var(--mp-muted); font-size: 15px; font-weight: 400; line-height: 1.4; }
    body.pilot-modern table.mp-table-cards :is(.btn,button,.badge,small) { font-size: 16px; }
    body.pilot-modern table.mp-table-cards .wb-history-actions { display: flex; flex-direction: column; align-items: stretch; width: 100%; margin: 0; }
    body.pilot-modern table.mp-table-cards .engine-maintenance-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    /* Escala legible también en dashboard y Mis aeronaves. */
    body.pilot-modern :is(.mp-intro,.mp-favorite,.mp-menu-pilot,.mp-design-label,.mp-text-link,.mp-count,.mp-airborne,.mp-flight-registration,.ma-count,.ma-favorite,.ma-aircraft-identity p,.ma-badges > span,.ma-tools h3,.ma-tracker b,.ma-sharing > div) { font-size: 15px; }
    body.pilot-modern :is(.mp-brand strong,.mp-brand small,.mp-pilot > span) { font-size: 15px; }
    body.pilot-modern .mp-brand { gap: 7px; }
    body.pilot-modern .mp-brand small { max-width: 62vw; line-height: 1.35; }
    body.pilot-modern .mp-header { gap: 8px; padding-left: 12px; padding-right: 12px; }
    body.pilot-modern .mp-profile { flex: 0 0 44px; }
    body.pilot-modern .mp-dashboard :is(h1,h2), body.pilot-modern .ma-page-heading h1 { font-size: 22px; }
    body.pilot-modern .mp-panel-heading h2 { font-size: 20px; }
    body.pilot-modern .mp-aircraft-heading-status { justify-content: flex-start; }
    body.pilot-modern .mp-aircraft-actions > :is(a,button) { font-size: 14px; min-height: 54px; padding: 10px; }
    body.pilot-modern .mp-operation-grid a { font-size: 14px; min-height: 96px; padding: 12px 8px; }
    body.pilot-modern .mp-operation-grid small { font-size: 12px; line-height: 1.4; }
    body.pilot-modern .mp-dashboard .dashboard-card-summary { font-size: 15px; }
    body.pilot-modern .mp-dashboard .dashboard-card-footer .btn { font-size: 16px; min-height: 48px; }
    body.pilot-modern .mp-dashboard .badge { font-size: 12px; }
    body.pilot-modern .mp-flight-banner strong { font-size: 19px; }
    body.pilot-modern .mp-flight-banner p { font-size: 15px; }
    body.pilot-modern .mp-bottom-nav > :is(a,button) { padding: 6px 1px; font-size: 15px; min-height: 62px; }
    body.pilot-modern .mp-bottom-nav span { font-size: 15px; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; }
    body.pilot-modern .ma-card-heading { grid-template-columns: minmax(0,1fr); }
    body.pilot-modern .ma-favorite { justify-content: flex-start; }
    body.pilot-modern .ma-favorite button { font-size: 16px; max-width: none; }
    body.pilot-modern .ma-badges { grid-column: 1; }
    body.pilot-modern .ma-card h2 { font-size: 21px; }
    body.pilot-modern .ma-tools .aircraft-logbook-actions > :is(a,button) { font-size: 16px; min-height: 96px; }
    body.pilot-modern .ma-details-toggle { font-size: 16px; min-height: 48px; }
    body.pilot-modern .ma-tracker-settings label { font-size: 16px; }
    body.pilot-modern .ma-sharing .tabla-admin tbody td, body.pilot-modern .ma-sharing .tabla-admin tbody td:nth-child(2) { font-size: 15px; }
    body.pilot-modern .ma-sharing .btn-danger, body.pilot-modern .ma-admin .btn { font-size: 16px; min-height: 44px; }
}@media (max-width: 899px) {
    /* Evita que fuentes heredadas o abreviaturas font reduzcan controles móviles. */
    body.pilot-modern :is(input:not([type="hidden"]),select,textarea,button,.btn,label) { font-size: 16px !important; }
}
@media (max-width: 599px) {
    body.pilot-modern .mp-aircraft-actions > :is(a,button) {
        flex-direction: column; justify-content: center; gap: 5px;
        min-height: 74px; padding: 8px; font-size: 13px; text-align: center;
    }
}
body.pilot-modern .mp-destructive-action { background: #fff3f1; color: #a52820; border: 1px solid #f2c5c0; }
body.pilot-modern .engine-activity-badge { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
@media (max-width: 899px) {
    body.pilot-modern .engine-logbook-page-actions .btn { flex: 0 1 auto; width: 100%; min-height: 48px; }
}

@media (max-width: 899px) {
    body.pilot-modern table.mp-table-cards .wb-history-actions > :is(button,a) { flex: 0 1 auto; min-height: 44px; width: 100%; }
}

/* Fase 4: agrupaciones neutras en escritorio; presentación compacta solo móvil. */
body.pilot-modern .ma-tools-toggle, body.pilot-modern .wb-load-title { display: none; }
body.pilot-modern .wb-load { display: contents; }
@media (max-width: 899px) {
    body.pilot-modern .ma-tools-desktop-title { display: none; }
    body.pilot-modern .ma-tools-toggle { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 0; border: 0; background: transparent; color: var(--mp-action); font: inherit; text-align: left; cursor: pointer; }
    body.pilot-modern .ma-tools-toggle > span { margin-left: auto; font-size: 20px; }
    body.pilot-modern .ma-tools-toggle[aria-expanded="true"] > span { transform: rotate(180deg); }
    body.pilot-modern .ma-tools-panel { display: none; }
    body.pilot-modern .ma-tools-open .ma-tools-panel { display: block; padding-top: 8px; }
}
@media (max-width: 760px) {
    body.pilot-modern #wb-dialog .wb-heading { background: #173f65; color: white; padding: 10px 12px; }
    body.pilot-modern #wb-dialog .wb-heading h2 { color: inherit; font-size: 19px; }
    body.pilot-modern #wb-dialog .wb-body { padding: 10px; background: #edf4f8; }
    body.pilot-modern #wb-dialog .wb-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 12px; background: white; border: 1px solid var(--mp-border); border-radius: 12px; }
    body.pilot-modern #wb-dialog .wb-toolbar > div:first-child { grid-column: 1 / -1; }
    body.pilot-modern #wb-dialog #wb-aircraft { font-size: 24px; }
    body.pilot-modern #wb-dialog #wb-identity { margin: 2px 0 6px; font-size: 15px; }
    body.pilot-modern #wb-dialog .wb-profile-picker, body.pilot-modern #wb-dialog .wb-buttons { display: contents; }
    body.pilot-modern #wb-dialog .wb-toolbar > label { grid-row: 2; grid-column: 1; }
    body.pilot-modern #wb-dialog .wb-profile-picker > label { grid-row: 2; grid-column: 2; }
    body.pilot-modern #wb-dialog :is(input,select) { margin-top: 4px; padding: 8px; min-height: 44px; }
    body.pilot-modern #wb-dialog .wb-toolbar .btn { width: 100%; min-height: 48px; align-self: stretch; padding: 7px; line-height: 1.2; background: #edf5fd; color: #173f65; border: 1px solid #bdd4eb; }
    body.pilot-modern #wb-dialog #wb-save-calculation { grid-row: 3; grid-column: 1; background: #196b9e; color: white; }
    body.pilot-modern #wb-dialog #wb-view { grid-row: 3; grid-column: 2; }
    body.pilot-modern #wb-dialog #wb-export-pdf { grid-row: 4; grid-column: 1; }
    body.pilot-modern #wb-dialog #wb-open-history { grid-row: 4; grid-column: 2; }
    body.pilot-modern #wb-dialog #wb-copy { grid-row: 5; grid-column: 1 / -1; }
    body.pilot-modern #wb-dialog .wb-toolbar .btn-danger { background: #fff3f1; color: #a52820; border-color: #f2c5c0; }
    body.pilot-modern #wb-dialog :is(.wb-advice,.wb-mobile-redundant) { display: none; }
    body.pilot-modern #wb-dialog :is(#wb-message,#wb-save-message,#wb-draft-status):empty { display: none; }
    body.pilot-modern #wb-dialog .wb-columns { grid-template-columns: minmax(0,1fr); gap: 10px; margin-top: 10px; }
    body.pilot-modern #wb-dialog :is(.wb-inputs,.wb-graphics) { gap: 10px; }
    body.pilot-modern #wb-dialog .wb-card { padding: 10px; border-radius: 12px; background: white; }
    body.pilot-modern #wb-dialog .wb-card h3, body.pilot-modern #wb-dialog .wb-load-title { margin: 0 0 8px; padding: 4px; font-size: 17px; color: #173f65; background: linear-gradient(90deg,#edf6ff,transparent); }
    body.pilot-modern #wb-dialog .wb-load { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 6px 10px; padding: 10px; border: 1px solid #cde2f6; border-radius: 12px; background: white; }
    body.pilot-modern #wb-dialog .wb-load-title { display: block; grid-column: 1 / -1; margin-bottom: 0; }
    body.pilot-modern #wb-dialog .wb-load > section { display: contents; }
    body.pilot-modern #wb-dialog .wb-load > section > h3 { display: none; }
    body.pilot-modern #wb-dialog .wb-load label { display: flex; flex-direction: column; justify-content: flex-end; margin: 0; min-width: 0; }
    body.pilot-modern #wb-dialog .wb-occupants label { grid-row: 2; grid-column: span 2; }
    body.pilot-modern #wb-dialog .wb-fuel-card label:first-of-type { grid-row: 3; grid-column: 1 / 5; }
    body.pilot-modern #wb-dialog .wb-fuel-card label:last-of-type { grid-row: 3; grid-column: 5 / 7; }
    body.pilot-modern #wb-dialog .wb-baggage-card label { grid-row: 2; grid-column: 5 / 7; }
    body.pilot-modern #wb-dialog :is(#wb-fuel-info,#wb-baggage-info) { display: none; }
    body.pilot-modern #wb-dialog #wb-summary { grid-template-columns: minmax(0,1fr) auto; gap: 0; line-height: 1.3; }
    body.pilot-modern #wb-dialog #wb-summary > * { padding: 3px 2px; border-bottom: 1px solid #edf2f6; font-size: 16px; }
    body.pilot-modern #wb-dialog #wb-summary dd { font-variant-numeric: tabular-nums; }
    body.pilot-modern #wb-dialog #wb-summary :is(dt,dd):nth-last-of-type(3) { padding: 7px 3px; font-size: 19px; }
    body.pilot-modern #wb-dialog .wb-plane { gap: 6px; }
    body.pilot-modern #wb-dialog .wb-station-box { padding: 5px 3px; font-size: 15px; line-height: 1.25; }
    body.pilot-modern #wb-dialog .wb-station-box strong { display: inline; font-size: 16px; margin: 0; }
    body.pilot-modern #wb-dialog .wb-station-box span:last-child { display: inline; }
    body.pilot-modern #wb-dialog .wb-station-box span:last-child::before { content: ' · '; }
    body.pilot-modern #wb-dialog #wb-visual + small { display: none; }
    body.pilot-modern #wb-dialog .wb-cg-labels { margin: 8px 0 26px; gap: 5px; font-size: 15px; }
    body.pilot-modern #wb-dialog .wb-cg-caption { margin: 20px 0 10px; font-size: 15px; }
    body.pilot-modern #wb-dialog .wb-status { padding: 12px; font-size: 18px; }
    body.pilot-modern #wb-dialog #wb-violations { margin: 8px 0 0; padding-left: 23px; font-size: 16px; }
}
@media (max-width: 359px) {
    body.pilot-modern #wb-dialog .wb-toolbar > label { grid-row: 2; grid-column: 1 / -1; }
    body.pilot-modern #wb-dialog .wb-profile-picker > label { grid-row: 3; grid-column: 1 / -1; }
    body.pilot-modern #wb-dialog :is(#wb-save-calculation,#wb-view) { grid-row: 4; }
    body.pilot-modern #wb-dialog :is(#wb-export-pdf,#wb-open-history) { grid-row: 5; }
    body.pilot-modern #wb-dialog #wb-copy { grid-row: 6; }
}

@media (max-width: 760px) {
    body.pilot-modern #wb-dialog .wb-negative-margin { color: #b42318; }
}

/* Favorita compacta junto a la matrícula; conserva el formulario existente. */
body.pilot-modern .ma-card-heading { grid-template-columns: minmax(0,1fr) auto; }
body.pilot-modern .ma-favorite { justify-content: flex-end; justify-self: end; min-height: 28px; white-space: nowrap; }
body.pilot-modern .ma-favorite button { position: relative; width: 44px; height: 44px; min-height: 44px; padding: 10px; margin: -8px 0; background: transparent; color: #856a28; }
body.pilot-modern .ma-favorite button .mp-icon { width: 22px; height: 22px; }
body.pilot-modern .ma-favorite button span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.pilot-modern .ma-badges { grid-column: 1 / -1; }

@media (max-width: 760px) {
    body.pilot-modern #wb-dialog .wb-actions-toggle { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
    body.pilot-modern #wb-dialog .wb-actions-toggle::after { content: '⌄'; font-size: 22px; }
    body.pilot-modern #wb-dialog .wb-actions-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
    body.pilot-modern #wb-dialog #wb-actions-panel { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    body.pilot-modern #wb-dialog #wb-actions-panel > .btn { grid-row: auto; grid-column: auto; }
    body.pilot-modern #wb-dialog #wb-actions-panel :is(#wb-save-calculation,#wb-view) { grid-row: 1; }
    body.pilot-modern #wb-dialog #wb-actions-panel #wb-save-calculation { grid-column: 1; }
    body.pilot-modern #wb-dialog #wb-actions-panel #wb-view { grid-column: 2; }
    body.pilot-modern #wb-dialog #wb-actions-panel #wb-copy { grid-column: 1 / -1; }
}

/* Calculadora moderna compacta de escritorio; móvil conserva sus reglas. */
@media (min-width: 900px) {
    body.pilot-modern #wb-dialog .wb-heading { padding: 8px 16px; background: #173f65; color: white; }
    body.pilot-modern #wb-dialog .wb-heading h2 { color: inherit; font-size: 21px; }
    body.pilot-modern #wb-dialog .wb-body { padding: 12px; background: #f3f8fc; }
    body.pilot-modern #wb-dialog .wb-toolbar { grid-template-columns: minmax(140px,.8fr) minmax(0,1fr) minmax(0,1fr) auto; gap: 10px 14px; align-items: end; }
    body.pilot-modern #wb-dialog .wb-toolbar > div:first-child { padding-right: 12px; border-right: 1px solid var(--mp-border); }
    body.pilot-modern #wb-dialog #wb-aircraft { font-size: 24px; }
    body.pilot-modern #wb-dialog #wb-identity { margin: 3px 0 0; font-size: 14px; }
    body.pilot-modern #wb-dialog .wb-profile-picker { display: contents; }
    body.pilot-modern #wb-dialog .wb-toolbar label { font-size: 14px; }
    body.pilot-modern #wb-dialog .wb-toolbar .btn { min-height: 40px; padding: 8px 12px; font-size: 14px; line-height: 1.25; }
    body.pilot-modern #wb-dialog .wb-buttons { grid-column: 1 / -1; gap: 7px; margin: 0; }
    body.pilot-modern #wb-dialog .wb-buttons > .btn { flex: 1 1 auto; }
    body.pilot-modern #wb-dialog :is(input,select) { min-height: 38px; margin-top: 4px; padding: 7px 9px; font-size: 15px; }
    body.pilot-modern #wb-dialog :is(.wb-advice,.wb-mobile-redundant) { display: none; }
    body.pilot-modern #wb-dialog :is(#wb-message,#wb-save-message,#wb-draft-status):empty { display: none; }
    body.pilot-modern #wb-dialog #wb-draft-status { margin: 6px 0; }
    body.pilot-modern #wb-dialog .wb-columns { grid-template-columns: minmax(280px,.62fr) minmax(0,1fr); gap: 10px; margin-top: 12px; }
    body.pilot-modern #wb-dialog :is(.wb-inputs,.wb-graphics) { gap: 10px; }
    body.pilot-modern #wb-dialog .wb-card { padding: 10px; border-radius: 10px; background: white; }
    body.pilot-modern #wb-dialog .wb-card h3, body.pilot-modern #wb-dialog .wb-load-title { padding: 5px 6px; margin: 0 0 8px; color: #173f65; background: linear-gradient(90deg,#dfedfc,#f5faff); font-size: 16px; border-radius: 5px; }
    body.pilot-modern #wb-dialog .wb-load { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 10px; padding: 10px; border: 1px solid #cde2f6; border-radius: 10px; background: white; }
    body.pilot-modern #wb-dialog .wb-load-title { display: block; grid-column: 1 / -1; margin-bottom: 0; }
    body.pilot-modern #wb-dialog .wb-load > section { display: contents; }
    body.pilot-modern #wb-dialog .wb-load > section > h3 { display: none; }
    body.pilot-modern #wb-dialog .wb-load label { display: grid; grid-template-columns: minmax(0,1fr) minmax(58px,1fr); align-items: center; gap: 6px; margin: 0; min-width: 0; font-size: 14px; }
    body.pilot-modern #wb-dialog .wb-occupants label { grid-row: 2; }
    body.pilot-modern #wb-dialog .wb-fuel-card label:first-of-type { display: block; grid-row: 3; grid-column: 1 / -1; }
    body.pilot-modern #wb-dialog .wb-fuel-card label:last-of-type { grid-row: 4; grid-column: 1; }
    body.pilot-modern #wb-dialog .wb-baggage-card label { grid-row: 4; grid-column: 2; }
    body.pilot-modern #wb-dialog :is(#wb-fuel-info,#wb-baggage-info) { grid-row: 5; margin: 0; padding: 6px; border: 0; border-radius: 5px; background: #e3f3ff; font-size: 13px; line-height: 1.3; }
    body.pilot-modern #wb-dialog #wb-summary { grid-template-columns: minmax(0,1fr) auto; gap: 0; font-size: 15px; line-height: 1.3; }
    body.pilot-modern #wb-dialog #wb-summary > * { padding: 3px 2px; border-bottom: 1px solid #edf2f6; }
    body.pilot-modern #wb-dialog #wb-summary dd { font-variant-numeric: tabular-nums; }
    body.pilot-modern #wb-dialog #wb-summary :is(dt,dd):nth-last-of-type(3) { padding: 6px 3px; font-size: 19px; }
    body.pilot-modern #wb-dialog .wb-negative-margin { color: #b42318; }
    body.pilot-modern #wb-dialog .wb-plane { aspect-ratio: 2.6 / 1; min-height: 220px; }
    body.pilot-modern #wb-dialog .wb-station-box { padding: 5px 2px; font-size: 12px; line-height: 1.25; }
    body.pilot-modern #wb-dialog .wb-station-box strong { margin: 2px 0; font-size: 14px; }
    body.pilot-modern #wb-dialog #wb-visual + small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.3; }
    body.pilot-modern #wb-dialog .wb-graphics > .wb-card:last-child { display: grid; grid-template-columns: minmax(0,1fr) minmax(110px,24%); gap: 0 12px; align-items: center; }
    body.pilot-modern #wb-dialog .wb-graphics > .wb-card:last-child > h3 { grid-column: 1 / -1; }
    body.pilot-modern #wb-dialog .wb-cg-labels { grid-column: 1; margin: 4px 0 25px; gap: 5px; font-size: 13px; }
    body.pilot-modern #wb-dialog .wb-cg-track { grid-column: 1; }
    body.pilot-modern #wb-dialog .wb-cg-caption { grid-column: 1; margin: 20px 0 0; font-size: 12px; }
    body.pilot-modern #wb-dialog #wb-status { grid-column: 2; grid-row: 2 / 5; padding: 12px 8px; font-size: 15px; text-align: center; }
    body.pilot-modern #wb-dialog #wb-violations { grid-column: 1 / -1; margin: 8px 0 0; padding-left: 22px; font-size: 15px; }
    body.pilot-modern #wb-dialog #wb-violations:empty { display: none; }
}

/* Historial contextual: las opciones no amplían la autorización del servidor. */
body.pilot-modern .wb-history-filter { display: block; min-width: min(260px,100%); margin: 0; }
body.pilot-modern .wb-history-filter select { display: block; width: 100%; }
body.pilot-modern .wb-history-identity { padding: 10px 12px; background: #dfedfc; border-radius: 7px; }
body.pilot-modern .wb-history-numbers, body.pilot-modern .wb-history-state-short,
body.pilot-modern [data-history-action] > svg { display: none; }
@media (max-width: 899px) {
    body.pilot-modern.pilot-wb-history .panel { padding: 12px; }
    body.pilot-modern #wb-history-panel > h2 { margin: 8px 0; font-size: 21px; line-height: 1.2; }
    body.pilot-modern #wb-history-panel > p { margin: 6px 0; font-size: 15px; line-height: 1.3; }
    body.pilot-modern #wb-history-panel > .wb-history-actions { display: flex; flex-wrap: wrap; margin: 8px 0; }
    body.pilot-modern .wb-history-filter { width: 100%; font-size: 15px; }
    body.pilot-modern .wb-history-filter select { margin-top: 4px; }
    body.pilot-modern #wb-history-rows { gap: 8px; }
    body.pilot-modern #wb-history-rows > tr.mp-table-card-row { grid-template-columns: 80px minmax(0,1fr) 72px; gap: 2px 6px; padding: 9px; align-items: start; }
    body.pilot-modern #wb-history-rows > tr > td { padding: 0; font-size: 15px; line-height: 1.3; }
    body.pilot-modern #wb-history-rows > tr > td::before { display: none; }
    body.pilot-modern #wb-history-rows .wb-history-cell-saved_at { grid-column: 1; grid-row: 1 / 6; }
    body.pilot-modern #wb-history-rows .wb-history-cell-registration { grid-column: 2; grid-row: 1; font-weight: 700; }
    body.pilot-modern #wb-history-rows .wb-history-cell-registration button { display: block; min-height: 44px; width: 100%; padding: 0; border: 0; background: transparent; font-weight: 700; text-align: left; }
    body.pilot-modern #wb-history-rows .wb-history-cell-profile_name { grid-column: 2; grid-row: 2; }
    body.pilot-modern #wb-history-rows .wb-history-cell-total_weight { grid-column: 2; grid-row: 3; }
    body.pilot-modern #wb-history-rows .wb-history-cell-cg { grid-column: 2; grid-row: 4; }
    body.pilot-modern #wb-history-rows .wb-history-cell-total_weight::before { display: inline; content: 'Peso: '; }
    body.pilot-modern #wb-history-rows .wb-history-cell-cg::before { display: inline; content: 'CG: '; }
    body.pilot-modern #wb-history-rows .wb-history-cell-state { grid-column: 3; grid-row: 1; padding: 3px; border-radius: 4px; text-align: center; font-size: 15px; }
    body.pilot-modern #wb-history-rows [data-state="within"] { background: #e6f6e9; color: #11652a; }
    body.pilot-modern #wb-history-rows [data-state="outside"] { background: #fff0ee; color: #a52820; }
    body.pilot-modern #wb-history-rows .wb-history-state-full { display: none; }
    body.pilot-modern #wb-history-rows .wb-history-state-short { display: inline; }
    body.pilot-modern #wb-history-rows .wb-history-cell-actions { grid-column: 3; grid-row: 2 / 6; }
    body.pilot-modern #wb-history-rows .wb-history-actions { gap: 4px; margin: 0; align-items: center; }
    body.pilot-modern #wb-history-rows [data-history-action] { display: flex; justify-content: center; align-items: center; width: 44px; height: 44px; min-height: 44px; padding: 9px; }
    body.pilot-modern #wb-history-rows [data-history-action] > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    body.pilot-modern #wb-history-rows [data-history-action] > svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
    body.pilot-modern #wb-history-rows [data-history-action="delete"] { color: #a52820; background: #fff0ee; border-color: #f2c5c0; }
    body.pilot-modern #wb-history-panel[data-history-mode="aircraft"] .wb-history-cell-registration { display: none; }
    body.pilot-modern #wb-history-panel[data-history-mode="aircraft"] .wb-history-cell-profile_name { grid-row: 1 / 3; }
    body.pilot-modern #wb-history-list > .wb-history-actions { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 12px 0; overflow: visible; }
    body.pilot-modern #wb-history-list > .wb-history-actions > button { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; font-size: 0 !important; }
    body.pilot-modern #wb-history-prev::before { content: '‹'; font-size: 24px; }
    body.pilot-modern #wb-history-next::before { content: '›'; font-size: 24px; }
    body.pilot-modern .wb-history-page-label { display: none; }
    body.pilot-modern .wb-history-numbers { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
    body.pilot-modern .wb-history-numbers button { min-width: 36px; min-height: 44px; padding: 6px; }
    body.pilot-modern .wb-history-numbers [aria-current="page"] { background: #173f65; color: white; }
}

body.pilot-modern #wb-history-panel [hidden] { display: none !important; }

@media (max-width: 899px) {
    body.pilot-modern.pilot-wb-history .panel > p { margin: 0 0 8px; }
}

/* Consulta técnica: solo escritorio moderno, sin afectar a calculadora ni móvil. */
@media (min-width: 900px) {
    body.pilot-modern #wb-dialog #wb-sheet { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); gap: 10px 14px; align-items: start; }
    body.pilot-modern #wb-dialog #wb-sheet > :is(h3,#wb-sheet-title) { grid-column: 1 / -1; margin: 0; }
    body.pilot-modern #wb-dialog #wb-sheet #wb-sheet-title { font-size: 15px; line-height: 1.35; }
    body.pilot-modern #wb-dialog #wb-sheet-visual { grid-column: 1; min-width: 0; border: 1px solid #cde2f6; border-radius: 9px; padding: 8px; background: white; }
    body.pilot-modern #wb-dialog #wb-sheet-visual .wb-plane { aspect-ratio: 2 / 1; min-height: 0; }
    body.pilot-modern #wb-dialog #wb-sheet-data { grid-column: 2; display: grid; grid-template-columns: minmax(0,1fr); gap: 7px; padding: 8px; border: 1px solid #cde2f6; border-radius: 9px; background: white; }
    body.pilot-modern #wb-dialog #wb-sheet-data .wb-sheet-group-title { padding: 5px 7px; background: #e4effc; border-radius: 5px; color: #173f65; font-size: 15px; font-weight: 700; }
    body.pilot-modern #wb-dialog #wb-sheet-data .wb-sheet-group-body { margin: 0; text-align: left; font-weight: 400; }
    body.pilot-modern #wb-dialog #wb-sheet-data .wb-sheet-group-body > dl { grid-template-columns: minmax(0,1fr) auto; gap: 0 8px; margin: 0; font-size: 14px; line-height: 1.3; }
    body.pilot-modern #wb-dialog #wb-sheet-data .wb-sheet-group-body > dl > :is(dt,dd) { padding: 3px 2px; border-bottom: 1px solid #edf2f6; }
    body.pilot-modern #wb-dialog #wb-sheet-data dd { font-variant-numeric: tabular-nums; }
    body.pilot-modern #wb-dialog #wb-sheet-close { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
}

/* Historial móvil compacto en tres líneas. */
@media (max-width: 899px) {
    body.pilot-modern #wb-history-rows { gap: 6px; }
    body.pilot-modern #wb-history-rows > tr.mp-table-card-row { grid-template-columns: repeat(6,minmax(0,1fr)); grid-template-rows: auto minmax(32px,auto) auto; gap: 4px 6px; padding: 7px 8px; align-items: center; }
    body.pilot-modern #wb-history-rows .wb-history-cell-saved_at { grid-column: 1 / 3; grid-row: 1; }
    body.pilot-modern #wb-history-rows .wb-history-cell-registration { grid-column: 3 / 5; grid-row: 1; }
    body.pilot-modern #wb-history-rows .wb-history-cell-registration button { min-height: 0; padding: 2px 0; }
    body.pilot-modern #wb-history-rows .wb-history-cell-state { grid-column: 5 / 7; grid-row: 1; }
    body.pilot-modern #wb-history-rows .wb-history-cell-profile_name { grid-column: 1 / 4; grid-row: 2; }
    body.pilot-modern #wb-history-rows .wb-history-cell-actions { display: block; grid-column: 4 / 7; grid-row: 2; }
    body.pilot-modern #wb-history-rows .wb-history-cell-actions > .wb-history-actions { display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: flex-end; gap: 4px; margin: 0; }
    body.pilot-modern #wb-history-rows [data-history-action] { flex: 0 0 32px; width: 32px; height: 32px; min-height: 32px; padding: 5px; margin: 0; }
    body.pilot-modern #wb-history-rows .wb-history-cell-total_weight { grid-column: 1 / 4; grid-row: 3; }
    body.pilot-modern #wb-history-rows .wb-history-cell-cg { grid-column: 4 / 7; grid-row: 3; text-align: right; }
    body.pilot-modern #wb-history-panel[data-history-mode="aircraft"] .wb-history-cell-saved_at { grid-column: 1 / 5; }
    body.pilot-modern #wb-history-panel[data-history-mode="aircraft"] .wb-history-cell-profile_name { grid-column: 1 / 4; grid-row: 2; }
}

/* Detalle histórico moderno: tablas compactas y snapshot sin recalcular. */
body.pilot-modern #wb-history-panel.wb-history-detail-open > :is(h2,p,.wb-history-actions) { display: none; }
body.pilot-modern #wb-history-panel.wb-history-detail-open > #wb-history-message:not(:empty) { display: block; }
body.pilot-modern #wb-history-detail > .wb-history-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
body.pilot-modern #wb-history-detail > .wb-history-actions > :is(a,button) { flex: 1 1 125px; min-height: 44px; padding: 8px; text-align: center; }
body.pilot-modern #wb-history-document .wb-document[data-compact-detail] { font: inherit; font-size: 15px; padding: 0; }
body.pilot-modern #wb-history-document .wb-document > header { border: 0; padding: 0; }
body.pilot-modern #wb-history-document .wb-document > header > strong { font-size: 13px; }
body.pilot-modern #wb-history-document .wb-document > header > h2 { margin: 5px 0 10px; font-size: 21px; }
body.pilot-modern #wb-history-document .wb-detail-identity { padding: 10px; background: #edf5fe; border: 1px solid #d6e6f6; border-radius: 8px; margin-bottom: 10px; }
body.pilot-modern #wb-history-document .wb-detail-identity h3 { margin: 0 0 5px; font-size: 16px; }
body.pilot-modern #wb-history-document .wb-detail-identity p { margin: 0; font-size: 15px; line-height: 1.4; }
body.pilot-modern #wb-history-document .wb-document > section { min-width: 0; margin-bottom: 10px; border: 1px solid #d6e6f6; border-radius: 8px; padding: 7px; background: white; }
body.pilot-modern #wb-history-document .wb-document > section > h3 { padding: 7px; margin: 0 0 6px; background: #e4effc; color: #173f65; border-radius: 5px; font-size: 17px; }
body.pilot-modern #wb-history-document .wb-document table { display: table; width: 100%; table-layout: fixed; font-size: 14px; margin: 0; }
body.pilot-modern #wb-history-document .wb-document :is(th,td) { padding: 5px 4px; font-size: 14px; line-height: 1.3; border-color: #dbe7f2; }
body.pilot-modern #wb-history-document .wb-document th { background: #e4effc; }
body.pilot-modern #wb-history-document .wb-document tfoot :is(td,th) { background: #e1efff; font-weight: 700; }
body.pilot-modern #wb-history-document .wb-detail-load > .wb-document-table-scroll th:first-child { width: 34%; }
body.pilot-modern #wb-history-document .wb-detail-load > .wb-document-table-scroll th:last-child { width: 30%; }
body.pilot-modern #wb-history-document .wb-detail-checks th:first-child { width: 42%; }
body.pilot-modern #wb-history-document .wb-detail-checks th:last-child { width: 29%; }
body.pilot-modern #wb-history-document [data-result="pass"] { color: #11652a; background: #e6f6e9; font-weight: 700; }
body.pilot-modern #wb-history-document [data-result="fail"] { color: #a52820; background: #fff0ee; font-weight: 700; }
body.pilot-modern #wb-history-document .wb-detail-limits { display: flex; justify-content: space-between; gap: 10px; color: #a52820; font-size: 14px; margin: 4px 0; }
body.pilot-modern #wb-history-document .wb-detail-limits span:last-child { text-align: right; }
body.pilot-modern #wb-history-document .wb-history-graph { width: 100%; height: auto; margin: 0; }
body.pilot-modern #wb-history-document .wb-detail-cg-value { margin: 5px 0; padding: 7px; border-radius: 6px; background: #e4effc; text-align: center; font-size: 15px; font-weight: 700; }
body.pilot-modern #wb-history-document .wb-detail-state { margin: 6px 0 0; padding: 8px; border-radius: 5px; font-size: 15px; }
body.pilot-modern #wb-history-document .wb-detail-state[data-state="within"] { color: #11652a; background: #e6f6e9; }
body.pilot-modern #wb-history-document .wb-detail-state[data-state="outside"] { color: #a52820; background: #fff0ee; }
body.pilot-modern #wb-history-document .wb-detail-technical p { margin: 6px 3px; font-size: 15px; line-height: 1.4; }
body.pilot-modern #wb-history-document .wb-document-warning { margin: 0; padding: 10px; border: 1px solid #ead9ac; border-radius: 8px; background: #fff8e8; color: #594b2c; font-size: 14px; line-height: 1.4; }
body.pilot-modern #wb-history-document .wb-document-warning::before { content: 'ⓘ '; font-weight: 700; }
body.pilot-modern #wb-history-document .wb-detail-moments { margin-top: 7px; }
body.pilot-modern #wb-history-document .wb-detail-moments > summary { min-height: 44px; padding: 10px 4px; cursor: pointer; font-size: 15px; color: #173f65; }
@media (max-width: 899px) {
    body.pilot-modern #wb-history-document .wb-detail-load > .wb-document-table-scroll th:first-child { width: 44%; }
    body.pilot-modern #wb-history-document .wb-detail-load > .wb-document-table-scroll th:last-child { width: 28%; }
    body.pilot-modern #wb-history-document .wb-document :is(th,td) { font-size: 14px; }
}
@media (min-width: 900px) {
    body.pilot-modern #wb-history-detail > .wb-history-actions { justify-content: flex-end; }
    body.pilot-modern #wb-history-detail > .wb-history-actions > :is(a,button) { flex: 0 1 auto; }
    body.pilot-modern #wb-history-document .wb-document[data-compact-detail] { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 14px; align-items: start; }
    body.pilot-modern #wb-history-document .wb-document > :is(header,.wb-detail-identity,.wb-document-warning) { grid-column: 1 / -1; margin: 0; }
    body.pilot-modern #wb-history-document .wb-detail-identity { display: flex; align-items: center; gap: 16px; }
    body.pilot-modern #wb-history-document .wb-detail-identity h3 { flex: 0 0 auto; margin: 0; }
    body.pilot-modern #wb-history-document .wb-detail-identity p { font-size: 14px; }
    body.pilot-modern #wb-history-document .wb-detail-identity br { display: none; }
    body.pilot-modern #wb-history-document .wb-document > section { margin: 0; }
    body.pilot-modern #wb-history-document .wb-detail-load { grid-column: 1; grid-row: 3; }
    body.pilot-modern #wb-history-document .wb-detail-cg { grid-column: 2; grid-row: 3; }
    body.pilot-modern #wb-history-document .wb-detail-checks { grid-column: 1; grid-row: 4; }
    body.pilot-modern #wb-history-document .wb-detail-technical { grid-column: 2; grid-row: 4; }
}

/* Libros digitales: componentes compartidos, compactos solo en móvil moderno. */
body.pilot-modern .book-compact :is(.book-model-caption,.book-type-compact,.book-engine-summary,.book-label-compact) { display: none; }
@media (max-width: 899px) {
    body.pilot-modern .book-compact .panel { padding: 10px; }
    body.pilot-modern .book-compact .engine-logbook-page-header { display: grid; grid-template-columns: minmax(0,1fr); gap: 9px; padding: 10px; border: 1px solid var(--mp-border); border-radius: 10px; background: white; margin-bottom: 10px; }
    body.pilot-modern .book-compact .engine-logbook-page-header h1 { font-weight: 700; font-size: 22px; line-height: 1.2; margin: 0; }
    body.pilot-modern .book-compact .engine-logbook-registration { margin: 4px 0 0; font-size: 15px; }
    body.pilot-modern .book-compact .book-model-caption { display: inline; }
    body.pilot-modern .book-compact .engine-logbook-page-header .engine-logbook-document-header { margin: 0; padding: 0; border: 0; background: transparent; }
    body.pilot-modern .book-compact .engine-logbook-page-header .engine-logbook-document-header > h2 { display: none; }
    body.pilot-modern .book-compact :is(.engine-logbook-page-header,.book-summary) .engine-logbook-data-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 0; }
    body.pilot-modern .book-compact :is(.engine-logbook-page-header,.book-summary) .engine-logbook-data-grid > div { min-width: 0; padding: 8px; border-radius: 8px; background: #edf5fc; }
    body.pilot-modern .book-compact :is(.engine-logbook-page-header,.book-summary) .engine-logbook-data-grid dt { font-size: 14px; line-height: 1.3; margin: 0 0 3px; }
    body.pilot-modern .book-compact :is(.engine-logbook-page-header,.book-summary) .engine-logbook-data-grid dd { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
    body.pilot-modern .book-compact .engine-logbook-page-header .book-duplicate { display: none; }
    body.pilot-modern .book-compact .book-owner { grid-column: 1 / -1; }
    body.pilot-modern .book-compact .engine-logbook-page-header .engine-logbook-data-grid dd { font-size: 16px; }
    body.pilot-modern .book-compact .book-serial { order: -1; }
    body.pilot-modern .book-compact .engine-logbook-page-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
    body.pilot-modern .book-compact .engine-logbook-page-actions .btn { min-height: 44px; padding: 8px 6px; font-size: 16px; line-height: 1.25; }
    body.pilot-modern .book-compact > .panel > .engine-logbook-section { padding: 10px; margin: 0 0 10px; }
    body.pilot-modern .book-compact > .panel > .engine-logbook-section > h2 { margin: 0 0 8px; font-size: 19px; line-height: 1.25; }
    body.pilot-modern .book-compact .book-engine-summary { display: block; }
    body.pilot-modern .book-compact .engine-maintenance-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
    body.pilot-modern .book-compact .engine-maintenance-heading h2 { margin: 0; font-size: 18px; line-height: 1.25; }
    body.pilot-modern .book-compact .engine-maintenance-heading > .btn { min-height: 44px; max-width: 145px; padding: 8px; font-size: 16px; line-height: 1.25; text-align: center; }
    body.pilot-modern .book-compact .book-history > tbody { gap: 8px; }
    body.pilot-modern .book-compact .book-history tr.mp-table-card-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px 8px; padding: 9px; align-items: center; }
    body.pilot-modern .book-compact table.book-history tr.mp-table-card-row > td { padding: 0; font-size: 15px; line-height: 1.3; }
    body.pilot-modern .book-compact table.book-history tr.mp-table-card-row > td::before { display: none; }
    body.pilot-modern .book-compact .book-history .book-cell-date { grid-column: 1; grid-row: 1; font-weight: 700; }
    body.pilot-modern .book-compact .book-history .book-cell-type { grid-column: 2; grid-row: 1; text-align: right; }
    body.pilot-modern .book-compact .book-type-original { display: none; }
    body.pilot-modern .book-compact .book-type-compact { display: inline; font-size: 15px; font-weight: 700; color: #173f65; background: #edf5fc; border-radius: 8px; padding: 3px 5px; }
    body.pilot-modern .book-compact .book-history .book-cell-pilot { grid-column: 1 / -1; grid-row: 2; }
    body.pilot-modern .book-compact .book-history .book-cell-route { grid-column: 1 / -1; grid-row: 3; }
    body.pilot-modern .book-compact .book-history .book-cell-start { grid-column: 1; grid-row: 4; }
    body.pilot-modern .book-compact .book-history .book-cell-end { grid-column: 2; grid-row: 4; }
    body.pilot-modern .book-compact .book-history :is(.book-cell-start,.book-cell-end) { background: #e8f2fc; padding: 7px; border-radius: 7px; font-size: 18px; font-weight: 700; }
    body.pilot-modern .book-compact table.book-history tr.mp-table-card-row :is(.book-cell-start,.book-cell-end)::before { display: block; font-size: 14px; font-weight: 400; margin-bottom: 3px; }
    body.pilot-modern .book-compact table.book-history tr.mp-table-card-row .book-cell-start::before { content: 'Horas iniciales'; }
    body.pilot-modern .book-compact table.book-history tr.mp-table-card-row .book-cell-end::before { content: 'Horas finales'; }
    body.pilot-modern .book-compact .book-history .book-cell-duration { display: none; }
    body.pilot-modern .book-compact .book-history .engine-activity-flight .book-cell-actions:empty,
    body.pilot-modern .book-compact .book-history .engine-activity-flight .book-cell-detail:empty { display: none; }
    body.pilot-modern .book-compact .engine-activity-table .engine-activity-flight .book-cell-detail { grid-column: 1 / -1; grid-row: 2; }
    body.pilot-modern .book-compact .engine-activity-table .engine-activity-flight .book-cell-detail::before { display: inline; content: 'Hora de inicio: '; font-size: 14px; }
    body.pilot-modern .book-compact .book-history .engine-activity-maintenance :is(.book-cell-pilot,.book-cell-route,.book-cell-duration,.book-cell-start,.book-cell-end) { display: none; }
    body.pilot-modern .book-compact .book-history .engine-activity-maintenance .book-cell-detail { grid-column: 1 / -1; grid-row: 2; }
    body.pilot-modern .book-compact .book-history .engine-activity-maintenance .book-cell-actions { grid-column: 1 / -1; grid-row: 3; display: flex; gap: 7px; flex-wrap: wrap; }
    body.pilot-modern .book-compact .engine-activity-badge { white-space: normal; font-size: 14px; }
    body.pilot-modern .book-compact .engine-maintenance-actions .btn { min-height: 44px; }
}

@media (max-width: 899px) {
    body.pilot-modern .book-compact .book-label-original { display: none; }
    body.pilot-modern .book-compact .book-label-compact { display: inline; }
    body.pilot-modern .book-compact table.book-history tr.engine-activity-flight > .book-empty { display: none; }
}

body.pilot-modern .book-compact .book-route-compact { display: none; }
@media (max-width: 899px) {
    body.pilot-modern .book-compact .book-route-original { display: none; }
    body.pilot-modern .book-compact .book-route-compact { display: inline; }
    body.pilot-modern .book-compact table.book-history tr.mp-table-card-row > :is(.book-cell-start,.book-cell-end) { font-size: 18px; }
    body.pilot-modern .book-compact .book-cell-detail > small { display: block; margin-top: 4px; font-size: 14px; }
}

/* Cartilla de Motor: resumen común y acciones de tabla compactas en escritorio. */
@media (min-width: 900px) {
    body.pilot-modern.pilot-engine-logbook .book-engine-summary { display: block; }
    body.pilot-modern.pilot-engine-logbook .book-engine-summary .engine-logbook-data-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
    body.pilot-modern.pilot-engine-logbook .book-engine-summary .engine-logbook-data-grid > div { padding: 10px 12px; background: #edf5fc; border-radius: 8px; }
    body.pilot-modern.pilot-engine-logbook .book-engine-summary dt { font-size: 14px; }
    body.pilot-modern.pilot-engine-logbook .book-engine-summary dd { margin: 4px 0 0; font-size: 22px; font-weight: 700; }
    body.pilot-modern:is(.pilot-engine-logbook,.pilot-aircraft-logbook) :is(.engine-activity-table,.aircraft-logbook-history-table) td.engine-maintenance-actions { display: table-cell; vertical-align: middle; min-width: 150px; white-space: nowrap; }
    body.pilot-modern:is(.pilot-engine-logbook,.pilot-aircraft-logbook) :is(.engine-activity-table,.aircraft-logbook-history-table) td.engine-maintenance-actions form { display: inline-block; width: auto; margin: 0 0 0 5px; padding: 0; vertical-align: middle; }
    body.pilot-modern:is(.pilot-engine-logbook,.pilot-aircraft-logbook) :is(.engine-activity-table,.aircraft-logbook-history-table) td.engine-maintenance-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; height: auto; padding: 4px 8px; margin: 0; font-size: 13px; line-height: 1.25; white-space: nowrap; }
}

/* Libro de Vuelos del piloto moderno; sin reglas globales ni cambios clásicos. */
body.pilot-modern .pl-page { max-width: 1500px; margin: 0 auto; padding: 22px 16px; color: var(--mp-primary); }
body.pilot-modern .pl-page .panel { min-width: 0; margin: 0 0 16px; padding: 16px; border: 1px solid var(--mp-border); border-radius: 12px; background: white; }
body.pilot-modern .pl-page [hidden] { display: none !important; }
body.pilot-modern .pl-title { display: flex; gap: 12px; align-items: center; }
body.pilot-modern .pl-title > .mp-icon { width: 36px; height: 36px; color: var(--mp-action); }
body.pilot-modern .pl-title h1 { margin: 0; font-size: 27px; line-height: 1.2; }
body.pilot-modern .pl-title p { margin: 5px 0 0; }
body.pilot-modern .pl-intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(420px,1fr); gap: 14px; align-items: center; }
body.pilot-modern .pl-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0; }
body.pilot-modern .pl-stats > div { display: flex; flex-direction: column-reverse; align-items: center; justify-content: center; padding: 12px 8px; background: var(--mp-soft); border: 1px solid var(--mp-border); border-radius: 9px; text-align: center; }
body.pilot-modern .pl-stats dt { font-size: 14px; margin-top: 3px; }
body.pilot-modern .pl-stats dd { margin: 0; font-size: 24px; font-weight: 700; overflow-wrap: anywhere; }
body.pilot-modern .pl-create { grid-column: 1 / -1; justify-self: start; min-height: 44px; }
body.pilot-modern .pl-tools { display: none; }
body.pilot-modern .pl-filters { display: flex; gap: 18px; align-items: center; }
body.pilot-modern .pl-filters h2 { margin: 0; font-size: 20px; }
body.pilot-modern .pl-filter-form { flex: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto auto; gap: 10px; align-items: end; }
body.pilot-modern .pl-page label { display: block; font-size: 15px; }
body.pilot-modern .pl-page :is(input:not([type="hidden"]),select,textarea) { display: block; width: 100%; max-width: 100%; min-width: 0; margin-top: 5px; }
body.pilot-modern .pl-page :is(input[disabled],input[readonly]) { background: #f1f4f7; }
body.pilot-modern .pl-editor h2 { font-size: 23px; margin: 0 0 12px; }
body.pilot-modern .pl-editor form { margin: 0; }
body.pilot-modern .pl-editor .form-grid { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 12px; }
body.pilot-modern .pl-form-section { margin: 0; padding: 12px; background: #f8fbfe; border: 1px solid var(--mp-border); border-radius: 9px; min-width: 0; }
body.pilot-modern .pl-form-section:first-child { grid-column: 1 / -1; }
body.pilot-modern .pl-form-section legend { font-size: 17px; font-weight: 700; }
body.pilot-modern .pl-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
body.pilot-modern .pl-form-section:first-child .pl-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
body.pilot-modern .pl-page .form-group { margin: 0; min-width: 0; }
body.pilot-modern .pl-page .form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
body.pilot-modern .pl-field-10 { grid-column: 1 / -1; }
body.pilot-modern .pl-page textarea { min-height: 70px; }
body.pilot-modern .pl-history-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
body.pilot-modern .pl-history-heading h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 23px; }
body.pilot-modern .pl-history-heading .mp-icon { width: 24px; height: 24px; }
body.pilot-modern .pl-exports { display: flex; gap: 7px; }
body.pilot-modern .pl-exports a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; }
body.pilot-modern .pl-exports .mp-icon { width: 21px; height: 21px; }
body.pilot-modern .pl-page .tabla-scroll { max-width: 100%; overflow-x: auto; }
body.pilot-modern .pl-table { width: 100%; margin: 0; border-collapse: collapse; }
body.pilot-modern .pl-table :is(th,td) { padding: 7px 6px; font-size: 14px; border-bottom: 1px solid var(--mp-border); vertical-align: middle; }
body.pilot-modern .pl-table th { background: #e4effb; color: var(--mp-primary); }
body.pilot-modern .pl-table td.acciones { display: table-cell; white-space: nowrap; min-width: 145px; }
body.pilot-modern .pl-table td.acciones form { display: inline-block; width: auto; margin: 0; padding: 0; }
body.pilot-modern .pl-table td.acciones .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 4px 7px; font-size: 13px; margin: 2px; white-space: nowrap; }
body.pilot-modern .pl-table :is(.pl-col-6,.pl-col-7,.pl-col-8,.pl-col-9) { font-variant-numeric: tabular-nums; }
body.pilot-modern .pl-value-compact { display: none; }
body.pilot-modern .pl-open { display: block; color: #a52820; font-weight: 700; font-size: 14px; }
body.pilot-modern .pl-page .paginacion { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 899px) {
    body.pilot-modern .pl-page { padding: 16px 10px; }
    body.pilot-modern .pl-page .panel { padding: 12px; margin-bottom: 12px; }
    body.pilot-modern .pl-intro { grid-template-columns: minmax(0,1fr); gap: 12px; }
    body.pilot-modern .pl-title h1 { font-size: 23px; }
    body.pilot-modern .pl-title p { font-size: 15px; }
    body.pilot-modern .pl-stats { gap: 6px; }
    body.pilot-modern .pl-stats > div { padding: 10px 4px; }
    body.pilot-modern .pl-stats dd { font-size: 21px; }
    body.pilot-modern .pl-stats dt { font-size: 14px; }
    body.pilot-modern .pl-create { justify-self: stretch; text-align: center; }
    body.pilot-modern .pl-tools { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
    body.pilot-modern .pl-filter-toggle { display: flex; gap: 8px; align-items: center; flex: 1; justify-content: space-between; }
    body.pilot-modern .pl-filter-toggle .mp-icon { width: 22px; height: 22px; }
    body.pilot-modern .pl-filter-toggle[aria-expanded="true"] > span { transform: rotate(180deg); }
    body.pilot-modern .pl-filters { display: none; }
    body.pilot-modern .pl-filter-open .pl-filters { display: block; }
    body.pilot-modern .pl-filters h2 { display: none; }
    body.pilot-modern .pl-filter-form { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    body.pilot-modern .pl-filter-form > label { grid-column: 1 / -1; }
    body.pilot-modern .pl-exports span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    body.pilot-modern .pl-exports a { min-width: 44px; padding: 9px; }
    body.pilot-modern .pl-exports a[href*="excel"] { color: #16702b; }
    body.pilot-modern .pl-exports a[href*="pdf"] { color: #b42318; }
    body.pilot-modern .pl-editor .form-grid { grid-template-columns: minmax(0,1fr); }
    body.pilot-modern .pl-form-section { grid-column: 1; padding: 10px; }
    body.pilot-modern .pl-form-section:first-child .pl-fields { grid-template-columns: minmax(0,1fr); }
    body.pilot-modern .pl-page label { font-size: 15px; }
    body.pilot-modern .pl-history-heading h2 { font-size: 21px; }
    body.pilot-modern .pl-history .tabla-scroll { overflow: visible; }
    body.pilot-modern .pl-table { display: block; }
    body.pilot-modern .pl-table > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    body.pilot-modern .pl-table > tbody { display: grid; gap: 9px; }
    body.pilot-modern .pl-table tr.pl-flight { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 6px 4px; padding: 10px; border: 1px solid var(--mp-border); border-radius: 9px; background: white; }
    body.pilot-modern .pl-table tr.pl-flight > td { display: block; padding: 0; border: 0; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; min-width: 0; }
    body.pilot-modern .pl-table .pl-col-0 { grid-column: 1 / 8; grid-row: 1; font-weight: 700; }
    body.pilot-modern .pl-table .pl-col-1 { grid-column: 8 / 13; grid-row: 1; justify-self: end; padding: 2px 7px; background: #e4effb; border-radius: 6px; font-weight: 700; }
    body.pilot-modern .pl-table .pl-col-2 { grid-column: 1 / 9; grid-row: 2; }
    body.pilot-modern .pl-table .pl-col-6 { grid-column: 9 / 13; grid-row: 2; text-align: right; font-weight: 700; }
    body.pilot-modern .pl-table .pl-col-3 { grid-column: 1 / 8; grid-row: 3; }
    body.pilot-modern .pl-table .pl-col-7 { grid-column: 8 / 13; grid-row: 3; text-align: right; }
    body.pilot-modern .pl-table .pl-col-7::after { content: none; }
    body.pilot-modern .pl-table .pl-col-8 { grid-column: 1 / -1; grid-row: 4; font-weight:600; }
    body.pilot-modern .pl-table tr.pl-flight > :is(.pl-col-4,.pl-col-5) { display: none; }
    body.pilot-modern .pl-table .pl-value-original { display: none; }
    body.pilot-modern .pl-table .pl-value-compact { display: inline; }
    body.pilot-modern .pl-table td.acciones { grid-column: 1 / -1; grid-row: 5; display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; white-space: normal; }
    body.pilot-modern .pl-table td.acciones > :is(a,form) { flex: 1 1 calc(50% - 6px); min-width: 0; }
    body.pilot-modern .pl-table td.acciones .btn { width: 100%; min-height: 44px; margin: 0; padding: 8px 6px; font-size: 16px; white-space: normal; }
}

/* Neutraliza estilos clásicos heredados dentro del contenido moderno del libro. */
body.pilot-modern .pl-page h2 { color: var(--mp-primary); border: 0; padding: 0; }
body.pilot-modern .pl-history-heading h2 { flex-direction: row; }
body.pilot-modern .pl-editor .form-grid { align-items: stretch; }
body.pilot-modern .pl-form-section { align-self: stretch; }
body.pilot-modern .pl-table td.acciones { white-space: normal; }
@media(min-width:900px) {
    body.pilot-modern .pl-table td.acciones { white-space:nowrap; }
}
body.pilot-modern .pl-table td.acciones .btn-info { background: #edf4fa; color: #245b88; border: 1px solid #d6e1eb; }
@media (min-width: 900px) {
    body.pilot-modern .pl-title { grid-column: 1; grid-row: 1; }
    body.pilot-modern .pl-stats { grid-column: 2; grid-row: 1 / 3; }
    body.pilot-modern .pl-create { grid-column: 1; grid-row: 2; }
}
@media (max-width: 899px) {
    body.pilot-modern .pl-table td.acciones { flex-direction: row; }
    body.pilot-modern .pl-table tr.pl-flight > .pl-col-1 { max-width: 100%; overflow-wrap: anywhere; }
    body.pilot-modern .pl-table td.acciones .btn-danger { background: #fff0ee; color: #b42318; border: 1px solid #f2c5c0; }
}

@media (max-width: 899px) {
    body.pilot-modern .pl-table tr.pl-flight > td.acciones { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
    body.pilot-modern .pl-table tr.pl-flight > td.acciones > :is(a,form) { width: 100%; margin: 0; min-width: 0; }
}

body.pilot-modern .pl-main { background: transparent; box-shadow: none; border: 0; padding: 0; margin: 0; }
@media (max-width: 899px) {
    body.pilot-modern .pl-table tr.pl-flight > td { white-space: normal; overflow-wrap: anywhere; }
}

/* Documentación personal del piloto: ámbito exclusivo del diseño moderno. */
body.pilot-modern.pilot-personal-documents .pd-page { max-width: 1250px; margin: 0 auto; padding: 22px 14px; }
body.pilot-modern.pilot-personal-documents .pd-page .panel { margin: 0 0 16px; padding: 18px; background: white; border: 1px solid var(--mp-border); border-radius: 12px; }
body.pilot-modern.pilot-personal-documents .pd-page h2 { color: var(--mp-primary); margin: 0 0 14px; padding: 0; border: 0; font-size: 23px; }
body.pilot-modern.pilot-personal-documents .panel-header-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
body.pilot-modern.pilot-personal-documents .panel-header-actions h2 { margin: 0; }
body.pilot-modern.pilot-personal-documents .pd-identity .form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
body.pilot-modern.pilot-personal-documents .pd-identity .form-group { min-width: 0; margin: 0; padding: 9px; background: #f4f8fc; border-radius: 8px; }
body.pilot-modern.pilot-personal-documents .pd-identity .form-line { display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
body.pilot-modern.pilot-personal-documents .pd-identity strong { font-size: 14px; color: var(--mp-muted); }
body.pilot-modern.pilot-personal-documents .pd-identity span { font-size: 16px; }
body.pilot-modern.pilot-personal-documents .pd-documents { border-collapse: collapse; width: 100%; margin: 0; }
body.pilot-modern.pilot-personal-documents .pd-documents :is(td,th) { padding: 8px; border-bottom: 1px solid var(--mp-border); vertical-align: middle; }
body.pilot-modern.pilot-personal-documents .pd-documents th { background: #e4effb; }
body.pilot-modern.pilot-personal-documents .pd-documents .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 4px 9px; font-size: 13px; }
body.pilot-modern.pilot-personal-documents :is(#documentModal,#passwordModal) { padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
body.pilot-modern.pilot-personal-documents :is(#documentModal,#passwordModal) .password-modal-box { width: min(560px,100%); max-width: 100%; max-height: calc(100dvh - 32px); overflow-y: auto; background: white; color: var(--mp-primary); border-radius: 14px; padding: 22px; margin: 6vh auto !important; border: 1px solid var(--mp-border); }
body.pilot-modern.pilot-personal-documents #passwordModal .password-modal-box { margin: 0 auto !important; }
body.pilot-modern.pilot-personal-documents :is(#documentModal,#passwordModal) h3 { margin: 0 0 16px; color: var(--mp-primary); font-size: 22px; }
body.pilot-modern.pilot-personal-documents :is(#documentModal,#passwordModal) .form-group { margin-bottom: 14px; min-width: 0; }
body.pilot-modern.pilot-personal-documents :is(#documentModal,#passwordModal) label { display: block; font-size: 16px; }
body.pilot-modern.pilot-personal-documents :is(#documentModal,#passwordModal) input { display: block; width: 100%; margin-top: 6px; min-width: 0; }
body.pilot-modern.pilot-personal-documents :is(#documentModal,#passwordModal) .modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
body.pilot-modern.pilot-personal-documents #pilot-document-current { padding: 10px; background: #edf4fa; border-radius: 7px; font-size: 15px; line-height: 1.4; }
@media (max-width: 899px) {
    body.pilot-modern.pilot-personal-documents .pd-page { padding: 14px 10px; }
    body.pilot-modern.pilot-personal-documents .pd-page .panel { padding: 12px; }
    body.pilot-modern.pilot-personal-documents .pd-identity .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    body.pilot-modern.pilot-personal-documents .pd-identity .pd-wide { grid-column: 1 / -1; }
    body.pilot-modern.pilot-personal-documents .pd-documents { display: block; }
    body.pilot-modern.pilot-personal-documents .pd-documents > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    body.pilot-modern.pilot-personal-documents .pd-documents > tbody { display: grid; gap: 9px; }
    body.pilot-modern.pilot-personal-documents .pd-documents tbody > tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; border: 1px solid var(--mp-border); border-radius: 9px; padding: 10px; }
    body.pilot-modern.pilot-personal-documents .pd-documents tr > td { display: block; padding: 0; border: 0; font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
    body.pilot-modern.pilot-personal-documents .pd-documents .pd-col-0 { grid-column: 1 / -1; font-weight: 700; }
    body.pilot-modern.pilot-personal-documents .pd-documents .pd-col-1 { grid-column: 1; grid-row: 3; }
    body.pilot-modern.pilot-personal-documents .pd-documents .pd-col-1::before { content: 'Caducidad: '; display: block; color: var(--mp-muted); font-size: 14px; }
    body.pilot-modern.pilot-personal-documents .pd-documents .pd-col-2 { grid-column: 1 / -1; grid-row: 2; }
    body.pilot-modern.pilot-personal-documents .pd-documents .pd-col-3 { grid-column: 1; grid-row: 4; }
    body.pilot-modern.pilot-personal-documents .pd-documents .pd-col-4 { grid-column: 2; grid-row: 4; }
    body.pilot-modern.pilot-personal-documents .pd-documents .btn { min-height: 44px; width: 100%; font-size: 16px; padding: 8px; }
    body.pilot-modern.pilot-personal-documents :is(#documentModal,#passwordModal) .password-modal-box { padding: 16px; margin: 0 auto !important; }
}

body.pilot-modern.pilot-personal-documents [data-document-state="active"] { color: #11652a; background: #e6f6e9; }
body.pilot-modern.pilot-personal-documents [data-document-state="pending"] { color: #245b88; background: #e4effb; }
body.pilot-modern.pilot-personal-documents [data-document-state="near"] { color: #79550e; background: #fff4d6; }
body.pilot-modern.pilot-personal-documents [data-document-state="bad"] { color: #a52820; background: #fff0ee; }

body.pilot-modern.pilot-personal-documents main.app-container { background: transparent; box-shadow: none; margin: 0; padding: 0; }
body.pilot-modern.pilot-personal-documents .pd-name-combined { display: none; }
body.pilot-modern.pilot-personal-documents #documentModal { align-items: center; justify-content: center; }
body.pilot-modern.pilot-personal-documents #documentModal .password-modal-box { margin: 0 auto !important; }
@media (max-width: 899px) {
    body.pilot-modern.pilot-personal-documents .pd-identity { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    body.pilot-modern.pilot-personal-documents .pd-identity .panel-header-actions { grid-column: 1 / -1; margin-bottom: 5px; }
    body.pilot-modern.pilot-personal-documents .pd-identity .form-grid { display: contents; }
    body.pilot-modern.pilot-personal-documents .pd-identity .pd-name-source { display: none; }
    body.pilot-modern.pilot-personal-documents .pd-identity .pd-name-combined { display: block; }
}

body.pilot-modern.pilot-personal-documents .panel-header-actions .btn { background: #edf4fa; color: #243f60; border: 1px solid #d6e1eb; }

/* Libro AESA: solo formulario y contenedores de pantalla; hoja y PDF intactos. */
@media screen {
 body.pilot-modern.pilot-aesa main.app-container { max-width: 1440px; margin: 0 auto; padding: 22px 18px; background: transparent; box-shadow: none; border-radius: 0; min-width: 0; }
 .pilot-modern.pilot-aesa .aesa-intro { display:flex; align-items:center; gap:16px; margin:0 0 18px; }
 .pilot-modern.pilot-aesa .aesa-intro > span { display:grid; place-items:center; background:#e1edf8; border-radius:12px; width:60px; height:60px; flex-shrink:0; }
 .pilot-modern.pilot-aesa .aesa-intro .mp-icon { width:32px; height:32px; }
 .pilot-modern.pilot-aesa .aesa-intro h1 { margin:0; font-size:25px; line-height:1.25; }
 .pilot-modern.pilot-aesa .aesa-intro p { margin:4px 0 0; color:var(--mp-muted); }
 .pilot-modern.pilot-aesa :is(.panel-filtros,.aesa-preview) { background:white; border:1px solid var(--mp-border); border-radius:14px; padding:20px; margin:0 0 16px; box-shadow:0 2px 8px #243f600c; min-width:0; }
 .pilot-modern.pilot-aesa :is(.panel-filtros,.aesa-preview) h2 { font-size:19px; margin:0 0 14px; color:var(--mp-primary); border:0; }
 .pilot-modern.pilot-aesa .panel-filtros .form-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px 24px; margin:0 0 16px; }
 .pilot-modern.pilot-aesa .panel-filtros .form-group { min-width:0; margin:0; }
 .pilot-modern.pilot-aesa .panel-filtros .form-group label { display:block; margin:0 0 5px; font-size:16px; }
 .pilot-modern.pilot-aesa .panel-filtros .form-group > div { min-width:0; }
 .pilot-modern.pilot-aesa .panel-filtros .form-group :is(input,select) { width:100% !important; min-width:0; min-height:44px; border:1px solid var(--mp-border); border-radius:7px; background:white; padding:8px 10px; color:var(--mp-primary); font:inherit; font-size:16px; box-sizing:border-box; }
 .pilot-modern.pilot-aesa #partial-block { grid-column:1/-1; padding:14px; background:var(--mp-soft); border-radius:9px; margin:0 !important; }
 .pilot-modern.pilot-aesa #partial-block h4 { margin:0 0 10px; }
 .pilot-modern.pilot-aesa #partial-block .form-group { display:inline-block; width:calc(50% - 12px); margin-right:8px; vertical-align:top; }
 .pilot-modern.pilot-aesa .panel-filtros .form-grid + .form-grid { grid-template-columns:minmax(0,2fr) minmax(0,3fr); padding:14px; background:var(--mp-soft); border-radius:10px; }
 .pilot-modern.pilot-aesa .option-group { border:0; padding:0; margin:0; min-width:0; grid-column:auto !important; }
 .pilot-modern.pilot-aesa .option-group legend { font-weight:700; padding:0; margin-bottom:6px; }
 .pilot-modern.pilot-aesa :is(.rating-group,.aircraft-list) { display:flex; flex-wrap:wrap; gap:6px 18px; }
 .pilot-modern.pilot-aesa :is(.rating-group,.aircraft-list) label { display:flex; align-items:center; gap:8px; min-height:44px; margin:0; padding:0; font-size:16px; overflow-wrap:anywhere; }
 .pilot-modern.pilot-aesa .option-group input { width:18px; height:18px; margin:0; flex-shrink:0; accent-color:var(--mp-action); }
 .pilot-modern.pilot-aesa .form-actions { display:flex; flex-wrap:wrap; gap:12px; margin:18px 0 0; }
 .pilot-modern.pilot-aesa .form-actions .btn { min-height:46px; padding:10px 20px; border:0; border-radius:8px; background:var(--mp-action); color:white; font:inherit; font-weight:700; white-space:normal; }
 .pilot-modern.pilot-aesa .form-actions .btn-pdf { background:var(--mp-primary); }
 .pilot-modern.pilot-aesa .aesa-preview > h2 { background:#e3eef8; padding:8px 12px; border-radius:8px; }
 .pilot-modern.pilot-aesa .aesa-scroll-hint { display:none; }
 .pilot-modern.pilot-aesa .aesa-viewport { max-width:100%; overflow-x:auto; margin:0 0 20px; border-radius:6px; }
 .pilot-modern.pilot-aesa .aesa-viewport:last-child { margin-bottom:0; }
 .pilot-modern.pilot-aesa .aesa-viewport .aesa-page { width:100%; min-width:1000px; max-width:none; margin:0 auto; padding:22px 24px; box-sizing:border-box; }
}
@media screen and (max-width:1023px) {
 .pilot-modern.pilot-aesa .panel-filtros .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .pilot-modern.pilot-aesa .aesa-scroll-hint { display:block; font-size:14px; color:var(--mp-muted); margin:0 0 12px; }
}
@media screen and (max-width:600px) {
 body.pilot-modern.pilot-aesa main.app-container { padding:16px 10px; }
 .pilot-modern.pilot-aesa .aesa-intro { gap:10px; }
 .pilot-modern.pilot-aesa .aesa-intro > span { width:44px; height:44px; }
 .pilot-modern.pilot-aesa .aesa-intro h1 { font-size:22px; }
 .pilot-modern.pilot-aesa .aesa-intro p { font-size:14px; }
 .pilot-modern.pilot-aesa :is(.panel-filtros,.aesa-preview) { padding:12px; }
 .pilot-modern.pilot-aesa .panel-filtros .form-grid { gap:12px; }
 .pilot-modern.pilot-aesa .panel-filtros .form-grid + .form-grid { grid-template-columns:minmax(0,1fr); padding:10px; }
 .pilot-modern.pilot-aesa .panel-filtros .form-group label { min-height:48px; line-height:1.4; }
 .pilot-modern.pilot-aesa #partial-block .form-group { display:block; width:100%; margin:0 0 10px; }
 .pilot-modern.pilot-aesa .form-actions { flex-direction:column; align-items:stretch; }
 .pilot-modern.pilot-aesa .form-actions .btn { width:100%; }
}
@media print {
 .pilot-modern.pilot-aesa :is(.aesa-intro,.aesa-preview > h2,.aesa-scroll-hint) { display:none; }
}

/* Vuelos pendientes: presentación aislada, acciones y datos originales. */
body.pilot-modern.pilot-pending-assignments main.app-container { max-width:1400px; margin:0 auto; padding:22px 18px; background:transparent; box-shadow:none; border-radius:0; min-width:0; }
.pilot-modern.pilot-pending-assignments main > .container { width:100%; max-width:none; margin:0; padding:0; background:transparent; box-shadow:none; min-width:0; }
.pilot-modern.pilot-pending-assignments main > .container > .btn { margin-bottom:14px !important; background:var(--mp-soft); color:var(--mp-primary); border:1px solid var(--mp-border); border-radius:8px; min-height:44px; padding:9px 14px; font-size:14px; }
.pilot-modern.pilot-pending-assignments .panel { background:white; border:1px solid var(--mp-border); border-radius:14px; box-shadow:0 2px 8px #243f600c; margin:0; padding:20px; min-width:0; }
.pilot-modern.pilot-pending-assignments .panel h2 { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin:0 0 10px; padding:0; border:0; color:var(--mp-primary); font-size:23px; line-height:1.3; }
.pilot-modern.pilot-pending-assignments .contador { display:inline-flex; align-items:center; background:var(--mp-soft); border-radius:20px; padding:5px 10px; color:var(--mp-primary); font-size:13px; font-weight:600; white-space:nowrap; }
.pilot-modern.pilot-pending-assignments .panel > p { color:var(--mp-muted); max-width:1000px; margin:0 0 18px !important; }
.pilot-modern.pilot-pending-assignments .tabla-scroll { width:100%; min-width:0; }
.pilot-modern.pilot-pending-assignments .tabla-admin { width:100%; min-width:0; table-layout:fixed; border-collapse:collapse; margin:0; }
.pilot-modern.pilot-pending-assignments .tabla-admin :is(th,td) { white-space:normal; border-bottom:1px solid var(--mp-border); padding:10px; vertical-align:middle; overflow-wrap:anywhere; }
.pilot-modern.pilot-pending-assignments .tabla-admin th { color:var(--mp-primary); background:var(--mp-soft); font-size:13px; }
.pilot-modern.pilot-pending-assignments .tabla-admin th:nth-child(1) { width:16% !important; }
.pilot-modern.pilot-pending-assignments .tabla-admin th:nth-child(2) { width:20% !important; }
.pilot-modern.pilot-pending-assignments .tabla-admin th:nth-child(4) { width:11% !important; }
.pilot-modern.pilot-pending-assignments .tabla-admin th:nth-child(5) { width:31% !important; }
.pilot-modern.pilot-pending-assignments .tabla-admin tbody tr { background:white; }
.pilot-modern.pilot-pending-assignments .tabla-admin small { color:var(--mp-muted); font-size:13px; }
.pilot-modern.pilot-pending-assignments .aircraft-title { font-weight:700; color:var(--mp-primary); }
.pilot-modern.pilot-pending-assignments .aircraft-subtitle { font-size:13px; color:var(--mp-muted); }
.pilot-modern.pilot-pending-assignments .tabla-admin td.acciones { display:table-cell; white-space:normal; }
.pilot-modern.pilot-pending-assignments .acciones .btn { height:auto; display:inline-flex; align-items:center; justify-content:center; min-height:30px; padding:5px 9px; margin:3px 2px; border-radius:7px; border:1px solid var(--mp-border); font:inherit; font-size:13px; line-height:1.25; white-space:normal; text-align:center; text-transform:none; max-width:100%; }
.pilot-modern.pilot-pending-assignments .acciones .btn-secondary { background:var(--mp-soft); color:var(--mp-primary); }
.pilot-modern.pilot-pending-assignments .acciones :is(.btn-primary,.btn-success) { background:var(--mp-action); color:white; border-color:var(--mp-action); }
.pilot-modern.pilot-pending-assignments .acciones .btn-danger { background:#fce9e8; color:#b42318; border-color:#f2c5c0; }
.pilot-modern.pilot-pending-assignments .alert-success { border:1px solid #c5e4d1; border-radius:9px; padding:14px; background:#eef9f1; color:#24613d; }
@media (max-width:899px) {
 body.pilot-modern.pilot-pending-assignments main.app-container { padding:16px 10px; }
 .pilot-modern.pilot-pending-assignments .panel { padding:14px; }
 .pilot-modern.pilot-pending-assignments .panel h2 { font-size:21px; }
 .pilot-modern.pilot-pending-assignments .tabla-scroll { overflow:visible; }
 .pilot-modern.pilot-pending-assignments .tabla-admin { display:block; min-width:0; }
 .pilot-modern.pilot-pending-assignments .tabla-admin thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .pilot-modern.pilot-pending-assignments .tabla-admin tbody { display:grid; gap:12px; }
 .pilot-modern.pilot-pending-assignments .tabla-admin tbody tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px 10px; padding:12px; border:1px solid var(--mp-border); border-radius:11px; }
 .pilot-modern.pilot-pending-assignments .tabla-admin td { display:block; padding:0; border:0; min-width:0; font-size:16px; }
 .pilot-modern.pilot-pending-assignments .tabla-admin td:nth-child(1) { font-weight:600; }
 .pilot-modern.pilot-pending-assignments .tabla-admin td:nth-child(2) { text-align:right; }
 .pilot-modern.pilot-pending-assignments .tabla-admin td:nth-child(4) { text-align:right; font-weight:700; }
 .pilot-modern.pilot-pending-assignments .tabla-admin td.acciones { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:8px; border-top:1px solid var(--mp-border); padding-top:10px; }
 .pilot-modern.pilot-pending-assignments .acciones > a { flex:1 1 110px; }
 .pilot-modern.pilot-pending-assignments .acciones > form { display:flex !important; flex:1 1 80px; margin:0; }
 .pilot-modern.pilot-pending-assignments .acciones .btn { min-height:44px; margin:0; padding:9px 10px; font-size:15px; }
 .pilot-modern.pilot-pending-assignments .acciones form .btn { width:100%; }
 .pilot-modern.pilot-pending-assignments .aircraft-subtitle { font-size:14px; }
}

/* Asignación GPS: solo presentación moderna del formulario compartido. */
body.pilot-modern.pilot-flight-assignment main.app-container { max-width:1100px; margin:0 auto; padding:22px 18px; background:transparent; box-shadow:none; border-radius:0; min-width:0; }
.pilot-modern.pilot-flight-assignment main > .container { width:100%; max-width:none; padding:0; margin:0; background:transparent; box-shadow:none; min-width:0; }
.pilot-modern.pilot-flight-assignment main > .container > .btn { display:inline-flex; align-items:center; min-height:44px; padding:9px 14px; margin-bottom:14px !important; border:1px solid var(--mp-border); border-radius:8px; background:var(--mp-soft); color:var(--mp-primary); font-size:14px; white-space:normal; }
.pilot-modern.pilot-flight-assignment .panel { background:white; border:1px solid var(--mp-border); border-radius:14px; padding:22px; margin:0; box-shadow:0 2px 8px #243f600c; min-width:0; }
.pilot-modern.pilot-flight-assignment .fa-summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 16px; text-align:left !important; margin-bottom:16px !important; padding-bottom:16px; border-bottom:1px solid var(--mp-border); overflow-wrap:anywhere; }
.pilot-modern.pilot-flight-assignment .fa-summary h2 { grid-column:1/-1; margin:0 0 8px !important; padding:0; border:0; color:var(--mp-primary); font-size:23px; }
.pilot-modern.pilot-flight-assignment .fa-summary > div:first-of-type { font-size:25px !important; color:var(--mp-primary) !important; }
.pilot-modern.pilot-flight-assignment .fa-summary > div:nth-of-type(2) { grid-column:1; margin:0 !important; color:var(--mp-muted) !important; }
.pilot-modern.pilot-flight-assignment .fa-summary > div:last-child { grid-column:2; grid-row:2/4; align-self:center; background:var(--mp-soft); border-radius:8px; padding:8px 12px; margin:0 !important; color:var(--mp-primary) !important; }
.pilot-modern.pilot-flight-assignment .panel > .btn-secondary { width:auto !important; display:inline-flex !important; min-height:44px; padding:9px 16px; margin-bottom:20px; background:var(--mp-soft); border:1px solid var(--mp-border); color:var(--mp-primary); border-radius:8px; }
.pilot-modern.pilot-flight-assignment .panel > br,
.pilot-modern.pilot-flight-assignment form > br { display:none; }
.pilot-modern.pilot-flight-assignment .panel > form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 22px; min-width:0; }
.pilot-modern.pilot-flight-assignment form > .form-group { min-width:0; margin:0; }
.pilot-modern.pilot-flight-assignment form > .form-group:first-child,
.pilot-modern.pilot-flight-assignment form > .form-group:last-of-type { grid-column:1/-1; }
.pilot-modern.pilot-flight-assignment .form-group > label { display:block; margin:0 0 6px; color:var(--mp-primary); font-size:16px; font-weight:600; }
.pilot-modern.pilot-flight-assignment .form-group :is(input,select,textarea) { width:100%; max-width:100%; min-width:0; min-height:44px; padding:10px 12px; background:white; color:var(--mp-primary); border:1px solid var(--mp-border); border-radius:8px; font:inherit; font-size:16px; box-sizing:border-box; }
.pilot-modern.pilot-flight-assignment .form-group textarea { min-height:100px; resize:vertical; }
.pilot-modern.pilot-flight-assignment .engine-hours-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.pilot-modern.pilot-flight-assignment .engine-hour { width:auto; min-width:0; }
.pilot-modern.pilot-flight-assignment form > .btn-primary { grid-column:1/-1; width:auto !important; justify-self:start; min-height:46px; padding:11px 24px; background:var(--mp-action); color:white; border:0; border-radius:8px; font:inherit; font-weight:700; white-space:normal; }
@media (max-width:600px) {
 body.pilot-modern.pilot-flight-assignment main.app-container { padding:16px 10px; }
 .pilot-modern.pilot-flight-assignment .panel { padding:14px; }
 .pilot-modern.pilot-flight-assignment .fa-summary { gap:4px 10px; }
 .pilot-modern.pilot-flight-assignment .fa-summary h2 { font-size:21px; }
 .pilot-modern.pilot-flight-assignment .fa-summary > div:first-of-type { font-size:23px !important; }
 .pilot-modern.pilot-flight-assignment .fa-summary > div:last-child { padding:7px; font-size:14px; }
 .pilot-modern.pilot-flight-assignment .panel > form { grid-template-columns:minmax(0,1fr); gap:15px; }
 .pilot-modern.pilot-flight-assignment form > .btn-primary { width:100% !important; justify-self:stretch; }
}

/* Visor GPS moderno compartido por gestión y piloto. */
body.gps-route-page.gps-route-modern { --gps-primary:#243f60; --gps-soft:#edf4fa; background:#f5f8fb; }
body.gps-route-page.gps-route-modern.gps-simple-mode { overflow:auto; padding-bottom:0; }
body.gps-route-page.gps-route-modern .gps-viewer.app-container { width:100%; max-width:1600px; height:auto; min-height:0; margin:0 auto; padding:12px; background:transparent; border-radius:0; box-shadow:none; }
body.gps-route-page.gps-route-modern .gps-viewer .container { width:100%; max-width:none; height:auto; margin:0; padding:0; background:transparent; }
body.gps-route-page.gps-route-modern .gps-viewer .panel { height:auto; padding:12px; margin:0; border:1px solid #d6e1eb; border-radius:12px; background:white; box-shadow:none; }
body.gps-route-page.gps-route-modern .gps-route-summary { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 16px; margin-bottom:10px; }
body.gps-route-page.gps-route-modern .gps-route-title { display:block; padding:0; margin:0; border:0; font-size:21px; color:#243f60; }
body.gps-route-page.gps-route-modern .gps-route-meta { margin:0; color:#64788c; font-size:14px; }
body.gps-route-page.gps-route-modern .gps-map-wrapper { height:var(--gps-map-height,65dvh); min-height:180px; border-radius:9px; overflow:hidden; }
body.gps-route-page.gps-route-modern #gpsMap { height:100%; min-height:0; }
body.gps-route-page.gps-route-modern .map-actions { flex-direction:row; gap:6px; top:10px; right:10px; max-width:calc(100% - 65px); flex-wrap:wrap; justify-content:flex-end; }
body.gps-route-page.gps-route-modern .map-action-btn { width:44px; height:44px; color:#243f60; border:1px solid #d6e1eb; border-radius:8px; box-shadow:0 1px 5px #243f6022; }
body.gps-route-page.gps-route-modern .map-action-btn[aria-expanded=true],body.gps-route-page.gps-route-modern .map-action-btn[aria-pressed=true] { background:#dcebf8; }
body.gps-route-page.gps-route-modern .map-floating-panel { border:1px solid #d6e1eb; border-radius:12px; box-shadow:0 3px 15px #243f6022; color:#243f60; }
body.gps-route-page.gps-route-modern .gps-point-telemetry { position:absolute; z-index:700; bottom:25px; left:10px; max-width:calc(100% - 20px); background:#fffffff2; padding:7px 10px; border:1px solid #d6e1eb; border-radius:8px; color:#243f60; font-size:var(--flight-tooltip-size,16px); pointer-events:none; }
body.gps-route-page.gps-route-modern .flight-tooltip { display:none; }
body.gps-route-page.gps-route-modern .gps-empty { height:100%; display:grid; place-items:center; }
@media(max-width:899px) {
 body.gps-route-page.gps-route-modern .gps-viewer.app-container { padding:8px; }
 body.gps-route-page.gps-route-modern .gps-viewer .panel { padding:8px; }
 body.gps-route-page.gps-route-modern .gps-route-title { font-size:18px; }
 body.gps-route-page.gps-route-modern .map-actions { top:auto; bottom:8px; left:8px; right:8px; max-width:none; justify-content:space-between; gap:4px; flex-wrap:nowrap; }
 body.gps-route-page.gps-route-modern .gps-point-telemetry { top:10px; bottom:auto; left:55px; max-width:calc(100% - 65px); font-size:var(--flight-tooltip-size,16px); }
 body.gps-route-page.gps-route-modern :is(#statisticsPanel,#timelinePanel,#preferencesPanel) { top:auto; bottom:62px; left:8px; right:8px; width:auto; max-height:calc(100% - 80px); padding:12px; }
 body.gps-route-page.gps-route-modern .statistics-chart { height:180px; }
 body.gps-route-page.gps-route-modern .statistics-header { gap:4px 12px; flex-direction:row; align-items:center; }
 body.gps-route-page.gps-route-modern .statistics-selector { flex-basis:100%; gap:4px 12px; }
 body.gps-route-page.gps-route-modern .statistics-selector label { font-size:14px; min-height:44px; }
 body.gps-route-page.gps-route-modern .preference-control label { flex-wrap:wrap; gap:6px; font-size:16px; }
}
body.gps-route-page.gps-route-modern.gps-map-expanded .gps-map-wrapper { height:100dvh; border-radius:0; padding-bottom:env(safe-area-inset-bottom,0px); }

@media(max-width:360px) {
 body.gps-route-page.gps-route-modern .map-actions { display:grid; grid-template-columns:repeat(3,44px); justify-content:space-between; }
 body.gps-route-page.gps-route-modern :is(#statisticsPanel,#timelinePanel,#preferencesPanel) { bottom:112px; max-height:calc(100% - 130px); }
}

/* Listado GPS del piloto: reutiliza las tarjetas del libro moderno. */
body.pilot-modern.pilot-gps-routes .pg-table { width:100%; border-collapse:collapse; }
body.pilot-modern.pilot-gps-routes .pg-table :is(th,td) { padding:9px 7px; border-bottom:1px solid var(--mp-border); font-size:14px; vertical-align:middle; }
body.pilot-modern.pilot-gps-routes .pg-table th { background:#e4effb; color:var(--mp-primary); }
body.pilot-modern.pilot-gps-routes .pg-actions { white-space:normal; }
body.pilot-modern.pilot-gps-routes .pg-actions .btn { display:inline-flex; align-items:center; justify-content:center; min-height:44px; margin:2px; }
body.pilot-modern.pilot-gps-routes .paginacion { align-items:center; margin-top:15px; }
@media (max-width:899px) {
 body.pilot-modern.pilot-gps-routes .pg-table,body.pilot-modern.pilot-gps-routes .pg-table tbody { display:block; }
 body.pilot-modern.pilot-gps-routes .pg-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 body.pilot-modern.pilot-gps-routes .pg-flight { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:12px; margin-bottom:10px; border:1px solid var(--mp-border); border-radius:9px; }
 body.pilot-modern.pilot-gps-routes .pg-table .pg-flight td { display:block; min-width:0; padding:0; border:0; white-space:normal; overflow-wrap:anywhere; font-size:16px; }
 body.pilot-modern.pilot-gps-routes .pg-flight td[data-label]::before { content:attr(data-label); display:block; color:var(--mp-muted); font-size:13px; }
 body.pilot-modern.pilot-gps-routes .pg-table .pg-actions { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:8px; }
 body.pilot-modern.pilot-gps-routes .pg-actions .btn { flex:1 1 110px; margin:0; }
}

/* Modo simple moderno: visor de borde a borde, sin navegación. */
body.gps-route-page.gps-route-modern.gps-simple-mode { overflow:hidden; margin:0; padding:0; }
body.gps-route-page.gps-route-modern.gps-simple-mode .gps-viewer.app-container { width:100%; max-width:none; flex:none; height:100vh; height:100dvh; min-height:0; margin:0; padding:0; }
body.gps-route-page.gps-route-modern.gps-simple-mode .gps-viewer :is(.container,.panel) { height:100%; margin:0; padding:0; border:0; border-radius:0; }
body.gps-route-page.gps-route-modern.gps-simple-mode .gps-route-summary { display:none; }
body.gps-route-page.gps-route-modern.gps-simple-mode .gps-map-wrapper { height:100%; min-height:0; border-radius:0; }
body.gps-route-page.gps-route-modern.gps-simple-mode #gpsMap { height:100%; min-height:0; }
body.gps-route-page.gps-route-modern.gps-simple-mode .leaflet-top { top:env(safe-area-inset-top,0px); }
body.gps-route-page.gps-route-modern.gps-simple-mode .leaflet-left { left:env(safe-area-inset-left,0px); }
body.gps-route-page.gps-route-modern .map-action-btn:focus-visible,
body.gps-route-page.gps-route-modern .map-panel-close:focus-visible { outline:3px solid #1261a0; outline-offset:2px; }
@media(max-width:899px) {
 body.gps-route-page.gps-route-modern.gps-simple-mode .map-actions { bottom:max(8px,env(safe-area-inset-bottom,0px)); left:max(8px,env(safe-area-inset-left,0px)); right:max(8px,env(safe-area-inset-right,0px)); }
 body.gps-route-page.gps-route-modern.gps-simple-mode :is(#statisticsPanel,#timelinePanel,#preferencesPanel) { bottom:calc(62px + env(safe-area-inset-bottom,0px)); left:max(8px,env(safe-area-inset-left,0px)); right:max(8px,env(safe-area-inset-right,0px)); max-height:calc(100% - 80px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); }
 body.gps-route-page.gps-route-modern.gps-simple-mode .gps-point-telemetry { top:calc(10px + env(safe-area-inset-top,0px)); left:calc(66px + env(safe-area-inset-left,0px)); max-width:calc(100% - 76px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)); }
}
@media(max-width:360px) {
 body.gps-route-page.gps-route-modern.gps-simple-mode :is(#statisticsPanel,#timelinePanel,#preferencesPanel) { bottom:calc(112px + env(safe-area-inset-bottom,0px)); max-height:calc(100% - 130px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); }
}

@media(max-width:899px) {
 body.gps-route-page.gps-route-modern .leaflet-control-zoom a { width:44px; height:44px; line-height:44px; }
}

/* Histórico inicial ULM: solo configuración moderna AESA. */
body.pilot-modern.pilot-aesa .aesa-history-transition { min-width:0; margin:12px 0; padding:10px; border:1px solid #d9e2ec; border-radius:8px; }
body.pilot-modern.pilot-aesa .aesa-history-transition label { display:block; margin:8px 0; }
body.pilot-modern.pilot-aesa .aesa-history-transition input[type=date] { box-sizing:border-box; display:block; max-width:100%; min-height:44px; }
body.pilot-modern.pilot-aesa .aesa-function-balances { display:flex; flex-wrap:wrap; gap:8px 20px; margin:12px 0; }
body.pilot-modern.pilot-aesa .aesa-function-balances dd { margin:0; font-size:13px; }
body.pilot-modern.pilot-aesa .aesa-history { padding:16px; margin-bottom:16px; border:1px solid #d9e2ec; border-radius:10px; background:#f8fafc; }
body.pilot-modern.pilot-aesa .aesa-history p { margin:6px 0; font-size:14px; }
body.pilot-modern.pilot-aesa .aesa-history-summary { display:flex; flex-wrap:wrap; gap:12px 24px; margin:12px 0; }
body.pilot-modern.pilot-aesa .aesa-history-summary dt { font-size:12px; color:#526174; }
body.pilot-modern.pilot-aesa .aesa-history-summary dd { margin:0; font-weight:600; }
body.pilot-modern.pilot-aesa .aesa-history-dialog { box-sizing:border-box; width:min(660px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; border:1px solid #d9e2ec; border-radius:12px; padding:20px; color:#243247; }
body.pilot-modern.pilot-aesa .aesa-history-dialog::backdrop { background:rgb(15 23 42 / 55%); }
body.pilot-modern.pilot-aesa .aesa-history-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
body.pilot-modern.pilot-aesa .aesa-history-duration { min-width:0; margin:0; padding:10px; border:1px solid #d9e2ec; border-radius:8px; }
body.pilot-modern.pilot-aesa .aesa-history-parts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
body.pilot-modern.pilot-aesa .aesa-history-dialog input[type=number],
body.pilot-modern.pilot-aesa .aesa-history-dialog textarea { box-sizing:border-box; width:100%; min-width:0; min-height:44px; }
body.pilot-modern.pilot-aesa .aesa-history-dialog input[type=checkbox] { width:20px; height:20px; }
body.pilot-modern.pilot-aesa .aesa-history-duration > label { display:flex; align-items:center; gap:8px; min-height:44px; font-size:13px; }
body.pilot-modern.pilot-aesa .aesa-history-remarks { display:block; margin-top:12px; }
body.pilot-modern.pilot-aesa .aesa-history button { min-height:44px; white-space:normal; }
body.pilot-modern.pilot-aesa .aesa-history [hidden] { display:none; }
@media(max-width:480px) {
 body.pilot-modern.pilot-aesa .aesa-history-dialog { padding:12px; }
 body.pilot-modern.pilot-aesa .aesa-history-fields { grid-template-columns:minmax(0,1fr); gap:8px; }
 body.pilot-modern.pilot-aesa .aesa-history-dialog .form-actions { display:flex; flex-direction:column; gap:8px; }
}

/* Histórico inicial ULM: solo configuración moderna AESA. */
body.pilot-modern.pilot-aesa .aesa-history { padding:16px; margin-bottom:16px; border:1px solid #d9e2ec; border-radius:10px; background:#f8fafc; }
body.pilot-modern.pilot-aesa .aesa-history p { margin:6px 0; font-size:14px; }
body.pilot-modern.pilot-aesa .aesa-history-summary { display:flex; flex-wrap:wrap; gap:12px 24px; margin:12px 0; }
body.pilot-modern.pilot-aesa .aesa-history-summary dt { font-size:12px; color:#526174; }
body.pilot-modern.pilot-aesa .aesa-history-summary dd { margin:0; font-weight:600; }
body.pilot-modern.pilot-aesa .aesa-history-dialog { box-sizing:border-box; width:min(660px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; border:1px solid #d9e2ec; border-radius:12px; padding:20px; color:#243247; }
body.pilot-modern.pilot-aesa .aesa-history-dialog::backdrop { background:rgb(15 23 42 / 55%); }
body.pilot-modern.pilot-aesa .aesa-history-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
body.pilot-modern.pilot-aesa .aesa-history-duration { min-width:0; margin:0; padding:10px; border:1px solid #d9e2ec; border-radius:8px; }
body.pilot-modern.pilot-aesa .aesa-history-parts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
body.pilot-modern.pilot-aesa .aesa-history-dialog input[type=number],
body.pilot-modern.pilot-aesa .aesa-history-dialog textarea { box-sizing:border-box; width:100%; min-width:0; min-height:44px; }
body.pilot-modern.pilot-aesa .aesa-history-dialog input[type=checkbox] { width:20px; height:20px; }
body.pilot-modern.pilot-aesa .aesa-history-duration > label { display:flex; align-items:center; gap:8px; min-height:44px; font-size:13px; }
body.pilot-modern.pilot-aesa .aesa-history-remarks { display:block; margin-top:12px; }
body.pilot-modern.pilot-aesa .aesa-history button { min-height:44px; white-space:normal; }
body.pilot-modern.pilot-aesa .aesa-history [hidden] { display:none; }
@media(max-width:480px) {
 body.pilot-modern.pilot-aesa .aesa-history-dialog { padding:12px; }
 body.pilot-modern.pilot-aesa .aesa-history-fields { grid-template-columns:minmax(0,1fr); gap:8px; }
 body.pilot-modern.pilot-aesa .aesa-history-dialog .form-actions { display:flex; flex-direction:column; gap:8px; }
}

/* Resumen global privado del piloto; no afecta al generador AESA ni al clásico. */
body.pilot-modern .pl-intro .pls-card { appearance:none; display:block; text-align:left; width:100%; max-width:540px; min-width:0; border:1px solid #d6e1eb; border-radius:12px; background:#edf4fa; color:#243f60; padding:12px 16px; font:inherit; cursor:pointer; }
body.pilot-modern .pls-major { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
body.pilot-modern .pls-major > span { font-size:12px; }
body.pilot-modern .pls-major strong { display:block; font-size:28px; line-height:1.3; }
body.pilot-modern .pls-functions { display:flex; flex-wrap:wrap; gap:6px 16px; font-size:13px; border-top:1px solid #d6e1eb; margin-top:8px; padding-top:8px; }
body.pilot-modern .pls-hint { display:block; font-size:12px; color:#64788c; margin-top:6px; }
body.pilot-modern .pls-dialog { width:min(920px,calc(100% - 24px)); max-height:calc(100dvh - 24px); padding:20px; border:1px solid #d6e1eb; border-radius:14px; background:white; color:#243f60; overflow:auto; box-sizing:border-box; }
body.pilot-modern .pls-dialog::backdrop { background:#102b4666; }
body.pilot-modern .pls-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
body.pilot-modern .pls-heading h2 { color:#243f60; border:0; padding:0; font-size:21px; margin:0; line-height:1.3; }
body.pilot-modern .pls-heading .btn { min-width:44px; font-size:24px; }
body.pilot-modern .pls-modal-totals { display:flex; flex-wrap:wrap; gap:12px 30px; padding:12px; background:#edf4fa; border-radius:9px; }
body.pilot-modern .pls-modal-totals strong { display:block; font-size:25px; }
body.pilot-modern .pls-note { color:#64788c; font-size:14px; }
body.pilot-modern .pls-table-scroll { max-width:100%; overflow-x:auto; margin:12px 0; }
body.pilot-modern .pls-table { border-collapse:collapse; width:100%; min-width:560px; font-size:15px; }
body.pilot-modern .pls-table :is(th,td) { padding:9px 10px; border-bottom:1px solid #d6e1eb; white-space:nowrap; text-align:right; }
body.pilot-modern .pls-table th:first-child { text-align:left; }
body.pilot-modern .pls-table thead,body.pilot-modern .pls-total { background:#edf4fa; font-weight:700; }
body.pilot-modern #pls-origins details { border-bottom:1px solid #d6e1eb; padding:8px 0; }
body.pilot-modern #pls-origins summary { min-height:44px; padding:10px 0; cursor:pointer; }
body.pilot-modern .pls-warning { border:1px solid #f1d6a1; background:#fff8e8; border-radius:8px; padding:10px; overflow-wrap:anywhere; }
body.pilot-modern .pls-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
body.pilot-modern .pls-dialog .btn { min-height:44px; height:auto; padding:10px 16px; border-radius:8px; font:inherit; white-space:normal; }
body.pilot-modern .pls-aircraft-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,1fr); gap:12px; align-items:center; padding:10px 0; border-bottom:1px solid #d6e1eb; overflow-wrap:anywhere; }
body.pilot-modern .pls-aircraft-row select { width:100%; min-width:0; min-height:44px; border:1px solid #d6e1eb; border-radius:8px; padding:9px; font:inherit; font-size:16px; background:white; color:#243f60; }
@media(max-width:899px) {
 body.pilot-modern .pl-intro .pls-card { max-width:none; }
 body.pilot-modern .pls-dialog { padding:14px; }
 body.pilot-modern .pls-heading h2 { font-size:19px; }
 body.pilot-modern .pls-functions { font-size:14px; gap:8px 14px; }
 body.pilot-modern .pls-major strong { font-size:26px; }
 body.pilot-modern .pls-aircraft-row { grid-template-columns:minmax(0,1fr); gap:6px; }
}

@media(min-width:900px) { body.pilot-modern .pl-intro .pls-card { grid-column:2; grid-row:1 / 3; justify-self:end; } }

/* Accesos independientes: resumen 12D y experiencia reciente 12E. */
body.pilot-modern .pls-access-card { width:100%; max-width:540px; min-width:0; border:1px solid #d6e1eb; border-radius:12px; background:#edf4fa; }
body.pilot-modern .pl-intro .pls-access-card .pls-card { max-width:none; border:0; background:transparent; border-radius:12px; padding-bottom:0; }
body.pilot-modern .pls-access-links { display:flex; flex-wrap:wrap; gap:0 12px; padding:0 16px 6px; }
body.pilot-modern .pls-access-links button { border:0; background:transparent; color:#3975aa; font:inherit; font-size:12px; min-height:44px; padding:6px 0; text-align:left; cursor:pointer; max-width:100%; white-space:normal; }
body.pilot-modern .pre-periods { background:#edf4fa; border-radius:8px; padding:10px; }
body.pilot-modern .pre-periods p { margin:4px 0; }
body.pilot-modern .pre-table { min-width:660px; }
body.pilot-modern .pre-state { display:inline-block; white-space:normal; border-radius:7px; padding:5px 8px; font-size:13px; font-weight:700; }
body.pilot-modern .pre-pass { background:#e5f5e9; color:#21683c; }
body.pilot-modern .pre-fail { background:#fce9e8; color:#a52820; }
body.pilot-modern .pre-pending { background:#fff3cf; color:#795600; }
body.pilot-modern .pre-rating-detail,body.pilot-modern .pre-limitations { padding:8px 0; border-bottom:1px solid #d6e1eb; }
body.pilot-modern .pre-dialog summary { min-height:44px; padding:10px 0; cursor:pointer; }
body.pilot-modern .pre-rating-detail dl { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:8px 16px; }
body.pilot-modern .pre-rating-detail dd { margin:0; font-weight:600; }
body.pilot-modern .pre-dialog :is(p,dt,dd) { overflow-wrap:anywhere; }
body.pilot-modern .pre-dialog .pls-heading > div p { font-size:14px; margin:4px 0; }
@media(min-width:900px) { body.pilot-modern .pl-intro .pls-access-card { grid-column:2; grid-row:1 / 3; justify-self:end; } }
@media(max-width:899px) { body.pilot-modern .pls-access-card { max-width:none; } }
@media(max-width:600px) { body.pilot-modern .pre-rating-detail dl { grid-template-columns:minmax(0,1fr); gap:4px; } body.pilot-modern .pre-rating-detail dd { margin-bottom:8px; } }

@media(max-width:600px) {
 body.pilot-modern .pre-table { display:block; min-width:0; width:100%; }
 body.pilot-modern .pre-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 body.pilot-modern .pre-table tbody { display:grid; gap:10px; }
 body.pilot-modern .pre-table tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; padding:10px; border:1px solid #d6e1eb; border-radius:9px; }
 body.pilot-modern .pre-table :is(th,td) { display:block; border:0; padding:0; min-width:0; text-align:left; white-space:normal; }
 body.pilot-modern .pre-table th { grid-column:1; grid-row:1; align-self:center; }
 body.pilot-modern .pre-table td:last-child { grid-column:2; grid-row:1; text-align:right; }
 body.pilot-modern .pre-table td:nth-child(2) { grid-column:1; grid-row:2; }
 body.pilot-modern .pre-table td:nth-child(3) { grid-column:2; grid-row:2; }
 body.pilot-modern .pre-table td:nth-child(4) { grid-column:1/-1; grid-row:3; }
 body.pilot-modern .pre-table td:nth-child(2)::before { content:'Horas 24 meses'; display:block; font-size:13px; color:#64788c; }
 body.pilot-modern .pre-table td:nth-child(3)::before { content:'Horas 12 meses'; display:block; font-size:13px; color:#64788c; }
 body.pilot-modern .pre-table td:nth-child(4)::before { content:'Aterrizajes 24 meses: '; font-size:13px; color:#64788c; }
}

/* Crear/editar vuelo: un único panel de trabajo, conservando el resto del DOM. */
body.pilot-modern .pl-page.pl-editor-only > :not(.pl-editor) { display:none !important; }
/* Fase 13B: componentes 13A en aeronaves, libro y menú existente. */
.pilot-modern :is(.ma-page,.pl-page) { --mp-content-shadow: 0 3px 10px #07518b20; color: var(--mp-ink); background: linear-gradient(#f3f9ff,#eef6fc); }
.pilot-modern .mp-section-brand { display:flex; align-items:center; gap:14px; min-width:0; }
.pilot-modern .mp-section-brand > img, .pilot-modern .pl-title > img { width:52px; height:52px; flex:0 0 52px; object-fit:contain; }
.pilot-modern :is(.ma-page-heading h1,.pl-title h1) { color:var(--mp-ink); font-weight:700; font-size:26px; }
.pilot-modern :is(.ma-count,.ma-favorite) { border-radius:20px; padding:4px 10px; background:#e3f3ff; color:var(--mp-deep); font-weight:600; }
.pilot-modern .ma-favorite { background:#fff0a1; color:#8b5200; }
.pilot-modern .ma-favorite:has(form) { background:transparent; padding:0; }
.pilot-modern .ma-favorite > .mp-icon { fill:#ffb400; }
.pilot-modern .ma-toolbar { padding:8px; border:1px solid #b7d1e9; border-radius:14px; background:white; box-shadow:var(--mp-content-shadow); }
.pilot-modern .ma-toolbar > :is(a,button) { background:linear-gradient(#eef9ff,#c9e8ff); border-color:#a6cdeb; font-weight:600; }
.pilot-modern .ma-toolbar img { width:28px; height:28px; object-fit:contain; }
body.pilot-modern :is(.ma-toolbar > .ma-create,.pl-page .pl-create) { background:linear-gradient(#ff9800,#ff6900); color:white; border:1px solid #ed7000; font-weight:700; }
.pilot-modern .ma-card, body.pilot-modern .pl-page .panel { border:1px solid #b7d1e9; border-radius:17px; background:white; box-shadow:var(--mp-content-shadow); }
.pilot-modern .ma-card h2 { font-weight:700; color:var(--mp-ink); }
.pilot-modern .ma-aircraft-identity { padding-left:35px; background:url('../images/modern/01_avion_azul.svg') left top / 29px 29px no-repeat; }
body.pilot-modern .ma-card-heading { grid-template-columns:minmax(0,1fr) minmax(0,40%) minmax(0,1fr); }
.pilot-modern .ma-aircraft-visual { grid-column:2; grid-row:1 / span 2; display:grid; place-items:center; justify-self:center; align-self:center; width:100%; max-width:280px; height:120px; min-width:0; }
body.pilot-modern .ma-card-heading .ma-favorite { grid-column:3; grid-row:1; }
body.pilot-modern .ma-card-heading .ma-badges { grid-column:1; grid-row:2; }
.pilot-modern .ma-aircraft-visual img { display:block; width:100%; height:100%; object-fit:contain; }
.pilot-modern .ma-badges > span { background:#d4efff; color:var(--mp-ink); }
.pilot-modern .ma-badges .ma-shared { background:#dcffd9; }
.pilot-modern .ma-badges .ma-private { background:#eae0ff; }
.pilot-modern .ma-page .mp-aircraft-actions { margin-top:0; }
body.pilot-modern .ma-page .mp-aircraft-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
body.pilot-modern .ma-page .mp-aircraft-actions > .mp-tool { font-size:13px; }
.pilot-modern :is(.ma-tracker-settings,.ma-sharing > div) { background:linear-gradient(#eff8ff,#dceeff); border:1px solid #cce0f2; }
.pilot-modern .ma-admin .btn-info { background:linear-gradient(#edf8ff,#c7e5ff); color:#064f9b; }
.pilot-modern .ma-admin :is(.btn-danger,.btn-warning) { background:linear-gradient(#fff0f1,#ffd4d9); color:#b42318; }
body.pilot-modern .pl-page .pl-intro { background:url('../images/aviation/torre_control_boceto.png') left 38% bottom / auto 100px no-repeat, url('../images/aviation/paisaje_aeronave.svg') left bottom / cover no-repeat, #eef8ff; }
body.pilot-modern .pl-intro .pls-access-card { background:linear-gradient(135deg,#f4fbff,#cce7ff); border:3px solid white; box-shadow:0 2px 7px #07518b25; border-radius:15px; }
.pilot-modern .pls-major .mp-icon { color:#0878e7; width:23px; height:23px; }
.pilot-modern .pls-major > span:last-child .mp-icon { color:#128226; }
body.pilot-modern .pls-access-links button { color:#075bb3; font-weight:600; text-decoration:underline; text-underline-offset:3px; }
body.pilot-modern .pl-filter-form :is(input,select) { border-color:#acc7e2; background:#fcfeff; }
body.pilot-modern .pl-page .pl-history-heading h2 { color:var(--mp-ink); font-weight:700; }
body.pilot-modern .pl-table thead th { background:linear-gradient(#dbefff,#badcff); color:var(--mp-ink); border-color:#bbd3ea; }
body.pilot-modern .pl-table tbody td { border-color:#c4d5e7; }
body.pilot-modern .pl-table td.acciones .btn-info { background:linear-gradient(#098fee,#0562bd); color:white; border-color:#0766bb; }
body.pilot-modern .pl-table td.acciones .btn-secondary { background:linear-gradient(#f2faff,#cde7ff); color:#07519e; border-color:#abcce9; }
body.pilot-modern .pl-table td.acciones .btn-danger { background:linear-gradient(#ff4b4b,#dc1717); color:white; border-color:#cf2222; }
body.pilot-modern .pl-table td.acciones .btn-warning { background:linear-gradient(#ffb32c,#ff8200); color:#482300; border-color:#e58b13; }
body.pilot-modern .pl-exports a[href*="excel"] { background:linear-gradient(#22a82b,#117e1b); color:white; border-color:#14751c; }
body.pilot-modern .pl-exports a[href*="pdf"] { background:linear-gradient(#ff5050,#de1717); color:white; border-color:#d52b2b; }
.pilot-modern .mp-more-menu { width:min(900px,calc(100% - 24px)); padding:22px; background:url('../images/modern/paisaje_cielo.svg') center top / cover no-repeat, #f5faff; border-color:#aecce7; box-shadow:0 10px 40px #06366f30; }
.pilot-modern .mp-menu-heading h2 { display:flex; align-items:center; gap:10px; font-size:25px; font-weight:700; }
.pilot-modern .mp-menu-heading h2 .mp-icon { width:34px; height:34px; color:#075db2; }
.pilot-modern .mp-menu-subtitle { margin:4px 0; color:var(--mp-ink); font-size:14px; }
.pilot-modern .mp-menu-links { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.pilot-modern .mp-menu-group { min-width:0; padding:12px; border:1px solid #c3daee; border-radius:14px; background:#ffffffed; box-shadow:0 2px 6px #07518b12; }
.pilot-modern .mp-menu-group:first-child { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.pilot-modern .mp-menu-group h3 { grid-column:1 / -1; font-size:17px; margin:0 0 8px; color:var(--mp-ink); }
.pilot-modern .mp-menu-links a { gap:10px; min-width:0; padding:9px 10px; margin-bottom:7px; border:1px solid #b3d4f0; border-radius:12px; background:linear-gradient(#f4fbff,#c8e6ff); font-weight:600; }
.pilot-modern .mp-menu-links a::after { content:'›'; margin-left:auto; color:#0760b6; font-size:27px; }
.pilot-modern .mp-menu-links a > img { width:44px; height:44px; flex:0 0 44px; object-fit:contain; }
.pilot-modern .mp-menu-links a > span { min-width:0; overflow-wrap:anywhere; }
.pilot-modern .mp-menu-links small { display:block; font-weight:400; font-size:12px; margin-top:3px; }
.pilot-modern .mp-menu-links .mp-menu-green { background:linear-gradient(#f0ffe7,#c6f5ae); }
.pilot-modern .mp-menu-links .mp-menu-violet { background:linear-gradient(#f8f0ff,#ddc4fb); }
@media (max-width:899px) {
    .pilot-modern .mp-menu-links, .pilot-modern .mp-menu-group:first-child { grid-template-columns:minmax(0,1fr); }
    .pilot-modern .mp-more-menu { padding:16px; }
    .pilot-modern .ma-page .mp-aircraft-tool-icon { width:36px; height:36px; flex-basis:36px; }
    body.pilot-modern .ma-page .ma-tools .mp-aircraft-actions > .mp-tool { flex-direction:column; align-items:center; justify-content:center; min-height:76px; gap:4px; padding:8px; font-size:13px; text-align:center; }
    body.pilot-modern .ma-page .mp-aircraft-actions .mp-tool::after { display:none; }
    body.pilot-modern .pl-page .pl-intro { background-image:url('../images/aviation/paisaje_aeronave.svg'); }
    .pilot-modern .mp-section-brand { gap:9px; }
    .pilot-modern .mp-section-brand > img { width:42px; height:42px; flex-basis:42px; }
    body.pilot-modern .ma-card-heading { grid-template-columns:minmax(0,1fr) auto; gap:8px; }
    .pilot-modern .ma-aircraft-visual { grid-column:1 / -1; grid-row:3; width:min(100%,280px); height:120px; }
    body.pilot-modern .ma-card-heading .ma-favorite { grid-column:2; }
    body.pilot-modern .ma-card-heading .ma-badges { grid-column:1 / -1; }
    .pilot-modern .ma-favorite > span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
}
/* Fase 13C: presentación compartida de los dos libros técnicos y sus diálogos. */
body.pilot-modern:is(.pilot-aircraft-logbook,.pilot-engine-logbook) .engine-logbook-page { --mp-book-accent: #159b28; color:var(--mp-ink); }
body.pilot-modern.pilot-engine-logbook .engine-logbook-page { --mp-book-accent: var(--mp-orange); }
body.pilot-modern:is(.pilot-aircraft-logbook,.pilot-engine-logbook) .engine-logbook-page > .panel { padding:18px; border:1px solid #b8d3eb; border-radius:17px; box-shadow:0 3px 10px #07518b20; background:linear-gradient(#f8fcff,white 260px); }
body.pilot-modern .engine-logbook-page .engine-logbook-page-header { padding:16px; margin-bottom:16px; border:1px solid #bbd8ef; border-radius:14px; background:linear-gradient(#ffffffaa,#ffffffbb), url('../images/aviation/paisaje_aeronave.svg') center / cover no-repeat; }
body.pilot-modern .engine-logbook-page .engine-logbook-page-header > div:first-child { min-width:0; padding-left:66px; background:url('../images/modern/05_cuaderno_aeronave.svg') left top / 52px 52px no-repeat; }
body.pilot-modern.pilot-engine-logbook .engine-logbook-page-header > div:first-child { background-image:url('../images/modern/06_cartilla_motor.svg'); }
body.pilot-modern .engine-logbook-page .engine-logbook-page-header h1 { color:var(--mp-ink); font-size:26px; font-weight:700; }
body.pilot-modern .engine-logbook-page .engine-logbook-registration { color:var(--mp-ink); }
body.pilot-modern .engine-logbook-page .engine-logbook-section { border:1px solid #bfd7eb; border-radius:14px; box-shadow:0 2px 7px #07518b12; background:white; margin-bottom:14px; }
body.pilot-modern .engine-logbook-page .engine-logbook-section h2 { color:var(--mp-ink); font-size:20px; font-weight:600; }
body.pilot-modern .engine-logbook-page .engine-logbook-data-grid > div { border:1px solid #bcd7ed; border-radius:12px; background:linear-gradient(150deg,#f6fcff,#dbefff); padding:12px; min-width:0; }
body.pilot-modern .engine-logbook-page .engine-logbook-data-grid dt { color:#365476; font-size:13px; line-height:1.4; }
body.pilot-modern .engine-logbook-page .engine-logbook-data-grid dd { color:var(--mp-ink); font-size:21px; font-weight:600; overflow-wrap:anywhere; }
body.pilot-modern .engine-logbook-page .book-summary .engine-logbook-data-grid > div { border-top:3px solid var(--mp-book-accent); background:linear-gradient(150deg,#f6fcff,#cce9ff); }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .btn-primary { background:linear-gradient(#ff9900,#ff7200); color:#412200; border:1px solid #e87700; font-weight:600; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .btn-secondary { background:linear-gradient(#f3fbff,#cfe8ff); color:#07549c; border:1px solid #afcee8; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .btn-success { background:linear-gradient(#1e9f31,#137026); color:white; border:1px solid #126521; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .btn-danger { background:linear-gradient(#fff0f0,#ffd6dc); color:#ad1b1b; border:1px solid #efb3ba; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .engine-maintenance-actions .btn-secondary { background:linear-gradient(#0e91ec,#0865bd); color:white; border-color:#0865bd; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .engine-maintenance-form { padding:16px; gap:12px; border:1px solid #c9c6e6; border-left:4px solid var(--mp-violet); border-radius:13px; background:linear-gradient(125deg,#fbfaff,#edf5ff); }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea) { border-color:#acc8e2; background:#fcfeff; border-radius:9px; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .engine-logbook-table th { background:linear-gradient(#def0ff,#bcdcff); color:var(--mp-ink); border-color:#accbe5; font-weight:600; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .engine-logbook-table td { border-color:#c3d7e8; vertical-align:top; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) tr.engine-activity-maintenance > td { background:#fff7e7; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .engine-activity-badge { border:1px solid #b8d5ec; border-radius:16px; background:#e2f2ff; color:#07549c; padding:4px 8px; font-weight:600; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .engine-activity-badge.is-maintenance { background:#fff0d6; border-color:#f4cf91; color:#854400; }
body.pilot-modern .engine-logbook-dialog { border-color:#accbe5; box-shadow:0 12px 40px #06366f30; }
body.pilot-modern .engine-logbook-dialog .engine-logbook-dialog-header { background:linear-gradient(#f4fbff,#d5ebff); border-bottom:1px solid #accbe5; }
body.pilot-modern .engine-logbook-dialog .engine-logbook-dialog-header h2 { color:var(--mp-ink); font-weight:700; }
body.pilot-modern .engine-logbook-dialog .engine-logbook-dialog-body { background:linear-gradient(#f5faff,white 220px); }
body.pilot-modern .engine-logbook-dialog .engine-logbook-section { border:1px solid #bcd4e9; border-radius:12px; background:white; }
body.pilot-modern .engine-logbook-dialog .engine-logbook-data-grid > div { border:1px solid #bcd4e9; border-radius:10px; background:linear-gradient(#f7fcff,#e4f2ff); }
body.pilot-modern .engine-logbook-dialog :is(.engine-reconstruction-correction,.engine-reconstruction-preview,.engine-reconstruction-time-flight) { border:1px solid #c9c6e6; border-radius:12px; background:linear-gradient(#fcfaff,#edf5ff); padding:12px; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .alert-info { background:#e5f3ff; border:1px solid #b6d8ef; color:#194e79; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .alert-success { background:#e6f8e7; border:1px solid #abd8af; color:#1a5d25; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .alert-warning { background:#fff4d9; border:1px solid #edcf8e; color:#75460a; }
body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .alert-error { background:#fff0ef; border:1px solid #efb5b0; color:#a02620; }
@media (max-width:899px) {
    body.pilot-modern:is(.pilot-aircraft-logbook,.pilot-engine-logbook) .engine-logbook-page > .panel { padding:10px; }
    body.pilot-modern .engine-logbook-page .engine-logbook-page-header { padding:12px; gap:10px; }
    body.pilot-modern .engine-logbook-page .engine-logbook-page-header > div:first-child { padding-left:52px; background-size:42px 42px; }
    body.pilot-modern .engine-logbook-page .engine-logbook-page-header h1 { font-size:22px; }
    body.pilot-modern .book-compact .book-summary .engine-logbook-data-grid > div { padding:9px; }
    body.pilot-modern .book-compact .book-summary .engine-logbook-data-grid dd { font-size:20px; }
    body.pilot-modern .book-compact table.book-history tr.mp-table-card-row { border:1px solid #b9d4e9; border-radius:12px; box-shadow:0 2px 6px #07518b18; }
    body.pilot-modern .book-compact table.book-history tr.engine-activity-maintenance { border-left:4px solid #ed9c20; background:#fff7e7; }
    body.pilot-modern .book-compact table.book-history tr.engine-activity-maintenance > td { background:transparent; }
    body.pilot-modern :is(.engine-logbook-page,.engine-logbook-dialog) .engine-maintenance-form { padding:12px; }
}
/* Filas mixtas con colspan: tarjetas CSS sin alterar la tabla ni sus datos. */
@media (max-width:899px) {
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) { display:block; width:100%; min-width:0; max-width:100%; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) > thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) > tbody { display:grid; gap:8px; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; padding:10px; border:1px solid #b9d4e9; border-radius:12px; box-shadow:0 2px 6px #07518b18; background:white; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) td { display:block; min-width:0; width:auto; border:0; padding:0; white-space:normal; overflow-wrap:anywhere; font-size:15px; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) td:first-child { grid-column:1 / -1; font-weight:700; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) .engine-activity-flight > td:nth-child(2),
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) .engine-activity-flight > td:nth-child(3),
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) td[colspan] { grid-column:1 / -1; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) .engine-activity-flight > td:nth-child(4)::before { content:'Duración: '; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) .engine-activity-flight > td:nth-child(5)::before { content:'Horas iniciales: '; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) .engine-activity-flight > td:nth-child(6)::before { content:'Horas finales: '; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) .engine-activity-flight > td:empty { display:none; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) tr.engine-activity-maintenance { border-left:4px solid #ed9c20; background:#fff7e7; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) tr.engine-activity-maintenance > td { background:transparent; }
    body.pilot-modern.pilot-aircraft-logbook .aircraft-logbook-history-table:not(.mp-table-cards) .aircraft-logbook-maintenance-row { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
}
/* Fase 13D: interfaz web de Peso y Centrado; no cambia geometría ni PDF. */
body.pilot-modern :is(#wb-dialog,.wb-history-container) { --mp-wb-border:#b6d1e8; --mp-wb-shadow:0 3px 9px #07518b20; color:var(--mp-ink); }
body.pilot-modern #wb-dialog { border-color:var(--mp-wb-border); box-shadow:0 12px 40px #06366f30; }
body.pilot-modern #wb-dialog .wb-heading { background:linear-gradient(#f5fbff,#d5ecff); border-color:var(--mp-wb-border); color:var(--mp-ink); }
body.pilot-modern #wb-title { padding-left:48px; min-height:38px; display:flex; align-items:center; background:url('../images/modern/04_peso_centrado.svg') left center / 38px 38px no-repeat; color:var(--mp-ink); font-size:22px; font-weight:700; }
body.pilot-modern #wb-dialog .wb-body { background:linear-gradient(#f3f9ff,white 240px); }
body.pilot-modern #wb-dialog .wb-toolbar { border-color:var(--mp-wb-border); background:linear-gradient(#ffffffbb,#ffffffcc),url('../images/aviation/paisaje_aeronave.svg') center / cover no-repeat; border-radius:13px; }
body.pilot-modern #wb-dialog :is(#wb-model,#wb-profile,#wb-fuel) { border-color:#a9c9e4; background:#fcfeff; border-radius:9px; }
body.pilot-modern #wb-dialog #wb-selected-info { padding:8px 11px; border:1px solid #b7d3ec; border-radius:10px; background:#e6f3ff; font-size:13px; color:#164e80; }
body.pilot-modern #wb-dialog #wb-selected-info:empty { display:none; }
body.pilot-modern #wb-dialog #wb-selected-info[data-profile-type="CUSTOM"] { background:#f0e5ff; border-color:#cfb7ee; color:#66369c; }
body.pilot-modern #wb-dialog:has(#wb-selected-info[data-profile-type="CUSTOM"]) #wb-profile { border-color:#ad85db; }
body.pilot-modern #wb-dialog :is(.wb-card,.wb-load), body.pilot-modern .wb-history-container > .panel { border:1px solid var(--mp-wb-border); border-radius:14px; box-shadow:var(--mp-wb-shadow); background:white; }
body.pilot-modern #wb-dialog :is(.wb-card h3,.wb-load-title) { color:var(--mp-ink); font-weight:600; background:linear-gradient(90deg,#e2f3ff,white); border-radius:7px; }
body.pilot-modern #wb-dialog .wb-load { background:linear-gradient(120deg,#f7fcff,#e8f5ff); }
body.pilot-modern #wb-dialog :is(#wb-pilot,#wb-passenger,#wb-liters,#wb-baggage) { border-color:#accbe5; background:#fcfeff; border-radius:9px; }
body.pilot-modern #wb-dialog #wb-summary dd { color:var(--mp-ink); font-weight:600; font-variant-numeric:tabular-nums; }
body.pilot-modern #wb-dialog #wb-summary :is(dt,dd) { border-color:#d1e3f2; }
body.pilot-modern #wb-dialog #wb-summary dd.wb-negative-margin { color:#b42318; }
body.pilot-modern #wb-dialog #wb-summary { background:linear-gradient(#f5fbff,#e3f2ff); border-radius:9px; }
body.pilot-modern #wb-dialog .wb-status { border:1px solid #bdd1e6; border-radius:11px; font-weight:700; }
body.pilot-modern #wb-dialog .wb-good { background:linear-gradient(#e0f7e2,#bce8c2); color:#155d25; border-color:#9bcea5; }
body.pilot-modern #wb-dialog .wb-bad { background:linear-gradient(#fff0ef,#ffd2d0); color:#9c2019; border-color:#e9a39d; }
body.pilot-modern #wb-dialog #wb-violations { color:#9c2019; }
body.pilot-modern #wb-dialog .wb-cg-labels { color:var(--mp-ink); }
body.pilot-modern #wb-dialog .wb-station-box { border-color:#bed7ec; background:linear-gradient(#f5fbff,#e0f1ff); color:var(--mp-ink); }
body.pilot-modern #wb-dialog .wb-station-box strong { color:#075ca7; }
body.pilot-modern :is(#wb-dialog,.wb-history-container) .btn { border-radius:9px; }
body.pilot-modern #wb-dialog .wb-toolbar .btn-secondary { background:linear-gradient(#f6fbff,#d4eaff); border:1px solid #a9cce7; color:#07549c; }
body.pilot-modern #wb-dialog #wb-view, body.pilot-modern #wb-dialog #wb-custom button[type=submit] { background:linear-gradient(#ffad35,#ff8200); border:1px solid #e78500; color:#422300; }
body.pilot-modern #wb-dialog #wb-save-calculation { background:linear-gradient(#28aa3b,#16792a); border:1px solid #167329; color:white; }
body.pilot-modern #wb-dialog #wb-copy { background:linear-gradient(#f3eaff,#d6bdf5); border:1px solid #bea0e2; color:#613191; }
body.pilot-modern #wb-dialog #wb-export-pdf, body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-pdf, body.pilot-modern :is(#wb-dialog,.wb-history-container) [data-history-action="pdf"] { background:linear-gradient(#ff5353,#dc2020); border:1px solid #cd2525; color:white; }
body.pilot-modern #wb-dialog :is(#wb-deactivate,#wb-delete), body.pilot-modern :is(#wb-dialog,.wb-history-container) [data-history-action="delete"] { background:linear-gradient(#fff0ef,#ffd5da); border:1px solid #edafb7; color:#ae2222; }
body.pilot-modern #wb-dialog #wb-custom { background:linear-gradient(#fcf9ff,#f0eaff); border-color:#cbb9e8; }
body.pilot-modern #wb-dialog #wb-custom-fields .form-group { padding:8px; border:1px solid #e0d5ef; border-radius:9px; background:white; }
body.pilot-modern #wb-dialog #wb-sheet-data { background:linear-gradient(#f4fbff,#e2f2ff); border:1px solid var(--mp-wb-border); border-radius:10px; padding:10px; }
body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-panel > h2 { padding-left:48px; min-height:38px; display:flex; align-items:center; background:url('../images/modern/04_peso_centrado.svg') left center / 38px 38px no-repeat; color:var(--mp-ink); font-size:22px; }
body.pilot-modern :is(#wb-dialog,.wb-history-container) .wb-history-actions .btn-secondary:not([data-history-action="delete"]):not([data-history-action="pdf"]) { background:linear-gradient(#f4fbff,#d8edff); border:1px solid #b3d1e9; color:#07559e; }
body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-rows th { color:var(--mp-ink); }
body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-list thead th { background:linear-gradient(#dcf0ff,#b9dcff); color:var(--mp-ink); }
body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-list td { border-color:#c5d8e9; }
body.pilot-modern :is(#wb-dialog,.wb-history-container) .wb-history-cell-state[data-state="within"] { background:#e1f5e4; color:#176027; }
body.pilot-modern :is(#wb-dialog,.wb-history-container) .wb-history-cell-state[data-state="outside"] { background:#ffe6e3; color:#a52a22; }
body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-document .wb-document > section { border:1px solid var(--mp-wb-border); border-radius:12px; box-shadow:var(--mp-wb-shadow); background:white; }
body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-document .wb-document > section > h3 { color:var(--mp-ink); background:linear-gradient(#f1faff,#dceeff); }
body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-document .wb-detail-identity { background:linear-gradient(#f4fbff,#dbeeff); border-color:var(--mp-wb-border); border-radius:11px; }
body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-document .wb-detail-state[data-state="within"] { background:linear-gradient(#e9f9ec,#cbeed1); border:1px solid #a5d4af; color:#176027; }
body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-document .wb-detail-state[data-state="outside"] { background:linear-gradient(#fff1ef,#ffdad7); border:1px solid #eeb4ae; color:#a52a22; }
body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-document table th { background:#dceeff; color:var(--mp-ink); }
body.pilot-modern #wb-dialog .btn:disabled { opacity:.55; cursor:not-allowed; }
@media(max-width:899px) {
    body.pilot-modern #wb-dialog #wb-title { font-size:20px; padding-left:42px; background-size:34px 34px; }
    body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-panel > h2 { font-size:20px; }
    body.pilot-modern :is(#wb-dialog,.wb-history-container) #wb-history-rows tr { border:1px solid #bad4e9; border-radius:12px; box-shadow:0 2px 6px #07518b18; background:white; }
}

/* Fase 13E: preparaci?n AESA, documentaci?n y monitor GPS; solo pantalla.
   Las hojas oficiales, sus tablas y la exportaci?n no reciben reglas nuevas. */
@media screen {
    body.pilot-modern:is(.pilot-aesa,.pilot-personal-documents,.pilot-aircraft-documents), body.gps-live-page { background:linear-gradient(#edf7ff,#f4f9fd 500px); }
    .pilot-modern :is(.aesa-intro,.mp-document-heading) { padding:16px 20px; border:1px solid #bdd8ed; border-radius:15px; background:linear-gradient(90deg,#f5fbfff5,#e3f3ffb8),url('../images/aviation/paisaje_aeronave.svg') right center / cover no-repeat; box-shadow:var(--mp-shadow); margin-bottom:16px; }
    .pilot-modern .mp-document-heading h1 { margin:0; font-size:26px; line-height:1.25; color:var(--mp-ink); font-weight:700; }
    body.pilot-modern.pilot-aesa .aesa-intro > span { background:linear-gradient(#e2f4ff,#bae1ff); }
    body.pilot-modern.pilot-aesa .aesa-intro img { display:block; width:44px; height:44px; object-fit:contain; }
    body.pilot-modern.pilot-aesa :is(.panel-filtros,.aesa-preview,.aesa-history-dialog) { border-color:#b8d5ec; box-shadow:var(--mp-shadow); }
    body.pilot-modern.pilot-aesa :is(.aesa-history,.aesa-generated-summary) { padding:14px; border:1px solid #b8d5ec; border-radius:12px; background:linear-gradient(115deg,#edf8ff,#daedff); color:var(--mp-ink); }
    body.pilot-modern.pilot-aesa .aesa-history h3 { color:var(--mp-deep); margin-top:0; }
    body.pilot-modern.pilot-aesa .aesa-history-summary > div { padding:6px 10px; border:1px solid #c1d8ef; border-radius:8px; background:#ffffffcc; }
    body.pilot-modern.pilot-aesa :is(.aesa-history-duration,.aesa-history-transition) { background:linear-gradient(#f6fbff,#eaf5ff); border-color:#b8d5ec; border-radius:10px; }
    body.pilot-modern.pilot-aesa :is(.rating-group,.aircraft-list) label { padding:6px 10px; border:1px solid #bfd5e9; border-radius:9px; background:white; }
    body.pilot-modern.pilot-aesa :is(.rating-group,.aircraft-list) label:has(input:checked) { background:linear-gradient(#dff2ff,#bedfff); border-color:#58a6e6; color:#064b91; }
    body.pilot-modern.pilot-aesa .option-group input { accent-color:var(--mp-blue); }
    body.pilot-modern.pilot-aesa .aesa-history-dialog { background:linear-gradient(#edf7ff,white 200px); color:var(--mp-ink); }
    body.pilot-modern.pilot-aesa .aesa-history-dialog :is(input:not([type=checkbox]),textarea) { border:1px solid #accbe5; border-radius:8px; padding:8px; font:inherit; }
    body.pilot-modern.pilot-aesa :is(.form-actions .btn-primary,.aesa-history .btn-primary) { background:linear-gradient(#1489ef,#075bb9); color:white; border:1px solid #075bb9; }
    body.pilot-modern.pilot-aesa .form-actions .btn-pdf { background:linear-gradient(#ffab25,#ff7900); color:#342000; border:1px solid #d87000; }
    body.pilot-modern.pilot-aesa .aesa-preview > h2 { background:linear-gradient(#e7f5ff,#cde7ff); color:var(--mp-deep); }
    body.pilot-modern.pilot-aesa .panel-filtros [role=alert] { border-left:4px solid #d53225; background:#fff0ed; padding:10px; border-radius:8px; color:#a52b20; }

    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .mp-document-heading h1 { font-weight:700; }

    /* Un mismo componente documental para ambas pantallas y sus modales. */
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .container .panel { border-color:#b9d5eb; box-shadow:var(--mp-shadow); }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin thead th { background:linear-gradient(#e7f6ff,#c4e3ff); color:var(--mp-deep); }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody td:first-child { font-weight:700; color:var(--mp-ink); }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody tr { background:linear-gradient(110deg,white,#f5fbff); }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin .btn { border-radius:8px; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .btn-primary { background:linear-gradient(#168bf1,#075dbb); color:white; border:1px solid #0762bc; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .btn-secondary { background:linear-gradient(#f6fbff,#d9edff); color:#0759a1; border:1px solid #adcee9; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) :is(#documentModal,#passwordModal) { padding:12px; box-sizing:border-box; overflow-y:auto; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) :is(#documentModal,#passwordModal) .password-modal-box { box-sizing:border-box; width:min(560px,100%); max-width:100%; max-height:calc(100dvh - 24px); overflow:auto; padding:20px; border:1px solid #b7d4ec; border-radius:15px; background:linear-gradient(#edf7ff,white 180px); color:var(--mp-ink); box-shadow:0 12px 40px #06366f30; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) :is(#documentModal,#passwordModal) h3 { padding:4px 0 12px 44px; border-bottom:1px solid #bfd7ed; background:url('../images/modern/07_documentacion.svg') left top / 34px 34px no-repeat; font-size:21px; color:var(--mp-deep); }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) :is(#documentModal,#passwordModal) .form-group { min-width:0; margin-bottom:14px; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) :is(#documentModal,#passwordModal) input { box-sizing:border-box; width:100%; min-width:0; max-width:100%; min-height:44px; padding:9px; border:1px solid #aac9e3; border-radius:8px; background:white; font:inherit; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) :is(#documentModal,#passwordModal) .modal-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) :is(.badge-success,.badge-ok) { background:#dcf5df; color:#18602b; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .badge-warning { background:#fff0c7; color:#754900; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .badge-danger { background:#ffe2df; color:#a1261e; }

    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .badge[data-document-state="near"],
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .badge[data-document-state="proximo"] { background:#ffe0bc; color:#8a3e00; }

    /* GPS conserva navegaci?n administrativa, mapa, controles, eventos y AJAX. */
    body.gps-live-page { color:var(--mp-ink); }
    body.gps-live-page .app-header { background:linear-gradient(110deg,var(--mp-deep),#07518b); }
    body.gps-live-page main.app-container { max-width:1600px; margin:0 auto; padding:18px; width:100%; min-width:0; background:transparent; box-shadow:none; box-sizing:border-box; }
    body.gps-live-page main > .container { width:100%; max-width:none; padding:0; margin:0; background:transparent; box-shadow:none; min-width:0; }
    body.gps-live-page .panel { box-sizing:border-box; padding:16px; margin-bottom:16px; border:1px solid #b6d7e6; border-radius:15px; background:white; box-shadow:var(--mp-shadow); min-width:0; }
    body.gps-live-page .panel:first-child > h2 { display:flex; align-items:center; justify-content:flex-start; gap:12px; padding:10px; border:0; border-radius:11px; background:linear-gradient(90deg,#ebf9ff,#dff7f7),url('../images/aviation/paisaje_aeronave.svg') center / cover; color:var(--mp-deep); margin:0 0 12px; }
    body.gps-live-page #trackerSummary { padding:10px 12px; background:linear-gradient(#edfbfa,#d7f1ee); border:1px solid #afdcd6; border-radius:9px; line-height:1.8; }
    body.gps-live-page #gpsMap { box-sizing:border-box; border:1px solid #a9cdd6; border-radius:12px; box-shadow:0 2px 8px #06366f18; isolation:isolate; }
    body.gps-live-page .form-control { max-width:100%; min-width:0; min-height:44px; padding:8px; border:1px solid #a9d3da; border-radius:8px; color:var(--mp-ink); background:#f8ffff; font:inherit; }
    body.gps-live-page #gpsLog .tabla-scroll { max-width:100%; overflow:auto; border:1px solid #c2dce7; border-radius:10px; }
    body.gps-live-page #gpsLog .tabla-admin { width:100%; margin:0; }
    body.gps-live-page #gpsLog th { background:linear-gradient(#e5f8fa,#c3e9ec); color:#14536a; }
    body.gps-live-page #gpsLog :is(td,th) { padding:9px; border-bottom:1px solid #d4e5eb; }
    body.gps-live-page #gpsLog .btn { border-radius:8px; background:linear-gradient(#118bcb,#0568a6); color:white; }
    body.gps-live-page :is(a,button,input,select):focus-visible { outline:3px solid var(--mp-turquoise); outline-offset:3px; }
}
@media screen and (max-width:899px) {
    .pilot-modern :is(.aesa-intro,.mp-document-heading) { padding:12px; }
    .pilot-modern .mp-document-heading h1 { font-size:22px; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody tr { border-color:#b9d5eb; box-shadow:var(--mp-shadow); }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody > tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px; border-radius:10px; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody > tr > td { display:block; min-width:0; padding:0; border:0; overflow-wrap:anywhere; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody > tr > td:nth-child(1) { grid-column:1/-1; grid-row:1; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody > tr > td:nth-child(2) { grid-column:1/-1; grid-row:3; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody > tr > td:nth-child(3) { grid-column:1/-1; grid-row:2; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody > tr > td:nth-child(4) { grid-column:1; grid-row:4; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody > tr > td:nth-child(5) { grid-column:2; grid-row:4; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody > tr > td[data-label]::before { display:none; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody > tr > td:nth-child(2)::before { display:block; content:'Caducidad: '; color:var(--mp-muted); font-size:14px; }
    body.pilot-modern:is(.pilot-personal-documents,.pilot-aircraft-documents) .tabla-admin tbody .btn { display:flex; align-items:center; justify-content:center; width:100%; box-sizing:border-box; min-height:44px; padding:8px; }
    body.gps-live-page main.app-container { padding:10px; }
    body.gps-live-page .panel { padding:10px; }
    body.gps-live-page .app-header { background:transparent; color:var(--mp-ink); padding:8px 10px; min-height:0; }
    body.gps-live-page .app-header h1, body.gps-live-page .main-footer { display:none; }
    body.gps-live-page .app-header .user-info { color:var(--mp-ink); flex-wrap:wrap; }
    body.gps-live-page #gpsServerStatus { white-space:normal !important; overflow-wrap:anywhere; }
}

/* Configuración personal: sesiones, sin cambios en autenticaci?n ni acciones. */
@media screen {
    body.pilot-modern.pilot-configuration { background:linear-gradient(#edf7ff,#f4f9fd 500px); }
    body.pilot-modern.pilot-configuration .pc-heading-icon { display:grid; place-items:center; flex:0 0 52px; width:52px; height:52px; border-radius:12px; background:linear-gradient(#def1ff,#b9dcff); color:var(--mp-deep); }
    body.pilot-modern.pilot-configuration .pc-heading-icon .mp-icon { width:34px; height:34px; }
    body.pilot-modern.pilot-configuration .mp-document-heading p { margin:5px 0 0; color:var(--mp-muted); }
    body.pilot-modern.pilot-configuration .panel { border-color:#b8d5ec; box-shadow:var(--mp-shadow); }
    body.pilot-modern.pilot-configuration .tabla-admin { width:100%; margin:0; border-collapse:collapse; }
    body.pilot-modern.pilot-configuration .tabla-admin :is(th,td) { padding:11px; border-bottom:1px solid #cfdfed; text-align:left; overflow-wrap:anywhere; }
    body.pilot-modern.pilot-configuration .tabla-admin th { background:linear-gradient(#e5f4ff,#c7e3ff); color:var(--mp-deep); }
    body.pilot-modern.pilot-configuration .tabla-admin td strong { display:inline-block; margin:4px; padding:3px 8px; border-radius:12px; background:#dcf5df; color:#18602b; font-size:13px; }
    body.pilot-modern.pilot-configuration .btn-danger { padding:9px 14px; border:1px solid #edb2b8; border-radius:9px; background:linear-gradient(#fff0ef,#ffd5da); color:#a52626; min-height:44px; font:inherit; font-weight:600; }
    body.pilot-modern.pilot-configuration .panel > p { padding:16px; background:#edf7ff; border:1px solid #c4dcef; border-radius:10px; }
}
@media screen and (max-width:899px) {
    body.pilot-modern.pilot-configuration .tabla-scroll { overflow:visible; }
    body.pilot-modern.pilot-configuration .tabla-admin { display:block; min-width:0; }
    body.pilot-modern.pilot-configuration .tabla-admin thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
    body.pilot-modern.pilot-configuration .tabla-admin tbody { display:grid; gap:12px; }
    body.pilot-modern.pilot-configuration .tabla-admin tr { display:grid; grid-template-columns:minmax(0,1fr); padding:12px; border:1px solid #bbd5e9; border-radius:12px; background:linear-gradient(115deg,white,#f1f9ff); box-shadow:var(--mp-shadow); }
    body.pilot-modern.pilot-configuration .tabla-admin td { display:block; padding:6px 0; border:0; white-space:normal; }
    body.pilot-modern.pilot-configuration .tabla-admin td::before { display:block; color:var(--mp-muted); font-size:14px; }
    body.pilot-modern.pilot-configuration .tabla-admin td:nth-child(2)::before { content:'IP'; }
    body.pilot-modern.pilot-configuration .tabla-admin td:nth-child(3)::before { content:'Creado'; }
    body.pilot-modern.pilot-configuration .tabla-admin td:nth-child(4)::before { content:'Expira'; }
    body.pilot-modern.pilot-configuration .tabla-admin td:first-child { font-weight:700; }
    body.pilot-modern.pilot-configuration .btn-danger { width:100%; white-space:normal; }
}

/* Fase 14: mismo marco, fotograf?a completa y modal compartido. */
body.pilot-modern .aircraft-photo-trigger { border:0; padding:0; background:transparent; cursor:pointer; border-radius:10px; overflow:hidden; }
body.pilot-modern .mp-dashboard .mp-aircraft-image.aircraft-photo-trigger { pointer-events:auto; }
body.pilot-modern .aircraft-photo-trigger img { border-radius:9px; object-fit:contain; }
body.pilot-modern .aircraft-photo-dialog { box-sizing:border-box; width:min(720px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; padding:0; border:1px solid #adcce6; border-radius:16px; background:white; color:var(--mp-ink); box-shadow:0 15px 50px #06366f40; }
body.pilot-modern .aircraft-photo-dialog::backdrop { background:#06234999; }
body.pilot-modern .aircraft-photo-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px; border-bottom:1px solid #bdd7ec; background:linear-gradient(#edf8ff,#d8edff); }
body.pilot-modern .aircraft-photo-dialog h2 { margin:0; font-size:22px; color:var(--mp-deep); }
body.pilot-modern .aircraft-photo-dialog > header > div { min-width:0; }
body.pilot-modern .aircraft-photo-dialog [data-photo-close] { flex:0 0 auto; white-space:nowrap; }
body.pilot-modern #aircraft-photo-registration { margin:5px 0 0; font-weight:700; }
body.pilot-modern .aircraft-photo-body { padding:16px; }
body.pilot-modern #aircraft-photo-preview { display:block; width:100%; height:min(42vh,360px); object-fit:contain; border-radius:12px; background:#eff7fc; }
body.pilot-modern .aircraft-photo-actions { display:flex; flex-wrap:wrap; gap:10px; }
body.pilot-modern .aircraft-photo-dialog .btn { min-height:44px; padding:10px 14px; border:1px solid #b3d0e9; border-radius:9px; background:linear-gradient(#f5fbff,#d8ebff); color:#07569b; white-space:normal; font:inherit; font-weight:600; }
body.pilot-modern .aircraft-photo-dialog .btn-primary { background:linear-gradient(#1488ec,#075ab7); color:white; border-color:#0764be; }
body.pilot-modern .aircraft-photo-dialog .btn-danger { background:linear-gradient(#fff0ef,#ffd6da); color:#a52727; border-color:#edb3bc; }
body.pilot-modern #aircraft-photo-status { min-height:24px; overflow-wrap:anywhere; }
body.pilot-modern #aircraft-photo-status[data-error="true"] { padding:10px; border-radius:8px; background:#ffebe8; color:#a1231c; }
body.pilot-modern .aircraft-photo-help { font-size:13px; color:var(--mp-muted); }
body.pilot-modern .aircraft-photo-dialog button:disabled { opacity:.55; cursor:wait; }
@media (max-width:599px) {
    body.pilot-modern .aircraft-photo-dialog > header { align-items:flex-start; padding:12px; }
    body.pilot-modern .aircraft-photo-dialog h2 { font-size:20px; }
    body.pilot-modern .aircraft-photo-body { padding:12px; }
    body.pilot-modern .aircraft-photo-actions .btn { flex:1 1 100%; }
}

/* Fase 15: un solo juego de controles; desplegables independientes en escritorio. */
.pilot-modern .ma-section { min-width: 0; }
.pilot-modern .ma-section-toggle { display: none; }
.pilot-modern .ma-warmup { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--mp-border); }
.pilot-modern .ma-warmup > label { display: block; color: var(--mp-primary); font-size: 14px; }
.pilot-modern .ma-warmup p { color: var(--mp-muted); font-size: 12px; line-height: 1.5; }
.pilot-modern .ma-warmup-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pilot-modern .ma-warmup-controls input { width: 90px; }
.pilot-modern .ma-warmup-controls [hidden] { display: none; }
@media (min-width: 900px) {
    .pilot-modern .ma-config-sections .ma-section { order: 4; margin-top: 7px; border: 1px solid var(--mp-border); border-radius: 9px; overflow: hidden; }
    body.pilot-modern .ma-section-toggle { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 0; background: var(--mp-soft); color: var(--mp-primary); font: inherit; font-size: 11px; font-weight: 400; text-transform: uppercase; text-align: left; cursor: pointer; }
    .pilot-modern .ma-section-toggle .mp-icon { width: 14px; height: 14px; }
    .pilot-modern .ma-section-chevron { margin-left: auto; transition: transform .18s ease; }
    .pilot-modern .ma-section-toggle[aria-expanded="true"] .ma-section-chevron { transform: rotate(180deg); }
    .pilot-modern .ma-section-panel { display: none; padding: 12px; }
    .pilot-modern .ma-section-open > .ma-section-panel { display: block; }
    .pilot-modern .ma-section :is(.ma-tracker,.ma-sharing,.ma-warmup) { margin-top: 0; padding-top: 0; border-top: 0; }
    .pilot-modern .ma-section :is(.ma-tracker,.ma-sharing) > strong { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .pilot-modern .ma-section-chevron { transition: none; }
}

.pilot-modern .ma-section-empty { display: none; }
@media (min-width: 900px) {
    .pilot-modern .ma-section-empty { display: block; }
    .pilot-modern .ma-config-sections .ma-section-sharing { order: 3; }
    .pilot-modern .ma-config-sections .ma-section-configuration { order: 5; }
    .pilot-modern .ma-admin { order: 6; }
}

@media (max-width: 899px) {
    .pilot-modern .ma-config-sections .ma-section,
    .pilot-modern .ma-config-sections .ma-section-panel,
    .pilot-modern .ma-config-sections .ma-secondary-data:not(.ma-data-sections) { display: contents; }
}
@media (min-width: 900px) {
    .pilot-modern .ma-config-sections, .pilot-modern .ma-data-sections { display: contents; }
}
