/* FlotaControl — Control Tower theme */

:root,
[data-theme="light"] {
    --fc-bg: #eef1f4;
    --fc-bg-elevated: #f7f8fa;
    --fc-surface: #ffffff;
    --fc-ink: #15202b;
    --fc-ink-muted: #5b6775;
    --fc-line: #d5dce8;
    --fc-accent: #c45c16;
    --fc-accent-strong: #a3480f;
    --fc-accent-soft: rgba(196, 92, 22, 0.12);
    --fc-signal: #1f7a5c;
    --fc-warn: #b45309;
    --fc-danger: #b42318;
    --fc-info: #2563eb;
    --fc-radar: rgba(21, 32, 43, 0.08);
    --fc-shadow: 0 18px 40px rgba(21, 32, 43, 0.08);
    --fc-header-bg: rgba(247, 248, 250, 0.86);
    --fc-atmosphere: radial-gradient(1200px 500px at 10% -10%, rgba(196, 92, 22, 0.14), transparent 55%),
        radial-gradient(900px 420px at 100% 0%, rgba(31, 122, 92, 0.1), transparent 50%),
        linear-gradient(180deg, #f4f6f8 0%, #e8ecf1 100%);
    --fc-input-bg: #fff;
    --fc-modal-scrim: rgba(15, 23, 32, 0.45);
    --fc-font: "Manrope", "Segoe UI", sans-serif;
    --fc-display: "Syne", "Manrope", sans-serif;
}

[data-theme="dark"] {
    --fc-bg: #0e141b;
    --fc-bg-elevated: #121a23;
    --fc-surface: #17212b;
    --fc-ink: #e8eef4;
    --fc-ink-muted: #93a0ae;
    --fc-line: #2a3744;
    --fc-accent: #e07a2f;
    --fc-accent-strong: #f08a3d;
    --fc-accent-soft: rgba(224, 122, 47, 0.16);
    --fc-signal: #3dba8d;
    --fc-warn: #f0a35a;
    --fc-danger: #f97066;
    --fc-info: #60a5fa;
    --fc-radar: rgba(232, 238, 244, 0.08);
    --fc-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    --fc-header-bg: rgba(14, 20, 27, 0.9);
    --fc-atmosphere: radial-gradient(1000px 480px at 0% -20%, rgba(224, 122, 47, 0.18), transparent 50%),
        radial-gradient(800px 400px at 100% 0%, rgba(61, 186, 141, 0.12), transparent 45%),
        linear-gradient(180deg, #0e141b 0%, #101820 100%);
    --fc-input-bg: #101820;
    --fc-modal-scrim: rgba(0, 0, 0, 0.62);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: var(--fc-font);
    color: var(--fc-ink);
    background: var(--fc-bg);
}

a {
    color: var(--fc-accent-strong);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, .fc-brand-text {
    font-family: var(--fc-display);
    letter-spacing: -0.02em;
}

.validation-message {
    color: var(--fc-danger);
    font-size: 0.85rem;
}

/* Shell */

.fc-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.fc-atmosphere {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--fc-atmosphere);
    pointer-events: none;
}

.fc-main {
    flex: 1 0 auto;
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem 0 2rem;
}

.fc-footer {
    flex-shrink: 0;
    margin-top: auto;
    width: 100%;
    border-top: 1px solid var(--fc-line);
    background: color-mix(in srgb, var(--fc-surface) 72%, transparent);
    color: var(--fc-ink-muted);
    font-size: 0.84rem;
}

.fc-footer-inner {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1rem 0 1.15rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 1.25rem;
}

.fc-footer-meta,
.fc-footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
}

.fc-footer-brand {
    color: var(--fc-ink);
    font-weight: 600;
}

.fc-footer-version {
    color: var(--fc-ink-muted);
    font-variant-numeric: tabular-nums;
    font-size: 0.85em;
}

.fc-footer-sep {
    opacity: 0.45;
}

.fc-footer-link {
    color: var(--fc-ink-muted);
    text-decoration: none;
    font: inherit;
}

.fc-footer-link:hover {
    color: var(--fc-accent-strong);
    text-decoration: underline;
}

.fc-footer-mail {
    color: var(--fc-ink-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.fc-footer-mail:hover {
    color: var(--fc-accent-strong);
    border-bottom-color: color-mix(in srgb, var(--fc-accent-strong) 55%, transparent);
    text-decoration: none;
}

.fc-footer-btn {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
}

.fc-footer-copy {
    margin: 0;
    flex: 1 0 100%;
    font-size: 0.78rem;
    opacity: 0.9;
}

@media (max-width: 719px) {
    .fc-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1.1rem 0 1.35rem;
    }

    .fc-footer-meta,
    .fc-footer-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .fc-footer-sep {
        display: none;
    }

    .fc-footer-copy {
        margin-top: 0.15rem;
    }
}

/* Platform announcements (tenant) */

.fc-announcements {
    display: grid;
    gap: 0.65rem;
    margin: 0 0 1rem;
}

.fc-announcement {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border: 1px solid color-mix(in srgb, var(--fc-signal) 35%, var(--fc-line));
    border-radius: 12px;
    background: color-mix(in srgb, var(--fc-signal) 10%, var(--fc-surface));
    box-shadow: var(--fc-shadow);
}

.fc-announcement-company {
    border-color: color-mix(in srgb, var(--fc-accent) 40%, var(--fc-line));
    background: color-mix(in srgb, var(--fc-accent) 10%, var(--fc-surface));
}

.fc-announcement-body {
    flex: 1;
    min-width: 0;
}

.fc-announcement-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fc-ink-muted);
}

