/* ===== Auth loading screen ===== */
.auth-loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #EEF2F7;
    z-index: 9999;
}

/* ===== Background ===== */
.main-content {
    background: #EEF2F7 url('../images/background.png') no-repeat center center / cover;
    background-attachment: fixed;
    min-height: 100vh;
}

/* ===== Bottom bar (mobile) ===== */
.fixed-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
}

@media (max-width: 959.98px) {
    .main-content {
        padding-bottom: 56px;
    }
}

/* ===== Project banner (blue) ===== */
.project-banner {
    background: linear-gradient(135deg, #0D47A1 0%, #1565C0 50%, #1976D2 100%);
    padding: 16px 24px;
    color: white;
}

.project-banner-mobile {
    padding: 12px 16px;
}

.banner-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2px;
}

.banner-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

.banner-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border: 2px solid white;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.banner-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
}

.banner-button-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* ===== Checklist description card ===== */
.checklist-description-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    background-color: #E8EAF6;
    border-radius: 12px;
    border-left: 4px solid #5C6BC0;
}

/* ===== Checklist section cards ===== */
.section-card {
    border: 1px solid #E0E6ED;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    min-width: 0;
    border-left: 4px solid #0D47A1;
}

.section-complete {
    opacity: 0.95;
    border-left-color: #2E7D32;
}

.section-disabled {
    opacity: 0.95;
    border-left-color: #B0BEC5;
}

.section-status-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #90A4AE;
    font-style: italic;
    white-space: nowrap;
}

.section-badge-disabled {
    background-color: #ECEFF1;
    color: #90A4AE;
}

/* Section header row */
.section-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #E0E6ED;
    gap: 12px;
}

.section-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    flex: 1;
    min-width: 0;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.section-badge-complete {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.section-badge-progress {
    background-color: #E3F2FD;
    color: #0D47A1;
}

/* ===== Checklist item row ===== */
.checklist-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #F0F3F7;
    cursor: pointer;
    transition: background-color 0.15s ease;
    gap: 12px;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item:hover {
    background-color: #F8FAFC;
}

.checklist-item:active {
    background-color: #EEF2F7;
}

.checklist-item-done {
    background-color: #FAFBFC;
}

.checklist-item-content {
    flex: 1;
    min-width: 0;
}

.item-text {
    color: #1A1A2E;
    font-weight: 500;
}

.item-text-done {
    color: #5B6770;
    text-decoration: line-through;
/*    opacity: 0.7;*/
}

.item-description {
    color: #5B6770;
    font-size: 0.82rem;
    margin-top: 2px;
    opacity: 0.8;
}

.checklist-item-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.item-date {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: #5B6770;
    white-space: nowrap;
}

.item-date-done {
    color: #2E7D32;
}

.item-date-overdue {
    color: #C62828;
    font-weight: 600;
}

.item-date-todo {
    color: #B0BEC5;
    font-style: italic;
}

/* ===== Item attachments (link / document) ===== */
.item-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.item-attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #0D47A1;
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 6px;
    background-color: #E3F2FD;
    transition: background-color 0.15s ease;
    max-width: 220px;
}

.item-attachment-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-attachment-link:hover {
    background-color: #BBDEFB;
    color: #0D47A1;
    text-decoration: none;
}

.item-attachment-doc {
    background-color: #FFF3E0;
    color: #E65100;
}

.item-attachment-doc:hover {
    background-color: #FFE0B2;
    color: #E65100;
}

.item-attachment-video {
    background-color: #FCE4EC;
    color: #AD1457;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.item-attachment-video:hover {
    background-color: #F8BBD0;
    color: #AD1457;
}

.checklist-item-disabled {
    cursor: default;
    opacity: 0.5;
}

.checklist-item-disabled:hover {
    background-color: transparent;
}

.checklist-item-disabled:active {
    background-color: transparent;
}

/* ===== Document section ===== */
.document-section-card {
    border: 1px solid #E0E6ED;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border-left: 4px solid #E6A817;
}

.document-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #E0E6ED;
    gap: 12px;
    background-color: #FFF8E1;
}

.document-header-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: #E6A817;
}

.document-count {
    display: inline-flex;
    align-items: center;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: #FFF8E1;
    color: #E6A817;
    margin-left: auto;
}

.document-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #F0F3F7;
    gap: 12px;
    transition: background-color 0.15s ease;
}

.document-item:last-child {
    border-bottom: none;
}

.document-item:hover {
    background-color: #F8FAFC;
}

.document-item-content {
    flex: 1;
    min-width: 0;
}

.document-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #E6A817;
    background-color: #FFF8E1;
    text-decoration: none;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.document-download-btn:hover {
    background-color: #FFECB3;
    color: #E6A817;
    text-decoration: none;
}

