﻿/* ---------------------- PODSTAWOWE RESETY I TYPOGRAFIA ---------------------- */

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    color: #333;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    color: #1b6ec2;
}

/* ---------------------- UPLOAD SECTION ---------------------- */

.upload-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.selected-file {
    font-size: 0.95rem;
    color: #2e7d32;
}

.send-file-btn {
    white-space: nowrap;
}

/* ---------------------- KARTA CIĘŻARÓWKI ---------------------- */

.truck-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: transform 0.15s ease;
}

    .truck-card:hover {
        transform: translateY(-2px);
    }

.truck-card-header {
    background-color: #e3f2fd;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.truck-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.95rem;
    color: #1b6ec2;
}

.truck-card-header .btn {
    font-size: 0.85rem;
}

.truck-details {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Lepszy przycisk Show/Hide details */
.btn-toggle-details {
    background: #eef5ff;
    border: 1px solid #3567d6;
    color: #0b3d91;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

    .btn-toggle-details:hover {
        background: #e3edff;
        color: #082e73;
        border-color: #2e59c7;
    }

    .btn-toggle-details:focus {
        outline: 3px solid rgba(53,103,214,.25);
        outline-offset: 1px;
    }

/* ---------------------- STATYSTYKI CIĘŻARÓWKI ---------------------- */

.truck-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

    .truck-stats div {
        background: #e8f5e9;
        padding: 0.5rem 0.75rem;
        border-radius: 4px;
        border-left: 4px solid #43a047;
    }

/* ---------------------- KONTENERY STOJAKÓW (layout strony) ---------------------- */

.rack-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 0.75rem;
    border-radius: 6px;
    background: #fafafa;
    border: 1px solid #ddd;
}

    .rack-item + .rack-item {
        margin-top: 1rem;
    }

.rack-item-info {
    flex: 0 0 40%;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
    text-align: left;
}

    .rack-item-info .rack-item-title {
        font-weight: 600;
        color: #444;
        font-size: 1rem;
    }

    .rack-item-info .rack-item-weight,
    .rack-item-info .rack-item-filled,
    .rack-item-info .rack-item-orders {
        color: #555;
    }

.rack-item-windows {
    text-align: left;
}

.rack-windows-list {
    list-style: disc inside;
    margin: 0.5rem 0 0 0;
    padding-left: 1.2rem;
    font-size: 0.8rem;
}

.rack-item-windows > strong::before {
    content: "🪟 ";
}

.rack-results-flex {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    width: 100%;
    flex-wrap: wrap;
}

.rack-results-description {
    flex: 0 0 30%;
    min-width: 240px;
    max-width: 350px;
    background: #ffffff;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.rack-results-visualization {
    flex: 1 1 0%;
    min-width: 380px;
    max-width: 1000px;
}

@media (max-width: 900px) {
    .rack-results-flex {
        flex-direction: column;
    }

    .rack-results-description, .rack-results-visualization {
        width: 100%;
    }
}

/* Wrapper pod wizualizację RackLayout (sam RackLayout ma własne style izolowane) */
.rack-visual-wrapper {
    position: relative;
    overflow: auto;
    /* elastyczna szerokość – dopasuj się do kontenera */
    width: 100%;
    min-width: 0;
    max-width: 100%;
    /* wysokość wg potrzeb – jeśli chcesz stałe maksimum, zostaw: */
    max-height: 350px;
    /* reszta bez zmian */
    flex: 1 1 auto;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}


/* ---------------------------------------------------------------- */
/*                SIMPLE-CALENDAR GLOBAL OVERRIDES                  */
/* ---------------------------------------------------------------- */

.simple-calendar .cal-grid {
    width: 100% !important;
}

.simple-calendar .cal-week-row {
    display: grid !important;
    grid-template-columns: 3rem repeat(7, 1fr) !important;
    gap: 1px !important;
    width: 100% !important;
}

.simple-calendar .cal-days-header {
    display: grid !important;
    grid-template-columns: 3rem repeat(7, 1fr) !important;
    width: 100% !important;
}

.simple-calendar .cal-cell,
.simple-calendar .cal-week-number,
.simple-calendar .cal-week-number-header,
.simple-calendar .cal-day-name {
    width: 100% !important;
}

.simple-calendar .cal-cell {
    box-sizing: border-box;
}

.simple-calendar .cal-toolbar,
.simple-calendar .cal-days-header {
    width: 100% !important;
}

/* Karty ogólne (hover) */
.d-flex .card {
    transition: transform .2s, box-shadow .2s;
}

    .d-flex .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

/* ── Pretty spinner ───────────────────────────────────────────────── */
.spinner-pulse {
    width: 1.75rem;
    height: 1.75rem;
    border: .25em solid rgba(0,0,0,.1);
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite, pulse 1.4s ease-in-out infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(13,110,253,.4);
    }

    50% {
        box-shadow: 0 0 0 .45rem rgba(13,110,253,0);
    }
}

