:root {
    --content-max: 1600px;
    --surface-public: #ffffff;
    --surface-soft-public: #f8fafc;
    --border-public: #d8e3ea;
    --bg-public: #ffffff;
    --heading-public: #0f172a;
    --text-public: #0f172a;
    --muted-public: #64748b;
    --shadow-public: 0 18px 42px rgba(15, 23, 42, 0.08);
    --shadow-soft-public: 0 8px 18px rgba(15, 23, 42, 0.05);
    --bg-1: #02111f;
    --bg-2: #07243e;
    --bg-3: #0b5f8e;
    --surface: rgba(10, 29, 49, 0.68);
    --surface-strong: rgba(13, 36, 61, 0.78);
    --surface-soft: rgba(125, 211, 252, 0.1);
    --surface-clear: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.2);
    --glass-sheen: rgba(186, 230, 253, 0.16);
    --border: rgba(214, 236, 255, 0.22);
    --border-strong: rgba(226, 246, 255, 0.42);
    --text: #f5f8ff;
    --muted: rgba(231, 239, 252, 0.84);
    --accent: #bae6fd;
    --accent-strong: #f8fbff;
    --shadow: 0 12px 30px rgba(0, 10, 24, 0.28);
    --shadow-soft: 0 4px 14px rgba(0, 10, 24, 0.18);
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "SF Pro Display", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 12%, rgba(125, 211, 252, 0.18), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(45, 212, 191, 0.12), transparent 28%),
        radial-gradient(circle at 52% 92%, rgba(14, 116, 144, 0.26), transparent 34%),
        linear-gradient(145deg, var(--bg-1) 0%, var(--bg-2) 52%, #06314d 100%);
    background-attachment: fixed;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    filter: blur(2px);
    opacity: 0.75;
}

body::before {
    top: 8vh;
    left: -7vw;
    width: 30vw;
    height: 30vw;
    min-width: 240px;
    min-height: 240px;
    background: radial-gradient(circle, rgba(219, 234, 254, 0.18), rgba(219, 234, 254, 0));
    animation: floatAura 18s ease-in-out infinite;
}

body::after {
    right: -10vw;
    bottom: 8vh;
    width: 36vw;
    height: 36vw;
    min-width: 280px;
    min-height: 280px;
    background: radial-gradient(circle, rgba(142, 197, 252, 0.18), rgba(142, 197, 252, 0));
    animation: floatAura 22s ease-in-out infinite reverse;
}

body.page-index,
body.page-home,
body.page-aerei,
body.page-briefing,
body.page-briefing-checklist,
body.page-cartine,
body.page-cklist,
body.page-flightlog,
body.page-flightlog-archive,
body.page-logbook,
body.page-privacy,
body.page-dashboard,
body.page-register {
    position: relative;
}

body.page-index:not(.page-home),
body.page-public,
body.page-legal,
body.page-legal-document,
body.page-chi-sono,
body.page-formazione,
body.page-guide,
body.page-contatti,
body.page-privacy {
    --surface: var(--surface-public);
    --surface-strong: var(--surface-soft-public);
    --surface-soft: var(--surface-soft-public);
    --surface-clear: #ffffff;
    --border: var(--border-public);
    --border-strong: #cbd5e1;
    --heading: var(--heading-public);
    --text: var(--text-public);
    --muted: var(--muted-public);
    --shadow: var(--shadow-public);
    --shadow-soft: var(--shadow-soft-public);
    color: var(--text-public);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    background-attachment: scroll;
    padding: 12px 12px 30px;
}

body.page-index:not(.page-home)::before,
body.page-index:not(.page-home)::after,
body.page-public::before,
body.page-public::after,
body.page-legal::before,
body.page-legal::after,
body.page-legal-document::before,
body.page-legal-document::after,
body.page-chi-sono::before,
body.page-chi-sono::after,
body.page-formazione::before,
body.page-formazione::after,
body.page-guide::before,
body.page-guide::after,
body.page-contatti::before,
body.page-contatti::after,
body.page-privacy::before,
body.page-privacy::after {
    display: none;
    content: none;
}

body.page-index:not(.page-home) .site-shell,
body.page-index:not(.page-home) .legal-shell,
body.page-public .site-shell,
body.page-public .legal-shell,
body.page-legal .legal-shell,
body.page-legal-document.page-public .legal-shell,
body.page-chi-sono.page-public .legal-shell,
body.page-formazione.page-public .legal-shell,
body.page-guide .legal-shell,
body.page-contatti.page-public .legal-shell,
body.page-privacy .legal-shell {
    width: min(1180px, calc(100% - 24px));
    margin-inline: auto;
    display: grid;
    gap: 18px;
    box-sizing: border-box;
}

