/* LoveForm Statements Page Styles */
/* Follows the loveform visual design pattern used in /quote, /price, /payment */

:root {
    --primary-color: #289a96;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --border-gray: #e9ecef;
    --light-border: #e5e5e5;
    --dark-gray: #9d9d9d;
    --spacing-unit: 1rem;
    --section-spacing: 2rem;
}

/* ========================================
   Page Container
   ======================================== */
.statements-page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 2rem;
    min-height: calc(100vh - 80px);
    font-family: 'Nunito', sans-serif;
    color: #222;
    background-color: #ffffff;
}

/* ========================================
   Page Header (Gradient Title)
   ======================================== */
.statements-header {
    margin-top: 0.5rem;
    margin-bottom: var(--section-spacing);
    position: relative;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(40, 154, 150, 0.1);
}

.statements-header h1 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    letter-spacing: -0.02em;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    padding: 0.15em 0 0 0;
    background: linear-gradient(to right, #222222, #289a96);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    position: relative;
}

.statements-header .subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: var(--medium-gray);
    display: block;
    margin-top: 0.25rem;
}

.statements-header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #289a96, #34b4a7);
    border-radius: 2px;
}

/* ========================================
   Summary Cards Row
   ======================================== */
.summary-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .summary-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--border-gray);
    transition: box-shadow 0.2s ease;
}

.summary-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.summary-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.summary-card .card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0;
}

.summary-card .card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.5rem;
}

.summary-card .card-detail {
    font-size: 0.875rem;
    color: var(--medium-gray);
    margin: 0;
}

.summary-card .card-detail strong {
    color: #333;
}

/* Badge Styles */
.badge-paid {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

/* ========================================
   Section Cards (Tables)
   ======================================== */
.statements-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--border-gray);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-gray);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #222;
    margin: 0;
    position: relative;
    padding-left: 12px;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-meta {
    font-size: 0.875rem;
    color: var(--medium-gray);
}

.section-body {
    padding: 0;
}

/* ========================================
   Tables
   ======================================== */
.statements-table {
    width: 100%;
    border-collapse: collapse;
}

.statements-table th {
    text-align: left;
    padding: 12px 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--medium-gray);
    background: var(--light-gray);
    border-bottom: 1px solid var(--border-gray);
    letter-spacing: 0.03em;
}

.statements-table th.text-end {
    text-align: right;
}

.statements-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-gray);
    color: #333;
    font-size: 0.9375rem;
}

.statements-table td.text-end {
    text-align: right;
}

.statements-table tbody tr:last-child td {
    border-bottom: none;
}

.statements-table tbody tr:hover {
    background-color: #fafafa;
}

.statements-table tbody tr.row-active {
    background-color: #f0fdf4;
}

/* Status Badges in Tables */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.paid {
    background: #dcfce7;
    color: #166534;
}

.status-badge.due {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.past-due {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.future {
    background: #e5e7eb;
    color: #374151;
}

.status-badge.verified,
.status-badge.confirmed {
    background: #dcfce7;
    color: #166534;
}

.status-badge.approved {
    background: #dbeafe;
    color: #1e40af;
}

/* ========================================
   Progress Bars
   ======================================== */
.progress-cell {
    min-width: 100px;
}

.progress-bar-container {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

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

.progress-bar-fill.full {
    background: #22c55e;
}

/* ========================================
   Methods Summary Cards
   ======================================== */
.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 16px 20px;
}

.method-card {
    padding: 16px;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    background: white;
}

.method-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(to bottom, white, #f0fdfa);
}

.method-name {
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.method-name .badge-selected {
    font-size: 0.625rem;
    padding: 2px 8px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

.method-detail {
    font-size: 0.8125rem;
    color: var(--medium-gray);
    margin: 4px 0;
}

/* ========================================
   Balance Alert
   ======================================== */
.balance-alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.balance-alert .alert-text {
    color: #92400e;
    font-weight: 500;
}

.balance-alert .btn-pay {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
}

.balance-alert .btn-pay:hover {
    background: #227572;
}

/* ========================================
   Blocked State (Non-Members)
   ======================================== */
.statements-blocked {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.blocked-card {
    max-width: 480px;
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blocked-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #289a96, #34b4a7);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
}

.blocked-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.75rem;
}

.blocked-subtitle {
    font-size: 1rem;
    color: var(--medium-gray);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.blocked-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
    .blocked-actions {
        flex-direction: row;
        justify-content: center;
    }
}

.blocked-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.blocked-actions .btn-primary:hover {
    background: #227572;
    transform: translateY(-2px);
}

.blocked-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 24px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.blocked-actions .btn-secondary:hover {
    background: #f0fdfa;
}

.blocked-note {
    font-size: 0.875rem;
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ========================================
   Empty State (No Statements Yet)
   ======================================== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-icon {
    font-size: 3rem;
    color: var(--border-gray);
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.5rem;
}

.empty-text {
    color: var(--medium-gray);
    margin-bottom: 1.5rem;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 767px) {
    .statements-page {
        padding: 1rem;
    }

    .statements-header h1 {
        font-size: 1.75rem;
    }

    .summary-card .card-value {
        font-size: 1.5rem;
    }

    .statements-table {
        font-size: 0.875rem;
    }

    .statements-table th,
    .statements-table td {
        padding: 10px 12px;
    }

    /* Stack certain columns on mobile */
    .statements-table .hide-mobile {
        display: none;
    }
}

/* ========================================
   Animation
   ======================================== */
.statements-page .summary-card,
.statements-page .statements-section {
    animation: fadeIn 0.4s ease-out;
    animation-fill-mode: both;
}

.statements-page .summary-card:nth-child(1) { animation-delay: 0.1s; }
.statements-page .summary-card:nth-child(2) { animation-delay: 0.15s; }
.statements-page .summary-card:nth-child(3) { animation-delay: 0.2s; }

.statements-page .statements-section:nth-of-type(1) { animation-delay: 0.25s; }
.statements-page .statements-section:nth-of-type(2) { animation-delay: 0.3s; }
.statements-page .statements-section:nth-of-type(3) { animation-delay: 0.35s; }

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