

:root {
  color-scheme: dark;
  --base: #0b1018;
  --rail: #101620;
  --surface: #141c28;
  --raised: #1a2433;
  --border: #2a394c;
  --ink: #f0f4fb;
  --muted: #a0aec1;
  --accent: #7af0bf;
  --accent-ink: #0e2b24;
  --danger: #ff9c9e;
  font: 14px/1.58 "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--base);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
h1, h2, h3, p { margin: 0 0 12px; }
h1 { font-size: clamp(28px, 4vw, 43px); line-height: 1.17; letter-spacing: -.05em; }
h2 { font-size: 17px; line-height: 1.4; }
h3 { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 13px; min-height: 37px;
  border: 1px solid transparent; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-align: center; text-decoration: none;
}
button:hover, .button:hover { filter: brightness(1.13); }
button:disabled { opacity: .55; cursor: wait; }
button.soft, .button.soft { border-color: var(--border); background: var(--raised); color: var(--ink); }
button.danger { border-color: #663b48; color: var(--danger); background: #321f2c; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
small, .muted { color: var(--muted); }

.layout { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100dvh; }
.rail {
  position: sticky; top: 0; height: 100dvh; overflow: auto; overscroll-behavior: contain;
  padding: 21px 13px; border-right: 1px solid var(--border);
  background: var(--rail);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 7px 21px; font: 800 17px/1.05 system-ui, sans-serif; letter-spacing: .12em; }
.brand small { font-size: 10px; letter-spacing: .12em; line-height: 1.6; }
.mark {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px;
  border-radius: 9px; color: #102620; background: var(--accent);
  font: 850 22px/1 system-ui, sans-serif; letter-spacing: -.09em;
}
.rail nav p { color: #a3b2c5; font-size: 11px; letter-spacing: .11em; margin: 16px 8px 5px; }
.rail nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border: 1px solid transparent; border-radius: 7px;
  color: #d7e0ee; text-decoration: none; font-size: 13px;
}
.rail nav a:hover { background: #1c2735; }
.rail nav a[aria-current="page"] { border-color: #38644f; background: #1d342e; color: var(--accent); font-weight: 750; }
.navicon { display: inline-flex; justify-content: center; width: 20px; color: #aab9cc; }
.outbound { margin-left: auto; color: #aab9cc; }
#nav-toggle { display: none; }
.main { width: 100%; min-width: 0; max-width: 1536px; margin: 0 auto; padding: 0 clamp(16px, 3.3vw, 53px) 40px; }
.top {
  min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--border); margin-bottom: 24px; padding: 10px 0;
}
.breadcrumb { color: var(--muted); font-size: 12px; }
.breadcrumb span { margin: 0 5px; }
.breadcrumb b { color: var(--ink); }
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 15px;
  padding: clamp(23px, 3.8vw, 44px); margin-bottom: 17px;
  border: 1px solid #395067; border-radius: 15px;
  background: radial-gradient(ellipse at 92% 0%, #1a4940 0%, transparent 56%), #182436;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 35px, #43576b45 35px 36px),
    repeating-linear-gradient(0deg, transparent 0 35px, #43576b45 35px 36px);
  mask-image: linear-gradient(90deg, transparent 16%, black 95%);
}
.hero p { color: #c5d3e2; margin-bottom: 0; }
.hero button { flex: none; }
.intro { margin-bottom: 19px; }
.intro p { color: var(--muted); max-width: 68ch; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 17px; min-width: 0; }
.panel { margin-bottom: 16px; }
.tile strong { display: block; margin: 7px 0 3px; font: 700 clamp(25px, 3vw, 36px)/1.12 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.kpi { display: flex; justify-content: space-between; gap: 5px; align-items: flex-start; }
.kpi > span { color: var(--accent); }
.metric-label { color: #d3dfef; text-decoration: none; font-weight: 650; }
.metric-label:hover { color: var(--accent); text-decoration: underline; }
.metric-foot { margin: 9px 0 0; color: var(--accent); }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(240px, 1fr); gap: 15px; }
.bar, .actions, .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bar { justify-content: space-between; margin-bottom: 13px; }
.bar h2, .bar h3 { margin: 0; }
.filters { margin: 10px 0 14px; }
.filters input, .filters select { max-width: 100%; width: auto; }
.tablebox { overflow: auto; }
table { width: 100%; font-size: 13px; border-collapse: collapse; text-align: left; }
th { color: #b0bdd0; white-space: nowrap; background: #1a2534; }
th, td { padding: 10px 9px; border-bottom: 1px solid var(--border); vertical-align: top; }
td { min-width: 68px; max-width: 290px; overflow-wrap: anywhere; }
td:last-child { white-space: nowrap; }
td button { padding: 3px 8px; min-height: 30px; margin-right: 4px; }
td span, .notes { white-space: pre-wrap; }
.empty { padding: 18px 3px; color: var(--muted); margin: 0; }
.tag {
  display: inline-flex; align-items: center;
  background: #1e3736; color: #a5f3d1; border: 1px solid #355b53;
  border-radius: 20px; padding: 2px 9px; font-size: 12px; font-weight: 650;
}
.demo-tag { color: #f9d792; background: #362b1c; border-color: #755f33; }
.focus-list { margin: 0; padding: 0; list-style: none; }
.focus-list li { display: grid; align-items: center; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; padding: 11px 0; border-top: 1px solid var(--border); }
.focus-list small { display: block; }
.focus-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.work-title { text-decoration: none; color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
.work-title:hover { color: var(--accent); text-decoration: underline; }
.deadline { font-size: 12px; color: var(--accent); }
.deadline.late { color: #ffc089; }
.workstreams > div { padding: 11px 0; border-top: 1px solid var(--border); }
.workstreams small { display: block; }
.progress-caption { margin-top: 3px; }
progress { width: 100%; height: 8px; accent-color: var(--accent); }
.work-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.work-tab { border: 1px solid var(--border); color: var(--ink); border-radius: 7px; padding: 6px 12px; text-decoration: none; }
.work-tab.active { color: var(--accent); background: #1d342e; border-color: #38644f; font-weight: 750; }
.site-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); margin-bottom: 0; }
.site-card { background: #111925; }
.site-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 12px 0 16px; }
.site-url, .notes { display: block; overflow-wrap: anywhere; }
.notes { margin-top: 10px; color: #d7dfe9; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin: 12px 0 18px; }
.month-grid > small { text-align: center; color: var(--muted); }
.month-day {
  display: flex; flex-direction: column; justify-content: flex-start; gap: 2px;
  min-height: 58px; min-width: 0; padding: 5px 1px; background: var(--raised); color: var(--ink); border-color: var(--border);
}
.month-day[aria-current="date"] strong { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.month-day[aria-pressed="true"] { border-color: var(--accent); background: #1d342e; }
.month-day small { color: var(--muted); line-height: 1.25; font-size: 11px; }
.focus-list.month-entries li { grid-template-columns: minmax(0, 1fr); }
.month-edit { max-width: 100%; overflow-wrap: anywhere; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.full { grid-column: 1 / -1; }
.field { display: grid; gap: 4px; color: #dce6f5; font-size: 13px; font-weight: 650; }
.field input, .field select, .field textarea, .filters input, .filters select {
  background: #101824; color: var(--ink); border: 1px solid #405169; border-radius: 8px; padding: 8px 10px; min-width: 0;
}
.field textarea { resize: vertical; min-height: 94px; }
.formerror { color: var(--danger); min-height: 1.3em; margin: 8px 0; }
.access { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 60% 5%, #214238, transparent 54%), var(--base); }
.access article { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 15px; padding: 30px; }
.access .brand { padding: 0 0 18px; }
.access .field { margin-top: 10px; }
.access button { width: 100%; }
.access h1 { font-size: 29px; }
.access p:not(.formerror) { color: var(--muted); }
dialog { background: var(--surface); border: 1px solid #405169; border-radius: 14px; width: min(650px, 94vw); max-height: 88dvh; padding: 22px; color: inherit; }
dialog::backdrop { background: #020712c4; }
#toast { position: fixed; bottom: 20px; right: 20px; max-width: 85vw; background: #244136; border: 1px solid #467563; color: #ecfff6; border-radius: 9px; padding: 11px 16px; z-index: 5; }
#toast:empty { display: none; }
.answer { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 16px; }

.ads-workspace { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(275px, 1fr); gap: 16px; align-items: start; }
.ads-data { min-width: 0; }
.ads-ai { position: sticky; top: 16px; background: linear-gradient(145deg, #1a2b34, var(--surface) 145px); }
.ads-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 10px; }
.ads-heading h2 { margin: 0; }
.ads-connected { color: var(--accent); }
.ads-detail, .ads-sync, .ads-bind, .ads-result { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.ads-detail summary { cursor: pointer; font-weight: 700; }
.ads-detail[open] summary { margin-bottom: 10px; }
.ads-workspace form .field { margin-bottom: 10px; }
.ads-workspace input, .ads-workspace select { max-width: 100%; }
.ads-portal { margin: 8px 0 12px; }
.ads-report { max-height: 350px; margin: 10px 0; }
.ads-report td { white-space: nowrap; }
.ads-report td:nth-child(2) { min-width: 10em; white-space: normal; }
.ads-result .answer { margin-top: 7px; }
.ads-sync-stamp { display: block; margin-top: 5px; }
.ads-prompts { margin-bottom: 9px; }
.ads-prompts button { min-height: 30px; padding: 3px 8px; font-size: 12px; }

.rail .brand { padding: 3px 8px 15px; letter-spacing: .095em; }
.rail nav p { margin: 16px 8px 6px; }
.rail nav a { gap: 9px; min-height: 36px; }
.rail .ops-icon { width: 24px; height: 24px; font-size: 14px; background: #1d2836; }
.rail [aria-current="page"] .ops-icon { color: var(--accent); background: #28463f; }
.ops-icon {
  width: 32px; height: 32px; flex: none; display: inline-grid; place-items: center;
  border-radius: 8px; background: #213739; color: #a8efd9; font: 700 18px/1 system-ui, sans-serif;
}
.ops-intro { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 22px; }
.ops-intro .ops-icon { width: 42px; height: 42px; margin-top: 2px; font-size: 23px; }
.ops-intro h1 { font-size: clamp(26px, 3.3vw, 38px); margin-bottom: 6px; }
.ops-cover {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  padding: clamp(20px, 3vw, 36px); margin-bottom: 16px; border-radius: 16px; border: 1px solid #39585c;
  background: radial-gradient(ellipse at 83% 5%, #265451, transparent 65%), linear-gradient(110deg, #172634, #182d39);
}
.ops-cover::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(#8ce1cd18 1px, transparent 1px), linear-gradient(90deg, #8ce1cd18 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent 35%, black);
}
.ops-cover-context { color: #a5ebd4; margin: 0 0 6px; font-size: 12px; font-weight: 750; letter-spacing: .09em; }
.ops-cover h1 { margin: 0 0 8px; }
.ops-shift { margin: 0; color: #cadbe1; }
.ops-cover-actions { flex: none; }
.ops-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.ops-stat {
  min-width: 0; display: block; color: var(--ink); text-decoration: none;
  padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.ops-stat:hover { border-color: #54807b; background: #172630; }
.ops-stat > div { display: flex; align-items: center; gap: 8px; }
.ops-stat > div small { color: #dbe6f3; font-weight: 700; }
.ops-stat > div > span:last-child { margin-left: auto; color: var(--accent); line-height: 1; }
.ops-stat > strong { display: block; margin: 10px 0 2px; font: 750 30px/1.08 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.ops-stat > .ops-stat-text { font-size: 23px; margin-top: 15px; }
.ops-primary, .ops-secondary { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); gap: 14px; }
.ops-text-link { font-size: 13px; font-weight: 700; text-decoration: none; }
.ops-text-link:hover { text-decoration: underline; }
.ops-segment {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; max-width: 100%;
  background: #101922; border: 1px solid var(--border); border-radius: 9px;
}
.ops-segment button { min-height: 30px; padding: 4px 9px; color: var(--muted); background: transparent; font-size: 12px; }
.ops-segment button[aria-pressed="true"] { color: #cdf7ea; background: #233c3b; border-color: #345650; }
.ops-segment button:hover { color: var(--ink); }
.ops-agenda { margin: 13px 0 0; padding: 0; list-style: none; }
.ops-agenda li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.ops-editor-link {
  display: block; min-height: 0; min-width: 0; padding: 0; border: 0; border-radius: 3px;
  color: var(--ink); background: transparent; text-align: left; overflow-wrap: anywhere;
}
.ops-editor-link:hover strong { text-decoration: underline; text-underline-offset: 3px; color: var(--accent); }
.ops-editor-link small, .ops-worklink small { display: block; font-weight: 450; margin-top: 1px; }
.ops-empty { margin-top: 13px; padding: 14px; border: 1px dashed #354755; border-radius: 9px; color: var(--muted); }
.ops-empty p { margin-bottom: 4px; }
.ops-empty p:last-child { margin: 0; }
.ops-shop-title { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 12px 0 8px; }
.ops-neutral { color: #ccd8e6; background: #202d3c; border-color: #35475c; }
.ops-warn { color: #ffdfa4; background: #3a2d20; border-color: #694e2d; }
.ops-shop-dates { color: var(--muted); font-size: 12px; margin: 9px 0; }
.ops-store-actions { margin: 13px 0 0; }
.ops-store-actions .button { min-height: 31px; padding: 4px 8px; font-size: 12px; }
.ops-shop-metrics, .ops-report-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 9px 0; }
.ops-metric { min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #101922; }
.ops-metric small { display: block; }
.ops-metric strong { display: block; font-size: clamp(17px, 2.1vw, 23px); line-height: 1.28; overflow-wrap: anywhere; }
.ops-chart { display: flex; align-items: flex-end; gap: 5px; margin: 11px 0 5px; }
.ops-day-bar { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 4px; }
.ops-day-bar progress { appearance: none; writing-mode: vertical-lr; direction: rtl; height: 58px; width: min(100%, 18px); }
.ops-day-bar progress::-webkit-progress-bar { border-radius: 4px; background: #24303d; }
.ops-day-bar progress::-webkit-progress-value { border-radius: 4px; background: #67d9b2; }
.ops-news-list { display: grid; gap: 8px; }
.ops-news-item { border: 1px solid var(--border); background: #111a25; border-radius: 9px; padding: 13px; }
.ops-news-item h3 { margin: 7px 0; }
.ops-news-item .actions { align-items: baseline; }
.ops-news-item .actions a { font-size: 12px; }
.ops-news-item button { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.ops-news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ops-news-note { white-space: pre-wrap; overflow-wrap: anywhere; color: #ccd6e1; }
.ops-workspaces .panel { padding: 14px 15px; }
.ops-workspaces h2 { margin-bottom: 5px; }
.ops-worklink {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px;
  color: var(--ink); padding: 8px 0; text-decoration: none; border-bottom: 1px solid var(--border);
}
.ops-worklink:last-child { border-bottom: 0; }
.ops-worklink:hover strong, .ops-worklink > span:last-child { color: var(--accent); }
.ops-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(178px, 1fr); gap: 9px; overflow: auto; padding: 3px 2px 11px; }
.ops-lane { background: #101922; border: 1px solid var(--border); border-radius: 10px; padding: 9px; min-height: 117px; }
.ops-lane-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 3px 1px 8px; }
.ops-lane-head h3 { margin: 0; font-size: 14px; }
.ops-lane-empty { margin: 5px 1px; color: var(--muted); font-size: 12px; }
.ops-board-card { border-radius: 8px; padding: 8px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 7px; }
.ops-board-card > small, .ops-card-links { margin-top: 5px; display: block; }
.ops-card-links { display: flex; flex-wrap: wrap; gap: 7px; font-size: 12px; }

.tk-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: clamp(19px, 2.8vw, 34px); margin-bottom: 16px; border: 1px solid #324956; border-radius: 16px;
  background: radial-gradient(ellipse at 85% 0, #1d413e, transparent 72%), #121e2a;
}
.tk-hero::before {
  position: absolute; z-index: -1; inset: 0; content: "";
  background: repeating-linear-gradient(90deg, transparent 0 34px, #6f9b941c 34px 35px),
    repeating-linear-gradient(0deg, transparent 0 34px, #6f9b941c 34px 35px);
  mask-image: linear-gradient(90deg, transparent 24%, black);
}
.tk-hero p { margin: 0 0 7px; color: #a5e9d8; font-size: 12px; font-weight: 750; letter-spacing: .06em; }
.tk-hero h1 { margin: 0; overflow-wrap: anywhere; }
.tk-workflow .button, .tk-panel-head button { min-height: 34px; font-size: 12px; }
.tk-panel { padding: clamp(13px, 2vw, 24px); background: #111a25; border-radius: 16px; }
.tk-panel-head { margin-bottom: 13px; }
.tk-panel-head h2 { font-size: 20px; }
.tk-panel-head small { display: block; margin-top: 3px; }
.tk-management { position: relative; }
.tk-date-picker summary, .tk-daily summary {
  cursor: pointer; width: fit-content; padding: 6px 11px; border: 1px solid #34475a;
  border-radius: 7px; color: #d6e5f3; background: #192637; font-size: 12px; font-weight: 700;
}
.tk-date-picker summary:focus-visible, .tk-daily summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tk-sync { margin: 9px 0 0; padding: 12px; border-radius: 9px; background: #0d1721; }
.tk-sync-controls { display: flex; flex-wrap: wrap; gap: 9px; align-items: flex-end; }
.tk-sync-controls input, .tk-sync-presets button { min-height: 38px; }
.tk-sync-presets button { font-size: 12px; }
.tk-reconnect { position: absolute; top: 0; right: 0; min-height: 32px; padding: 5px 9px; font-size: 12px; }
.tk-sync .formerror:empty { display: none; }
.tk-range {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 4px 12px; margin: 15px 0 12px; color: var(--muted); font-size: 12px;
}
.tk-range b { color: #d7e6f5; font-weight: 700; font-variant-numeric: tabular-nums; }
.tk-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 13px; }
.tk-kpi {
  display: grid; grid-template-rows: auto 1fr auto; align-items: end; justify-content: stretch; gap: 9px; min-width: 0;
  padding: clamp(10px, 1.25vw, 16px); color: var(--ink); background: #162331; border-color: #2c3e50;
  border-radius: 12px; text-align: left;
}
.tk-kpi[aria-pressed="true"] { border-color: #579889; background: linear-gradient(145deg, #1b3938, #142430 82%); }
.tk-kpi-label { display: flex; gap: 7px; align-items: center; color: #d6e4f4; font-size: 13px; }
.tk-kpi-label > span {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none;
  background: #294241; color: #b5ebd8; border-radius: 7px;
}
.tk-kpi[data-tk-metric="orders"] .tk-kpi-label > span { background: #283b54; color: #aaceff; }
.tk-kpi[data-tk-metric="itemsSold"] .tk-kpi-label > span { background: #383052; color: #d2baff; }
.tk-kpi[data-tk-metric="returns"] .tk-kpi-label > span { background: #3b302e; color: #ffd0a4; }
.tk-kpi strong { font-size: clamp(20px, 2.35vw, 34px); font-variant-numeric: tabular-nums; letter-spacing: -.045em; line-height: 1.2; overflow-wrap: anywhere; }
.tk-kpi-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 4px; min-height: 25px; }
.tk-kpi-foot small { font-size: 11px; font-weight: 500; }
.tk-kpi-foot canvas { display: block; width: clamp(34px, 4vw, 61px); height: 24px; }
.tk-chart-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(176px, 24%);
  border: 1px solid #2f4356; border-radius: 13px; overflow: hidden; background: #0e1925;
}
.tk-chart { min-width: 0; padding: clamp(12px, 1.8vw, 20px); }
.tk-chart-name { margin: 3px 0 0; font-size: 20px; color: #ecf6ff; }
.tk-chart .bar { align-items: flex-start; margin-bottom: 9px; }
.tk-chart .tk-currency { grid-auto-flow: column; align-items: center; gap: 6px; }
.tk-plot { min-height: 230px; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
.tk-plot canvas { display: block; width: 100%; height: clamp(220px, 24vw, 300px); cursor: crosshair; }
.tk-chart-empty { color: var(--muted); margin: 0 12px; text-align: center; }
.tk-day-select { display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 12px; color: var(--muted); }
.tk-day-select input { flex: 1; min-width: 0; accent-color: var(--accent); }
.tk-day-detail { min-width: 0; border-left: 1px solid #2f4356; background: #152232; padding: clamp(13px, 1.8vw, 20px); }
.tk-day-heading { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; justify-content: space-between; margin-bottom: 15px; }
.tk-day-heading h3 { color: #e7f1fb; margin: 3px 0 0; font-variant-numeric: tabular-nums; }
.tk-day-nav { display: flex; gap: 4px; }
.tk-day-nav button { padding: 0; min-width: 27px; min-height: 27px; font-size: 17px; }
.tk-day-nav button:disabled { cursor: default; }
.tk-day-detail dl { display: grid; gap: 8px; margin: 0; }
.tk-day-detail dl > div { padding: 8px 10px; background: #1a2a3b; border-radius: 8px; }
.tk-day-detail dt { display: flex; align-items: center; gap: 7px; color: #b7c8da; font-size: 12px; }
.tk-day-detail dt::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #79efc2; }
.tk-day-detail [data-tk-key="orders"] dt::before { background: #94b8ff; }
.tk-day-detail [data-tk-key="itemsSold"] dt::before { background: #c2a4ff; }
.tk-day-detail [data-tk-key="returns"] dt::before { background: #ffc794; }
.tk-day-detail dd { margin: 2px 0 0; color: #e6f1fc; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tk-daily { margin-top: 12px; }
.tk-daily .bar { margin: 8px 0; }
.tk-empty { border: 1px dashed #3b4d62; border-radius: 10px; padding: 15px; margin: 9px 0 0; color: var(--muted); }
.tk-empty h3 { color: #d6e5f3; margin: 0 0 5px; }
.tk-record-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 10px; margin-bottom: 9px; }
.tk-record { min-width: 0; padding: 13px; border: 1px solid var(--border); background: #111a25; border-radius: 10px; }
.tk-record h3 { margin-bottom: 9px; }
.tk-record .bar { margin-bottom: 8px; overflow-wrap: anywhere; }
.tk-record .actions button { min-height: 29px; font-size: 12px; padding: 3px 8px; }
.tk-record-note {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  overflow: hidden; overflow-wrap: anywhere; color: #b5c5d6; white-space: pre-wrap;
}
.tk-in-progress { color: #bcdaff; background: #233852; border-color: #3c5980; }

.recharge-totals { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 12px; }
.recharge-totals > div { min-width: 160px; border-left: 2px solid #5ea995; padding: 3px 9px; }
.recharge-totals dt { color: #b7c8d6; font-size: 12px; }
.recharge-totals dd { margin: 1px 0; color: #c4f5df; font-size: 18px; font-weight: 720; font-variant-numeric: tabular-nums; }
.recharge-ledger { min-width: 665px; }
.recharge-ledger small { display: block; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.recharge-ledger td:last-child { white-space: normal; }
.recharge-ledger td:last-child .actions { gap: 4px 8px; }
.recharge-ledger td:last-child button { margin: 0; }
.recharge-money { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
#recharge-import > .field + .field { margin-top: 10px; }

@media (max-width: 720px) {
  .recharge-ledger, .recharge-ledger tbody { display: block; min-width: 0; }
  .recharge-ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .recharge-ledger tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px;
    padding: 9px 0; border-top: 1px solid var(--border);
  }
  .recharge-ledger td { min-width: 0; max-width: none; padding: 0; border: 0; }
  .recharge-ledger td:nth-child(2) { grid-row: 2; }
  .recharge-ledger td:nth-child(4), .recharge-ledger td:last-child { grid-column: 1 / -1; }
}

.task-workspace { --task-border: #293b4d; --task-card: #152331; --task-title: #e9f3ff; min-width: 0; }
.task-cover {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px;
  padding: clamp(17px, 3vw, 34px); border: 1px solid #365358; border-radius: 17px;
  background: radial-gradient(ellipse at 90% 0%, #245145, transparent 72%), linear-gradient(120deg, #131e2c, #182b37);
}
.task-cover::before {
  position: absolute; z-index: -1; inset: 0; content: "";
  background: repeating-linear-gradient(0deg, transparent 0 27px, #7db7a41a 27px 28px),
    repeating-linear-gradient(90deg, transparent 0 27px, #7db7a41a 27px 28px);
  mask-image: linear-gradient(90deg, transparent 12%, black 90%);
}
.task-cover p { margin: 0 0 7px; color: #b1e7d5; font-size: 13px; font-weight: 700; }
.task-cover h1 { margin-bottom: 18px; }
.task-cover-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.task-cover-actions .task-inline { margin-left: 4px; }
.task-cover-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; align-items: stretch; }
.task-cover-stats > * {
  min-width: 79px; display: grid; justify-items: start; align-content: center; gap: 1px;
  border: 1px solid #365050; border-radius: 10px; padding: 8px 13px; background: #102029d9;
}
.task-cover-stats strong, .task-progress-number { color: #e9f7f3; font: 700 28px/1.15 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.task-cover-stats small { color: #b8cfcd; font-size: 11px; }
.task-cover-stats .task-overdue-link { color: #ffbda0; text-decoration: none; font-size: 13px; font-weight: 750; }
.task-overdue-link:hover { background: #303036; }
.task-inline { padding: 0; color: #9ce8ce; background: none; border: 0; font-size: 12px; font-weight: 700; text-decoration: none; }
button.task-inline { display: inline; min-height: auto; margin-left: 6px; }
.task-inline:hover { text-decoration: underline; }
.task-tabs { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 15px 0 12px; }
.task-week, .task-surface { min-width: 0; border: 1px solid var(--task-border); border-radius: 13px; background: #111b27; }
.task-week { margin-bottom: 13px; padding: clamp(10px, 1.5vw, 16px); }
.task-week-head, .task-section-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 11px; }
.task-week-head > div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.task-week-head h2, .task-section-head h2 { margin: 0; color: #e9f3ff; }
.task-section-head p { margin: 3px 0 0; color: #aabdd0; font-size: 12px; }
.task-week-controls button {
  min-width: 33px; min-height: 33px; border: 1px solid #364a5e; background: #172636; color: #e6f2ff;
  padding: 4px 8px; font-size: 12px;
}
.task-week-controls button[aria-label] { font-size: 19px; line-height: 1; }
.task-week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.task-week-day {
  display: grid; justify-items: start; justify-content: stretch; align-content: center; gap: 2px;
  min-width: 0; min-height: 78px; padding: 7px 9px; text-align: left; color: #dce9f6; background: #192737;
  border: 1px solid #2a3d50; border-radius: 9px;
}
.task-week-day small, .task-week-day span { font-size: 11px; color: #aabdce; }
.task-week-day strong { font: 700 22px/1.1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.task-week-day[aria-pressed="true"] { color: #d7ffee; background: #1b3938; border-color: #65a797; }
.task-week-day[aria-current="date"] strong { color: #9df1d3; }
.task-week-day.is-off:not([aria-pressed="true"]) { background: #111d29; }
.task-columns { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(245px, 1fr); align-items: start; gap: 13px; }
.task-sidebar { display: grid; gap: 12px; min-width: 0; }
.task-surface { padding: clamp(12px, 1.5vw, 19px); }
.task-schedule .task-section-head h2 { font-size: 20px; }
.task-timeline { display: grid; gap: 8px; margin-top: 14px; }
.task-time-entry { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: start; }
.task-time-label { position: relative; display: grid; padding: 7px 4px 7px 0; font-variant-numeric: tabular-nums; }
.task-time-label strong { color: #c9edff; font-size: 14px; }
.task-time-label small { color: #a6b8ca; font-size: 11px; }
.task-time-label::after { position: absolute; content: ""; width: 6px; height: 6px; right: 0; top: 15px; border-radius: 50%; background: #86bec5; }
.is-rest .task-time-label::after { background: #698091; }
.task-break { padding: 10px 12px; border: 1px dashed #364958; border-radius: 8px; color: #bdd0df; font-size: 12px; background: #101b27; }
.task-rows { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.task-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 8px; min-width: 0;
  padding: 8px 10px; border: 1px solid #2a3e50; border-radius: 8px; background: #182736;
}
.task-row.is-done { background: #14212b; }
.task-row.is-done .task-title-button strong { color: #aebfd0; }
.task-check { padding: 4px; align-self: start; min-width: 31px; min-height: 31px; background: transparent; color: #a7f0d4; }
.task-check span { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid #68869a; border-radius: 5px; font-size: 12px; }
.task-check:hover span, .task-check[aria-pressed="true"] span { color: #b9ffdf; border-color: #70b99d; background: #284941; }
.task-title-button { display: grid; justify-content: stretch; justify-items: start; gap: 2px; min-width: 0; min-height: 31px; padding: 3px 0; color: #e4effa; background: transparent; border: 0; text-align: left; }
.task-title-button strong, .task-title-button small, .task-output { max-width: 100%; overflow-wrap: anywhere; }
.task-title-button:hover strong { color: #b9f7e0; text-decoration: underline; }
.task-title-button small { color: #afc1d4; font-size: 11px; font-weight: 500; }
.task-output { color: #c0d0df; font-size: 12px; font-weight: 500; }
.task-row-state { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px; padding-top: 4px; }
.task-row-state:empty { display: none; }
.task-pill { display: inline-flex; white-space: nowrap; align-items: center; width: fit-content; padding: 2px 7px; color: #c1d1e2; background: #243345; border-radius: 5px; font-size: 11px; font-weight: 700; }
.task-high { background: #4a3528; color: #ffd3a5; }
.task-late { background: #452c36; color: #ffc1be; }
.task-active { background: #273c54; color: #c3deff; }
.task-floating { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--task-border); }
.task-floating h3, .task-areas h3 { margin: 0 0 8px; font-size: 14px; }
.task-floating h3 small { margin-left: 4px; font-size: 12px; }
.task-empty { padding: 9px 0; color: #aabdd0; font-size: 13px; }
.task-time-empty { margin: 0; }
.task-compact .task-row { padding: 5px; gap: 5px; }
.task-compact .task-row-state { display: none; }
.task-progress-number { font-size: 23px; }
.task-progress-number small { font-size: 13px; }
.task-areas { margin-top: 12px; }
.task-areas ul { display: grid; gap: 5px; padding: 0; margin: 0; list-style: none; }
.task-areas li { display: flex; justify-content: space-between; gap: 9px; padding-block: 4px; color: #bfd0df; font-size: 12px; overflow-wrap: anywhere; }
.task-areas li strong { color: #a8ebd3; }
.task-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 13px; }
.task-filters input, .task-filters select {
  max-width: 100%; min-width: 0; min-height: 36px; padding: 5px 9px;
  color: var(--ink); background: #172535; border: 1px solid #365064; border-radius: 7px;
}
.task-filters input { flex: 1 1 220px; }
.task-filters select { flex: 0 1 160px; }
.task-csv summary { cursor: pointer; color: #b9d8e6; font-size: 12px; }
.task-csv > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.task-csv button, .task-pagination button { padding: 5px 8px; min-height: 33px; font-size: 12px; }
.task-pagination { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 0 0; }
.task-command { margin-top: 15px; padding: 16px 0; border-block: 1px solid var(--task-border); }
.task-command textarea { width: 100%; min-height: 108px; padding: 12px; }
.task-command-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.task-command-footer, .task-plan-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 9px; }
.task-command-local, .task-plan-confirm label { display: inline-flex; align-items: center; gap: 5px; color: #d3e2ef; font-size: 12px; }
.task-command input[type="checkbox"] { accent-color: var(--accent); }
.task-command .formerror:empty { display: none; }
.task-command #plan-result:not(:empty) { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--border); }
.task-command #plan-result h3 { margin: 0; }
.task-plan-day h4 { margin: 10px 0 6px; color: #c8d8e6; }
.task-plan-slots { display: grid; gap: 5px; margin: 0 0 9px; padding: 0; list-style: none; }
.task-plan-slots li { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px; background: #1a2d3b; border-radius: 7px; padding: 8px 10px; }
.task-plan-slots time { color: #a2e6cf; font-variant-numeric: tabular-nums; }
.task-plan-slots strong, .task-plan-slots small { display: block; overflow-wrap: anywhere; }
.task-plan-unplaced time { color: #ffbe9e; }
.task-home-progress { padding: 9px 12px; margin-bottom: 12px; border: 1px solid #304958; border-radius: 9px; background: #172936; }
.task-home-progress > div { display: flex; justify-content: space-between; gap: 8px; color: #cddde8; font-size: 12px; }
.task-home-progress strong { color: #a5ebd2; }
.task-home-progress > progress { display: block; margin-top: 7px; }

@media (max-width: 960px) {
  .task-columns { grid-template-columns: minmax(0, 1fr); }
  .task-sidebar { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); align-items: start; }
}
@media (max-width: 680px) {
  .task-cover { grid-template-columns: minmax(0, 1fr); }
  .task-cover-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .task-cover-stats > * { min-width: 0; padding: 7px 9px; }
  .task-cover-stats strong { font-size: 23px; }
  .task-week-days { gap: 4px; }
  .task-week-day { justify-items: center; padding: 5px 2px; min-height: 59px; }
  .task-week-day strong { font-size: 17px; }
  .task-week-day span { display: none; }
}
@media (max-width: 450px) {
  .task-time-entry { grid-template-columns: 44px minmax(0, 1fr); gap: 5px; }
  .task-time-label::after { display: none; }
  .task-row { padding: 5px; gap: 5px; }
  .task-row-state { flex-direction: column; max-width: 58px; }
}

@media (max-width: 1010px) { .tk-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 850px) {
  .tk-chart-grid { grid-template-columns: minmax(0, 1fr); }
  .tk-day-detail { border-left: 0; border-top: 1px solid #2f4356; }
  .tk-day-detail dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 500px) {
  .tk-kpi { padding: 9px; }
  .tk-sync-controls .field { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .tk-sync-controls .field input { width: 100%; }
  .tk-sync-presets button { min-height: 34px; }
}

@media (max-width: 1160px) {
  .ops-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 950px) {
  .ops-primary, .ops-secondary { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 550px) {
  .ops-cover { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ops-stat { padding: 9px; }
  .ops-stat > div { gap: 5px; }
  .ops-stat .ops-icon { width: 23px; height: 23px; font-size: 14px; }
  .ops-stat > strong { font-size: 26px; }
  .ops-stat > .ops-stat-text { font-size: 19px; }
  .ops-intro .ops-icon { width: 34px; height: 34px; font-size: 19px; }
  .ops-agenda li { gap: 7px; }
}

@media (max-width: 1010px) {
  .ads-workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ads-data { display: contents; }
  .ads-ai { position: static; grid-row: 2; }
}
.monthly-budgets { background: linear-gradient(135deg, #172739, #14202d); }
.monthly-budgets h2 { margin: 0; }
.monthly-budgets .bar { align-items: flex-start; gap: 10px; }
.monthly-budgets .bar p { margin: 4px 0 0; }
.budget-month-label { display: inline-flex; align-items: center; gap: 7px; color: #b7c9d8; font-size: 12px; }
.budget-month-label input { min-height: 36px; padding: 5px 8px; color: var(--ink); background: #101e2b; border: 1px solid #395064; border-radius: 7px; }
.monthly-budget-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 11px; margin-top: 14px; }
.monthly-budget-card { padding: 15px; border: 1px solid #345264; border-radius: 12px; background: #102130; }
.monthly-budget-label, .monthly-budget-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px; }
.monthly-budget-label { color: #c9dce9; font-size: 13px; font-weight: 700; }
.monthly-budget-card > strong { display: block; margin-top: 12px; color: #e7fff4; font-size: clamp(27px, 3vw, 36px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.monthly-budget-track { height: 7px; margin: 14px 0 8px; border-radius: 99px; background: #304354; overflow: hidden; }
.monthly-budget-track span { display: block; height: 100%; background: linear-gradient(90deg, #63d7b2, #b5f0ce); border-radius: inherit; }
.monthly-budget-meta { color: #aebfd0; font-size: 12px; }
.monthly-budget-meta .budget-over { color: #ffb8a8; }
.budget-method { margin: 11px 0 0; font-size: 12px; }
@media (max-width: 550px) { .monthly-budgets .bar { flex-direction: column; } }
@media (max-width: 1060px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .layout, .dashboard-columns { grid-template-columns: 1fr; }
  .rail { height: auto; position: static; padding: 12px 16px; border-bottom: 1px solid var(--border); border-right: 0; }
  .rail .brand { display: inline-flex; padding: 0; }
  #nav-toggle { display: inline-flex; float: right; }
  .rail nav { display: none; padding-top: 7px; }
  #nav-toggle[aria-expanded="true"] + nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .rail nav p, .navicon { display: none; }
  .rail nav a { padding: 6px 8px; }
  .top { margin-bottom: 16px; min-height: 52px; }
  .breadcrumb { display: none; }
  .top > .actions { justify-content: space-between; width: 100%; }
}
@media (max-width: 510px) {
  .hero { display: block; }
  .hero button { margin-top: 12px; }
  .formgrid { grid-template-columns: 1fr; }
  .tile, .panel { padding: 13px; }
  .grid { gap: 7px; }
}