.fc-announcement-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-family: var(--fc-display);
}

.fc-announcement-text {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.45;
    color: var(--fc-ink);
}

.fc-announcement-meta {
    margin: 0.45rem 0 0;
    font-size: 0.78rem;
    color: var(--fc-ink-muted);
}

.fc-announcement-dismiss {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--fc-ink-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.fc-announcement-dismiss:hover {
    background: var(--fc-radar);
    color: var(--fc-ink);
}

/* Cookie consent */

.fc-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    padding: 0.85rem 1rem 1.1rem;
    pointer-events: none;
}

.fc-cookie-banner-inner {
    pointer-events: auto;
    width: min(960px, 100%);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    align-items: flex-end;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    border: 1px solid var(--fc-line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--fc-surface) 92%, transparent);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
}

.fc-cookie-banner-copy {
    flex: 1 1 18rem;
    min-width: 0;
}

.fc-cookie-banner-copy h2 {
    margin: 0 0 0.35rem;
    font-family: Syne, Manrope, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
}

.fc-cookie-banner-copy p {
    margin: 0 0 0.45rem;
    color: var(--fc-ink-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.fc-cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Legal pages */

.legal-page {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 0.5rem 0 2rem;
}

.legal-header {
    margin-bottom: 1.75rem;
}

.legal-kicker {
    margin: 0 0 0.35rem;
    color: var(--fc-ink-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.legal-header h1 {
    margin: 0 0 0.4rem;
    font-family: Syne, Manrope, sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.legal-meta {
    margin: 0;
    color: var(--fc-ink-muted);
    font-size: 0.9rem;
}

.legal-section {
    margin-bottom: 1.35rem;
}

.legal-section h2 {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
}

.legal-section p,
.legal-section li {
    color: var(--fc-ink-muted);
    line-height: 1.55;
}

.legal-section ul {
    margin: 0.35rem 0 0;
    padding-left: 1.2rem;
}

.legal-back {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.auth-legal-links {
    margin: 0.85rem 0 0;
    text-align: center;
    font-size: 0.82rem;
}

.fc-field-checkbox .fc-checkbox {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.88rem;
    line-height: 1.4;
    cursor: pointer;
}

.fc-field-checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.fc-field-checkbox .validation-message {
    display: block;
    margin-top: 0.35rem;
}

/* Header */

.fc-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(12px);
    background: var(--fc-header-bg);
    border-bottom: 1px solid var(--fc-line);
}

.fc-header-inner {
    position: relative;
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    min-height: 4rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.fc-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--fc-ink);
    text-decoration: none;
    font-weight: 700;
}

.fc-brand:hover {
    text-decoration: none;
}

.fc-brand-logo {
    width: 2.1rem;
    height: 2.1rem;
    object-fit: contain;
    border-radius: 0.35rem;
    flex: none;
    display: block;
}

.fc-brand-mark {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 0.25rem;
    background: linear-gradient(145deg, var(--fc-accent), #1f7a5c);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.fc-brand-text {
    font-size: 1.15rem;
}

.fc-nav {
    display: flex;
    gap: 0.35rem;
    flex: 1;
}

.fc-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--fc-ink-muted);
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
}

.fc-nav-link .nav-ico {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
}

.fc-nav-link:hover,
.fc-nav-link.active {
    color: var(--fc-ink);
    background: var(--fc-accent-soft);
    text-decoration: none;
}

.fc-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: none;
    margin-left: auto;
}

/* Desktop „Więcej” */
.fc-nav-more {
    position: relative;
}

.fc-nav-more-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.75rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--fc-ink-muted);
    font: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
}

.fc-nav-more-btn .nav-ico {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
}

.fc-nav-more-btn:hover,
.fc-nav-more.is-open .fc-nav-more-btn,
.fc-nav-more.has-active .fc-nav-more-btn {
    color: var(--fc-ink);
    background: var(--fc-accent-soft);
}

.fc-nav-more-caret {
    width: 0.9rem;
    height: 0.9rem;
    transition: transform 0.15s ease;
}

.fc-nav-more.is-open .fc-nav-more-caret {
    transform: rotate(180deg);
}

.fc-nav-more-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 11.5rem;
    padding: 0.35rem;
    background: var(--fc-surface);
    border: 1px solid var(--fc-line);
    border-radius: 0.75rem;
    box-shadow: var(--fc-shadow);
    z-index: 50;
    display: grid;
    gap: 0.15rem;
}

.fc-nav-more-menu .fc-nav-link {
    width: 100%;
}

.fc-nav-mobile-extra,
.fc-nav-mobile-actions,
.fc-nav-scrim,
.fc-user-chip-mobile {
    display: none;
}

.fc-icon-btn.fc-menu-toggle {
    display: none;
}

.fc-menu-toggle {
    align-items: center;
    justify-content: center;
}