body.page-index:not(.page-home),
body.page-chi-sono.page-public,
body.page-formazione.page-public,
body.page-legal.page-public.page-legal-document,
body.page-guide.page-public,
body.page-public.page-privacy {
    padding: 16px 16px 30px;
}

body.page-index:not(.page-home) .site-shell,
body.page-public .site-shell,
body.page-legal .legal-shell,
body.page-legal-document.page-public .legal-shell,
body.page-chi-sono.page-public .legal-shell,
body.page-formazione.page-public .legal-shell,
body.page-guide .legal-shell,
body.page-contatti.page-public .legal-shell,
body.page-privacy .legal-shell {
    align-content: start;
}

body.page-legal .legal-article,
body.page-legal-document .legal-article,
body.page-privacy .legal-article,
body.page-cookie .legal-article,
body.page-terms .legal-article,
body.page-disclaimer .legal-article {
    text-align: left;
}

body.page-legal .legal-section,
body.page-legal-document .legal-section,
body.page-privacy .legal-section,
body.page-cookie .legal-section,
body.page-terms .legal-section,
body.page-disclaimer .legal-section {
    padding-left: 2px;
    padding-right: 2px;
}

body.page-legal .legal-index,
body.page-legal-document .legal-index,
body.page-privacy .legal-index,
body.page-cookie .legal-index,
body.page-terms .legal-index,
body.page-disclaimer .legal-index {
    margin-left: 0;
    margin-right: 0;
}

body.page-index:not(.page-home) .btn,
body.page-index:not(.page-home) .button,
body.page-index:not(.page-home) a.button,
body.page-index:not(.page-home) .print-btn,
body.page-index:not(.page-home) .back,
body.page-index:not(.page-home) .action-chip,
body.page-index:not(.page-home) .nav-pill,
body.page-index:not(.page-home) .nav-toggle,
body.page-index:not(.page-home) .nav-link,
body.page-index:not(.page-home) .portal-link,
body.page-index:not(.page-home) .tab-button,
body.page-index:not(.page-home) summary,
body.page-public .btn,
body.page-public .button,
body.page-public a.button,
body.page-public .print-btn,
body.page-public .back,
body.page-public .action-chip,
body.page-public .nav-pill,
body.page-public .nav-toggle,
body.page-public .nav-link,
body.page-public .portal-link,
body.page-public .tab-button,
body.page-public summary {
    color: #0f172a !important;
    background:
        linear-gradient(180deg, #ffffff, #eaf4ff) !important;
    border-color: #93c5fd !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.10) !important;
}

body.page-index:not(.page-home) .button-primary,
body.page-index:not(.page-home) .btn-primary,
body.page-public .button-primary,
body.page-public .btn-primary {
    color: #ffffff !important;
    background: linear-gradient(180deg, #38bdf8, #1d4ed8) !important;
    border-color: rgba(56, 189, 248, 0.42) !important;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18) !important;
}

body.page-index:not(.page-home) input,
body.page-index:not(.page-home) textarea,
body.page-index:not(.page-home) select,
body.page-public input,
body.page-public textarea,
body.page-public select {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #d8e3ea !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.page-index:not(.page-home) input:focus,
body.page-index:not(.page-home) textarea:focus,
body.page-index:not(.page-home) select:focus,
body.page-public input:focus,
body.page-public textarea:focus,
body.page-public select:focus {
    border-color: #38bdf8 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

a {
    color: inherit;
}

img,
svg {
    max-width: 100%;
}

.site-shell,
.container,
.page-main,
.page-stack {
    position: relative;
    z-index: 1;
    width: min(var(--content-max), calc(100% - 20px));
    margin-inline: auto;
}

.site-shell {
    display: grid;
    gap: 18px;
}

body {
    padding: 18px 16px 28px;
}

.glass,
.panel,
.card,
.cockpit-card,
.cockpit-hero,
.user-bar,
main.card,
section.card,
.hero-card,
.auth-shell,
.auth-panel,
.portal-card,
.footer-panel,
.menu-card,
.metric-card,
.stat-card,
.feature-card {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025) 42%, rgba(125, 211, 252, 0.045)),
        var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.panel,
.card,
.cockpit-card,
.user-bar,
.footer-panel,
.menu-card,
.metric-card,
.stat-card,
.feature-card {
    border-radius: var(--radius-lg);
}

.container {
    padding-inline: 0;
}

.panel,
.card,
.cockpit-card {
    position: relative;
    overflow: hidden;
}

.panel::before,
.card::before,
.cockpit-card::before,
.hero-card::before,
.auth-panel::before,
.portal-card::before,
.menu-card::before,
.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 34%),
        radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.11), transparent 26%);
    opacity: 0.42;
}

