/* Centauri Settings - Global Styles */

:root {
    /* Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --accent: #6366f1;
    --accent-light: #e0e7ff;
    --accent-dark: #4f46e5;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Spacing */
    --header-height: 64px;
    --sidebar-width: 260px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --border-hover: #475569;
    --accent-light: #312e81;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.settings-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.header-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.header-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-greeting {
    font-size: 14px;
    color: var(--text-secondary);
}

.header-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.header-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.header-btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    color: white;
    border: none;
}

.header-btn-primary:hover {
    opacity: 0.9;
}

/* Layout */
.settings-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
}

/* Navigation */
.settings-nav {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.nav-group {
    margin-bottom: 24px;
}

.nav-group-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 12px;
    margin-bottom: 8px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
    margin-bottom: 2px;
}

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

.settings-nav-item.active {
    background: var(--accent-light);
    color: var(--accent);
}

.settings-nav-item.locked {
    opacity: 0.6;
}

.settings-nav-item.locked:hover {
    background: var(--bg-secondary);
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-text {
    flex: 1;
}

.nav-lock {
    font-size: 12px;
    opacity: 0.5;
}

/* Main Content */
.settings-main {
    flex: 1;
    padding: 32px;
    max-width: 800px;
}

.settings-content {
    max-width: 640px;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
}

.section-icon {
    font-size: 32px;
    line-height: 1;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.section-description {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Settings Card */
.settings-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.settings-card.danger-zone {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.card-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Theme Options */
.theme-options {
    display: flex;
    gap: 16px;
}

.theme-option {
    flex: 1;
    cursor: pointer;
    text-align: center;
}

.theme-option input {
    display: none;
}

.theme-preview {
    height: 80px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    margin-bottom: 8px;
    transition: var(--transition-fast);
    overflow: hidden;
}

.theme-option.selected .theme-preview,
.theme-option:hover .theme-preview {
    border-color: var(--accent);
}

.theme-preview-header {
    height: 20px;
    background: currentColor;
    opacity: 0.1;
}

.theme-preview-content {
    height: 60px;
    padding: 8px;
}

.theme-light {
    background: #ffffff;
    color: #0f172a;
}

.theme-dark {
    background: #0f172a;
    color: #f8fafc;
}

.theme-system {
    background: linear-gradient(135deg, #ffffff 50%, #0f172a 50%);
}

.theme-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.theme-option.selected .theme-label {
    color: var(--accent);
}

/* Text Size Options */
.text-size-options {
    display: flex;
    gap: 12px;
}

.text-size-option {
    flex: 1;
    cursor: pointer;
    text-align: center;
    padding: 16px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition-fast);
}

.text-size-option input {
    display: none;
}

.text-size-option:hover,
.text-size-option.selected {
    border-color: var(--accent);
}

.text-size-preview {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.text-small { font-size: 14px; }
.text-medium { font-size: 18px; }
.text-large { font-size: 22px; }
.text-x-large { font-size: 26px; }

.text-size-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.toggle-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.toggle-info {
    flex: 1;
}

.toggle-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

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

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-tertiary);
    border-radius: 24px;
    transition: var(--transition-fast);
}

.toggle-slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

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

.toggle input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Pace Options */
.pace-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pace-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.pace-option input {
    display: none;
}

.pace-option:hover,
.pace-option.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}

.pace-info {
    flex: 1;
}

.pace-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.pace-description {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Profile Section */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.profile-avatar span {
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.profile-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-email {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Connected Accounts */
.connected-accounts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.connected-account {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.account-icon {
    font-size: 20px;
}

.account-info {
    flex: 1;
}

.account-name {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

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

.account-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.account-status.verified {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

/* Security Status */
.security-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.enabled {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.status-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Plan Card */
.plan-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 20px;
}

.plan-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.plan-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.plan-badge {
    font-size: 11px;
    padding: 3px 8px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 4px;
    font-weight: 600;
}

.plan-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.plan-features {
    list-style: none;
}

.plan-features li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Responsive */
@media (max-width: 900px) {
    .settings-layout {
        flex-direction: column;
    }
    
    .settings-nav {
        width: 100%;
        position: relative;
        top: 0;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
    }
    
    .nav-group {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .nav-group-title {
        width: 100%;
        margin-bottom: 4px;
    }
    
    .settings-nav-item {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .nav-icon {
        font-size: 16px;
    }
    
    .settings-main {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .theme-options {
        flex-direction: column;
    }
    
    .text-size-options {
        flex-wrap: wrap;
    }
    
    .text-size-option {
        flex: 1 1 calc(50% - 6px);
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 0 16px;
    }
    
    .header-title {
        font-size: 1.1rem;
    }
    
    .user-greeting {
        display: none;
    }
    
    .section-icon {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .settings-card {
        padding: 16px;
    }
}
