/* ========================================
   My Invoices Page Styles
   ======================================== */

/* Invoices Section */
.invoices-section {
    padding: 140px 0 80px;
    min-height: 100vh;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 0.6s ease-out;
}

.page-title {
    font-family: var(--font-primary);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-subtitle {
    font-family: var(--font-secondary);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* Filters Section (Optional - Hidden by default) */
.filters-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.05), rgba(255, 0, 255, 0.05));
    border: 1px solid rgba(255, 0, 255, 0.2);
    border-radius: 10px;
}

.filter-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--primary-cyan);
    font-weight: 600;
}

.filter-group select {
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 0, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:hover,
.filter-group select:focus {
    border-color: var(--primary-pink);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
    outline: none;
}

/* Invoices Container */
.invoices-container {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.05), rgba(255, 0, 255, 0.05));
    border: 1px solid rgba(255, 0, 255, 0.2);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(199, 0, 255, 0.15);
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

/* State Containers */
.state-container {
    text-align: center;
    padding: 60px 20px;
}

.state-container i {
    font-size: 72px;
    margin-bottom: 25px;
    display: block;
}

#loadingState i,
#loadingState .loader {
    color: var(--primary-cyan);
}

#errorState i {
    color: #FF4500;
}

#emptyState i {
    color: var(--primary-pink);
}

.state-container h3 {
    font-family: var(--font-primary);
    font-size: 24px;
    color: var(--primary-cyan);
    margin-bottom: 15px;
    font-weight: 700;
}

.state-container p {
    font-family: var(--font-secondary);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
}

/* Loader Animation */
.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 240, 255, 0.1);
    border-top-color: var(--primary-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

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

/* Table Responsive Wrapper */
.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
}

/* Invoices Table */
.invoices-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.invoices-table thead {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(255, 0, 255, 0.2));
}

.invoices-table th {
    padding: 18px 20px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-cyan);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary-pink);
}

.invoices-table th:first-child {
    border-top-left-radius: 8px;
}

.invoices-table th:last-child {
    border-top-right-radius: 8px;
    text-align: center;
}

.invoices-table tbody tr {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 0, 255, 0.1);
    transition: all 0.3s ease;
}

.invoices-table tbody tr:hover {
    background: rgba(255, 0, 255, 0.08);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(255, 0, 255, 0.15);
}

.invoices-table td {
    padding: 18px 20px;
    font-family: var(--font-secondary);
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
}

.invoices-table td:last-child {
    text-align: center;
}

/* Invoice Number */
.invoice-number {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--primary-pink);
}

/* Order Number */
.order-number {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--primary-cyan);
}

/* Date */
.invoice-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Total Amount */
.invoice-total {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.paid {
    background: linear-gradient(135deg, rgba(0, 255, 127, 0.2), rgba(0, 200, 100, 0.2));
    border: 1px solid rgba(0, 255, 127, 0.5);
    color: #00FF7F;
    box-shadow: 0 0 15px rgba(0, 255, 127, 0.3);
}

.status-badge.refunded {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2), rgba(255, 69, 0, 0.2));
    border: 1px solid rgba(255, 165, 0, 0.5);
    color: #FFA500;
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.3);
}

.status-badge.pending {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 150, 200, 0.2));
    border: 1px solid rgba(0, 240, 255, 0.5);
    color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

/* Download Button */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    border: 1px solid var(--primary-pink);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.download-btn:hover {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-pink));
    border-color: var(--primary-cyan);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 255, 0.4);
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn i {
    font-size: 16px;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */

/* Tablets */
@media (max-width: 1024px) {
    .invoices-section {
        padding: 120px 0 60px;
    }

    .invoices-container {
        padding: 30px 25px;
    }

    .invoices-table th,
    .invoices-table td {
        padding: 15px;
        font-size: 14px;
    }

    .filters-section {
        flex-direction: column;
        gap: 15px;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .invoices-section {
        padding: 100px 0 50px;
    }

    .page-header {
        margin-bottom: 30px;
    }

    .invoices-container {
        padding: 25px 20px;
    }

    /* Stack table on mobile */
    .invoices-table {
        display: block;
    }

    .invoices-table thead {
        display: none;
    }

    .invoices-table tbody {
        display: block;
    }

    .invoices-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid rgba(255, 0, 255, 0.2);
        border-radius: 8px;
        padding: 15px;
    }

    .invoices-table tbody tr:hover {
        transform: none;
    }

    .invoices-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 0, 255, 0.1);
    }

    .invoices-table td:last-child {
        border-bottom: none;
        justify-content: center;
    }

    .invoices-table td::before {
        content: attr(data-label);
        font-family: var(--font-primary);
        font-size: 12px;
        font-weight: 700;
        color: var(--primary-cyan);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

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

    .state-container {
        padding: 40px 15px;
    }

    .state-container i {
        font-size: 56px;
    }

    .state-container h3 {
        font-size: 20px;
    }

    .state-container p {
        font-size: 14px;
    }

    .loader {
        width: 50px;
        height: 50px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .invoices-container {
        padding: 20px 15px;
    }

    .page-title {
        font-size: 28px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .invoices-table td {
        font-size: 14px;
    }

    .download-btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .status-badge {
        padding: 5px 12px;
        font-size: 11px;
    }
}
