:root {
    --actly-navy: #0b1a33;
    --actly-yellow: #ffe033;
    --actly-background: #f3f4f8;
    --actly-surface: #ffffff;
    --actly-text-muted: #8896a0;
    --actly-border: #e3e7f0;
    --actly-green: #16a34a;
    --actly-red: #dc2626;
    --actly-header-muted: #8eb4e0;
    --actly-radius-control: 12px;
    --actly-radius-panel: 16px;
    --actly-shadow-soft: 0 1px 6px rgba(11, 26, 51, 0.04);
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-synthesis: none;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    overscroll-behavior: none;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

body {
    background: #111827;
    color: var(--actly-navy);
    margin: 0;
    min-height: 100dvh;
    min-width: 320px;
    overscroll-behavior: none;
}

.app-bootstrap {
    align-items: center;
    background: var(--actly-navy);
    color: white;
    display: flex;
    font-size: 24px;
    font-weight: 800;
    justify-content: center;
    min-height: 100dvh;
}

button,
input,
select,
textarea {
    font: inherit;
}

input,
select,
textarea {
    font-size: 16px;
}

button,
a,
[role='button'] {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button {
    letter-spacing: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(255, 224, 51, 0.72);
    outline-offset: 2px;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1:focus {
    outline: none;
}

.app-page {
    background: var(--actly-background);
    min-height: 100%;
}

.app-page--light {
    background: var(--actly-surface);
}

.app-page__header {
    background: var(--actly-surface);
    border-bottom: 1px solid var(--actly-border);
    padding: 20px;
}

.app-page__title {
    color: var(--actly-navy);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.scrollable {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollable::-webkit-scrollbar {
    display: none;
}

.sr-only {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.valid.modified:not([type='checkbox']) {
    outline: 1px solid var(--actly-green);
}

.invalid {
    outline: 1px solid var(--actly-red);
}

.validation-message {
    color: var(--actly-red);
    font-size: 0.8125rem;
}

.blazor-error-boundary {
    background: var(--actly-red);
    color: white;
    padding: 1rem;
}

.blazor-error-boundary::after {
    content: 'Si è verificato un errore inatteso.';
}