.fc-burger,
.fc-burger::before,
.fc-burger::after {
    display: block;
    width: 1.05rem;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.fc-burger {
    position: relative;
}

.fc-burger::before,
.fc-burger::after {
    content: "";
    position: absolute;
    left: 0;
}

.fc-burger::before { top: -5px; }
.fc-burger::after { top: 5px; }

.fc-menu-toggle.is-open .fc-burger {
    background: transparent;
}

.fc-menu-toggle.is-open .fc-burger::before {
    top: 0;
    transform: rotate(45deg);
}

.fc-menu-toggle.is-open .fc-burger::after {
    top: 0;
    transform: rotate(-45deg);
}

.fc-notif {
    position: relative;
}

.fc-notif-bell {
    position: relative;
}

.fc-notif-bell svg {
    width: 1.15rem;
    height: 1.15rem;
}

.fc-notif-badge {
    position: absolute;
    top: -0.15rem;
    right: -0.15rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #c0392b;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
}

.fc-notif-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.45rem);
    width: min(22rem, 92vw);
    background: var(--fc-surface);
    border: 1px solid var(--fc-line);
    border-radius: 0.85rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    z-index: 40;
    overflow: hidden;
}

.fc-notif-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--fc-line);
}

.fc-notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 22rem;
    overflow: auto;
}

.fc-notif-item {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    cursor: pointer;
}

.fc-notif-list li.is-unread .fc-notif-item {
    background: color-mix(in srgb, var(--fc-accent-soft) 55%, transparent);
}

.fc-notif-item:hover {
    background: color-mix(in srgb, var(--fc-accent-soft) 70%, transparent);
}

.fc-notif-title {
    font-weight: 650;
    font-size: 0.9rem;
}

.fc-notif-msg {
    color: var(--fc-ink-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.fc-notif-time {
    color: var(--fc-ink-muted);
    font-size: 0.75rem;
}

.fc-notif-footer {
    display: block;
    padding: 0.7rem 0.9rem;
    border-top: 1px solid var(--fc-line);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fc-accent);
    text-decoration: none;
}

.fc-notif-footer:hover {
    text-decoration: underline;
}

.fc-user-chip {
    display: none;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--fc-line);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--fc-ink-muted);
}

.fc-user-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--fc-signal);
}

@media (min-width: 720px) {
    .fc-user-chip-desktop {
        display: inline-flex;
    }
}

@media (max-width: 719px) {
    .fc-icon-btn.fc-menu-toggle {
        display: inline-flex;
    }

    .fc-nav-more,
    .fc-user-chip-desktop,
    .fc-auth-desktop {
        display: none !important;
    }

    .fc-nav-mobile-extra {
        display: contents;
    }

    .fc-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        padding: 0.75rem;
        background: var(--fc-surface);
        border-bottom: 1px solid var(--fc-line);
        box-shadow: var(--fc-shadow);
        max-height: min(70vh, calc(100dvh - 4rem));
        overflow-y: auto;
        z-index: 45;
    }

    .fc-nav.is-open {
        display: flex;
    }

    .fc-nav-link {
        width: 100%;
        padding: 0.75rem 0.85rem;
    }

    .fc-nav-mobile-actions {
        display: grid;
        gap: 0.5rem;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--fc-line);
    }

    .fc-user-chip-mobile {
        display: inline-flex;
        width: 100%;
        border-radius: 0.55rem;
    }

    .fc-nav-scrim.is-mobile {
        display: block;
        position: fixed;
        inset: 0;
        top: 4rem;
        border: 0;
        background: rgba(10, 16, 22, 0.35);
        z-index: 35;
        cursor: pointer;
    }

    .dash-hero {
        grid-template-columns: 1fr;
    }

    .fc-field-row {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 720px) {
    .fc-nav-scrim.is-desktop {
        display: block;
        position: fixed;
        inset: 0;
        border: 0;
        background: transparent;
        z-index: 30;
        cursor: default;
    }
}

.fc-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    padding: 0.55rem 1rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.fc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fc-btn:not(:disabled):active {
    transform: translateY(1px);
}

.fc-btn-primary {
    background: var(--fc-accent);
    color: #fff;
}

.fc-btn-primary:hover:not(:disabled) {
    background: var(--fc-accent-strong);
}

.fc-btn-ghost {
    background: transparent;
    border-color: var(--fc-line);
    color: var(--fc-ink);
}

.fc-btn-ghost:hover:not(:disabled) {
    background: var(--fc-accent-soft);
}

.fc-btn-danger {
    background: var(--fc-danger);
    color: #fff;
}