.btn,
.tab-button,
.briefing-card,
.airport-card,
.plane-button,
.home-top,
.back,
.button,
a.button,
.print-btn,
summary,
.nav-pill,
.nav-toggle,
.nav-link,
.action-chip,
.portal-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    color: var(--accent-strong) !important;
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.045)),
        rgba(21, 54, 82, 0.58) !important;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    transition:
        transform 0.28s ease,
        background 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease;
}

.btn:hover,
.btn:focus-visible,
.tab-button:hover,
.tab-button:focus-visible,
.briefing-card:hover,
.briefing-card:focus-visible,
.airport-card:hover,
.airport-card:focus-visible,
.plane-button:hover,
.plane-button:focus-visible,
.home-top:hover,
.home-top:focus-visible,
.back:hover,
.back:focus-visible,
.button:hover,
.button:focus-visible,
a.button:hover,
a.button:focus-visible,
.print-btn:hover,
.print-btn:focus-visible,
summary:hover,
summary:focus-visible,
.nav-pill:hover,
.nav-pill:focus-visible,
.nav-toggle:hover,
.nav-toggle:focus-visible,
.nav-link:hover,
.nav-link:focus-visible,
.action-chip:hover,
.action-chip:focus-visible,
.portal-link:hover,
.portal-link:focus-visible {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: 0 10px 24px rgba(7, 12, 28, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    outline: none;
}

.tab-button.active,
.nav-pill.active,
.button-primary,
.btn-primary {
    background:
        linear-gradient(180deg, #38bdf8, #1d4ed8) !important;
    color: #ffffff !important;
    border-color: rgba(59, 130, 246, 0.48);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

input,
textarea,
select {
    width: 100%;
    min-height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(214, 236, 255, 0.22) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
        rgba(4, 16, 29, 0.62) !important;
    color: var(--text) !important;
    padding: 9px 10px;
    font: inherit;
    letter-spacing: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #67e8f9 !important;
    background: rgba(9, 31, 51, 0.78) !important;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    outline: none;
}

::placeholder {
    color: rgba(203, 213, 225, 0.68);
    opacity: 1;
}

input[type="hidden"],
input[type="checkbox"],
input[type="radio"],
input[type="file"] {
    min-height: 0;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

label {
    display: grid;
    gap: 6px;
    align-content: start;
    font-size: 0.76rem;
    line-height: 1.25;
}

label,
.hint,
.note,
.section p,
.section ul,
.airport-card span,
.briefing-card span,
h3,
.meta,
.eyebrow,
.field-hint {
    color: var(--muted) !important;
}

.message,
.success,
.error {
    border-radius: var(--radius-md);
    padding: 10px 12px;
    border: 1px solid transparent;
}

.message.error,
.error {
    background: rgba(255, 114, 118, 0.16) !important;
    color: #ffe2e4 !important;
    border-color: rgba(255, 182, 184, 0.2);
}

.message.success,
.success {
    background: rgba(122, 255, 190, 0.16) !important;
    color: #e4fff0 !important;
    border-color: rgba(186, 255, 221, 0.18);
}

.logout-btn {
    background:
        linear-gradient(180deg, rgba(255, 182, 184, 0.25), rgba(255, 124, 128, 0.08)),
        rgba(104, 18, 26, 0.44) !important;
}

.home-top,
.back,
.button,
a.button,
.print-btn,
.nav-link,
.portal-link,
.plane-button,
.briefing-card,
.airport-card {
    padding: 7px 10px;
    min-height: 36px;
}

.home-top,
.back {
    width: auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

body:not(.page-index) .section-title,
body:not(.page-index) .topbar h1,
body:not(.page-index) h1,
body:not(.page-index) h2 {
    text-align: left;
}

.portal-nav-shell {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
    max-height: 64px;
    padding: 7px 10px;
    border-radius: 0 0 22px 22px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
        rgba(8, 27, 47, 0.7);
    border: 1px solid rgba(214, 236, 255, 0.18);
    border-top: 0;
    box-shadow: 0 14px 30px rgba(0, 10, 24, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.portal-nav-shell.is-compact {
    box-shadow: 0 2px 6px rgba(3, 8, 20, 0.14);
}

.portal-nav-shell.is-nav-hidden {
    transform: translateY(calc(-100% - 4px));
}

.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
    text-decoration: none;
}

.portal-brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06));
    box-shadow: var(--shadow-soft);
}

.portal-brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1.18);
}

.portal-brand-copy {
    min-width: 0;
}

.portal-brand-copy strong,
.portal-brand-copy span {
    display: block;
}

.portal-brand-copy strong {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.portal-brand-copy span {
    color: var(--muted);
    font-size: 0.62rem;
    white-space: nowrap;
}

.portal-menu-trigger,
.portal-menu-close {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #cffafe;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
        rgba(21, 54, 82, 0.66);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.portal-menu-trigger:hover,
.portal-menu-trigger:focus-visible,
.portal-menu-close:hover,
.portal-menu-close:focus-visible {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: 0 5px 12px rgba(7, 12, 28, 0.22);
    outline: none;
}

.portal-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(2, 10, 22, 0.28);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.portal-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 80;
    width: min(400px, calc(100vw - 22px));
    height: 100dvh;
    padding: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--border);
    border-right: 0;
    border-radius: 24px 0 0 24px;
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035)),
        rgba(5, 18, 35, 0.95);
    box-shadow: -18px 0 40px rgba(2, 6, 23, 0.42), inset 1px 0 0 rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(16px) saturate(145%);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    transform: translateX(104%);
    transition: transform 0.18s ease;
}