/* ---------- karta stojaka (meta-layout na stronie) ---------- */
.rack-card {
    background: #fff;
    border: 1px solid #dbe4f3;
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 2px 9px #1b33531a;
    margin-bottom: 1.3rem;
}

.rack-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1b3353;
    margin-bottom: 6px;
}

.rack-name {
    font-size: 1rem;
}

.rack-size {
    font-size: .8rem;
    color: #5c6b83;
    font-weight: 400;
}

.rack-zoom {
    background: #eef4ff;
    border: 1px solid #b2c4e8;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .14s;
}

    .rack-zoom:hover {
        background: #dfeaff;
        box-shadow: 0 0 0 3px #275be333;
    }

/* Ikonka pinezki jako kolorowa kropka (np. statusy stojaków) */
.rack-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 2px rgba(0,0,0,.35);
}

.rack-Available {
    background: #2ecc71;
}
/* zielony */
.rack-Reserved {
    background: #f1c40f;
}
/* żółty  */
.rack-InTransit {
    background: #3498db;
}
/* niebieski */
.rack-AtClient {
    background: #e74c3c;
}
/* czerwony */

/* Drag & drop list */
.stop-list li.dragging {
    opacity: 0.5;
    background-color: #f0ad4e !important;
    border: 2px dashed #d9534f !important;
}

.list-group-item.dragging {
    opacity: 0.6;
    background-color: #fff8e1;
    transform: scale(1.02);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.list-group-item {
    transition: transform 0.25s ease;
}


/* Opcjonalnie: delikatne zagęszczenie pionowe, żeby wszystko wyglądało „spójnie” */
html.compact-80 .nav-item ::deep a {
    height: 2.6rem;
    line-height: 2.6rem;
}

html.compact-80 .nav-user-box {
    padding: 0.7rem 0.9rem;
}
/* ===== Route Plans – Pickup Modal (global z .razor.css) ===== */

/* Zablokuj scroll tła, gdy modal otwarty */
:global(html.rn-modal-open),
:global(html.rn-modal-open body) {
    overflow: hidden !important;
}

/* Backdrop na cały ekran + centrowanie modala */
:global(.rn-modal-backdrop) {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,.45);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 50000;
}

/* Panel modala */
:global(.rn-modal) {
    position: relative;
    width: min(96vw, 960px);
    max-height: 90vh;
    background: #fff;
    color: #1b1f24;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0 auto;
    z-index: 50001;
}

/* Header / Footer */
:global(.rn-modal-h),
:global(.rn-modal-f) {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f9fafb;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

:global(.rn-modal-f) {
    border-top: 1px solid rgba(0,0,0,.08);
    border-bottom: 0;
}

/* Body przewijalne */
:global(.rn-modal-b) {
    padding: 12px 14px;
    overflow: auto;
}

/* Utilsy i przyciski */
:global(.rn-grow) {
    flex: 1 1 auto;
}

:global(.rn-chip) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .85rem;
    background: #eef2ff;
    color: #273a7a;
}

:global(.rn-chip.muted) {
    background: #f2f4f7;
    color: #475467;
}

:global(.rn-btn) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #d0d5dd;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
}

:global(.rn-btn:hover) {
    background: #f8fafc;
}

