html,
body {
    height: 100%;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.5;
    font-feature-settings: normal;
    font-variation-settings: normal;
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

:root {
    --oms-navbar-height: 64px;
    --oms-layout-max-width: 1600px;
    --oms-layout-side-padding: 18px;
    --oms-layout-top-gap: 12px;
    --oms-orders-grid-loading-height: 60vh;
}

.wrap {
    min-height: 100%;
    height: auto;
    margin: 0 auto;
    padding: 0;
}

.wrap > .container.oms-layout-container {
    max-width: var(--oms-layout-max-width);
    padding: calc(var(--oms-navbar-height) + var(--oms-layout-top-gap)) var(--oms-layout-side-padding) 20px;
}

.footer {
    height: 60px;
    padding-top: 20px;
}

.jumbotron {
    text-align: center;
    background-color: transparent;
}

.jumbotron .btn {
    font-size: 21px;
    padding: 14px 24px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    position: relative;
    top: 1px;
    display: inline-block;
    font-family: "Font Awesome 5 Free", serif;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
    padding-left: 5px;
}

a.asc:after {
    content: "\f0de";
}

a.desc:after {
    content: "\f0dd";
}

.sort-numerical a.asc:after {
    content: "\f162";
}

.sort-numerical a.desc:after {
    content: "\f163";
}

.sort-ordinal a.asc:after {
    content: "\f15d";
}

.sort-ordinal a.desc:after {
    content: "\f15e";
}

.grid-view td {
    white-space: nowrap;
}

.grid-view .filters input,
.grid-view .filters select {
    min-width: 50px;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav > li > form {
    padding: 8px;
}

@media (max-width: 768px) {
    .nav li > form {
        padding: 3px;
    }
}

.nav > li > form > button:hover {
    text-decoration: none;
}

div.required label:after {
    content: " *";
    color: red;
}

.nav-tabs-custom > .tab-content {
    background: #fff none repeat scroll 0 0;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    padding: 10px;
}

.nav-tabs > .tab-content {
    padding: 10px;
}

.profile-user-img {
    border: 3px solid #d2d6de;
    margin: 0 auto;
    padding: 3px;
    width: 100px;
}

.yii-logo {
    width: auto;
    height: 32px;
    float: left;
    padding-right: 10px;
}

.oms-navbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    min-height: var(--oms-navbar-height);
}

.oms-navbar__inner {
    padding-left: var(--oms-layout-side-padding);
    padding-right: var(--oms-layout-side-padding);
}

.oms-navbar .navbar-brand {
    color: #111827;
    font-weight: 700;
}

.oms-navbar .navbar-brand:hover,
.oms-navbar .navbar-brand:focus {
    color: #111827;
}

.oms-navbar__link {
    color: #4b5563 !important;
    border-radius: 8px;
    padding: 0.45rem 0.8rem !important;
    font-weight: 600;
}

.oms-navbar__link:hover,
.oms-navbar__link:focus {
    color: #1f2937 !important;
    background: #f3f4f6;
}

.oms-navbar__link--active {
    color: #1d4ed8 !important;
    background: #eff6ff;
}

.oms-navbar .navbar-collapse {
    justify-content: space-between;
}

.oms-navbar__main {
    margin: 0 auto;
}

.oms-navbar__main .nav-item {
    margin: 0 2px;
}

.oms-main-tabs .tab-content {
    display: none;
}

.oms-main-tabs .nav-tabs,
.oms-main-tabs .nav-pills {
    border: 0;
    margin-bottom: 0;
}

.oms-main-tabs .nav-link {
    border: 0 !important;
    border-radius: 8px !important;
    padding: 0.45rem 0.8rem !important;
    font-weight: 600;
    color: #4b5563 !important;
    background: transparent;
}

.oms-main-tabs .nav-link:hover,
.oms-main-tabs .nav-link:focus {
    color: #1f2937 !important;
    background: #f3f4f6;
}

.oms-main-tabs .nav-link.active,
.oms-main-tabs .nav-item.active .nav-link,
.oms-main-tabs .nav-item.show .nav-link {
    color: #1d4ed8 !important;
    background: #eff6ff !important;
}

.oms-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.oms-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}

.oms-user-name {
    color: #374151;
    font-weight: 600;
    font-size: 0.92rem;
}

.auth-login {
    padding: 20px 0 10px;
}

