:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --sidebar: #0f172a;
    --sidebar-alt: #1e293b;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --accent: #e11d48;
    --accent-dark: #be123c;
    --accent-soft: #ffe4e6;
    --green: #10b981;
    --green-soft: #d1fae5;
    --yellow: #f59e0b;
    --yellow-soft: #fef3c7;
    --red: #ef4444;
    --red-soft: #fee2e2;
    --gray: #475569;
    --gray-soft: #f1f5f9;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --shadow: 0 10px 28px rgba(16, 24, 40, 0.07);
    --shadow-soft: 0 2px 10px rgba(16, 24, 40, 0.05);
    --touch-target: 44px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Manrope", "Nunito Sans", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 100% -20%, rgba(148, 163, 184, 0.12) 0, transparent 38%),
        var(--bg);
    color: var(--text);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
.button-link,
.topbar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: var(--shadow-soft);
    min-height: var(--touch-target);
}

button:hover,
.button-link:hover,
.topbar-action:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(149, 25, 37, 0.22);
}

button:focus-visible,
.button-link:focus-visible,
.topbar-action:focus-visible,
.nav a:focus-visible,
.nav-group-toggle:focus-visible,
.actions a:focus-visible,
.link-danger:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(189, 31, 45, 0.24);
    outline-offset: 2px;
}

.button-link.secondary {
    background: #eef2f7;
    color: var(--text);
    box-shadow: none;
    border: 1px solid var(--border);
}

.button-link.secondary:hover {
    background: #e4eaf3;
    box-shadow: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 264px 1fr;
    min-height: 100vh;
    align-items: start;
}

.sidebar {
    background: var(--sidebar);
    color: #d6deeb;
    padding: 18px 16px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100vh;
    min-height: 100vh;
    min-height: 100dvh;
    position: sticky;
    top: 0;
    overflow: hidden;
    touch-action: pan-y;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.16);
}