.fc-btn-danger:hover:not(:disabled) {
    background: color-mix(in srgb, var(--fc-danger) 82%, #000);
}

.fc-btn-success {
    background: var(--fc-signal);
    color: #fff;
}

.fc-btn-success:hover:not(:disabled) {
    background: color-mix(in srgb, var(--fc-signal) 82%, #000);
}

.fc-btn-info {
    background: var(--fc-info);
    color: #fff;
}

.fc-btn-info:hover:not(:disabled) {
    background: color-mix(in srgb, var(--fc-info) 82%, #000);
}

.fc-btn-block {
    width: 100%;
}

.fc-icon-btn {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.55rem;
    border: 1px solid var(--fc-line);
    background: transparent;
    color: var(--fc-ink);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    padding: 0;
}

.fc-icon-btn:hover {
    background: var(--fc-accent-soft);
}

.theme-toggle .theme-icon {
    display: block;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0 auto;
}

.fc-input {
    width: 100%;
    border: 1px solid var(--fc-line);
    background: var(--fc-input-bg);
    color: var(--fc-ink);
    border-radius: 0.55rem;
    padding: 0.65rem 0.8rem;
    font: inherit;
}

.fc-input:focus {
    outline: 2px solid var(--fc-accent-soft);
    border-color: var(--fc-accent);
}

.fc-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.fc-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fc-ink-muted);
}

.fc-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.fc-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.fc-radio-row .fc-check {
    margin: 0.25rem 0 0;
}

.fc-hint {
    font-size: 0.78rem;
    color: var(--fc-ink-muted);
}

.fc-link-btn {
    appearance: none;
    border: 0;
    background: none;
    color: var(--fc-accent-strong);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.fc-link {
    color: var(--fc-accent-strong);
    font-weight: 700;
    text-decoration: none;
}

.fc-link:hover {
    text-decoration: underline;
}

.auth-forgot {
    margin: 0.35rem 0 0;
    font-size: 0.86rem;
}

.fc-password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.fc-password-field .fc-input {
    width: 100%;
    padding-right: 4.2rem;
}

.fc-password-toggle {
    position: absolute;
    right: 0.45rem;
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--fc-ink-muted);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.35rem 0.45rem;
}

.password-strength {
    list-style: none;
    margin: 0.45rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.2rem;
    font-size: 0.78rem;
}

.password-strength li {
    color: var(--fc-ink-muted);
}

.password-strength li::before {
    content: "○ ";
}

.password-strength li.is-ok {
    color: var(--fc-signal);
}

.password-strength li.is-ok::before {
    content: "● ";
}

.password-strength li.is-missing {
    color: var(--fc-ink-muted);
}

.fc-alert {
    border-radius: 0.65rem;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.9rem;
    font-size: 0.92rem;
}

.fc-alert-danger {
    background: rgba(180, 35, 24, 0.1);
    color: var(--fc-danger);
}

.fc-alert-info {
    background: rgba(31, 122, 92, 0.12);
    color: var(--fc-signal);
}

.fc-alert-success {
    background: rgba(31, 122, 92, 0.12);
    color: var(--fc-signal);
}

/* Modal */

.fc-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: var(--fc-modal-scrim);
    animation: fc-fade 0.18s ease;
}

.fc-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1rem;
    pointer-events: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.fc-modal-panel {
    pointer-events: auto;
    width: min(440px, 100%);
    max-height: calc(100dvh - 2rem);
    background: var(--fc-surface);
    border: 1px solid var(--fc-line);
    border-radius: 1rem;
    box-shadow: var(--fc-shadow);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.auth-modal-enter {
    animation: fc-rise 0.22s ease;
}

.fc-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.15rem 1.25rem 0.25rem;
}

.fc-modal-kicker {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fc-ink-muted);
    font-weight: 700;
}

.fc-modal-head h2 {
    margin: 0.2rem 0 0;
    font-size: 1.45rem;
}

.fc-modal-body {
    padding: 0.75rem 1.25rem 1.35rem;
}

.fc-prewrap {
    margin: 0.75rem 0 0;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}

.auth-switch {
    margin: 1rem 0 0;
    text-align: center;
    color: var(--fc-ink-muted);
    font-size: 0.92rem;
}

@keyframes fc-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fc-rise {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Dashboard */

.dash-kicker {
    margin: 0 0 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--fc-accent);
}

.dash-hero,
.guest-hero {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.dash-hero h1,
.guest-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
}

.dash-lead {
    margin: 0.75rem 0 0;
    max-width: 38rem;
    color: var(--fc-ink-muted);
    font-size: 1.05rem;
    line-height: 1.55;
}

.dash-hero {
    grid-template-columns: 1fr auto;
    align-items: end;
}

