/* Shared application styles. */

:root {
    --app-bg: #f3f6fb;
    --app-surface: #ffffff;
    --app-surface-alt: #eef3f8;
    --app-border: #d9e3f0;
    --app-text: #1c2736;
    --app-muted: #66768c;
    --app-primary: #1f4b8f;
    --app-primary-dark: #173768;
    --app-primary-soft: #dce8fb;
    --app-success-soft: #dff4ea;
    --app-warning-soft: #fff7db;
    --app-warning-border: #f1da8a;
    --app-warning-text: #7a5a00;
    --app-create-card-bg: linear-gradient(180deg, #f4fff5 0%, #e8f8ea 100%);
    --app-sidebar-card-bg: linear-gradient(180deg, rgba(31, 75, 143, 0.96) 0%, rgba(31, 75, 143, 0.58) 100%);
    --app-shadow: 0 20px 50px rgba(20, 41, 77, 0.08);
    --app-topbar-height: 72px;
    --app-sidebar-width: 280px;
    --app-sidebar-collapsed-width: 82px;
}

html {
    background-color: #f3f6fb;
}

html[data-app-theme="dark"] {
    background-color: #0f1724;
    color-scheme: dark;
}

body[data-app-theme="dark"] {
    --app-bg: #0f1724;
    --app-surface: #172131;
    --app-surface-alt: #1d293b;
    --app-border: #30415d;
    --app-text: #e7eefb;
    --app-muted: #a2b3cb;
    --app-primary: #8ab6ff;
    --app-primary-dark: #d3e3ff;
    --app-primary-soft: rgba(138, 182, 255, 0.16);
    --app-success-soft: rgba(37, 124, 78, 0.22);
    --app-warning-soft: linear-gradient(180deg, #4d3b14 0%, #3a2b10 100%);
    --app-warning-border: #8f6d1e;
    --app-warning-text: #ffe7a1;
    --app-create-card-bg: linear-gradient(180deg, #213550 0%, #182739 100%);
    --app-sidebar-card-bg: linear-gradient(180deg, rgba(38, 63, 97, 0.96) 0%, rgba(38, 63, 97, 0) 100%);
    --app-shadow: 0 22px 56px rgba(0, 0, 0, 0.34);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(31, 75, 143, 0.08), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, var(--app-bg) 100%);
    color: var(--app-text);
    font-family: "Aptos", "Segoe UI", sans-serif;
    overflow-x: hidden;
}

a {
    color: var(--app-primary);
}

body[data-app-theme="dark"] {
    background:
        radial-gradient(circle at top right, rgba(138, 182, 255, 0.12), transparent 28%),
        linear-gradient(180deg, #111a28 0%, var(--app-bg) 100%);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

body[data-app-theme="dark"] .topbar {
    background: rgba(12, 18, 29, 0.92);
}

.topbar .navbar {
    min-height: 72px;
}

.topbar-offcanvas {
    border-left: 1px solid var(--app-border);
}

body[data-app-theme="dark"] .topbar-offcanvas,
body[data-app-theme="dark"] .offcanvas,
body[data-app-theme="dark"] .modal-content,
body[data-app-theme="dark"] .dropdown-menu,
body[data-app-theme="dark"] .card,
body[data-app-theme="dark"] .alert,
body[data-app-theme="dark"] .table-responsive,
body[data-app-theme="dark"] .leaflet-popup-content-wrapper,
body[data-app-theme="dark"] .leaflet-popup-tip {
    background-color: var(--app-surface);
    color: var(--app-text);
    border-color: var(--app-border);
}

body[data-app-theme="dark"] .alert-light {
    background-color: var(--app-surface-alt);
    color: var(--app-text);
}

body[data-app-theme="dark"] .text-muted,
body[data-app-theme="dark"] .form-text,
body[data-app-theme="dark"] .muted-label,
body[data-app-theme="dark"] .site-footer-copy,
body[data-app-theme="dark"] .site-footer-rights,
body[data-app-theme="dark"] .site-footer-address,
body[data-app-theme="dark"] .policy-meta,
body[data-app-theme="dark"] .policy-copy,
body[data-app-theme="dark"] .policy-contact-label {
    color: var(--app-muted) !important;
}

body[data-app-theme="dark"] .topbar-header-link {
    color: #d5e2f7;
}

body[data-app-theme="dark"] .topbar-header-link:hover,
body[data-app-theme="dark"] .topbar-header-link:focus-visible,
body[data-app-theme="dark"] .topbar-header-link.active {
    color: #f6f9ff;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    text-decoration: none;
}

.app-brand-logo {
    display: block;
    width: auto;
    height: 42px;
}

body[data-app-theme="dark"] .app-brand-logo {
    filter: brightness(1.18) contrast(1.04) saturate(1.05);
}

.topbar-mobile-logbook {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: min(46vw, 16rem);
    overflow: hidden;
    color: var(--app-text);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-mobile-logbook > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-account-summary {
    width: 100%;
}

.topbar-account-link-row {
    max-width: 100%;
    justify-content: space-between;
}

.topbar-account-link-row > .fw-semibold {
    flex: 1 1 auto;
    text-align: left;
}

.topbar-header-link {
    color: var(--app-text);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}

.topbar-header-link:hover,
.topbar-header-link:focus-visible,
.topbar-header-link.active {
    color: var(--app-primary);
    text-decoration: none;
}

.topbar-account-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    color: var(--app-primary);
    text-decoration: none;
    background: rgba(31, 75, 143, 0.08);
    transition: background-color 0.18s ease, color 0.18s ease;
}

.topbar-account-link:hover,
.topbar-account-link:focus-visible,
.topbar-account-link.active {
    color: var(--app-primary-dark);
    background: rgba(31, 75, 143, 0.16);
}

@media (min-width: 992px) {
    .topbar-account-summary {
        width: auto;
    }

    .topbar-account-link-row {
        justify-content: flex-end;
    }

    .topbar-account-link-row > .fw-semibold {
        flex: 0 1 auto;
        text-align: inherit;
    }
}

.topbar-select {
    min-width: 170px;
}

.view-picker-dropdown {
    min-width: 170px;
}

.view-picker-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    width: 100%;
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 2.2rem 0.25rem 0.65rem;
    border: 1px solid var(--app-border);
    border-radius: 0.375rem;
    background: var(--app-surface);
    color: var(--app-text);
    box-shadow: inset 0 1px 2px rgba(28, 39, 54, 0.04);
}

.view-picker-toggle:hover,
.view-picker-toggle:focus,
.view-picker-toggle:active,
.view-picker-toggle.show {
    border-color: #86b7fe;
    background: var(--app-surface);
    color: var(--app-text);
}

.view-picker-toggle:focus,
.view-picker-toggle.show {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.view-picker-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.75rem;
    width: 1rem;
    height: 0.75rem;
    margin: 0;
    border: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1rem 0.75rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    transform: translateY(-50%);
}

.view-picker-menu {
    width: 100%;
    min-width: 100%;
    padding: 0.35rem;
    border: 1px solid var(--app-border);
    border-radius: 0.85rem;
    box-shadow: var(--app-shadow);
}

.enhanced-select-host {
    width: 100%;
}

.enhanced-select-dropdown {
    width: 100%;
}

.enhanced-select-toggle {
    width: 100%;
}

.enhanced-select-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.enhanced-select-label-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.enhanced-select-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.1rem;
    padding: 0.2rem 0.55rem;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.enhanced-select-meta-prefix {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #6c757d);
    white-space: nowrap;
}

.airport-timezone-status {
    min-height: 1.25rem;
}

.enhanced-select-option-icon {
    flex: 0 0 auto;
    object-fit: cover;
}

.enhanced-select-option-icon.is-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(31, 75, 143, 0.12);
}

.enhanced-select-menu {
    width: max-content;
    min-width: 100%;
    max-width: min(32rem, calc(100vw - 2rem));
    max-height: min(20rem, calc(100vh - 6rem));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.enhanced-select-toggle.is-invalid,
.enhanced-select-toggle.is-invalid:hover,
.enhanced-select-toggle.is-invalid:focus,
.enhanced-select-toggle.is-invalid.show {
    border-color: var(--bs-form-invalid-border-color, #dc3545);
}

.enhanced-select-toggle.is-disabled,
.enhanced-select-toggle:disabled {
    opacity: 0.65;
}

.enhanced-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body[data-app-theme="dark"] .view-picker-toggle,
body[data-app-theme="dark"] .form-control,
body[data-app-theme="dark"] .form-select,
body[data-app-theme="dark"] .dropdown-menu,
body[data-app-theme="dark"] .topbar-select {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

body[data-app-theme="dark"] .form-control:focus,
body[data-app-theme="dark"] .form-select:focus,
body[data-app-theme="dark"] .view-picker-toggle:focus,
body[data-app-theme="dark"] .view-picker-toggle.show {
    background: var(--app-surface);
    color: var(--app-text);
    border-color: #6fa6ff;
    box-shadow: 0 0 0 0.25rem rgba(111, 166, 255, 0.2);
}

body[data-app-theme="dark"] .view-picker-toggle::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23d7e3f7' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.view-picker-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 0.65rem;
    padding: 0.55rem 0.75rem;
    background: transparent;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-picker-item,
.view-picker-item span {
    color: var(--app-text);
}

.view-picker-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.view-picker-item.active,
.view-picker-item:hover,
.view-picker-item:focus {
    background: var(--app-primary-soft);
    color: var(--app-primary);
}

.view-picker-item.active span,
.view-picker-item:hover span,
.view-picker-item:focus span {
    color: inherit;
}

body[data-app-theme="dark"] .view-picker-item,
body[data-app-theme="dark"] .view-picker-item span {
    color: #e7eefb;
}

body[data-app-theme="dark"] .enhanced-select-meta-prefix {
    color: #9db7de;
}

body[data-app-theme="dark"] .enhanced-select-badge {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

body[data-app-theme="dark"] .view-picker-item.active,
body[data-app-theme="dark"] .view-picker-item:hover,
body[data-app-theme="dark"] .view-picker-item:focus {
    color: #f6f9ff;
}

body[data-app-theme="dark"] .view-picker-item.active span,
body[data-app-theme="dark"] .view-picker-item:hover span,
body[data-app-theme="dark"] .view-picker-item:focus span {
    color: inherit;
}

.view-flag-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(31, 75, 143, 0.12);
}

.logbook-type-icon {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
    object-fit: contain;
}

.logbook-type-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.logbook-type-icon-chip {
    background: #f8fbff;
    border-color: var(--app-border);
    color: var(--app-primary);
}

.profile-picker {
    width: 100%;
}

.profile-picker-toggle {
    min-height: calc(2.25rem + 2px);
    font-size: 1rem;
    width: 100%;
}

.profile-picker-select {
    min-height: calc(2.25rem + 2px);
    font-size: 1rem;
}

.flight-export-trigger {
    min-width: 2.75rem;
    padding-inline: 0.7rem;
}

.flight-export-ellipsis {
    display: inline-block;
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1;
    letter-spacing: 0.08em;
}

.flight-export-menu {
    min-width: 12rem;
    border: 1px solid var(--app-border);
    border-radius: 0.85rem;
    box-shadow: var(--app-shadow);
}

.flight-export-menu .dropdown-item.disabled,
.flight-export-menu .dropdown-item:disabled {
    opacity: 0.55;
}

body[data-app-theme="dark"] .flight-export-menu .dropdown-item {
    color: var(--app-text);
}

body[data-app-theme="dark"] .flight-export-menu .dropdown-item:hover,
body[data-app-theme="dark"] .flight-export-menu .dropdown-item:focus,
body[data-app-theme="dark"] .flight-export-menu .dropdown-item:active {
    background: var(--app-surface-alt);
    color: var(--app-text);
}

.logbook-create-card {
    background: var(--app-create-card-bg);
}

.logbook-card-body {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.logbook-card-body.is-inactive {
    opacity: 0.58;
}

.logbook-card-archive-note {
    max-width: 30rem;
}

.logbook-card-top-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

.logbook-card-header {
    padding-right: 3.5rem;
}

.logbook-card-form {
    flex: 1 1 auto;
}

.logbook-card-actions {
    margin-top: auto;
    padding-top: 5px;
}

[data-logbook-connector-check] {
    min-width: 3rem;
    height: calc(2rem + 2px);
    min-height: calc(2rem + 2px);
    max-height: calc(2rem + 2px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    flex: 0 0 auto;
    box-sizing: border-box;
    padding: 0.375rem 0.85rem;
    line-height: 1.5;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--bs-border-radius);
    background: transparent;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

[data-logbook-connector-check].is-success,
[data-logbook-connector-check].is-error {
    padding-inline: 0.55rem;
}

[data-logbook-connector-check].is-success {
    color: #157347;
    background: transparent;
    border-color: #7ed7a8;
    box-shadow: none;
}

[data-logbook-connector-check].is-error {
    color: #b42318;
    background: transparent;
    border-color: #f2a6a2;
    box-shadow: none;
}

[data-logbook-connector-check]:hover:not(:disabled):not(.is-success):not(.is-error),
[data-logbook-connector-check]:focus-visible:not(:disabled):not(.is-success):not(.is-error) {
    box-shadow: 0 0 0 0.2rem rgba(11, 72, 107, 0.12);
}

.logbook-connector-check-icon {
    display: inline-flex;
    width: 1.2rem;
    height: 1.2rem;
}

.logbook-connector-check-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

[data-logbook-connector-check].is-success .logbook-connector-check-icon path,
[data-logbook-connector-check].is-error .logbook-connector-check-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logbook-initial-values-modal .modal-dialog {
    max-width: 760px;
}

.logbook-initial-values-modal .modal-content {
    max-height: min(78vh, 700px);
    overflow: hidden;
}

.logbook-initial-values-modal .modal-body {
    min-height: 0;
    overflow-y: auto;
}

.logbook-initial-values-table th {
    background: #f8fbff;
}

body[data-app-theme="dark"] .logbook-initial-values-table th {
    background: #1b2536;
    color: var(--app-text);
    border-color: var(--app-border);
}

.logbook-initial-values-input-column {
    width: 220px;
    min-width: 220px;
}

.logbook-initial-values-input-cell .form-control {
    min-width: 160px;
}

.topbar-mobile-nav .nav-link {
    margin-bottom: 0;
}

.topbar-mobile-sidebar,
.topbar-mobile-nav {
    width: 100%;
    min-width: 0;
}

.topbar-mobile-nav .nav-link {
    width: 100%;
    white-space: normal;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--app-sidebar-width) minmax(0, 1fr);
    flex: 1 0 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    transition: grid-template-columns 0.18s ease;
}

.app-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem 1rem 2rem;
    border-right: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.66);
    position: sticky;
    top: var(--app-topbar-height);
    align-self: start;
    height: calc(100vh - var(--app-topbar-height));
    overflow: hidden;
    scrollbar-gutter: stable;
}

body[data-app-theme="dark"] .app-sidebar {
    background: rgba(16, 24, 37, 0.8);
}

.sidebar-card {
    flex-shrink: 0;
    min-width: 0;
    padding: 1.25rem;
    border-radius: 1rem;
    background: var(--app-sidebar-card-bg);
    color: #fff;
    box-shadow: var(--app-shadow);
    margin-bottom: 1.25rem;
}

.sidebar-collapse-toggle {
    position: absolute;
    top: 0rem;
    right: -0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--app-primary);
    line-height: 1;
    z-index: 2;
    transition: color 0.18s ease, transform 0.18s ease;
}

.sidebar-collapse-toggle:hover,
.sidebar-collapse-toggle:focus-visible {
    color: var(--app-primary-dark);
}

.sidebar-collapse-toggle:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.18rem rgba(31, 75, 143, 0.18);
}

body[data-app-theme="dark"] .sidebar-collapse-toggle {
    color: #d5e2f7;
}

body[data-app-theme="dark"] .sidebar-collapse-toggle:hover,
body[data-app-theme="dark"] .sidebar-collapse-toggle:focus-visible {
    color: #f6f9ff;
}

.app-sidebar-nav {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-sidebar-nav::-webkit-scrollbar {
    display: none;
}

.app-sidebar-nav .nav-link {
    flex-shrink: 0;
    width: 100%;
}

.sidebar-scroll-indicators {
    position: absolute;
    right: 0.65rem;
    bottom: 0.75rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    pointer-events: none;
}

.sidebar-scroll-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--app-primary);
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.2rem);
    transition: color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.sidebar-scroll-indicator.is-visible {
    opacity: 0.88;
    pointer-events: auto;
    transform: translateY(0);
}

.sidebar-scroll-indicator:hover,
.sidebar-scroll-indicator:focus-visible {
    color: var(--app-primary-dark);
}

.sidebar-scroll-indicator:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.18rem rgba(31, 75, 143, 0.18);
}

