/* Portal Klienta - Custom Styles dla Tabler */

:root {
    --primary-color: #206bc4;
    --success-color: #2fb344;
    --danger-color: #d63939;
    --warning-color: #f76707;
    --info-color: #4299e1;
}

/* Ogólne */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Ekran logowania - tło */
#loginPage {
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url("../images/bg-G_fqzbt.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Kontener i karta logowania */
#loginPage .container {
    position: relative;
}

/* Karta z przezroczystością */
#loginPage .card {
    background: rgba(255, 255, 255, 0.75) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

#loginPage .card-body {
    background: transparent !important;
}

.page-wrapper {
    padding-top: 0;
}

.page-body {
    padding-top: 0;
}

/* Page header - zmniejszony odstęp od góry */
.page-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0.25rem !important;
}

.page-title {
    margin-bottom: 0 !important;
}

/* Sekcja - zmniejszony padding */
.section {
    padding-top: 0 !important;
}

.section .container-xl {
    padding-top: 0 !important;
}

.page-body {
    padding-top: 0.5rem !important;
}

.page-body .container-xl {
    padding-top: 0 !important;
}

@media (max-width: 767.98px) {
    .page-body {
        margin-top: 0;
    }

    .portal-title-bar {
        min-height: 0;
    }
}

/* Font Awesome - dostosowanie ikon */
.icon {
    display: inline-block;
    vertical-align: middle;
}

/* Ikony w nagłówkach kart */
.card-title .icon {
    vertical-align: -0.125em;
    font-size: 1.1em;
    line-height: 1;
}

.card-actions .icon {
    vertical-align: middle;
}