.dash-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-pill {
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-live {
    background: rgba(31, 122, 92, 0.15);
    color: var(--fc-signal);
}

.dash-time {
    font-family: var(--fc-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 860px) {
    .dash-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .guest-hero {
        grid-template-columns: 1.2fr 0.8fr;
        align-items: center;
    }

    .dash-split {
        grid-template-columns: 1.2fr 0.8fr;
    }

    .feature-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .feature-row-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.metric-tile {
    background: var(--fc-surface);
    border: 1px solid var(--fc-line);
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    animation: fc-rise 0.35s ease both;
}

.metric-tile:nth-child(2) { animation-delay: 0.05s; }
.metric-tile:nth-child(3) { animation-delay: 0.1s; }
.metric-tile:nth-child(4) { animation-delay: 0.15s; }

.metric-tile.muted {
    background: color-mix(in srgb, var(--fc-surface) 80%, transparent);
}

.metric-label {
    color: var(--fc-ink-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.metric-value {
    font-family: var(--fc-display);
    font-size: 2rem;
    line-height: 1;
}

.metric-trend {
    color: var(--fc-ink-muted);
    font-size: 0.82rem;
}

.metric-trend.up { color: var(--fc-signal); }
.metric-trend.warn { color: var(--fc-warn); }

.fleet-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

@media (min-width: 640px) {
    .fleet-status-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.fleet-status-chip {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid var(--fc-line);
    background: color-mix(in srgb, var(--fc-surface) 92%, var(--fc-ink-muted));
}

.fleet-status-chip strong {
    font-family: var(--fc-display);
    font-size: 1.45rem;
    line-height: 1;
}

.fleet-status-chip span {
    color: var(--fc-ink-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.fleet-status-chip.status-0 { /* Available */
    border-color: color-mix(in srgb, var(--fc-signal) 35%, var(--fc-line));
    background: color-mix(in srgb, var(--fc-signal) 12%, var(--fc-surface));
}

.fleet-status-chip.status-1 { /* OnRoute */
    border-color: color-mix(in srgb, #2f6fed 35%, var(--fc-line));
    background: color-mix(in srgb, #2f6fed 12%, var(--fc-surface));
}

.fleet-status-chip.status-2 { /* InService */
    border-color: color-mix(in srgb, var(--fc-warn) 40%, var(--fc-line));
    background: color-mix(in srgb, var(--fc-warn) 14%, var(--fc-surface));
}

.fleet-status-chip.status-3 { /* Broken */
    border-color: color-mix(in srgb, #c0392b 40%, var(--fc-line));
    background: color-mix(in srgb, #c0392b 12%, var(--fc-surface));
}

.fleet-status-chip.status-4 { /* Retired */
    opacity: 0.75;
}

.dash-split {
    display: grid;
    gap: 0.85rem;
}

.panel {
    background: var(--fc-surface);
    border: 1px solid var(--fc-line);
    border-radius: 1rem;
    padding: 1.1rem 1.2rem;
}

.panel-accent {
    background: linear-gradient(160deg, var(--fc-surface), color-mix(in srgb, var(--fc-accent-soft) 55%, var(--fc-surface)));
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.panel-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.panel-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fc-ink-muted);
    font-weight: 700;
}

.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.activity-list li {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    color: var(--fc-ink-muted);
}

.dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    margin-top: 0.4rem;
    flex: none;
}

.dot.amber { background: var(--fc-accent); }
.dot.green { background: var(--fc-signal); }
.dot.steel { background: var(--fc-ink-muted); }

.action-stack {
    display: grid;
    gap: 0.55rem;
}

.action-row {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid var(--fc-line);
    background: var(--fc-bg-elevated);
    color: var(--fc-ink);
    border-radius: 0.65rem;
    padding: 0.8rem 0.95rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.action-row:hover:not(:disabled) {
    border-color: var(--fc-accent);
    text-decoration: none;
}

.action-row:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.guest-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.guest-preview-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    padding: 0.85rem 1rem;
    border: 1px dashed var(--fc-line);
    border-radius: 0.85rem;
    background: color-mix(in srgb, var(--fc-surface) 88%, var(--fc-accent-soft));
}

.guest-preview-banner p {
    margin: 0;
    color: var(--fc-ink-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.status-preview {
    flex-shrink: 0;
    background: color-mix(in srgb, var(--fc-accent) 16%, transparent);
    color: var(--fc-accent);
}

.guest-preview-panel {
    position: relative;
}

.guest-preview-panel::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--fc-surface) 55%, transparent));
}

.guest-visual {
    display: grid;
    place-items: center;
    min-height: 220px;
}

.radar {
    position: relative;
    width: min(260px, 70vw);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid var(--fc-line);
    background:
        radial-gradient(circle at center, transparent 0 28%, var(--fc-radar) 29% 30%, transparent 31% 58%, var(--fc-radar) 59% 60%, transparent 61%),
        conic-gradient(from 210deg, transparent 0 70%, color-mix(in srgb, var(--fc-accent) 35%, transparent) 100%);
    animation: radar-spin 8s linear infinite;
}

.radar > span {
    position: absolute;
    inset: 18%;
    border: 1px solid var(--fc-line);
    border-radius: 50%;
    opacity: 0.7;
}

.radar > span:nth-child(2) { inset: 32%; }
.radar > span:nth-child(3) { inset: 46%; }

.radar-blip {
    position: absolute;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--fc-accent);
    box-shadow: 0 0 0 4px var(--fc-accent-soft);
}

.radar-blip.b1 { top: 28%; left: 62%; }
.radar-blip.b2 { top: 58%; left: 30%; background: var(--fc-signal); }
.radar-blip.b3 { top: 70%; left: 68%; }

@keyframes radar-spin {
    to { transform: rotate(360deg); }
}

.feature-row {
    display: grid;
    gap: 1rem;
}

.feature-row h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.feature-row p {
    margin: 0;
    color: var(--fc-ink-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

@media (min-width: 860px) and (max-width: 1100px) {
    .feature-row-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.fc-redirect-note {
    color: var(--fc-ink-muted);
    padding: 2rem 0;
}

/* Confirm email reuse */
.auth-page {
    display: flex;
    justify-content: center;
    padding: 1rem 0 2rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--fc-surface);
    border: 1px solid var(--fc-line);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--fc-shadow);
}

.auth-subtitle,
.auth-footer {
    color: var(--fc-ink-muted);
}

#blazor-error-ui {
    background: #fff3cd;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #111;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1rem;
    color: white;
}

/* Company switcher */
.company-switcher {
    position: relative;
}

.company-switcher-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    min-width: 8.5rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--fc-line);
    border-radius: 0.55rem;
    background: var(--fc-surface);
    color: var(--fc-ink);
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.company-switcher-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fc-ink-muted);
    font-weight: 700;
}

.company-switcher-btn strong {
    font-size: 0.92rem;
}

.company-switcher-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    width: min(280px, 80vw);
    background: var(--fc-surface);
    border: 1px solid var(--fc-line);
    border-radius: 0.75rem;
    box-shadow: var(--fc-shadow);
    padding: 0.4rem;
    z-index: 50;
    display: grid;
    gap: 0.25rem;
}

.company-switcher-item,
.company-switcher-add {
    display: grid;
    gap: 0.15rem;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: var(--fc-ink);
    border-radius: 0.5rem;
    padding: 0.65rem 0.7rem;
    font: inherit;
    cursor: pointer;
}

.company-switcher-item small {
    color: var(--fc-ink-muted);
}

.company-switcher-item:hover,
.company-switcher-add:hover,
.company-switcher-item.active {
    background: var(--fc-accent-soft);
}

.company-switcher-add {
    border-top: 1px solid var(--fc-line);
    margin-top: 0.2rem;
    border-radius: 0;
    font-weight: 700;
    color: var(--fc-accent-strong);
}

.company-switcher-empty {
    margin: 0.5rem;
    color: var(--fc-ink-muted);
    font-size: 0.9rem;
}

/* Settings */
.settings-layout {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 860px) {
    .settings-layout {
        grid-template-columns: 220px 1fr;
        align-items: start;
    }
}

.settings-nav {
    background: var(--fc-surface);
    border: 1px solid var(--fc-line);
    border-radius: 0.9rem;
    padding: 1rem;
    display: grid;
    gap: 0.35rem;
}

.settings-nav-title {
    margin: 0 0 0.5rem;
    font-family: var(--fc-display);
    font-weight: 700;
}

.settings-nav-link {
    color: var(--fc-ink-muted);
    text-decoration: none;
    padding: 0.55rem 0.65rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.settings-nav-link:hover,
.settings-nav-link.active {
    background: var(--fc-accent-soft);
    color: var(--fc-ink);
    text-decoration: none;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.settings-section-title {
    margin: 1.25rem 0 0.65rem;
    font-size: 1.05rem;
}

.settings-section-title:first-child {
    margin-top: 0;
}

.fc-toggle-list {
    display: grid;
    gap: 0.45rem;
}

.fc-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--fc-line);
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--fc-surface) 92%, var(--fc-bg));
    cursor: pointer;
}

.fc-toggle-row input {
    width: 1.05rem;
    height: 1.05rem;
}

.company-list {
    display: grid;
    gap: 0.75rem;
}

.company-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--fc-surface);
    border: 1px solid var(--fc-line);
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
}

