:root {
    --bg: #f3efe7;
    --bg-strong: #e7ded0;
    --surface: rgba(255, 252, 246, 0.88);
    --surface-strong: #fffaf2;
    --text: #1f1a17;
    --muted: #6d6258;
    --line: rgba(70, 49, 31, 0.12);
    --primary: #0c7c59;
    --primary-dark: #095b42;
    --accent: #c76c2b;
    --danger: #a33d30;
    --shadow: 0 20px 60px rgba(46, 31, 18, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(199, 108, 43, 0.18), transparent 32%),
        radial-gradient(circle at bottom left, rgba(12, 124, 89, 0.16), transparent 28%),
        linear-gradient(135deg, #f4eee5 0%, #efe6d8 52%, #f9f5ee 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
.button-like {
    border: none;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    padding: 0.9rem 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

button:hover,
.button-like:hover {
    transform: translateY(-1px);
    background: var(--primary-dark);
}

.ghost-button {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
}

.danger {
    color: var(--danger);
    border-color: rgba(163, 61, 48, 0.25);
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    width: 100%;
    border: 1px solid rgba(70, 49, 31, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    padding: 0.9rem 1rem;
    color: var(--text);
}

textarea {
    resize: vertical;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.alert {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    margin-bottom: 1rem;
}

.alert.success {
    background: rgba(12, 124, 89, 0.1);
    color: var(--primary-dark);
}

.alert.error {
    background: rgba(163, 61, 48, 0.1);
    color: var(--danger);
}

.full-width,
.full {
    width: 100%;
}

.stack-form,
.grid-form {
    display: grid;
    gap: 1rem;
}

.grid-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-form .full {
    grid-column: 1 / -1;
}

label span {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.toggle-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(70, 49, 31, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.toggle-copy {
    flex: 1;
}

.toggle-copy span {
    margin-bottom: 0.15rem;
}

.toggle-copy small {
    color: var(--muted);
}

.toggle-switch {
    position: relative;
    width: 58px;
    height: 32px;
    flex: 0 0 auto;
}

.toggle-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(70, 49, 31, 0.18);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.toggle-slider::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(-26px);
}

@media (max-width: 900px) {
    .grid-form {
        grid-template-columns: 1fr;
    }
}