.document-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #AD1457;
    background-color: #FCE4EC;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.document-play-btn:hover {
    background-color: #F8BBD0;
    color: #AD1457;
}

/* ===== Mobile adjustments ===== */
@media (max-width: 599.98px) {
    .section-header {
        padding: 12px 14px;
    }

    .section-icon {
        width: 30px;
        height: 30px;
        min-width: 30px;
        border-radius: 8px;
    }

    .section-title {
        font-size: 0.9rem;
    }

    .checklist-item {
        padding: 12px 14px;
        gap: 10px;
    }

    .checklist-item-right {
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
    }

    .item-date {
        font-size: 0.7rem;
    }

    .item-attachment-link {
        max-width: 100%;
    }

    .item-attachments {
        max-width: 100%;
    }

    .document-header {
        padding: 12px 14px;
    }

    .document-item {
        padding: 12px 14px;
        gap: 10px;
    }

    .project-banner {
        padding: 12px 16px;
    }
}

/* ===== Trip timeline ===== */
.trip-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid #E0E6ED;
    gap: 0;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 0 0 auto;
    padding: 0 12px;
}

.timeline-dot {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background-color: #E0E6ED;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.timeline-step-active .timeline-dot {
    background-color: #0D47A1;
}

.timeline-step-done .timeline-dot {
    background-color: #2E7D32;
}

.timeline-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #90A4AE;
    white-space: nowrap;
    text-align: center;
}

.timeline-step-active .timeline-label {
    color: #1A1A2E;
}

.timeline-step-done .timeline-label {
    color: #2E7D32;
}

.timeline-date {
    font-size: 0.7rem;
    color: #B0BEC5;
    white-space: nowrap;
    text-align: center;
}

.timeline-step-active .timeline-date {
    color: #5B6770;
}

.timeline-step-done .timeline-date {
    color: #66BB6A;
}

.timeline-connector {
    height: 2px;
    flex: 1;
    background-color: #E0E6ED;
    margin-top: 14px;
    min-width: 24px;
}

.timeline-connector-active {
    background-color: #2E7D32;
}

@media (max-width: 599.98px) {
    .trip-timeline {
        padding: 12px 12px;
    }

    .timeline-step {
        padding: 0 4px;
    }

    .timeline-label {
        font-size: 0.68rem;
    }

    .timeline-date {
        font-size: 0.62rem;
    }

    .timeline-dot {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }

    .timeline-connector {
        margin-top: 12px;
        min-width: 12px;
    }
}

/* ===== Page layout (content + sidebar) ===== */
.page-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 24px;
    padding: 0 8px;
}

.page-content {
    flex: 1;
    min-width: 0;
}

.contact-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    padding-top: 16px;
}

/* ===== Contact card ===== */
.contact-card {
    border: 1px solid #E0E6ED;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border-left: 4px solid #7B1FA2;
}

.contact-card-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background-color: #F3E5F5;
}

.contact-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #7B1FA2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.contact-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1A1A2E;
}

.contact-function {
    font-size: 0.78rem;
    color: #5B6770;
    margin-top: 1px;
    margin-bottom: 6px;
}

.contact-detail-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #1A1A2E;
    text-decoration: none;
    padding: 3px 0;
    border-radius: 6px;
    transition: color 0.15s ease;
    word-break: break-all;
}

.contact-detail-row:hover {
    color: #7B1FA2;
    text-decoration: none;
}

/* ===== Emergency card ===== */
.emergency-card {
    border: 1px solid #E0E6ED;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border-left: 4px solid #C62828;
}

.emergency-card-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background-color: #FFEBEE;
}

.emergency-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #C62828;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

/* ===== Participants ===== */
.people-card {
    border: 1px solid #E0E6ED;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border-left: 4px solid #235cb2
}

.people-card-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background-color: #e3f2fd;
}

.people-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1c4d8d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.people-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1A1A2E;
}


/* ===== Mobile: sidebar becomes stacked below content ===== */
@media (max-width: 959.98px) {
    .page-layout {
        flex-direction: column;
        gap: 0;
        padding: 0;
        overflow-x: hidden;
        max-width: 100vw;
    }

    .page-content {
        max-width: 100%;
        overflow-x: hidden;
    }

    .contact-sidebar {
        width: 100%;
        position: static;
        padding: 0 8px 16px;
    }

    .contact-sidebar::before {
        content: '';
        display: block;
        height: 1px;
        background-color: #E0E6ED;
        margin: 0 24px 16px;
    }

    .page-content .section-card:last-child {
        margin-bottom: 0 !important;
    }
}