:global(.rn-btn.primary) {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

:global(.rn-btn.primary:hover) {
    filter: brightness(.96);
}

/* Tabela */
:global(.table-wrap) {
    overflow: auto;
}

:global(.rn-table) {
    width: 100%;
    border-collapse: collapse;
}

:global(.rn-table thead th) {
    text-align: left;
    font-size: .9rem;
    font-weight: 700;
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

:global(.rn-table tbody td) {
    padding: 8px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* Responsywność */
@media (max-width: 640px) {
    :global(.rn-modal) {
        width: 96vw;
    }

    :global(.rn-modal-h),
    :global(.rn-modal-b),
    :global(.rn-modal-f) {
        padding: 10px;
    }

    :global(.rn-table thead th),
    :global(.rn-table tbody td) {
        padding: 6px;
    }
}

/* === Pickup modal – kosmetyka / centrowanie / dostępność === */

/* blokada scrolla tła gdy modal otwarty (klasa dodawana w JS) */
:global(html.rn-modal-open),
:global(html.rn-modal-open body) {
    overflow: hidden !important;
}

/* backdrop i panel – spójne z-indexy i wyśrodkowanie */
:global(.rn-modal-backdrop) {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,.45);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 50000;
}

:global(.rn-modal) {
    position: relative;
    width: min(960px, 96vw);
    max-height: 90vh;
    background: #fff;
    color: #1b1f24;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0 auto;
    z-index: 50001;
}

/* header / footer – bez drag cursor */
:global(.rn-modal-h),
:global(.rn-modal-f) {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f9fafb;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

:global(.rn-modal-h) {
    cursor: default;
}

:global(.rn-modal-f) {
    border-top: 1px solid rgba(0,0,0,.08);
    border-bottom: 0;
}

/* body przewijalne */
:global(.rn-modal-b) {
    padding: 12px 14px;
    overflow: auto;
}

/* tabela – hover i „klejący” thead */
:global(.table-wrap) {
    overflow: auto;
    border: 1px solid #e7ebf3;
    border-radius: 10px;
}

:global(.rn-table) {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

:global(.rn-table thead th) {
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: left;
    font-size: .9rem;
    font-weight: 700;
    padding: 10px 8px;
    background: #f7f9fd;
    border-bottom: 1px solid #e9edf5;
}

:global(.rn-table tbody td) {
    padding: 8px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

:global(.rn-table tbody tr:hover) {
    background: #f8fafc;
}

/* przyciski i chipy – lekka typografia i focus ring */
:global(.rn-btn) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #d0d5dd;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
}

:global(.rn-btn:hover) {
    background: #f8fafc;
}

:global(.rn-btn:focus-visible) {
    outline: 2px solid #0d6efd66;
    outline-offset: 2px;
}

:global(.rn-btn.primary) {
    background: var(--pref-blue, #0d6efd);
    color: #fff;
    border-color: var(--pref-blue, #0d6efd);
}

:global(.rn-btn.primary:hover) {
    filter: brightness(.96);
}

:global(.rn-chip) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .85rem;
    background: #eef2ff;
    color: #273a7a;
}

:global(.rn-chip.muted) {
    background: #f2f4f7;
    color: #475467;
}

/* responsywność */
@media (max-width: 640px) {
    :global(.rn-modal) {
        width: 96vw;
    }

    :global(.rn-modal-h), :global(.rn-modal-b), :global(.rn-modal-f) {
        padding: 10px;
    }

    :global(.rn-table thead th), :global(.rn-table tbody td) {
        padding: 6px;
    }
}
/* 🔐 Login modal – mniejsza szerokość niż domyślny Bootstrap */
.login-modal {
    max-width: 360px; /* dostosuj: 340–400px wedle gustu */
    margin: 0 auto;
    border-radius: 16px;
}

    /* Opcjonalnie logo w modalu logowania */
    .login-modal .login-logo {
        max-width: 180px;
        height: auto;
    }
.nav-user-support {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(255,255,255,0.2);
}

.support-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

/* ten sam kształt co Logout – zmieniamy tylko kolory */
.support-btn {
    border-color: #00bcd4;
    color: #e0f7fa;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    transition: background-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
}

    .support-btn:hover {
        background: #00bcd4;
        color: #04173D; /* Twój granat sidebara */
        box-shadow: 0 0 0 1px rgba(0, 188, 212, 0.4);
        transform: translateY(-1px);
    }

    .support-btn:active {
        transform: translateY(0);
        box-shadow: none;
    }
