:root {
    --epal-primary: #1A3B5D;
    --epal-accent: #F39C12;
    --tblr-primary: #1A3B5D;
    --tblr-primary-rgb: 26, 59, 93;
    --tblr-link-color: var(--epal-primary);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.btn-primary {
    --tblr-btn-bg: var(--epal-accent);
    --tblr-btn-border-color: var(--epal-accent);
    --tblr-btn-hover-bg: #d68910;
    --tblr-btn-hover-border-color: #d68910;
    --tblr-btn-color: #fff;
    --tblr-btn-hover-color: #fff;
}

.navbar-vertical .navbar-brand {
    color: #fff;
}

#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;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 4px;
}

    .blazor-error-boundary::after {
        content: "Si è verificato un errore."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--epal-primary);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Caricamento...");
    }

.signature-pad {
    touch-action: none;
    width: 100%;
    min-height: 150px;
    background: #fff;
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
}

@media (min-width: 576px) {
    .signature-pad {
        min-height: 170px;
    }
}

.ux-summary-card {
    background: #fff;
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
}

.ux-summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0;
    color: var(--tblr-secondary);
}

.ux-summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.1;
}

.ux-action-panel {
    background: #fff;
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
}

.ux-action-panel .btn {
    min-height: 3rem;
}

.ux-signature-hint {
    color: var(--tblr-secondary);
    font-size: 0.875rem;
}

.ux-section-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.ux-mobile-stack > * + * {
    margin-top: 0.75rem;
}

.status-badge {
    min-width: 9rem;
}

.pallet-search {
    max-width: 18rem;
}

.pallet-balance-badge {
    min-width: 4.5rem;
}

.evidence-thumb {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    background: #fff;
}

.dashboard-progress {
    height: 0.75rem;
    background-color: #e9eef4;
}

.dashboard-chart-row + .dashboard-chart-row {
    margin-top: 1rem;
}

.dashboard-insight {
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    padding: 0.75rem;
    min-height: 5rem;
    background: #fff;
}

.shipment-table {
    min-width: 58rem;
}

.partner-table {
    min-width: 48rem;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--tblr-secondary);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}