.company-card.is-active {
    border-color: var(--fc-accent);
    box-shadow: inset 3px 0 0 var(--fc-accent);
}

.company-card-top {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.company-card-top h2 {
    margin: 0;
    font-size: 1.15rem;
}

.company-meta {
    margin: 0.25rem 0 0;
    color: var(--fc-ink-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.fc-empty-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
}

.fc-empty-action .company-meta {
    margin: 0;
    max-width: 36rem;
}

.fc-empty-action .fc-btn {
    display: inline-flex;
    width: auto;
    white-space: nowrap;
}

.company-card-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.company-form .fc-field-row {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.platform-ann-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    justify-content: flex-start;
}

.platform-ann-form-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.platform-ann-form-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.platform-ann-form-company {
    margin: 0;
    min-width: min(16rem, 100%);
    flex: 0 1 16rem;
}

.platform-ann-form-company .fc-input {
    margin: 0;
}

.platform-ann-form .fc-field {
    margin: 0;
    width: 100%;
}

.platform-ann-form-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 0.15rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Toasts */
.fc-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: min(420px, calc(100vw - 2rem));
    padding: 0.85rem 0.95rem;
    border-radius: 0.75rem;
    border: 1px solid var(--fc-line);
    background: var(--fc-surface);
    box-shadow: var(--fc-shadow);
    animation: fc-rise 0.2s ease;
}

.fc-toast-success { border-color: color-mix(in srgb, var(--fc-signal) 45%, var(--fc-line)); }
.fc-toast-error { border-color: color-mix(in srgb, var(--fc-danger) 45%, var(--fc-line)); }
.fc-toast-info { border-color: color-mix(in srgb, var(--fc-accent) 45%, var(--fc-line)); }

/* Fleet */
.fleet-filters { margin-bottom: 1rem; }
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.9rem;
}
.fleet-card {
    background: var(--fc-surface);
    border: 1px solid var(--fc-line);
    border-radius: 0.9rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.fleet-card-media {
    display: block;
    aspect-ratio: 16/10;
    background: var(--fc-bg-elevated);
    overflow: hidden;
}
.fleet-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fleet-card-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--fc-ink-muted);
}
.fleet-card-body { padding: 0.9rem 1rem 1rem; display: grid; gap: 0.5rem; }
.fleet-card-top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: start; }
.fleet-card-top h2 { margin: 0; font-size: 1.05rem; }
.fleet-alerts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.expiry-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--fc-line);
}
.expiry-badge.ok { color: var(--fc-signal); background: rgba(31,122,92,.1); }
.expiry-badge.warning { color: var(--fc-warn); background: rgba(180,83,9,.12); }
.expiry-badge.expired { color: var(--fc-danger); background: rgba(180,35,24,.1); }
.expiry-badge.base-fuel {
    margin-left: 0.35rem;
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.12);
}
.fleet-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}
.form-section-title {
    font-size: 1.05rem;
    margin: 1.25rem 0 0.75rem;
}
.dropzone {
    border: 1.5px dashed var(--fc-line);
    border-radius: 0.75rem;
    padding: 1rem;
    background: var(--fc-bg-elevated);
    margin-bottom: 0.75rem;
}
.dropzone.dragging { border-color: var(--fc-accent); background: var(--fc-accent-soft); }
.image-preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0.75rem 0;
}
.image-preview-item {
    width: 110px;
    border: 1px solid var(--fc-line);
    border-radius: 0.55rem;
    overflow: hidden;
    background: var(--fc-surface);
    padding: 0;
}
button.image-preview-item {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
    text-align: left;
    margin: 0;
}
.image-preview-item img { width: 100%; height: 72px; object-fit: cover; display: block; }
.image-preview-item.is-main { border-color: var(--fc-accent); }
.image-preview-item.thumb { cursor: pointer; }
.image-preview-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
    padding: 0.35rem 0.4rem;
    font-size: 0.75rem;
}
.gallery-main {
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--fc-bg-elevated);
    cursor: zoom-in;
    margin-bottom: 0.75rem;
    min-height: 160px;
}
.gallery-main img { width: 100%; max-height: 320px; min-height: 160px; object-fit: cover; display: block; }
.lightbox-panel { width: min(900px, 100%); max-width: 100%; }
.lightbox-body {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0 1rem 1rem;
}
.lightbox-body img { width: 100%; max-height: 70vh; object-fit: contain; display: block; }
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    margin: 0;
}
.detail-grid dt { color: var(--fc-ink-muted); font-size: 0.8rem; font-weight: 600; }
.detail-grid dd { margin: 0.15rem 0 0; font-weight: 600; }

