:root {
    --bg: #0f1419;
    --panel: #1a222c;
    --line: #2b3642;
    --text: #e8eef4;
    --muted: #8b9aab;
    --accent: #25d366;
    --accent-dim: #1ea855;
    --danger: #ef4444;
    --input: #121820;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    --radius: 18px;
    --font: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(37, 211, 102, 0.18), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(56, 128, 255, 0.12), transparent 50%),
        var(--bg);
}

.wrap {
    width: min(720px, calc(100% - 32px));
    margin: 48px auto;
}

.card {
    background: color-mix(in srgb, var(--panel) 92%, black);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.header h1 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 700;
}

.header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--input);
    font-size: 0.85rem;
    white-space: nowrap;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
}

.badge.on .dot {
    background: var(--accent);
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--muted);
}

.field textarea,
.field input[type="password"] {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--input);
    color: var(--text);
    border-radius: 12px;
    padding: 14px 14px;
    font: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
    min-height: 220px;
    resize: vertical;
    line-height: 1.5;
}

.field textarea:focus,
.field input[type="password"]:focus {
    border-color: color-mix(in srgb, var(--accent) 70%, white);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--input);
    margin-bottom: 18px;
}

.switch-row strong {
    display: block;
    margin-bottom: 4px;
}

.switch-row span {
    color: var(--muted);
    font-size: 0.9rem;
}

.switch {
    position: relative;
    width: 52px;
    height: 30px;
    flex: 0 0 auto;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #3a4654;
    border-radius: 999px;
    transition: 0.2s;
}

.slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 4px;
    top: 4px;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
}

.switch input:checked + .slider {
    background: var(--accent);
}

.switch input:checked + .slider::before {
    transform: translateX(22px);
}

.actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

button {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    background: var(--accent);
    color: #072112;
    transition: background 0.15s ease, transform 0.1s ease;
}

button:hover {
    background: var(--accent-dim);
}

button:active {
    transform: translateY(1px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.status {
    min-height: 1.2em;
    color: var(--muted);
    font-size: 0.92rem;
}

.status.ok {
    color: var(--accent);
}

.status.err {
    color: #ff8f8f;
}

.hint {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.hint code {
    color: #b7f0cb;
    background: rgba(37, 211, 102, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
}

@media (max-width: 640px) {
    .wrap {
        margin: 24px auto;
    }

    .card {
        padding: 20px;
    }

    .header {
        flex-direction: column;
    }
}
