/* Shared metric tokens and icon treatment are also used by the order page. */
.tone-blue { --metric-color:#2878ff; --metric-soft:#c8e2ff; }
.tone-green { --metric-color:#0bb47d; --metric-soft:#b8f2de; }
.tone-purple { --metric-color:#8657f5; --metric-soft:#ddd0ff; }
.tone-orange { --metric-color:#f68029; --metric-soft:#ffe0be; }
.tone-cyan { --metric-color:#278cff; --metric-soft:#c0e5ff; }
.tone-pink { --metric-color:#f34b85; --metric-soft:#ffd1e1; }
.metric-icon, .resource-icon { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; background:radial-gradient(circle at 35% 30%,#f8fcff,var(--metric-soft)); color:var(--metric-color); border:1px solid rgb(255 255 255 / 85%); box-shadow:0 3px 14px color-mix(in srgb,var(--metric-color) 13%,transparent); }
.metric-icon { width:42px; height:42px; border-radius:50%; font-size:25px; }
.panel-title > span:first-child { display:inline-flex; align-items:center; gap:8px; }
.panel-title .el-icon { color:#397ffa; font-size:18px; }

/* All layout changes below are confined to the overview route. */
.admin-theme .main.dashboard-main { height:calc(100dvh - 54px); display:flex; flex-direction:column; overflow:hidden; }
.dashboard-page { --overview-gap:12px; --primary-height:106px; --revenue-height:86px; --resource-height:92px; width:100%; max-width:1920px; flex:1; min-height:0; margin:0 auto; display:flex; flex-direction:column; gap:var(--overview-gap); overflow:hidden; }
.dashboard-page .tone-blue { --metric-color:#3288ff; }
.dashboard-page .tone-green { --metric-color:#16c79a; }
.dashboard-page .tone-purple { --metric-color:#9461ff; }
.admin-theme .dashboard-page .dashboard-heading { min-height:40px; flex-shrink:0; margin:0; align-items:center; gap:12px; }
.admin-theme .dashboard-page .dashboard-heading h2 { display:flex; align-items:center; gap:10px; margin:0; color:#172b4d; font-size:20px; font-weight:600; line-height:1.4; letter-spacing:0; }
.dashboard-heading h2 > .el-icon { color:#3288ff; font-size:28px; }
.dashboard-tools { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.dashboard-date, .dashboard-page .dashboard-refresh { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:34px; border:1px solid rgb(255 255 255 / 86%); border-radius:9px; background:rgb(255 255 255 / 78%); color:#294772; font-size:12px; box-shadow:0 2px 9px rgb(75 105 158 / 4%); }
.dashboard-date { padding:0 12px; }
.dashboard-date .el-icon { font-size:16px; }
.dashboard-date > span { color:#647da1; border-left:1px solid var(--admin-line); padding-left:8px; }
.dashboard-page .dashboard-refresh { padding:0 14px; }
.dashboard-refresh > span { gap:6px; }
.dashboard-page .dashboard-refresh:hover { background:#fff; border-color:#a9cbff; }
.dashboard-page .dashboard-status { flex-shrink:0; gap:6px 12px; margin:0; font-size:12px; max-height:64px; overflow:auto; }
.dashboard-status > span { display:inline-flex; align-items:center; gap:6px; }
.dashboard-status .el-alert { margin:0; border-radius:8px; }
.loading-dot { width:6px; height:6px; border-radius:50%; background:#438af1; }
.dashboard-summary:focus-visible { outline:2px solid #a7caff; outline-offset:2px; border-radius:16px; }
.dashboard-summary { display:flex; flex-direction:column; flex-shrink:0; gap:var(--overview-gap); min-width:0; }
.dashboard-page .stat-cards { margin:0; gap:var(--overview-gap); }
.dashboard-page :is(.business-stats,.revenue-stats) { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); }
.dashboard-page .stat-card, .dashboard-page .panel { min-width:0; border:1px solid rgb(255 255 255 / 86%); border-radius:16px; background:linear-gradient(135deg,rgb(255 255 255 / 87%),rgb(249 252 255 / 76%)); box-shadow:0 6px 24px rgb(42 91 158 / 6%); }
.dashboard-page .stat-card { backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); }
.dashboard-page .kpi-card { display:flex; align-items:center; gap:12px; height:var(--primary-height); min-height:0; padding:16px; overflow:hidden; transition:transform 200ms,box-shadow 200ms,border-color 200ms; }
.dashboard-page .kpi-card:hover { transform:translateY(-2px); border-color:#c9dfff; box-shadow:0 9px 26px rgb(43 82 143 / 11%); }
.dashboard-page .metric-icon { width:46px; height:46px; font-size:27px; }
.dashboard-page .metric-content, .dashboard-page .resource-content { min-width:0; flex:1; }
.dashboard-page .label { font-size:13px; font-weight:500; color:#30496e; line-height:18px; }
.dashboard-page .value { margin-top:4px; color:#152d52; font-size:30px; font-weight:650; line-height:1.2; font-variant-numeric:tabular-nums; white-space:nowrap; }
.dashboard-page .metric-unit { margin-left:6px; font-size:12px; font-weight:400; color:#617697; }
.dashboard-page .hotel-sparkline { margin:0; color:var(--metric-color,#3288ff); min-height:0; }
.dashboard-page .hotel-sparkline svg { display:block; width:100%; height:100%; overflow:visible; }
.dashboard-page .dashboard-sparkline { flex:0 0 30%; max-width:140px; height:48px; }
.dashboard-page .revenue-card { height:var(--revenue-height); }
.dashboard-page .revenue-card .metric-icon { width:42px; height:42px; font-size:25px; }
.dashboard-page .revenue-card .value { font-size:clamp(18px,calc(360px / var(--value-length,1)),30px); }
.dashboard-page .resource-cards { grid-template-columns:repeat(var(--resource-columns,5),minmax(0,1fr)); }
.dashboard-page .resource-cards.full-resources { grid-template-columns:1.2fr 1.35fr .85fr .9fr .9fr; }
.dashboard-page .resource-card { height:var(--resource-height); display:flex; align-items:center; gap:10px; padding:12px 14px; overflow:hidden; }
.dashboard-page .resource-icon { width:36px; height:36px; border-radius:12px; font-size:23px; }
.dashboard-page .resource-card .label { font-size:12px; line-height:16px; }
.dashboard-page .resource-card .value { font-size:27px; margin-top:3px; }
.dashboard-page .extra { margin-top:4px; color:#617697; font-size:12px; line-height:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dashboard-page .package-title { display:block; position:relative; width:100%; margin-top:4px; padding:0 14px 0 0; border:0; background:transparent; color:#18375f; font:inherit; font-size:15px; font-weight:600; line-height:20px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:left; }
.dashboard-page button.package-title { cursor:pointer; }
.dashboard-page button.package-title:hover { color:#2878f0; }
.dashboard-page .package-title .el-icon { position:absolute; right:0; top:3px; color:#6382b4; }
.dashboard-page .operations-grid { flex:1; min-height:0; display:grid; grid-template-columns:1.06fr .94fr; gap:var(--overview-gap); overflow:hidden; }
.dashboard-page .operations-grid.single-column { grid-template-columns:minmax(0,1fr); }
.dashboard-page .operations-grid:empty, .dashboard-summary:empty { display:none; }
.dashboard-page .overview-left { min-height:0; min-width:0; display:flex; flex-direction:column; gap:var(--overview-gap); }
.dashboard-page .panel { padding:14px 16px; margin:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.dashboard-page .activity-panel { flex:0 0 clamp(104px,13vh,130px); }
.dashboard-page .ranking-panel { flex:1; }
.dashboard-page .panel-title { flex-shrink:0; color:#172e55; font-size:15px; line-height:24px; margin:0 0 8px; }
.dashboard-page .period-label { padding:1px 9px; border:1px solid #dce7f8; border-radius:8px; font-size:11px; line-height:20px; font-weight:400; color:#5c7397; background:rgb(255 255 255 / 64%); }
.dashboard-page .behavior-overview { flex:1; min-height:0; display:flex; align-items:center; gap:16px; }
.dashboard-page .behavior-summary { width:100px; flex-shrink:0; min-width:0; color:#617697; font-size:12px; }
.dashboard-page .behavior-summary strong { color:#152d52; font-size:29px; line-height:1.2; font-weight:650; font-variant-numeric:tabular-nums; }
.dashboard-page .behavior-summary > span { margin-left:5px; }
.dashboard-page .behavior-breakdown { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:5px; font-size:12px; }
.dashboard-page .behavior-chart { flex:1; min-width:0; min-height:0; height:100%; position:relative; display:flex; flex-direction:column; --metric-color:#3288ff; }
.dashboard-page .behavior-chart .hotel-sparkline { flex:1; min-height:16px; }
.dashboard-page .behavior-trend-empty { position:absolute; left:0; right:0; top:20%; text-align:center; pointer-events:none; font-size:12px; color:#8c9fba; }
.dashboard-page .behavior-axis { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:0; color:#7184a3; font-size:11px; line-height:16px; text-align:center; }
.dashboard-page .dashboard-table-wrap { flex:1; min-height:0; min-width:0; overflow:hidden; }
.dashboard-page .el-table { --el-table-border-color:#e6edf8; --el-table-header-bg-color:#edf4ff; --el-table-bg-color:transparent; --el-table-tr-bg-color:transparent; --el-table-row-hover-bg-color:rgb(223 236 255 / 46%); --el-table-text-color:#304b76; --el-table-header-text-color:#526d95; --el-fill-color-blank:transparent; font-size:12px; }
.dashboard-page .el-table th.el-table__cell { font-weight:500; height:32px; padding:0; }
.dashboard-page .el-table td.el-table__cell { height:36px; padding:1px 0; }
.dashboard-page .el-table .cell { padding:0 8px; line-height:18px; white-space:nowrap; }
.dashboard-page .el-table__header-wrapper { border-radius:8px; }
.dashboard-page .el-table__empty-text { color:#8295b2; font-size:12px; line-height:20px; }
.dashboard-page .ranking-poster { display:block; width:24px; height:34px; border-radius:4px; }
.dashboard-page .poster-placeholder { display:flex; align-items:center; justify-content:center; width:100%; height:100%; color:#7c9dc8; background:#e0ebfa; }
.dashboard-page .rank-badge { display:inline-flex; width:22px; height:24px; justify-content:center; align-items:center; border-radius:7px; color:#697c98; font-size:12px; font-weight:600; }
.dashboard-page .rank-1 { background:linear-gradient(135deg,#fff4ba,#f9d568); color:#9d6511; }
.dashboard-page .rank-2 { background:linear-gradient(135deg,#f2f6fd,#c6d3e8); color:#5c6f91; }
.dashboard-page .rank-3 { background:linear-gradient(135deg,#ffe2c8,#efb38e); color:#945426; }
.dashboard-page .play-cell { display:flex; align-items:center; gap:10px; font-variant-numeric:tabular-nums; }
.dashboard-page .play-cell > span { min-width:16px; margin-left:auto; text-align:right; }
.dashboard-page .play-track { flex:1; min-width:28px; height:6px; border-radius:5px; background:#e1e8f4; overflow:hidden; }
.dashboard-page .play-track > span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#3288ff,#75b4ff); }
.dashboard-page .dashboard-link { display:inline-flex; align-items:center; gap:4px; padding:0; border:0; background:transparent; color:#347cff; font:inherit; font-size:12px; cursor:pointer; }
.dashboard-page .dashboard-link:hover { color:#1755bf; }
.dashboard-page .dashboard-link:focus-visible, .dashboard-page .package-title:focus-visible { outline:2px solid #347cff; outline-offset:3px; border-radius:4px; }
.dashboard-page .supplier-cell { display:inline-flex; align-items:center; gap:6px; }
.dashboard-page .supplier-symbol { display:inline-flex; width:22px; height:22px; align-items:center; justify-content:center; flex-shrink:0; border-radius:6px; color:#2786f7; background:#e5f0ff; font-size:17px; }
.dashboard-page .sync-status { display:inline-flex; align-items:center; gap:5px; padding:2px 6px; border-radius:6px; font-size:11px; white-space:nowrap; color:#677d9e; background:#e8edf6; }
.dashboard-page .sync-status i { width:5px; height:5px; border-radius:50%; background:currentColor; }
.dashboard-page .sync-status.is-success { background:#e0f7ee; color:#14946b; }
.dashboard-page .sync-status.is-running { background:#e1efff; color:#2779e4; }
.dashboard-page .sync-status.is-failed { background:#ffeaef; color:#d94d70; }
.dashboard-page .sync-time { font-size:11px; font-variant-numeric:tabular-nums; color:#7186a7; white-space:nowrap; }
.dashboard-page .sync-empty { display:flex; flex-direction:column; align-items:center; gap:12px; padding:16px; }
.dashboard-page .sync-empty .el-icon { font-size:56px; color:#adccff; filter:drop-shadow(0 5px 10px rgb(80 138 230 / 8%)); }
@media (max-width:1450px), (max-height:800px) {
  .dashboard-page { --overview-gap:8px; --primary-height:100px; --revenue-height:80px; --resource-height:82px; }
  .dashboard-page .kpi-card { padding:12px; gap:10px; }
  .dashboard-page .metric-icon { width:36px; height:36px; font-size:23px; }
  .dashboard-page .dashboard-sparkline { flex-basis:27%; height:40px; }
  .dashboard-page .resource-card { padding:10px; gap:8px; }
  .dashboard-page .resource-icon { width:28px; height:28px; font-size:20px; border-radius:9px; }
  .dashboard-page .resource-card .value { font-size:25px; }
  .dashboard-page .resource-card .extra { font-size:11px; line-height:15px; margin-top:2px; }
  .dashboard-page .panel { padding:10px 12px; }
  .dashboard-page .panel-title { margin-bottom:6px; }
  .dashboard-page .activity-panel { flex-basis:100px; }
}
@media (max-height:700px) {
  .admin-theme .main.dashboard-main { padding:16px; }
  .dashboard-page { --primary-height:82px; --revenue-height:70px; --resource-height:72px; }
  .admin-theme .dashboard-page .dashboard-heading { min-height:34px; }
  .dashboard-page .kpi-card { padding:10px; }
  .dashboard-page .value { font-size:27px; }
  .dashboard-page .resource-card .value { font-size:23px; }
  .dashboard-page .activity-panel { flex-basis:84px; }
  .dashboard-page .panel { padding:8px 10px; }
  .dashboard-page .panel-title { font-size:14px; line-height:22px; margin-bottom:4px; }
  .dashboard-page .behavior-summary strong { font-size:25px; }
  .dashboard-page .behavior-trend-empty { font-size:11px; top:10%; }
  .dashboard-page .behavior-axis { font-size:10px; line-height:14px; }
}
@media (max-width:1000px), (max-height:560px) {
  .dashboard-page { --primary-height:90px; --revenue-height:72px; --resource-height:78px; }
  .dashboard-page .primary-stats .kpi-card { padding:8px; display:grid; grid-template-columns:minmax(0,1fr) 24px; align-content:center; gap:2px; position:relative; }
  .dashboard-page .primary-stats .metric-icon { grid-column:2; grid-row:1; align-self:start; width:24px; height:24px; font-size:17px; }
  .dashboard-page .primary-stats .metric-content { grid-column:1 / -1; grid-row:1; padding-top:0; }
  .dashboard-page .primary-stats .label { padding-right:24px; font-size:12px; line-height:16px; }
  .dashboard-page .primary-stats .value { font-size:27px; line-height:1.1; margin-top:3px; }
  .dashboard-page .primary-stats .dashboard-sparkline { height:18px; max-width:none; width:100%; grid-column:1 / -1; }
  .dashboard-page .resource-cards.full-resources { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .dashboard-page .resource-card { padding:10px; }
  .dashboard-page .resource-card .extra { font-size:11px; }
  .dashboard-page .behavior-summary { width:72px; }
}
@media (max-width:560px) {
  .dashboard-page { --activity-height:82px; }
  .admin-theme .dashboard-page .dashboard-heading { gap:8px; }
  .dashboard-page .dashboard-tools { width:100%; justify-content:flex-end; }
  .dashboard-page .dashboard-heading h2 { font-size:20px; }
  .dashboard-page .kpi-card { padding:8px; gap:4px; }
  .dashboard-page .label { font-size:12px; line-height:16px; }
  .dashboard-page .primary-stats .value { font-size:24px; }
  .dashboard-page .metric-unit { margin-left:3px; font-size:11px; }
  .dashboard-page .primary-stats .metric-icon { width:20px; height:20px; font-size:15px; }
  .dashboard-page .primary-stats .label { padding-right:18px; }
  .dashboard-page .revenue-card .value { font-size:clamp(16px,calc(180px / var(--value-length,1)),25px); }
  .dashboard-page .resource-card { padding:8px; }
  .dashboard-page .resource-card .value { font-size:24px; }
  .dashboard-page .extra { font-size:11px; }
  .dashboard-page .package-title { font-size:13px; }
  .dashboard-page .operations-grid { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,calc((100% + var(--activity-height)) / 2)) minmax(0,1fr); }
  .dashboard-page .operations-grid.single-column { grid-template-rows:minmax(0,1fr); }
  .dashboard-page .activity-panel { flex-basis:var(--activity-height); }
  .dashboard-page .panel { padding:8px; }
  .dashboard-page .panel-title { font-size:13px; line-height:22px; margin-bottom:4px; }
  .dashboard-page .behavior-summary { width:64px; }
  .dashboard-page .behavior-summary strong { font-size:25px; }
  .dashboard-page .behavior-axis { font-size:10px; line-height:14px; }
  .dashboard-page .behavior-axis time:nth-child(even) { visibility:hidden; }
  .dashboard-page .sync-empty { padding:8px; gap:4px; }
  .dashboard-page .sync-empty .el-icon { font-size:48px; }
}
/* One statistics strip reserves room for both lists in narrow or short windows. */
@media (max-width:560px), (max-width:1000px) and (max-height:740px), (max-height:560px) {
  .dashboard-page { --primary-height:90px; --revenue-height:90px; --resource-height:90px; }
  .dashboard-page .dashboard-summary { flex-direction:row; overflow:auto; padding:2px 0; }
  .dashboard-page .dashboard-summary > .stat-cards { flex:0 0 auto; grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:180px; }
  .dashboard-page .revenue-card .metric-icon, .dashboard-page .resource-icon { display:none; }
  .dashboard-page .revenue-card .value.is-long-value { font-size:18px; line-height:1.15; white-space:normal; overflow-wrap:anywhere; }
}
@media (prefers-reduced-motion:reduce) {
  .dashboard-page .kpi-card { transition:none; }
  .dashboard-page .kpi-card:hover { transform:none; }
}
