/* ============================================================================
   TEFA Delegacje — Claude Designer tokens
   Wszystkie kolory, fonty, spacing z design_handoff_trasa/README.md sekcja 8
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
    /* Backgrounds */
    --bg: #F5F3EE;
    --bg-soft: #ECE9E1;
    --surface: #FFFFFF;

    /* Ink (text) */
    --ink: #15191C;
    --ink-2: #4A5256;
    --ink-3: #828A8E;

    /* Lines / borders */
    --line: #E8E4DA;
    --line-strong: #D6D1C5;

    /* Primary (forest teal) */
    --primary: #1F4D45;
    --primary-d: #163A33;

    /* Status — text color + bg */
    --status-draft-fg: #6B7176;       --status-draft-bg: #EAE6DB;
    --status-submitted-fg: #1E4699;   --status-submitted-bg: #DDE6F7;
    --status-review-fg: #7A5A1A;      --status-review-bg: #F4E9CB;
    --status-approved-fg: #1B5E3E;    --status-approved-bg: #D6EBE0;
    --status-rejected-fg: #9F2D1C;    --status-rejected-bg: #F4DAD3;
    --status-paid-fg: #0E3D38;        --status-paid-bg: #C7DDD8;

    /* Categories */
    --cat-nocleg: #1F4D45;
    --cat-transport: #5D7A9E;
    --cat-paliwo: #C77A2C;
    --cat-wyzywienie: #9B7BB8;
    --cat-parking: #7BA77A;
    --cat-inne: #828A8E;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 14px;
    --radius-2xl: 16px;
    --radius-3xl: 18px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(15, 17, 20, 0.06);
    --shadow-md: 0 18px 30px rgba(15, 17, 20, 0.08), 0 2px 6px rgba(15, 17, 20, 0.06);
    --shadow-fab: 0 10px 24px rgba(15, 17, 20, 0.25), 0 2px 6px rgba(15, 17, 20, 0.15);

    /* Fonts */
    --font-sans: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* ============================================================================
   Reset / base
   ========================================================================== */

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

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.2px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-d); }

h1, h2, h3, h4 { color: var(--ink); margin: 0; }
h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.6px; }
h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.5px; }
h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.h-display { font-size: 30px; font-weight: 600; letter-spacing: -0.8px; }

.text-body-large { font-size: 17px; font-weight: 500; letter-spacing: -0.3px; }
.text-body { font-size: 14px; font-weight: 400; letter-spacing: -0.2px; }
.text-body-small { font-size: 13px; font-weight: 400; letter-spacing: -0.1px; }
.text-caption { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.text-micro { font-size: 11px; font-weight: 500; letter-spacing: 0.3px; text-transform: uppercase; color: var(--ink-3); }
.text-muted { color: var(--ink-2); }
.text-faded { color: var(--ink-3); }

.mono { font-family: var(--font-mono); font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums; }
.mono-big { font-family: var(--font-mono); font-size: 30px; font-weight: 500; letter-spacing: -1px; }
.mono-num { font-family: var(--font-mono); font-size: 14px; font-weight: 500; letter-spacing: -0.2px; }

/* ============================================================================
   Layout — desktop shell
   ========================================================================== */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 232px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--line);
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px 24px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.4px;
    color: var(--ink);
}

.sidebar-brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: background 120ms ease, color 120ms ease;
}

.sidebar-nav .nav-link:hover {
    background: var(--bg-soft);
    color: var(--ink);
}

.sidebar-nav .nav-link.active {
    background: var(--bg-soft);
    color: var(--ink);
    font-weight: 600;
}

.sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2.5px;
    border-radius: 2px;
    background: var(--primary);
}

.sidebar-footer {
    border-top: 1px solid var(--line);
    padding-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-footer .avatar-initials { flex-shrink: 0; }
.sidebar-footer .user-name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.sidebar-footer .user-dept { font-size: 11px; color: var(--ink-3); }

.btn-logout-icon {
    margin-left: auto;
    background: none;
    border: none;
    padding: 6px;
    color: var(--ink-3);
    border-radius: 6px;
    cursor: pointer;
}
.btn-logout-icon:hover { background: var(--bg-soft); color: var(--ink); }

/* Main content */
.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    flex-shrink: 0;
}

.top-bar-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.top-bar-usermenu { flex-shrink: 0; }

/* Hamburger button — widoczny tylko mobile */
.hamburger-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius-md);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
}

.hamburger-btn span {
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 1px;
}

.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    color: var(--ink-3);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.sidebar-close-btn:hover { background: var(--bg-soft); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99;
}
.sidebar-overlay.show { display: block; }

/* ============================================================================
   User menu (topbar dropdown)
   ========================================================================== */

.usermenu { position: relative; }

.usermenu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease;
}
.usermenu-trigger:hover { background: var(--bg-soft); border-color: var(--line); }