/* Logo Portal Klienta */
.portal-logo {
    height: 2em;
    width: auto;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.navbar-brand .portal-logo {
    height: 1.5em;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

/* Nawigacja */
.nav-btn {
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn.active {
    background-color: var(--tblr-primary);
    color: white !important;
}

.nav-btn.active .nav-link-icon {
    color: white !important;
}

/* Badge na ikonie w menu */
.nav-link-icon .badge {
    font-size: 0.625rem;
    padding: 0.25em 0.4em;
    min-width: 1.2em;
    height: 1.2em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10rem;
    box-shadow: 0 0 0 2px white;
}

/* Badge na ikonie w szybkich akcjach */
.quick-action-icon + .badge {
    font-size: 0.875rem;
    padding: 0.35em 0.5em;
    min-width: 1.5em;
    height: 1.5em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10rem;
    box-shadow: 0 0 0 3px white;
}

/* Sekcja kontakt - doradca */
.advisor-header {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.advisor-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.advisor-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.advisor-info {
    flex: 1;
    min-width: 150px;
}

.service-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.advisor-contact-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.advisor-contact-link:hover {
    color: var(--info-color);
    text-decoration: underline;
}

/* Kafel pojazdu - nowa struktura */
.vehicle-card-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.vehicle-plate-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.vehicle-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background: #f8fafc;
}

.vehicle-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-model-compact {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    padding-top: 4px;
}

.vehicle-model-display {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.damage-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.damage-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.damage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.damage-card.uniqa {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.damage-card.uniqa:hover {
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.damage-card.pzu {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.damage-card.pzu:hover {
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.damage-card.hestia {
    background: linear-gradient(135deg, #16a085 0%, #0e7c68 100%);
    box-shadow: 0 4px 12px rgba(22, 160, 133, 0.3);
}

.damage-card.hestia:hover {
    box-shadow: 0 6px 16px rgba(22, 160, 133, 0.4);
}

.damage-card-icon {
    font-size: 1.25rem;
    margin-bottom: 4px;
    opacity: 0.9;
}

.damage-card-insurance {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.9;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.damage-card-number {
    font-size: 0.9rem;
    font-weight: 700;
    word-break: break-all;
    line-height: 1.3;
}

/* Tablica rejestracyjna - w stylu BPFlow */
.vehicle-plate {
    position: relative;
    display: inline-block;
    background: #fff;
    border: 2px solid #000;
    border-radius: 5px;
    min-width: 170px;
    width: auto;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.vehicle-plate-number {
    font-size: 30px;
    line-height: 42px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    color: #000;
    padding-left: 10px;
    padding-right: 10px;
    border-left: 35px solid #485db2;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
    text-align: center;
    letter-spacing: 0px;
}

.vehicle-plate-eu {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 35px;
    background: #485db2;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3px;
}

.vehicle-plate-stars {
    font-size: 28px;
    line-height: 32px;
    margin: 0;
}

.vehicle-plate-pl {
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    font-family: Arial, sans-serif;
    margin-top: -4px;
}

/* Status zlecenia */
.status-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    background: #f8fafc;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

/* Modal informacyjny o statusach */
.status-info-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.status-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.status-info-item:hover {
    background: #f1f5f9;
}

.status-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.status-info-icon.completed {
    background: #d1f4e0;
    color: var(--success-color);
}

.status-info-icon.in-progress {
    background: #cfe2ff;
    color: var(--primary-color);
}

.status-info-icon.pending {
    background: #e9ecef;
    color: #6c757d;
}

.status-info-icon.pending-action {
    background: #dbeafe;
    color: #2563eb;
}

.status-info-icon.verification {
    background: #fef3c7;
    color: #f59e0b;
}

.status-info-icon.tu-rejected {
    background: #fee2e2;
    color: #dc2626;
}

.status-info-icon.invoiced {
    background: #dbeafe;
    color: #2563eb;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.status-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.status-item.completed .status-item-icon {
    background: #d1f4e0;
    color: var(--success-color);
}

.status-item.in-progress .status-item-icon {
    background: #cfe2ff;
    color: var(--primary-color);
}

.status-item.pending .status-item-icon {
    background: #e9ecef;
    color: #6c757d;
}

.status-item.pending-action .status-item-icon {
    background: #dbeafe;
    color: #2563eb;
}

.status-item.verification .status-item-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.status-item.tu-rejected .status-item-icon {
    background: #fee2e2;
    color: #dc2626;
}

.status-item.invoiced .status-item-icon {
    background: #dbeafe;
    color: #2563eb;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.status-item-content {
    flex: 1;
}

.status-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.status-item-description {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.status-item.completed .status-item-title {
    color: var(--success-color);
}

.status-item.in-progress .status-item-title {
    color: var(--primary-color);
}

.status-item.pending-action .status-item-title {
    color: #2563eb;
}

.status-item.verification .status-item-title {
    color: #f59e0b;
}

.status-item.tu-rejected .status-item-title {
    color: #dc2626;
}

.status-item.invoiced .status-item-title {
    color: #2563eb;
}

.status-item.pending-action:hover,
.status-item.verification:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

/* Progress - Dashboard - Timeline */
#dashboardProgress {
    position: relative;
    padding: 30px 40px 50px 40px;
    overflow-x: auto;
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
    border-radius: 8px;
}

.timeline-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-width: 100%;
}

.timeline-line {
    position: absolute;
    top: 25px;
    left: 3%;
    right: 3%;
    height: 4px;
    background: #e9ecef;
    z-index: 0;
    border-radius: 2px;
}

.timeline-line-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
    transition: width 0.5s ease;
    z-index: 1;
    border-radius: 2px;
    width: var(--progress, 0%);
}

.timeline-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    z-index: 2;
}

.timeline-step-node {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #e9ecef;
    color: #6c757d;
    border: 4px solid #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-step-node:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.timeline-step.completed .timeline-step-node {
    background: var(--success-color);
    color: white;
}

.timeline-step.current .timeline-step-node {
    background: var(--primary-color);
    color: white;
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(32, 107, 196, 0.7);
}

.timeline-step.pending .timeline-step-node {
    background: #e9ecef;
    color: #adb5bd;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(32, 107, 196, 0.7);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(32, 107, 196, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(32, 107, 196, 0);
    }
}

.timeline-step-content {
    margin-top: 16px;
    text-align: center;
    max-width: 120px;
    min-height: 50px;
}

.timeline-step-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    margin-bottom: 4px;
}

.timeline-step.completed .timeline-step-name {
    color: var(--success-color);
}

.timeline-step.current .timeline-step-name {
    color: var(--primary-color);
}

.timeline-step.pending .timeline-step-name {
    color: #6c757d;
}

.timeline-step-date {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
}

/* Etapy naprawy - rozszerzone */
.stage-card {
    border-left: 3px solid #e9ecef;
    transition: all 0.3s ease;
}

.stage-card .card-body {
    padding: 0.875rem 1rem;
}

.stage-card.completed {
    border-left-color: var(--success-color);
    background: #f0fdf4;
}

.stage-card.current {
    border-left-color: var(--primary-color);
    background: #eff6ff;
}

.stage-card.pending {
    border-left-color: #e9ecef;
}

.stage-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.stage-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: #e9ecef;
    color: #6c757d;
    flex-shrink: 0;
}

.stage-card.completed .stage-icon {
    background: var(--success-color);
    color: white;
}

.stage-card.current .stage-icon {
    background: var(--primary-color);
    color: white;
}

.stage-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.stage-date {
    color: #6c757d;
    font-size: 12px;
    white-space: nowrap;
}

.stage-message {
    margin-top: 6px;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

/* Galeria zdjęć - kategorie */
.photo-category-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #e9ecef;
}

.photo-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.photo-category-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f8fafc 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.photo-category-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(32, 107, 196, 0.1) 0%, rgba(32, 107, 196, 0.05) 100%);
}

.photo-category-icon {
    font-size: 64px;
    color: #cbd5e0;
    position: relative;
    z-index: 1;
}

.photo-category-card:hover .photo-category-icon {
    color: var(--primary-color);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.photo-category-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.photo-category-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.3;
}

.photo-category-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    flex: 1;
}

.photo-category-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    width: fit-content;
}

.photo-category-count i {
    font-size: 14px;
}

/* Stare style dla pojedynczych zdjęć - zachowane dla kompatybilności */
.photo-item {
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 8px;
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.photo-title {
    margin-top: 8px;
    font-weight: 500;
    text-align: center;
}

/* Lista dokumentów */
.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    background: white;
    gap: 16px;
}

.document-item:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.document-item:last-child {
    margin-bottom: 0;
}

.document-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.document-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    border-radius: 8px;
    font-size: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.document-details {
    flex: 1;
    min-width: 0;
}

.document-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-meta {
    font-size: 12px;
    color: #6c757d;
}

.document-item .btn {
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 110px;
    padding: 0.5rem 1rem;
    font-size: 14px;
}

.document-item .btn .icon {
    font-size: 14px;
}

/* Zwijalna lista plików klienta */
.collapsible-list-wrapper {
    position: relative;
}

#clientFilesList,
#clientPreOrderWorkshopFilesList,
#clientPreOrderYourFilesList {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

#clientFilesList.expanded,
#clientPreOrderWorkshopFilesList.expanded,
#clientPreOrderYourFilesList.expanded {
    max-height: 3000px;
}