.auth-login__card {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 28px;
    background: linear-gradient(130deg, #f5f8ff 0%, #f2fbf7 100%);
    border: 1px solid #e6ecf4;
    border-radius: 14px;
    box-shadow: 0 20px 35px rgba(20, 36, 60, 0.09);
    overflow: hidden;
}

.auth-login__intro {
    padding: 34px 30px;
    background: radial-gradient(circle at 10% 10%, #ffffff 0%, #eef4ff 65%, #e8f8ef 100%);
}

.auth-login__eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e7f0ff;
    color: #295ea8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.auth-login__title {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.15;
    font-weight: 700;
    color: #1f2d44;
}

.auth-login__subtitle {
    margin: 0 0 22px;
    color: #425876;
    font-size: 15px;
}

.auth-login__benefits {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-login__benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #334964;
    font-size: 14px;
}

.auth-login__benefits .fas,
.auth-login__benefits .far {
    color: #1f7a58;
}

.auth-login__form-wrap {
    padding: 34px 30px;
    background: #ffffff;
}

.auth-login__form .form-group {
    margin-bottom: 10px;
}

.auth-login__form label {
    color: #24364f;
    font-weight: 600;
    margin-bottom: 6px;
}

.auth-login__input {
    height: 44px;
    border-radius: 9px;
    border: 1px solid #cfd8e7;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-login__input:focus {
    border-color: #3f79c8;
    box-shadow: 0 0 0 3px rgba(63, 121, 200, 0.15);
}

.auth-login__meta {
    margin-top: 6px;
}

.auth-login__meta .form-check {
    display: flex;
    align-items: center;
    min-height: 1.5rem;
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.auth-login__meta .form-check-input {
    margin-left: -1.5rem;
}

.auth-login__meta .form-check-label {
    display: block;
    margin-bottom: 0;
    font-weight: 500;
    line-height: 1.3;
}

.auth-login__reset {
    margin: 4px 0 18px;
    color: #5d6f86;
    font-size: 14px;
}

.auth-login__link {
    color: #1f66ba;
    text-decoration: none;
    border-bottom: 1px dashed rgba(31, 102, 186, 0.35);
}

.auth-login__link:hover,
.auth-login__link:focus {
    color: #144b8f;
    text-decoration: none;
    border-bottom-color: rgba(20, 75, 143, 0.55);
}

.auth-login__actions {
    margin-bottom: 0;
}

.auth-login__submit {
    width: 100%;
    height: 44px;
    border-radius: 9px;
    border: 0;
    background: linear-gradient(135deg, #2e78cf 0%, #1d65b7 100%);
    box-shadow: 0 10px 18px rgba(29, 101, 183, 0.3);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.auth-login__submit:hover,
.auth-login__submit:focus {
    background: linear-gradient(135deg, #2a6ebd 0%, #18569e 100%);
}

/* --- Auth form: validation error styles --- */

.auth-login__form .form-group .help-block {
    min-height: 20px;
    margin: 4px 0 0;
    padding: 0;
    font-size: 12.5px;
    line-height: 20px;
    color: transparent;
    transition: color 0.2s ease;
}

.auth-login__form .form-group.has-error .help-block {
    color: #dc3545;
    animation: auth-error-fade-in 0.25s ease both;
}

.auth-login__form .form-group.has-error .help-block::before {
    content: "\f06a";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 5px;
    font-size: 11px;
}

.auth-login__form .form-group.has-error .auth-login__input {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.auth-login__form .form-group.has-error label {
    color: #dc3545;
}

.auth-login__form .form-group.has-error .auth-login__input:focus {
    border-color: #3f79c8;
    box-shadow: 0 0 0 3px rgba(63, 121, 200, 0.15);
}

@media (max-width: 992px) {
    .auth-login__card {
        grid-template-columns: 1fr;
    }

    .auth-login__intro,
    .auth-login__form-wrap {
        padding: 26px 20px;
    }

    .auth-login__title {
        font-size: 28px;
    }
}

.oms-dashboard {
    min-height: calc(100vh - 160px);
    padding-left: 0;
    padding-right: 0;
    background: transparent;
    border-radius: 0;
}

.oms-page {
    padding-top: 0;
    padding-bottom: 1.75rem;
}

.oms-page-header__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.28);
}

.oms-dashboard__hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.28);
}

.oms-dashboard h1 {
    font-size: 2.15rem;
    font-weight: 700;
    color: #0f172a;
}

.oms-page-subtitle {
    color: #64748b !important;
    font-size: 1rem;
}

.oms-filters-card .card {
    border-radius: 12px;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.oms-filters-card .form-group {
    min-width: 220px;
}

.oms-filters-card .form-control,
.oms-filters-card .btn {
    height: 38px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.oms-filters-card__reset {
    color: #111827;
    text-decoration: none;
}

.oms-filters-card__reset:hover,
.oms-filters-card__reset:focus {
    color: #111827;
    text-decoration: none;
}

.oms-kpi-card {
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.oms-kpi-card__label {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 600;
}

.oms-kpi-card__value {
    color: #111827;
    font-size: 1.9rem;
    line-height: 1;
    height: 1.9rem;
    display: flex;
    align-items: flex-end;
}

.oms-dashboard-kpi-skeleton {
    display: inline-block;
    width: 4.25rem;
    height: 1.9rem;
    line-height: 1;
    flex: 0 0 auto;
}

.oms-dashboard-kpi-placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

.oms-kpi-card__value .js-dashboard-kpi-value {
    line-height: 1;
}

.oms-dashboard-table__value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    line-height: 1;
}

.oms-dashboard-table__value-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.oms-dashboard-table__value-link:hover,
.oms-dashboard-table__value-link:focus {
    color: #1e40af;
    text-decoration: underline;
}

.oms-dashboard-table__value-empty {
    color: #9ca3af;
    font-weight: 600;
}

.js-dashboard-table-skeleton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 1rem;
}

.oms-dashboard-table__placeholder {
    width: 24px;
}

.oms-kpi-card__badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
}

.oms-kpi-card--blue {
    background: #eff6ff;
}

.oms-kpi-card--blue .oms-kpi-card__badge {
    background: #3b82f6;
}

.oms-kpi-card--red {
    background: #fff1f2;
}

.oms-kpi-card--red .oms-kpi-card__badge {
    background: #ef4444;
}

.oms-kpi-card--amber {
    background: #fffbeb;
}

.oms-kpi-card--amber .oms-kpi-card__badge {
    background: #f59e0b;
}

.oms-kpi-card--green {
    background: #ecfdf5;
}

.oms-kpi-card--green .oms-kpi-card__badge {
    background: #22c55e;
}

.oms-kpi-card--gray {
    background: #f8fafc;
}

.oms-kpi-card--gray .oms-kpi-card__badge {
    background: #64748b;
}

.oms-dashboard__table-block .card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f1f5f9 !important;
}

.oms-dashboard-table {
    margin-bottom: 0;
    table-layout: fixed;
    min-width: 1100px;
}

.oms-dashboard-table__col-status {
    width: 220px;
}

.oms-dashboard-table__col-metric {
    width: 98px;
}

.oms-dashboard-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    font-weight: 600;
}

