/* =========================================================================
   SETTINGS / STATUS AKUN PAGE STYLES
   ========================================================================= */

.settings-container {
    padding: 10px 40px 40px 40px;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px 40px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.08));
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.12);
    position: relative;
    overflow: hidden;
}

.settings-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.1), transparent 50%);
    pointer-events: none;
}

.settings-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    border-radius: 20px;
    color: white;
    font-size: 2.8rem;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.25);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.settings-header-text {
    position: relative;
    z-index: 1;
}

.settings-header-text h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--clr-dark);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.settings-header-text p {
    color: var(--clr-text-light);
    font-size: 1.05rem;
    line-height: 1.5;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.settings-col {
    min-width: 0;
    /* Prevents flex/grid blowouts */
}

/* Base Glass Card */
.glass-card {
    background: var(--clr-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--sidebar-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

/* --- Profile Card --- */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
    border: 4px solid white;
}

.profile-info-large h2 {
    font-size: 1.5rem;
    color: var(--clr-dark);
    margin-bottom: 5px;
    font-weight: 700;
}

.profile-info-large p {
    color: var(--clr-text-light);
    margin-bottom: 15px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.card-divider {
    width: 100%;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin: 20px 0;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--clr-primary);
    color: var(--clr-primary);
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-outline:hover {
    background: var(--clr-primary);
    color: white;
}

.btn-outline.btn-danger {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-outline.btn-danger:hover {
    background: #ef4444;
    color: white;
}

/* --- Stats Cube Grid --- */
.stats-cube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    height: 100%;
}

.stat-cube {
    position: relative;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}

.stat-cube:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.cube-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.cube-info {
    position: relative;
    z-index: 2;
}

.cube-info h4 {
    font-size: 0.95rem;
    color: var(--clr-text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.cube-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--clr-dark);
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.cube-value span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--clr-text-light);
}

/* Colors and Glows */
.cube-bg-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.2;
    z-index: 1;
    transition: opacity 0.3s;
}

.stat-cube:hover .cube-bg-glow {
    opacity: 0.4;
}

.cube-primary .cube-icon {
    color: #6366f1;
}

.cube-primary .cube-bg-glow {
    background: #6366f1;
}

.cube-secondary .cube-icon {
    color: #ec4899;
}

.cube-secondary .cube-bg-glow {
    background: #ec4899;
}

.cube-tertiary {
    grid-column: 1 / -1;
}

.cube-tertiary .cube-icon {
    color: #10b981;
}

.cube-tertiary .cube-bg-glow {
    background: #10b981;
}

.settings-full-row {
    width: 100%;
    min-width: 0;
}

/* --- History Card (Riwayat Pembelian) --- */
.history-card {
    padding: 25px 30px;
}

.history-card h3 {
    font-size: 1.2rem;
    color: var(--clr-dark);
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.history-table th,
.history-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.history-table th {
    font-weight: 600;
    color: var(--clr-text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-table td {
    font-size: 0.95rem;
    color: var(--clr-dark);
    font-weight: 500;
}

.history-table tbody tr {
    transition: background var(--transition-fast);
}

.history-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsiveness */
@media (max-width: 1200px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-container {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .settings-container {
        padding: 0;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        min-width: 0;
    }

    .glass-card,
    .settings-full-row,
    .table-responsive {
        max-width: 100%;
        box-sizing: border-box;
    }

    .profile-card {
        min-height: auto !important;
        padding: 20px 10px !important;
    }

    .stats-cube-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cube-tertiary {
        grid-column: auto;
    }

    .stat-cube {
        padding: 15px !important;
    }

    .cube-icon {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .cube-value {
        font-size: 1.5rem;
    }

    .history-card {
        padding: 15px 5px !important;
    }

    .history-card h3 {
        font-size: 1rem;
        margin-bottom: 10px;
        padding-left: 5px;
    }

    .settings-header {
        flex-direction: column;
        text-align: center;
        padding: 16px 15px;
        gap: 12px;
        margin-bottom: 20px;
        border-radius: 12px;
    }

    .settings-header-icon {
        width: 48px;
        height: 48px;
        font-size: 1.8rem;
    }

    .settings-header-text h1 {
        font-size: 1.4rem;
        margin-bottom: 4px;
    }

    .settings-header-text p {
        font-size: 0.8rem;
    }

    .settings-full-row {
        margin-top: 15px !important;
    }

    .history-table {
        min-width: 100%;
    }

    .history-table th,
    .history-table td {
        padding: 8px 4px;
        font-size: 0.7rem;
        word-break: break-word;
    }

    .history-table th {
        font-size: 0.65rem;
        letter-spacing: 0;
    }

    .badge {
        padding: 4px 8px;
        font-size: 0.65rem;
    }
}