.collapsible-list-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.collapsible-list-fade.hidden {
    display: none;
}

.collapsible-list-toggle {
    margin-top: 6px;
}

/* Spinner dla pól tekstowych */
.survey-input.loading {
    position: relative;
}

.survey-input.loading + .fa-spinner {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Czat */
#chatMessages {
    max-height: 500px;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
}

.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.chat-message.client {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.chat-message.service .chat-avatar {
    background: var(--success-color);
}

.chat-content {
    flex: 1;
    max-width: 70%;
}

.chat-bubble {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chat-message.client .chat-bubble {
    background: var(--primary-color);
    color: white;
}

.chat-time {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    padding: 0 8px;
}

/* Upload area */
.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 48px 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary-color);
    background-color: #f0f9ff;
}

.upload-area > i.fa-cloud-upload-alt {
    display: block !important;
    font-size: 4rem !important;
    margin: 0 auto 16px !important;
    color: #cbd5e0;
}

.upload-area:hover > i.fa-cloud-upload-alt {
    color: var(--primary-color);
}

.upload-area h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.upload-area p {
    margin-bottom: 16px;
}

.upload-area > i,
.upload-area > h3,
.upload-area > p,
.upload-area > div {
    pointer-events: none;
    position: relative;
    z-index: 1;
}

