/* Configuration Layout */
#config-view {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    display: none;
    flex-direction: column;
    padding-bottom: 80px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
    width: fit-content;
    margin-bottom: 28px;
    padding: 6px 0;
}

.back-btn:hover {
    color: var(--text);
}

.back-btn i {
    width: 16px;
    height: 16px;
}

#config-header {
    margin-bottom: 36px;
}

/* Bot Selection Cards */
.card--select {
    cursor: pointer;
    text-align: center;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card--select:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.card--select .card__icon {
    width: 52px;
    height: 52px;
}

.card--select h3 {
    font-size: 19px;
    font-weight: 600;
}

.card--select .card__desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Server List Cards */
.card--server {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.card--server:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.card--server .server-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    object-fit: cover;
}

.card--server .server-info {
    flex: 1;
    min-width: 0;
}

.card--server .server-name {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card--server .server-id {
    font-size: 11px;
    color: var(--text-dim);
    font-family: monospace;
    margin-top: 2px;
}

.card--server .server-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .card--server {
        flex-wrap: wrap;
    }

    .card--server .server-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Configuration Sections */
.config-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.config-section__title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.config-section__title i {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.config-section__subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 18px;
    display: block;
}

.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px;
    border-radius: 10px;
    width: fit-content;
}

.mode-btn {
    padding: 7px 14px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}

.mode-btn.active {
    background: var(--surface-2);
    color: var(--online);
}

/* Toggle Grid */
.cog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.cog-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.cog-toggle:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.02);
}

.cog-toggle input {
    display: none;
}

.cog-toggle .toggle-label {
    font-weight: 500;
    font-size: 13px;
    text-transform: capitalize;
}

.cog-toggle .status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.2s, box-shadow 0.2s;
}

.cog-toggle input:checked + .toggle-label + .status-dot {
    background: var(--online);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

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

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

.form-row {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
    flex: 1;
}

/* Overrides List */
.override-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.override-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.override-item .name {
    font-weight: 600;
    font-family: monospace;
    color: var(--flurazide);
    font-size: 13px;
}

.override-item .val {
    font-size: 13px;
    color: var(--text-dim);
}

.override-item .remove {
    color: #ef4444;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s, transform 0.15s;
    padding: 4px;
}

.override-item .remove:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Empty State */
.config-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 32px;
    text-align: center;
    gap: 14px;
    color: var(--text-dim);
}

.config-empty i {
    width: 44px;
    height: 44px;
    opacity: 0.35;
}

.config-empty h3 {
    font-size: 17px;
    color: var(--text-muted);
    font-weight: 600;
}

.config-empty p {
    font-size: 13px;
    max-width: 400px;
}

/* Sticky Save Actions Bar */
.config-actions {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #0f1420;
    border: 1px solid var(--border-h);
    padding: 10px 20px;
    border-radius: 14px;
    display: flex;
    gap: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.config-actions.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
