:root {
    --taci-navy: #0f2744;
    --taci-blue: #1d4e89;
    --taci-red: #c8102e;
    --taci-bg: #eef2f6;
    --taci-ink: #1c2430;
}

body {
    background: var(--taci-bg);
    color: var(--taci-ink);
    font-family: "Segoe UI", system-ui, sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-shell main {
    flex: 1 0 auto;
}

.navbar-taci {
    background: var(--taci-navy);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.navbar-taci .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.navbar-taci .brand-mark {
    height: 28px;
    width: auto;
    background: #fff;
    border-radius: 4px;
    padding: 2px;
}

.navbar-taci .nav-link .fa,
.btn .fa {
    margin-right: 0.35rem;
}

.navbar-taci .nav-link {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.navbar-taci .nav-link:hover,
.navbar-taci .nav-link:focus,
.navbar-taci .nav-link.active {
    color: #fff;
}

.navbar-taci .nav-link.active {
    box-shadow: inset 0 -2px 0 var(--taci-red);
}

.navbar-user {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

.app-footer {
    margin-top: auto;
    color: #667085;
    font-size: 0.85rem;
}

.stat-card {
    display: block;
    height: 100%;
    color: #fff;
    text-decoration: none;
    border-radius: 0.75rem;
    padding: 1.25rem 1.25rem 1rem;
    box-shadow: 0 8px 24px rgba(15, 39, 68, 0.12);
}

.stat-card:hover {
    color: #fff;
    transform: translateY(-1px);
}

.stat-card-open {
    background: linear-gradient(145deg, #9f1239, #c8102e);
}

.stat-card-today {
    background: linear-gradient(145deg, #163a66, #1d4e89);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-label {
    margin: 0.25rem 0 0.75rem;
    opacity: 0.92;
}

.stat-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.95;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(200, 16, 46, 0.16), transparent 28%),
        linear-gradient(180deg, #0f2744 0%, #1d4e89 42%, #eef2f6 42%);
}

.login-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 18px 50px rgba(15, 39, 68, 0.18);
}

.status-card {
    width: min(40rem, 100%);
    margin: 1.25rem auto 0;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 10px 36px rgba(15, 39, 68, 0.06);
    padding: 2.75rem 2rem 2.5rem;
    text-align: center;
}

.status-art {
    width: 15.5rem;
    margin: 0 auto 0.35rem;
}

.status-art svg {
    display: block;
    width: 100%;
    height: auto;
}

.status-card h1 {
    color: #1c2742;
    font-size: 1.85rem;
    font-weight: 700;
    margin: 0.35rem 0 0.85rem;
}

.status-copy {
    color: #8b95a8;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 32rem;
}

.status-home {
    margin-top: 1.35rem;
    border-radius: 0.45rem;
    font-weight: 600;
    padding: 0.5rem 1.15rem;
}

.login-card img {
    max-width: 100%;
    height: auto;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    margin-left: 0.35rem;
}

table.dataTable th,
table.dataTable td {
    white-space: nowrap;
}

table.dataTable th.qty,
table.dataTable td.qty {
    text-align: right;
}

table.dataTable td.qty {
    font-weight: 700;
}

table.dataTable thead th.qty-weekend {
    background-color: #c8102e !important;
    color: #fff;
}

table.dataTable td.qty-zero,
table.dataTable.display tbody tr td.qty-zero,
table.dataTable.display tbody tr.odd td.qty-zero,
table.dataTable.display tbody tr:hover td.qty-zero,
table.dataTable.display tbody tr > .sorting_1.qty-zero,
table.dataTable.display tbody tr.odd > .sorting_1.qty-zero {
    color: transparent;
    background-color: #c5ccd4 !important;
    font-weight: 400;
}

.dataTables_wrapper {
    overflow-x: auto;
}

.select2-container {
    width: 100% !important;
}

.field-short {
    width: 11rem;
    max-width: 100%;
}

.datepicker {
    z-index: 1060;
}

.open-po-swatch {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    margin: 0 0.2rem 0 0.15rem;
    border-radius: 2px;
    background: #d8f3e4;
    box-shadow: inset 0 -2px 0 #1b7f4a;
    vertical-align: -1px;
}

.datepicker table tr td.day.has-open-po,
.datepicker table tr td.day.has-open-po.old,
.datepicker table tr td.day.has-open-po.new {
    background: #d8f3e4;
    background-image: none;
    color: #0f2744;
    font-weight: 700;
    box-shadow: inset 0 -3px 0 #1b7f4a;
}

.datepicker table tr td.day.has-open-po:hover,
.datepicker table tr td.day.has-open-po.focused {
    background: #c3ecd4;
    background-image: none;
}

.datepicker table tr td.day.has-open-po.active,
.datepicker table tr td.day.has-open-po.active:hover {
    background: #0f2744;
    background-image: none;
    color: #fff;
    box-shadow: inset 0 -3px 0 #7dffa8;
}

.datepicker table tr td span.has-open-po {
    background: #d8f3e4;
    background-image: none;
    color: #0f2744;
    font-weight: 700;
}

.datepicker table tr td span.has-open-po.active,
.datepicker table tr td span.has-open-po.active:hover {
    background: #0f2744;
    background-image: none;
    color: #fff;
}

.qty-delivery {
    width: 7.5rem;
    min-width: 7.5rem;
}

.step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    margin-right: 0.45rem;
    border-radius: 50%;
    background: var(--taci-navy);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.qty-col {
    background: #fff8f0;
}

tr.is-shipping .qty-col {
    background: #e8f6ee;
}

.summary-card {
    height: 100%;
    background: #fff;
    border: 1px solid #e6ebf1;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
}

.summary-label {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.summary-label .fa {
    margin-right: 0.3rem;
}

.summary-value {
    margin-top: 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.summary-created {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e6ebf1;
}

.delivery-summary {
    background: #f8fafc;
    border: 1px solid #e6ebf1;
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
}

.sm-board {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.sm-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sm-head h1 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: #1c2430;
}

.sm-head p {
    margin: 0.1rem 0 0;
    color: #667085;
}

.sm-head-icon,
.sm-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 0.7rem;
}

.sm-head-icon {
    width: 2.7rem;
    height: 2.7rem;
    background: #e7f0ff;
    color: #2f6fed;
    font-size: 1.15rem;
}

.sm-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
}

.sm-kpi,
.sm-panel {
    background: #fff;
    border: 1px solid #e7edf4;
    border-radius: 0.9rem;
    box-shadow: 0 8px 24px rgba(15, 39, 68, 0.05);
}

.sm-kpi {
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem;
}

.sm-kpi-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.7rem;
    font-size: 1rem;
}

.sm-tone-blue { background: #e7f0ff; color: #2f6fed; }
.sm-tone-orange { background: #fff1dc; color: #e59a16; }
.sm-tone-green { background: #e5f7ee; color: #1f9d55; }
.sm-tone-purple { background: #f1eaff; color: #6d4aff; }
.sm-tone-sky { background: #e7f3ff; color: #3b82f6; }
.sm-tone-red { background: #fdecec; color: #e14d4d; }

.sm-kpi-label {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 600;
}

.sm-kpi-value {
    font-size: 1.35rem;
    font-weight: 750;
    line-height: 1.15;
    color: #1c2430;
}

.sm-kpi-meta,
.sm-kpi-pct {
    color: #8b95a8;
    font-size: 0.75rem;
}

.sm-meter {
    height: 0.35rem;
    margin: 0.35rem 0 0.2rem;
    border-radius: 999px;
    background: #ffe8c2;
    overflow: hidden;
}

.sm-meter span {
    display: block;
    height: 100%;
    background: #f5a524;
}

.sm-trend-up,
.sm-trend-down {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.sm-trend-up { color: #1f9d55; }
.sm-trend-down { color: #d14343; }

.sm-charts {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.3fr);
    gap: 0.75rem;
}

.sm-panel {
    padding: 1rem 1.1rem 1.1rem;
}

.sm-panel h2 {
    margin: 0 0 0.9rem;
    font-size: 1rem;
    font-weight: 700;
}

.sm-donut-wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.sm-donut {
    width: 180px;
    height: 180px;
    flex: 0 0 auto;
}

.sm-donut-total {
    font-size: 18px;
    font-weight: 700;
    fill: #1c2430;
}

.sm-donut-caption {
    font-size: 9px;
    fill: #667085;
}

.sm-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
    color: #344054;
    font-size: 0.92rem;
}

.sm-legend strong {
    margin-left: 0.35rem;
}

.sm-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.35rem;
    border-radius: 50%;
}

.sm-dot-blue { background: #2f6fed; }
.sm-dot-orange { background: #f5a524; }
.sm-legend-pct { display: block; margin: -0.15rem 0 0.35rem 1rem; font-size: 0.78rem; font-weight: 700; }
.sm-pct-blue { color: #2f6fed; }
.sm-pct-orange { color: #e59a16; }

.sm-bars {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: end;
    min-height: 220px;
}

.sm-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 220px;
}

.sm-bar-value {
    font-size: 0.78rem;
    font-weight: 700;
    color: #344054;
}

.sm-bar-track {
    display: flex;
    align-items: flex-end;
    width: 100%;
    max-width: 72px;
    flex: 1 1 auto;
    margin: 0.35rem 0;
}

.sm-bar-fill {
    width: 100%;
    border-radius: 0.35rem 0.35rem 0 0;
}

.sm-bar-label {
    font-size: 0.75rem;
    color: #667085;
    text-align: center;
}

.sm-filter-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.sm-filter-head h2 {
    margin-bottom: 0.75rem;
}

.sm-export {
    background: #1f9d55;
    border-color: #1f9d55;
    color: #fff;
    font-weight: 650;
}

.sm-export:hover {
    background: #188a4a;
    color: #fff;
}

.sm-filter-grid {
    display: grid;
    grid-template-columns: 0.8fr 0.8fr 1.1fr 1.3fr auto;
    gap: 0.75rem;
    align-items: end;
}

.sm-dates {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sm-filter-actions {
    display: flex;
    gap: 0.45rem;
}

.sm-search {
    background: #2f6fed;
    border-color: #2f6fed;
    color: #fff;
    font-weight: 650;
}

.sm-search:hover {
    background: #245ed0;
    color: #fff;
}

.sm-badge {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.sm-badge-yes { background: #e5f7ee; color: #1f9d55; }
.sm-badge-no { background: #fdecec; color: #d14343; }
.sm-badge-no-order { background: #eef1f4; color: #667085; }
.sm-badge-in-transit { background: #e7f0ff; color: #2f6fed; }
.sm-badge-partial { background: #fff1dc; color: #c47d0e; }
.sm-badge-unmanifested { background: #f4f0ff; color: #6d4aff; }
.sm-badge-closed { background: #e5f7ee; color: #1f9d55; }

.sm-action {
    border: 0;
    color: #667085;
}

.sm-board .table thead th {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
    border-bottom-color: #e7edf4;
}

@media (max-width: 1280px) {
    .sm-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .sm-charts,
    .sm-filter-grid,
    .sm-donut-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .sm-kpis,
    .sm-donut-wrap {
        grid-template-columns: 1fr;
    }
}