/* Background image for category uploaders */
.upload-area.has-background {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.upload-area.has-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    z-index: 0;
    pointer-events: none;
    transition: background 0.3s ease;
}

.upload-area.has-background:hover::before,
.upload-area.has-background.drag-over::before {
    background: rgba(240, 249, 255, 0.60);
}

.upload-area.has-background:hover,
.upload-area.has-background.drag-over {
    background-color: transparent;
}

.upload-area.has-background > i.fa-cloud-upload-alt,
.upload-area.has-background:hover > i.fa-cloud-upload-alt {
    color: var(--primary-color);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.upload-area.has-background h3,
.upload-area.has-background p,
.upload-area.has-background > div {
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}


/* Equal-height uploader category cards */
.uploader-category-card {
    display: flex;
    flex-direction: column;
}

.uploader-category-header {
    min-height: 4.25rem;
    gap: 0.5rem;
}

.uploader-category-title {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.uploader-category-card > .card-body {
    flex: 1 1 auto;
}

/* Instruction icon next to category title */
.uploader-instruction-btn {
    cursor: pointer;
    color: var(--primary-color);
    line-height: 1;
    border: none;
    background: transparent;
    padding: 0.25rem;
}

.uploader-instruction-btn:hover {
    color: #1a569d;
}

.uploader-instruction-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.upload-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 8px;
}

.upload-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 6px;
    font-size: 20px;
}

.upload-details {
    flex: 1;
}

.upload-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.upload-progress {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.uploaded-file-item {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
}

.uploaded-file-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.uploaded-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 16px;
    display: block;
}

.empty-state p {
    margin-bottom: 12px;
    font-size: 15px;
}

.empty-state .btn {
    margin-top: 8px;
}