.license-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.9rem;
    margin-top: 0.35rem;
}
.license-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fc-ink);
}
.table-wrap { overflow-x: auto; }
.fc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.fc-table th,
.fc-table td {
    text-align: left;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--fc-line);
}
.fc-table th {
    color: var(--fc-ink-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ops-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: end;
    margin-bottom: 1rem;
}
.ops-status-field { min-width: 180px; margin: 0; }
.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.kpi-tile {
    background: var(--fc-surface);
    border: 1px solid var(--fc-line);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    display: grid;
    gap: 0.2rem;
}
.kpi-label { color: var(--fc-ink-muted); font-size: 0.78rem; font-weight: 600; }
.kpi-tile strong { font-size: 1.35rem; font-family: var(--fc-font-display, inherit); }
.kpi-unit { color: var(--fc-ink-muted); font-size: 0.8rem; }
.ops-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 1rem 0 0.65rem;
}
.ops-tab {
    border: 1px solid var(--fc-line);
    background: var(--fc-surface);
    color: var(--fc-ink-muted);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
}
.ops-tab.active {
    background: var(--fc-accent-soft);
    color: var(--fc-ink);
    border-color: var(--fc-accent);
}
.mileage-chart { display: grid; gap: 0.45rem; }
.mileage-bar-row {
    display: grid;
    grid-template-columns: 3.2rem 1fr 4.5rem;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.82rem;
}
.mileage-bar-track {
    height: 0.55rem;
    background: var(--fc-bg-elevated);
    border-radius: 999px;
    overflow: hidden;
}
.mileage-bar-fill {
    height: 100%;
    background: var(--fc-accent);
    border-radius: 999px;
}

.report-chart-wrap {
    position: relative;
    height: 280px;
    width: 100%;
}
.report-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}
.report-summary-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--fc-line);
    padding-bottom: 0.4rem;
    font-size: 0.92rem;
}
.report-summary-list span { color: var(--fc-ink-muted); }

.report-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.85rem;
}
.report-range-hint {
    margin: 0;
    color: var(--fc-ink-muted);
    font-size: 0.9rem;
}
.report-range-hint strong {
    color: var(--fc-ink);
    font-weight: 600;
}

.report-print-header {
    display: none;
}

@media print {
    @page {
        margin: 12mm;
    }

    .fc-header,
    .fc-footer,
    .fc-atmosphere,
    .reconnect-modal,
    #blazor-error-ui,
    .fc-toast,
    .fc-modal-backdrop,
    .fc-modal,
    .no-print {
        display: none !important;
    }

    .fc-shell {
        background: #fff !important;
    }

    .fc-main {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }

    .report-print-header {
        display: block;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #ccc;
    }

    .report-print-header h2 {
        margin: 0.15rem 0;
        font-size: 1.35rem;
    }

    .report-print-area,
    .report-print-area .panel,
    .report-print-area .kpi-tile {
        break-inside: avoid;
        box-shadow: none !important;
        background: #fff !important;
        color: #111 !important;
        border-color: #ccc !important;
    }

    .report-print-area .dash-split {
        display: block;
    }

    .report-chart-wrap {
        display: none !important;
    }

    .fc-table {
        font-size: 0.78rem;
    }

    .fc-table th,
    .fc-table td {
        padding: 0.35rem 0.4rem;
    }

    a[href]::after {
        content: none !important;
    }
}

.driver-portal { max-width: 720px; margin: 0 auto; }
.driver-portal-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.driver-portal-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.driver-vehicle-card {
    display: grid;
    gap: 1rem;
    padding: 0;
    overflow: hidden;
}
.driver-vehicle-photo {
    width: 100%;
    min-height: 160px;
    max-height: 220px;
    height: auto;
    object-fit: cover;
    display: block;
    background: var(--fc-bg-elevated);
}
.driver-vehicle-body { padding: 1rem 1.1rem 1.2rem; }
.driver-reg {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0.25rem 0 0.75rem;
}
.driver-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}
.driver-action-btn {
    min-height: 3.1rem;
    font-size: 1.05rem;
}
.driver-empty { text-align: center; padding: 2rem 1.25rem; }
.fc-check { display: flex; align-items: center; gap: 0.45rem; margin: 0.65rem 0; font-size: 0.92rem; }
.driver-checklist-item { margin-bottom: 0.55rem; }
.driver-checklist-item .fc-input { margin-top: 0.35rem; }
.driver-photo-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.5rem;
    margin-top: 0.6rem;
}
.driver-photo-preview {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.driver-photo-preview img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--fc-line);
    display: block;
    background: var(--fc-bg-elevated);
}

