/* ============================================
   Estilos para Portal del Cliente
   ============================================ */

/* Auth Section */
.auth-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    background: var(--bg-light);
}

.auth-container {
    max-width: 500px;
    width: 100%;
}

.auth-box {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.auth-box.hidden {
    display: none;
}

.auth-box h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 2rem;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-switch a {
    color: var(--primary-color);
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-section {
    padding: 60px 0;
    background: var(--bg-light);
    min-height: 80vh;
}

.dashboard-section.hidden {
    display: none;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.dashboard-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* Sidebar */
.dashboard-sidebar {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    color: var(--text-dark);
    border-radius: 5px;
    transition: var(--transition);
}

.dashboard-nav-item:hover {
    background: var(--bg-light);
}

.dashboard-nav-item.active {
    background: var(--primary-color);
    color: var(--white);
}

.dashboard-nav-item i {
    font-size: 1.2rem;
}

/* Dashboard Content */
.dashboard-content {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.dashboard-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.dashboard-panel.active {
    display: block;
}

.dashboard-panel h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2rem;
}

.dashboard-panel h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0;
}

.stat-info p {
    color: var(--text-light);
    margin: 0;
}

/* Orders */
.order-card {
    padding: 25px;
    background: var(--bg-light);
    border-radius: 10px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.order-card:hover {
    box-shadow: var(--shadow);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.order-info h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.order-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 2px 0;
}

.order-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.order-status.pending {
    background: #FFF3CD;
    color: #856404;
}

.order-status.processing {
    background: #CCE5FF;
    color: #004085;
}

.order-status.completed {
    background: #D4EDDA;
    color: #155724;
}

.order-status.cancelled {
    background: #F8D7DA;
    color: #721C24;
}

.order-items {
    margin: 15px 0;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: var(--white);
    border-radius: 5px;
    margin-bottom: 10px;
}

.order-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.order-item-info {
    flex: 1;
}

.order-item-info h5 {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.order-item-info p {
    color: var(--text-light);
    font-size: 0.85rem;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.order-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.order-actions {
    display: flex;
    gap: 10px;
}

/* Addresses */
.address-card {
    padding: 20px;
    background: var(--bg-light);
    border-radius: 10px;
    margin-bottom: 15px;
    position: relative;
}

.address-default {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.address-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.address-card p {
    color: var(--text-dark);
    margin: 3px 0;
}

.address-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* Profile Forms */
.password-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

/* Invoices */
.invoice-card {
    padding: 20px;
    background: var(--bg-light);
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invoice-info h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.invoice-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.invoice-actions {
    display: flex;
    gap: 10px;
}

/* No Data Message */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-data i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-data p {
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .dashboard-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .dashboard-nav-item span {
        display: none;
    }

    .dashboard-nav-item {
        justify-content: center;
        min-width: 60px;
    }
}

@media (max-width: 768px) {
    .auth-box {
        padding: 30px 20px;
    }

    .dashboard-content {
        padding: 20px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .dashboard-header h1 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .order-header {
        flex-direction: column;
    }

    .order-footer {
        flex-direction: column;
        gap: 15px;
    }

    .order-actions {
        width: 100%;
        flex-direction: column;
    }

    .order-actions .btn {
        width: 100%;
    }
}