body.portal-menu-open {
    overflow: hidden;
}

body.portal-menu-open .portal-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
}

body.portal-menu-open .portal-menu-panel {
    transform: translateX(0);
}

.portal-menu-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.portal-menu-panel-head strong,
.portal-menu-panel-head span {
    display: block;
}

.portal-menu-panel-head strong {
    color: #ffffff;
    font-size: 0.9rem;
    letter-spacing: 0;
}

.portal-menu-panel-head span {
    color: var(--muted);
    font-size: 0.72rem;
}

.portal-menu-groups {
    display: grid;
    gap: 14px;
    padding-top: 12px;
}

.portal-menu-group {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.portal-menu-group h2 {
    margin: 0 0 6px;
    color: #7dd3fc;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-align: left;
    text-transform: uppercase;
}

.portal-menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.portal-menu-card {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    color: var(--text);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
        rgba(14, 31, 50, 0.64);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    text-align: left;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 750;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.portal-menu-card:hover,
.portal-menu-card:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.34);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
        rgba(20, 49, 76, 0.74);
    outline: none;
}

.portal-menu-card.is-active {
    color: #ecfeff;
    background:
        linear-gradient(145deg, rgba(56, 189, 248, 0.24), rgba(255, 255, 255, 0.045)),
        rgba(14, 116, 144, 0.38);
    border-color: rgba(103, 232, 249, 0.62);
    box-shadow: inset 3px 0 0 #38bdf8, 0 10px 24px rgba(14, 116, 144, 0.12);
}

.portal-menu-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border: 1px solid rgba(125, 211, 252, 0.24);
    border-radius: 10px;
    color: #b7c7d8;
    background: rgba(15, 31, 50, 0.72);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.portal-menu-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-menu-card.is-active .portal-menu-icon {
    color: #ecfeff;
    border-color: rgba(103, 232, 249, 0.48);
    background: rgba(14, 116, 144, 0.48);
}

.portal-menu-logout {
    margin: 0;
}

.portal-menu-danger {
    width: 100%;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.34);
    border-color: rgba(248, 113, 113, 0.34);
}

.topbar h1,
.topbar h2,
.section-title,
h1,
h2 {
    letter-spacing: 0;
}

.button-list,
.briefing-list,
.airport-list,
.plane-list,
.menu {
    display: grid;
    gap: 10px;
}

.briefing-card,
.airport-card,
.plane-button,
.card,
.portal-link {
    width: 100%;
}

.plane-button,
.briefing-card,
.airport-card {
    min-height: 48px;
    border-radius: var(--radius-md);
}

.details-list {
    display: grid;
    gap: 10px;
}

