/* ─── StemLab Account v1.3.0 ─── */

.slac {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 20px 60px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #F5F5F7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.slac *, .slac *::before, .slac *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── Header ─── */
.slac-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.slac-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #F5F5F7;
}

.slac-subtitle {
    font-size: 15px;
    color: #A1A1B3;
    margin-top: 8px;
}

/* ─── Buttons ─── */
.slac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
    font-family: inherit;
    border: none;
    position: relative;
    overflow: hidden;
}

.slac-btn--primary {
    background: #F0176F;
    color: #fff;
    box-shadow: 0 0 20px rgba(240, 23, 111, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Sheen overlay */
.slac-btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 55%);
    border-radius: inherit;
    pointer-events: none;
}

.slac-btn--primary:hover {
    background: #D01460;
    box-shadow: 0 0 32px rgba(240, 23, 111, 0.40),
                0 4px 16px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.slac-btn--primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 0 12px rgba(240, 23, 111, 0.25);
}

.slac-btn--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading spinner state on save button */
.slac-btn--primary.slac-btn--loading {
    pointer-events: none;
    color: transparent;
}

.slac-btn--primary.slac-btn--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: slac-spin 0.65s linear infinite;
}

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

.slac-btn--ghost {
    background: transparent;
    color: #F5F5F7;
    border: 1px solid rgba(42, 42, 60, 0.9);
    transition: all 150ms ease;
}

.slac-btn--ghost:hover {
    border-color: rgba(240, 23, 111, 0.25);
    background: rgba(240, 23, 111, 0.05);
    color: #F5F5F7;
}

.slac-btn--sm {
    padding: 8px 18px;
    font-size: 13px;
}

/* ─── Loading State ─── */
.slac-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 80px 0;
}

.slac-loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #F0176F;
    animation: slac-pulse 1.2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(240, 23, 111, 0.4);
}

.slac-loading-dot:nth-child(2) { animation-delay: 0.15s; }
.slac-loading-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes slac-pulse {
    0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

/* ─── Login Prompt (not logged in) ─── */
.slac-login-prompt {
    text-align: center;
    padding: 80px 20px;
}

.slac-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

/* ─── Cards: frosted glass effect ─── */
.slac-card {
    background: rgba(17, 17, 24, 0.85);
    border: 1px solid rgba(42, 42, 60, 0.9);
    border-radius: 16px;
    padding: 28px 24px;
    margin-bottom: 20px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3),
                0 1px 0 rgba(255, 255, 255, 0.04) inset;
    position: relative;
    overflow: hidden;
}

/* Subtle top highlight */
.slac-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    pointer-events: none;
}

.slac-card:hover {
    border-color: rgba(60, 60, 80, 0.9);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4),
                0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.slac-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.slac-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #F5F5F7;
}

/* ─── Badge: subtle glow halo ─── */
.slac-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 20px;
    position: relative;
}

.slac-badge--free {
    background: rgba(161, 161, 179, 0.12);
    color: #A1A1B3;
    box-shadow: 0 0 0 0 transparent;
}

.slac-badge--plus {
    background: rgba(240, 23, 111, 0.12);
    color: #F0176F;
    box-shadow: 0 0 14px rgba(240, 23, 111, 0.18),
                0 0 0 1px rgba(240, 23, 111, 0.12);
}

.slac-badge--pro {
    background: rgba(139, 92, 246, 0.12);
    color: #8B5CF6;
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.18),
                0 0 0 1px rgba(139, 92, 246, 0.12);
}

/* ─── Plan Details ─── */
.slac-plan-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(42, 42, 60, 0.5);
}

.slac-plan-row:last-child {
    border-bottom: none;
}

.slac-plan-label {
    font-size: 14px;
    color: #A1A1B3;
}

.slac-plan-value {
    font-size: 14px;
    font-weight: 600;
    color: #F5F5F7;
}

