.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 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: #1b6ec2;
            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, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ════════════════════════════════════════
   MobFusion — Design System
   ════════════════════════════════════════ */

/* Tipografia base 16px — previne auto-zoom do iOS em inputs */
html { font-size: 16px; }
html, body { overscroll-behavior-y: contain; }

/* AppBar gradient override */
header.mud-appbar {
    background: linear-gradient(105deg, #0b2152 0%, #1565c0 100%) !important;
    box-shadow: 0 2px 16px rgba(11, 33, 82, 0.5) !important;
}

/* Page background */
main.mud-main-content {
    background-color: #f0f4f8;
}

/* ── Bottom Navigation ── */
.mob-bottom-nav {
    background: linear-gradient(180deg, #0a1a3a 0%, #0d2450 100%);
    box-shadow: 0 -1px 0 rgba(255,255,255,0.07), 0 -6px 24px rgba(0,0,0,0.35);
}

.mob-nav-btn {
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 0 6px;
    font-size: 10px;
    font-family: Roboto, sans-serif;
    color: rgba(255,255,255,0.55);
    transition: color 0.2s ease;
    position: relative;
    gap: 2px;
}

.mob-nav-btn.active {
    color: #90caf9;
}

.mob-nav-indicator {
    position: absolute;
    top: 0;
    width: 32px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: #90caf9;
}

/* ── Hero card (Home) ── */
.mob-hero {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 55%, #1976d2 100%);
    border-radius: 20px;
    padding: 22px 20px 18px;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.mob-hero::before {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}

.mob-hero::after {
    content: "";
    position: absolute;
    right: 30px;
    top: -50px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

/* ── Stats row (Home) ── */
.mob-stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mob-stat-card {
    flex: 1;
    background: #fff;
    border-radius: 16px;
    padding: 14px 8px 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.mob-stat-number {
    display: block;
    font-size: 1.65rem;
    font-weight: 700;
    color: #0d47a1;
    line-height: 1.1;
}

.mob-stat-label {
    display: block;
    font-size: 0.6rem;
    color: #78909c;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.mob-stat-card.mob-stat-pending .mob-stat-number {
    color: #e65100;
}

.mob-stat-card.mob-stat-pending {
    border-top: 3px solid #ff8f00;
    border-radius: 0 0 16px 16px;
}

/* ── Quick action cards (Home) ── */
.mob-action-card {
    border-radius: 18px !important;
    cursor: pointer;
    overflow: hidden !important;
    transition: transform 0.12s ease;
}

.mob-action-card:active {
    transform: scale(0.95);
}

.mob-action-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

/* ── Pedido card ── */
/* ── Scanner de código de barras ──────────────────────────────────── */
.mob-scan-frame {
    width: 220px;
    height: 140px;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 10px;
    box-shadow: 0 0 0 2000px rgba(0,0,0,0.40);
    position: relative;
    overflow: hidden;
}
.mob-scan-frame::after {
    content: '';
    display: block;
    position: absolute;
    left: 8%;
    right: 8%;
    height: 2px;
    background: #00e5ff;
    box-shadow: 0 0 10px 2px #00e5ff;
    top: 20%;
    animation: mob-scan-line 1.6s ease-in-out infinite alternate;
}
@keyframes mob-scan-line {
    from { top: 15%; }
    to   { top: 80%; }
}

.mob-pedido-card {
    border-radius: 14px !important;
    border-left: 4px solid #e0e0e0;
    cursor: pointer;
    width: 100%;
    transition: transform 0.12s ease;
    margin-bottom: 8px;
}

.mob-pedido-card:active {
    transform: scale(0.98);
}

.mob-pedido-card.status-pendente     { border-left-color: #ff8f00; }
.mob-pedido-card.status-sincronizado { border-left-color: #43a047; }
.mob-pedido-card.status-erro         { border-left-color: #e53935; }

/* ── Cliente card ── */
.mob-cliente-card {
    border-radius: 14px !important;
    width: 100%;
    transition: transform 0.12s ease;
    margin-bottom: 8px;
}

.mob-cliente-card:active {
    transform: scale(0.98);
}

.mob-avatar-initial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Login page ── */
.mob-login-bg {
    min-height: 100vh;
    background: linear-gradient(160deg, #0b2152 0%, #0d47a1 50%, #1565c0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.mob-login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 24px;
    padding: 32px 24px 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.mob-login-logo {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 6px 20px rgba(21,101,192,0.4);
}

/* ── Sync page ── */
.mob-sync-stat {
    background: #fff;
    border-radius: 16px;
    padding: 18px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-left: 4px solid #1565c0;
    margin-bottom: 16px;
}

.mob-sync-pending {
    border-left-color: #ff8f00 !important;
}

/* Dashboard */
.mob-dash-card {
    min-height: 96px;
    border-radius: 14px !important;
    padding: 12px 12px 10px;
    background: #fff;
    border-left: 4px solid #90a4ae;
}

.mob-dash-primary {
    border-left-color: #1565c0;
    background: linear-gradient(135deg, #e8f0fe 0%, #ffffff 60%) !important;
}
.mob-dash-primary .mob-dash-icon  { color: #1565c0; }
.mob-dash-primary .mob-dash-value { color: #0d47a1; }

.mob-dash-success {
    border-left-color: #43a047;
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 60%) !important;
}
.mob-dash-success .mob-dash-icon  { color: #2e7d32; }
.mob-dash-success .mob-dash-value { color: #1b5e20; }

.mob-dash-warning {
    border-left-color: #ff8f00;
    background: linear-gradient(135deg, #fff8e1 0%, #ffffff 60%) !important;
}
.mob-dash-warning .mob-dash-icon  { color: #e65100; }
.mob-dash-warning .mob-dash-value { color: #bf360c; }

.mob-dash-icon {
    color: #607d8b;
    font-size: 1.25rem !important;
    margin-bottom: 4px;
}

.mob-dash-label {
    color: #78909c;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.mob-dash-value {
    color: #102a63;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
}

.mob-chart-panel,
.mob-section-panel {
    border-radius: 14px !important;
    padding: 14px;
    background: #fff;
}

.mob-status-row,
.mob-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    min-height: 30px;
    border-bottom: 1px solid #eef2f5;
    font-size: 0.82rem;
}

.mob-status-row:last-child,
.mob-top-row:last-child {
    border-bottom: 0;
}

.mob-status-row span,
.mob-top-row span {
    color: #607d8b;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mob-status-row strong,
.mob-top-row strong {
    color: #0d47a1;
    font-size: 0.88rem;
    white-space: nowrap;
}

/* ── Badge do nav ── */
.mob-nav-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mob-nav-badge {
    position: absolute;
    top: -6px;
    right: -9px;
    background: #e53935;
    color: #fff;
    border-radius: 10px;
    font-size: 0.55rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    border: 1.5px solid #0a1a3a;
}

/* ── Pull-to-refresh ── */
.mob-ptr-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    color: #78909c;
    font-size: 0.8rem;
    transition: opacity 0.2s;
}
