:root {
    --sidebar-bg: #1a2332;
    --sidebar-hover: rgba(255, 255, 255, 0.04);
    --sidebar-active: rgba(26, 187, 156, 0.1);
    --sidebar-text: #7b8fa3;
    --sidebar-text-hover: #d7e0ea;
    --sidebar-text-active: #ffffff;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-w: 252px;
    --primary: #1abb9c;
    --primary-lt: rgba(26, 187, 156, 0.08);
    --primary-dk: #169f85;
    --body-bg: #f5f7fb;
    --bg-surface: #ffffff;
    --bg-surface-secondary: #f9fafb;
    --border-color: #e6e7eb;
    --border-color-light: #eff0f3;
    --border-translucent: rgba(4, 32, 69, 0.08);
    --text: #1e2633;
    --text-secondary: #626d7d;
    --text-muted: #7e8896;
    --text-disabled: #c0c7cf;
    --green: #2fb344;
    --red: #d63939;
    --yellow: #f59f00;
    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 8px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-weight-medium: 500;
    --font-weight-bold: 600;
    --shadow: rgba(30, 38, 51, 0.04) 0 2px 4px 0;
}

/* Dashboard ETC - So theo doi tinh hinh thuc hien nha thau */
.etc-ledger-page {
    position: relative;
    min-height: calc(100vh - 92px);
    padding: 22px;
    background: #f3f6fb;
    color: #16345f;
}

.etc-ledger-header,
.etc-ledger-toolbar,
.etc-ledger-card {
    border: 1px solid #dce5f1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 58, 104, 0.06);
}

.etc-ledger-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 18px 22px;
    margin-bottom: 14px;
}

.etc-ledger-title {
    display: flex;
    align-items: center;
    min-width: 0;
    margin-right: auto;
    gap: 14px;
}

.etc-ledger-header > .etc-ledger-btn {
    width: 132px;
    height: 42px;
    min-height: 42px;
    flex: 0 0 132px;
}

.etc-ledger-title > span {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    border-radius: 14px;
    color: #fff;
    font-size: 21px;
    background: linear-gradient(145deg, #0875d1, #0a4ea5);
}

.etc-ledger-title h1 {
    margin: 0 0 4px;
    color: #123b77;
    font-size: 24px;
    font-weight: 800;
}

.etc-ledger-title p {
    margin: 0;
    color: #6d7f99;
    font-size: 14px;
}

.etc-ledger-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.etc-ledger-search {
    display: flex;
    align-items: center;
    flex: 1 1 620px;
    max-width: 780px;
    min-width: 320px;
    border: 1px solid #cdd9e8;
    border-radius: 10px;
    background: #f8fbff;
    overflow: hidden;
}

.etc-ledger-search > i {
    margin-left: 14px;
    color: #5f789a;
}

.etc-ledger-search input {
    min-width: 0;
    flex: 1;
    height: 42px;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #203d66;
    font-size: 14px;
}

.etc-ledger-search .clear {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8192a9;
}

.etc-ledger-btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.etc-ledger-btn.primary {
    height: 42px;
    border-radius: 0;
    color: #fff;
    background: #0a66bd;
}

.etc-ledger-btn.secondary {
    border-color: #bfd0e4;
    color: #245786;
    background: #f4f8fd;
}

.etc-ledger-btn.export {
    min-height: 42px;
    align-self: center;
    color: #fff;
    background: #16845b;
}

.etc-ledger-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.etc-ledger-filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.etc-ledger-filters label {
    margin: 0;
    color: #5f718b;
    font-size: 12px;
    font-weight: 700;
}

.etc-ledger-filters label > span {
    display: block;
    margin-bottom: 5px;
}

.etc-ledger-filters select {
    min-width: 128px;
    height: 42px;
    padding: 0 30px 0 11px;
    border: 1px solid #cdd9e8;
    border-radius: 9px;
    outline: 0;
    color: #24476f;
    background: #fff;
}

.etc-ledger-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    color: #5f718b;
    font-size: 13px;
}

.etc-ledger-summary b {
    color: #0a5cb1;
    font-size: 15px;
}

.etc-ledger-summary em {
    display: block;
    max-width: 230px;
    overflow: hidden;
    color: #7b8ca4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.etc-ledger-summary label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    white-space: nowrap;
}

.etc-ledger-summary select {
    height: 36px;
    padding: 0 28px 0 10px;
    border: 1px solid #cdd9e8;
    border-radius: 8px;
    color: #24476f;
    background: #fff;
}

.etc-ledger-card {
    overflow: hidden;
}

.etc-ledger-table-wrap {
    max-height: calc(100vh - 325px);
    min-height: 420px;
    overflow: auto;
}

.etc-ledger-table {
    width: max-content;
    min-width: 100%;
    margin: 0;
    border-spacing: 0;
    border-collapse: separate;
    color: #2a456a;
    font-size: 13.5px;
}

.etc-ledger-table th,
.etc-ledger-table td {
    max-width: 300px;
    padding: 11px 12px;
    overflow: hidden;
    border-right: 1px solid #e4ebf4;
    border-bottom: 1px solid #e4ebf4;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.etc-ledger-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    min-width: 130px;
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    background: #155da8;
}

