h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1.25rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Si è verificato un errore.";
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.shell-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shell .home {
    min-height: auto;
    flex: 1;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1.15rem;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--ff-line-soft, #e8eef4);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar .brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: inherit;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.topbar img {
    width: 2rem;
    height: 2rem;
}

.topnav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.nav-link,
.nav-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    border-radius: 0.45rem;
    color: var(--ff-ink, #16324f);
    text-decoration: none;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.nav-link:hover,
.nav-logout:hover {
    background: #eef3f7;
    text-decoration: none;
}

.nav-link.active {
    background: #e7f1f6;
    color: var(--ff-accent, #1c6b8a);
    font-weight: 600;
}

.nav-link .icon,
.nav-logout .icon {
    width: 1rem;
    height: 1rem;
}

.logout-form {
    margin: 0;
}

.who {
    color: var(--ff-ink-soft, #4d6278);
    font-size: 0.92rem;
    padding: 0 0.35rem;
}

.login {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1.25rem;
    box-sizing: border-box;
}

.login img {
    width: min(22rem, 100%);
    height: auto;
}

.login h1,
.panel h1 {
    margin: 0;
}

.panel {
    width: min(52rem, 100%);
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2.5rem;
    box-sizing: border-box;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: min(24rem, 100%);
}

.panel .form {
    width: min(28rem, 100%);
}

label {
    display: block;
    margin-top: 0.65rem;
}

.check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
}

input:not([type="checkbox"]),
button,
.button {
    font: inherit;
}

input:not([type="checkbox"]) {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.25rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--ff-line, #c9d3de);
    border-radius: 0.45rem;
    background: #fff;
    color: inherit;
}

button,
.button {
    margin-top: 1rem;
    background: var(--ff-ink, #16324f);
    color: #fff;
    border: 0;
    border-radius: 0.45rem;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.topbar button,
.nav-logout {
    margin-top: 0;
}

fieldset {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem 1rem;
    border: 1px solid var(--ff-line-soft, #e2e8ee);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.55);
}

.hint,
.form-error {
    margin: 0.35rem 0 0;
}

.form-error,
.validation-message {
    color: #9b2c2c;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin: 0.5rem 0 1.5rem;
}

th,
td {
    text-align: left;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--ff-line-soft, #e2e8ee);
    vertical-align: top;
}

a {
    color: var(--ff-ink, #16324f);
}

.panel.wide {
    width: min(72rem, 100%);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: end;
    margin: 1rem 0;
}

.filters.cardish {
    margin: 1rem 0 1.25rem;
}

.filters label {
    margin-top: 0;
}

.filters .button {
    margin-top: 0;
}

select,
textarea {
    font: inherit;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.25rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--ff-line, #c9d3de);
    border-radius: 0.45rem;
    background: #fff;
    color: inherit;
}

textarea {
    resize: vertical;
    min-height: 4.5rem;
}

.button.secondary {
    background: #fff;
    color: var(--ff-ink, #16324f);
    border: 1px solid var(--ff-line, #c9d3de);
}

.button.danger,
button.danger {
    background: #9b2c2c;
}

tr.voided td {
    color: #7a8794;
    text-decoration: line-through;
}

@media (max-width: 720px) {
    .panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topnav {
        justify-content: flex-start;
    }

    .nav-link span,
    .nav-logout span {
        display: none;
    }

    .nav-link,
    .nav-logout {
        padding: 0.5rem;
    }
}
