html, body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #1e293b;
    background-color: #f4f6f9;
}

a, .btn-link {
    color: #2563eb;
}

.btn-primary {
    color: #fff;
    background-color: #2563eb;
    border-color: #1d4ed8;
    border-radius: 6px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1e40af;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.25);
}

.content {
    padding-top: 1.5rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #22c55e;
    border-radius: 4px;
}

.invalid {
    outline: 1px solid #ef4444;
    border-radius: 4px;
}

.validation-message {
    color: #dc2626;
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI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Zlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

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

.pwa-install-banner {
    margin: 1rem 1rem 0;
    padding: 0.9rem 1rem;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pwa-install-banner__content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: #1f2937;
}

.pwa-install-banner__content strong {
    color: #0f172a;
}

.pwa-install-banner__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-progress-card {
    border-radius: 16px;
}

.order-progress-card--fullwidth {
    width: 100%;
}

.order-progress-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    margin: 0.5rem 0 0.25rem;
}

.order-progress-step {
    position: relative;
    flex: 1 1 0;
    text-align: center;
    padding: 0 0.25rem;
}

.order-progress-step::before,
.order-progress-step::after {
    content: "";
    position: absolute;
    top: 2rem;
    height: 3px;
    background: #d1d5db;
    width: 50%;
    z-index: 0;
}

.order-progress-step::before {
    left: -50%;
}

.order-progress-step::after {
    right: -50%;
}

.order-progress-step:first-child::before,
.order-progress-step:last-child::after {
    display: none;
}

.order-progress-step.completed::before,
.order-progress-step.completed::after,
.order-progress-step.in-progress::before {
    background: #67d66d;
}

.order-progress-step.in-progress::after {
    background: #d1d5db;
}

.order-progress-step__meta {
    min-height: 1.25rem;
    margin-bottom: 0.45rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

.order-progress-step__node {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    margin: 0 auto 0.65rem;
    border-radius: 50%;
    border: 3px solid #d1d5db;
    background: #fff;
}

.order-progress-step.completed .order-progress-step__node {
    border-color: #67d66d;
    background: #67d66d;
}

.order-progress-step.in-progress .order-progress-step__node {
    border-color: #f59e0b;
    background: #f59e0b;
}

.order-progress-step__issue {
    position: absolute;
    top: -7px;
    right: -8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff;
}

.order-progress-step__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.2;
}

.order-progress-step.completed .order-progress-step__label,
.order-progress-step.completed .order-progress-step__label {
    color: #67d66d;
}

.order-progress-step.in-progress .order-progress-step__label {
    color: #f59e0b;
}

.location-page__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.location-page__subtitle {
    color: #64748b;
    max-width: 720px;
}

.location-stat-card {
    height: 100%;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.location-stat-card__label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.location-stat-card__value {
    margin-top: 0.35rem;
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
}

.location-toolbar {
    display: flex;
    justify-content: flex-end;
}

.location-toolbar__search {
    max-width: 460px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    background: #fff;
    padding: 0.8rem 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.location-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 220px;
    padding: 2rem;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85);
}

.location-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.35rem;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.08);
}

.location-card--featured {
    border-color: #bfdbfe;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    box-shadow: 0 22px 44px rgba(37, 99, 235, 0.12);
}

.location-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.location-card__code {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
}

.location-card__description {
    margin-top: 0.25rem;
    color: #64748b;
}

.location-card__count {
    min-width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 1.15rem;
    font-weight: 700;
}

.location-card__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(239, 246, 255, 0.8);
}

.location-card__meta-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.location-card__meta-value {
    color: #0f172a;
    font-weight: 600;
    word-break: break-word;
}

.location-card__section-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #334155;
}

.location-card__empty {
    padding: 1rem;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
}

.location-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.location-card__items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.location-card__items--featured {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.location-card__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #fff;
}

.location-card__item--interactive {
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.location-card__item--interactive:hover,
.location-card__item--interactive:focus-visible {
    border-color: #60a5fa;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
    outline: none;
}

.location-card__item-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.location-card__item-main strong {
    color: #0f172a;
}

.location-card__item-code {
    font-size: 0.82rem;
    color: #64748b;
}

.location-card__item-qty {
    flex-shrink: 0;
    font-weight: 700;
    color: #1d4ed8;
}

.location-card__chip {
    display: inline-flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 140px;
    padding: 0.8rem 0.9rem;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #fff;
    color: #334155;
}

.location-card__chip strong {
    color: #1d4ed8;
}

.location-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: auto;
    padding-top: 0.25rem;
}

