/* ===== Settings Page ===== */
.settings-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px 24px;
}

.settings-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.settings-header h1 {
    font-size: 16px;
    color: #111827;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.settings-header h1 i {
    color: #f97316;
}

.settings-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-card:hover {
    border-color: #d1d5db;
}

.settings-card h2 {
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-card h2 i {
    color: #f97316;
    font-size: 14px;
}

.settings-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.settings-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-label {
    flex: 0 0 260px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.settings-control {
    flex: 1;
    max-width: 500px;
}

/* Form Elements */
.settings-select {
    width: 100%;
    max-width: 360px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.15s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    outline: none;
}

.settings-select:focus {
    border-color: #f97316;
}

.settings-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.15s;
    outline: none;
}

.settings-input:focus {
    border-color: #f97316;
}

/* Slider */
.slider-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.settings-slider {
    flex: 1;
    max-width: 360px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    appearance: none;
    outline: none;
}

.settings-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: #f97316;
    border-radius: 50%;
    cursor: pointer;
}

.settings-slider::-webkit-slider-thumb:hover {
    background: #ea580c;
}

.slider-value {
    min-width: 36px;
    text-align: center;
    font-weight: 600;
    color: #f97316;
    font-size: 16px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d1d5db;
    transition: background 0.15s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    transition: transform 0.15s;
    border-radius: 50%;
}

input:checked + .slider {
    background: #f97316;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Save Button */
.save-settings-btn {
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s;
    margin-top: 16px;
    width: 100%;
    max-width: 320px;
}

.save-settings-btn:hover {
    background: #ea580c;
}

/* Responsive */
@media screen and (max-width: 992px) {
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .settings-label {
        flex: 0 0 100%;
        margin-bottom: 8px;
    }
    .settings-control {
        width: 100%;
        max-width: 100%;
    }
    .settings-input,
    .settings-select,
    .settings-slider {
        max-width: 100%;
    }
    .save-settings-btn {
        max-width: 100%;
    }
}

/* Settings sections */
.settings-section {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
    overflow: hidden;
}

.section-header {
    background: #fafafa;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.section-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.section-content {
    padding: 16px;
}

.add-site-form {
    max-width: 500px;
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.form-row label {
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 13px;
    color: #374151;
}

.form-row input[type="url"],
.form-row input[type="number"] {
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.form-row input[type="url"]:focus,
.form-row input[type="number"]:focus {
    border-color: #f97316;
}

.checkbox-row {
    flex-direction: row;
    align-items: center;
}

.checkbox-row input {
    margin-right: 8px;
    accent-color: #f97316;
}

.form-buttons {
    display: flex;
    justify-content: flex-start;
    margin-top: 16px;
}

.form-buttons button {
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.form-buttons button:hover {
    background: #ea580c;
}

.form-buttons button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.form-result {
    margin-top: 16px;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.form-result.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.form-result.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
