﻿/* customer.css - Customer Panel Specific Styles */

/* ---- CUSTOMER DASHBOARD ---- */
.dashboard-container {
    padding: 0;
}

/* ---- DASHBOARD GRID ---- */
/* Bylo gap 2rem / padding 2.5rem - kafelki pulpitu klienta nie miescily sie
   na jednym ekranie mimo tego, ze jest ich cztery. */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.85rem;
    padding: 0;
}

/* ---- PROGRESS OVERVIEW ---- */
.progress-overview {
    padding: 0.85rem 0;
    text-align: center;
}

.progress-circle {
    display: inline-block;
    position: relative;
}

    .progress-circle svg {
        filter: drop-shadow(0 0 30px rgba(240, 147, 251, 0.5));
    }

    .progress-circle circle {
        transition: stroke-dashoffset 1s ease-out;
    }

/* ---- TIMELINE ---- */
.horizontal-timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0.85rem 0;
    gap: 0.85rem; /* bylo 2rem */
    max-width: 600px;
    margin: 0 auto;
}

    /* 35px = polowa dawnej ikony 70px; teraz ikona ma 46px, wiec os idzie przez 23px. */
    .horizontal-timeline::before {
        content: '';
        position: absolute;
        left: 23px;
        top: 0;
        bottom: 0;
        width: 3px;
        background: var(--glass-border);
        border-radius: 2px;
    }

    .horizontal-timeline::after {
        content: '';
        position: absolute;
        left: 23px;
        top: 0;
        width: 3px;
        height: 0%;
        background: var(--primary-gradient);
        border-radius: 2px;
        transition: height 2s ease-out;
    }

/* ---- TIMELINE STEPS ---- */
.timeline-step {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    z-index: 2;
    cursor: default;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
    gap: 0.9rem;
}

    .timeline-step.completed {
        cursor: pointer;
    }

        .timeline-step.completed:hover {
            transform: translateY(-3px);
        }

            .timeline-step.completed:hover .timeline-icon {
                transform: scale(1.1);
                box-shadow: 0 0 30px rgba(102, 126, 234, 0.7);
            }

/* ---- TIMELINE ICONS ---- */
.timeline-icon {
    width: 46px; /* bylo 70px */
    height: 46px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}

.timeline-step.completed .timeline-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: var(--text-primary);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.timeline-step.active .timeline-icon {
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
    border-color: transparent;
    color: var(--text-primary);
    transform: scale(1.2);
    box-shadow: 0 0 40px rgba(240, 147, 251, 0.7);
    animation: timeline-pulse 2s infinite;
}

.timeline-step.pending .timeline-icon {
    background: var(--glass-bg);
    border-color: rgba(118, 75, 162, 0.5);
    color: rgba(118, 75, 162, 0.8);
}

.timeline-step.disabled .timeline-icon {
    opacity: 0.5;
    filter: grayscale(100%);
}

/* ---- TIMELINE CONTENT ---- */
.timeline-content {
    flex: 1;
    padding-top: 0.15rem;
}

.timeline-content h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    color: var(--text-primary);
}

.timeline-date {
    font-size: 0.78rem;
    color: #50E3C2;
    display: flex;
    align-items: center;
    margin-bottom: 0.15rem;
}

.timeline-status {
    font-size: 0.78rem;
    display: flex;
    align-items: center;
}

.timeline-step.active .timeline-status {
    color: var(--pink-light);
}

.timeline-step.pending .timeline-status {
    color: rgba(118, 75, 162, 0.8);
}

.timeline-step.disabled .timeline-status {
    color: var(--text-muted);
}

/* ---- PROJECT DETAILS ---- */
.project-details-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: var(--karta-pad);
    margin-bottom: 0.9rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9rem;
}

.project-status-badge {
    padding: 0.2rem 0.75rem;
    border-radius: 50px;
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

    .project-status-badge.active {
        background: var(--primary-gradient);
        color: var(--text-primary);
        box-shadow: 0 0 20px rgba(240, 147, 251, 0.5);
    }

    .project-status-badge.completed {
        background: linear-gradient(135deg, #50E3C2 0%, #4FD1C5 100%);
        color: white;
    }

    .project-status-badge.pending {
        background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
        color: white;
    }

/* ---- PROJECT INFO GRID ---- */
.project-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.project-info-item {
    padding: 0.55rem 0.75rem; /* bylo 1.5rem */
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-small);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Wersaliki zostaja: mala etykieta nad wartoscia, nie pole do wpisania. */
.project-info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.15rem;
}

.project-info-value {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---- DOCUMENTS SECTION ---- */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.document-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-small);
    padding: 1.5rem;
    transition: all var(--transition-fast);
    cursor: pointer;
}

    .document-card:hover {
        transform: translateY(-5px);
        border-color: var(--pink-medium);
        box-shadow: 0 0 30px rgba(240, 147, 251, 0.3);
    }