.usermenu-trigger-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.usermenu-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.usermenu-role { font-size: 11px; color: var(--ink-3); }
.usermenu-caret { color: var(--ink-3); font-size: 10px; }

.usermenu-overlay {
    position: fixed;
    inset: 0;
    z-index: 199;
    background: transparent;
}

.usermenu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 240px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: 200;
    padding: 6px;
    animation: usermenu-in 140ms ease-out;
}

@keyframes usermenu-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.usermenu-header { padding: 10px 12px 8px; }
.usermenu-divider { height: 1px; background: var(--line); margin: 4px 0; }

.usermenu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    font-family: inherit;
}
.usermenu-item:hover { background: var(--bg-soft); }
.usermenu-item-logout { color: var(--status-rejected-fg); }
.usermenu-item-logout:hover { background: var(--status-rejected-bg); }

/* ============================================================================
   Modal dialog
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
}

.modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 24px;
    width: 640px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 201;
}

@media (max-width: 640px) {
    .modal-dialog { width: 100%; max-width: 100%; border-radius: var(--radius-lg); }
    .settings-grid { grid-template-columns: 1fr !important; }
    .drawer-panel { width: 100% !important; }
}

/* ============================================================================
   Drawer side-panel (slide-in from right)
   ========================================================================== */

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 150;
}

.drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    z-index: 151;
    display: flex;
    flex-direction: column;
    animation: drawer-in 240ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes drawer-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.drawer-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.drawer-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    background: var(--bg-soft);
}

.drawer-close {
    background: none;
    border: none;
    color: var(--ink-3);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
}
.drawer-close:hover { background: var(--bg-soft); color: var(--ink); }

.data-table tbody tr.row-clickable { cursor: pointer; }

.top-bar-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.4px;
}

.top-bar-breadcrumb {
    font-size: 13px;
    color: var(--ink-3);
}

.top-bar-extras { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.content-area {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* ============================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card-elevated { box-shadow: var(--shadow-md); }
.card-tight { padding: 16px; }
.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 600; letter-spacing: -0.3px; }

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.kpi-label { font-size: 11px; font-weight: 500; letter-spacing: 0.3px; text-transform: uppercase; color: var(--ink-3); }
.kpi-value { font-family: var(--font-mono); font-size: 26px; font-weight: 500; letter-spacing: -0.6px; color: var(--ink); }
.kpi-delta { font-size: 12px; color: var(--ink-3); }
.kpi-delta-up { color: var(--status-approved-fg); }
.kpi-delta-down { color: var(--status-rejected-fg); }

/* ============================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
    line-height: 1.2;
    text-decoration: none;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); color: #fff; }

.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--bg-soft); }

.btn-ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); }

.btn-danger { background: var(--status-rejected-fg); color: #fff; border-color: var(--status-rejected-fg); }
.btn-danger:hover { background: #842318; }

.btn-success { background: var(--status-approved-fg); color: #fff; border-color: var(--status-approved-fg); }
.btn-success:hover { background: #154d33; }

.btn-lg { padding: 12px 18px; font-size: 14px; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* ============================================================================
   Status badges
   ========================================================================== */

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1;
}

.badge-status-draft     { color: var(--status-draft-fg);     background: var(--status-draft-bg); }
.badge-status-submitted { color: var(--status-submitted-fg); background: var(--status-submitted-bg); }
.badge-status-review    { color: var(--status-review-fg);    background: var(--status-review-bg); }
.badge-status-approved  { color: var(--status-approved-fg);  background: var(--status-approved-bg); }
.badge-status-rejected  { color: var(--status-rejected-fg);  background: var(--status-rejected-bg); }
.badge-status-paid      { color: var(--status-paid-fg);      background: var(--status-paid-bg); }

/* ============================================================================
   Avatar (inicjały w kółku)
   ========================================================================== */

.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    user-select: none;
}

.avatar-initials.size-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-initials.size-md { width: 32px; height: 32px; font-size: 12px; }
.avatar-initials.size-lg { width: 40px; height: 40px; font-size: 14px; }
.avatar-initials.size-xl { width: 56px; height: 56px; font-size: 18px; }

/* ============================================================================
   Method tag (Karta firmowa itp.)
   ========================================================================== */

.method-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    color: var(--ink);
    background: var(--bg-soft);
    border: 1px solid var(--line);
    line-height: 1;
}

.method-tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================================================
   Category icon + dot
   ========================================================================== */

.cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    background: var(--bg-soft);
    font-size: 14px;
    flex-shrink: 0;
}

.cat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cat-dot-nocleg     { background: var(--cat-nocleg); }
.cat-dot-transport  { background: var(--cat-transport); }
.cat-dot-paliwo     { background: var(--cat-paliwo); }
.cat-dot-wyzywienie { background: var(--cat-wyzywienie); }
.cat-dot-parking    { background: var(--cat-parking); }
.cat-dot-inne       { background: var(--cat-inne); }