@media (max-width: 719px) {
    .fc-modal {
        place-items: end center;
        padding: 0;
        align-items: end;
    }

    .fc-modal-panel {
        width: 100%;
        max-height: min(92dvh, calc(100dvh - 0.5rem));
        border-radius: 1rem 1rem 0 0;
    }

    .lightbox-panel {
        border-radius: 1rem 1rem 0 0;
    }

    .lightbox-body {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .lightbox-body img {
        flex: 1 1 100%;
        order: -1;
        max-height: 55vh;
        min-height: 140px;
    }

    .gallery-main img {
        max-height: 48vw;
        min-height: 140px;
    }

    .fleet-grid {
        grid-template-columns: 1fr;
    }

    .fleet-card-media {
        min-height: 160px;
    }
}

@media (min-width: 640px) {
    .driver-vehicle-card { grid-template-columns: 220px 1fr; }
    .driver-vehicle-photo { max-height: none; height: 100%; min-height: 180px; }
    .driver-actions { grid-template-columns: 1fr 1fr; }
}

.driver-available-list {
    display: grid;
    gap: 0.55rem;
}
.driver-available-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    width: 100%;
    text-align: left;
    padding: 0.85rem 1rem;
    border: 1px solid var(--fc-line);
    border-radius: 10px;
    background: var(--fc-bg-elevated);
    color: inherit;
    cursor: pointer;
}
.driver-available-item:hover {
    border-color: var(--fc-accent);
}
.driver-available-item.is-vehicle {
    background: var(--fc-signal);
    border-color: transparent;
    color: #fff;
}
.driver-available-item.is-vehicle:hover {
    background: color-mix(in srgb, var(--fc-signal) 82%, #000);
    border-color: transparent;
}
.driver-available-item.is-vehicle span {
    color: rgba(255, 255, 255, 0.88);
}
.driver-available-item.is-trailer {
    background: var(--fc-info);
    border-color: transparent;
    color: #fff;
}
.driver-available-item.is-trailer:hover {
    background: color-mix(in srgb, var(--fc-info) 82%, #000);
    border-color: transparent;
}
.driver-available-item.is-trailer span {
    color: rgba(255, 255, 255, 0.88);
}
.driver-available-item span {
    font-size: 0.88rem;
    color: var(--fc-ink-muted);
}

/* Schedule calendar */
.sched-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}
.sched-weekdays span {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--fc-ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sched-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
}
.sched-cell {
    min-height: 5.5rem;
    padding: 0.35rem;
    border: 1px solid var(--fc-line);
    border-radius: 0.55rem;
    background: var(--fc-surface);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.sched-cell.outside {
    opacity: 0.45;
}
.sched-cell.is-today {
    box-shadow: inset 0 0 0 1.5px var(--fc-accent);
}
.sched-cell-date {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--fc-ink-muted);
}
.sched-cell-items {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-height: 0;
}
.sched-chip {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-radius: 0.3rem;
    padding: 0.15rem 0.3rem;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    background: var(--fc-ink-muted);
}
.sched-chip.kind-0 { background: color-mix(in srgb, #2f6fed 75%, black 0%); }
.sched-chip.kind-1 { background: color-mix(in srgb, var(--fc-warn) 85%, black 0%); }
.sched-chip.kind-2 { background: color-mix(in srgb, var(--fc-signal) 85%, black 0%); }
.sched-chip.kind-3 { background: var(--fc-ink-muted); }
.sched-chip.is-done {
    opacity: 0.55;
    text-decoration: line-through;
}
@media (max-width: 719px) {
    .sched-cell { min-height: 3.6rem; }
    .sched-chip { font-size: 0.65rem; }
}

/* Historia przypisań — grupy pojazd + naczepa/przyczepa */
.assignment-history {
    display: grid;
    gap: 0.85rem;
}
.assignment-group {
    border: 1px solid var(--fc-border);
    border-radius: 12px;
    padding: 0.9rem 1rem 1rem;
    background: var(--fc-bg-elevated, color-mix(in srgb, var(--fc-panel) 92%, transparent));
}
.assignment-group.is-active {
    border-color: color-mix(in srgb, var(--fc-signal) 45%, var(--fc-border));
}
.assignment-group-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}
.assignment-group-title {
    margin: 0;
    font-size: 1.05rem;
    font-family: var(--fc-display);
}
.assignment-status {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 650;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}
.assignment-status.is-active {
    color: #0b5;
    background: color-mix(in srgb, #0b5 16%, transparent);
}
.assignment-status.is-closed {
    color: var(--fc-ink-muted);
    background: color-mix(in srgb, var(--fc-ink-muted) 14%, transparent);
}
.assignment-group-meta {
    display: grid;
    gap: 0.35rem;
    margin: 0.75rem 0 0.65rem;
    font-size: 0.92rem;
}
.assignment-meta-label {
    display: inline-block;
    min-width: 4.5rem;
    color: var(--fc-ink-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-right: 0.35rem;
}
.assignment-units {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}
.assignment-units li {
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: color-mix(in srgb, var(--fc-ink) 4%, transparent);
    font-size: 0.92rem;
}
.assignment-units .fc-link-btn {
    margin-left: 0.35rem;
}
.assignment-events {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--fc-border);
}
.assignment-events ol {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.3rem;
}
.assignment-events li {
    font-size: 0.88rem;
}
.assignment-events li time {
    display: inline-block;
    min-width: 8.2rem;
    color: var(--fc-ink-muted);
    font-variant-numeric: tabular-nums;
    margin-right: 0.35rem;
}
.assignment-events li.is-unassign span {
    color: var(--fc-danger, #c0392b);
}
.assignment-events li.is-assign span {
    color: color-mix(in srgb, var(--fc-signal) 80%, var(--fc-ink));
}