.etc-ledger-table td[data-column-type="numeric"],
.etc-ledger-table td[data-column-type="integer"] {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.etc-ledger-table td[data-column-type="status"] {
    text-align: center;
}

.etc-ledger-table th.tender-result-filter-header {
    z-index: 7;
    min-width: 170px;
    overflow: visible;
}

.tender-result-filter {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tender-result-filter-toggle {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 7px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.tender-result-filter-toggle:hover,
.tender-result-filter-toggle.active {
    border-color: #ffd66b;
    color: #173c68;
    background: #ffd66b;
}

.tender-result-filter-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: -5px;
    z-index: 20;
    min-width: 220px;
    max-height: 320px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid #cbd8e8;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(19, 51, 89, 0.22);
}

.tender-result-filter-menu::before {
    position: absolute;
    top: -6px;
    right: 13px;
    width: 11px;
    height: 11px;
    border-top: 1px solid #cbd8e8;
    border-left: 1px solid #cbd8e8;
    background: #fff;
    content: "";
    transform: rotate(45deg);
}

.tender-result-filter-menu button {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    color: #294d76;
    text-align: left;
    background: transparent;
}

.tender-result-filter-menu button:hover {
    background: #edf5ff;
}

.tender-result-filter-menu button.selected {
    color: #075aa9;
    font-weight: 750;
    background: #e4f1ff;
}

.tender-result-filter-menu button i {
    color: #0b78c8;
}

.tender-result-table th:nth-child(5),
.tender-result-table th:nth-child(6),
.tender-result-table th:nth-child(7),
.tender-result-table th:nth-child(10),
.tender-result-table th:nth-child(17),
.tender-result-table td:nth-child(5),
.tender-result-table td:nth-child(6),
.tender-result-table td:nth-child(7),
.tender-result-table td:nth-child(10),
.tender-result-table td:nth-child(17) {
    min-width: 220px;
}

.tender-result-status {
    display: inline-flex;
    min-width: 104px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

.tender-result-cell {
    display: flex;
    min-width: 250px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.tender-result-details {
    display: grid;
    gap: 3px;
    color: #405b78;
    font-size: 11px;
    line-height: 1.35;
    white-space: normal;
}

.tender-result-details b {
    color: #173f6d;
    font-weight: 750;
}

.tender-result-status.won {
    color: #08754e;
    background: #dcf6eb;
}

.tender-result-status.lost {
    color: #b33b32;
    background: #fde8e6;
}

.tender-result-status.cancelled {
    color: #7c4d16;
    background: #fff0cf;
}

.tender-result-status.unmatched {
    color: #79570d;
    background: #fff5d9;
}

.tender-result-status.pending {
    color: #355d89;
    background: #e7f0fb;
}

.etc-ledger-table tbody tr:nth-child(even) td {
    background: #f8fbff;
}

.etc-ledger-table tbody tr:hover td {
    background: #eaf4ff;
}

.etc-ledger-table .row-number {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 68px;
    min-width: 68px;
    max-width: 68px;
    text-align: center;
    font-weight: 700;
    background: #f1f6fc;
}

.etc-ledger-table th.row-number {
    z-index: 5;
    color: #fff;
    background: #0c4d92;
}

.etc-ledger-empty {
    height: 260px;
    color: #8292a8;
    text-align: center !important;
}

.etc-ledger-empty i {
    display: block;
    margin-bottom: 10px;
    font-size: 28px;
}

.etc-ledger-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 16px;
    border-top: 1px solid #dce5f1;
    color: #62758f;
    background: #fff;
}

.etc-ledger-pagination > div {
    display: flex;
    gap: 5px;
}

.etc-ledger-pagination button {
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    border: 1px solid #cad7e7;
    border-radius: 8px;
    color: #325b87;
    background: #fff;
}

.etc-ledger-pagination button.active {
    border-color: #0a66bd;
    color: #fff;
    background: #0a66bd;
}

.etc-ledger-pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.etc-ledger-warning {
    padding: 16px 18px;
    border: 1px solid #f4d69b;
    border-radius: 10px;
    color: #8a5a00;
    background: #fff8e9;
}

.etc-ledger-loading {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 12px;
    color: #155da8;
    font-size: 15px;
    font-weight: 700;
    background: rgba(243, 246, 251, 0.72);
}

@media (max-width: 900px) {
    .etc-ledger-page {
        padding: 12px;
    }

    .etc-ledger-header,
    .etc-ledger-toolbar,
    .etc-ledger-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .etc-ledger-header {
        align-items: flex-start;
    }

    .etc-ledger-header > .etc-ledger-btn {
        width: 100%;
        flex: 0 0 auto;
    }

    .etc-ledger-search {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex-basis: auto;
    }

    .etc-ledger-filters {
        width: 100%;
        flex-wrap: wrap;
    }

    .etc-ledger-filters label {
        flex: 1 1 140px;
    }

    .etc-ledger-filters select {
        width: 100%;
    }

    .etc-ledger-summary {
        justify-content: flex-start;
        gap: 8px;
    }

    .etc-ledger-table-wrap {
        max-height: calc(100vh - 390px);
    }

    .etc-ledger-pagination {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ST target setup */
.st-setup-page {
    --st-border: #dfe7ef;
    --st-muted: #6b7a8c;
    --st-blue: #1769aa;
    --st-bg: #f4f7fb;
    min-height: 100vh;
    padding: 20px;
    background: var(--st-bg);
    color: #25364a;
}

.st-setup-page.is-loading {
    cursor: progress;
}

.st-setup-header,
.st-setup-filters,
.st-store-create,
.st-reconcile-card,
.st-target-card {
    border: 1px solid var(--st-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(36, 61, 89, .06);
}

.st-setup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
}

.st-setup-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.st-setup-title > span {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #1769aa, #19a5a0);
    font-size: 20px;
}

.st-setup-title h1,
.st-reconcile-card h2,
.st-target-card h2 {
    margin: 0;
    color: #25364a;
    font-weight: 700;
}

.st-setup-title h1 {
    font-size: 22px;
}

.st-setup-title p,
.st-reconcile-card p,
.st-target-card p {
    margin: 5px 0 0;
    color: var(--st-muted);
}

.st-setup-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.st-btn {
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    transition: .15s ease;
}

.st-btn i {
    margin-right: 6px;
}

.st-btn b {
    display: inline-block;
    min-width: 20px;
    margin-left: 5px;
    padding: 1px 5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .2);
}

.st-btn.primary {
    color: #fff;
    background: var(--st-blue);
}

.st-btn.secondary {
    color: #405268;
    border-color: #cbd6e2;
    background: #fff;
}

.st-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(31, 72, 111, .14);
}

.st-btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.st-setup-filters {
    display: grid;
    grid-template-columns: 125px repeat(4, minmax(145px, 1fr)) minmax(230px, 1.5fr);
    gap: 14px;
    margin-top: 15px;
    padding: 15px 18px;
}

.st-setup-filters label,
.st-target-toolbar label {
    margin: 0;
    color: #607185;
    font-size: 12px;
    font-weight: 600;
}

.st-setup-filters label > span {
    display: block;
    margin-bottom: 6px;
}

.st-setup-filters select,
.st-setup-filters input,
.st-target-toolbar select {
    width: 100%;
    height: 38px;
    border: 1px solid #cbd6e2;
    border-radius: 7px;
    background: #fff;
    color: #30445a;
    outline: none;
}

.st-setup-filters select,
.st-target-toolbar select {
    padding: 0 9px;
}

.st-setup-filters select:focus,
.st-setup-filters input:focus,
.target-input-cell input:focus {
    border-color: #4b96d1;
    box-shadow: 0 0 0 3px rgba(23, 105, 170, .1);
}

.st-search > div {
    position: relative;
}

.st-search i {
    position: absolute;
    top: 12px;
    left: 11px;
    color: #91a0b1;
}

.st-search input {
    padding: 0 10px 0 32px;
}

.st-template-warning {
    margin-top: 15px;
    padding: 11px 15px;
    border: 1px solid #f3d292;
    border-radius: 8px;
    color: #805d18;
    background: #fff9e9;
}

.st-store-create {
    margin-top: 15px;
    padding: 18px;
}

.st-store-create header h2 {
    margin: 0;
    color: #25364a;
    font-size: 17px;
}

.st-store-create header p {
    margin: 4px 0 0;
    color: var(--st-muted);
}

.st-store-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.st-store-form label {
    margin: 0;
    color: #607185;
    font-size: 12px;
    font-weight: 600;
}

.st-store-form label.wide {
    grid-column: span 2;
}

.st-store-form label span {
    display: block;
    margin-bottom: 6px;
}

.st-store-form input,
.st-store-form select,
.st-meta-input {
    width: 100%;
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    color: #30445a;
    background: #fff;
    outline: none;
}

.st-store-create footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 15px;
}

.st-template-warning i {
    margin-right: 6px;
}

.st-setup-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 14px;
    margin: 15px 0;
}

.st-setup-stats article {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid var(--st-border);
    border-radius: 10px;
    background: #fff;
}

.st-setup-stats article > i {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 10px;
    font-size: 17px;
}

.st-setup-stats .blue { color: #1769aa; background: #eaf4fd; }
.st-setup-stats .teal { color: #16877f; background: #e7f8f6; }
.st-setup-stats .green { color: #308a54; background: #eaf8ee; }
.st-setup-stats .orange { color: #b76b17; background: #fff3e3; }
.st-setup-stats .red { color: #b84646; background: #fdecec; }

.st-setup-stats strong,
.st-setup-stats span {
    display: block;
}

.st-setup-stats strong {
    overflow: hidden;
    color: #223449;
    font-size: 18px;
    text-overflow: ellipsis;
}

.st-setup-stats span {
    margin-top: 2px;
    color: var(--st-muted);
    font-size: 12px;
}

.st-reconcile-card,
.st-target-card {
    overflow: hidden;
    margin-top: 15px;
}

.st-reconcile-card > header,
.st-target-toolbar {
    padding: 16px 18px;
    border-bottom: 1px solid var(--st-border);
}

.st-reconcile-card h2,
.st-target-card h2 {
    font-size: 17px;
}

.st-reconcile-wrap,
.st-target-table-wrap {
    overflow: auto;
}

.st-target-table-wrap {
    height: clamp(360px, 52vh, 600px);
    overscroll-behavior: contain;
}

.st-reconcile-wrap table,
.st-target-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.st-reconcile-wrap table {
    min-width: 1220px;
}

.st-reconcile-wrap th,
.st-reconcile-wrap td,
.st-target-table th,
.st-target-table td {
    padding: 10px;
    border-right: 1px solid #e8edf3;
    border-bottom: 1px solid #e8edf3;
    text-align: right;
    white-space: nowrap;
}

.st-reconcile-wrap th:first-child,
.st-reconcile-wrap td:first-child {
    text-align: left;
}

.st-reconcile-wrap thead th,
.st-target-table thead th {
    color: #52647a;
    background: #f5f8fb;
    font-weight: 700;
}

.st-reconcile-wrap tbody tr:last-child td,
.st-reconcile-wrap tbody tr:last-child th {
    border-bottom: 0;
}

.st-reconcile-wrap .negative {
    color: #bd3636;
    background: #fff1f1;
}

.st-target-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.st-target-toolbar label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.st-target-toolbar-actions,
.st-edit-mode {
    display: flex;
    align-items: center;
    gap: 8px;
}

.st-target-toolbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.st-edit-mode {
    padding: 3px;
    border: 1px solid #d6e0ea;
    border-radius: 7px;
    background: #f4f7fa;
}

.st-edit-mode button {
    padding: 6px 12px;
    border: 0;
    border-radius: 5px;
    color: #5b6d82;
    background: transparent;
    font-weight: 700;
}

.st-edit-mode button.active {
    color: #fff;
    background: #1769aa;
    box-shadow: 0 2px 5px rgba(23, 105, 170, .22);
}

.st-target-toolbar select {
    width: 95px;
}

.st-target-table {
    min-width: 2050px;
}

.st-target-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

.st-target-table .sticky-col {
    position: sticky;
    z-index: 2;
    text-align: left;
    background: #fff;
}

.st-target-table thead .sticky-col {
    z-index: 5;
    background: #f5f8fb;
}

.st-target-table .col-channel {
    left: 0;
    width: 125px;
    min-width: 125px;
    max-width: 125px;
}

.st-target-table .col-customer {
    left: 125px;
    width: 180px;
    min-width: 180px;
    max-width: 180px;
}

.st-target-table .col-store {
    left: 305px;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
}

.st-target-table .col-region {
    left: 565px;
    width: 105px;
    min-width: 105px;
    max-width: 105px;
    box-shadow: 5px 0 8px rgba(50, 71, 94, .06);
}

.st-target-table td strong,
.st-target-table td small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-target-table td small {
    margin-top: 3px;
    color: #7c8998;
}

.st-target-table td code {
    padding: 0;
    color: #758498;
    background: transparent;
    font-size: 10px;
}

.st-target-table tbody tr:hover td,
.st-target-table tbody tr:hover .sticky-col {
    background: #f5faff;
}

.st-target-table tbody tr.dirty td,
.st-target-table tbody tr.dirty .sticky-col {
    background: #fff9e8;
}

.st-target-table tbody tr.closed {
    opacity: .65;
}

.st-target-table .target-input-cell {
    min-width: 115px;
    padding: 5px 7px;
}

.target-input-cell input {
    width: 100px;
    height: 32px;
    padding: 5px 7px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    text-align: right;
    outline: none;
}

.target-input-cell input.care-employee-input {
    width: 145px;
    text-align: left;
}

.st-target-table .target-input-cell.care-employee-cell {
    min-width: 160px;
}

.target-input-cell input:hover {
    border-color: #d7e0e9;
    background: #fff;
}

.st-target-table .year-total {
    min-width: 125px;
    color: #1769aa;
    background: #f7fbff;
    font-weight: 700;
}

.st-meta-stack {
    display: grid;
    gap: 5px;
}

.st-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 5px;
}

.st-row-actions button {
    display: inline-grid;
    width: 27px;
    height: 27px;
    padding: 0;
    place-items: center;
    border: 1px solid #ccd7e2;
    border-radius: 5px;
    color: #53677e;
    background: #fff;
}

.st-row-actions button.save {
    color: #fff;
    border-color: #278357;
    background: #278357;
}

.st-target-table tfoot th {
    position: sticky;
    bottom: 0;
    z-index: 3;
    color: #2d4259;
    background: #edf3f8;
    font-weight: 700;
}

.st-target-table tfoot .sticky-col {
    z-index: 5;
    text-align: right;
    box-shadow: 5px 0 8px rgba(50, 71, 94, .06);
}

.st-empty {
    padding: 35px;
    color: #7e8da0;
    text-align: center;
}

.st-empty i {
    margin-right: 7px;
}

.st-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    border-top: 1px solid var(--st-border);
    color: var(--st-muted);
}

.st-pagination div {
    display: flex;
    gap: 8px;
}

.st-pagination button {
    padding: 7px 11px;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    color: #405268;
    background: #fff;
}

.st-pagination button:disabled {
    opacity: .45;
}

@media (max-width: 1200px) {
    .st-setup-filters {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .st-setup-stats {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .st-store-form {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}

@media (max-width: 767px) {
    .st-target-table-wrap {
        height: 58vh;
        min-height: 320px;
    }

    .st-setup-page {
        padding: 10px;
    }

    .st-setup-header,
    .st-target-toolbar,
    .st-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .st-setup-actions {
        width: 100%;
    }

    .st-setup-actions .st-btn {
        flex: 1;
    }

    .st-setup-filters,
    .st-setup-stats,
    .st-store-form {
        grid-template-columns: 1fr;
    }

    .st-store-form label.wide {
        grid-column: auto;
    }

    .st-target-toolbar label {
        justify-content: flex-end;
    }

    .st-pagination div,
    .st-pagination button {
        width: 100%;
    }
}

/* Dashboard MT - layout derived from BBT_MT~2.HTM */
.mt-dashboard {
    --mt-navy: #0b3d62;
    --mt-blue: #1b6fb5;
    --mt-mint: #1ea896;
    --mt-bg: #f4f7fa;
    --mt-card: #fff;
    --mt-ink: #16232e;
    --mt-muted: #5a6b7b;
    --mt-border: #e3eaf0;
    --mt-good: #1e9e6b;
    --mt-warn: #d98a1b;
    --mt-bad: #d0483e;
    max-width: 1400px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 20px 20px 60px;
    color: var(--mt-ink);
    background: var(--mt-bg);
}

.mt-dashboard.loading { cursor: progress; }
.st-import-modal { width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 24px; margin: auto; border: 1px solid #dce5ed; border-radius: 10px; color: #213e54; overflow-y: auto; }
.st-import-modal::backdrop { background: rgba(15, 23, 42, .5); }
body:has(.st-import-modal[open]) { overflow: hidden; }
.st-import-header, .st-import-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.st-import-header { justify-content: space-between; margin-bottom: 12px; }
.st-import-header h2 { margin: 0; font-size: 20px; }
.st-import-modal p { font-size: 13px; line-height: 1.6; }
.st-import-selection { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; border: 0; padding: 12px; background: #f5f8fb; border-radius: 6px; }
.st-import-file { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.st-import-file input { max-width: 100%; }
.st-import-help { margin: 10px 0; font-size: 12px; }
.st-import-help summary { cursor: pointer; color: #46627a; }
.st-import-summary { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0 10px; font-variant-numeric: tabular-nums; }
.st-import-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.st-import-filters label { margin: 0; }
.st-import-filters input, .st-import-filters select { border: 1px solid #cbd7e2; border-radius: 5px; padding: 8px; background: #fff; }
.st-import-filters input { flex: 1; min-width: 200px; }
.st-import-modal :is(button, input, select, summary):focus-visible { outline: 2px solid #2876a5; outline-offset: 2px; }
.st-import-footer { position: sticky; bottom: -24px; background: #fff; padding: 12px 0; border-top: 1px solid #dce5ed; }
.st-import-footer .primary { margin-left: auto; }
@media (max-width: 600px) { .st-import-selection { grid-template-columns: 1fr; } .st-import-modal { padding: 16px; } .st-import-footer { bottom: -16px; } }
.st-import-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.st-import-checks label { display: flex; gap: 6px; align-items: center; }
.st-import-error { color: #ad3028; }
.st-import-success { color: #16704b; }
.st-import-table-wrap { overflow: auto; max-height: 360px; margin: 12px 0; border: 1px solid #dce5ed; }
.st-import-table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 12px; }
.st-import-table td, .st-import-table th { padding: 10px; text-align: left; vertical-align: top; border-bottom: 1px solid #e5ebf0; }
.st-import-table th { position: sticky; top: 0; background: #f1f5f8; }

.mt-sync-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt-sync-button {
    padding: 8px 12px; border: 1px solid var(--mt-navy); border-radius: 6px;
    background: var(--mt-navy); color: #fff; font-weight: 600; cursor: pointer;
    transition: opacity .15s ease;
}
.mt-sync-button:hover { opacity: .85; }
.mt-sync-button:disabled { opacity: .5; cursor: default; }
.mt-sync-button:focus-visible { outline: 2px solid var(--mt-blue); outline-offset: 3px; }
.mt-sync-panel {
    padding: 16px; margin-bottom: 16px; background: #fff;
    border: 1px solid var(--mt-border); border-radius: 8px;
}
.mt-sync-panel h3 { margin: 0 0 8px; color: var(--mt-navy); font-size: 16px; }
.mt-sync-modal {
    width: min(780px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
    margin: auto; padding: 24px; overflow-y: auto; overscroll-behavior: contain;
    box-shadow: 0 20px 60px rgba(11, 61, 98, .24); color: var(--mt-navy);
}
.mt-sync-modal::backdrop { background: rgba(15, 23, 42, .5); }
body:has(.mt-sync-modal[open]) { overflow: hidden; }
.mt-sync-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.mt-sync-modal-header h3 { margin: 0; }
.mt-sync-close { flex-shrink: 0; background: transparent; border: 0; border-radius: 4px; color: var(--mt-muted); font-size: 26px; width: 36px; height: 36px; cursor: pointer; }
.mt-sync-close:hover { background: #edf2f7; }
.mt-sync-close:focus-visible { outline: 2px solid var(--mt-blue); outline-offset: 2px; }
.mt-sync-panel p { color: var(--mt-muted); font-size: 12px; }
.mt-sync-period { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }
.mt-sync-period label { display: flex; align-items: center; gap: 8px; }
.mt-sync-period input, .mt-sync-period select {
    width: 100px; padding: 6px; border: 1px solid var(--mt-border); border-radius: 5px;
}
.mt-sync-jobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; border: 0; padding: 0; }
.mt-sync-jobs legend { font-size: 13px; border: 0; margin: 0 0 8px; }
.mt-sync-jobs label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.mt-sync-jobs small { color: var(--mt-muted); }
.mt-sync-progress { border-top: 1px solid var(--mt-border); margin-top: 16px; padding-top: 8px; }
.mt-sync-progress ol { padding: 0; list-style: none; }
.mt-sync-progress li { padding: 10px 12px; border-left: 3px solid #cbd5e1; background: #f8fafc; margin: 6px 0; }
.mt-sync-progress li > div { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mt-sync-progress small { display: block; color: var(--mt-muted); margin-top: 4px; }
.mt-sync-progress progress { width: 100%; height: 6px; accent-color: var(--mt-blue); }
.mt-sync-progress .mt-sync-running { border-color: var(--mt-blue); }
.mt-sync-progress .mt-sync-done { border-color: #1e896a; }
.mt-sync-progress .mt-sync-failed { border-color: #bd4037; }
.mt-sync-panel .mt-sync-error { color: #bd4037; margin-top: 10px; }

.mt-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--mt-navy);
}

.mt-header h1 {
    margin: 0 0 4px;
    color: var(--mt-navy);
    font-size: 22px;
    font-weight: 700;
}

.mt-header p {
    margin: 0;
    color: var(--mt-muted);
    font-size: 13px;
}

.mt-badge {
    padding: 4px 10px;
    border-radius: 20px;
    color: #fff;
    background: var(--mt-navy);
    font-size: 12px;
}

.mt-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid var(--mt-border);
    border-radius: 10px;
    background: var(--mt-card);
}

.mt-filter-bar-compact {
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 14px;
    padding: 8px 12px;
}

.mt-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mt-filter-divider {
    width: 1px;
    height: 26px;
    flex: 0 0 1px;
    background: var(--mt-border);
}

.mt-filter-summary {
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    color: var(--mt-muted);
    font-size: 11.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mt-filter-bar-compact .mt-ms-toggle { height: 32px; }
.mt-filter-bar-compact .mt-channel-multiselect .mt-ms-toggle { min-width: 250px; }

.mt-filter-label {
    color: var(--mt-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.mt-filter-bar label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--mt-muted);
    font-size: 12px;
}

.mt-filter-bar select {
    min-width: 110px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid var(--mt-border);
    border-radius: 8px;
    color: var(--mt-ink);
    background: #fff;
}

.mt-filter-bar .mt-channel-select { min-width: 260px; }

.mt-multiselect {
    position: relative;
    display: inline-block;
}

.mt-ms-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 240px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--mt-border);
    border-radius: 8px;
    color: var(--mt-ink);
    background: #fff;
    font-size: 12.5px;
    text-align: left;
}

.mt-year-toggle { min-width: 125px; }
.mt-channel-multiselect .mt-ms-toggle { min-width: 280px; }

.mt-ms-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 30;
    min-width: 260px;
    max-height: 310px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--mt-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(11, 61, 98, .14);
}

.mt-ms-panel.open { display: block; }

.mt-filter-bar .mt-ms-item {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
    margin: 0;
    padding: 6px;
    border-radius: 6px;
    color: var(--mt-ink);
    font-size: 12.5px;
    cursor: pointer;
}

.mt-filter-bar .mt-ms-item:hover { background: #f4f7fa; }
.mt-filter-bar .mt-ms-item input { width: auto; margin: 0; }

.mt-ms-all {
    margin-bottom: 4px !important;
    padding-bottom: 9px !important;
    border-bottom: 1px solid var(--mt-border);
}

.mt-ms-divider {
    margin: 5px 0;
    border-top: 1px solid var(--mt-border);
}

.mt-apply {
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--mt-blue);
    font-weight: 700;
}

.mt-range-text {
    margin-left: auto;
    color: var(--mt-muted);
    font-size: 12px;
}

.mt-alert {
    margin: -4px 0 16px;
    padding: 10px 14px;
    border: 1px solid #f0d29d;
    border-radius: 8px;
    color: #8a5a09;
    background: #fff7e8;
    font-size: 12px;
}

.mt-alert i { margin-right: 6px; }

.mt-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.mt-tabs button {
    padding: 8px 14px;
    border: 1px solid var(--mt-border);
    border-radius: 8px;
    color: var(--mt-muted);
    background: #fff;
    font-size: 13px;
    font-weight: 700;
}

.mt-tabs button.active {
    border-color: var(--mt-navy);
    color: #fff;
    background: var(--mt-navy);
}

.mt-tab-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -4px 0 14px;
    padding: 9px 12px;
    border-left: 3px solid #d0483e;
    border-radius: 6px;
    color: #8f2f29;
    background: #fff1f0;
    font-size: 12px;
}

.mt-tab-error button {
    flex: 0 0 auto;
    padding: 4px 10px;
    border: 1px solid #e1aaa6;
    border-radius: 6px;
    color: #8f2f29;
    background: #fff;
    font-weight: 700;
    transition: background .2s ease, transform .2s ease;
}

.mt-tab-error button:hover { background: #fff8f7; }
.mt-tab-error button:active { transform: translateY(1px); }
.mt-tab-error button:focus-visible {
    outline: 2px solid #d0483e;
    outline-offset: 2px;
}

.mt-tab-loading .mt-card,
.mt-tab-loading .mt-kpi {
    position: relative;
    overflow: hidden;
    pointer-events: none;
}

.mt-tab-loading .mt-card::before,
.mt-tab-loading .mt-kpi::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 8;
    border-radius: inherit;
    background: linear-gradient(100deg,
        rgba(240, 245, 249, .92) 20%,
        rgba(255, 255, 255, .98) 40%,
        rgba(232, 240, 246, .94) 60%);
    background-size: 220% 100%;
    animation: mt-card-loading 1.25s ease-in-out infinite;
}

.mt-tab-loading .mt-card::after,
.mt-tab-loading .mt-kpi::after {
    content: 'Đang tải dữ liệu…';
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 9;
    color: var(--mt-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .01em;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

.mt-loading-table-card { min-height: 280px; }

@keyframes mt-card-loading {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .mt-tab-loading .mt-card::before,
    .mt-tab-loading .mt-kpi::before { animation: none; }
}

.mt-cross-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -4px 0 14px;
    padding: 8px 10px 8px 12px;
    border-left: 3px solid var(--mt-blue);
    border-radius: 6px;
    color: var(--mt-muted);
    background: #eef5fa;
    font-size: 12px;
}

.mt-cross-filter b { color: var(--mt-navy); }
.mt-cross-filter button {
    padding: 4px 9px;
    border: 1px solid #bfd2e1;
    border-radius: 6px;
    color: var(--mt-blue);
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    transition: background .2s ease, transform .2s ease;
}
.mt-cross-filter button:hover { background: #f8fbfd; }
.mt-cross-filter button:active { transform: translateY(1px); }
.mt-cross-filter button:focus-visible {
    outline: 2px solid var(--mt-blue);
    outline-offset: 2px;
}

.mt-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.mt-kpi,
.mt-card {
    border: 1px solid var(--mt-border);
    border-radius: 10px;
    background: var(--mt-card);
}

.mt-kpi { padding: 14px 16px; }
.mt-kpi span {
    display: block;
    margin-bottom: 6px;
    color: var(--mt-muted);
    font-size: 12px;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.mt-kpi strong {
    display: block;
    overflow: hidden;
    color: var(--mt-ink);
    font-size: 25px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mt-kpi small { display: block; margin-top: 4px; }

.mt-dashboard .good { color: var(--mt-good); font-weight: 700; }
.mt-dashboard .warn { color: var(--mt-warn); font-weight: 700; }
.mt-dashboard .bad { color: var(--mt-bad); font-weight: 700; }

.mt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.mt-grid-2-1 { grid-template-columns: 2fr 1fr; }
.mt-grid-3 { grid-template-columns: repeat(3, 1fr); }

.mt-card {
    min-width: 0;
    padding: 16px;
}

.mt-card-space { margin-bottom: 14px; }

.mt-card h3 {
    margin: 0 0 12px;
    color: var(--mt-navy);
    font-size: 14px;
    font-weight: 700;
}

.mt-hint,
.mt-source-note {
    color: var(--mt-muted);
    font-size: 11px;
    font-weight: 400;
}

.mt-source-note { margin: 10px 0 0; }

.mt-card canvas {
    width: 100% !important;
    height: 280px !important;
    max-width: 100%;
}

.mt-channel-chart-card canvas {
    height: 360px !important;
}

.mt-sku-comparison-grid { margin-top: 14px; }

.mt-sku-chart-stage {
    position: relative;
    width: 100%;
    height: 520px;
}

.mt-sku-chart-stage canvas {
    width: 100% !important;
    height: 100% !important;
}

.mt-sku-growth-card .mt-table-wrap {
    max-height: 380px;
    margin-top: 14px;
}

.mt-sku-comparison-table { min-width: 620px; }

.mt-sku-comparison-table th:first-child,
.mt-sku-comparison-table td:first-child { min-width: 220px; }

.mt-sku-comparison-table td:first-child small {
    display: block;
    margin-top: 2px;
    color: var(--mt-muted);
}

.mt-sku-empty { padding: 36px 12px; }

.mt-table-wrap {
    max-height: 500px;
    overflow: auto;
}

.mt-card table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.mt-card th,
.mt-card td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--mt-border);
    text-align: left;
}

.mt-card th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: var(--mt-muted);
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.mt-card .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.mt-card .mt-month-head {
    white-space: nowrap;
}

.mt-card tbody tr:hover td { background: #f8fbfd; }
.mt-card tbody .mt-cross-row { cursor: pointer; }
.mt-card tbody .mt-cross-row:hover td:first-child {
    color: var(--mt-blue);
    font-weight: 700;
}

.mt-team-table { min-width: 760px; }
.mt-team-table th:first-child,
.mt-team-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 180px;
    background: #fff;
}
.mt-team-table thead th:first-child { z-index: 3; }

.mt-pill {
    display: inline-block;
    min-width: 62px;
    padding: 2px 8px;
    border-radius: 12px;
    text-align: center;
    font-size: 11px;
}
.mt-pill.good { color: var(--mt-good); background: #e4f7ef; }
.mt-pill.warn { color: var(--mt-warn); background: #fdf1dc; }
.mt-pill.bad { color: var(--mt-bad); background: #fbeae8; }

.mt-coverage-kpis {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0;
}

.mt-store-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px 180px;
    gap: 10px;
    margin-bottom: 12px;
}

.mt-store-toolbar input,
.mt-store-toolbar select {
    min-width: 0;
    height: 36px;
    padding: 6px 10px;
    border: 1px solid var(--mt-border);
    border-radius: 6px;
    background: #fff;
}

.mt-store-detail-wrap { max-height: 460px; }
.mt-store-detail-table { min-width: 1320px; }
.mt-store-detail-table th { white-space: nowrap; }

.mt-dynamic-table { min-width: 980px; }
.mt-dynamic-table td small {
    display: block;
    margin-top: 3px;
    color: var(--mt-muted);
    font-size: 10px;
}

.mt-forecast-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    margin-bottom: 14px;
    padding: 8px 150px;
    border-bottom: 2px solid var(--mt-navy);
    text-align: center;
}

.mt-forecast-heading h2 {
    margin: 0;
    color: var(--mt-navy);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .04em;
}

.mt-forecast-heading p {
    margin: 4px 0 0;
    color: var(--mt-muted);
    font-size: 11px;
}

.mt-forecast-heading .mt-badge {
    position: absolute;
    right: 0;
}

.mt-forecast-kpis .mt-kpi strong { font-size: 22px; }
.mt-forecast-chart-card canvas { height: 330px !important; }
.mt-forecast-table-wrap { max-height: 560px; }
.mt-forecast-table { min-width: 1580px; }
.mt-forecast-table th { white-space: nowrap; }

.mt-forecast-table th:first-child,
.mt-forecast-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 105px;
    background: #fff;
}

.mt-forecast-table th:nth-child(2),
.mt-forecast-table td:nth-child(2) {
    position: sticky;
    left: 105px;
    z-index: 2;
    min-width: 280px;
    background: #fff;
}

.mt-forecast-table thead th:first-child,
.mt-forecast-table thead th:nth-child(2) { z-index: 3; }

.mt-empty {
    padding: 50px;
    color: var(--mt-muted);
    text-align: center;
}

@media (max-width: 1000px) {
    .mt-grid-3 { grid-template-columns: 1fr 1fr; }
    .mt-filter-summary { display: none; }
    .mt-filter-bar-compact { flex-wrap: wrap; }
    .mt-filter-divider { display: none; }
    .mt-filter-channel-group { flex: 1 1 100%; }
}

@media (max-width: 820px) {
    .mt-grid,
    .mt-grid-2-1,
    .mt-grid-3 { grid-template-columns: 1fr; }
    .mt-filter-bar .mt-channel-select { min-width: 180px; flex: 1; }
    .mt-channel-multiselect { flex: 1; }
    .mt-channel-multiselect .mt-ms-toggle { width: 100%; min-width: 180px; }
    .mt-range-text { width: 100%; margin-left: 0; }
    .mt-store-toolbar { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .mt-dashboard { padding: 12px 10px 40px; }
    .mt-header h1 { font-size: 18px; }
    .mt-multiselect,
    .mt-ms-toggle { width: 100%; }
    .mt-filter-group { width: 100%; }
    .mt-ms-toggle,
    .mt-channel-multiselect .mt-ms-toggle { min-width: 100%; }
    .mt-ms-panel { width: 100%; min-width: 100%; }
    .mt-forecast-heading {
        display: block;
        padding: 8px 0;
    }
    .mt-forecast-heading .mt-badge {
        position: static;
        display: inline-block;
        margin-top: 8px;
    }
}

/* Dashboard ETC - Thiet lap ma cha nha thau */
.etc-setup-page {
    --etc-setup-blue: #075cbc;
    --etc-setup-navy: #123b72;
    --etc-setup-border: #dfe6ef;
    display: grid;
    gap: 16px;
    color: #243b5a;
}

.etc-setup-page.is-loading {
    cursor: progress;
}

.etc-setup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--etc-setup-border);
    border-radius: 12px;
    background: #fff;
    padding: 20px 22px;
    box-shadow: 0 5px 18px rgba(25, 51, 82, 0.07);
}

.etc-setup-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.etc-setup-title > span {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #0b6bd2, #064c9f);
    color: #fff;
    font-size: 23px;
}

.etc-setup-title h1 {
    margin: 0;
    color: #12376b;
    font-size: 25px;
    font-weight: 850;
}

.etc-setup-title p {
    margin: 6px 0 0;
    color: #667b96;
    font-size: 14px;
}

.etc-setup-header-actions {
    display: flex;
    gap: 9px;
}

.etc-setup-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 750;
    transition: 0.18s ease;
}

.etc-setup-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.etc-setup-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.etc-setup-btn.primary {
    background: var(--etc-setup-blue);
    color: #fff;
    box-shadow: 0 4px 10px rgba(7, 92, 188, 0.2);
}

.etc-setup-btn.secondary {
    border-color: #ccd7e5;
    background: #fff;
    color: #345375;
}

.etc-setup-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.etc-setup-stats article {
    min-height: 90px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--etc-setup-border);
    border-radius: 10px;
    background: #fff;
    padding: 15px 17px;
}

.etc-setup-stats article > i {
    width: 43px;
    height: 43px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 17px;
}

.etc-setup-stats i.blue { background: #075cbc; }
.etc-setup-stats i.teal { background: #0d9a8b; }
.etc-setup-stats i.green { background: #24a26a; }
.etc-setup-stats i.orange { background: #f47b20; }

.etc-setup-stats strong {
    display: block;
    color: #173b6b;
    font-size: 25px;
    font-weight: 850;
    line-height: 1;
}

.etc-setup-stats span {
    display: block;
    margin-top: 6px;
    color: #637893;
    font-size: 13px;
    font-weight: 650;
}

.etc-setup-warning,
.etc-move-warning {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #f3c88e;
    border-radius: 8px;
    background: #fff8eb;
    color: #985c0b;
    padding: 11px 13px;
    font-size: 13px;
    font-weight: 650;
}

.etc-setup-workspace {
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(260px, 315px) minmax(0, 1fr);
    gap: 14px;
}

.etc-parent-panel,
.etc-parent-editor {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--etc-setup-border);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(25, 51, 82, 0.05);
}

.etc-parent-panel {
    display: flex;
    flex-direction: column;
}

.etc-parent-panel > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e8edf3;
    padding: 18px;
}

.etc-parent-panel h2,
.etc-editor-header h2 {
    margin: 0;
    color: var(--etc-setup-navy);
    font-size: 18px;
    font-weight: 800;
}

.etc-parent-panel header small {
    display: block;
    margin-top: 4px;
    color: #7a8da5;
    font-size: 12px;
}

.etc-parent-panel header > span {
    min-width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e8f2fe;
    color: #075cbc;
    font-size: 13px;
    font-weight: 800;
}

.etc-setup-search {
    min-width: 0;
    position: relative;
    display: block;
    margin: 12px;
}

.etc-setup-search i {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: #8393a8;
    pointer-events: none;
}

.etc-setup-search input {
    width: 100%;
    height: 43px;
    border: 1px solid #ced8e5;
    border-radius: 8px;
    outline: none;
    background: #fbfcfe;
    color: #243b5a;
    padding: 0 12px 0 38px;
    font-size: 13.5px;
}

.etc-setup-search input:focus,
.etc-parent-fields input:focus,
.etc-customer-toolbar select:focus {
    border-color: #4c91dc;
    box-shadow: 0 0 0 3px rgba(7, 92, 188, 0.09);
}

.etc-parent-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px 12px;
}

.etc-parent-list > button {
    width: 100%;
    display: grid;
    gap: 5px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #2f4b6d;
    padding: 12px 13px;
    text-align: left;
}

.etc-parent-list > button:hover {
    background: #f5f9fe;
}

.etc-parent-list > button.active {
    border-color: #a9cbed;
    background: #eaf4ff;
}

.etc-parent-list > button.etc-parent-new-option {
    grid-template-columns: 24px 1fr;
    align-items: center;
    margin-bottom: 8px;
    border-color: #b9d5f1;
    background: #f3f8fe;
}

.etc-parent-new-option > i {
    grid-row: span 2;
    color: #075cbc;
    font-size: 15px;
    text-align: center;
}

.etc-parent-new-option > strong,
.etc-parent-new-option > small {
    grid-column: 2;
}

.etc-parent-code {
    width: fit-content;
    border-radius: 4px;
    background: #edf2f7;
    color: #425b7b;
    padding: 3px 6px;
    font-family: Consolas, monospace;
    font-size: 11px;
    font-weight: 800;
}

.etc-parent-list button.active .etc-parent-code {
    background: #075cbc;
    color: #fff;
}

.etc-parent-list strong {
    overflow: hidden;
    color: #203e63;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.etc-parent-list small {
    color: #778aa2;
    font-size: 12px;
}

.etc-parent-editor {
    display: flex;
    flex-direction: column;
}

.etc-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e8edf3;
    padding: 17px 19px;
}

.etc-editor-header p {
    margin: 5px 0 0;
    color: #788ba2;
    font-size: 12.5px;
}

.etc-editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.etc-selected-count {
    border-radius: 18px;
    background: #e9f7f4;
    color: #25776d;
    padding: 8px 12px;
    font-size: 12.5px;
    white-space: nowrap;
}

.etc-selected-count b {
    font-size: 15px;
}

.etc-parent-fields {
    display: grid;
    grid-template-columns: minmax(180px, 0.75fr) minmax(260px, 1.25fr);
    gap: 12px;
    border-bottom: 1px solid #e8edf3;
    background: #fbfcfe;
    padding: 16px 18px;
}

.etc-parent-fields label {
    min-width: 0;
    display: grid;
    gap: 6px;
    margin: 0;
}

.etc-parent-fields label.wide {
    grid-column: 1 / -1;
}

.etc-parent-fields span {
    color: #4a607c;
    font-size: 12px;
    font-weight: 750;
}

.etc-parent-fields span b {
    color: #d92d20;
}

.etc-parent-fields input {
    width: 100%;
    height: 43px;
    border: 1px solid #ccd7e4;
    border-radius: 7px;
    outline: none;
    background: #fff;
    color: #213b5d;
    padding: 0 12px;
    font-size: 14px;
}

.etc-customer-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 210px;
    align-items: center;
    gap: 8px;
    padding: 11px 13px;
}

.etc-customer-toolbar .etc-setup-search {
    margin: 0;
}

.etc-customer-toolbar select,
.etc-customer-toolbar > button {
    height: 42px;
    border: 1px solid #ccd7e4;
    border-radius: 7px;
    outline: none;
    background: #fff;
    color: #3c5575;
    padding: 0 10px;
    font-size: 12.5px;
    font-weight: 650;
}

.etc-customer-toolbar > button:hover {
    border-color: #8bb7e3;
    background: #f2f8ff;
    color: #075cbc;
}

.etc-move-warning {
    margin: 0 13px 10px;
}

.etc-customer-table-wrap {
    min-height: 300px;
    flex: 1;
    overflow: auto;
    border-top: 1px solid #e8edf3;
}

.etc-customer-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.etc-customer-table th,
.etc-customer-table td {
    border-bottom: 1px solid #edf1f5;
    padding: 11px 12px;
    color: #314c6d;
    font-size: 13px;
    text-align: left;
    vertical-align: middle;
}

.etc-customer-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f5f8fb;
    color: #5e718a;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
}

.etc-customer-table tr.selected td {
    background: #f2f8ff;
}

.etc-customer-table tr.assigned-other td {
    border-bottom-color: #f3dfbf;
}

.etc-customer-table .check-column {
    width: 45px;
    text-align: center;
}

.etc-customer-table input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #075cbc;
}

.etc-customer-table code {
    border-radius: 4px;
    background: #edf2f7;
    color: #244b78;
    padding: 4px 6px;
    font-size: 12px;
    font-weight: 750;
}

.etc-customer-table td strong {
    display: block;
    color: #213b5e;
    font-size: 13.5px;
}

.etc-customer-table td small {
    display: block;
    margin-top: 4px;
    color: #b06b12;
    font-size: 11px;
}

.etc-assignment-badge {
    display: inline-block;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 11.5px;
    font-weight: 700;
}

.etc-assignment-badge.assigned {
    background: #eaf4ff;
    color: #1766b3;
}

.etc-assignment-badge.empty {
    background: #f1f3f6;
    color: #7b899a;
}

.etc-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid #dfe6ef;
    background: #fbfcfe;
    padding: 13px 17px;
}

.etc-editor-footer > span {
    color: #788aa1;
    font-size: 11.5px;
}

.etc-editor-footer > span b {
    color: #526983;
}

.etc-setup-empty {
    min-height: 150px;
    display: grid;
    place-content: center;
    gap: 8px;
    color: #8393a8;
    text-align: center;
    font-size: 13px;
}

.etc-setup-empty.small {
    min-height: 120px;
}

.etc-setup-empty i {
    color: #b1bdcb;
    font-size: 24px;
}

@media (max-width: 1100px) {
    .etc-setup-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .etc-setup-workspace {
        grid-template-columns: 255px minmax(0, 1fr);
    }

    .etc-customer-toolbar {
        grid-template-columns: 1fr 180px;
    }
}

@media (max-width: 780px) {
    .etc-setup-header,
    .etc-editor-header,
    .etc-editor-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .etc-setup-header-actions {
        width: 100%;
    }

    .etc-setup-header-actions .etc-setup-btn {
        flex: 1;
    }

    .etc-setup-stats,
    .etc-setup-workspace,
    .etc-parent-fields,
    .etc-customer-toolbar {
        grid-template-columns: 1fr;
    }

    .etc-parent-fields label.wide {
        grid-column: auto;
    }

    .etc-parent-panel {
        max-height: 350px;
    }

    .etc-customer-table {
        min-width: 720px;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--body-bg);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

.wrapper {
    min-height: 100vh;
}

.main-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: 56px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 90;
    transition: left 220ms ease;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-toggle {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sidebar-toggle:hover {
    background: var(--bg-surface-secondary);
    color: var(--text);
}

.topbar-page {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.topbar-pretitle {
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topbar-title {
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    color: var(--text);
}

.search-box {
    position: relative;
    width: 280px;
}

.search-box input {
    width: 100%;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-surface-secondary);
    padding: 0 74px 0 38px;
    color: var(--text);
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-lt);
    background: var(--bg-surface);
}

.search-box .s-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box .clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 6px;
}

.notification-icon,
.user-profile-trigger {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: transparent;
}

.user-profile-trigger {
    width: auto;
    min-width: 150px;
    max-width: 260px;
    justify-content: flex-start;
    padding: 0 12px;
}

.notification-icon:hover,
.user-profile-trigger:hover {
    background: var(--bg-surface-secondary);
    color: var(--text);
}

.user-profile-trigger .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.user-profile-trigger .user-name {
    font-size: 12.5px;
    font-weight: var(--font-weight-medium);
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 16px;
    align-items: start;
}

.profile-summary {
    min-width: 0;
}

.profile-summary-full {
    grid-column: 1 / -1;
}

.profile-qr {
    display: flex;
    justify-content: flex-end;
}

.loading-block {
    display: grid;
    place-items: center;
    gap: 8px;
    text-align: center;
    padding: 12px 16px;
}

.inline-spinner {
    margin-right: 8px;
}

.muted-copy {
    font-size: 12px;
    color: var(--text-muted);
}

.main-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 220ms ease, transform 220ms ease;
}

.brand-link {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sidebar-border);
}

.brand-image {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-title {
    font-size: 15px;
    font-weight: var(--font-weight-bold);
    color: #fff;
}

.brand-subtitle {
    font-size: 11px;
    color: var(--sidebar-text);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sidebar {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px 18px;
}

/* .sidebar-section {
    margin-bottom: 12px;
} */

.sidebar-label {
    padding: 8px 10px;
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    color: rgba(123, 143, 163, 0.55);
    letter-spacing: 0.5px;
}

.nav-sidebar {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-sidebar .nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    transition: background 120ms ease, color 120ms ease;
}

.nav-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-hover);
}

.nav-link.active,
.nav-link.active-sub {
    background: var(--sidebar-active) !important;
    color: var(--sidebar-text-active) !important;
    border-left: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

.nav-link.active .nav-icon,
.nav-link.active-sub .nav-icon {
    color: var(--primary-dk) !important;
}

.nav-link.active .right,
.nav-link.active-sub .right {
    color: var(--primary-dk) !important;
}

.nav-link p {
    margin: 0;
    flex: 1;
}

.nav-icon {
    width: 18px;
    text-align: center;
    color: inherit !important;
    margin-right: 0 !important;
}

.nav-bullet {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(25, 211, 174, 0.7);
    flex: 0 0 auto;
}

.department-submenu {
    list-style: none;
    margin: 4px 0 0;
    padding: 0 0 0 26px !important;
    max-height: 2000px;
    overflow: hidden;
    opacity: 1;
    transition: max-height 220ms ease, opacity 220ms ease;
}

.department-submenu.collapsed {
    max-height: 0;
    opacity: 0;
}

.department-submenu li {
    margin-bottom: 4px;
}

.department-submenu .nav-link {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12.5px;
}

.department-toggle .right {
    transition: transform 180ms ease;
}

.department-toggle.collapsed .right {
    transform: rotate(-90deg);
}

.content-wrapper {
    margin-left: var(--sidebar-w);
    padding: 76px 20px 24px;
    min-height: calc(100vh - 60px);
    transition: margin-left 220ms ease;
}

.page-shell {
    width: 100%;
}

.page-shell > .content-header {
    margin-bottom: 16px;
}

.content-header h1 {
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    color: var(--text);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 12px;
}

.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.card-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color-light);
}

.card-title {
    font-size: 13px;
    font-weight: var(--font-weight-bold);
}

.table thead th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    background: var(--bg-surface-secondary);
    border-bottom-color: var(--border-color);
}

.table td {
    color: var(--text-secondary);
    vertical-align: middle;
}

.badge {
    font-weight: var(--font-weight-medium);
}

.main-footer {
    margin-left: var(--sidebar-w);
    border-top: 1px solid var(--border-color-light);
    background: transparent;
    color: var(--text-muted);
    padding: 16px 20px 20px;
    transition: margin-left 220ms ease;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-logo {
    font-weight: var(--font-weight-bold);
    color: var(--text);
    margin-right: 12px;
}

.footer-copy a,
.footer-links a {
    color: var(--primary);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 95;
    display: none;
}

body.sidebar-collapse {
    --sidebar-w: 72px;
}

body.sidebar-collapse .brand-copy,
body.sidebar-collapse .nav-link p,
body.sidebar-collapse .department-submenu,
body.sidebar-collapse .sidebar-label,
body.sidebar-collapse .menu-search-row {
    display: none !important;
}

body.sidebar-collapse .brand-link,
body.sidebar-collapse .nav-link {
    justify-content: center;
}

body.sidebar-collapse .department-toggle .right {
    display: none;
}

body.sidebar-collapse .main-sidebar:hover {
    width: 252px;
}

body.sidebar-collapse .main-sidebar:hover .brand-copy,
body.sidebar-collapse .main-sidebar:hover .nav-link p,
body.sidebar-collapse .main-sidebar:hover .sidebar-label,
body.sidebar-collapse .main-sidebar:hover .menu-search-row {
    display: block !important;
}

body.sidebar-collapse .main-sidebar:hover .department-submenu {
    display: block !important;
}

body.sidebar-collapse .main-sidebar:hover .brand-link,
body.sidebar-collapse .main-sidebar:hover .nav-link {
    justify-content: flex-start;
}

.menu-search-row {
    padding: 0 4px 12px;
}

.menu-search-row .search-box {
    width: 100%;
}

.menu-search-row .search-box input {
    height: 34px;
    background: #f8fafc;
    border-color: #dbe3ee;
    color: var(--text);
}

.menu-search-row .search-box input::placeholder {
    color: #94a3b8;
}

.menu-search-row .search-box .s-icon,
.menu-search-row .search-box .clear-btn {
    color: #94a3b8;
}

body.gentelella-dark {
    --sidebar-bg: #ffffff;
    --sidebar-hover: #f4f7fb;
    --sidebar-active: rgba(26, 187, 156, 0.12);
    --sidebar-text: #5f6f86;
    --sidebar-text-hover: #1f2a3d;
    --sidebar-text-active: #0f172a;
    --sidebar-border: rgba(148, 163, 184, 0.18);
    --primary: #1abb9c;
    --primary-lt: rgba(26, 187, 156, 0.12);
    --primary-dk: #169f85;
    --body-bg: #f3f6fb;
    --bg-surface: #ffffff;
    --bg-surface-secondary: #f8fafc;
    --border-color: rgba(148, 163, 184, 0.2);
    --border-color-light: rgba(148, 163, 184, 0.16);
    --border-translucent: rgba(148, 163, 184, 0.12);
    --text: #1e293b;
    --text-secondary: #52637a;
    --text-muted: #7b8798;
    --text-disabled: #b3bfcc;
    --shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

body.gentelella-dark {
    background:
        radial-gradient(circle at top, rgba(26, 187, 156, 0.08), transparent 26%),
        linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%);
}

body.gentelella-dark .wrapper {
    background: transparent;
}

body.gentelella-dark .main-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.gentelella-dark .main-sidebar {
    background: linear-gradient(180deg, #ffffff, #f9fbfe);
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.04);
}

.topbar-route {
    display: flex;
    align-items: center;
    min-width: 92px;
}

.topbar-route-title {
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    color: var(--text);
}

.topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.topbar-center .search-box {
    width: min(100%, 460px);
}

body.gentelella-dark .search-box input {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.18);
    color: var(--text);
}

body.gentelella-dark .search-box input::placeholder {
    color: #94a3b8;
}

body.gentelella-dark .search-box input:focus {
    background: #ffffff;
    border-color: rgba(26, 187, 156, 0.3);
    box-shadow: 0 0 0 3px rgba(26, 187, 156, 0.1);
}

body.gentelella-dark .sidebar-toggle,
body.gentelella-dark .notification-icon,
body.gentelella-dark .user-profile-trigger {
    color: #64748b;
}

body.gentelella-dark .sidebar-toggle:hover,
body.gentelella-dark .notification-icon:hover,
body.gentelella-dark .user-profile-trigger:hover {
    background: #f1f5f9;
    color: var(--text);
}

.header-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid rgba(26, 187, 156, 0.22);
    background: rgba(26, 187, 156, 0.08);
    color: var(--primary-dk);
    font-size: 12px;
    font-weight: var(--font-weight-bold);
}

.header-link-btn:hover {
    background: rgba(26, 187, 156, 0.14);
    color: var(--primary-dk);
}

body.gentelella-dark .brand-link {
    min-height: 70px;
    padding: 16px 18px;
}

body.gentelella-dark .brand-image {
    width: 34px;
    height: 34px;
    padding: 6px;
    border-radius: 10px;
    background: rgba(26, 187, 156, 0.1);
}

body.gentelella-dark .brand-title {
    font-size: 16px;
    letter-spacing: -0.02em;
    color: var(--text);
}

body.gentelella-dark .content-wrapper {
    padding: 84px 18px 24px;
}

body.gentelella-dark .page-shell {
    max-width: 1480px;
    margin: 0 auto;
}

body.gentelella-dark .panel,
body.gentelella-dark .card,
body.gentelella-dark .app-modal-card {
    background: linear-gradient(180deg, #ffffff, #fcfdff);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
}

body.gentelella-dark .main-footer {
    border-top-color: rgba(148, 163, 184, 0.14);
    background: transparent;
}

body.gentelella-dark .footer {
    padding: 10px 4px 0;
    background: transparent;
    border-top: 0;
}

body.gentelella-dark .footer-logo,
body.gentelella-dark .footer-copy,
body.gentelella-dark .footer-links a {
    color: var(--text-secondary);
    font-family: var(--font);
}

body.gentelella-dark .footer-links a:hover {
    color: var(--primary-dk);
}

body.gentelella-dark .navbar-badge {
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 8px 16px rgba(2, 8, 23, 0.24);
}

body.gentelella-dark .notification-menu,
body.gentelella-dark .task-menu,
body.gentelella-dark .user-profile-menu {
    position: relative;
}

body.gentelella-dark .notification-dropdown,
body.gentelella-dark .user-profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(100vw - 24px, 360px);
    display: none;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.12);
    z-index: 120;
}

body.gentelella-dark .notification-dropdown.show,
body.gentelella-dark .user-profile-menu:hover .user-profile-dropdown,
body.gentelella-dark .user-profile-menu:focus-within .user-profile-dropdown {
    display: block;
}

body.gentelella-dark .task-dropdown {
    width: min(100vw - 24px, 390px);
}

body.gentelella-dark .task-dropdown-header,
body.gentelella-dark .user-profile-header {
    padding: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, #f8fbff, #f1f6fb);
}

body.gentelella-dark .task-list,
body.gentelella-dark .notification-list {
    background: transparent;
}

body.gentelella-dark .task-item,
body.gentelella-dark .notification-item {
    border-color: rgba(148, 163, 184, 0.1);
    background: rgba(255, 255, 255, 0.92);
}

body.gentelella-dark .notification-item:hover,
body.gentelella-dark .task-item:hover {
    background: #f8fafc;
}

body.gentelella-dark .task-item-title,
body.gentelella-dark .noti-title,
body.gentelella-dark .user-email {
    color: var(--text);
}

body.gentelella-dark .task-item-subtitle,
body.gentelella-dark .task-item-meta,
body.gentelella-dark .noti-body,
body.gentelella-dark .noti-time,
body.gentelella-dark .task-dropdown-subtitle,
body.gentelella-dark .task-empty,
body.gentelella-dark .notification-empty,
body.gentelella-dark .notification-loading,
body.gentelella-dark .muted-copy,
body.gentelella-dark .dropdown-menu-item {
    color: var(--text-secondary);
}

body.gentelella-dark .task-dropdown-footer {
    border-top-color: rgba(148, 163, 184, 0.12);
    background: #f8fafc;
}

body.gentelella-dark .dropdown-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

body.gentelella-dark .dropdown-menu-item:last-child {
    border-bottom: 0;
}

body.gentelella-dark .dropdown-menu-item:hover {
    background: #f1f5f9;
    color: var(--text);
}

body.gentelella-dark .user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: rgba(26, 187, 156, 0.14);
    color: #fff;
    font-weight: 700;
}

body.gentelella-dark .user-email {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

body.gentelella-dark .page-eyebrow,
body.gentelella-dark .page-subtitle,
body.gentelella-dark .panel-subtitle,
body.gentelella-dark .cell-subtitle,
body.gentelella-dark .delete-copy {
    color: var(--text-muted);
}

body.gentelella-dark .page-title,
body.gentelella-dark .panel-title,
body.gentelella-dark .cell-title,
body.gentelella-dark .app-modal-title {
    color: var(--text);
}

body.gentelella-dark .data-table thead th {
    background: #f8fafc;
    color: var(--text-muted);
}

body.gentelella-dark .data-table tbody tr:hover {
    background: rgba(26, 187, 156, 0.04);
}

.dashboard-page {
    gap: 18px;
}

.dashboard-header {
    align-items: center;
}

.dashboard-metric-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    min-height: 122px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.metric-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
}

.metric-card-icon.teal { background: rgba(25, 211, 174, 0.18); }
.metric-card-icon.blue { background: rgba(59, 130, 246, 0.18); }
.metric-card-icon.amber { background: rgba(245, 158, 11, 0.18); }
.metric-card-icon.green { background: rgba(34, 197, 94, 0.18); }
.metric-card-icon.red { background: rgba(239, 68, 68, 0.18); }
.metric-card-icon.purple { background: rgba(168, 85, 247, 0.18); }

.metric-card-copy {
    display: grid;
    gap: 5px;
}

.metric-card-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7f92ae;
    font-weight: 700;
}

.metric-card-value {
    font-size: 34px;
    line-height: 1;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.metric-card-meta {
    font-size: 12px;
    color: #64748b;
}

.metric-card-spark {
    width: 72px;
    height: 40px;
    border-radius: 8px;
    opacity: 0.9;
    background:
        linear-gradient(90deg, transparent 0 8%, currentColor 8% 12%, transparent 12% 20%, currentColor 20% 24%, transparent 24% 32%, currentColor 32% 36%, transparent 36% 44%, currentColor 44% 48%, transparent 48% 56%, currentColor 56% 60%, transparent 60% 68%, currentColor 68% 72%, transparent 72% 100%);
}

.metric-card-spark.teal { color: #14b8a6; }
.metric-card-spark.blue { color: #3b82f6; }
.metric-card-spark.amber { color: #f59e0b; }

.metric-card-progress {
    grid-column: 1 / -1;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

.metric-card-progress span {
    display: block;
    height: 100%;
    width: 64%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #19d3ae);
}

.metric-card-progress.red span {
    width: 48%;
    background: linear-gradient(90deg, #ef4444, #fb7185);
}

.metric-card-progress.purple span {
    width: 72%;
    background: linear-gradient(90deg, #a855f7, #ec4899);
}

.dashboard-main-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

.dashboard-bottom-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
}

.dashboard-panel {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
}

.dashboard-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 0;
}

.dashboard-panel-title {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
}

.dashboard-panel-subtitle {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 12px;
}

.dashboard-range-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border-radius: 10px;
    background: #f1f5f9;
}

.dashboard-range-tabs button {
    border: 0;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.dashboard-range-tabs button.active {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.dashboard-chart-panel {
    padding-bottom: 18px;
}

.ecommerce-dashboard {
    display: grid;
    gap: 18px;
}

/* Dashboard ETC - Benh vien */
.etc-dashboard {
    --etc-blue: #075cbc;
    --etc-navy: #0b2f67;
    --etc-teal: #0d9a8b;
    display: grid;
    gap: 10px;
    color: #17345f;
}

.etc-dashboard.is-loading {
    cursor: progress;
}

.etc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 14px 16px;
    box-shadow: 0 3px 14px rgba(35, 61, 94, 0.06);
}

.etc-heading {
    min-width: 330px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.etc-heading-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #0b68d1, #07479b);
    color: #fff;
    font-size: 24px;
    box-shadow: 0 6px 14px rgba(7, 92, 188, 0.22);
}

.etc-heading h1 {
    margin: 0;
    color: #0c326c;
    font-size: clamp(18px, 2vw, 28px);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.etc-heading p {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 7px 0 0;
    color: #415d83;
    font-size: 12.5px;
    font-weight: 700;
}

.etc-heading p span {
    width: 1px;
    height: 14px;
    background: #afbdd0;
}

.etc-filters {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 8px;
}

.etc-filter-card {
    min-width: 145px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    border: 1px solid #dfe6f0;
    border-radius: 10px;
    background: #fff;
    padding: 9px 10px;
    box-shadow: 0 3px 9px rgba(29, 55, 90, 0.08);
}

.etc-filter-card > i {
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--etc-blue);
    color: #fff;
    font-size: 14px;
}

.etc-filter-card > span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.etc-filter-card b {
    color: #163a70;
    font-size: 11.5px;
    font-weight: 800;
}

.etc-filter-card em {
    color: #536a88;
    font-size: 11.5px;
    font-style: normal;
    white-space: nowrap;
}

.etc-filter-card select {
    max-width: 145px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #415a7d;
    font-size: 11.5px;
    font-weight: 600;
    padding: 0;
}

.etc-time-filter {
    position: relative;
    min-width: 170px;
}

.etc-month-pair {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 60;
    display: none;
    align-items: center;
    gap: 5px;
    width: max-content;
    border: 1px solid #dfe6f0;
    border-radius: 9px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(20, 46, 78, 0.18);
}

.etc-time-filter:hover .etc-month-pair,
.etc-time-filter:focus-within .etc-month-pair {
    display: flex;
}

.etc-month-pair input {
    width: 122px;
    border: 1px solid #d7e0ec;
    border-radius: 6px;
    padding: 5px 6px;
    color: #29496f;
    font-size: 11px;
}

.etc-month-pair small {
    color: #718096;
    font-size: 10px;
}

.etc-apply-filter {
    border: 0;
    border-radius: 10px;
    background: var(--etc-blue);
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    padding: 0 13px;
    box-shadow: 0 4px 10px rgba(7, 92, 188, 0.2);
}

.etc-apply-filter:disabled {
    opacity: 0.6;
}

.etc-empty-state {
    min-height: 280px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 1px dashed #b7c5d8;
    border-radius: 12px;
    background: #fff;
    color: #6d7f98;
}

.etc-empty-state i {
    color: #0b5fc6;
    font-size: 30px;
}

.etc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.etc-kpi-card {
    min-width: 0;
    min-height: 145px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #e0e6ee;
    border-radius: 10px;
    background: #fff;
    padding: 18px 18px 14px;
    box-shadow: 0 2px 9px rgba(33, 54, 84, 0.06);
}

.etc-kpi-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
}

.etc-kpi-main > i {
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
}

.etc-kpi-main > div {
    min-width: 0;
}

.etc-kpi-main span {
    display: block;
    overflow: hidden;
    color: #24446f;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.etc-kpi-main strong {
    display: block;
    margin-top: 9px;
    color: currentColor;
    font-size: clamp(23px, 2vw, 31px);
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.etc-kpi-card.blue { color: #075cbc; }
.etc-kpi-card.blue .etc-kpi-main > i { background: #075cbc; }
.etc-kpi-card.teal { color: #0d9a8b; }
.etc-kpi-card.teal .etc-kpi-main > i { background: #0d9a8b; }
.etc-kpi-card.orange { color: #ff720d; }
.etc-kpi-card.orange .etc-kpi-main > i { background: #ff720d; }
.etc-kpi-card.purple { color: #7121ad; }
.etc-kpi-card.purple .etc-kpi-main > i { background: #7121ad; }
.etc-kpi-card.green { color: #0b9886; }
.etc-kpi-card.green .etc-kpi-main > i { background: #0b9886; }

.etc-kpi-footer,
.etc-kpi-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    color: #61738c;
    font-size: 12.5px;
    line-height: 1.35;
}

.etc-kpi-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 10px;
}

.etc-kpi-footer small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.etc-kpi-footer em {
    min-width: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    color: #8b9ab0;
    font-size: 18px;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.etc-kpi-footer em.positive {
    color: #10927f;
}

.etc-kpi-footer em.negative {
    color: #d84b4b;
}

.etc-kpi-footer em.neutral {
    color: #8b9ab0;
}

.etc-kpi-footer em i {
    margin-right: 3px;
    font-size: 13px;
}

.etc-kpi-split {
    justify-content: flex-start;
    gap: 20px;
    color: #405876;
}

.etc-kpi-split b {
    color: #23446f;
}

.etc-chart-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.etc-panel {
    min-width: 0;
    grid-column: span 4;
    border: 1px solid #e0e6ee;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px 8px;
    box-shadow: 0 2px 9px rgba(33, 54, 84, 0.06);
}

.etc-panel.etc-wide-panel {
    grid-column: span 6;
}

.etc-panel h2 {
    min-height: 21px;
    margin: 0 0 5px;
    color: #123b72;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.etc-panel h2 > i {
    margin-right: 6px;
    color: #0b5fc6;
}

.etc-panel h2.teal-title > i {
    color: #0d9a8b;
}

.etc-chart-stage {
    position: relative;
    height: 250px;
}

.etc-chart-stage.etc-bottom-chart {
    height: 245px;
}

.etc-panel-state {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #8b9ab0;
    font-size: 11.5px;
    text-align: center;
}

.etc-target-panel {
    padding: 0 12px 8px;
}

.etc-target-panel > h2 {
    margin: 0 -12px 8px;
    border-radius: 9px 9px 0 0;
    background: linear-gradient(90deg, #075cbc, #0b68d1);
    color: #fff;
    padding: 7px 10px;
}

.etc-target-body {
    min-height: 250px;
    display: grid;
    grid-template-columns: minmax(100px, 0.9fr) minmax(130px, 1.2fr);
    align-items: center;
    gap: 10px;
}

.etc-donut-wrap {
    position: relative;
    height: 172px;
}

.etc-donut-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    pointer-events: none;
}

.etc-donut-label strong {
    color: #152945;
    font-size: 23px;
    font-weight: 900;
}

.etc-donut-label span {
    color: #49627f;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
}

.etc-target-detail {
    min-width: 0;
}

.etc-target-detail > div:not(.etc-target-progress):not(.etc-target-bottom) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    margin-bottom: 11px;
}

.etc-target-detail span {
    color: #425b7b;
    font-size: 10.5px;
    font-weight: 700;
}

.etc-target-detail span i {
    color: #0b5fc6;
}

.etc-target-detail strong {
    color: #152945;
    font-size: 16px;
    font-weight: 900;
    white-space: nowrap;
}

.etc-target-progress {
    height: 12px;
    overflow: hidden;
    border-radius: 4px;
    background: #e2e6ec;
}

.etc-target-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #0864c9;
}

.etc-target-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 13px;
}

.etc-target-bottom span {
    display: grid;
    gap: 2px;
    color: #ff720d;
    font-size: 15px;
    font-weight: 900;
}

.etc-target-bottom span:last-child {
    color: #0d9a8b;
}

.etc-target-bottom b {
    color: #566d89;
    font-size: 9.5px;
}

.etc-coverage-note {
    display: block;
    margin-top: 2px;
    color: #73849a;
    font-size: 9.5px;
    text-align: right;
}

.etc-highlights {
    display: grid;
    grid-template-columns: 205px repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid #e0e6ee;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 9px rgba(33, 54, 84, 0.06);
}

.etc-highlight-title,
.etc-highlights article {
    min-height: 57px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 16px;
}

.etc-highlight-title {
    color: #183d72;
    font-size: 15px;
}

.etc-highlight-title i {
    color: #0b5fc6;
    font-size: 20px;
}

.etc-highlights article {
    border-left: 1px solid #edf0f4;
    color: #405977;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.etc-highlights article > i {
    width: 29px;
    height: 29px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #0d9a8b;
    color: #fff;
    font-size: 12px;
}

.etc-refresh-note {
    margin-top: 5px;
    color: #8795a8;
    font-size: 9.5px;
    text-align: right;
}

@media (max-width: 1250px) {
    .etc-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .etc-filters {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .etc-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .etc-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .etc-panel,
    .etc-panel.etc-wide-panel {
        grid-column: span 12;
    }

    .etc-highlights {
        grid-template-columns: 1fr;
    }

    .etc-highlights article {
        border-top: 1px solid #edf0f4;
        border-left: 0;
    }
}

@media (max-width: 560px) {
    .etc-heading {
        min-width: 0;
    }

    .etc-heading-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .etc-filter-card,
    .etc-apply-filter {
        width: 100%;
        min-height: 52px;
    }

    .etc-time-filter {
        flex-wrap: wrap;
    }

    .etc-month-pair {
        position: static;
        display: flex;
        width: 100%;
        box-shadow: none;
    }

    .etc-month-pair input {
        min-width: 0;
        flex: 1 1 0;
    }

    .etc-filter-card select {
        width: 100%;
        max-width: none;
    }

    .etc-kpi-grid {
        grid-template-columns: 1fr;
    }

    .etc-target-body {
        grid-template-columns: 1fr;
    }
}

.ecom-hero {
    border-radius: 12px;
    background: linear-gradient(120deg, #0047BA, #003A99);
    color: #fff;
    padding: 22px 26px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.ecom-title-row h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

.ecom-title-row h1 span {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.ecom-title-row p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 600;
}

.ecom-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-top: 18px;
}

.ecom-filter {
    display: grid;
    gap: 6px;
    margin: 0;
}

.ecom-filter > span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ecom-filter select,
.ecom-filter input,
.ecom-select-btn {
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 10px;
}

.ecom-filter select {
    min-width: 150px;
}

.ecom-filter select option {
    color: #0f172a;
}

.ecom-date-pair {
    display: flex;
    gap: 8px;
}

.ecom-date-pair input {
    min-width: 148px;
}

.ecom-date-pair input::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

.ecom-channel-filter {
    position: relative;
}

.ecom-select-btn {
    min-width: 190px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}

.ecom-channel-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 80;
    display: none;
    width: 230px;
    max-height: 260px;
    overflow-y: auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
    padding: 10px;
}

.ecom-channel-menu.open {
    display: block;
}

.ecom-channel-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    margin: 0;
    border-radius: 7px;
    padding: 5px 6px;
    color: #1f2937;
    font-size: 12.5px;
    cursor: pointer;
}

.ecom-channel-option:hover {
    background: #f8fafc;
}

.ecom-channel-option.all {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 4px;
    padding-bottom: 8px;
    font-weight: 700;
}

.ecom-channel-option i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.ecom-channel-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}

.ecom-channel-actions button {
    border: 0;
    border-radius: 7px;
    background: #0047BA;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
}

.ecom-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
}

.ecom-section-title b {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0047BA;
    color: #fff;
    font-size: 12px;
}

.ecom-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.ecom-kpi-card {
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    padding: 16px 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ecom-kpi-card span {
    display: block;
    min-height: 30px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-transform: uppercase;
}

.ecom-kpi-card strong {
    display: block;
    margin-top: 7px;
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
}

.ecom-kpi-card small {
    display: block;
    min-height: 34px;
    margin-top: 9px;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 600;
}

.ecom-progress {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
}

.ecom-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #0047BA;
}

.ecom-progress.success i {
    background: #1BA672;
}

.ecom-kpi-card p {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 8px 0 0;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 700;
}

.ecom-kpi-card p b {
    color: #0047BA;
}

.ecom-kpi-grid.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.ecom-kpi-card.unavailable {
    background: #F8FAFC;
    border-style: dashed;
}

.ecom-kpi-card.unavailable strong,
.ecom-kpi-card.unavailable p {
    color: #98A2B3;
}

.ecom-kpi-card.unavailable .ecom-progress {
    background: #EAECF0;
}

.ecom-highlight-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.ecom-highlight-row.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.ecom-highlight-card {
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    box-shadow: 0 2px 10px rgba(20, 30, 60, 0.06);
}

.ecom-highlight-card.c1 {
    background: linear-gradient(120deg, #0047BA, #3E7BE0);
}

.ecom-highlight-card.c2 {
    background: linear-gradient(120deg, #1BA672, #25C98A);
}

.ecom-highlight-card > div {
    min-width: 0;
}

.ecom-highlight-label {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
    opacity: 0.9;
}

.ecom-highlight-value {
    font-size: 30px;
    font-weight: 800;
    line-height: normal;
}

.ecom-highlight-note {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: normal;
    opacity: 0.85;
}

.ecom-highlight-icon {
    flex: 0 0 auto;
    font-size: 34px;
    opacity: 0.55;
}

.ecom-chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.ecom-chart-row.single {
    grid-template-columns: 1fr;
}

.ecom-chart-card {
    min-width: 0;
    border: 1px solid #E7EAF0;
    border-radius: 14px;
    background: #fff;
    padding: 18px 20px;
    box-shadow: 0 2px 10px rgba(20, 30, 60, 0.06);
}

.ecom-chart-card h3 {
    margin: 0 0 4px;
    color: #1A2333;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0;
}

.ecom-chart-sub {
    min-height: 16px;
    margin-bottom: 12px;
    color: #6B7789;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
}

.ecom-chart-stage {
    position: relative;
    width: 100%;
    height: 280px;
}

.ecom-chart-stage canvas {
    width: 100% !important;
    height: 280px !important;
    max-height: 280px;
}

.ecom-chart-state {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #D8DDE7;
    border-radius: 8px;
    background: #FAFBFD;
    padding: 20px;
    color: #6B7789;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.ecom-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    color: #6B7789;
    font-size: 11px;
    font-weight: 600;
}

.ecom-chart-legend span {
    display: inline-flex;
    align-items: center;
}

.ecom-chart-legend i {
    width: 9px;
    height: 9px;
    margin-right: 5px;
    border-radius: 50%;
}

.ecom-chart-row.ecom-cost-grid {
    grid-template-columns: 380px minmax(0, 1fr);
}

.ecom-cost-donut-stage {
    height: 250px;
}

.ecom-cost-donut-stage canvas {
    height: 250px !important;
    max-height: 250px;
}

.ecom-cost-total {
    margin-top: 10px;
    color: #6B7789;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
}

.ecom-cost-total b {
    color: #1A2333;
}

.ecom-table-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ecom-table-head-row span {
    color: #6B7789;
    font-size: 11px;
    font-weight: 600;
}

.ecom-cost-table-shell {
    overflow-x: auto;
}

.ecom-cost-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.ecom-cost-table th,
.ecom-cost-table td {
    border-bottom: 1px solid #EEF1F5;
    padding: 10px 8px;
    color: #1A2333;
    font-size: 11px;
    line-height: 1.35;
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

.ecom-cost-table th {
    color: #6B7789;
    font-size: 10px;
    font-weight: 700;
}

.ecom-cost-table th:first-child,
.ecom-cost-table td:first-child {
    text-align: left;
}

.ecom-cost-table td:first-child i {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
}

.ecom-cost-table td small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 700;
}

.ecom-cost-table .positive {
    color: #1BA672;
    font-weight: 700;
}

.ecom-cost-table .negative {
    color: #E5484D;
    font-weight: 700;
}

.ecom-cost-change {
    cursor: help;
}

.ecom-cost-table .total-row {
    background: #FAFBFD;
    font-weight: 700;
}

.ecom-cost-table .empty-cell {
    padding: 28px;
    color: #6B7789;
    text-align: center;
}

.ecom-cost-coverage {
    margin-top: 10px;
    color: #B54708;
    font-size: 10.5px;
    font-weight: 600;
}

.target-monthly-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.target-setup-header {
    align-items: center;
    background: #fff;
    border: 1px solid #E3E8F2;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
    display: flex;
    justify-content: space-between;
    padding: 20px 24px;
}

.target-setup-header h1 {
    color: #101828;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.target-setup-header p {
    color: #667085;
    font-size: 13px;
    margin: 6px 0 0;
}

.target-setup-actions {
    display: flex;
    gap: 10px;
}

.target-setup-filters {
    align-items: end;
    background: #F8FAFC;
    border: 1px solid #E3E8F2;
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: 180px 320px;
    padding: 16px;
}

.target-setup-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.target-setup-filters span {
    color: #475467;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.target-setup-filters small {
    color: #667085;
    font-size: 12px;
    line-height: 1.35;
}

.target-setup-filters input,
.target-setup-filters select {
    background: #fff;
    border: 1px solid #D0D5DD;
    border-radius: 6px;
    color: #101828;
    font-size: 13px;
    height: 38px;
    padding: 0 10px;
}

.target-flow-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.target-flow-grid article {
    background: #fff;
    border: 1px solid #E3E8F2;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    min-height: 72px;
    padding: 14px;
}

.target-flow-grid b {
    align-items: center;
    background: #0047BA;
    border-radius: 999px;
    color: #fff;
    display: flex;
    flex: 0 0 26px;
    font-size: 12px;
    height: 26px;
    justify-content: center;
    width: 26px;
}

.target-flow-grid span {
    color: #344054;
    font-size: 13px;
    line-height: 1.35;
}

.target-table-card {
    background: #fff;
    border: 1px solid #E3E8F2;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
    overflow: hidden;
}

.target-table-head {
    align-items: center;
    border-bottom: 1px solid #E3E8F2;
    display: flex;
    justify-content: space-between;
    padding: 16px 18px;
}

.target-table-head h2 {
    color: #101828;
    font-size: 17px;
    font-weight: 800;
    margin: 0;
}

.target-table-head p {
    color: #667085;
    font-size: 12px;
    margin: 4px 0 0;
}

.target-table-wrap {
    overflow-x: auto;
}

.target-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1800px;
    width: 100%;
}

.target-table th,
.target-table td {
    border-bottom: 1px solid #EEF2F6;
    color: #344054;
    font-size: 12px;
    padding: 10px 8px;
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

.target-table th {
    background: #F8FAFC;
    color: #475467;
    font-size: 11px;
    font-weight: 800;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 1;
}

.target-table th:first-child,
.target-table td:first-child {
    left: 0;
    position: sticky;
    text-align: left;
    z-index: 2;
}

.target-table td:first-child {
    background: #fff;
}

.target-table th:first-child {
    background: #F8FAFC;
    z-index: 3;
}

.target-table input {
    border: 1px solid #D0D5DD;
    border-radius: 6px;
    color: #101828;
    font-size: 12px;
    height: 32px;
    padding: 0 8px;
    text-align: right;
    width: 118px;
}

.target-channel-cell {
    align-items: center;
    display: flex;
    gap: 9px;
    min-width: 190px;
}

.target-channel-cell i {
    border-radius: 999px;
    flex: 0 0 10px;
    height: 10px;
    width: 10px;
}

.target-channel-cell strong {
    color: #101828;
    display: block;
    font-size: 13px;
}

.target-channel-cell small {
    color: #667085;
    display: block;
    font-size: 11px;
    margin-top: 2px;
}

.target-derived {
    background: #F8FAFC;
    color: #0047BA;
    font-weight: 700;
}

.fixed-fee-page .target-setup-filters {
    grid-template-columns: 180px repeat(2, minmax(180px, 240px));
}

.fixed-fee-summary {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #D0D5DD;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 58px;
    padding: 10px 12px;
}

.fixed-fee-summary strong {
    color: #101828;
    font-size: 16px;
}

.fixed-fee-table {
    min-width: 1120px;
}

.fixed-fee-table td:last-child input {
    text-align: left;
    width: 210px;
}

.fixed-fee-percent-input {
    position: relative;
    min-width: 90px;
}

.fixed-fee-percent-input input {
    padding-right: 28px;
}

.fixed-fee-percent-input span {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: #667085;
    pointer-events: none;
}

@media (max-width: 767px) {
    .fixed-fee-page .target-setup-filters {
        grid-template-columns: 1fr;
    }
}

.target-derived.warn {
    color: #B42318;
}

.target-cost-input {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.target-cost-input button {
    align-items: center;
    background: #EEF4FF;
    border: 1px solid #B2CCFF;
    border-radius: 6px;
    color: #0047BA;
    display: flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.target-table tfoot td {
    background: #F8FAFC;
    color: #101828;
    font-weight: 800;
}

.pulse-value-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 20px 0;
}

.pulse-value {
    color: #0f172a;
    font-size: 44px;
    line-height: 1;
    letter-spacing: -0.05em;
}

.pulse-trend {
    color: #22c55e;
    font-size: 15px;
    font-weight: 700;
}

.pulse-copy {
    margin: 8px 20px 0;
    color: #64748b;
    font-size: 13px;
}

.pulse-chart {
    position: relative;
    margin: 18px 20px 0;
    height: 270px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, #fbfdff, #f7fafc);
}

.pulse-chart-grid {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px) 0 0 / 100% 25%,
        linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px) 0 0 / 14.285% 100%;
}

.pulse-line {
    position: absolute;
    left: 6%;
    right: 6%;
    height: 120px;
    bottom: 56px;
    border-radius: 999px;
    pointer-events: none;
}

.pulse-line.primary {
    border-top: 3px solid #19d3ae;
    clip-path: polygon(0 72%, 12% 56%, 24% 52%, 36% 64%, 48% 36%, 62% 42%, 76% 38%, 88% 22%, 100% 26%, 100% 100%, 0 100%);
    background: linear-gradient(180deg, rgba(25, 211, 174, 0.2), transparent);
}

.pulse-line.secondary {
    height: 98px;
    border-top: 2px dashed #3b82f6;
    clip-path: polygon(0 80%, 12% 66%, 24% 60%, 36% 70%, 48% 46%, 62% 52%, 76% 48%, 88% 34%, 100% 38%, 100% 100%, 0 100%);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.14), transparent);
}

.pulse-axis,
.pulse-legend,
.storage-list {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.pulse-axis {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    color: #64748b;
    font-size: 12px;
}

.pulse-legend {
    padding: 16px 20px 0;
    color: #64748b;
    font-size: 12px;
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 999px;
}

.legend-dot.teal { background: #19d3ae; }
.legend-dot.blue { background: #3b82f6; }
.legend-dot.purple { background: #a855f7; }
.legend-dot.amber { background: #f59e0b; }

.activity-list {
    display: grid;
    gap: 2px;
    padding: 12px 0 6px;
}

.activity-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.activity-item:first-child {
    border-top: 0;
}

.activity-badge {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.activity-badge.teal { background: #14b8a6; }
.activity-badge.blue { background: #3b82f6; }
.activity-badge.green { background: #22c55e; }
.activity-badge.amber { background: #f59e0b; }
.activity-badge.purple { background: #a855f7; }

.activity-item strong {
    color: #0f172a;
    font-size: 14px;
}

.activity-item p {
    margin: 4px 0;
    color: #52637a;
    font-size: 13px;
    line-height: 1.5;
}

.activity-item span {
    color: #7b8798;
    font-size: 12px;
}

.dark-table th,
.dark-table td {
    border-bottom-color: rgba(148, 163, 184, 0.08);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.status-pill.success {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}

.status-pill.info {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

.status-pill.warning {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.storage-panel {
    padding-bottom: 18px;
}

.storage-copy {
    display: grid;
    gap: 6px;
    padding: 12px 20px 0;
}

.storage-copy strong {
    color: #0f172a;
}

.storage-copy span {
    color: #52637a;
    font-size: 13px;
    line-height: 1.5;
}

.storage-bars {
    display: grid;
    gap: 14px;
    padding: 18px 20px 0;
}

.storage-bar {
    display: grid;
    gap: 8px;
}

.storage-bar span {
    color: #64748b;
    font-size: 12px;
}

.storage-bar div {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

.storage-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.storage-bar i.teal { background: linear-gradient(90deg, #14b8a6, #19d3ae); }
.storage-bar i.blue { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.storage-bar i.purple { background: linear-gradient(90deg, #9333ea, #ec4899); }

body.gentelella-dark #scrollTopBtn {
    background: linear-gradient(180deg, #1abb9c, #169f85);
}

.app-page {
    display: grid;
    gap: 20px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: var(--font-weight-bold);
}

.page-title {
    margin: 0;
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    color: var(--text);
}

.page-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.panel-header,
.panel-body {
    padding: 18px 20px;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border-color-light);
}

.panel-title {
    margin: 0;
    font-size: 15px;
    font-weight: var(--font-weight-bold);
    color: var(--text);
}

.panel-subtitle {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--text-muted);
}

.table-shell {
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color-light);
    text-align: left;
    vertical-align: middle;
}

.data-table thead th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    background: var(--bg-surface-secondary);
}

.data-table tbody tr:hover {
    background: rgba(26, 187, 156, 0.03);
}

.empty-row {
    text-align: center;
    color: var(--text-muted);
    padding: 24px !important;
}

.inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.muted-text,
.cell-subtitle {
    color: var(--text-muted);
    font-size: 12px;
}

.cell-title {
    font-weight: var(--font-weight-bold);
    color: var(--text);
}

.cell-error {
    margin-top: 4px;
    color: var(--red);
    font-size: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.btn-xs {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary-dk);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dk);
}

.btn-outline {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--bg-surface-secondary);
}

.btn-danger {
    background: #fff0f0;
    border-color: rgba(214, 57, 57, 0.15);
    color: var(--red);
}

.btn-danger:hover {
    background: #ffe4e4;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    color: var(--text);
}

.required {
    color: var(--red);
}

.app-input {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text);
    outline: none;
}

.app-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-lt);
}

.form-stack {
    display: grid;
    gap: 16px;
}

.app-note {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.app-note strong {
    color: var(--text);
}

.app-note-info {
    border-color: rgba(26, 187, 156, 0.2);
    background: rgba(26, 187, 156, 0.08);
}

.app-note-warning {
    border-color: rgba(245, 159, 0, 0.22);
    background: rgba(245, 159, 0, 0.1);
}

.app-note-neutral {
    background: var(--bg-surface-secondary);
}

.app-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

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

.scheduler-toolbar {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.stats-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    background: #eef2f7;
    color: var(--text-secondary);
}

.badge-success,
.stat-success {
    background: rgba(47, 179, 68, 0.12);
    color: #1f8a34;
}

.badge-danger,
.stat-fail {
    background: rgba(214, 57, 57, 0.12);
    color: var(--red);
}

.badge-info,
.stat-processing {
    background: rgba(13, 110, 253, 0.12);
    color: #0b67d1;
}

.badge-secondary,
.stat-queue,
.stat-total {
    background: #eef2f7;
    color: var(--text-secondary);
}

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(15, 23, 42, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app-modal-card {
    width: min(100%, 720px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: var(--bg-surface);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.app-modal-md {
    max-width: 520px;
}

.app-modal-sm {
    max-width: 420px;
}

.app-modal-xl {
    max-width: 1120px;
}

.app-modal-header,
.app-modal-footer,
.app-modal-body {
    padding: 18px 20px;
}

.app-modal-header,
.app-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-modal-header {
    border-bottom: 1px solid var(--border-color-light);
}

.app-modal-footer {
    border-top: 1px solid var(--border-color-light);
    justify-content: flex-end;
}

.app-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: var(--font-weight-bold);
}

.app-modal-subtitle {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--text-muted);
}

.modal-close-btn {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.split-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.split-panel,
.permission-shell {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    background: var(--bg-surface-secondary);
}

.split-panel-header,
.permission-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.split-panel-header h4,
.permission-toolbar h4 {
    margin: 0;
    font-size: 14px;
    font-weight: var(--font-weight-bold);
}

.permission-toolbar p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.user-pick-list {
    display: grid;
    gap: 8px;
    max-height: 280px;
    overflow: auto;
}

.user-pick-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    cursor: pointer;
}

.user-pick-item:hover {
    border-color: var(--primary);
}

.empty-box {
    padding: 18px;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
}

.permission-shell {
    margin-top: 20px;
}

.permission-groups {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.permission-group {
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
}

.permission-parent,
.permission-child,
.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.permission-parent {
    font-weight: var(--font-weight-bold);
    margin-bottom: 10px;
}

.permission-children {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.delete-copy {
    margin: 0;
    color: var(--text-secondary);
}

.welcome-hero {
    min-height: 420px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background:
        radial-gradient(circle at top left, rgba(26, 187, 156, 0.1), transparent 40%),
        linear-gradient(135deg, #ffffff, #f2f6fb);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    flex-direction: column;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--primary-lt);
    color: var(--primary-dk);
    font-weight: var(--font-weight-bold);
    margin-bottom: 18px;
}

.welcome-heading {
    margin: 0 0 12px;
    font-size: 34px;
    font-weight: 700;
    color: var(--text);
}

.welcome-copy {
    max-width: 840px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.toast-host {
    position: fixed;
    top: 72px;
    right: 20px;
    z-index: 140;
    display: grid;
    gap: 10px;
}

.app-toast {
    min-width: 280px;
    max-width: 380px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    color: var(--text);
    animation: toast-in 180ms ease;
}

.app-toast.success { border-left: 4px solid var(--green); }
.app-toast.error { border-left: 4px solid var(--red); }
.app-toast.warning { border-left: 4px solid var(--yellow); }
.app-toast.info { border-left: 4px solid var(--primary); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .main-header {
        left: 0;
        padding: 0 12px;
    }

    .topbar-route,
    .header-link-btn {
        display: none;
    }

    .topbar-center {
        display: none;
    }

    .search-box {
        display: none;
    }

    .main-sidebar {
        transform: translateX(-100%);
    }

    .content-wrapper,
    .main-footer {
        margin-left: 0;
    }

    body.sidebar-mobile-open .main-sidebar {
        transform: translateX(0);
    }

    body.sidebar-mobile-open .sidebar-backdrop {
        display: block;
    }

    body.sidebar-collapse {
        --sidebar-w: 252px;
    }

    .profile-grid,
    .filter-grid,
    .dashboard-metric-grid,
    .split-panels,
    .permission-children,
    .dashboard-main-grid,
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }

    .ecom-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ecom-highlight-row {
        grid-template-columns: 1fr;
    }

    .ecom-chart-row {
        grid-template-columns: 1fr;
    }

    .ecom-chart-row.ecom-cost-grid {
        grid-template-columns: 1fr;
    }

    .ecom-filter-row {
        align-items: stretch;
    }

    .ecom-filter,
    .ecom-filter select,
    .ecom-select-btn {
        width: 100%;
    }

    .ecom-date-pair {
        flex-direction: column;
    }

    .profile-qr {
        justify-content: flex-start;
    }

    .metric-card {
        grid-template-columns: auto 1fr;
    }

    .metric-card-spark,
    .metric-card-progress {
        grid-column: 1 / -1;
    }

    .dashboard-panel-header {
        flex-direction: column;
    }
}
