﻿:root{--bg:#f4f7fb;--panel:#fff;--line:#e4e9f0;--text:#172033;--muted:#64748b;--primary:#1677ff;--primary-dark:#075ecb;--danger:#d92d20;--warning:#a15c00;--success:#16803c;--sidebar:#14213a}*{box-sizing:border-box}body{margin:0;font-family:Inter,"Microsoft YaHei",system-ui,sans-serif;color:var(--text);background:var(--bg);font-size:14px;letter-spacing:0}a{color:var(--primary);text-decoration:none}button,input{font:inherit}.app-shell{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:220px;background:var(--sidebar);color:#dbe5f4;padding:20px 14px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:10px;color:#fff;font-weight:700;padding:0 8px 22px}.brand-mark{display:inline-grid;place-items:center;width:34px;height:34px;background:#19a05f;color:#fff;border-radius:7px;font-size:17px}.sidebar nav{display:grid;gap:4px}.sidebar nav a{color:#b9c6d8;padding:11px 12px;border-radius:6px}.sidebar nav a:hover,.sidebar nav a.active{background:#253653;color:#fff}.sidebar-footer{margin-top:auto;border-top:1px solid #30405c;padding:16px 8px 0;display:flex;align-items:center;justify-content:space-between}.sidebar-footer form{margin:0}.icon-link,.link-button{border:0;background:none;color:var(--primary);padding:0;cursor:pointer}.sidebar .icon-link{color:#b9c6d8}.main{grid-column:2;min-width:0}.topbar{height:80px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 30px}.topbar h1{font-size:21px;margin:0 0 5px}.topbar p{margin:0;color:var(--muted);font-size:12px}.content{padding:24px 30px 40px;max-width:1500px}.alert{padding:12px 14px;margin-bottom:18px;border:1px solid;border-radius:6px}.alert-success{background:#eefbf3;border-color:#bce8ca;color:#126b34}.alert-danger{background:#fff2f0;border-color:#ffc7c2;color:#a51d14}.alert-warning{background:#fff8e8;border-color:#f2d397;color:#875000}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.metric-grid.compact{grid-template-columns:repeat(2,minmax(220px,340px))}.metric,.panel{background:var(--panel);border:1px solid var(--line);border-radius:8px}.metric{padding:18px 20px;min-height:116px}.metric span,.metric small{display:block;color:var(--muted)}.metric strong{display:block;font-size:27px;margin:10px 0 6px}.panel{margin-bottom:18px;overflow:hidden}.panel-head,.toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px}.panel-head{padding:18px 20px;border-bottom:1px solid var(--line)}.panel-head h2{font-size:16px;margin:0 0 4px}.panel-head p,.toolbar p{margin:0;color:var(--muted)}.toolbar{margin-bottom:16px}.btn{display:inline-flex;align-items:center;justify-content:center;height:36px;padding:0 14px;border-radius:6px;border:1px solid transparent;cursor:pointer;white-space:nowrap}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary-dark)}.btn-secondary{background:#fff;border-color:#cbd5e1;color:#334155}.btn-block{width:100%}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:760px}th,td{text-align:left;padding:13px 16px;border-bottom:1px solid var(--line);vertical-align:middle}th{color:#596579;background:#fafbfc;font-weight:600;font-size:12px}tbody tr:hover{background:#fbfdff}tbody tr:last-child td{border-bottom:0}.right{text-align:right}.amount{font-variant-numeric:tabular-nums;font-weight:650}.block{display:block;color:var(--muted);margin-top:4px;font-size:12px}.status{display:inline-flex;padding:3px 8px;border-radius:4px;font-size:12px}.status-enabled,.status-success{background:#eaf8ef;color:var(--success)}.status-disabled{background:#eef1f5;color:#667085}.status-failed{background:#fff0ee;color:var(--danger)}.status-partial,.status-running,.status-pending{background:#fff6df;color:var(--warning)}.danger-text{color:var(--danger)!important}.actions{text-align:right;white-space:nowrap}.actions>*{display:inline-block;margin-left:10px}.actions form{margin:0}.muted{color:var(--muted)}.empty{text-align:center;color:var(--muted);padding:34px}.error-cell{max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chart-wrap{height:300px;padding:12px 14px;overflow:hidden}.chart-wrap.small{height:250px}.form-panel{padding:24px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.form-grid label,.form-stack label,.filter-form label{display:grid;gap:7px;font-weight:600}.form-grid input,.form-stack input,.filter-form input{height:40px;border:1px solid #cbd5e1;border-radius:6px;padding:0 11px;outline:none}.form-grid input:focus,.form-stack input:focus,.filter-form input:focus{border-color:var(--primary);box-shadow:0 0 0 3px #1677ff18}.form-grid small{color:var(--muted);font-weight:400}.full{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:10px}.inline-form,.filter-form{display:flex;align-items:end;gap:10px}.auth-shell{min-height:100vh;background:#eef3f8}.auth-main{min-height:100vh;display:grid;place-items:center;padding:24px}.auth-panel{width:min(420px,100%);background:#fff;border:1px solid var(--line);border-radius:8px;padding:32px;box-shadow:0 14px 35px #25365314}.auth-panel.wide{width:min(520px,100%)}.auth-brand{text-align:center;margin-bottom:25px}.auth-brand .brand-mark{margin:auto}.auth-brand h1{font-size:20px;margin:13px 0 7px}.auth-brand p{color:var(--muted);margin:0;line-height:1.6}.form-stack{display:grid;gap:17px}.state-page{text-align:center;padding:90px 20px}.state-page>strong{font-size:72px;color:#cbd5e1}.state-page h2{margin:4px 0 24px}@media(max-width:1000px){.metric-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:720px){.app-shell{display:block}.sidebar{position:static;width:auto;height:auto;padding:12px}.brand{padding:0 5px 12px}.sidebar nav{grid-template-columns:repeat(3,1fr)}.sidebar nav a{text-align:center;padding:9px 4px}.sidebar-footer{display:none}.main{display:block}.topbar{height:65px;padding:0 16px}.content{padding:16px}.metric-grid,.metric-grid.compact{grid-template-columns:1fr 1fr;gap:10px}.metric{padding:14px;min-height:100px}.metric strong{font-size:22px}.panel-head,.toolbar{align-items:flex-start;flex-wrap:wrap}.form-grid{grid-template-columns:1fr}.filter-form{flex-wrap:wrap}.chart-wrap{overflow-x:auto}}@media(max-width:440px){.metric-grid,.metric-grid.compact{grid-template-columns:1fr}.sidebar nav a{font-size:12px}.auth-panel{padding:24px 20px}}

:root {
    --bg: #f2f5fa;
    --panel: #ffffff;
    --line: #e5eaf2;
    --text: #1f2a3d;
    --muted: #77849a;
    --primary: #2f7df6;
    --primary-dark: #1767dc;
    --sidebar: #0d233b;
    --sidebar-muted: #8ca1ba;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    background: var(--bg);
    color: var(--text);
}

.app-shell {
    grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
    width: 250px;
    padding: 0 12px 20px;
    background: linear-gradient(180deg, #0d233b 0%, #0b2036 100%);
    box-shadow: 4px 0 18px rgba(12, 32, 54, .08);
}

.brand {
    height: 66px;
    padding: 0 8px;
    gap: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    font-size: 17px;
    letter-spacing: .2px;
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #20c77a, #1a8cff);
    font-size: 15px;
    box-shadow: 0 5px 14px rgba(28, 153, 207, .28);
}

.side-nav {
    display: block !important;
    padding-top: 14px;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    margin: 3px 0;
    padding: 0 14px !important;
    border-radius: 7px !important;
    color: #c9d5e4 !important;
    font-size: 15px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.side-nav a:hover {
    background: rgba(255, 255, 255, .07) !important;
    color: #fff !important;
    transform: translateX(2px);
}

.side-nav a.active,
.side-nav a.nav-home.active {
    color: #fff !important;
    background: linear-gradient(90deg, #2d7df7, #377ff1) !important;
    box-shadow: 0 6px 15px rgba(47, 125, 246, .25);
}

.side-nav a.active-sub {
    color: #fff !important;
}

.nav-icon {
    display: inline-grid;
    place-items: center;
    width: 22px;
    font-size: 20px;
    line-height: 1;
}

.nav-group {
    margin: 21px 14px 7px;
    color: #5f7692;
    font-size: 13px;
}

.main {
    grid-column: 2;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 66px;
    padding: 0 28px;
    gap: 13px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 1px 0 var(--line);
}

.menu-toggle,
.logout-link {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-toggle {
    color: #637187;
    font-size: 20px;
    padding: 8px;
}

.topbar-spacer {
    flex: 1;
}

.task-status {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #20ad67;
    font-size: 14px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #20c77a;
    box-shadow: 0 0 0 4px rgba(32, 199, 122, .12);
}

.top-divider {
    width: 1px;
    height: 20px;
    background: var(--line);
}

.top-date,
.top-user {
    color: #66748a;
    font-size: 14px;
}

.user-avatar {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #2070e8;
    background: #e2efff;
    font-weight: 700;
}

.topbar form {
    margin: 0;
}

.logout-link {
    color: #2f7df6;
    padding: 7px 0;
}

.content {
    max-width: none;
    padding: 25px 28px 48px;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.page-heading h1 {
    margin: 0 0 4px;
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: -.3px;
}

.page-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.overview-toolbar,
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.overview-toolbar > div {
    display: grid;
    gap: 2px;
}

.overview-toolbar strong {
    font-size: 15px;
}

.overview-toolbar span,
.toolbar p {
    color: var(--muted);
    font-size: 14px;
}

.dashboard-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 128px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: 0 4px 12px rgba(31, 42, 61, .035);
    transition: transform .18s ease, box-shadow .18s ease;
}

.metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 24px rgba(31, 42, 61, .08);
}

.metric > div {
    min-width: 0;
}

.metric-icon {
    flex: 0 0 auto;
    display: inline-grid !important;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 18px;
}

.metric-green .metric-icon { color: #12a85b; background: #dcf8e7; }
.metric-blue .metric-icon { color: #2875ea; background: #e4efff; }
.metric-purple .metric-icon { color: #7c4fe4; background: #eee7ff; }
.metric-red .metric-icon { color: #ef5b5b; background: #ffe5e5; }
.metric-amber .metric-icon { color: #dd8b07; background: #fff0ca; }
.metric-teal .metric-icon { color: #087f8c; background: #dff6f7; }

.metric span:not(.metric-icon) {
    color: #68758a;
    font-size: 15px;
}

.metric strong {
    margin: 4px 0 3px;
    font-size: 25px;
    line-height: 1.25;
    white-space: nowrap;
}

.metric small {
    color: #98a2b3;
    font-size: 12px;
}

.dashboard-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.35fr) minmax(310px, .9fr);
    gap: 18px;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: 0 4px 12px rgba(31, 42, 61, .035);
}

.panel-head {
    min-height: 68px;
    padding: 16px 20px;
}

.panel-head h2 {
    margin: 0 0 3px;
    font-size: 18px;
}

.panel-head p {
    font-size: 13px;
}

.range-pill {
    padding: 6px 12px;
    border: 1px solid #cfe0fa;
    border-radius: 6px;
    color: #2875ea;
    background: #f4f8ff;
    font-size: 13px;
}

.dashboard-chart {
    height: 380px;
    padding: 15px 18px 16px;
}

.share-panel {
    min-width: 0;
}

.donut-area {
    padding: 22px 20px 20px;
}

.donut-chart {
    position: relative;
    display: grid;
    place-items: center;
    width: 190px;
    height: 190px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--donut-bg);
}

.donut-chart::after {
    content: "";
    position: absolute;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: #fff;
}

.donut-chart > div {
    position: relative;
    z-index: 1;
    display: grid;
    text-align: center;
}

.donut-chart strong {
    font-size: 19px;
}

.donut-chart span {
    color: var(--muted);
    font-size: 12px;
}

.donut-legend {
    display: grid;
    gap: 8px;
}

.donut-legend a {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid #edf0f5;
    border-radius: 7px;
    color: var(--text);
    background: #fbfcfe;
}

.legend-color {
    width: 9px;
    height: 9px;
    border-radius: 3px;
}

.legend-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.donut-legend strong {
    font-size: 13px;
}

.donut-legend small {
    grid-column: 2 / 4;
    color: var(--muted);
    font-size: 12px;
}

.ranking-panel {
    margin-top: 18px;
}

.yesterday-revenue-panel {
    margin-top: 0;
    border-color: #f0d8a3;
    box-shadow: 0 6px 18px rgba(185, 104, 0, .08);
}

.yesterday-revenue-head {
    background: #fffaf0;
}

.dashboard-profit-metric {
    border-color: #cfead9;
    background: #fbfffc;
}

.dashboard-profit-metric strong {
    color: #138548;
}

.dashboard-profit-metric.metric-profit-loss {
    border-color: #f3ceca;
    background: #fffafa;
}

.dashboard-profit-metric.metric-profit-loss .metric-icon {
    color: #d43b31;
    background: #ffe8e5;
}

.dashboard-profit-metric.metric-profit-loss strong {
    color: var(--danger);
}

.finance-coverage-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 11px;
    border: 1px solid;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.finance-coverage-complete {
    color: #167247;
    border-color: #bfe6ce;
    background: #edf9f2;
}

.finance-coverage-partial {
    color: #9a6200;
    border-color: #efd598;
    background: #fff8e8;
}

.yesterday-revenue-total {
    min-width: 170px;
    text-align: right;
}

.yesterday-revenue-total span,
.yesterday-revenue-total small {
    display: block;
    color: #9a6a2b;
    font-size: 13px;
}

.yesterday-revenue-total strong {
    display: block;
    margin: 2px 0;
    color: #b96800;
    font-size: 31px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.yesterday-revenue-scroll {
    max-height: 560px;
    overflow: auto;
}

.yesterday-revenue-table {
    min-width: 860px;
}

.yesterday-revenue-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fffaf0;
}

.yesterday-revenue-table tbody tr.yesterday-rank-top {
    background: #fffdf7;
}

.yesterday-revenue-table tbody tr.yesterday-rank-top:hover {
    background: #fff8e7;
}

.yesterday-revenue-table .yesterday-amount {
    color: #b96800;
    font-size: 20px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.yesterday-revenue-table .yesterday-amount.not-synced {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.yesterday-revenue-table .finance-amount {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

.yesterday-revenue-table .finance-ad-fund {
    color: #167247;
}

.yesterday-revenue-table .finance-buy-cost {
    color: #a55b08;
}

.yesterday-revenue-table .finance-profit {
    font-size: 18px;
    font-weight: 750;
}

.yesterday-revenue-table .finance-profit-gain {
    color: #138548;
}

.yesterday-revenue-table .finance-profit-loss {
    color: var(--danger);
}

.yesterday-revenue-table .finance-profit-neutral {
    color: #526077;
}

.finance-value-missing,
.finance-rank-missing {
    color: #98a2b3;
    font-size: 13px;
    font-weight: 500;
}

.finance-data-status {
    display: inline-flex;
    max-width: 210px;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.finance-data-ready {
    color: #167247;
    background: #eaf8ef;
}

.finance-data-missing {
    color: #9a6200;
    background: #fff4d9;
}

.finance-row-incomplete td {
    background: #fcfcfd;
}

.yesterday-data-status {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.yesterday-data-ready {
    color: #167247;
    background: #eaf8ef;
}

.yesterday-data-missing {
    color: #8a6a2b;
    background: #fff5dc;
}

.rank-number {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
    border-radius: 7px;
    background: #eef2f7;
    color: #66748a;
    font-weight: 700;
}

.rank-1 { color: #b97800; background: #fff0c9; }
.rank-2 { color: #55708f; background: #e8eef5; }
.rank-3 { color: #a85b33; background: #f8e4d9; }

.btn {
    min-height: 40px;
    height: 40px;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 15px;
}

.btn-primary {
    box-shadow: 0 5px 12px rgba(47, 125, 246, .2);
}

.btn-icon {
    margin-right: 4px;
    color: inherit !important;
}

table {
    font-size: 15px;
}

th {
    padding: 14px 18px;
    font-size: 14px;
}

td {
    padding: 15px 18px;
}

.table-action,
.actions a,
.link-button {
    font-size: 14px;
}

.status {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 13px;
}

.form-panel {
    padding: 28px;
}

.form-grid,
.form-stack {
    gap: 21px;
}

.form-grid label,
.form-stack label,
.filter-form label {
    font-size: 15px;
}

.form-grid input,
.form-stack input,
.filter-form input {
    height: 45px;
    padding: 0 13px;
    font-size: 15px;
}

.chart-wrap.small {
    height: 300px;
}

.compact-empty {
    padding: 18px;
}

.auth-panel {
    padding: 38px;
}

.auth-brand h1 {
    font-size: 24px;
}

@media (max-width: 1320px) {
    .dashboard-metrics { gap: 10px; }
    .dashboard-metrics .metric { gap: 10px; padding: 14px; }
    .dashboard-metrics .metric-icon { width: 40px; height: 40px; font-size: 16px; }
    .dashboard-metrics .metric strong { font-size: 20px; }
    .dashboard-metrics .metric span:not(.metric-icon) { font-size: 13px; }
    .dashboard-chart-grid { grid-template-columns: minmax(0, 1.7fr) minmax(300px, .9fr); }
}

@media (max-width: 1020px) {
    .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
    .sidebar { width: 220px; }
    .dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-chart-grid { grid-template-columns: 1fr; }
    .share-panel { max-width: none; }
}

@media (max-width: 720px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; z-index: 40; width: 250px; height: 100vh; transform: translateX(-100%); transition: transform .2s ease; }
    body.menu-open .sidebar { transform: translateX(0); }
    .brand { display: flex; }
    .side-nav { grid-template-columns: none !important; }
    .side-nav a { text-align: left !important; }
    .topbar { height: 58px; padding: 0 14px; }
    .task-status, .top-date, .top-divider { display: none; }
    .content { padding: 18px 14px 36px; }
    .page-heading h1 { font-size: 22px; }
    .dashboard-metrics { grid-template-columns: 1fr; }
    .metric { min-height: 112px; }
    .dashboard-chart { height: 320px; overflow-x: auto; }
    .overview-toolbar { align-items: flex-start; flex-direction: column; }
    .overview-toolbar form, .overview-toolbar .btn { width: 100%; }
    .panel-head { align-items: flex-start; flex-wrap: wrap; }
    .form-grid { grid-template-columns: 1fr; }
    .yesterday-revenue-total { width: 100%; text-align: left; }
}

/* Dashboard operating view */
.dashboard-toolbar {
    margin-bottom: 16px;
}

.dashboard-original-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.dashboard-original-toolbar > div {
    display: grid;
    gap: 4px;
}

.dashboard-original-toolbar strong {
    font-size: 16px;
}

.dashboard-original-toolbar span {
    color: var(--muted);
    font-size: 13px;
}

.dashboard-sync-control {
    display: grid;
    justify-items: end;
    gap: 9px;
    width: min(390px, 100%);
}

.dashboard-sync-control .inline-form {
    justify-content: flex-end;
}

.dashboard-sync-progress {
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfe0f8;
    border-radius: 6px;
    background: #f7faff;
}

.dashboard-sync-progress[hidden] {
    display: none;
}

.dashboard-sync-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-sync-progress-head strong {
    color: #285f9f;
    font-size: 13px;
}

.dashboard-sync-progress-head span {
    flex: 0 0 auto;
    color: #285f9f;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.dashboard-sync-progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 4px;
    background: #dfe9f6;
}

.dashboard-sync-progress-track i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #2f7df6;
    transition: width .25s ease;
}

.dashboard-sync-progress small {
    color: #66758a;
    font-size: 12px;
    line-height: 1.45;
}

.dashboard-sync-progress.sync-complete {
    border-color: #bfe6ce;
    background: #f2fbf5;
}

.dashboard-sync-progress.sync-complete .dashboard-sync-progress-head strong,
.dashboard-sync-progress.sync-complete .dashboard-sync-progress-head span {
    color: #167247;
}

.dashboard-sync-progress.sync-complete .dashboard-sync-progress-track i {
    background: #16a05d;
}

.dashboard-sync-progress.sync-warning {
    border-color: #efd598;
    background: #fff9eb;
}

.dashboard-sync-progress.sync-warning .dashboard-sync-progress-head strong,
.dashboard-sync-progress.sync-warning .dashboard-sync-progress-head span {
    color: #946000;
}

.dashboard-sync-progress.sync-warning .dashboard-sync-progress-track i {
    background: #d98b0b;
}

#dashboardSyncButton:disabled {
    cursor: wait;
    opacity: .72;
}

#dashboardSyncButton .dashboard-sync-button-label {
    color: inherit;
    font-size: inherit;
}

.dashboard-original-metrics {
    margin-bottom: 18px;
}

.dashboard-original-metrics .metric {
    min-height: 142px;
    padding: 21px 19px;
}

.dashboard-original-metrics .metric strong {
    font-size: 27px;
}

.dashboard-original-metrics .metric small {
    line-height: 1.45;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.dashboard-kpi {
    min-width: 0;
    min-height: 132px;
    padding: 18px;
    border: 1px solid var(--line);
    border-top: 3px solid #94a3b8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(31, 42, 61, .035);
}

.dashboard-kpi > span,
.dashboard-kpi > small {
    display: block;
    color: var(--muted);
}

.dashboard-kpi > span {
    font-size: 14px;
    font-weight: 650;
}

.dashboard-kpi > strong {
    display: block;
    margin: 10px 0 8px;
    overflow-wrap: anywhere;
    font-size: 27px;
    line-height: 1.12;
    font-variant-numeric: tabular-nums;
}

.dashboard-kpi > small {
    font-size: 12px;
    line-height: 1.45;
}

.kpi-income { border-top-color: #16a05d; }
.kpi-change { border-top-color: #2f7df6; }
.kpi-month { border-top-color: #7a57d1; }
.kpi-target { border-top-color: #d98b0b; }
.kpi-coverage { border-top-color: #0f8e9d; }
.kpi-complete { border-top-color: #e05a5a; }

.kpi-progress {
    width: 100%;
    height: 5px;
    margin: -2px 0 8px;
    overflow: hidden;
    border-radius: 3px;
    background: #edf1f6;
}

.kpi-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #d98b0b;
}

.dashboard-main-ranking {
    min-width: 1120px;
}

.status-developing,
.status-review {
    color: #2765b3;
    background: #eaf2ff;
}

.status-paused {
    color: #9a6200;
    background: #fff4d9;
}

.status-offline,
.status-archived {
    color: #667085;
    background: #eef1f5;
}

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

.movement-panel {
    min-width: 0;
}

.movement-panel .panel-head {
    min-height: 72px;
}

.movement-count {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 30px;
    padding: 0 9px;
    border-radius: 6px;
    color: #516075;
    background: #eef2f7;
    font-weight: 750;
}

.movement-up .movement-count { color: #127a45; background: #e8f8ef; }
.movement-down .movement-count { color: #b43831; background: #fff0ee; }
.movement-new .movement-count { color: #2765b3; background: #e9f2ff; }
.movement-zero .movement-count { color: #a16600; background: #fff3d6; }

.movement-list {
    max-height: 390px;
    overflow: auto;
}

.movement-list > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
    padding: 12px 18px;
    border-bottom: 1px solid #edf0f5;
    color: var(--text);
}

.movement-list > a:last-child {
    border-bottom: 0;
}

.movement-list > a:hover {
    background: #fafcff;
}

.movement-list > a > div {
    min-width: 0;
}

.movement-list strong,
.movement-list span {
    display: block;
}

.movement-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.movement-list span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.movement-list em {
    flex: 0 0 auto;
    font-style: normal;
    font-size: 15px;
    font-weight: 750;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.movement-list em small {
    display: block;
    margin-top: 3px;
    color: inherit;
    font-size: 11px;
}

.dashboard-analysis-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(340px, .9fr);
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-analysis-grid > .panel {
    min-width: 0;
    margin-bottom: 0;
}

.concentration-summary {
    padding: 23px 20px 18px;
    border-bottom: 1px solid var(--line);
}

.concentration-summary > strong,
.concentration-summary > span {
    display: block;
}

.concentration-summary > strong {
    color: #b26b00;
    font-size: 38px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.concentration-summary > span {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.concentration-bar,
.ad-share {
    overflow: hidden;
    border-radius: 4px;
    background: #edf1f6;
}

.concentration-bar {
    height: 8px;
    margin-top: 16px;
}

.concentration-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #d98b0b;
}

.concentration-list a {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 8px 18px;
    border-bottom: 1px solid #edf0f5;
    color: var(--text);
}

.concentration-list a:last-child {
    border-bottom: 0;
}

.concentration-list a > span {
    display: inline-grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 5px;
    color: #66748a;
    background: #eef2f7;
    font-size: 11px;
    font-weight: 700;
}

.concentration-list a > strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.concentration-list a > em {
    color: #b26b00;
    font-style: normal;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.ad-mix-panel .panel-head {
    align-items: center;
}

.ad-mix-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ad-mix-item {
    min-width: 0;
    min-height: 225px;
    padding: 20px;
    border-top: 4px solid #7a57d1;
    border-right: 1px solid var(--line);
    background: #fff;
}

.ad-mix-item:last-child {
    border-right: 0;
}

.ad-mix-item > div:first-child {
    display: grid;
    gap: 6px;
}

.ad-mix-item > div:first-child > span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
}

.ad-mix-item > div:first-child > strong {
    font-size: 24px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.ad-share {
    height: 6px;
    margin: 15px 0;
}

.ad-share i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #7a57d1;
}

.ad-mix-rewarded .ad-share i { background: #16a05d; }
.ad-mix-interstitial .ad-share i { background: #2f7df6; }
.ad-mix-banner .ad-share i { background: #d98b0b; }
.ad-mix-other .ad-share i { background: #7a57d1; }
.ad-mix-rewarded { border-top-color: #16a05d; }
.ad-mix-interstitial { border-top-color: #2f7df6; }
.ad-mix-banner { border-top-color: #d98b0b; }
.ad-mix-other { border-top-color: #7a57d1; }

.ad-mix-item dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.ad-mix-item dl > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ad-mix-item dt,
.ad-mix-item dd {
    margin: 0;
    font-size: 12px;
}

.ad-mix-item dt {
    color: var(--muted);
}

.ad-mix-item dd {
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.todo-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.todo-column {
    min-width: 0;
    border-right: 1px solid var(--line);
}

.todo-column:last-child {
    border-right: 0;
}

.todo-column-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    background: #fafbfc;
}

.todo-column-title strong {
    font-size: 14px;
}

.todo-column-title span {
    display: inline-grid;
    place-items: center;
    min-width: 25px;
    height: 23px;
    padding: 0 6px;
    border-radius: 5px;
    color: #a13b35;
    background: #fff0ee;
    font-size: 12px;
    font-weight: 750;
}

.todo-column > a {
    display: grid;
    gap: 4px;
    min-height: 59px;
    padding: 11px 16px;
    border-bottom: 1px solid #edf0f5;
    color: var(--text);
}

.todo-column > a:hover {
    background: #fafcff;
}

.todo-column > a strong,
.todo-column > a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todo-column > a strong {
    font-size: 13px;
}

.todo-column > a span {
    color: var(--muted);
    font-size: 11px;
}

.todo-empty {
    padding: 22px 16px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.risk-value,
.subject-risk-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 25px;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.risk-good,
.subject-risk-normal {
    color: #137343;
    background: #e9f8ef;
}

.risk-warn {
    color: #9c6500;
    background: #fff3d8;
}

.risk-bad,
.subject-risk-open {
    color: #b43831;
    background: #fff0ee;
}

.subject-risk-panel table {
    min-width: 1040px;
}

.month-ranking-panel table {
    min-width: 820px;
}

@media (max-width: 1500px) {
    .dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
    .dashboard-analysis-grid { grid-template-columns: 1fr; }
    .ad-mix-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ad-mix-item:nth-child(2) { border-right: 0; }
    .ad-mix-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .todo-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .todo-column:nth-child(2) { border-right: 0; }
    .todo-column:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 880px) {
    .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .movement-grid { grid-template-columns: 1fr; }
    .dashboard-original-toolbar { align-items: flex-start; flex-direction: column; }
    .dashboard-original-toolbar form,
    .dashboard-original-toolbar .btn { width: 100%; }
    .dashboard-sync-control,
    .dashboard-sync-control .inline-form { width: 100%; }
}

@media (max-width: 620px) {
    .dashboard-kpi-grid,
    .ad-mix-grid,
    .todo-columns { grid-template-columns: 1fr; }
    .dashboard-kpi { min-height: 118px; }
    .dashboard-kpi > strong { font-size: 25px; }
    .ad-mix-item,
    .ad-mix-item:nth-child(2),
    .todo-column,
    .todo-column:nth-child(2) { border-right: 0; }
    .ad-mix-item:not(:last-child),
    .todo-column:not(:last-child) { border-bottom: 1px solid var(--line); }
    .movement-list > a { align-items: flex-start; }
    .movement-list em { max-width: 45%; }
}

/* Keep the six home-page metrics readable after the sidebar consumes horizontal space. */
.dashboard-original-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-original-metrics .metric strong {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1760px) {
    .dashboard-original-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .dashboard-original-metrics .metric {
        min-height: 124px;
        gap: 10px;
        padding: 15px;
    }

    .dashboard-original-metrics .metric-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .dashboard-original-metrics .metric strong { font-size: 22px; }
    .dashboard-original-metrics .metric span:not(.metric-icon) { font-size: 13px; }
}

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

@media (max-width: 520px) {
    .dashboard-original-metrics { grid-template-columns: 1fr; }
}

select, textarea { font: inherit; color: var(--text); border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; outline: none; }
select { height: 42px; padding: 0 34px 0 11px; }
textarea { padding: 11px 13px; resize: vertical; }
select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,125,246,.1); }
.filter-panel { padding: 18px; overflow: visible; }
.asset-filters { display: grid; grid-template-columns: minmax(220px,1.6fr) repeat(5,minmax(115px,.75fr)) minmax(170px,1fr) minmax(90px,.5fr) auto; align-items: end; gap: 12px; }
.asset-filters label { display: grid; gap: 6px; color: #66748a; font-size: 13px; }
.asset-filters input { height: 42px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; }
.filter-actions { display: flex; gap: 8px; }
.asset-toolbar > div:first-child { display: grid; gap: 2px; }
.asset-toolbar > div:first-child span { color: var(--muted); font-size: 13px; }
.batch-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.asset-table { min-width: 1750px; }
.asset-table th:first-child,.asset-table td:first-child { width: 42px; text-align: center; }
.asset-name { font-size: 16px; }
.subject-link { color: #235da9; font-weight: 600; }
.revenue-yesterday,.finance-buy-cost,.finance-ad-fund,.revenue-month { min-width: 125px; font-size: 17px; white-space: nowrap; }
.finance-buy-cost { color: #c45a12; }
.finance-ad-fund { color: #118a4c; }
.revenue-month { color: #216bd9; }
.finance-missing { color: var(--muted); font-size: 14px; font-weight: 500; }
.account-actions-heading { width: 248px; min-width: 248px; text-align: center; }
.account-actions-cell { width: 248px; min-width: 248px; padding-right: 10px; padding-left: 10px; text-align: left; white-space: normal; }
.account-actions-cell > .account-action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin: 0; }
.account-action-grid > .account-action { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 32px; margin: 0; padding: 5px 8px; border: 1px solid #d7e2ef; border-radius: 5px; color: #276bc8; background: #f7faff; font-size: 13px; line-height: 1.25; text-align: center; white-space: nowrap; }
.account-action-grid > .account-action:hover { border-color: #a9c7ee; background: #edf5ff; }
.account-action-grid > .account-action-danger { color: #bd332d; border-color: #f0d0cd; background: #fff7f6; }
.account-action-grid > .account-action-success { color: #118a4c; border-color: #c8e6d4; background: #f3fbf6; }
.account-action-spacer { min-height: 32px; }
.status-unknown { color:#7c8798; background:#eef1f5; }
.status-enabled { color:#118a4c; background:#e6f8ee; }
.status-disabled,.status-cert-expired,.status-cert-not_certified { color:#c8332d; background:#fff0ee; }
.status-cert-valid { color:#118a4c; background:#e6f8ee; }
.status-cert-unknown { color:#7c8798; background:#eef1f5; }
.credential-valid { color:#118a4c; }
.credential-invalid { color:#c8332d; font-weight:700; }
.credential-unknown { color:#7c8798; }
.lifecycle { display:inline-flex; padding:4px 9px; border-radius:5px; font-size:13px; background:#edf2f8; color:#526177; }
.lifecycle-running { color:#167744; background:#e7f7ed; }
.lifecycle-developing,.lifecycle-review { color:#2869c7; background:#e8f1ff; }
.lifecycle-paused { color:#a66300; background:#fff3d9; }
.lifecycle-offline,.lifecycle-archived { color:#697586; background:#eceff3; }
.tag-list { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.tag-chip { padding:2px 7px; border-radius:4px; color:#2f6fc9; background:#eaf2ff; font-size:12px; }
.health-score { display:inline-grid; place-items:center; width:42px; height:42px; border-radius:50%; font-weight:800; }
.health-good { color:#118a4c; background:#e5f8ed; }
.health-warn { color:#b06a00; background:#fff1d2; }
.health-bad { color:#c8322c; background:#ffe7e5; }
.health-neutral { color:#7c8798; background:#eef1f5; }
.pagination { display:flex; justify-content:center; gap:6px; margin:20px 0; }
.pagination a { display:grid; place-items:center; min-width:38px; height:38px; padding:0 10px; border:1px solid var(--line); border-radius:6px; color:#536177; background:#fff; }
.pagination a.active { color:#fff; border-color:var(--primary); background:var(--primary); }
.tag-selector { padding:15px; border:1px solid var(--line); border-radius:7px; }
.tag-selector legend { padding:0 8px; font-weight:700; }
.tag-selector > label { display:inline-flex; align-items:center; margin:5px 10px 5px 0; }
.tag-selector > label span { padding:4px 9px; border-left:4px solid var(--tag-color); border-radius:4px; background:#f4f6f9; }
.form-grid select { width:100%; }
.detail-metrics { grid-template-columns:repeat(4,minmax(180px,1fr))!important; }
.health-detail { display:flex; align-items:center; gap:14px; padding:15px 18px; }
.health-detail > div { display:flex; flex-wrap:wrap; gap:7px; }
.health-reason { padding:4px 8px; border-radius:5px; color:#a55200; background:#fff0d7; font-size:13px; }
.health-reason.good { color:#118a4c; background:#e5f8ed; }
.health-reason.neutral { color:#64748b; background:#eef1f5; }
.ops-summary-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:18px; }
.ops-summary { padding:19px 20px; border:1px solid var(--line); border-radius:8px; background:#fff; box-shadow:0 4px 12px rgba(31,42,61,.035); }
.ops-summary span,.ops-summary small { display:block; color:var(--muted); }
.ops-summary strong { display:block; margin:5px 0; font-size:28px; }
.segmented { display:flex; border:1px solid #d5dfec; border-radius:6px; overflow:hidden; }
.segmented a { padding:6px 11px; border-right:1px solid #d5dfec; color:#66748a; font-size:13px; background:#fff; }
.segmented a:last-child { border-right:0; }
.segmented a.active { color:#246dd8; background:#eaf2ff; }
.ops-two-column { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.compact-list { max-height:470px; overflow:auto; }
.compact-list > a { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:13px 18px; border-bottom:1px solid var(--line); color:var(--text); }
.compact-list > a:last-child { border-bottom:0; }
.compact-list > a:hover { background:#fafcff; }
.compact-list div { display:grid; gap:3px; }
.compact-list span { color:var(--muted); font-size:13px; }
.compact-list em { font-style:normal; color:#8a96a8; font-size:13px; text-align:right; }
.success-text { color:#149454!important; }
.warning-text { color:#c77a00!important; }
.subject-grid { display:grid; grid-template-columns:repeat(3,minmax(300px,1fr)); gap:16px; margin-bottom:18px; }
.subject-card { display:block; padding:20px; border:1px solid var(--line); border-radius:9px; color:var(--text); background:#fff; box-shadow:0 4px 12px rgba(31,42,61,.035); transition:.18s ease; }
.subject-card:hover { transform:translateY(-2px); box-shadow:0 9px 24px rgba(31,42,61,.08); }
.subject-title { display:flex; align-items:center; gap:12px; }
.subject-title > span { display:grid; place-items:center; width:45px; height:45px; border-radius:9px; color:#2672df; background:#e7f1ff; font-weight:800; }
.subject-title h2 { margin:0; font-size:17px; }
.subject-title p { margin:2px 0 0; color:var(--muted); font-size:12px; }
.subject-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:18px 0; }
.subject-metrics div { display:grid; gap:2px; text-align:center; }
.subject-metrics strong { font-size:17px; }
.subject-metrics span { color:var(--muted); font-size:12px; }
.subject-risk { display:flex; gap:7px; flex-wrap:wrap; }
.subject-risk span { padding:3px 7px; border-radius:4px; color:#976300; background:#fff3d9; font-size:12px; }
.tag-management { display:flex; flex-wrap:wrap; gap:10px; padding:20px; }
.tag-management > span { display:flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid var(--line); border-radius:6px; }
.tag-management i { width:9px; height:9px; border-radius:3px; background:var(--tag-color); }
.tag-management small { color:var(--muted); }
.alert-metrics { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)) auto; gap:12px; margin-bottom:18px; }
.alert-metrics > a { padding:16px 18px; border:1px solid var(--line); border-radius:8px; color:var(--text); background:#fff; }
.alert-metrics strong,.alert-metrics span { display:block; }
.alert-metrics strong { font-size:25px; }
.alert-metrics span { color:var(--muted); font-size:13px; }
.alert-metrics form { display:flex; align-items:center; }
.severity { display:inline-flex; padding:5px 9px; border-radius:5px; font-size:13px; }
.severity-critical { color:#bc2f29; background:#ffe6e4; }
.severity-warning { color:#a96800; background:#fff0cf; }
.severity-info { color:#276bc8; background:#e7f1ff; }
.followup-form { display:grid; grid-template-columns:minmax(0,1fr) 100px 190px; gap:9px; padding:16px; border-bottom:1px solid var(--line); }
.followup-form input { height:42px; padding:0 11px; border:1px solid #cbd5e1; border-radius:6px; font:inherit; }
.followup-form textarea { grid-column:1/3; }
.followup-list { max-height:520px; overflow:auto; }
.followup-item { position:relative; padding:15px 18px; border-bottom:1px solid var(--line); }
.followup-item > div { display:flex; align-items:center; gap:8px; }
.followup-item p { margin:7px 0; color:#59677b; }
.followup-item small { color:var(--muted); }
.followup-item form { position:absolute; right:18px; bottom:15px; }
.followup-completed { opacity:.58; }
.priority { padding:2px 6px; border-radius:4px; font-size:11px; background:#eef1f5; }
.priority-high,.priority-urgent { color:#ba302a; background:#ffe7e5; }
@media(max-width:1350px){.asset-filters{grid-template-columns:repeat(5,minmax(130px,1fr))}.search-field{grid-column:span 2}.subject-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.asset-filters{grid-template-columns:1fr 1fr}.search-field{grid-column:1/-1}.filter-actions{grid-column:1/-1}.ops-summary-grid{grid-template-columns:1fr 1fr}.ops-two-column{grid-template-columns:1fr}.subject-grid{grid-template-columns:1fr}.alert-metrics{grid-template-columns:1fr 1fr}.detail-metrics{grid-template-columns:1fr 1fr!important}.followup-form{grid-template-columns:1fr}.followup-form textarea{grid-column:auto}}
@media(max-width:560px){.asset-filters,.ops-summary-grid,.alert-metrics,.detail-metrics{grid-template-columns:1fr!important}.batch-controls{width:100%}.batch-controls>*{flex:1}.subject-metrics{grid-template-columns:1fr 1fr}}

.alert {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 70vh;
    overflow: auto;
}


/* Operations workbench improvements */
.dashboard-workbench{margin-bottom:18px}.todo-columns{min-height:180px}.todo-column-title span{font-variant-numeric:tabular-nums}.ops-toolbar{padding:14px 0;align-items:center}.ops-toolbar strong{font-size:15px}.ops-toolbar p{margin:4px 0 0;color:var(--muted)}.task-status{color:#20ad67;text-decoration:none}.task-status:hover{color:#1677ff}.data-status-filter{min-width:150px}.alert-action-bar{display:flex;gap:8px;align-items:center}
@media(max-width:900px){.ops-toolbar{align-items:flex-start;flex-direction:column}.ops-toolbar .inline-form{width:100%}.ops-toolbar .btn{width:100%}}

@media(max-width:1350px){.data-status-filter{grid-column:span 2}}

.retry-form{display:inline-flex;margin:6px 0 0}.retry-form .link-button{font-size:12px}

.user-edit-form{display:contents}.check-inline{display:inline-flex;align-items:center;gap:6px;font-weight:400}.check-inline input{width:auto}.user-edit-form input,.user-edit-form select,.rules-form input{height:36px;padding:0 8px;border:1px solid #cbd5e1;border-radius:6px}

.tag-management>span{position:relative}.tag-delete-form{display:inline;margin:0}.tag-delete-form .link-button{font-size:12px;color:var(--danger)}

.task-status-busy{color:#b26b00}.task-status-busy .pulse-dot{background:#f1a51d;box-shadow:0 0 0 4px rgba(241,165,29,.15)}

.dashboard-freshness{margin-left:10px;color:var(--muted)}.dashboard-freshness.is-stale{color:#b43831;font-weight:650}.error-cell details{max-width:420px}.error-cell summary{cursor:pointer;color:var(--primary);white-space:nowrap}.error-cell details div{white-space:pre-wrap;max-height:180px;overflow:auto;margin-top:6px}

.sync-health-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.sync-health-grid .ops-summary strong{font-size:16px;overflow-wrap:anywhere}.sync-center-bootstrap{display:none}.sync-center-progress{display:block;margin:0 0 18px;max-width:none;background:#fff;border:1px solid var(--line);border-radius:9px;padding:14px 16px}@media(max-width:900px){.sync-health-grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.sync-health-grid{grid-template-columns:1fr}}