.document-icon {
    width: 50px;
    height: 50px;
    background: var(--secondary-gradient);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.document-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.document-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ---- PAYMENT SECTION ---- */
.payment-summary {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.payment-total {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.payment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-small);
    transition: all var(--transition-fast);
}

    .payment-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }

.payment-status {
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

    .payment-status.paid {
        background: rgba(80, 227, 194, 0.2);
        color: #50E3C2;
    }

    .payment-status.pending {
        background: rgba(241, 196, 15, 0.2);
        color: #f1c40f;
    }

    .payment-status.overdue {
        background: rgba(231, 76, 60, 0.2);
        color: #e74c3c;
    }

/* ---- MESSAGES/CHAT ---- */
.messages-container {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    height: 600px;
    display: flex;
    flex-direction: column;
}

.messages-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 1rem;
    max-width: 70%;
}

    .message.sent {
        align-self: flex-end;
        flex-direction: row-reverse;
    }

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.message-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: var(--border-radius-small);
}

.message.sent .message-content {
    background: var(--primary-gradient);
}

.message-text {
    margin-bottom: 0.5rem;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.message-input-wrapper {
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 1rem;
}

.message-input {
    flex: 1;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.message-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

    .message-send-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(240, 147, 251, 0.5);
    }

/* ---- ACTIVITY FEED ---- */
.activity-feed {
    max-height: 500px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

    .activity-item:last-child {
        border-bottom: none;
    }

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .activity-icon.document {
        background: rgba(102, 126, 234, 0.2);
        color: var(--blue-accent);
    }

    .activity-icon.payment {
        background: rgba(80, 227, 194, 0.2);
        color: #50E3C2;
    }

    .activity-icon.message {
        background: rgba(240, 147, 251, 0.2);
        color: var(--pink-medium);
    }

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.activity-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ---- HELP CENTER ---- */
.help-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.help-category {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-small);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

    .help-category:hover {
        transform: translateY(-5px);
        border-color: var(--pink-medium);
        box-shadow: 0 0 30px rgba(240, 147, 251, 0.3);
    }

.help-category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.help-category-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.help-category-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ---- FAQ SECTION ---- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-small);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-fast);
}

    .faq-question:hover {
        background: rgba(240, 147, 251, 0.05);
    }

.faq-question-text {
    font-weight: 600;
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 500px;
}

.faq-answer-text {
    color: var(--text-secondary);
    line-height: 1.6;
}
/* --------------------------------------- */
/* OVERRIDE DLA CUSTOMER PANEL (DESKTOP)   */
/* --------------------------------------- */
@media (min-width: 992px) {
    /* 1) Usuń ograniczenie szerokości z content-wrapper */
    /* Padding 2rem -> 1.25rem: ta reguła ma !important, więc to ONA decyduje
       o marginesie treści na desktopie — bez tej zmiany zwężenie ustawione
       w layout.css/site.css nie miałoby żadnego efektu. */
    .content-wrapper {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 1.25rem !important;
    }

    /* 2) Rozciągnij dashboard-container na całą szerokość */
    .dashboard-container {
        width: 100% !important;
        padding: 0 !important;
    }
}

/* --------------------------------------- */
/* APARTMENT SELECTOR DROPDOWN (TOP RIGHT) */
/* --------------------------------------- */
.apartment-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.apartment-label {
    font-size: 0.9rem;
    white-space: nowrap;
}

#singleProjectDisplay {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.project-selector-dropdown {
    min-width: 300px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.project-selector-dropdown:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(240, 147, 251, 0.3);
}

.project-selector-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(240, 147, 251, 0.5);
}

.project-selector-dropdown option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .apartment-selector {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.25rem;
    }

    .apartment-label {
        font-size: 0.8rem;
    }

    .project-selector-dropdown,
    #singleProjectDisplay {
        min-width: 200px;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .apartment-label {
        font-size: 0.75rem;
    }

    .project-selector-dropdown,
    #singleProjectDisplay {
        min-width: 150px;
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}