.details-list details,
details {
    border-radius: var(--radius-md);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
        rgba(10, 29, 49, 0.62) !important;
    border: 1px solid rgba(214, 236, 255, 0.18);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.details-list summary,
summary {
    cursor: pointer;
    list-style: none;
    display: block;
    width: 100%;
    padding: 11px 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.075);
    border-radius: var(--radius-sm);
    text-align: center;
}

.rows {
    padding: 8px 18px 18px;
}

.row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.row:last-child {
    border-bottom: 0;
}

.value {
    font-weight: 700;
}

.memory {
    color: #ffec9f;
}

.status-badge,
.state-badge,
.plane-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    min-height: 24px;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    background:
        linear-gradient(145deg, rgba(125, 211, 252, 0.18), rgba(255, 255, 255, 0.035)),
        rgba(14, 116, 144, 0.18);
    color: #cffafe;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.status-badge.is-ok,
.state-badge.is-ok,
.plane-status.is-ok {
    border-color: rgba(74, 222, 128, 0.28);
    background: rgba(22, 101, 52, 0.24);
    color: #dcfce7;
}

.status-badge.is-warning,
.state-badge.is-warning,
.plane-status.is-warning {
    border-color: rgba(250, 204, 21, 0.28);
    background: rgba(133, 77, 14, 0.22);
    color: #fef9c3;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    border: 1px solid rgba(185, 216, 255, 0.92);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(237, 246, 255, 0.96)),
        rgba(241, 248, 255, 0.98);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px) saturate(145%);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    transition: transform 0.28s ease, background 0.28s ease;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
    transform: translateY(-2px);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(224, 240, 255, 0.98));
    outline: none;
}

.link-plain {
    color: #1d4e89;
    text-decoration: none;
    font-weight: 600;
}

.link-plain:hover,
.link-plain:focus-visible {
    color: #0b5fa5;
    text-decoration: underline;
    outline: none;
}

body.page-home .guide-card a:not(.button),
body.page-home .recent-guide-card a:not(.button),
body.page-home .home-value-card a:not(.button),
body.page-home .feature-card a:not(.button),
body.page-home .story-card a:not(.button),
body.page-home .contact-card a:not(.button),
body.page-public .guide-card a:not(.button),
body.page-public .recent-guide-card a:not(.button),
body.page-public .home-value-card a:not(.button),
body.page-public .feature-card a:not(.button),
body.page-public .story-card a:not(.button),
body.page-public .contact-card a:not(.button),
body.page-legal .legal-article a:not(.button),
body.page-legal .legal-section a:not(.button),
body.page-legal .legal-index a:not(.button),
body.page-legal-document .legal-article a:not(.button),
body.page-legal-document .legal-section a:not(.button),
body.page-legal-document .legal-index a:not(.button),
body.page-privacy .legal-article a:not(.button),
body.page-privacy .legal-section a:not(.button),
body.page-terms .legal-article a:not(.button),
body.page-terms .legal-section a:not(.button),
body.page-cookie .legal-article a:not(.button),
body.page-cookie .legal-section a:not(.button),
body.page-disclaimer .legal-article a:not(.button),
body.page-disclaimer .legal-section a:not(.button) {
    color: #1d4e89;
    font-weight: 600;
    text-decoration: none;
}