.sidebar-top {
    padding: 4px 8px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-wrap {
    display: grid;
    gap: 6px;
}

.brand-logo,
.login-brand {
    font-size: 34px;
    font-style: italic;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.brand-logo {
    font-size: 28px;
}

.brand-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.brand-image-sidebar {
    width: 170px;
    filter: brightness(0) invert(1);
}

.brand-image-login {
    width: 240px;
    margin: 0 auto 8px;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    overflow: hidden;
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.03em;
    flex: 0 0 auto;
}

.avatar-expiry {
    --avatar-expiry-color: #cbd5e1;
    box-shadow: 0 0 0 2px var(--avatar-expiry-color);
}

.avatar-expiry--neutral {
    --avatar-expiry-color: #cbd5e1;
}

.avatar-expiry--safe {
    --avatar-expiry-color: #16a34a;
}

.avatar-expiry--warning-90 {
    --avatar-expiry-color: #facc15;
}

.avatar-expiry--warning-60 {
    --avatar-expiry-color: #f97316;
}

.avatar-expiry--warning-30,
.avatar-expiry--warning-15 {
    --avatar-expiry-color: #dc2626;
}

.avatar-expiry--expired {
    --avatar-expiry-color: #991b1b;
}

.avatar-expiry-pulse {
    animation: avatar-expiry-pulse 1.6s ease-in-out infinite;
}

@keyframes avatar-expiry-pulse {
    0%,
    100% {
        box-shadow:
            0 0 0 2px var(--avatar-expiry-color),
            0 0 0 0 rgba(220, 38, 38, 0.38);
    }
    50% {
        box-shadow:
            0 0 0 2px var(--avatar-expiry-color),
            0 0 0 6px rgba(220, 38, 38, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .avatar-expiry-pulse {
        animation: none;
    }
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-sm {
    width: 40px;
    height: 40px;
    font-size: 13px;
}

.avatar-xs {
    width: 28px;
    height: 28px;
    font-size: 10px;
}

.avatar-report {
    width: 88px;
    height: 88px;
    font-size: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.brand-primary {
    color: #ffffff;
}

.login-brand .brand-primary {
    color: var(--sidebar);
}

.brand-accent {
    color: var(--accent);
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
}

.nav {
    display: grid;
    gap: 4px;
    padding: 18px 0;
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    grid-auto-rows: max-content;
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.nav-section-label {
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 12px 4px;
}

.nav a {
    display: flex;
    align-items: center;
    color: #d6deeb;
    padding: 10px 12px;
    border-left: 4px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    min-height: var(--touch-target);
    word-break: break-word;
}

.nav a:hover,
.nav a.active {
    background: var(--sidebar-alt);
    color: #ffffff;
    border-left-color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-group {
    display: grid;
    gap: 4px;
}

.nav-group-toggle {
    width: 100%;
    color: #cbd5e1;
    padding: 11px 14px;
    border-left: 4px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: transparent;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: var(--touch-target);
    box-shadow: none;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    text-align: left;
    line-height: 1.25;
    word-break: break-word;
}

.nav-group-toggle:hover,
.nav-group-toggle.active {
    background: rgba(30, 41, 59, 0.52);
    color: #ffffff;
    border-left-color: var(--accent);
}

.nav-group-toggle:hover {
    transform: none;
    box-shadow: none;
}

.nav-group.open .nav-group-toggle {
    background: rgba(30, 41, 59, 0.36);
    color: #ffffff;
}

.nav-group-caret {
    font-size: 12px;
    opacity: 0.78;
    transition: transform 0.2s ease;
}

.nav-group.open .nav-group-caret {
    transform: rotate(180deg);
}

.nav-group-links {
    display: none;
    padding-left: 8px;
    padding-right: 2px;
    border-left: 1px dashed rgba(148, 163, 184, 0.28);
    margin-left: 14px;
    gap: 4px;
    min-width: 0;
}

.nav-group.open .nav-group-links {
    display: grid;
}

.nav-group-links a {
    font-size: 13px;
    padding: 10px 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sidebar-footer {
    margin-top: 0;
    padding: 16px 10px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 4px;
    min-width: 0;
}

.session-caption,
.session-role {
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.session-user {
    color: #ffffff;
    font-weight: 700;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.logout-link {
    margin-top: 10px;
    color: #cbd5e1;
    font-weight: 600;
}

.sidebar-footer form {
    margin: 0;
}

.logout-button {
    width: 100%;
    margin-top: 10px;
    padding: 0;
    background: transparent;
    color: #cbd5e1;
    border: 0;
    box-shadow: none;
    justify-content: flex-start;
    font-size: 14px;
    font-weight: 600;
}

.logout-button:hover {
    background: transparent;
    color: #ffffff;
    transform: none;
    box-shadow: none;
}

.main-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    min-height: 76px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 14px 24px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-title {
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
}

.audit-filters-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.audit-log-panel {
    display: grid;
    gap: 18px;
}

.audit-log-list {
    display: grid;
    gap: 16px;
}

.audit-card {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 18px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
}

.audit-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.audit-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
}

.audit-subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.audit-note {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 14px;
    line-height: 1.5;
}

.audit-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.audit-preview-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    padding: 14px;
    min-width: 0;
}

.audit-preview-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.audit-preview-value {
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.audit-details {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.audit-details summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text);
}

.audit-details-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.audit-details pre {
    margin: 0;
    padding: 14px;
    border-radius: 16px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1.55;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.nav-icon {
    margin-right: 8px;
}

.bases-panel {
    overflow: hidden;
}

.bases-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.status-filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status-filter {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-weight: 600;
    min-height: var(--touch-target);
}

.status-filter.active {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.bases-toolbar-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.bases-map-wrap {
    position: relative;
    min-height: 620px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background:
        radial-gradient(circle at 14% 12%, rgba(147, 197, 253, 0.24), transparent 44%),
        radial-gradient(circle at 88% 82%, rgba(148, 163, 184, 0.2), transparent 52%),
        linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
}

.bases-map {
    min-height: 620px;
    width: 100%;
}

.base-marker-wrapper {
    background: transparent;
    border: 0;
}

.base-marker-card {
    width: 248px;
    padding: 14px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.base-marker-card-peek {
    width: 184px;
    padding: 11px 12px;
    border-radius: 999px;
    display: grid;
    gap: 8px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.base-marker-card--zoomout {
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.base-marker-card-peek.compact {
    width: 156px;
    padding: 9px 10px;
}

.base-marker-card-peek strong,
.base-marker-card-peek span {
    color: inherit;
}

.base-marker-peek-top,
.base-marker-peek-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.base-marker-peek-top {
    font-size: 11px;
    font-weight: 700;
}

.base-marker-peek-top strong {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.base-marker-peek-avatars {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    min-height: 28px;
    max-height: 62px;
    overflow: hidden;
}

.base-marker-peek-avatars .avatar {
    border: 2px solid rgba(255, 255, 255, 0.82);
}

.base-marker-card .avatar,
.base-marker-card-peek .avatar {
    background: #f1f5f9;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.base-marker-peek-footer {
    font-size: 11px;
    font-weight: 700;
}

.base-marker-peek-link {
    color: #0f172a;
}

.base-marker-avatar-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 800;
    color: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(255, 255, 255, 0.85);
}

.base-marker-card.compact {
    width: 182px;
    padding: 11px 12px;
    border-radius: 16px;
}

.base-marker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.base-marker-total {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.base-marker-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.base-marker-avatars {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
    max-height: 84px;
    overflow: hidden;
}

.base-marker-avatars .avatar {
    justify-self: center;
}

.base-marker-card .avatar-sm {
    width: 36px;
    height: 36px;
    font-size: 12px;
}

.base-marker-badges .status-pill {
    font-size: 11px;
    padding: 4px 8px;
}

.base-marker-card.compact .base-marker-head {
    margin-bottom: 6px;
    gap: 8px;
}

.base-marker-card.compact .base-marker-total {
    margin-bottom: 8px;
    font-size: 13px;
}

.base-marker-card.compact .base-marker-badges {
    gap: 4px;
    margin-bottom: 8px;
}

.base-marker-card.compact .base-marker-avatars {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
}

.base-marker-card.compact .base-marker-badges .status-pill {
    font-size: 10px;
    padding: 3px 6px;
}

.base-marker-button {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.28);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(219, 234, 254, 0.82));
    color: #0f172a;
    font-weight: 700;
    backdrop-filter: blur(10px) saturate(160%);
}

.base-marker-button:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(191, 219, 254, 0.9));
}

.bases-sidebar {
    position: absolute;
    top: 18px;
    right: 18px;
    bottom: 18px;
    width: min(360px, calc(100% - 36px));
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.72));
    border-radius: 22px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
    border: 1px solid rgba(203, 213, 225, 0.72);
    backdrop-filter: blur(14px) saturate(145%);
    transform: translateX(calc(100% + 24px));
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    z-index: 500;
}

.bases-sidebar.open {
    transform: translateX(0);
}

.bases-sidebar-header,
.bases-sidebar-actions {
    padding: 18px 18px 0;
}

.bases-sidebar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.bases-sidebar-list {
    padding: 18px;
    overflow: auto;
    display: grid;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    touch-action: pan-y;
}

.sidebar-close-btn,
.modal-close-btn {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text);
    font-weight: 600;
}

.pilot-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    background: #fff;
}

.pilot-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.pilot-card-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pilot-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pilot-card-actions .button-link {
    flex: 1 1 150px;
    justify-content: center;
}

.modal-shell {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-shell.show {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.56);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(640px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22);
    padding: 22px;
}

.filters-toggle-row {
    display: none;
    margin-bottom: 12px;
}

.filters-panel {
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease, margin-bottom 0.25s ease;
}

.filters-panel.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    pointer-events: none;
}

.modal-history-card {
    width: min(760px, calc(100% - 32px));
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.history-timeline {
    margin-top: 18px;
    display: grid;
    gap: 16px;
}

.history-item {
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 14px;
}

.history-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #1d4ed8;
    margin-top: 8px;
}

.history-body {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    background: #fff;
}

.tripulante-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tripulante-photo-field {
    display: grid;
    gap: 14px;
}

.tripulante-photo-preview-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--gray-soft);
}

.tripulante-photo-preview {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8 0%, #c4262e 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    flex: 0 0 auto;
}

.tripulante-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tripulante-photo-meta {
    display: grid;
    gap: 6px;
}

.tripulante-photo-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.report-tripulante-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.report-tripulante-meta {
    display: grid;
    gap: 6px;
}

.report-tripulante-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

.report-tripulante-subtitle {
    color: var(--muted);
    font-size: 14px;
}

.history-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.history-text,
.history-note {
    color: var(--muted);
    font-size: 14px;
}

.history-note {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.status-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-purple {
    background: #f3e8ff;
    color: #7c3aed;
}

.status-orange {
    background: #ffedd5;
    color: #c2410c;
    border-color: #fdba74;
}

.status-critical {
    background: #7f1d1d;
    color: #fee2e2;
    border-color: #b91c1c;
}

.status-dark {
    background: #e2e8f0;
    color: #334155;
}

.status-pill-pulse {
    animation: status-pill-pulse 1.6s ease-in-out infinite;
}

@keyframes status-pill-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.28);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(220, 38, 38, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .status-pill-pulse {
        animation: none;
    }

    .skeleton::after {
        animation: none;
    }
}

.pagination-bar {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination-meta {
    color: var(--muted);
    font-size: 14px;
}

.pagination-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar-subtitle,
.page-subtitle,
.text-muted {
    color: var(--muted);
}

.topbar-subtitle {
    font-size: 13px;
}

.content {
    padding: 22px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-header h1 {
    margin: 0 0 4px;
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.page-subtitle {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
}

.panel,
.form-grid,
.login-card,
.summary-card,
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 18px;
    position: relative;
    overflow: visible;
}

.quick-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.quick-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff5f5;
    color: var(--accent);
    border: 1px solid #fecdd3;
    font-size: 13px;
    font-weight: 700;
    min-height: var(--touch-target);
}

.quick-filter.active,
.quick-filter:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.operation-panel {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.operation-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    background: #fff;
}

.operation-card-soft {
    background: #f8fafc;
}

.operation-title,
.section-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

.operation-text {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.operation-meta {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.dashboard-calendar-panel {
    overflow: hidden;
}

.dashboard-calendar-header {
    align-items: flex-start;
}

.dashboard-calendar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-calendar-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(196, 38, 46, 0.14);
    background: linear-gradient(135deg, rgba(196, 38, 46, 0.08), rgba(15, 23, 42, 0.02));
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.dashboard-calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    gap: 18px;
}

.dashboard-calendar-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(196, 38, 46, 0.08), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dashboard-calendar-weekdays,
.dashboard-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.dashboard-calendar-weekdays {
    padding: 16px 16px 0;
}

.dashboard-calendar-weekdays div {
    padding: 0 10px 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-calendar-grid {
    padding: 0 16px 16px;
    gap: 10px;
}

.dashboard-calendar-day {
    min-height: 92px;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(203, 213, 225, 0.88);
    background: rgba(255, 255, 255, 0.84);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
    cursor: pointer;
}

.dashboard-calendar-day:hover {
    transform: translateY(-2px);
    border-color: rgba(196, 38, 46, 0.25);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.dashboard-calendar-day.is-muted {
    background: rgba(248, 250, 252, 0.72);
    opacity: 0.72;
}

.dashboard-calendar-day.is-today {
    border-color: rgba(196, 38, 46, 0.34);
    box-shadow: 0 0 0 1px rgba(196, 38, 46, 0.12);
}

.dashboard-calendar-day.has-due {
    background:
        radial-gradient(circle at top right, rgba(196, 38, 46, 0.12), transparent 38%),
        rgba(255, 255, 255, 0.96);
}

.dashboard-calendar-day.is-selected {
    border-color: rgba(196, 38, 46, 0.4);
    box-shadow: 0 18px 40px rgba(196, 38, 46, 0.12);
    background:
        radial-gradient(circle at top right, rgba(196, 38, 46, 0.16), transparent 42%),
        #fff;
}

.dashboard-calendar-day-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef2ff;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    position: relative;
}

.dashboard-calendar-day-number.pulse {
    background: rgba(196, 38, 46, 0.14);
    color: var(--accent);
    box-shadow: 0 0 0 0 rgba(196, 38, 46, 0.36);
    animation: dashboardPulse 1.8s ease-in-out infinite;
}

.dashboard-calendar-day-counter {
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    justify-self: end;
}

.dashboard-calendar-day-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-calendar-day-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 10px;
}

.dashboard-calendar-day-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #cbd5e1;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.dashboard-calendar-detail-list {
    display: grid;
    gap: 10px;
}

.dashboard-calendar-detail-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: #fff;
}

.dashboard-calendar-detail-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-calendar-event-main {
    display: grid;
    gap: 2px;
    color: inherit;
    text-decoration: none;
}

.dashboard-calendar-event-main strong {
    font-size: 14px;
    line-height: 1.3;
}

.dashboard-calendar-event-main span,
.dashboard-calendar-event-main small {
    color: var(--muted);
    line-height: 1.35;
}

.dashboard-calendar-event-pilot {
    align-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--accent);
    border: 1px solid rgba(196, 38, 46, 0.14);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-calendar-aside {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dashboard-calendar-divider {
    height: 1px;
    background: rgba(203, 213, 225, 0.72);
    margin: 4px 0;
}

.dashboard-calendar-upcoming {
    display: grid;
    gap: 10px;
}

.dashboard-calendar-upcoming-card {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-calendar-upcoming-card:hover {
    transform: translateY(-2px);
    border-color: rgba(196, 38, 46, 0.22);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.dashboard-calendar-upcoming-card strong {
    font-size: 15px;
}

.dashboard-calendar-upcoming-card span,
.dashboard-calendar-upcoming-card small {
    color: var(--muted);
}

@keyframes dashboardPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(196, 38, 46, 0.36);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(196, 38, 46, 0);
        transform: scale(1.04);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(196, 38, 46, 0);
        transform: scale(1);
    }
}

.email-preview-panel {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.email-block {
    display: grid;
    gap: 10px;
}

.email-block-title {
    font-weight: 800;
    font-size: 16px;
}

.compact-table thead th,
.compact-table tbody td {
    padding: 10px 12px;
}

.empty-state-inline {
    color: var(--muted);
    font-size: 14px;
}

.email-raw pre {
    margin: 0;
    padding: 16px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 14px;
    overflow: auto;
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    line-height: 1.6;
}

.filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    align-items: end;
}

.filters-wide {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cfd8e6;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
    min-height: var(--touch-target);
    scroll-margin-top: 84px;
    scroll-margin-bottom: 140px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(189, 31, 45, 0.18);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(189, 31, 45, 0.08);
}

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

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    border: 1px solid #e6ebf3;
    border-radius: var(--radius-md);
    background: #fff;
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th,
table thead th {
    padding: 13px 14px;
    text-align: left;
    background: #f8fafc;
    color: #5f6c84;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #e6ebf3;
    font-weight: 800;
}

.data-table tbody td,
table tbody td {
    padding: 13px 14px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
    font-size: 14px;
}

.data-table tbody tr:hover,
table tbody tr:hover {
    background: #f9fbff;
}

.primary-cell {
    font-weight: 700;
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.base-marker-head strong,
.dashboard-calendar-event-main strong,
.dashboard-calendar-event-main span,
.dashboard-calendar-event-main small {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.secondary-cell {
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}

.date-strong {
    font-weight: 700;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.actions a {
    display: inline-flex;
    align-items: center;
    color: #344054;
    font-weight: 700;
    font-size: 13px;
    min-height: var(--touch-target);
    padding: 2px 0;
}

.actions a:hover {
    color: var(--accent);
}

.actions form {
    margin: 0;
}

.link-danger {
    padding: 0;
    background: transparent;
    color: var(--red);
    border: 0;
    border-radius: 0;
    font: inherit;
    font-weight: 600;
    min-height: var(--touch-target);
}

.link-danger:hover {
    background: transparent;
    color: #991b1b;
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 16px;
    border: 1px dashed #d7deea;
    border-radius: var(--radius-md);
    background: #fafcff;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 24px;
}

.form-section {
    grid-column: 1 / -1;
    display: grid;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.form-section-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}

.form-section-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.form-grid label {
    display: grid;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.field-help {
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
    font-weight: 400;
}

.single-column {
    grid-template-columns: 1fr;
}

.full-width {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.state-note {
    border: 1px solid #dbe3f0;
    border-radius: var(--radius-md);
    background: #f8fbff;
    padding: 12px 14px;
    color: #475467;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.permissions-group-card {
    display: grid;
    gap: 10px;
}

.permissions-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.permissions-group-count {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #475467;
    background: #eef2f7;
    border: 1px solid #dbe3f0;
}

.usuarios-form {
    align-items: start;
}

.report-only {
    display: none;
}

.report-print-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #dbe2ea;
    font-size: 11px;
    color: #64748b;
    text-align: right;
}

.checkbox-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    align-self: stretch;
    grid-column: 1 / -1;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.flags-section {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 16px;
    display: grid;
    gap: 14px;
}

.flags-section-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.flags-section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.flags-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.flags-grid .checkbox-field {
    grid-column: auto;
    padding: 12px 14px;
    min-height: 74px;
}

.checkbox-label-group {
    display: grid;
    gap: 4px;
}

.checkbox-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.checkbox-description {
    font-size: 11px;
    line-height: 1.35;
    color: var(--muted);
    font-weight: 400;
    max-width: 420px;
}

.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 0 0 auto;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-slider {
    position: relative;
    width: 48px;
    height: 27px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.toggle-slider::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
    transition: transform 0.2s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(21px);
}

.toggle-switch input:focus-visible + .toggle-slider {
    outline: 3px solid rgba(196, 38, 46, 0.2);
    outline-offset: 2px;
}

.toggle-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid transparent;
}

.status-red {
    background: var(--red-soft);
    color: var(--red);
    border-color: #fecaca;
}

.status-yellow {
    background: var(--yellow-soft);
    color: var(--yellow);
    border-color: #fde68a;
}

.status-green {
    background: var(--green-soft);
    color: var(--green);
    border-color: #bbf7d0;
}

.status-gray {
    background: var(--gray-soft);
    color: var(--gray);
    border-color: #e2e8f0;
}

.card {
    padding: 20px;
    margin-bottom: 18px;
}

.report-header-card {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.report-page,
.report-sheet {
    display: grid;
    gap: 18px;
}

.report-print-header {
    display: grid;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.report-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.report-logo {
    width: 220px;
    height: auto;
    flex: 0 0 auto;
}

.report-brand-meta {
    flex: 1;
    text-align: right;
}

.report-doc-title {
    font-size: 24px;
    font-weight: 800;
}

.report-doc-subtitle {
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

.report-issued-at {
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.report-info-block,
.report-table-block {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.report-block-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #334155;
    margin-bottom: 12px;
}

.report-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.report-info-item,
.report-summary-card {
    display: grid;
    gap: 6px;
}

.report-info-item {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.report-info-item-wide {
    grid-column: span 2;
}

.report-info-grid strong,
.report-summary-card strong {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.report-info-item span {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.report-action-slot {
    margin-top: 6px;
}

.report-action-slot button {
    font-size: 14px;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.report-summary-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.report-summary-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--accent);
}

.report-summary-card span {
    font-size: 30px;
    font-weight: 800;
    padding-left: 4px;
}

.report-section-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
}

.produtividade-mobile-header .page-subtitle {
    max-width: 100%;
}

.report-table-kv tbody td:first-child {
    color: #475569;
    font-weight: 700;
    width: 42%;
}

.report-table-kv tbody td:last-child {
    font-weight: 700;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.card-grid div,
.summary-card {
    display: grid;
    gap: 6px;
}

.card-grid strong,
.summary-card strong {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.summary-card {
    padding: 18px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.summary-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(16, 24, 40, 0.05), rgba(189, 31, 45, 0.35));
    opacity: 0.6;
}

.summary-card span {
    font-size: clamp(28px, 2.2vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.summary-link-card {
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.summary-link-card:hover {
    transform: translateY(-2px);
    border-color: #f8b4bc;
    box-shadow: 0 14px 28px rgba(16, 24, 40, 0.08);
}

.compact-summary-grid {
    margin-top: 8px;
    margin-bottom: 20px;
}

.compact-summary-grid .summary-card {
    box-shadow: none;
    border-width: 1px;
}

.consolidated-summary-grid {
    margin-top: 8px;
    margin-bottom: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.consolidated-brand-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(189, 31, 45, 0.24);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 14px;
    background: linear-gradient(120deg, rgba(15, 26, 47, 0.98) 0%, rgba(20, 34, 60, 0.96) 70%);
    color: #eef2ff;
}

.consolidated-brand-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.consolidated-brand-logo {
    width: 152px;
    max-width: 34vw;
    height: auto;
    filter: brightness(0) invert(1);
    flex: 0 0 auto;
}

.consolidated-brand-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(203, 213, 225, 0.95);
}

.consolidated-brand-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 2px;
}

.consolidated-brand-subtitle {
    font-size: 13px;
    color: rgba(203, 213, 225, 0.88);
    margin-top: 2px;
}

.consolidated-brand-meta {
    text-align: right;
    padding-left: 14px;
    border-left: 1px solid rgba(226, 232, 240, 0.24);
    flex: 0 0 auto;
}

.consolidated-brand-meta-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(203, 213, 225, 0.86);
}

.consolidated-brand-meta-value {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 4px;
}

.competencia-history {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.competencia-history-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.competencia-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.competencia-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    min-height: var(--touch-target);
}

.competencia-chip:hover {
    border-color: #f8b4bc;
    background: #fff6f7;
    color: #9a1f2d;
}

.competencia-chip.active {
    background: #9a1f2d;
    border-color: #9a1f2d;
    color: #fff;
}

.quick-actions-card {
    align-content: start;
    gap: 10px;
    min-height: 0;
}

.quick-actions-card span {
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: normal;
}

.quick-actions-links {
    display: grid;
    gap: 8px;
}

.quick-actions-links a {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 0;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text);
}

.quick-actions-links a:hover {
    color: #9a1f2d;
}

.consolidated-table .consolidated-group-row td {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.consolidated-table .consolidated-group-row td::before {
    content: none;
}

.consolidated-table-wrap {
    display: block;
}

.consolidated-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.consolidated-group-header strong {
    font-size: 15px;
    color: var(--text);
}

.consolidated-group-header span,
.consolidated-group-meta {
    color: var(--muted);
    font-size: 13px;
}

.consolidated-row-critical {
    background: linear-gradient(90deg, rgba(254, 242, 242, 0.65) 0%, rgba(255, 255, 255, 0) 68%);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-panel {
    display: grid;
    gap: 16px;
}

.dashboard-alerts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.alert-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.alert-card strong {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.alert-card span {
    font-size: 30px;
    font-weight: 800;
}

.alert-card a {
    font-size: 13px;
    font-weight: 700;
}

.alert-link-text {
    font-size: 13px;
    font-weight: 700;
}

.alert-red {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}

.alert-yellow {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #b45309;
}

.alert-soft {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.dashboard-status-list {
    display: grid;
    gap: 12px;
}

.dashboard-status-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.dashboard-status-list a:hover {
    border-color: #fecdd3;
    transform: translateY(-1px);
}

.dashboard-status-list span {
    color: var(--muted);
    font-weight: 600;
}

.dashboard-status-list strong {
    font-size: 22px;
}

.dashboard-subheader {
    margin-bottom: 14px;
}

.flash {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #dbe3ef;
    font-weight: 700;
    background: #f8fbff;
    color: #1d2939;
    box-shadow: var(--shadow-soft);
}

.flash.error {
    background: var(--red-soft);
    color: var(--red);
    border-color: #fecaca;
}

.flash.success {
    background: var(--green-soft);
    color: var(--green);
    border-color: #abefc6;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: #edf2f8;
    border-radius: 10px;
    min-height: 14px;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    animation: skeleton-loading 1.4s ease infinite;
}

@keyframes skeleton-loading {
    100% {
        transform: translateX(100%);
    }
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(196, 38, 46, 0.06), transparent 34%),
        linear-gradient(180deg, #edf3ff 0%, #f8fafc 48%, #ffffff 100%);
    padding: 16px;
}

.login-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-orb,
.login-grid-glow {
    position: absolute;
    display: block;
}

.login-orb {
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.5;
    animation: loginOrbFloat 14s ease-in-out infinite;
}

.login-orb-one {
    width: 320px;
    height: 320px;
    top: 8%;
    left: 12%;
    background: radial-gradient(circle, rgba(196, 38, 46, 0.12) 0%, rgba(196, 38, 46, 0.03) 58%, transparent 72%);
}

.login-orb-two {
    width: 380px;
    height: 380px;
    right: 10%;
    bottom: 4%;
    background: radial-gradient(circle, rgba(35, 43, 76, 0.12) 0%, rgba(35, 43, 76, 0.03) 56%, transparent 74%);
    animation-duration: 17s;
    animation-delay: -4s;
}

.login-grid-glow {
    inset: 12% 10%;
    border-radius: 32px;
    background:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at center, black 36%, transparent 78%);
    opacity: 0.5;
    animation: loginGridShift 28s linear infinite;
}

.login-card {
    width: min(460px, calc(100vw - 32px));
    padding: 32px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, 0.9);
    animation: loginCardEnter 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 16px 16px 0 0;
    background: var(--accent);
}

.login-form-panel {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, rgba(255, 255, 255, 0.96) 100%);
    border: 1px solid #d8e1ef;
}

.login-card h1 {
    margin: 8px 0 6px;
    font-size: 28px;
    text-align: center;
}

.login-card .text-muted {
    text-align: center;
}

.login-card input,
.login-card button {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.login-card input:hover,
.login-card input:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(148, 163, 184, 0.12);
}

.login-card button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(196, 38, 46, 0.22);
}

.login-remember-field {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.login-remember-checkbox {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: var(--accent);
}

.login-card .login-remember-checkbox:hover,
.login-card .login-remember-checkbox:focus {
    transform: none;
    box-shadow: none;
}

.login-fade {
    opacity: 0;
    animation: loginFadeUp 0.75s ease forwards;
}

.login-delay-1 {
    animation-delay: 0.12s;
}

.login-delay-2 {
    animation-delay: 0.2s;
}

.login-delay-3 {
    animation-delay: 0.3s;
}

.login-delay-4 {
    animation-delay: 0.42s;
}

.login-delay-5 {
    animation-delay: 0.52s;
}

.hint {
    margin-top: 16px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

@keyframes loginCardEnter {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.985);
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.04);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 28px 60px rgba(15, 23, 42, 0.1);
    }
}

@keyframes loginFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loginOrbFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(12px, -18px, 0) scale(1.06);
    }
}

@keyframes loginGridShift {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(28px, 18px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-card,
    .login-fade,
    .login-orb,
    .login-grid-glow {
        animation: none !important;
    }

    .login-card input,
    .login-card button {
        transition: none;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    .sidebar,
    .topbar,
    .page-header,
    .page-header button,
    .page-header .button-link,
    .logout-link {
        display: none !important;
    }

    .app-shell,
    .main-column {
        display: block;
    }

    .content {
        padding: 0;
        background: #fff;
    }

    .panel,
    .summary-card,
    .card,
    .report-print-header,
    .report-info-block,
    .report-table-block,
    .report-summary-card {
        box-shadow: none;
        border: 0;
        border-radius: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .report-page,
    .report-sheet {
        gap: 10px;
    }

    .report-print-header {
        padding-top: 0;
        border-bottom: 1px solid #cbd5e1;
    }

    .report-brand-row {
        align-items: flex-start;
    }

    .report-logo {
        width: 180px;
    }

    .report-brand-meta {
        text-align: right;
    }

    .report-doc-title {
        font-size: 18px;
    }

    .report-doc-subtitle,
    .report-issued-at {
        font-size: 11px;
        color: #475569;
    }

    .report-info-grid,
    .report-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px 16px;
    }

    .report-info-item {
        padding: 8px 10px;
        border: 1px solid #cbd5e1;
        background: transparent;
    }

    .report-info-item-wide {
        grid-column: span 2;
    }

    .report-info-item span {
        font-size: 12px;
        font-weight: 700;
    }

    .report-summary-card {
        padding: 8px 10px 8px 14px;
        border: 1px solid #dbe2ea;
    }

    .report-summary-card::before {
        width: 3px;
    }

    .report-summary-card span {
        font-size: 16px;
    }

    .report-section-title {
        margin-bottom: 8px;
        font-size: 14px;
    }

    .report-table {
        table-layout: fixed;
    }

    .report-table .col-equipamento {
        width: 16%;
    }

    .report-table .col-tipo {
        width: 24%;
    }

    .report-table .col-realizacao {
        width: 14%;
    }

    .report-table .col-vencimento {
        width: 14%;
    }

    .report-table .col-status {
        width: 12%;
    }

    .report-table .col-observacao {
        width: 20%;
    }

    .report-table th,
    .report-table td {
        padding: 8px 7px;
        font-size: 10px;
        line-height: 1.35;
        color: #0f172a;
        border-color: #dbe2ea;
        background: transparent !important;
    }

    .report-table thead th {
        font-size: 9px;
        color: #334155;
        border-top: 1px solid #cbd5e1;
        border-bottom: 1px solid #cbd5e1;
    }

    .report-table tbody tr:hover {
        background: transparent;
    }

    .report-table tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .status-pill {
        padding: 2px 5px;
        font-size: 9px;
        border-width: 1px;
        white-space: nowrap;
        border-radius: 999px;
    }

    .table-wrap {
        overflow: visible;
    }

    .print-hide {
        display: none !important;
    }

    .report-only {
        display: block !important;
    }

    .report-print-footer {
        position: fixed;
        bottom: 8mm;
        left: 12mm;
        right: 12mm;
        text-align: right;
    }

    .report-print-footer::after {
        content: " · Página " counter(page);
    }
}

@media (max-width: 1180px) {
    .filters,
    .filters-wide,
    .card-grid,
    .report-summary-grid,
    .summary-grid,
    .dashboard-alerts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-info-grid,
    .dashboard-grid,
    .form-grid,
    .operation-panel {
        grid-template-columns: 1fr;
    }

    .dashboard-calendar-layout {
        grid-template-columns: 1fr;
    }

    .flags-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .dashboard-calendar-shell {
        overflow-x: auto;
    }

    .dashboard-calendar-weekdays,
    .dashboard-calendar-grid {
        min-width: 680px;
    }

    .dashboard-calendar-day {
        min-height: 78px;
    }
}

@media (max-width: 640px) {
    .topbar {
        padding: 10px 12px;
    }

    .content {
        padding: 12px;
    }

    .panel,
    .card {
        padding: 12px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .dashboard-calendar-meta {
        width: 100%;
    }

    .dashboard-calendar-chip {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-calendar-weekdays,
    .dashboard-calendar-grid {
        min-width: 620px;
    }

    .dashboard-calendar-day {
        min-height: 72px;
        padding: 8px;
    }

    .dashboard-calendar-day-label {
        font-size: 11px;
    }

    .dashboard-calendar-aside {
        padding: 16px;
    }

    .dashboard-calendar-upcoming-card {
        padding: 12px;
    }

    .pagination-bar {
        gap: 10px;
    }

    .pagination-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .pagination-actions .button-link {
        width: 100%;
    }

    .report-brand-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .report-brand-meta {
        width: 100%;
        text-align: left;
    }

    .filters,
    .filters-wide,
    .card-grid,
    .summary-grid,
    .report-summary-grid,
    .dashboard-alerts {
        grid-template-columns: 1fr;
    }

    .quick-filter,
    .status-filter,
    .competencia-chip {
        min-height: 40px;
    }
}

/* ... styles for mobile sidebar and overlay ... */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

body.sidebar-open .main-column {
    pointer-events: none;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    color: var(--text);
    padding: 8px;
    margin-right: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.mobile-menu-btn:hover {
    background: var(--gray-soft);
    transform: none;
    box-shadow: none;
}

.topbar-left {
    display: flex;
    align-items: center;
}

@media (max-width: 900px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 50;
        width: min(90vw, 360px);
        height: 100dvh;
        max-height: 100dvh;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        overflow: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: calc(14px + env(safe-area-inset-top)) 14px 10px;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.4);
    }

    .topbar {
        padding: 12px 16px;
        height: auto;
        gap: 10px;
        flex-direction: row;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-left {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-width: 0;
    }

    .sidebar-top {
        padding: 6px 8px 12px;
    }

    .nav {
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
        padding: 12px 0 18px;
        gap: 2px;
        align-content: start;
        grid-auto-rows: max-content;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .nav a,
    .nav-group-toggle {
        font-size: 14px;
        min-height: 46px;
        padding: 12px 12px;
        border-radius: 12px;
    }

    .nav-group-links {
        margin-left: 8px;
        padding-left: 8px;
        padding-right: 4px;
    }

    .nav-group-links a {
        padding: 11px 12px;
    }

    .sidebar-footer {
        margin-top: 0;
        padding: 14px 10px calc(8px + env(safe-area-inset-bottom));
        background: var(--sidebar);
        position: static;
        flex-shrink: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 2;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .mobile-menu-btn {
        display: flex;
        min-height: var(--touch-target);
        min-width: var(--touch-target);
        margin-right: 4px;
    }

    .topbar-title {
        font-size: 17px;
        line-height: 1.25;
    }

    .topbar-subtitle {
        display: none;
    }

    .topbar-action {
        width: 100%;
        text-align: center;
        white-space: normal;
    }

    .content {
        padding: 16px;
    }

    .content,
    .panel,
    .card,
    .summary-card,
    .page-header,
    .page-header-actions,
    .filters-panel,
    .report-info-item,
    .report-summary-card {
        min-width: 0;
    }

    .page-header {
        gap: 12px;
        margin-bottom: 16px;
    }

    .page-header h1 {
        font-size: clamp(24px, 7vw, 30px);
    }

    .panel,
    .card {
        padding: 14px;
        border-radius: 14px;
    }

    .summary-card {
        padding: 14px;
    }

    .summary-card span {
        font-size: clamp(24px, 7.2vw, 32px);
    }

    .operation-title,
    .section-title {
        font-size: 17px;
    }

    .operation-text {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .quick-actions-links a {
        width: 100%;
        font-size: 16px;
        line-height: 1.3;
    }

    .consolidated-brand-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .consolidated-brand-left {
        width: 100%;
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .consolidated-brand-logo {
        width: 140px;
        max-width: 100%;
    }

    .consolidated-brand-meta {
        text-align: left;
        border-left: 0;
        border-top: 1px solid rgba(226, 232, 240, 0.24);
        width: 100%;
        padding-left: 0;
        padding-top: 10px;
    }

    .page-header-actions,
    .page-header > .button-link,
    .page-header > button {
        width: 100%;
    }

    .page-header-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .page-header-actions > * {
        width: 100%;
        justify-content: center;
    }

    .produtividade-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .produtividade-actions .button-link,
    .produtividade-actions button {
        width: 100%;
        justify-content: center;
    }

    .quick-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 2px 2px 6px;
        scrollbar-width: thin;
    }

    .quick-filter {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .bases-map-wrap,
    .bases-map {
        min-height: 520px;
    }

    .status-filter-group {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .competencia-history-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .produtividade-competencias {
        scroll-snap-type: x proximity;
    }

    .produtividade-competencias .competencia-chip {
        scroll-snap-align: start;
    }

    .competencia-chip {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .status-filter {
        flex: 0 0 auto;
        padding: 9px 12px;
        white-space: nowrap;
    }

    .bases-toolbar-meta {
        width: 100%;
        justify-content: space-between;
    }

    .base-marker-card {
        width: 182px;
        padding: 11px 12px;
        border-radius: 16px;
    }

    .base-marker-card-peek {
        width: 156px;
        padding: 9px 10px;
    }

    .base-marker-head {
        margin-bottom: 6px;
    }

    .base-marker-total {
        margin-bottom: 8px;
        font-size: 13px;
    }

    .base-marker-badges {
        gap: 4px;
        margin-bottom: 8px;
    }

    .base-marker-badges .status-pill {
        font-size: 10px;
        padding: 3px 6px;
    }

    .base-marker-button {
        padding: 9px 10px;
        font-size: 12px;
    }

    .bases-sidebar {
        inset: auto 12px 12px 12px;
        width: auto;
        top: auto;
        max-height: 60vh;
        transform: translateY(calc(100% + 24px));
    }

    .bases-sidebar.open {
        transform: translateY(0);
    }

    .bases-sidebar-header,
    .bases-sidebar-actions,
    .bases-sidebar-list {
        padding-left: 14px;
        padding-right: 14px;
    }

    .pilot-card {
        padding: 12px;
    }

    .pilot-card-top {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .pilot-card-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .pilot-card-actions .button-link {
        width: 100%;
    }

    .modal-card,
    .modal-history-card {
        width: min(100%, calc(100% - 16px));
        max-height: calc(100dvh - 16px);
        padding: 16px;
        border-radius: 18px;
        scrollbar-gutter: stable;
    }

    .modal-header {
        align-items: flex-start;
    }

    .form-grid {
        padding: 18px 0 0;
    }

    .usuarios-form {
        gap: 14px;
        padding: 14px 0 92px;
    }

    .usuarios-form label {
        gap: 6px;
    }

    .usuarios-form .form-section {
        gap: 10px;
        padding: 12px;
    }

    .usuarios-form .permissions-group-card {
        gap: 8px;
    }

    .usuarios-form .permissions-group-count {
        font-size: 10px;
    }

    .usuarios-form .checkbox-field {
        padding: 12px 14px;
    }

    .usuarios-form .checkbox-description {
        font-size: 12px;
        line-height: 1.45;
    }

    .usuarios-form .form-actions {
        position: sticky;
        bottom: calc(8px + env(safe-area-inset-bottom));
        z-index: 6;
        margin-top: 6px;
        padding: 10px;
        border: 1px solid #dbe3f0;
        border-radius: 14px;
        background: rgba(248, 251, 255, 0.96);
        backdrop-filter: blur(4px);
    }

    .usuarios-form .form-actions > * {
        min-height: 44px;
    }

    .flags-grid {
        grid-template-columns: 1fr;
    }

    .checkbox-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
    }

    .checkbox-field .toggle-switch {
        width: 100%;
        justify-content: space-between;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 8px;
    }

    .form-actions > * {
        width: 100%;
        text-align: center;
        min-height: var(--touch-target);
    }

    .form-grid > .form-actions.full-width {
        position: sticky;
        bottom: calc(8px + env(safe-area-inset-bottom));
        z-index: 5;
        padding: 10px;
        border: 1px solid #dbe3f0;
        border-radius: 14px;
        background: rgba(248, 251, 255, 0.96);
        backdrop-filter: blur(4px);
    }

    .filters-toggle-row {
        display: flex;
    }

    .filters-toggle-btn {
        width: 100%;
        justify-content: center;
    }

    .filters-panel {
        max-height: 2200px;
        opacity: 1;
        margin-bottom: 14px;
        overflow: hidden;
    }

    .filters-panel.collapsed {
        max-height: 0;
    }

    .filters {
        gap: 10px;
        grid-template-columns: 1fr;
    }

    .filters-wide {
        grid-template-columns: 1fr;
    }

    .filters button,
    .filters .button-link,
    .filters input,
    .filters select {
        width: 100%;
    }

    .audit-filters-grid,
    .audit-preview-grid,
    .audit-details-grid {
        grid-template-columns: 1fr;
    }

    .audit-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .data-table th,
    .data-table td,
    table th,
    table td {
        white-space: normal;
        padding: 10px 12px;
    }

    .data-table:not(.responsive-cards),
    table:not(.responsive-cards) {
        min-width: 560px;
    }

    .report-page .report-info-item span {
        font-size: 16px;
        line-height: 1.35;
    }

    .report-page .report-summary-card span {
        font-size: clamp(24px, 7.5vw, 30px);
    }

    .report-table-kv {
        min-width: 0 !important;
        border-collapse: separate;
    }

    .report-table-kv tbody {
        display: grid;
        gap: 10px;
        padding: 2px;
    }

    .report-table-kv tbody tr {
        display: grid;
        gap: 6px;
        padding: 10px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
    }

    .report-table-kv tbody td {
        display: block;
        padding: 0 !important;
        border: 0 !important;
        white-space: normal;
        word-break: break-word;
    }

    .report-table-kv tbody td:first-child {
        width: auto;
        color: #64748b;
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .report-table-kv tbody td:last-child {
        font-size: 14px;
        font-weight: 700;
    }

    .data-table.responsive-cards,
    .data-table.responsive-cards tbody,
    .data-table.responsive-cards tr,
    .data-table.responsive-cards td {
        display: block;
        width: 100%;
    }

    .data-table.responsive-cards {
        min-width: 0;
    }

    .data-table.responsive-cards thead {
        display: none;
    }

    .data-table.responsive-cards tbody {
        display: grid;
        gap: 12px;
    }

    .data-table.responsive-cards tbody tr {
        border: 1px solid var(--border);
        border-radius: 14px;
        background: #fff;
        box-shadow: var(--shadow-soft);
        padding: 12px;
        min-width: 0;
    }

    .data-table.responsive-cards tbody td {
        border: 0;
        padding: 0;
        margin-top: 10px;
        min-width: 0;
    }

    .data-table.responsive-cards tbody td:first-child {
        margin-top: 0;
    }

    .data-table.responsive-cards tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 5px;
        color: var(--muted);
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }

    .data-table.responsive-cards tbody td.actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: stretch;
        border-top: 1px dashed #e2e8f0;
        padding-top: 10px;
    }

    .data-table.responsive-cards tbody td.actions::before {
        width: 100%;
    }

    .data-table.responsive-cards tbody td.actions form {
        display: block;
        width: 100%;
    }

    .actions,
    .actions * {
        white-space: normal;
    }

    .actions {
        gap: 8px;
    }

    .actions a,
    .actions button {
        font-size: 14px;
        min-height: var(--touch-target);
        border: 1px solid #d9e1ee;
        border-radius: 12px;
        padding: 8px 10px;
        background: #fff;
        justify-content: flex-start;
        width: 100%;
    }

    .actions .link-danger {
        border-color: #fecaca;
        background: #fff5f5;
    }

    .actions a:active,
    .actions button:active {
        transform: scale(0.99);
    }

    .tripulante-inline {
        align-items: flex-start;
    }

    .tripulante-photo-preview-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .tripulante-photo-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tripulante-photo-actions input,
    .tripulante-photo-actions button {
        width: 100%;
    }

}

.monitor-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.monitor-summary-card {
    min-height: 96px;
}

.monitor-summary-card span {
    font-size: 18px;
    line-height: 1.2;
}

.monitor-section {
    display: grid;
    gap: 14px;
}

.monitor-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.monitor-progress-wrap {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 14px;
    padding: 12px;
}

.monitor-progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 700;
}

.monitor-progress-track {
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.monitor-progress-fill {
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    transition: width 0.25s ease;
}

.monitor-progress-fill.status-green {
    background: #16a34a;
}

.monitor-progress-fill.status-yellow {
    background: #f59e0b;
}

.monitor-progress-fill.status-red {
    background: #dc2626;
}

.monitor-progress-fill.status-gray {
    background: #6b7280;
}

.monitor-progress-meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.monitor-alerts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.monitor-alert-card {
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 12px;
    display: grid;
    gap: 6px;
}

.monitor-alert-card--critical {
    border-color: #fca5a5;
    background: #fef2f2;
}

.monitor-alert-card--warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.monitor-alert-title {
    font-weight: 800;
    color: var(--text);
}

.monitor-alert-message {
    color: var(--text);
    font-size: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.monitor-alert-source {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.monitor-block-gap {
    margin-bottom: 12px;
}

@media (max-width: 1200px) {
    .monitor-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .sidebar {
        width: min(94vw, 360px);
    }

    .monitor-summary-grid,
    .monitor-alerts-grid {
        grid-template-columns: 1fr;
    }

    .monitor-section-header {
        flex-direction: column;
        align-items: stretch;
    }
}

.tripulante-file-meta {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.inline-replace-form {
    display: inline-flex;
    margin: 0;
}

@media (max-width: 1080px) {
    .tripulante-file-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .tripulante-file-meta {
        grid-template-columns: 1fr;
    }
}