/* Badge dla powiadomień */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Responsywność */
@media (max-width: 768px) {
    .advisor-header {
        align-items: flex-start;
    }

    .advisor-photo {
        width: 70px;
        height: 70px;
    }

    .vehicle-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .vehicle-plate-container {
        width: 100%;
    }

    .vehicle-thumbnail {
        width: 100%;
        height: 150px;
    }

    .vehicle-model-compact {
        font-size: 0.9rem;
    }

    .vehicle-model-display {
        font-size: 1.1rem;
    }

    .damage-cards {
        grid-template-columns: 1fr;
    }

    .vehicle-plate {
        min-width: 160px;
    }

    .vehicle-plate-number {
        font-size: 24px;
        line-height: 36px;
        border-left: 28px solid #485db2;
        letter-spacing: 0px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .vehicle-plate-eu {
        width: 28px;
    }

    .vehicle-plate-stars {
        font-size: 22px;
        line-height: 26px;
    }

    /* Timeline mobilny */
    #dashboardProgress {
        padding: 15px 10px 25px 10px;
    }

    .timeline-container {
        flex-direction: column;
        align-items: stretch;
    }

    .timeline-line {
        top: 22px;
        height: calc(100% - 68px);
        left: 20px;
        right: auto;
        width: 4px;
    }

    .timeline-line-progress {
        height: var(--progress, 0%);
        width: 100%;
    }

    .timeline-step {
        flex-direction: row;
        align-items: flex-start;
        margin-bottom: 24px;
    }

    .timeline-step-node {
        width: 44px;
        height: 44px;
        font-size: 18px;
        flex-shrink: 0;
    }

    .timeline-step-content {
        margin-top: 8px;
        margin-left: 16px;
        text-align: left;
        max-width: none;
    }

    .timeline-step-name {
        font-size: 14px;
    }

    .timeline-step-date {
        font-size: 11px;
    }

    .chat-content {
        max-width: 85%;
    }

    .photo-item img {
        height: 150px;
    }

    /* Kategorie zdjęć - responsywność */
    .photo-category-placeholder {
        height: 160px;
    }

    .photo-category-icon {
        font-size: 48px;
    }

    .photo-category-content {
        padding: 16px;
    }

    .photo-category-title {
        font-size: 16px;
    }

    .photo-category-description {
        font-size: 13px;
    }

    /* Status zlecenia - responsywność */
    .status-item {
        padding: 12px;
        gap: 12px;
    }

    .status-item-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .status-item-title {
        font-size: 14px;
    }

    .status-item-description {
        font-size: 12px;
    }

    /* Dokumenty - responsywność */
    .document-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .document-info {
        width: 100%;
    }

    .document-item .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .advisor-photo {
        width: 60px;
        height: 60px;
    }

    .vehicle-plate {
        min-width: 140px;
    }

    .vehicle-plate-number {
        font-size: 20px;
        line-height: 30px;
        border-left: 24px solid #485db2;
        letter-spacing: 0px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .vehicle-plate-eu {
        width: 24px;
    }

    .vehicle-plate-stars {
        font-size: 18px;
        line-height: 22px;
    }

    /* Timeline dla bardzo małych ekranów */
    .timeline-line {
        top: 16px;
        height: calc(100% - 56px);
        left: 14px;
    }

    .timeline-step-node {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .timeline-step-name {
        font-size: 11px;
    }

    .timeline-step-date {
        font-size: 9px;
    }

    .stage-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stage-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .upload-area {
        padding: 32px 16px;
    }

    .chat-content {
        max-width: 90%;
    }

    /* Dokumenty - mniejsze ikony na małych ekranach */
    .document-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .document-item {
        padding: 12px;
    }

    /* Kategorie zdjęć - bardzo małe ekrany */
    .photo-category-placeholder {
        height: 140px;
    }

    .photo-category-icon {
        font-size: 40px;
    }

    .photo-category-content {
        padding: 14px;
    }

    .photo-category-title {
        font-size: 15px;
    }

    .photo-category-description {
        font-size: 12px;
    }

    .photo-category-count {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* Card link hover efekt */
.card-link {
    text-decoration: none;
    transition: all 0.3s ease;
}

.card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* Ikony w szybkich akcjach */
.quick-action-icon {
    display: block;
    font-size: 3rem;
    margin: 0 auto;
}

/* Animacje */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section.active {
    animation: fadeIn 0.3s ease;
}

/* Modal overlay dla starszych przeglądarek */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Scrollbar dla czatu */
#chatMessages::-webkit-scrollbar {
    width: 8px;
}

#chatMessages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#chatMessages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

#chatMessages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Stopka */
.footer {
    background: #f8fafc;
    border-top: 1px solid #e9ecef;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer-text {
    font-size: 14px;
    color: #6c757d;
    font-weight: 400;
}

.footer-logo {
    height: 30px;
    width: auto;
    transition: all 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .footer {
        padding: 1rem 0;
        margin-top: 2rem;
    }

    .footer-text {
        font-size: 12px;
    }

    .footer-logo {
        height: 24px;
    }
}

/* odtąd moje manualne zmiany */
.photo-category-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Upload queue - pliki obok siebie */
#uploadQueue,
.pre-order-upload-queue {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#uploadQueue .dz-preview,
.pre-order-upload-queue .dz-preview {
    flex: 0 0 auto;
    margin: 0;
}

[data-survey-upload-queue] .dz-preview {
    width: 120px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Dropzone - pasek postępu uploadu */
.dz-progress-wrap {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dz-progress-bar {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.dz-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.2s ease;
}

.dz-progress-percent {
    font-size: 11px;
    color: #6c757d;
    white-space: nowrap;
    min-width: 28px;
    text-align: right;
}

/* Dropzone - ikony sukces / błąd */
.dz-success-mark,
.dz-error-mark {
    display: none;
    margin-top: 4px;
    text-align: center;
    font-size: 18px;
}

.dz-preview.dz-success .dz-success-mark {
    display: block;
    color: var(--success-color);
}

.dz-preview.dz-error .dz-error-mark {
    display: block;
    color: var(--danger-color);
}

.dz-error-message {
    display: none;
    font-size: 11px;
    color: var(--danger-color);
    margin-top: 4px;
    text-align: center;
}

.dz-preview.dz-error .dz-error-message {
    display: block;
}


/* ekran e-podpisu*/

/* Ekran logowania - tło */
#e-signature-sms-page-content {
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url("../images/bg-G_fqzbt.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Kontener i karta logowania */
#e-signature-sms-page-content .container {
    position: relative;
}

/* Karta z przezroczystością */
#e-signature-sms-page-content .card {
    background: rgba(255, 255, 255, 0.75) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

#e-signature-sms-page-content .card-body {
    background: transparent !important;
}

/* =========================================================
   Year Picker – własny picker wyboru roku w ankiecie
   ========================================================= */

.year-picker-popup {
    position: absolute;
    z-index: 9999;
    width: 240px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-family: inherit;
    visibility: visible !important;
    opacity: 1 !important;
}

.year-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 8px 0;
    border-bottom: 1px solid #f1f3f5;
    margin-bottom: 8px;
}

.year-picker-range {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.year-picker-nav {
    background: none;
    border: none;
    padding: 2px 8px;
    font-size: 22px;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.year-picker-nav:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.year-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.year-picker-year {
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px 4px;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.year-picker-year:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--primary-color);
}

.year-picker-year.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 700;
}

.year-picker-year.selected:hover {
    background: #1a5aae;
    border-color: #1a5aae;
    color: #fff;
}

/* Pytania rodzaju Tak/Nie z flagą "w jednej linii z następnym pytaniem" oraz pytanie bezpośrednio
   po nich układają się w rzędzie; kolejne pytanie jest blokowe i samo łamie linię. */
.survey-question.survey-question-inline {
    display: inline-block;
    vertical-align: top;
    margin-right: 20px;
}

/* Uploadery i listy plików kategorii w formularzu zgłoszenia szkody */
.survey-file-slot {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .survey-file-slot--below {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .survey-file-slot--below {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.survey-section-files {
    margin-top: 1rem;
}

@media (min-width: 992px) {
    .survey-section-body--right_of_section.has-file-categories {
        display: grid;
        grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
        gap: 1.5rem;
        align-items: start;
    }

    .survey-section-body--right_of_section .survey-section-files {
        margin-top: 0;
    }
}

.survey-file-category {
    min-width: 0;
}

.survey-file-category .document-item {
    flex-wrap: wrap;
    padding: 12px;
    gap: 8px 12px;
}

.survey-file-category .document-info {
    flex: 1 1 100%;
}

.survey-file-category .document-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.survey-file-category .document-item .btn {
    flex: 1 1 auto;
    min-width: 0;
}

/* Step visibility is separate from conditional question visibility. */
.survey-question-invalid .form-control,
.survey-question-invalid .form-select,
.survey-question-invalid .form-check-input {
    border-color: var(--tblr-danger, #d63939);
}
.survey-question-invalid .form-label,
.survey-question-invalid .form-check-label {
    color: var(--tblr-danger, #d63939);
}

#preOrderSurvey [hidden] { display: none !important; }
#surveyHeading:focus { outline: none; }
#surveyWizardProgress .progress { height: .5rem; }
#surveyWizardTitle { text-align: right; margin-left: 1rem; }
@media print {
    #surveyContainer [data-survey-section][hidden],
    #surveyContainer [data-survey-final-step][hidden] { display: block !important; }
    #surveyWizardProgress, #surveyWizardNavigation, #surveyWizardErrors { display: none !important; }
}