.delivery-page {
    display: flex;
    flex-direction: column;
}

.delivery-page__hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.5rem;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.delivery-page__subtitle {
    max-width: 760px;
    color: #64748b;
}

.delivery-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 0.85rem;
    min-width: min(100%, 520px);
}

.delivery-stat-card {
    padding: 1rem 1.1rem;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}

.delivery-stat-card--accent {
    border-color: #a7f3d0;
    background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
}

.delivery-stat-card__label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.delivery-stat-card__value {
    font-size: 1.65rem;
    color: #0f172a;
}

.delivery-form-card,
.delivery-filters-card,
.delivery-grid-card {
    border-radius: 20px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.delivery-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.delivery-card-header--with-actions {
    flex-wrap: wrap;
}

.delivery-card-header__subtitle {
    color: #64748b;
}

.delivery-quick-section + .delivery-quick-section {
    margin-top: 1.25rem;
}

.delivery-quick-section {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 30px rgba(15, 23, 42, 0.04);
}

.delivery-quick-section--materials {
    border-color: #dbeafe;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.delivery-quick-section--locations {
    border-color: #e2e8f0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
}

.delivery-quick-section--locations::before {
    content: "";
    position: absolute;
    top: -0.8rem;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #cbd5e1 15%, #cbd5e1 85%, transparent 100%);
}

.delivery-quick-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.delivery-quick-section__label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
}

.delivery-quick-section__search {
    max-width: 340px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.delivery-quick-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.delivery-quick-chip {
    min-width: 150px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #fff;
    color: #334155;
    transition: all 0.2s ease;
}

.delivery-quick-chip strong {
    color: #0f172a;
}

.delivery-quick-chip span {
    font-size: 0.8rem;
    color: #64748b;
}

.delivery-quick-chip:hover,
.delivery-quick-chip--active {
    border-color: #60a5fa;
    background: #eff6ff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.delivery-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.delivery-dropdown-option {
    display: flex;
    flex-direction: column;
}

.delivery-dropdown-option span {
    font-size: 0.8rem;
    color: #64748b;
}

.delivery-form-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.delivery-form-summary__item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.95rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.delivery-form-summary__item span {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.delivery-form-summary__item strong {
    color: #0f172a;
}

.delivery-form-summary__item small {
    color: #64748b;
}

.delivery-form-actions,
.delivery-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.delivery-form-actions {
    margin-top: 1rem;
}

.delivery-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.delivery-grid-primary {
    font-weight: 600;
    color: #0f172a;
}

.delivery-grid-secondary {
    font-size: 0.8rem;
    color: #64748b;
}

@media (max-width: 768px) {
    .pwa-install-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .pwa-install-banner__actions {
        justify-content: flex-end;
    }

    .rz-data-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .rz-data-grid table {
        min-width: 100%;
        width: max-content;
    }

    .rz-data-grid th,
    .rz-data-grid td {
        white-space: nowrap;
    }

    .order-progress-timeline {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .order-progress-step {
        min-width: 90px;
    }

    .location-page__hero {
        flex-direction: column;
        align-items: stretch;
    }

    .location-toolbar {
        justify-content: stretch;
    }

    .location-toolbar__search {
        max-width: none;
    }

    .location-card__meta {
        grid-template-columns: 1fr;
    }

    .location-card__item {
        flex-direction: column;
        align-items: flex-start;
    }

    .location-card__items--featured {
        grid-template-columns: 1fr;
    }

    .delivery-page__hero {
        flex-direction: column;
    }

    .delivery-stat-grid,
    .delivery-form-grid,
    .delivery-form-summary,
    .delivery-filter-grid {
        grid-template-columns: 1fr;
    }

    .delivery-stat-grid {
        min-width: 0;
        width: 100%;
    }

    .delivery-quick-chip {
        width: 100%;
    }

    .delivery-quick-section__header {
        flex-direction: column;
        align-items: stretch;
    }

    .delivery-quick-section__search {
        max-width: none;
    }
}