/* =====================================================
   NARAVIO SETTINGS STYLES
   ===================================================== */

/* Settings Page Layout */
.settings-page {
    max-width: 800px;
}

.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

.settings-tab {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.settings-tab.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

/* Settings Cards */
.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
}

.settings-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* Avatar Section */
.settings-avatar-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.settings-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #60a5fa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.settings-avatar.has-photo {
    background: none;
}

.settings-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Settings Form */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-form .btn {
    align-self: flex-start;
    margin-top: 8px;
}

/* Voice Profile Summary */
.voice-profile-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.voice-stat {
    text-align: center;
    padding: 20px;
    background: var(--bg-hover);
    border-radius: var(--radius);
}

.voice-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.voice-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Credits Display */
.credits-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-light), var(--bg-card));
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.credits-big {
    display: flex;
    flex-direction: column;
}

.credits-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.credits-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.credits-usage {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.credits-costs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.credits-costs span {
    padding: 6px 12px;
    background: var(--bg-hover);
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Billing Table */
.billing-table {
    width: 100%;
    border-collapse: collapse;
}

.billing-table th,
.billing-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.billing-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* Usage List */
.usage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-hover);
    border-radius: var(--radius);
}

.usage-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.usage-type {
    font-size: 14px;
    font-weight: 500;
}

.usage-date {
    font-size: 12px;
    color: var(--text-muted);
}

.usage-amount {
    font-size: 14px;
    font-weight: 600;
}

.usage-amount.positive {
    color: var(--success);
}

.usage-amount.negative {
    color: var(--text-secondary);
}

/* Toggle Switch */
.settings-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.settings-toggle input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    transition: background 0.2s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.settings-toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.settings-toggle input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
}

/* Auth Method */
.auth-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-hover);
    border-radius: var(--radius);
}

.auth-method-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.auth-method-info strong {
    display: block;
    margin-bottom: 4px;
}

/* Danger Zone */
.settings-danger {
    border-color: var(--error-light);
    background: var(--error-light);
}

.settings-danger .settings-card-title {
    color: var(--error);
}

.settings-danger-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Form Select */
.form-select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Forgot Password Page */
.forgot-password-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg-page) 100%);
    padding: 24px;
}

.forgot-password-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.forgot-password-card .logo {
    margin-bottom: 32px;
    justify-content: center;
}

.forgot-password-card h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 8px;
}

.forgot-password-card > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.forgot-password-success {
    text-align: center;
    padding: 24px;
}

.forgot-password-success .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .settings-tabs {
        flex-wrap: wrap;
    }
    
    .settings-tab {
        flex: 1;
        min-width: 80px;
        text-align: center;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .voice-profile-summary {
        grid-template-columns: 1fr;
    }
    
    .credits-display {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .billing-table {
        font-size: 13px;
    }
    
    .billing-table th,
    .billing-table td {
        padding: 8px;
    }
    
    .settings-avatar-section {
        flex-direction: column;
        text-align: center;
    }
}