.oms-dashboard-table td,
.oms-dashboard-table th {
    vertical-align: middle;
    padding: 0.55rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.oms-dashboard-table tbody tr:hover {
    background: rgba(249, 250, 251, 0.65);
}

.oms-dashboard-table__status-head {
    min-width: 220px;
}

.oms-dashboard-table__within {
    color: #15803d !important;
}

.oms-dashboard-table__exceeds {
    color: #b91c1c !important;
}

.oms-dashboard-table__row-alert {
    background: rgba(254, 242, 242, 0.55);
}

.oms-dashboard-table__row-voided {
    --bs-table-bg: rgba(254, 226, 226, 0.5);
    background: rgba(254, 226, 226, 0.5);
}

.oms-dashboard-table tbody tr.oms-dashboard-table__row-voided:hover {
    --bs-table-bg: rgba(254, 226, 226, 0.65);
    background: rgba(254, 226, 226, 0.65);
}

.oms-dashboard-table__status-voided {
    color: #b91c1c !important;
    font-weight: 600;
}

.oms-dashboard-table__row-voided td.text-muted {
    color: #d1d5db !important;
}

.oms-dashboard-table__row-voided .oms-dashboard-table__value-link {
    color: #b91c1c;
}

.oms-dashboard-table__row-voided .oms-dashboard-table__value-link:hover,
.oms-dashboard-table__row-voided .oms-dashboard-table__value-link:focus {
    color: #991b1b;
}

.oms-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.oms-link:hover,
.oms-link:focus {
    color: #1e40af;
    text-decoration: underline;
}

.oms-link--danger {
    color: #dc2626;
}

.oms-link--danger:hover,
.oms-link--danger:focus {
    color: #b91c1c;
}

.oms-dashboard-table__head--vip {
    background: #fff7e6 !important;
}

.oms-dashboard-table__head--other {
    background: #f3f4f6 !important;
}

.oms-dashboard-table__head--all {
    background: #ebf4ff !important;
}

.oms-orders-page .card {
    border-radius: 12px;
    border: 1px solid #f1f5f9 !important;
    overflow: hidden;
}

.oms-orders-toolbar .form-group {
    min-width: 220px;
}

.oms-orders-toolbar .card {
    border: 1px solid #f3f4f6 !important;
    box-shadow: none !important;
    background: #ffffff;
    overflow: visible;
}

.oms-orders-toolbar__title {
    color: #334155;
    font-size: 1rem;
}

.oms-orders-toolbar__field {
    flex: 1 1 170px;
    min-width: 0;
}

.oms-orders-toolbar__field--search {
    flex: 1.9 1 360px;
}

.oms-input-icon {
    position: relative;
}

.oms-input-icon .fas {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.9rem;
    pointer-events: none;
}

.oms-input-icon .form-control {
    padding-left: 36px;
}

.oms-orders-toolbar .form-control,
.oms-orders-toolbar .btn {
    height: 36px;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border-color: #d1d5db;
    background: #fff;
}

.oms-orders-toolbar .btn-link {
    height: auto;
    color: #111827;
    text-decoration: none;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
}

.oms-orders-toolbar .btn-link:hover,
.oms-orders-toolbar .btn-link:focus {
    color: #0f172a;
}

.oms-orders-toolbar [data-orders-reset="1"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.oms-orders-toolbar [data-orders-apply="1"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.oms-orders-toolbar [data-orders-apply="1"]:hover,
.oms-orders-toolbar [data-orders-apply="1"]:focus {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.oms-orders-toolbar [data-orders-apply="1"]:disabled,
.oms-orders-toolbar [data-orders-apply="1"][aria-disabled="true"] {
    background: #93c5fd;
    border-color: #93c5fd;
    color: #fff;
    opacity: 1;
    cursor: not-allowed;
}

.oms-orders-toolbar .form-check-input {
    margin-top: 0.15rem;
}

.oms-orders-toolbar .form-check-label {
    color: #334155;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.oms-orders-pager-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.oms-orders-pager-size {
    display: inline-flex;
    align-items: center;
}

.oms-orders-page-size-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.oms-orders-page-size-form .form-control {
    height: 32px;
    border-radius: 8px;
    width: fit-content;
    min-width: 0;
    font-size: 0.8125rem;
    border-color: #d1d5db;
}

#orders-page-size {
    text-align: center;
}

.oms-orders-pager-nav .pagination {
    justify-content: center;
    gap: 3px;
}

.oms-orders-pager-nav .page-item .page-link {
    color: #374151;
    background: #fff;
    border-color: #e2e8f0;
    border-radius: 8px !important;
    font-size: 0.8125rem;
    font-weight: 500;
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    box-shadow: none;
}

.oms-orders-pager-nav .page-item .page-link:hover,
.oms-orders-pager-nav .page-item .page-link:focus {
    background: #f1f5f9;
    border-color: #d1d5db;
    color: #0f172a;
    box-shadow: none;
}

.oms-orders-pager-nav .page-item.active .page-link {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.22);
}

.oms-orders-pager-nav .page-item.disabled .page-link {
    color: #9ca3af;
    background: #f8fafc;
    border-color: #e2e8f0;
    opacity: 1;
    pointer-events: none;
}

.oms-toolbar-reset {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    line-height: 1;
}

.oms-toolbar-reset:hover,
.oms-toolbar-reset:focus {
    background: #f3f4f6;
    text-decoration: none;
}

.oms-toolbar-reset .fas {
    font-size: 0.85rem;
}

.oms-order-list-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    font-weight: 600;
    border-top: 0;
    border-bottom: 1px solid #e5e7eb;
}

.oms-order-list-table thead th a {
    color: inherit;
    text-decoration: none;
}

.oms-order-list-table thead th > a {
    display: inline-block;
    position: relative;
    padding-right: 14px;
    white-space: nowrap;
}

.oms-order-list-table thead th > a.asc:after,
.oms-order-list-table thead th > a.desc:after {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-45%);
    padding-left: 0;
}

