* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-sans: "Nunito", "Avenir Next", "Segoe UI", sans-serif;
    --bg-main: #ffffff;
    --bg-accent: #d7e9ff;
    --card-bg: var(--bg-main);
    --surface-0: var(--bg-main);
    --surface-1: #f8fbff;
    --surface-2: #eef3f8;
    --surface-sidebar: var(--surface-2);
    --text-main: #1f2a37;
    --text-muted: #4b5563;
    --text-disabled: #6b7280;
    --line: #d8dee8;
    --line-soft: #d8e1ec;
    --line-strong: #c9d2de;
    --brand: #0f766e;
    --brand-strong: #0b5b55;
    --brand-soft: #d6f2ef;
    --brand-outline: rgba(15, 118, 110, 0.28);
    --error: #dc2626;
    --success: #16845b;
    --warning: #b66a12;
    --info: #326fa8;
    --state-danger-bg: #fff5f5;
    --state-danger-bg-strong: #fee2e2;
    --state-danger-border: #fecaca;
    --state-danger-border-strong: #fca5a5;
    --state-danger-text: #991b1b;
    --state-success-bg: #f0fdf4;
    --state-success-bg-strong: #dcfce7;
    --state-success-border: #bbf7d0;
    --state-success-border-strong: #86efac;
    --state-success-text: #166534;
    --surface-overlay: rgba(255, 255, 255, 0.96);
    --overlay-scrim: rgba(15, 23, 42, 0.52);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --page-gutter: var(--space-4);
    --page-padding-start: var(--space-4);
    --page-padding-end: var(--space-6);
    --flow-gap: var(--space-4);
    --surface-padding: var(--space-3);
    --page-width: 1400px;
    --page-width-wide: 1480px;
    --page-width-compact: 1100px;
    --control-height: 44px;
    --field-height: 48px;
    --radius-control: var(--radius-md);
    --radius-surface: var(--radius-lg);
    --radius-modal: 20px;
    --shadow-low: 0 2px 6px rgba(15, 23, 42, 0.06);
    --shadow-card: var(--shadow-low);
    --shadow-floating: 0 16px 40px rgba(15, 23, 42, 0.14);
    --focus-ring: 0 0 0 3px rgba(15, 118, 110, 0.24);
    --motion-fast: 180ms cubic-bezier(0.22, 1, 0.36, 1);
    --z-shell: 8;
    --z-sidebar: 12;
    --z-sidebar-mobile: 13;
    --z-navbar: 20;
    --z-dropdown: 30;
    --z-sticky: 55;
    --z-popover: 70;
    --z-mobile-overlay: 80;
    --z-loading: 90;
    --z-modal: 1200;
    --z-modal-dropdown: 1250;
    --z-modal-preview: 1300;
    --z-modal-wizard: 1350;
    --z-modal-top: 1400;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3 {
    color: var(--text-main);
    letter-spacing: -0.015em;
    text-wrap: balance;
}

button,
input,
select,
textarea {
    font: inherit;
    color: var(--text-main);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--brand);
}

button {
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface-0);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition:
        border-color var(--motion-fast),
        background-color var(--motion-fast),
        color var(--motion-fast),
        transform 100ms ease-out,
        box-shadow var(--motion-fast);
    min-height: 44px;
    height: auto;
}

button:hover {
    border-color: var(--brand);
}

button:active {
    transform: translateY(1px);
}

button:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

select,
textarea,
input:not([type="checkbox"]):not([type="radio"]) {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-0);
    outline: none;
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

input:not([type="checkbox"]):not([type="radio"]),
select {
    height: 48px;
    padding: 0 14px;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-content: center;
}

textarea {
    min-height: 72px;
    padding: 10px 14px;
}

input:not([type="checkbox"]):not([type="radio"])::placeholder,
textarea::placeholder {
    color: #667384;
}

select:focus,
textarea:focus,
input:not([type="checkbox"]):not([type="radio"]):focus {
    border-color: var(--brand);
    box-shadow: var(--focus-ring);
}

hr {
    border: 0;
    border-top: 1px solid var(--line-soft);
}


footer {
    text-align: center;
    padding: 12px 16px 18px;
    font-size: 12px;
    color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
