.settings-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    max-width: 1200px;
    margin: 10px auto;
    align-items: start;
}

@media (max-width: 992px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.nav-link {
    font-size: 12px;
    display: flex;
    align-items: center;
    padding: 12px 10px;
    color: var(--text-dim, #94a3b8);
    text-decoration: none;
    border-radius: 6px;
    margin: 0 10px 5px 10px;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
}

.settings-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.settings-title {
    color: var(--accent);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--text-dim);
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'DM Mono', monospace;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 245, 255, 0.15);
}

.form-desc {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.5;
}

.btn-save {
    background: #10b981;
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    float: right;
}

.btn-save:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-sync {
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-sync:hover:not(:disabled) {
    background: var(--accent);
    color: #000;
}

.btn-sync:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Console Logger */
.console-logger {
    background: #060810;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #a6adc8;
    height: 100px;
    overflow-y: auto;
    margin-top: 16px;
    line-height: 1.6;
}

.console-line {
    margin-bottom: 4px;
}

.console-line.info {
    color: #89b4fa;
}

.console-line.success {
    color: var(--success);
}

.console-line.error {
    color: var(--danger);
}

.console-line.warn {
    color: var(--rank5);
}

/* Saved Matches Slot List styles */
.save-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    gap: 8px;
    transition: 0.2s;
}

.save-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.save-item-info {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: #e2e8f0;
    text-align: left;
}

.save-item-actions {
    display: flex;
    gap: 6px;
}

.btn-save-action {
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 6px 8px !important;
    border-radius: 4px;
    font-size: 12px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: auto !important;
}

.btn-save-delete {
    color: #ef4444 !important;
}

.btn-save-delete:hover {
    background: rgba(239, 68, 68, 0.15) !important;
}

/* Switch Toggle Style */
.switch {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.switch::after {
    content: '';
    position: absolute;
    /* width: 18px; */
    /* height: 18px; */
    border-radius: 50%;
    background: #fff;
    /* top: 2px; */
    /* left: 2px; */
    /* transition: 0.3s; */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch.on {
    background: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.switch.on::after {
    left: 22px;
    background: #000;
}

/* ── UI Template Picker ── */
.sett-template-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sett-template-option:hover {
    border-color: rgba(167, 139, 250, 0.3);
    background: rgba(167, 139, 250, 0.04);
    transform: translateX(2px);
}

.sett-template-option.active {
    border-color: rgba(167, 139, 250, 0.5);
    background: rgba(167, 139, 250, 0.08);
    box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.25), 0 4px 16px rgba(124, 58, 237, 0.15);
}

.sett-template-option.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

/* Template mini preview box */
.sett-template-preview {
    flex-shrink: 0;
    width: 120px;
    height: 40px;
    background: rgba(4, 8, 20, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    position: relative;
}

/* Matrix preview — progress bars */
.sett-tpl-matrix {
    gap: 3px;
}

.sett-tpl-bar {
    height: 18px;
    width: 30px;
    border-radius: 1px;
    opacity: 0.6;
    position: relative;
    overflow: hidden;
}

.sett-tpl-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 60%;
    height: 100%;
    background: inherit;
    opacity: 0.8;
    clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 50%, calc(100% - 4px) 100%, 0 100%);
}

.sett-tpl-score {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 15px;
    color: #00f5ff;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
    padding: 0 2px;
}

/* Minimal preview */
.sett-tpl-minimal {
    gap: 4px;
}

.sett-tpl-name-sm {
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sett-tpl-big-score {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 18px;
    color: #00f5ff;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.sett-tpl-sep {
    font-size: 7px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 1px;
}

/* Classic preview */
.sett-tpl-classic {
    gap: 6px;
    background: rgba(6, 10, 24, 0.95);
}

.sett-tpl-box {
    background: rgba(6, 10, 24, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* Template info text */
.sett-template-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sett-tpl-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    letter-spacing: 0.5px;
}

.sett-tpl-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
}

/* Checkmark */
.sett-tpl-check {
    font-size: 13px;
    color: #a78bfa;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    transform: scale(0.7);
    flex-shrink: 0;
}

.sett-template-option.active .sett-tpl-check {
    opacity: 1;
    transform: scale(1);
}

.sett-color-option input[type='radio']:checked+.color-preview {
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    transform: scale(1.15);
}

.sett-color-option:hover .color-preview {
    transform: scale(1.1);
}

input[type='color']::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type='color']::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

input[type='color'] {
    -webkit-appearance: none;
    border: none;
    border-radius: 50%;
    overflow: hidden;
}