.oms-order-list-table thead th a:hover,
.oms-order-list-table thead th a:focus {
    color: #0f172a;
    text-decoration: none;
}

.oms-order-list-table td,
.oms-order-list-table th {
    padding: 0.65rem 0.6rem;
    vertical-align: middle;
}

.oms-order-list-table td.oms-order-col-customer,
.oms-order-list-table td.oms-order-col-company {
    white-space: normal;
}

.oms-order-list-table .oms-order-customer-name,
.oms-order-list-table .oms-order-customer-email,
.oms-order-list-table .oms-order-company-name {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.oms-order-list-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.oms-order-list-table tbody tr:hover {
    background: rgba(248, 250, 252, 0.8);
}

.font-weight-semibold {
    font-weight: 600;
}

.oms-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.22rem 0.6rem;
    font-size: 0.74rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.oms-badge--warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.oms-badge--success {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.oms-badge--green {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.oms-badge--blue {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.oms-badge--danger {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.oms-badge--info {
    background: #e0f2fe;
    color: #075985;
    border-color: #bae6fd;
}

.oms-badge--muted {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.oms-badge--danger-soft {
    background: #fce7f3;
    color: #be185d;
    border-color: #fbcfe8;
}

.oms-badge--purple {
    background: #f3e8ff;
    color: #7e22ce;
    border-color: #e9d5ff;
}

.oms-badge--olive {
    background: #ecfccb;
    color: #3f6212;
    border-color: #d9f99d;
}

.oms-badge--vip {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #fff;
    border: 0;
}

.oms-sla-total-indicator {
    color: #8e44ad;
}

.oms-order-details-page .card {
    border-radius: 12px;
    border: 1px solid #f1f5f9 !important;
    overflow: hidden;
}

.oms-order-details-header .card {
    border: 1px solid #e5e7eb !important;
}

.oms-order-details-header h1 {
    font-size: 1.85rem;
    line-height: 1.15;
    font-weight: 700;
    color: #0f172a;
}

.oms-order-back {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
}

.oms-order-back:hover,
.oms-order-back:focus {
    background: #f8fafc;
}

.oms-order-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.3rem;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
}

.oms-order-tab {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.48rem 0.5rem;
    border-radius: 7px;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.oms-order-tab:hover,
.oms-order-tab:focus {
    color: #334155;
    text-decoration: none;
}

.oms-order-tab--active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.oms-order-details-page .card-header h2 {
    color: #0f172a;
    font-size: 1.02rem;
    line-height: 1.2;
    font-weight: 600;
}

.oms-order-details-table {
    table-layout: fixed;
}

.oms-order-details-table thead th {
    background: none !important;
    background-image: none !important;
    background-color: transparent !important;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.25rem;
    letter-spacing: normal;
    text-transform: none;
    font-weight: 500;
    border-top: 0;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem;
    height: 2.5rem;
    vertical-align: middle;
}

.oms-order-details-table tbody td {
    padding: 0.5rem;
    vertical-align: middle;
    border-color: #e5e7eb;
    border-left: 0;
    border-right: 0;
}

.oms-order-details-table tbody tr {
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s ease;
}

.oms-order-details-table tbody tr:last-child {
    border-bottom: 0;
}

.oms-order-details-table tbody tr:hover td {
    background-color: rgba(100, 116, 139, 0.05);
}

.oms-sku-cell {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.875rem;
}

.oms-sku-cell .oms-sku-cell__value {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oms-order-summary {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.oms-order-summary,
.oms-order-summary span {
    color: #6b7280;
    font-size: 0.95rem;
}

.oms-order-summary__total {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
}

.oms-order-summary__total span {
    color: #0f172a;
}

.oms-order-payment-totals {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    color: #475569;
}

.oms-order-payment-totals__remaining {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.65rem;
    margin-top: 0.65rem;
}

.oms-order-details-page .form-control:disabled,
.oms-order-details-page .form-control[readonly] {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
    opacity: 1;
}

.oms-tracking-row {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.6rem;
}

.oms-tracking-row__box {
    width: 90px;
    flex: 0 0 auto;
}

.oms-history-feed {
    max-height: 560px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.oms-history-item {
    padding: 0.65rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.oms-history-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.oms-history-item strong {
    font-size: 0.875rem;
    color: #111827;
}

.oms-history-subtabs {
    display: inline-flex;
    gap: 0.25rem;
    background: #f1f5f9;
    border-radius: 7px;
    padding: 3px;
    margin-bottom: 0.5rem;
}
.oms-history-subtab {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.oms-history-subtab:hover { color: #334155; }
.oms-history-subtab--active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.oms-history-details {
    margin-top: 0.35rem;
    padding-left: 0.85rem;
    border-left: 2px solid #e2e8f0;
}
.js-history-details-toggle { text-decoration: none !important; line-height: 1; }
.js-history-details-toggle:hover { color: #334155 !important; }
.js-history-toggle-icon {
    transition: transform 0.15s ease;
    display: inline-block;
}
.js-history-toggle-icon.oms-rotated { transform: rotate(90deg); }

.oms-workflow {
    display: flex;
    align-items: center;
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.oms-workflow__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.oms-workflow__line {
    width: 24px;
    height: 2px;
    flex: 0 0 auto;
}

.oms-workflow__dot--done,
.oms-workflow__line--done {
    background: #22c55e;
}

.oms-workflow__dot--pending,
.oms-workflow__line--pending {
    background: #e5e7eb;
}

.oms-workflow__dot--current {
    background: #3b82f6;
    box-shadow: 0 0 0 4px #dbeafe;
}

.oms-note {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.7rem;
}

.oms-toast-stack {
    z-index: 2000;
}

.oms-toast-stack .toast {
    min-width: 320px;
}

.oms-confirm-modal .modal-content {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.oms-confirm-modal .modal-header,
.oms-confirm-modal .modal-footer {
    border-color: #f1f5f9;
}

.oms-confirm-modal__message {
    color: #111827;
    font-size: 0.95rem;
    line-height: 1.4;
    white-space: pre-line;
}

.oms-confirm-modal__hint {
    margin-top: 0.55rem;
    font-size: 0.78rem;
}

.oms-confirm-modal__loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.82);
}

.oms-confirm-modal.is-loading .btn-close,
.oms-confirm-modal.is-loading [data-bs-dismiss="modal"] {
    pointer-events: none;
}

.oms-layout-container {
    position: relative;
}

.oms-pjax-loader {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.16s ease;
    z-index: 1200;
}

#oms-pjax-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
}

#oms-pjax-loader.is-active {
    pointer-events: auto;
}

.oms-pjax-loader.is-active {
    opacity: 1;
}

.oms-pjax-loader__spinner {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 3px solid #dbeafe;
    border-top-color: #3b82f6;
    animation: oms-spin 0.8s linear infinite;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.oms-order-tab-content-wrap {
    position: relative;
}

.oms-order-details-page {
    position: relative;
}

.oms-order-details-page .oms-pjax-loader {
    background: rgba(255, 255, 255, 0.72);
    pointer-events: none;
}

.oms-order-details-page .oms-pjax-loader.is-active {
    pointer-events: auto;
}

#oms-order-action-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
}

#oms-order-action-loader.is-active {
    pointer-events: auto;
}

body.oms-no-scroll {
    overflow: hidden;
}

.oms-orders-grid-wrap {
    position: relative;
}

.oms-orders-grid-wrap.is-loading {
    min-height: var(--oms-orders-grid-loading-height, 60vh);
}

.oms-orders-grid-wrap.is-loading .table-responsive {
    display: none;
}

.oms-orders-grid-wrap.is-loading .oms-pjax-loader {
    background: rgba(255, 255, 255, 0.72);
    pointer-events: auto;
}

body.oms-page-scroll-locked {
    overflow: hidden;
}

.oms-pjax-loader--inner {
    z-index: 30;
}

@keyframes oms-spin {
    to {
        transform: rotate(360deg);
    }
}

#oms-main-pjax,
#oms-order-tab-pjax,
#orders-grid-pjax {
    will-change: opacity;
}

#oms-main-pjax.oms-pjax-phase-leave,
#oms-order-tab-pjax.oms-pjax-phase-leave,
#orders-grid-pjax.oms-pjax-phase-leave {
    opacity: 0;
    transition: opacity 0.14s ease;
}

#oms-main-pjax.oms-pjax-phase-enter,
#oms-order-tab-pjax.oms-pjax-phase-enter,
#orders-grid-pjax.oms-pjax-phase-enter {
    animation: oms-pjax-fade-in 0.2s ease;
}

@keyframes oms-pjax-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes auth-error-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (min-width: 992px) {
    .col-lg-2-4 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* Inline editable quantity — dashed underline hint */
.js-editable-qty {
    cursor: pointer;
    border-bottom: 1px dashed #94a3b8;
    padding-bottom: 1px;
}

.js-editable-qty:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.js-editable-new-qty {
    cursor: pointer;
    border-bottom: 1px dashed #94a3b8;
    padding-bottom: 1px;
}

.js-editable-new-qty:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Inline editable price — same hint as qty */
.js-editable-price {
    cursor: pointer;
    border-bottom: 1px dashed #94a3b8;
    padding-bottom: 1px;
}

.js-editable-price:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.js-editable-new-price {
    cursor: pointer;
    border-bottom: 1px dashed #94a3b8;
    padding-bottom: 1px;
}

.js-editable-new-price:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Inline editable name — same hint as qty/price */
.js-editable-name {
    cursor: pointer;
    border-bottom: 1px dashed #94a3b8;
    padding-bottom: 1px;
}
.js-editable-name:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.js-editable-new-name {
    cursor: pointer;
    border-bottom: 1px dashed #94a3b8;
    padding-bottom: 1px;
}

.js-editable-new-name:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Overlay positioning — inputs sit on top of the cell so they don't shift column width */
.js-qty-cell,
.js-price-cell,
.js-name-cell,
.js-new-name-cell,
.js-new-qty-cell,
.js-new-price-cell {
    position: relative;
}

.js-qty-input,
.js-price-input,
.js-name-input,
.js-new-name-input,
.js-new-name-select,
.js-new-qty-input,
.js-new-price-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 0.25rem 0.5rem;
    z-index: 1;
    background: none;
}

.js-order-items-container .js-name-input,
.js-order-items-container .js-qty-input,
.js-order-items-container .js-price-input,
.js-order-items-container .js-new-name-input,
.js-order-items-container .js-new-name-select,
.js-order-items-container .js-new-qty-input,
.js-order-items-container .kv-table-header,
.js-order-items-container .js-new-price-input {
    border: 0;
    background: none;
    box-shadow: none;
    outline: none;
}

.js-order-items-container .js-name-input:focus,
.js-order-items-container .js-qty-input:focus,
.js-order-items-container .js-price-input:focus,
.js-order-items-container .js-new-name-input:focus,
.js-order-items-container .js-new-name-select:focus,
.js-order-items-container .js-new-qty-input:focus,
.js-order-items-container .js-new-price-input:focus {
    border: 0;
    box-shadow: none;
    outline: none;
}

.js-name-search-results {
    position: fixed;
    z-index: 1050;
    max-height: 200px;
    overflow-y: auto;
    min-width: 250px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0.25rem;
}

.js-qty-input,
.js-price-input,
.js-new-qty-input,
.js-new-price-input {
    text-align: right;
}

/* Keep span in flow but invisible when editing — preserves column width */
.js-qty-cell .js-qty-display.d-none,
.js-price-cell .js-price-display.d-none,
.js-name-cell .js-name-display.d-none,
.js-new-qty-cell .js-new-qty-display.d-none,
.js-new-price-cell .js-new-price-display.d-none,
.js-new-name-cell .js-new-name-display.d-none {
    display: inline !important;
    visibility: hidden;
}

/* Pending change row highlight */
tr.js-order-line-row.js-qty-changed {
    background-color: #fffbeb !important;
}

/* Deleted row */
tr.js-order-line-row.js-line-deleted td {
    text-decoration: line-through;
    opacity: 0.5;
}

/* Undo link stays readable inside deleted rows */
tr.js-order-line-row.js-line-deleted .js-undo-delete-btn {
    text-decoration: none !important;
    opacity: 1 !important;
}

.oms-orders-toolbar .ts-wrapper {
    min-width: 0;
    width: 100%;
}

.oms-orders-toolbar .ts-control,
.oms-orders-page-size-form .ts-control {
    cursor: pointer;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    line-height: 1.25rem;
}

.oms-orders-toolbar .ts-control .item {
    line-height: 1.25rem;
}

.oms-orders-page-size-form .ts-wrapper {
    min-width: 66px;
}

.oms-orders-page-size-form .ts-wrapper.single .ts-control::after {
    display: none;
}

.oms-orders-page-size-form .ts-control:not(.rtl) {
    padding-right: 0.75rem !important;
}

.oms-orders-page-size-form .ts-control .item {
    line-height: 1.25rem;
    width: 100%;
    text-align: center;
    display: inline-block !important;
}

.oms-orders-toolbar .ts-control input,
.oms-orders-page-size-form .ts-control input {
    caret-color: transparent;
}

.oms-orders-page-size-form .ts-control.has-items input {
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    flex: none;
}

.oms-orders-toolbar .ts-dropdown,
.oms-page-size-select.ts-dropdown {
    margin-top: 0 !important;
    z-index: 2050;
}

.oms-page-size-select.ts-dropdown {
    min-width: 66px;
    border-radius: 8px;
    border-color: #d1d5db;
    overflow: hidden;
}

.oms-page-size-select.ts-dropdown .option {
    padding: 6px 12px;
    font-size: 0.8125rem;
    text-align: center;
}

.oms-page-size-select.ts-dropdown .option.active {
    background-color: #f3f4f6;
    color: inherit;
}

.js-new-name-cell .ts-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.js-new-name-cell .ts-control {
    width: 100%;
    height: 100%;
    min-height: calc(1.5em + 0.5rem + 2px);
    font-size: 0.875rem;
}

.js-name-cell .js-inline-name-ts-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.js-order-items-container .js-name-cell .js-inline-name-ts-wrapper {
    border: 0;
    box-shadow: none;
    outline: none;
    background: transparent;
    padding: 0;
}

.js-order-items-container .js-name-cell .js-inline-name-ts-wrapper:focus,
.js-order-items-container .js-name-cell .js-inline-name-ts-wrapper:focus-within,
.js-order-items-container .js-name-cell .js-inline-name-ts-wrapper.focus {
    border: 0;
    box-shadow: none;
    outline: none;
}

.js-name-cell .js-inline-name-ts-wrapper .ts-control {
    width: 100%;
    height: 100%;
    min-height: 100%;
    font-size: 0.875rem;
}

.js-order-items-container .js-new-name-cell .ts-control,
.js-order-items-container .js-name-cell .js-inline-name-ts-wrapper .ts-control {
    border: 0;
    box-shadow: none;
}

.js-order-items-container .js-new-name-cell .ts-control:focus,
.js-order-items-container .js-name-cell .js-inline-name-ts-wrapper .ts-control:focus,
.js-order-items-container .js-new-name-cell .ts-control.focus,
.js-order-items-container .js-name-cell .js-inline-name-ts-wrapper .ts-control.focus {
    border: 0;
    box-shadow: none;
}

.js-new-name-cell .js-new-name-input,
.js-new-name-cell .js-new-name-select {
    width: 100%;
    height: 100%;
    min-height: calc(1.5em + 0.5rem + 2px);
}

.oms-order-items-ts-dropdown {
    margin-top: 0 !important;
    z-index: 2060;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 0.375rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

/* Summary card (matches .oms-order-payment-totals style) */

/* Frontend error page */
.frontend-error {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--oms-navbar-height) - 100px);
    padding: 2rem 1rem;
}

.frontend-error__card {
    text-align: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
    padding: 3rem 2.5rem;
    max-width: 480px;
    width: 100%;
}

.frontend-error__code {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    color: #e5e7eb;
    margin-bottom: 0.5rem;
}

.frontend-error__icon {
    font-size: 2rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.frontend-error__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
}

.frontend-error__message {
    font-size: 0.925rem;
    color: #6b7280;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.frontend-error__btn {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    :root {
        --oms-layout-side-padding: 12px;
        --oms-layout-top-gap: 8px;
    }

    .wrap > .container.oms-layout-container {
        padding-bottom: 16px;
    }

    .oms-navbar__main {
        margin: 0.5rem 0;
    }

    .oms-main-tabs .nav-link {
        display: inline-flex;
        align-items: center;
    }

    .oms-user-name {
        font-size: 0.85rem;
    }

    .oms-dashboard h1 {
        font-size: 1.65rem;
    }

    .oms-dashboard-table td,
    .oms-dashboard-table th,
    .oms-order-list-table td,
    .oms-order-list-table th {
        padding: 0.5rem 0.45rem;
        font-size: 0.78rem;
    }

    .oms-orders-toolbar .card-body {
        padding: 0.75rem;
    }

    .oms-orders-toolbar .form-group {
        min-width: 100%;
        margin-right: 0 !important;
    }

    .oms-orders-toolbar__field {
        flex-basis: 100%;
    }

    .oms-orders-toolbar .btn {
        margin-right: 0.5rem !important;
    }

    .oms-filters-card .form-group {
        min-width: 100%;
        margin-right: 0 !important;
    }

    .oms-filters-card .card-body {
        padding: 0.9rem;
    }

    .oms-order-details-header h1 {
        font-size: 1.45rem;
    }

    .oms-order-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .oms-tracking-row {
        flex-direction: column;
        align-items: stretch;
    }

    .oms-tracking-row__box {
        width: 100%;
    }
}