body[data-app-theme="dark"] .sidebar-scroll-indicator {
    color: #d5e2f7;
}

body[data-app-theme="dark"] .sidebar-scroll-indicator:hover,
body[data-app-theme="dark"] .sidebar-scroll-indicator:focus-visible {
    color: #f6f9ff;
}

@media (min-width: 1200px) {
    html.is-sidebar-collapsed .app-shell,
    .app-shell.is-sidebar-collapsed {
        grid-template-columns: var(--app-sidebar-collapsed-width) minmax(0, 1fr);
    }

    html.is-sidebar-collapsed .app-sidebar,
    .app-shell.is-sidebar-collapsed .app-sidebar {
        padding-inline: 0.75rem;
    }

    html.is-sidebar-collapsed .sidebar-card,
    html.is-sidebar-collapsed .sidebar-upgrade-card,
    .app-shell.is-sidebar-collapsed .sidebar-card,
    .app-shell.is-sidebar-collapsed .sidebar-upgrade-card {
        display: none;
    }

    html.is-sidebar-collapsed .sidebar-collapse-toggle,
    .app-shell.is-sidebar-collapsed .sidebar-collapse-toggle {
        right: 0rem;
    }

    html.is-sidebar-collapsed .sidebar-scroll-indicators,
    .app-shell.is-sidebar-collapsed .sidebar-scroll-indicators {
        right: 0.15rem;
    }

    html.is-sidebar-collapsed .app-sidebar-nav,
    .app-shell.is-sidebar-collapsed .app-sidebar-nav {
        padding-right: 0;
        scrollbar-gutter: auto;
    }

    html.is-sidebar-collapsed .app-sidebar-nav .nav-link,
    .app-shell.is-sidebar-collapsed .app-sidebar-nav .nav-link {
        justify-content: center;
        gap: 0;
        min-height: 2.8rem;
        padding: 0.7rem;
    }

    html.is-sidebar-collapsed .app-sidebar-nav .nav-link:hover,
    html.is-sidebar-collapsed .app-sidebar-nav .nav-link:focus-visible,
    .app-shell.is-sidebar-collapsed .app-sidebar-nav .nav-link:hover,
    .app-shell.is-sidebar-collapsed .app-sidebar-nav .nav-link:focus-visible {
        overflow: visible;
    }

    html.is-sidebar-collapsed .app-sidebar-nav .app-nav-icon,
    .app-shell.is-sidebar-collapsed .app-sidebar-nav .app-nav-icon {
        width: 1.45rem;
        min-width: 1.45rem;
    }

    html.is-sidebar-collapsed .app-sidebar-nav .app-nav-label,
    .app-shell.is-sidebar-collapsed .app-sidebar-nav .app-nav-label {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    .app-shell.is-sidebar-collapsed .app-nav-separator {
        margin-inline: 0.35rem;
    }
}

.sidebar-upgrade-card {
    flex-shrink: 0;
    min-width: 0;
    margin-top: 1rem;
    padding: 1rem;
    border: 0;
    border-radius: 0.3rem;
    background: linear-gradient(180deg, #fff7c2 0%, #ffe58a 100%);
    box-shadow: 0 14px 34px rgba(20, 41, 77, 0.07);
}

body[data-app-theme="dark"] .sidebar-upgrade-card {
    background: linear-gradient(180deg, #5d4a1d 0%, #3f310f 100%);
    box-shadow: none;
}

.topbar-mobile-sidebar .sidebar-upgrade-card {
    margin-top: 0.75rem;
    padding: 0.85rem;
    box-shadow: none;
}

.sidebar-upgrade-title {
    color: var(--app-text);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.35rem;
}

.sidebar-upgrade-text {
    color: var(--app-muted);
    font-size: 0.78rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.sidebar-upgrade-action {
    width: 100%;
    font-size: 0.78rem;
    font-weight: 600;
}

.sidebar-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

.sidebar-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.sidebar-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.app-nav .nav-link {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 1rem;
    color: var(--app-text);
    font-weight: 600;
    border-radius: 0.85rem;
    padding: 0.6rem 1rem;
    margin-bottom: 0.25rem;
}

.app-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    min-width: 1.45rem;
    font-size: 0.98rem;
    line-height: 1;
    color: rgba(31, 75, 143, 0.58);
}

.app-nav-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.app-nav .nav-link:hover .app-nav-icon,
.app-nav .nav-link.active .app-nav-icon {
    color: rgba(31, 75, 143, 0.8);
}

.app-nav .nav-link:hover,
.app-nav .nav-link.active {
    background: var(--app-primary-soft);
    color: var(--app-primary);
}

body[data-app-theme="dark"] .app-nav .nav-link {
    color: #d5e2f7;
}

body[data-app-theme="dark"] .app-nav-icon {
    color: rgba(213, 226, 247, 0.6);
}

body[data-app-theme="dark"] .app-nav .nav-link:hover,
body[data-app-theme="dark"] .app-nav .nav-link.active {
    background: rgba(138, 182, 255, 0.2);
    color: #f6f9ff;
    box-shadow: inset 0 0 0 1px rgba(138, 182, 255, 0.22);
}

body[data-app-theme="dark"] .app-nav .nav-link:hover .app-nav-icon,
body[data-app-theme="dark"] .app-nav .nav-link.active .app-nav-icon {
    color: rgba(246, 249, 255, 0.82);
}

.app-nav-separator {
    height: 1px;
    margin: 0.55rem 0 0.75rem;
    background: linear-gradient(90deg, rgba(31, 75, 143, 0), rgba(31, 75, 143, 0.22), rgba(31, 75, 143, 0));
}

.app-main {
    flex: 1 0 auto;
    padding: 2rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.auth-main {
    flex: 1 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    width: 100%;
    max-width: 100%;
}

.auth-card {
    width: min(100%, 460px);
    border: 0;
    border-radius: 1.25rem;
    box-shadow: var(--app-shadow);
    overflow: hidden;
}

.contact-card {
    width: min(100%, 720px);
}

.contact-page-shell {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}

.contact-form-card {
    border: 0;
    border-radius: 1.25rem;
    box-shadow: var(--app-shadow);
}

.contact-message-field {
    min-height: 12rem;
}

@media (min-width: 992px) {
    .contact-card {
        width: min(100%, 480px);
    }

    .contact-card .auth-card-brand {
        min-height: 96px;
        padding: 0.65rem 1rem 0.35rem;
    }

    .contact-card .card-body {
        padding: 1.5rem !important;
    }

    .contact-card .contact-message-field {
        min-height: 7rem;
        height: 7rem;
    }

    .contact-card .mb-4 {
        margin-bottom: 1rem !important;
    }

    .contact-card .d-grid.gap-3 {
        gap: 0.85rem !important;
    }
}

.auth-card-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: 0.9rem 1.25rem 0.5rem;
    background:
        radial-gradient(circle at top center, rgba(31, 75, 143, 0.1), transparent 60%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(31, 75, 143, 0.08);
    overflow: hidden;
}

body[data-app-theme="dark"] .auth-card-brand {
    background:
        radial-gradient(circle at top center, rgba(138, 182, 255, 0.14), transparent 60%),
        linear-gradient(180deg, #172131 0%, #111a28 100%);
    border-bottom-color: rgba(138, 182, 255, 0.1);
}

.auth-card-brand-image {
    display: block;
    width: calc(100% + 4rem);
    max-width: none;
    height: auto;
    margin: -0.85rem 0 -1.8rem;
}

.plan-page-shell {
    width: 100%;
    max-width: 76rem;
    margin: 0 auto;
}

.page-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
    min-width: 0;
}

.page-hero > * {
    min-width: 0;
}

.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: flex-start;
    flex-shrink: 0;
}

.page-hero-actions .btn {
    white-space: nowrap;
}

.page-eyebrow {
    color: var(--app-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-title {
    font-size: clamp(1.8rem, 2vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    overflow-wrap: anywhere;
}

.page-copy {
    color: var(--app-muted);
    max-width: 60rem;
    margin-bottom: 0;
}

.stat-card,
.flight-list-card,
.detail-card {
    border: 0;
    border-radius: 1.1rem;
    box-shadow: var(--app-shadow);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.certificate-alert-card {
    border: 1px solid transparent;
    border-radius: 1rem;
}

.certificate-alert-card-openable {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.certificate-alert-card-openable:hover,
.certificate-alert-card-openable:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.12);
}

.certificate-alert-days-value {
    color: #7a5a00;
    line-height: 1;
}

.certificate-alert-days-label {
    color: #7a5a00;
    opacity: 0.9;
}

.certificate-alert-icon {
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    object-fit: contain;
}

.certificate-alert-card-expiring {
    background: #fff7db;
    border-color: #f1da8a;
}

.certificate-alert-card-expired {
    background: #f8d7da;
    border-color: #e6a8ad;
}

body[data-app-theme="dark"] .certificate-alert-card-expiring {
    background: linear-gradient(180deg, #4b3a16 0%, #34280f 100%);
    border-color: #8d6a1c;
}

body[data-app-theme="dark"] .certificate-alert-card-expiring .certificate-alert-days-value {
    color: #ffe7a1;
}

body[data-app-theme="dark"] .certificate-alert-card-expiring .certificate-alert-days-label {
    color: #f3d884;
}

body[data-app-theme="dark"] .certificate-alert-card-expired {
    background: linear-gradient(180deg, #4f2028 0%, #39161d 100%);
    border-color: #9f4352;
}

body[data-app-theme="dark"] .certificate-alert-card-expiring .badge.text-dark.bg-white.border {
    background-color: #a97d1f !important;
    color: #fff8e1 !important;
    border-color: #d9ab43 !important;
}

body[data-app-theme="dark"] .certificate-alert-card-expired .badge.text-dark.bg-white.border {
    background-color: #b8485b !important;
    color: #fff1f3 !important;
    border-color: #de6d80 !important;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    color: var(--app-muted);
    font-weight: 600;
}

.stat-card-warning {
    background: var(--app-warning-soft);
    border: 1px solid var(--app-warning-border);
}

.stat-card-link {
    color: inherit;
}

.stat-card-link:hover,
.stat-card-link:focus-visible {
    color: inherit;
}

.stat-card-warning .stat-label,
.stat-card-warning .stat-card-copy {
    color: var(--app-warning-text);
}

.btn-logbook-delete {
    --bs-btn-color: #fff;
    --bs-btn-bg: #c44f5a;
    --bs-btn-border-color: #c44f5a;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #ae414b;
    --bs-btn-hover-border-color: #a23b45;
    --bs-btn-focus-shadow-rgb: 196, 79, 90;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #963640;
    --bs-btn-active-border-color: #8c313b;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #d69aa0;
    --bs-btn-disabled-border-color: #d69aa0;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.toolbar form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.flight-list-toolbar {
    align-items: flex-end;
}

[data-flight-search-toggle].active {
    background: var(--app-primary-soft);
    border-color: rgba(31, 75, 143, 0.22);
    color: var(--app-primary);
}

.flight-columns-manager {
    max-height: min(55vh, 26rem);
    overflow-y: auto;
}

.flight-columns-manager-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.flight-columns-manager-item.active {
    background: var(--app-primary-soft);
    color: var(--app-primary);
    border-color: rgba(31, 75, 143, 0.18);
}

.table-card-header {
    padding: 1.25rem 1.25rem 0;
}

.muted-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    color: var(--app-muted);
    font-weight: 700;
}

body[data-app-theme="dark"] .logbook-card-body.bg-light-subtle,
body[data-app-theme="dark"] .detail-card .bg-light-subtle.border.rounded-3 {
    background: linear-gradient(180deg, #1b2738 0%, #172131 100%) !important;
    border-color: rgba(138, 182, 255, 0.16) !important;
    box-shadow: inset 0 0 0 1px rgba(138, 182, 255, 0.05);
}

.site-footer {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
}

body[data-app-theme="dark"] .site-footer {
    background: rgba(12, 18, 29, 0.9);
    border-color: var(--app-border) !important;
}

.site-footer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) auto;
    gap: 1rem 1.5rem;
    align-items: end;
    padding: 1rem 0 1.15rem;
}

.site-footer-brand {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.site-footer-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--app-primary-dark);
    margin-bottom: 0.3rem;
}

body[data-app-theme="dark"] .site-footer-title {
    color: var(--app-primary-dark);
}

.site-footer-copy,
.site-footer-rights,
.site-footer-address {
    color: var(--app-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.site-footer-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.site-footer-version {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--app-primary-soft);
    color: var(--app-primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    max-width: 100%;
}

.site-footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem 1rem;
    min-width: 0;
    margin-top: 0.15rem;
}

.site-footer-legal-label {
    color: var(--app-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer-link {
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

body[data-app-theme="dark"] .site-footer-link {
    color: var(--app-primary);
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
    text-decoration: underline;
}

.site-footer-trustlogo-shell {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    grid-column: 2;
    grid-row: 3;
    margin-top: 0;
    padding: 0;
    background: transparent;
}

#comodoTL {
    display: none !important;
}

.site-footer-trustlogo-shell > div[id^="tl_popup"] {
    background-color: transparent !important;
}

.site-footer-trustlogo-shell > a:first-of-type {
    display: inline-block;
    text-decoration: none;
}

@media (max-width: 1199.98px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        display: none;
    }

    .app-main {
        padding: 1rem;
    }

    .topbar-mobile-nav .nav-link {
        padding: 0.7rem 0.9rem;
    }

    .topbar-mobile-nav .app-nav-icon {
        width: 1.3rem;
        min-width: 1.3rem;
        font-size: 0.92rem;
    }

    .site-footer-shell {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .site-footer-brand,
    .site-footer-meta,
    .site-footer-legal,
    .site-footer-trustlogo-shell {
        grid-column: 1;
        grid-row: auto;
    }

    .site-footer-meta,
    .site-footer-legal,
    .site-footer-trustlogo-shell {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .site-footer-version {
        white-space: normal;
        justify-content: flex-start;
    }
}

@media (min-width: 1200px) {
    [data-logbook-management-root] > .logbook-card-item {
        flex: 0 0 22rem;
        width: 22rem;
        max-width: 100%;
    }

    [data-logbook-management-root] .logbook-card-form > [data-logbook-panel="main"] > .row > .col-lg-6 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    [data-logbook-management-root] .logbook-card-form fieldset > [data-logbook-panel="main"] > .row > .col-lg-6 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    [data-aircraft-catalog-root] > .logbook-card-item {
        flex: 0 0 22rem;
        width: 22rem;
        max-width: 100%;
    }

    [data-airport-catalog-root] > .logbook-card-item {
        flex: 0 0 22rem;
        width: 22rem;
        max-width: 100%;
    }
}

.policy-contact-label {
    margin-bottom: 0.2rem;
    color: var(--app-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 991.98px) {
    .app-main .row > [class*="col-md-"],
    .app-main form > .row > [class*="col-md-"],
    .auth-main .row > [class*="col-md-"],
    .auth-main form > .row > [class*="col-md-"] {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    .topbar .navbar-toggler {
        padding: 0.3rem 0.5rem;
        font-size: 1.05rem;
        border: 0;
        border-radius: 0;
        margin-right: -0.5rem;
    }

    .topbar .navbar-toggler:focus,
    .topbar .navbar-toggler:active,
    .topbar .navbar-toggler:focus-visible {
        outline: 0;
        box-shadow: none;
    }

    .topbar .navbar-toggler-icon {
        width: 1.25em;
        height: 1.25em;
    }

    body[data-app-theme="dark"] .topbar .navbar-toggler {
        color: #eef5ff;
    }

    body[data-app-theme="dark"] .topbar .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28239, 246, 255, 0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    body[data-app-theme="dark"] .topbar-offcanvas .btn-close {
        filter: invert(1) grayscale(100%) brightness(220%);
        opacity: 0.92;
    }

    body[data-app-theme="dark"] .topbar-offcanvas .btn-close:hover,
    body[data-app-theme="dark"] .topbar-offcanvas .btn-close:focus-visible {
        opacity: 1;
    }

    .topbar-offcanvas {
        width: min(88vw, 420px);
        max-width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
    }

    .topbar-offcanvas .offcanvas-body {
        align-items: stretch;
        justify-content: flex-start;
        padding-top: 0.5rem;
        overflow-y: auto;
    }

    .topbar-offcanvas .topbar-language-form,
    .topbar-offcanvas .view-picker {
        width: 100%;
    }

    .topbar-offcanvas .topbar-language-form,
    .topbar-offcanvas .view-picker {
        flex-direction: column;
        align-items: stretch !important;
    }

    .topbar-offcanvas .view-picker .dropdown,
    .topbar-offcanvas .view-picker .dropdown-toggle {
        width: 100%;
    }

    .topbar-offcanvas .topbar-select.view-picker-toggle.btn.btn-sm {
        --bs-btn-padding-y: 0.5rem;
        --bs-btn-padding-x: 0.85rem;
        --bs-btn-font-size: 1rem;
        height: 3rem !important;
        min-height: 3rem !important;
        padding: 0.65rem 2.6rem 0.65rem 0.95rem !important;
        line-height: 1.25 !important;
        border-radius: 0.75rem;
        -webkit-appearance: none;
        appearance: none;
    }

    .topbar-offcanvas .topbar-select.view-picker-toggle::after {
        right: 0.85rem;
    }

    .topbar-offcanvas .view-picker-menu .view-picker-item {
        min-height: 3rem;
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
        font-size: 1rem;
    }

    .topbar-offcanvas .text-lg-end {
        text-align: left;
    }

    .topbar-offcanvas .topbar-account-link-row {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .topbar-offcanvas .topbar-account-link-row > .fw-semibold {
        flex: 1 1 auto;
        min-width: 0;
    }

    .topbar-offcanvas .topbar-account-link-row > .topbar-header-link {
        flex: 0 0 100%;
        width: 100%;
        margin-top: 0.2rem;
    }

    .app-main {
        padding: 1rem;
        width: 100%;
        max-width: 100%;
    }

    .auth-main {
        width: 100%;
        max-width: 100%;
    }

    .app-main > section,
    .app-main > div,
    .app-main > form,
    .auth-main > section,
    .auth-main > div,
    .auth-main > form {
        width: 100%;
        max-width: 100%;
    }

    .site-footer-shell {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .site-footer-brand,
    .site-footer-meta,
    .site-footer-legal,
    .site-footer-trustlogo-shell {
        grid-column: 1;
        grid-row: auto;
    }

    .site-footer-meta,
    .site-footer-legal,
    .site-footer-trustlogo-shell {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .app-brand-logo {
        height: 36px;
    }

    .topbar .container-fluid {
        gap: 0.75rem;
    }

    .topbar-mobile-logbook {
        max-width: min(50vw, 16rem);
    }

    .auth-card-brand {
        min-height: 160px;
        padding-inline: 1rem;
    }

    .auth-card-brand-image {
        width: calc(100% + 3rem);
        margin-bottom: -1.35rem;
    }

    .plan-pane-actions {
        max-width: none;
    }

    .page-hero,
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .flight-table-shell thead .flight-action-cell {
        min-width: 2.2rem;
        width: 2.2rem;
        padding: 0;
        color: transparent;
        box-shadow: none;
    }

    .flight-table-shell tbody td.flight-action-cell {
        position: sticky;
        right: 0;
        z-index: 7;
        min-width: 2.2rem;
        width: 2.2rem;
        padding: 0.35rem 0.15rem 0.35rem 0.05rem;
        overflow: visible;
        background: var(--app-surface);
        box-shadow: -10px 0 18px rgba(20, 41, 77, 0.08);
    }

    .flight-action-toggle {
        display: inline-flex;
    }

    .flight-table-shell tbody td.flight-action-cell .flight-row-actions {
        position: absolute;
        top: 50%;
        right: calc(100% - 0.25rem);
        z-index: 8;
        padding: 0.35rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--app-shadow);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-50%) scale(0.96);
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    }

    body[data-app-theme="dark"] .flight-action-toggle {
        border-color: rgba(158, 179, 212, 0.34);
        background: #223149;
        color: #dbe7ff;
    }

    body[data-app-theme="dark"] .flight-action-toggle:hover,
    body[data-app-theme="dark"] .flight-action-toggle:focus {
        border-color: rgba(120, 173, 255, 0.55);
        background: #2a3a54;
        color: #eff5ff;
    }

    body[data-app-theme="dark"] .flight-table-shell tbody td.flight-action-cell {
        background: var(--app-surface);
        box-shadow: -10px 0 18px rgba(0, 0, 0, 0.28);
    }

    body[data-app-theme="dark"] .flight-table-shell tbody td.flight-action-cell .flight-row-actions {
        background: rgba(27, 37, 54, 0.98);
        box-shadow: 0 16px 30px rgba(0, 0, 0, 0.36);
    }

    body[data-app-theme="dark"] .flight-table-shell tbody td.flight-action-cell .flight-row-actions .flight-icon-btn.btn-outline-secondary {
        border-color: rgba(158, 179, 212, 0.34);
        background: #223149;
        color: #dbe7ff;
    }

    body[data-app-theme="dark"] .flight-table-shell tbody td.flight-action-cell .flight-row-actions .flight-icon-btn.btn-outline-secondary:hover,
    body[data-app-theme="dark"] .flight-table-shell tbody td.flight-action-cell .flight-row-actions .flight-icon-btn.btn-outline-secondary:focus {
        border-color: rgba(120, 173, 255, 0.55);
        background: #2a3a54;
        color: #eff5ff;
    }

    body[data-app-theme="dark"] .flight-table-shell tbody td.flight-action-cell .flight-row-actions .flight-icon-btn.btn-outline-primary {
        background: rgba(13, 110, 253, 0.18);
        color: #8eb8ff;
        border-color: rgba(84, 148, 255, 0.45);
    }

    body[data-app-theme="dark"] .flight-table-shell tbody td.flight-action-cell .flight-row-actions .flight-icon-btn.btn-outline-primary:hover,
    body[data-app-theme="dark"] .flight-table-shell tbody td.flight-action-cell .flight-row-actions .flight-icon-btn.btn-outline-primary:focus {
        background: rgba(13, 110, 253, 0.28);
        color: #dbe9ff;
        border-color: rgba(120, 173, 255, 0.7);
    }

    body[data-app-theme="dark"] .flight-table-shell tbody td.flight-action-cell .flight-row-actions .flight-icon-btn.btn-outline-danger {
        background: rgba(220, 53, 69, 0.16);
        color: #ffb0b8;
        border-color: rgba(255, 128, 143, 0.4);
    }

    body[data-app-theme="dark"] .flight-table-shell tbody td.flight-action-cell .flight-row-actions .flight-icon-btn.btn-outline-danger:hover,
    body[data-app-theme="dark"] .flight-table-shell tbody td.flight-action-cell .flight-row-actions .flight-icon-btn.btn-outline-danger:focus {
        background: rgba(220, 53, 69, 0.24);
        color: #ffd6db;
        border-color: rgba(255, 160, 172, 0.6);
    }

    .flight-table-shell tbody tr.is-actions-open td.flight-action-cell .flight-row-actions {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(-50%) scale(1);
    }

    .flight-table-shell tbody td.flight-action-cell .flight-row-actions form {
        display: inline-flex;
    }

    .flight-table-shell tbody td.flight-action-cell .flight-row-actions .flight-icon-btn {
        flex: 0 0 auto;
    }
}

@media (max-width: 767.98px) {
    .topbar-offcanvas {
        width: 100vw;
        border-left: 0;
    }

    .app-main,
    .auth-main {
        padding: 1.25rem;
        min-width: 0;
    }

    .auth-main {
        min-height: 0;
    }

    .app-main > .row,
    .app-main > form > .row,
    .auth-main > .row,
    .auth-main > form > .row {
        margin-right: 0;
        margin-left: 0;
        max-width: 100%;
    }

    .app-main > .row > *,
    .app-main > form > .row > *,
    .auth-main > .row > *,
    .auth-main > form > .row > * {
        padding-right: 0;
        padding-left: 0;
        max-width: 100%;
    }

    .app-main > section,
    .app-main > div,
    .app-main > form,
    .auth-main > section,
    .auth-main > div,
    .auth-main > form {
        max-width: 100%;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    [data-flight-list-page] .flight-list-toolbar-actions {
        display: grid !important;
        grid-template-columns: repeat(3, auto);
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    [data-flight-list-page] .flight-list-toolbar-actions > .btn {
        width: auto;
        min-width: 0;
        white-space: nowrap;
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }

    [data-flight-list-page] [data-flight-pagination-list] {
        justify-content: flex-start;
    }

    .aircraft-photo-card {
        width: 7.5rem;
        min-width: 7.5rem;
        height: 7.5rem;
    }

    .table-responsive {
        border-radius: 1rem;
    }

    .recent-flights-view-badge {
        padding: 0.4rem 0.65rem;
        font-size: 0.74rem;
    }

    .site-footer-copy {
        max-width: 100%;
    }

    .site-footer-shell {
        gap: 0.85rem;
        padding: 0.9rem 0 1rem;
    }

    .site-footer-version {
        font-size: 0.74rem;
        padding: 0.32rem 0.65rem;
    }

    .site-footer-legal {
        gap: 0.35rem 0.85rem;
    }

    .policy-contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    [data-flight-list-page] .flight-list-toolbar-actions {
        display: grid !important;
        grid-template-columns: repeat(3, auto);
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    [data-flight-list-page] .flight-list-toolbar-actions > .btn {
        width: auto;
        min-width: 0;
        white-space: nowrap;
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }
}