.slac-plan-free-msg {
    font-size: 14px;
    color: #A1A1B3;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ─── Status colors with glowing dots ─── */
.slac-status--active,
.slac-status--trialing {
    color: #34D399;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.slac-status--active::before,
.slac-status--trialing::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34D399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
    flex-shrink: 0;
}

.slac-status--canceled {
    color: #F87171;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.slac-status--canceled::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #F87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
    flex-shrink: 0;
}

.slac-status--expired {
    color: #A1A1B3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.slac-status--expired::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #A1A1B3;
    box-shadow: none;
    flex-shrink: 0;
}

/* ─── Splits Usage ─── */
.slac-splits {
    text-align: center;
}

.slac-splits-num {
    font-size: 36px;
    font-weight: 800;
    color: #F5F5F7;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.slac-splits-of {
    font-size: 18px;
    font-weight: 500;
    color: #A1A1B3;
}

/* ─── Progress bar: animated gradient fill + glow ─── */
.slac-splits-bar {
    width: 100%;
    height: 6px;
    background: rgba(42, 42, 60, 0.8);
    border-radius: 3px;
    margin: 16px 0 8px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.slac-splits-fill {
    height: 100%;
    background: linear-gradient(90deg, #F0176F 0%, #A855F7 100%);
    border-radius: 3px;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 2px;
    box-shadow: 0 0 10px rgba(240, 23, 111, 0.5),
                0 0 24px rgba(168, 85, 247, 0.3);
    position: relative;
}

/* Shimmer animation on the fill bar */
.slac-splits-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: slac-shimmer 2s ease-in-out infinite;
    border-radius: inherit;
}

@keyframes slac-shimmer {
    0% { left: -60%; }
    100% { left: 110%; }
}

.slac-splits-label {
    font-size: 13px;
    color: #A1A1B3;
}

/* ─── Splits Breakdown Wrapper ─── */
.slac-splits-breakdown {
    text-align: center;
}

/* ─── Paid Balance Indicator ─── */
.slac-paid-balance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #A855F7; /* purple-ish — visually distinct from monthly pink */
    letter-spacing: 0.01em;
}

.slac-paid-balance::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #A855F7;
    box-shadow: 0 0 6px rgba(168, 85, 247, 0.5);
    flex-shrink: 0;
}

/* ─── Buy More Splits Button ─── */
.slac-buy-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #A1A1B3 !important;
    background: transparent !important;
    border: 1px solid rgba(42, 42, 60, 0.9) !important;
    border-radius: 8px !important;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: all 150ms ease;
    cursor: pointer;
}

.slac-buy-more:hover {
    color: #F5F5F7 !important;
    border-color: rgba(240, 23, 111, 0.3) !important;
    background: rgba(240, 23, 111, 0.06) !important;
}

/* ─── Profile Form ─── */
.slac-profile-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.slac-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slac-field label {
    font-size: 13px;
    font-weight: 600;
    color: #A1A1B3;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* ─── Form inputs: premium focus states ─── */
.slac-field input {
    background: rgba(10, 10, 18, 0.9);
    border: 1px solid rgba(42, 42, 60, 0.9);
    border-radius: 10px;
    color: #F5F5F7;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 150ms ease,
                box-shadow 150ms ease,
                background 150ms ease;
    outline: none;
    width: 100%;
}

.slac-field input:hover {
    border-color: rgba(60, 60, 80, 0.9);
    background: rgba(14, 14, 22, 0.95);
}

.slac-field input:focus {
    border-color: #F0176F;
    background: rgba(14, 14, 22, 0.95);
    box-shadow: 0 0 0 3px rgba(240, 23, 111, 0.18),
                0 0 16px rgba(240, 23, 111, 0.10);
}

.slac-field input::placeholder {
    color: rgba(107, 107, 123, 0.7);
}

.slac-form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}

.slac-save-status {
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.3s ease, color 0.3s ease;
}

/* ─── Billing ─── */
.slac-billing-text {
    font-size: 14px;
    color: #A1A1B3;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ─── Plan Card: accent border glow ─── */
.slac-plan-card {
    border-color: rgba(240, 23, 111, 0.18) !important;
    box-shadow: 0 0 32px rgba(240, 23, 111, 0.06),
                0 4px 24px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.slac-plan-card:hover {
    border-color: rgba(240, 23, 111, 0.28) !important;
    box-shadow: 0 0 48px rgba(240, 23, 111, 0.10),
                0 8px 40px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
    .slac {
        padding: 16px 16px 48px;
    }

    .slac-title {
        font-size: 24px;
    }

    .slac-card {
        padding: 22px 18px;
    }

    .slac-splits-num {
        font-size: 28px;
    }

    .slac-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .slac-ctas {
        flex-direction: column;
        width: 100%;
    }

    .slac-ctas .slac-btn {
        width: 100%;
    }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    .slac-btn--primary.slac-btn--loading::after {
        animation: none;
        opacity: 0.7;
    }

    .slac-loading-dot {
        animation: none;
        opacity: 0.7;
    }

    .slac-splits-fill::after {
        animation: none;
        display: none;
    }

    .slac-splits-fill {
        transition-duration: 0.01ms;
    }
}