/* Category bar (stacked horizontal) */
.cat-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--line);
    overflow: hidden;
    display: flex;
}

.cat-bar-seg { height: 100%; }

/* ============================================================================
   Tables
   ========================================================================== */

.data-table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead th {
    background: var(--bg-soft);
    color: var(--ink-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}

.data-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    color: var(--ink);
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg); }

.data-table .col-num {
    text-align: right;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.data-table .col-checkbox { width: 36px; padding-right: 0; }

.sort-header { cursor: pointer; user-select: none; }
.sort-header:hover { color: var(--ink); }

/* ============================================================================
   Forms
   ========================================================================== */

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-label-text { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.1px; }

.form-control, .form-select {
    width: 100%;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31, 77, 69, 0.12);
}

.form-control::placeholder { color: var(--ink-3); }

.form-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check-input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.form-check-label { font-size: 13px; color: var(--ink); cursor: pointer; }

.validation-message { color: var(--status-rejected-fg); font-size: 12px; margin-top: 4px; }

/* Toggle switch */
.form-switch { position: relative; width: 36px; height: 20px; display: inline-block; }
.form-switch input { opacity: 0; width: 0; height: 0; }
.form-switch .slider {
    position: absolute; inset: 0;
    background: var(--line-strong);
    border-radius: var(--radius-pill);
    transition: background 200ms ease;
    cursor: pointer;
}
.form-switch .slider::before {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 200ms ease;
    box-shadow: var(--shadow-sm);
}
.form-switch input:checked + .slider { background: var(--primary); }
.form-switch input:checked + .slider::before { transform: translateX(16px); }

/* ============================================================================
   Filter chips
   ========================================================================== */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 0 16px 0;
    background: var(--bg);
}

.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 360px;
}

.search-input-wrap .form-control {
    padding-left: 36px;
}

.search-input-wrap .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-3);
    pointer-events: none;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-2);
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease;
}

.filter-chip:hover { border-color: var(--ink-3); }
.filter-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ============================================================================
   Bulk action bar
   ========================================================================== */

.bulk-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius-lg);
    margin: 12px 0;
}

.bulk-bar .bulk-count { font-weight: 600; font-size: 13px; }
.bulk-bar .bulk-actions { margin-left: auto; display: flex; gap: 8px; }
.bulk-bar .btn { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.bulk-bar .btn:hover { background: rgba(255, 255, 255, 0.22); }

/* ============================================================================
   Login page (desktop / mobile bezpośrednio)
   ========================================================================== */

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 24px;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    padding: 32px;
    width: 100%;
    max-width: 420px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.login-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.login-title { font-size: 22px; font-weight: 600; letter-spacing: -0.5px; margin-bottom: 4px; }
.login-subtitle { color: var(--ink-3); font-size: 13px; margin-bottom: 24px; }

.login-footer-note {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    color: var(--ink-3);
}

/* ============================================================================
   Mobile shell
   ========================================================================== */

.mobile-shell {
    min-height: 100vh;
    background: var(--bg);
    padding-bottom: 80px;
}

.mobile-content { padding: 16px; }

.mobile-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    display: flex;
    z-index: 10;
}

.mobile-tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--ink-3);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
}

.mobile-tabbar a.active { color: var(--primary); }

.fab {
    position: fixed;
    bottom: 82px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-fab);
    cursor: pointer;
    z-index: 9;
    font-size: 24px;
}

/* TripCard mobile */
.trip-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-2xl);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.trip-card-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    border-radius: var(--radius-3xl);
    padding: 20px;
}

.trip-card-primary .text-muted,
.trip-card-primary .text-faded { color: rgba(255, 255, 255, 0.7); }

/* ============================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 240ms cubic-bezier(0.2, 0.7, 0.3, 1);
    }
    .app-sidebar.mobile-open { transform: translateX(0); }
    .hamburger-btn { display: flex; }
    .sidebar-close-btn { display: inline-flex; }
    .top-bar { padding: 0 16px; gap: 12px; }
    .content-area { padding: 16px; }
    .usermenu-trigger-text { display: none; }
    .usermenu-caret { display: none; }
}

/* ============================================================================
   Misc
   ========================================================================== */

.divider { height: 1px; background: var(--line); margin: 16px 0; }
.flex-row { display: flex; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-success { color: var(--status-approved-fg); }
.text-danger { color: var(--status-rejected-fg); }
.text-warning { color: var(--status-review-fg); }

.grid-cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-dashboard { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 16px; }

@media (max-width: 1100px) {
    .grid-dashboard { grid-template-columns: 1fr 1fr; }
    .grid-cols-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4, .grid-dashboard { grid-template-columns: 1fr; }
}

.blazor-error-boundary {
    background: var(--status-rejected-bg);
    color: var(--status-rejected-fg);
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 16px;
}
.blazor-error-boundary::after { content: 'Wystąpił błąd. Odśwież stronę lub skontaktuj się z administratorem.'; }
