:root {
  --forest-950: #0a2c28;
  --forest-900: #103d36;
  --forest-800: #175248;
  --forest-700: #24695d;
  --forest-100: #dfeee9;
  --cream: #f5f3ed;
  --paper: #fffefa;
  --ink: #172421;
  --muted: #6e7a76;
  --line: #e6e4dc;
  --orange: #ef7d39;
  --orange-dark: #d96122;
  --amber-soft: #fff0d3;
  --coral-soft: #ffe6dc;
  --mint-soft: #dff1e9;
  --shadow: 0 14px 40px rgba(26, 48, 43, .07);
  --radius-lg: 18px;
  --radius-md: 12px;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html { color-scheme: light; background: var(--cream); }
body { margin: 0; font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
svg { width: 1em; height: 1em; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; padding: 28px 18px 20px; color: #d9e7e3; background: radial-gradient(circle at 12% 0%, #1e5d52 0, transparent 35%), linear-gradient(165deg, #123f38 0%, #0b2f2b 100%); z-index: 20; overflow: hidden; }
.sidebar::after { content: ""; position: absolute; width: 220px; height: 220px; border: 1px solid rgba(255,255,255,.035); border-radius: 50%; bottom: -110px; left: -80px; box-shadow: 0 0 0 28px rgba(255,255,255,.018), 0 0 0 58px rgba(255,255,255,.012); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 31px; position: relative; z-index: 1; }
.brand-mark { width: 37px; height: 37px; position: relative; flex: 0 0 auto; }
.brand-core { position: absolute; width: 17px; height: 17px; background: var(--orange); border-radius: 50%; top: 10px; left: 10px; box-shadow: 0 0 18px rgba(239,125,57,.4); }
.brand-orbit { position: absolute; inset: 3px; border: 1.5px solid rgba(255,255,255,.85); border-radius: 50%; transform: rotate(-36deg) scaleY(.46); }
.brand-star { position: absolute; width: 5px; height: 5px; background: #fff; border-radius: 50%; right: 2px; top: 11px; }
.brand strong { display: block; font-size: 16px; letter-spacing: .06em; color: #fff; }
.brand span:last-child { display: block; margin-top: 4px; font-size: 8px; letter-spacing: .17em; color: #8db1aa; }
.nav { display: grid; gap: 7px; position: relative; z-index: 1; }
.nav-item { position: relative; display: flex; align-items: center; gap: 13px; min-height: 45px; padding: 0 14px; border: 0; border-radius: 10px; color: #a9c1bc; background: transparent; text-decoration: none; font-size: 14px; cursor: pointer; width: 100%; text-align: left; transition: .18s ease; }
.nav-item > span:first-child { font-size: 19px; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { color: #fff; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.035); }
.nav-item.active i { position: absolute; right: 0; width: 3px; height: 21px; background: var(--orange); border-radius: 4px 0 0 4px; }
.nav-divider { height: 1px; margin: 15px 11px; background: rgba(255,255,255,.08); }
.sidebar-footer { margin-top: auto; position: relative; z-index: 1; padding: 17px 11px 0; border-top: 1px solid rgba(255,255,255,.08); }
.connection-status { display: flex; align-items: flex-start; gap: 10px; }
.connection-status strong, .connection-status small { display: block; }
.connection-status strong { font-size: 12px; color: #e8f1ef; }
.connection-status small { margin-top: 4px; font-size: 10px; color: #7fa69f; }
.status-dot, .live-dot { display: inline-block; width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: #45c394; box-shadow: 0 0 0 4px rgba(69,195,148,.12); flex: 0 0 auto; }
.sidebar-footer > p { color: #688f88; font-size: 10px; line-height: 1.65; margin: 15px 0 0 17px; }

.main-content { margin-left: var(--sidebar); min-width: 0; }
.topbar { height: 72px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,254,250,.93); border-bottom: 1px solid rgba(219,218,210,.8); position: sticky; top: 0; z-index: 15; backdrop-filter: blur(16px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #9a9e99; }
.breadcrumb b { font-weight: 400; color: #c5c6c1; }
.breadcrumb strong { color: #40504c; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.last-sync { display: flex; align-items: center; gap: 7px; padding-right: 4px; color: #89928f; font-size: 11px; }
.last-sync > span:first-child { font-size: 15px; }
.last-sync strong { color: #58645f; font-weight: 600; }
.button { border: 0; border-radius: 9px; min-height: 38px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-size: 12px; font-weight: 650; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.button svg { font-size: 15px; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; pointer-events: none; }
.button-primary { color: #fff; background: var(--forest-800); box-shadow: 0 5px 16px rgba(23,82,72,.16); }
.button-primary:hover { background: var(--forest-700); box-shadow: 0 7px 20px rgba(23,82,72,.22); }
.button-primary.loading svg { animation: spin 1s linear infinite; }
.button-ghost { color: #52605c; border: 1px solid var(--line); background: #fff; }
.button-ghost:hover { background: #faf9f5; border-color: #d6d5cd; }
.avatar-button { border: 0; width: 34px; height: 34px; border-radius: 50%; background: #f0ddc9; color: #8d5f3d; font-weight: 700; font-size: 12px; cursor: pointer; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: transparent; cursor: pointer; }
.icon-button:hover { background: #f1f0ea; }
.menu-button { display: none; }

.page-content { width: min(1500px, 100%); margin: 0 auto; padding: 36px 34px 32px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.eyebrow { margin: 0 0 9px; color: var(--orange-dark); font-size: 9px; font-weight: 800; letter-spacing: .17em; }
.page-heading h1 { margin: 0; font-family: "Songti SC", SimSun, serif; font-size: 29px; letter-spacing: .04em; font-weight: 700; color: #173a34; }
.page-subtitle { margin: 9px 0 0; color: #7b8581; font-size: 12px; }
.heading-badge { display: flex; gap: 9px; align-items: center; color: #6b7773; font-size: 11px; padding: 9px 12px; border: 1px solid #e5e3da; border-radius: 20px; background: rgba(255,255,255,.55); }
.heading-badge .live-dot { margin-top: 0; width: 6px; height: 6px; }
.dimension-switch { width: fit-content; display: flex; gap: 4px; margin: -8px 0 25px; padding: 4px; border: 1px solid #e2e1d9; border-radius: 11px; background: rgba(255,255,255,.66); }
.dimension-switch button { min-width: 112px; height: 35px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 0; border-radius: 8px; color: #77827e; background: transparent; font-size: 11px; font-weight: 650; cursor: pointer; transition: .16s ease; }
.dimension-switch button svg { font-size: 14px; }
.dimension-switch button:hover { color: #31564d; background: #f2f4f0; }
.dimension-switch button.active { color: #fff; background: var(--forest-800); box-shadow: 0 5px 14px rgba(23,82,72,.16); }
.demo-banner { display: flex; align-items: center; gap: 13px; padding: 12px 15px; margin: -8px 0 20px; border: 1px solid #edd9b1; background: #fff9eb; border-radius: 12px; }
.demo-icon { display: grid; place-items: center; width: 35px; height: 35px; color: #ba742b; background: #ffedca; border-radius: 9px; }
.demo-icon svg { font-size: 18px; }
.demo-banner strong { font-size: 12px; color: #765022; }
.demo-banner p { margin: 3px 0 0; font-size: 10px; color: #9a794f; }
.demo-banner button { margin-left: auto; padding: 7px 11px; color: #9a6126; font-weight: 700; font-size: 10px; border: 0; border-radius: 7px; background: #ffedca; cursor: pointer; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { min-height: 119px; display: flex; align-items: center; gap: 14px; position: relative; padding: 22px 20px; overflow: hidden; border: 1px solid rgba(222,221,213,.85); border-radius: var(--radius-md); background: rgba(255,254,250,.9); box-shadow: 0 8px 28px rgba(30,53,48,.035); }
.stat-card.stat-forest { color: #fff; border: 0; background: linear-gradient(135deg, #164b43, #0f3a34); box-shadow: 0 12px 26px rgba(16,61,54,.13); }
.stat-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; color: #fff; background: rgba(255,255,255,.13); }
.stat-icon svg { font-size: 20px; }
.stat-icon.amber { color: #b76e19; background: var(--amber-soft); }
.stat-icon.coral { color: #ce6138; background: var(--coral-soft); }
.stat-icon.mint { color: #34806b; background: var(--mint-soft); }
.stat-card p { margin: 0 0 7px; color: #7c8682; font-size: 10px; }
.stat-forest p { color: #9ac0b9; }
.stat-card strong { display: block; font-family: Georgia, "Times New Roman", serif; color: #1d3732; font-size: 24px; letter-spacing: -.015em; white-space: nowrap; }
.stat-forest strong { color: #fff; }
.stat-card small { display: block; margin-top: 5px; color: #a3aaa7; font-size: 9px; }
.stat-forest small { color: #7ba49d; }
.stat-decoration { position: absolute; right: -16px; top: -22px; width: 90px; height: 90px; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; box-shadow: 0 0 0 18px rgba(255,255,255,.025), 0 0 0 38px rgba(255,255,255,.018); }

.data-panel { overflow: hidden; border: 1px solid rgba(222,221,213,.95); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.panel-header { min-height: 67px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-header > div { display: flex; align-items: center; gap: 9px; }
.panel-header h2 { margin: 0; color: #263b36; font-size: 14px; }
.count-pill { min-width: 25px; padding: 3px 8px; text-align: center; color: #74807c; background: #f0f0eb; border-radius: 10px; font-size: 9px; }
.panel-actions { gap: 8px !important; }
.panel-actions .button { min-height: 33px; font-size: 10px; padding: 0 11px; }
.filters { min-height: 67px; padding: 13px 20px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); background: #fdfcf8; }
.search-box, .filter-control, .select-control { height: 38px; display: flex; align-items: center; border: 1px solid #deddd5; border-radius: 9px; background: #fff; color: #8a9490; }
.search-box { width: 310px; padding: 0 10px 0 12px; gap: 9px; }
.search-box > span { font-size: 16px; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: #354641; background: transparent; font-size: 11px; }
.search-box input::placeholder { color: #a6aca9; }
.search-box:focus-within, .filter-control:focus-within, .select-control:focus-within { border-color: #7da39a; box-shadow: 0 0 0 3px rgba(23,82,72,.07); }
.search-box kbd { padding: 2px 5px; border: 1px solid #e3e2dc; border-radius: 4px; color: #a3aaa7; background: #f8f7f3; font: 8px system-ui; }
.filter-control { gap: 5px; padding: 0 9px; }
.filter-control > span { font-size: 15px; }
.filter-control input { width: 105px; border: 0; outline: 0; color: #5e6965; background: transparent; font-size: 10px; }
.filter-control i { color: #b0b4b1; font-style: normal; font-size: 9px; }
.select-control { padding: 0 10px; gap: 7px; }
.select-control > span { font-size: 14px; }
.select-control > span:last-child { font-size: 12px; }
.select-control select, .select-control input { appearance: none; width: 76px; border: 0; outline: 0; background: transparent; color: #5e6965; font-size: 10px; padding-right: 5px; }
.select-control input::placeholder { color: #7d8884; opacity: 1; }
.clear-button { border: 0; background: transparent; color: #bd6936; font-size: 10px; cursor: pointer; }
.clear-button:hover { text-decoration: underline; }
.table-wrap { min-height: 348px; position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { height: 42px; padding: 0 10px; color: #8d9692; background: #f8f7f2; font-size: 9px; font-weight: 650; letter-spacing: .02em; text-align: left; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 17px; }
td { height: 78px; padding: 9px 10px; border-bottom: 1px solid #edebe5; color: #44534f; font-size: 11px; vertical-align: middle; }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #fbfaf6; }
tbody tr:last-child td { border-bottom: 0; }
.cover-column { width: 92px; }
.material-table { min-width: 1120px; }
.material-id-column { width: 132px; }
.task-info-column { width: 158px; }
.task-id-column { width: 132px; }
.creator-column { width: 172px; }
.action-column { width: 38px; }
.video-cover { position: relative; width: 57px; height: 57px; padding: 0; overflow: hidden; border: 0; border-radius: 8px; background: #d8e6df; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.video-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-placeholder { position: absolute; inset: 0; background: linear-gradient(145deg, var(--cover-a), var(--cover-b)); }
.cover-placeholder::before { content: ""; position: absolute; width: 42px; height: 62px; left: 11px; top: 12px; border-radius: 26px 26px 6px 6px; background: rgba(255,255,255,.23); transform: rotate(19deg); }
.cover-placeholder::after { content: ""; position: absolute; width: 21px; height: 21px; right: 6px; top: 5px; border-radius: 50%; background: rgba(255,244,204,.62); box-shadow: -32px 39px 0 9px rgba(13,59,52,.18); }
.play-badge { position: absolute; left: 5px; bottom: 5px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #fff; background: rgba(9,34,30,.72); backdrop-filter: blur(5px); }
.play-badge svg { width: 8px; height: 8px; fill: currentColor; stroke: none; }
.douyin-link { width: 57px; height: 57px; display: grid; place-items: center; align-content: center; gap: 4px; border-radius: 8px; color: #fff; background: linear-gradient(145deg, #25242b, #111217); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); font-size: 8px; font-weight: 650; text-decoration: none; transition: transform .14s ease, box-shadow .14s ease; }
.douyin-link:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(16,18,23,.2), inset 0 0 0 1px rgba(37,244,238,.22); }
.douyin-link svg { width: 16px; height: 16px; fill: #fff; stroke: none; filter: drop-shadow(2px 0 0 #fe2c55) drop-shadow(-2px 0 0 #25f4ee); }
.cover-unavailable { display: grid; place-items: center; cursor: default; }
.cover-empty { position: relative; z-index: 1; padding: 3px 5px; border-radius: 4px; color: rgba(255,255,255,.92); background: rgba(15,44,38,.45); font-size: 8px; font-weight: 650; }
.material-cell strong { display: block; color: #2f423d; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; font-weight: 650; }
.task-label { display: inline-block; max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; padding: 2px 6px; border-radius: 4px; color: #83908b; background: #f1f1ec; font-size: 8px; }
.demo-label { color: #9c6b2f; background: #fff0d4; }
.material-task-info, .material-task-id { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-task-info { color: #42534e; font-weight: 600; }
.material-task-id { color: #6e7c77; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.empty-value { color: #b5bbb8; font-weight: 400; }
.creator-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.creator-avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; color: var(--avatar-text); background: var(--avatar-bg); font-size: 10px; font-weight: 750; }
.creator-cell strong, .creator-cell small { display: block; max-width: 160px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.creator-cell strong { color: #394b46; font-size: 11px; font-weight: 650; }
.creator-cell small { margin-top: 4px; color: #98a09d; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; }
.date-cell strong, .date-cell small { display: block; }
.date-cell strong { color: #4d5c57; font-size: 10px; font-weight: 550; }
.date-cell small { margin-top: 4px; color: #9ca39f; font-size: 8px; }
.score-chip { width: fit-content; display: flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 6px; color: #ad6929; background: #fff1d9; font-size: 10px; font-weight: 700; }
.score-chip svg { width: 10px; height: 10px; fill: #e6a145; stroke: #e6a145; }
.spend-cell { text-align: right; color: #173e37; font-family: Georgia, "Times New Roman", serif; font-size: 13px; font-weight: 700; }
.row-menu { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #a1a7a4; cursor: pointer; }
.row-menu:hover { color: #4c5a56; background: #eeeee9; }
.row-menu svg { font-size: 16px; }
.sort-button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; }
.sort-button svg { width: 9px; height: 9px; opacity: .5; }
.sort-button.active { color: #53635e; }
.sort-button.active svg { opacity: 1; color: var(--orange); }
.task-sort-button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; font-weight: inherit; cursor: pointer; }
.task-sort-button svg { width: 9px; height: 9px; opacity: .5; }
.task-sort-button.active { color: #53635e; }
.task-sort-button.active svg { opacity: 1; color: var(--orange); }
.task-dimension-wrap { min-height: 300px; }
.task-dimension-table { min-width: 760px; }
.task-dimension-table th:first-child { width: 36%; }
.task-dimension-table th:nth-child(2) { width: 23%; }
.task-dimension-table th:nth-child(3) { width: 23%; }
.task-dimension-table th:last-child { width: 18%; }
.task-dimension-table td { height: 72px; }
.task-info-cell strong { display: block; color: #304640; font-size: 12px; font-weight: 700; }
.task-info-cell small { display: inline-block; margin-top: 6px; padding: 2px 6px; border-radius: 4px; color: #9a6c34; background: #fff0d6; font-size: 8px; }
.task-id-cell { color: #5a6864; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.customer-cell { display: flex; align-items: center; gap: 9px; }
.customer-mark { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #357363; background: #e1f0eb; font-size: 10px; font-weight: 750; }
.customer-cell strong { max-width: 190px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #465651; font-size: 11px; }
.align-right { text-align: right; }
.align-right .sort-button { margin-left: auto; }
.pagination-bar { min-height: 57px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); background: #fdfcf9; }
.pagination-bar > p { margin: 0; color: #919995; font-size: 9px; }
.pagination { display: flex; gap: 5px; }
.pagination button { min-width: 28px; height: 28px; padding: 0 7px; border: 1px solid #e0dfd8; border-radius: 7px; color: #76817d; background: #fff; font-size: 9px; cursor: pointer; }
.pagination button:hover:not(:disabled) { border-color: #99b2ab; }
.pagination button.active { color: #fff; border-color: var(--forest-800); background: var(--forest-800); }
.pagination button:disabled { color: #c5c8c6; background: #f7f6f2; cursor: default; }
.loading-state, .empty-state { position: absolute; inset: 43px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #929a97; background: rgba(255,254,250,.94); }
.loading-state p { margin: 12px 0 0; font-size: 10px; }
.spinner { width: 24px; height: 24px; border: 2px solid #dfe6e3; border-top-color: var(--forest-700); border-radius: 50%; animation: spin .8s linear infinite; }
.empty-state > div { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 50%; color: #8ca49e; background: #e8f1ee; }
.empty-state > div svg { font-size: 20px; }
.empty-state h3 { margin: 13px 0 0; color: #55645f; font-size: 12px; }
.empty-state p { margin: 6px 0 12px; font-size: 10px; }
.empty-state button { border: 0; background: transparent; color: var(--orange-dark); font-size: 10px; cursor: pointer; }
.data-note { display: flex; align-items: center; gap: 6px; margin: 11px 3px 0; color: #9aa19e; font-size: 9px; }
.data-note svg { font-size: 12px; }

.modal { width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; background: transparent; box-shadow: 0 24px 90px rgba(10,35,31,.24); }
.modal::backdrop, .preview-modal::backdrop { background: rgba(8,32,28,.52); backdrop-filter: blur(4px); }
.modal-card { background: var(--paper); border-radius: 16px; overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-header > div { display: flex; align-items: center; gap: 12px; }
.modal-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #347363; background: #e2f0eb; }
.modal-header h2 { margin: 0; font-size: 15px; }
.modal-header p { margin: 4px 0 0; color: #89928e; font-size: 10px; }
.modal-body { padding: 22px; }
.dropzone { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #cfd6d2; border-radius: 12px; background: #fafbf8; cursor: pointer; transition: .15s ease; }
.dropzone:hover, .dropzone.dragging { border-color: #6f9b91; background: #f4f9f7; }
.upload-illustration { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 50%; color: #3a7768; background: #e4f1ed; }
.upload-illustration svg { font-size: 21px; }
.dropzone strong { font-size: 12px; }
.dropzone p { margin: 6px 0 0; color: #989f9c; font-size: 9px; }
.chosen-file { margin-top: 12px; padding: 5px 9px; border-radius: 6px; color: #2c6859; background: #e1f0eb; font-size: 9px; }
.field-guide { margin-top: 16px; padding: 14px 15px; border-radius: 10px; background: #f4f2eb; }
.field-guide h3, .setup-guide h3 { margin: 0 0 7px; font-size: 10px; }
.field-guide p { margin: 0; color: #55635f; font-size: 9px; line-height: 1.7; }
.field-guide small { display: block; margin-top: 5px; color: #949c98; font-size: 8px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: #faf9f5; }
.connection-card { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.connection-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: #9b722e; background: #fff0d5; }
.connection-card > div { flex: 1; }
.connection-card strong { display: block; font-size: 11px; }
.connection-card p { margin: 4px 0 0; color: #929a97; font-size: 9px; }
.status-badge { padding: 4px 7px; border-radius: 10px; color: #96702f; background: #fff1d7; font-size: 8px; }
.status-badge.connected { color: #286b59; background: #dff1ea; }
.token-field { display: block; margin-top: 17px; }
.token-field > span { display: block; margin-bottom: 7px; font-size: 10px; font-weight: 650; }
.token-field > div { display: flex; height: 39px; border: 1px solid #ddddd5; border-radius: 9px; overflow: hidden; }
.token-field input { flex: 1; min-width: 0; padding: 0 11px; border: 0; outline: 0; font-size: 10px; }
.token-field button { padding: 0 11px; border: 0; border-left: 1px solid #e5e4dd; background: #f7f6f2; color: #65716d; font-size: 9px; cursor: pointer; }
.token-field small { display: block; margin-top: 6px; color: #9aa19e; font-size: 8px; }
.setup-guide { margin-top: 18px; padding: 15px; border-radius: 10px; background: #f5f3ed; }
.setup-guide ol { margin: 0; padding-left: 17px; color: #68736f; font-size: 9px; line-height: 1.85; }
.setup-guide code { padding: 1px 4px; border-radius: 3px; color: #40645b; background: #e7ebe7; font: 8px ui-monospace, monospace; }
.preview-modal { padding: 0; border: 0; border-radius: 15px; overflow: hidden; background: #102e2a; box-shadow: 0 25px 90px rgba(0,0,0,.4); }
.preview-modal form { position: relative; margin: 0; }
.preview-modal button { position: absolute; right: 10px; top: 10px; z-index: 1; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.45); cursor: pointer; }
.preview-modal img { display: block; width: min(380px, calc(100vw - 32px)); height: min(540px, 70vh); object-fit: cover; background: #163e37; }
.preview-modal form > div { padding: 14px 16px; color: #fff; }
.preview-modal span, .preview-modal strong { display: block; }
.preview-modal span { color: #93b6af; font-size: 9px; }
.preview-modal strong { margin-top: 4px; font: 10px ui-monospace, monospace; }
.toast-region { position: fixed; right: 22px; bottom: 22px; display: grid; gap: 8px; z-index: 100; }
.toast { min-width: 250px; max-width: 380px; display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; color: #fff; background: #153f38; box-shadow: 0 12px 35px rgba(11,43,38,.22); animation: toast-in .22s ease-out; font-size: 10px; line-height: 1.5; }
.toast.error { background: #843f30; }
.toast svg { margin-top: 1px; flex: 0 0 auto; font-size: 15px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { flex-wrap: wrap; }
  .search-box { flex: 1 1 280px; }
  .filter-control { flex: 0 0 auto; }
  table { min-width: 920px; }
  .material-table { min-width: 1120px; }
}

@media (max-width: 780px) {
  :root { --sidebar: 236px; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 16px 0 45px rgba(7,31,27,.24); }
  .sidebar.open { transform: translateX(0); }
  .mobile-overlay { position: fixed; inset: 0; z-index: 19; background: rgba(6,30,26,.35); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .mobile-overlay.open { opacity: 1; pointer-events: auto; }
  .main-content { margin-left: 0; }
  .topbar { height: 64px; padding: 0 16px; }
  .menu-button { display: inline-grid; }
  .breadcrumb { margin-right: auto; margin-left: 5px; }
  .last-sync, .avatar-button { display: none; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .button { padding: 0 11px; }
  .page-content { padding: 25px 15px; }
  .page-heading { align-items: flex-start; }
  .dimension-switch { width: 100%; margin-top: -9px; }
  .dimension-switch button { flex: 1; }
  .heading-badge { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 104px; padding: 16px 13px; gap: 10px; }
  .stat-icon { width: 35px; height: 35px; }
  .stat-card strong { font-size: 19px; }
  .panel-header { align-items: flex-start; padding: 15px; gap: 12px; }
  .panel-header, .filters { flex-wrap: wrap; }
  .panel-actions { width: 100%; }
  .panel-actions .button { flex: 1; }
  .filters { padding: 12px 15px; }
  .search-box { width: 100%; flex-basis: 100%; }
  .filter-control { flex: 1 1 100%; }
  .filter-control input { flex: 1; width: auto; }
  .select-control { flex: 1; }
  .pagination-bar { padding: 10px 14px; flex-direction: column; gap: 9px; }
  .demo-banner { align-items: flex-start; flex-wrap: wrap; }
  .demo-banner button { margin-left: 48px; }
}

@media (max-width: 460px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 92px; }
  .page-heading h1 { font-size: 25px; }
  .topbar-actions .button span:last-child { display: none; }
  .topbar-actions .button { width: 38px; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
