/* Settings Module Styles */

.settings-container {
    display: flex;
    height: calc(100vh - 60px);
    background: var(--bg);
}

/* Settings Sidebar */
.settings-sidebar {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.settings-nav {
    padding: 16px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

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

.settings-nav-item.active {
    background: var(--primary);
    color: white;
}

.settings-nav-item svg {
    flex-shrink: 0;
}

/* Settings Content */
.settings-main {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.settings-section {
    max-width: 720px;
    margin-bottom: 48px;
}

.settings-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.settings-section p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

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

.settings-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.settings-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

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

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

.settings-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.settings-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.settings-input:focus {
    outline: none;
    border-color: var(--primary);
}

.settings-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

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

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

/* Avatar Upload */
.avatar-upload {
    display: flex;
    align-items: center;
    gap: 24px;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--surface-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    overflow: hidden;
}

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

.avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Theme Selector */
.theme-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.theme-option {
    cursor: pointer;
}

.theme-option input {
    display: none;
}

.theme-preview {
    aspect-ratio: 4/3;
    border-radius: 8px;
    border: 2px solid var(--border);
    overflow: hidden;
    transition: border-color 0.2s;
}

.theme-option input:checked + .theme-preview {
    border-color: var(--primary);
}

.theme-name {
    text-align: center;
    font-size: 12px;
    margin-top: 8px;
    color: var(--text-secondary);
}

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

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

.btn-danger {
    background: var(--error);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

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

/* Responsive */
@media (max-width: 768px) {
    .settings-container {
        flex-direction: column;
    }

    .settings-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .settings-nav {
        display: flex;
        overflow-x: auto;
        padding: 8px;
    }

    .settings-nav-item {
        white-space: nowrap;
    }

    .settings-main {
        padding: 16px;
    }
}
