html, body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

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: 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."
    }

/* ── Not Found page ─────────────────────────────────────────── */
.nf-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    text-align: center;
    color: #475569;
}

.nf-icon {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1.25rem;
}

.nf-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 .5rem;
}

.nf-msg {
    font-size: .9rem;
    color: #64748b;
    margin: 0 0 1.75rem;
}

.nf-msg code {
    background: #f1f5f9;
    border-radius: 4px;
    padding: .1rem .35rem;
    font-size: .85rem;
    color: #0f172a;
}

.nf-home {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    padding: .5rem 1.25rem;
    border-radius: 8px;
    transition: background .15s;
}

.nf-home:hover {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.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;
}

/* ── Mobile Navigation (MainLayout) ────────────────────────── */

/* Hamburger — hidden on desktop, shown via media query below */
.btn-hamburger {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 7px;
    color: #94a3b8;
    font-size: 1rem;
    cursor: pointer;
    padding: .32rem .55rem;
    line-height: 1;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.btn-hamburger:hover { background: rgba(255,255,255,.1); color: #e2e8f0; }

/* Overlay behind the drawer */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s, visibility .22s;
}
.mobile-nav-overlay.open { opacity: 1; visibility: visible; }

/* Slide-in drawer */
.mobile-nav-drawer {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 285px;
    background: #fff;
    z-index: 400;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
}
.mobile-nav-drawer.open { transform: translateX(0); }

/* Drawer header */
.mnav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem 1rem;
    background: #0f172a;
    flex-shrink: 0;
}
.mnav-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    padding: .2rem .4rem;
    border-radius: 5px;
    line-height: 1;
}
.mnav-close:hover { color: #e2e8f0; background: rgba(255,255,255,.1); }

/* User strip */
.mnav-user-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .6rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}
.mnav-user-name { font-size: .8rem; font-weight: 600; color: #1e293b; }
.mnav-user-id   { font-size: .65rem; color: #94a3b8; }

/* Context strip */
.mnav-context {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem;
    padding: .35rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: .7rem;
    color: #64748b;
    flex-shrink: 0;
}
.mnav-ctx-sep { color: #cbd5e1; }

/* Scrollable nav body */
.mnav-body { flex: 1; overflow-y: auto; padding: .4rem 0 2rem; }

/* Nav items */
.mnav-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem 1rem;
    font-size: .82rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: background .12s, color .12s;
    cursor: pointer;
}
.mnav-item:hover                                    { background: #eff6ff; color: #1d4ed8; text-decoration: none; }
.mnav-item.mnav-active                              { color: #1d4ed8; background: #eff6ff; font-weight: 600; }
.mnav-item.mnav-child                               { padding-left: 1.5rem; }
.mnav-item.mnav-grandchild                          { padding-left: 2.25rem; font-size: .78rem; }
.mnav-item:hover .mnav-item-icon,
.mnav-item.mnav-active .mnav-item-icon              { background: #bfdbfe; color: #1d4ed8; }

.mnav-item-icon {
    width: 26px; height: 26px;
    border-radius: 6px;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    color: #64748b;
    flex-shrink: 0;
    transition: background .12s, color .12s;
}
.mnav-item-icon-sm { width: 20px; height: 20px; font-size: .62rem; }

.mnav-section { margin-top: .2rem; }
.mnav-section-header {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem 1rem;
    font-size: .78rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    user-select: none;
    transition: background .12s, color .12s;
}
.mnav-section-header:hover { background: #f1f5f9; color: #1e293b; }
.mnav-section-header.open  { color: #1d4ed8; background: #eff6ff; }

.mnav-subsection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .38rem 1rem .38rem 1.5rem;
    font-size: .72rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    transition: background .12s, color .12s;
}
.mnav-subsection-header:hover { background: #f8fafc; color: #1e293b; }
.mnav-subsection-header.open  { color: #1d4ed8; }

/* Rotating chevron indicator */
.mnav-chevron {
    margin-left: auto;
    font-size: .6rem;
    color: #94a3b8;
    transition: transform .18s ease;
    flex-shrink: 0;
}
.mnav-toggle.open .mnav-chevron { transform: rotate(90deg); }

/* ── Responsive: small screens (≤ 600px) ───────────────────── */
/* Nav visibility and hamburger are handled by JS (ecNav) —    */
/* this only trims cosmetic items on truly tiny viewports.     */
@media (max-width: 600px) {
    .user-info    { display: none !important; }
    .user-chevron { display: none !important; }
    .app-content  { padding: 1rem .75rem !important; }
}

/* ── Number inputs — text-box behaviour ────────────────────── */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* ── MudBlazor spacing override — tighter form rows ────────── */
.mt-2, .my-2 { margin-top: 1px !important; }

/* ── EC inputs — reduced horizontal padding ─────────────────── */
/* Applies to ECInput, ECNumberInput, ECDatePicker, ECLookup, ECSelect */
.mud-input input,
.mud-input textarea,
.mud-input .mud-input-slot { padding-left: 8px !important; padding-right: 8px !important; }
.mud-input-adornment-start { padding-left: 8px !important; }
.mud-input-adornment-end   { padding-right: 8px !important; }

/* ── Date picker adornment icon — reduce button padding ─────── */
.mud-input .mud-input-adornment .mud-icon-button {
    padding-left: 5px !important;
    padding-right: 5px !important;
}

/* ── ECComboBox — selected item (global: MudPopover renders in portal) ── */
.mud-list-item.ec-combo-selected,
.mud-list-item.ec-combo-selected:hover {
    font-weight: 600;
    color: var(--mud-palette-primary, #594ae2);
    background: var(--mud-palette-action-hover, rgba(0,0,0,.04));
}

/* ── AWB Details mismatch dialog ────────────────────────────────────── */
.ec-mismatch-hint {
    font-size: 12.5px;
    color: var(--mud-palette-text-secondary, #64748b);
}
.ec-mismatch-lbl {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--mud-palette-text-secondary, #64748b);
    margin-bottom: 4px;
}
.ec-mismatch-block {
    margin: 0;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}
.ec-mismatch-diff {
    background: var(--mud-palette-background-grey, #f8fafc);
    border: 1px solid var(--mud-palette-divider, #e2e8f0);
}
.diff-del {
    background: #fee2e2;
    color: #991b1b;
    text-decoration: line-through;
    border-radius: 2px;
    padding: 0 1px;
}
.diff-ins {
    background: #dcfce7;
    color: #166534;
    border-radius: 2px;
    padding: 0 1px;
}
.diff-empty { color: #94a3b8; }
.diff-del-sample {
    background: #fee2e2;
    color: #991b1b;
    text-decoration: line-through;
    font-size: 11px;
    border-radius: 2px;
    padding: 0 3px;
}
.diff-ins-sample {
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    border-radius: 2px;
    padding: 0 3px;
}