body.page-home .guide-card a:not(.button):hover,
body.page-home .guide-card a:not(.button):focus-visible,
body.page-home .recent-guide-card a:not(.button):hover,
body.page-home .recent-guide-card a:not(.button):focus-visible,
body.page-home .home-value-card a:not(.button):hover,
body.page-home .home-value-card a:not(.button):focus-visible,
body.page-home .feature-card a:not(.button):hover,
body.page-home .feature-card a:not(.button):focus-visible,
body.page-home .story-card a:not(.button):hover,
body.page-home .story-card a:not(.button):focus-visible,
body.page-home .contact-card a:not(.button):hover,
body.page-home .contact-card a:not(.button):focus-visible,
body.page-public .guide-card a:not(.button):hover,
body.page-public .guide-card a:not(.button):focus-visible,
body.page-public .recent-guide-card a:not(.button):hover,
body.page-public .recent-guide-card a:not(.button):focus-visible,
body.page-public .home-value-card a:not(.button):hover,
body.page-public .home-value-card a:not(.button):focus-visible,
body.page-public .feature-card a:not(.button):hover,
body.page-public .feature-card a:not(.button):focus-visible,
body.page-public .story-card a:not(.button):hover,
body.page-public .story-card a:not(.button):focus-visible,
body.page-public .contact-card a:not(.button):hover,
body.page-public .contact-card a:not(.button):focus-visible,
body.page-legal .legal-article a:not(.button):hover,
body.page-legal .legal-article a:not(.button):focus-visible,
body.page-legal .legal-section a:not(.button):hover,
body.page-legal .legal-section a:not(.button):focus-visible,
body.page-legal .legal-index a:not(.button):hover,
body.page-legal .legal-index a:not(.button):focus-visible,
body.page-legal-document .legal-article a:not(.button):hover,
body.page-legal-document .legal-article a:not(.button):focus-visible,
body.page-legal-document .legal-section a:not(.button):hover,
body.page-legal-document .legal-section a:not(.button):focus-visible,
body.page-legal-document .legal-index a:not(.button):hover,
body.page-legal-document .legal-index a:not(.button):focus-visible,
body.page-privacy .legal-article a:not(.button):hover,
body.page-privacy .legal-article a:not(.button):focus-visible,
body.page-privacy .legal-section a:not(.button):hover,
body.page-privacy .legal-section a:not(.button):focus-visible,
body.page-terms .legal-article a:not(.button):hover,
body.page-terms .legal-article a:not(.button):focus-visible,
body.page-terms .legal-section a:not(.button):hover,
body.page-terms .legal-section a:not(.button):focus-visible,
body.page-cookie .legal-article a:not(.button):hover,
body.page-cookie .legal-article a:not(.button):focus-visible,
body.page-cookie .legal-section a:not(.button):hover,
body.page-cookie .legal-section a:not(.button):focus-visible,
body.page-disclaimer .legal-article a:not(.button):hover,
body.page-disclaimer .legal-article a:not(.button):focus-visible,
body.page-disclaimer .legal-section a:not(.button):hover,
body.page-disclaimer .legal-section a:not(.button):focus-visible {
    color: #0b5fa5;
    text-decoration: underline;
    outline: none;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.delay-1 {
    transition-delay: 0.08s;
}

.delay-2 {
    transition-delay: 0.16s;
}

.delay-3 {
    transition-delay: 0.24s;
}

.delay-4 {
    transition-delay: 0.32s;
}

@keyframes floatAura {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(16px, -18px, 0) scale(1.04);
    }
}

@media (max-width: 900px) {
    body::before {
        left: -18vw;
    }

    body::after {
        right: -18vw;
    }
}

@media (max-width: 980px) {
    body {
        background-attachment: scroll;
        padding: 14px 12px 22px;
    }

    :root {
        --radius-xl: 12px;
        --radius-lg: 9px;
        --radius-md: 8px;
        --radius-sm: 6px;
    }

    .topbar {
        align-items: stretch;
    }

    .portal-nav-shell {
        align-items: center;
        gap: 6px;
        padding: 4px 6px;
    }

    .portal-brand {
        flex: 0 0 auto;
        min-width: 0;
    }

    .portal-brand-copy strong {
        font-size: 0.68rem;
        letter-spacing: 0.08em;
    }

    .portal-brand-copy span {
        font-size: 0.58rem;
    }

    .panel,
    .card,
    .cockpit-card,
    .user-bar,
    .footer-panel,
    .menu-card,
    .metric-card,
    .stat-card,
    .feature-card {
        padding: 9px;
    }

    .btn,
    .tab-button,
    .briefing-card,
    .airport-card,
    .plane-button,
    .home-top,
    .back,
    .button,
    a.button,
    .print-btn,
    .nav-link,
    .portal-link {
        width: auto;
        min-height: 32px;
    }

    .row {
        grid-template-columns: 24px 1fr;
    }

    .row .value {
        grid-column: 2;
    }

    body.page-aerei .row {
        grid-template-columns: 24px minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
    }

    body.page-aerei .row .value {
        grid-column: auto;
        text-align: right;
        white-space: nowrap;
    }

    body.page-aerei .row span:nth-child(2) {
        min-width: 0;
        font-size: 0.94rem;
        line-height: 1.25;
    }

    body.page-aerei .rows {
        padding-left: 12px;
        padding-right: 12px;
    }
}

    @media (max-width: 520px) {
        body::before,
        body::after {
            opacity: 0.65;
        }

    body {
        padding: 8px 6px 12px;
    }

        .site-shell,
        .container,
        .page-main,
        .page-stack {
            width: calc(100vw - 10px);
        }

        body.page-guide.page-public,
        body.page-guide {
            padding: 8px 4px 12px;
        }

        body.page-guide .legal-shell {
            width: calc(100vw - 10px) !important;
            gap: 10px;
        }

    h1 {
        font-size: 1.28rem;
        line-height: 1.12;
    }

    h2 {
        font-size: 0.98rem;
        line-height: 1.18;
    }

    .portal-nav-shell {
        top: 0;
    }

    .portal-brand-copy {
        display: block;
    }

    .portal-brand-mark {
        width: 26px;
        height: 26px;
    }

    .portal-brand-copy strong {
        max-width: 128px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .portal-menu-trigger,
    .portal-menu-close {
        min-height: 30px;
        padding: 4px 8px;
        font-size: 0.72rem;
    }

    .portal-menu-panel {
        width: calc(100vw - 10px);
        height: auto;
        max-height: 78dvh;
        top: 54px;
        bottom: auto;
        left: 50%;
        right: auto;
        padding: 8px;
        border-right: 1px solid var(--border);
        border-bottom: 0;
        border-radius: 16px;
        transform: translateX(-50%) translateY(-8px);
    }

    body.portal-menu-open .portal-menu-panel {
        transform: translateX(-50%) translateY(0);
    }

    .portal-menu-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .portal-menu-card {
        min-height: 44px;
        padding: 8px 9px;
    }

    .panel,
    .card,
    .cockpit-card,
    .user-bar,
    .footer-panel,
    .menu-card,
    .metric-card,
    .stat-card,
    .feature-card {
        padding: 6px;
    }

    .button-list,
    .briefing-list,
    .airport-list,
    .plane-list,
    .menu,
    .details-list {
        gap: 6px;
    }

    .briefing-card,
    .airport-card,
    .plane-button,
    .portal-link {
        min-height: 54px;
        padding: 6px 7px;
    }

    .metric-card,
    .stat-card,
    .feature-card {
        padding: 6px;
    }

    .topbar,
    .section,
    .panel,
    .card,
    .cockpit-card,
    .user-bar,
    .footer-panel,
    .menu-card,
    .metric-card,
    .stat-card,
    .feature-card {
        border-radius: 12px;
    }

    .section,
    .panel,
    .card,
    .cockpit-card,
    .user-bar,
    .footer-panel,
    .menu-card,
    .metric-card,
    .stat-card,
    .feature-card {
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    }

    label {
        font-size: 0.7rem;
    }

    .hint,
    .note,
    .section p,
    .section ul,
    .airport-card span,
    .briefing-card span,
    h3,
    .meta,
    .eyebrow,
    .field-hint {
        font-size: 0.82rem;
        line-height: 1.35;
    }

    .portal-menu-link,
    .button,
    a.button,
    .nav-link,
    .portal-link,
    .back,
    .home-top,
    .print-btn,
    .nav-pill,
    .action-chip,
    .tab-button {
        font-size: 0.8rem;
        min-height: 30px;
        padding: 6px 8px;
    }
}

@media (max-width: 390px) {
    body {
        padding: 6px 4px 10px;
    }

    .site-shell,
    .container,
    .page-main,
    .page-stack {
        width: calc(100vw - 8px);
    }

    h1 {
        font-size: 1.18rem;
    }

    h2 {
        font-size: 0.92rem;
    }

    .panel,
    .card,
    .cockpit-card,
    .user-bar,
    .footer-panel,
    .menu-card,
    .metric-card,
    .stat-card,
    .feature-card,
    .portal-card {
        padding: 5px;
        border-radius: 10px;
    }

    .button-list,
    .briefing-list,
    .airport-list,
    .plane-list,
    .menu,
    .details-list {
        gap: 5px;
    }

    .briefing-card,
    .airport-card,
    .plane-button,
    .portal-link,
    .home-top,
    .back,
    .button,
    a.button,
    .print-btn,
    .nav-link,
    .nav-pill,
    .action-chip,
    .tab-button {
        min-height: 28px;
        padding: 5px 7px;
        font-size: 0.76rem;
    }

    label {
        font-size: 0.66rem;
        gap: 4px;
    }

    .hint,
    .note,
    .section p,
    .section ul,
    .airport-card span,
    .briefing-card span,
    h3,
    .meta,
    .eyebrow,
    .field-hint {
        font-size: 0.78rem;
        line-height: 1.3;
    }

        .guide-preview,
        .guide-catalog-overview,
        .guide-archive-grid,
        .guide-archive-panel,
        .guide-author-card,
        .guide-section-head,
        .guide-controls,
        .guide-preview-group {
            padding: 10px !important;
            gap: 10px !important;
            border-radius: 14px !important;
        }

    .guide-preview-list {
        gap: 10px !important;
    }

    .guide-thumb,
    .guide-section-image .guide-section-svg,
    .guide-section-image .guide-section-img {
        min-height: 140px;
    }

    .guide-preview-list {
        gap: 10px !important;
    }

    .guide-filter-bar {
        gap: 6px;
    }

    .guide-filter-chip,
    .guide-directory-cta,
    .guide-card-cta,
    .guide-read-link {
        width: 100%;
        justify-content: center;
        min-height: 32px;
        font-size: 0.74rem;
    }
}

body:not(.page-index) .section-title {
    text-align: left !important;
}

body:not(.page-index) .btn,
body:not(.page-index) .button,
body:not(.page-index) a.button,
body:not(.page-index) .print-btn,
body:not(.page-index) .back,
body:not(.page-index) .action-chip {
    min-height: 36px;
    padding: 7px 10px;
}

body:not(.page-index) .status-badge,
body:not(.page-index) .state-badge,
body:not(.page-index) .plane-status,
body:not(.page-index) .flight-badge {
    min-height: 20px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.64rem;
}

@media (min-width: 961px) {
    body.page-aeropilot .aeropilot-shell,
    body.page-home .home-shell,
    body.page-dashboard .dashboard-shell,
    body.page-flightlog .container,
    body.page-flightlog-archive .container,
    body.page-logbook .page-shell,
    body.page-aerei .container,
    body.page-briefing .container,
    body.page-briefing-checklist .container,
    body.page-cklist .container,
    body.page-cartine .container,
    body.page-cartine .page-shell,
    body.page-cartine .shell,
    body.page-register .container,
    body.page-register .shell,
    body.page-public .site-shell,
    body.page-public .legal-shell,
    body.page-legal .legal-shell,
    body.page-legal-document.page-public .legal-shell,
    body.page-chi-sono.page-public .legal-shell,
    body.page-formazione.page-public .legal-shell,
    body.page-guide .legal-shell,
    body.page-contatti.page-public .legal-shell,
    body.page-privacy .legal-shell,
    body.page-allievi .students-shell,
    body.page-cockpit-istruttore .cockpit-shell,
    body.page-in-volo .flight-shell,
    body.page-link-utili .page-shell,
    body.page-custom-aereo .shell {
        width: 100% !important;
        max-width: none !important;
    }
}

@media (max-width: 960px) {
    body {
        padding: 12px 12px 20px;
        background-attachment: scroll;
    }

    .site-shell,
    .container,
    .page-main,
    .page-stack {
        width: 100%;
    }

    .site-shell,
    .container,
    .page-main,
    .page-stack {
        gap: 12px;
    }

    .section-header,
    .topbar,
    .home-nav,
    .home-actions,
    .account-strip,
    .actions,
    .tool-actions,
    .aeropilot-nav,
    .aeropilot-actions,
    .portal-grid,
    .links-grid,
    .tools-grid,
    .dashboard-header,
    .dashboard-links,
    .flight-status,
    .flight-actions,
    .time-grid,
    .students-hero,
    .cockpit-hero,
    .cockpit-sections,
    .cockpit-actions,
    .hero-panel,
    .privacy-summary,
    .terms-summary,
    .cookie-summary,
    .disclaimer-summary,
    .account-grid,
    .form-grid,
    .portal-shot-grid {
        grid-template-columns: 1fr !important;
        flex-direction: column;
        align-items: stretch;
    }

    .profile-card,
    .shot-top {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .student-form,
    .mission-form,
    .dashboard-links,
    .portal-grid,
    .links-grid,
    .tools-grid,
    .aeropilot-card-grid,
    .shot-metrics {
        grid-template-columns: 1fr;
    }

    .btn,
    .button,
    a.button,
    .print-btn,
    .back,
    .action-chip,
    .nav-pill,
    .nav-toggle,
    .nav-link,
    .portal-link,
    .tab-button,
    summary,
    .portal-menu-link {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .panel,
    .card,
    .cockpit-card,
    .user-bar,
    .footer-panel,
    .menu-card,
    .metric-card,
    .stat-card,
    .feature-card,
    .auth-shell,
    .auth-panel,
    .portal-card {
        border-radius: 18px;
    }
}
