:root {
  --paper: #fff;
  --bg: #eef5ff;
  --surface: #f7f8fa;
  --surface-2: #eef1f4;
  --line: #dfe3e8;
  --ink: #151a22;
  --muted: #687280;
  --faint: #98a1ad;
  --accent: #175cff;
  --accent-2: #4f8cff;
  --accent-soft: #eaf2ff;
  --blue-line: #cfe0ff;
  --green: #16803c;
  --amber: #b65d00;
  --red: #d92d20;
  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { min-height: 100vh; background: var(--bg); color: var(--ink); font: 13px Arial, "Noto Sans KR", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
textarea { resize: vertical; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { color: var(--faint); font-size: 10px; font-weight: 900; letter-spacing: .08em; }

/* 로그인도 관리자보드 시안의 직선적이고 조밀한 규칙을 따른다. */
.login-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.login-card { width: min(360px, 100%); padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(33, 72, 111, .08); }
.login-brand { padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 900; }
.login-brand span, .brand strong span { color: var(--accent); }
.login-card h1 { margin: 7px 0 5px; font-size: 18px; font-weight: 900; }
.login-card > .muted { font-size: 11.5px; line-height: 1.5; }
.login-card label { display: block; margin-top: 14px; color: var(--faint); font-size: 10.5px; font-weight: 900; }
.login-card input { width: 100%; height: 36px; margin-top: 5px; padding: 0 9px; border: 1px solid var(--line); border-radius: var(--radius); outline: none; color: var(--ink); font-weight: 700; }
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.form-error { min-height: 26px; padding-top: 8px; color: var(--red); font-size: 11px; }

.app-shell { display: flex; min-height: 100vh; background: var(--paper); }
.sidebar { width: 210px; flex: 0 0 210px; padding: 14px 9px; background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; transition: width .16s ease, flex-basis .16s ease; }
.app-shell.sidebar-collapsed .sidebar { width: 50px; flex-basis: 50px; padding: 14px 7px; }
.menu-toggle { width: 28px; height: 24px; margin: 0 0 10px 7px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--accent); font-size: 12px; font-weight: 900; }
.app-shell.sidebar-collapsed .menu-toggle { margin-left: 4px; }
.brand { padding: 0 7px 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.brand strong { display: block; font-size: 12.5px; font-weight: 900; line-height: 1.2; }
.brand small { display: block; margin-top: 6px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.app-shell.sidebar-collapsed .brand, .app-shell.sidebar-collapsed .nav-section > p, .app-shell.sidebar-collapsed .sidebar-footer { display: none; }
.nav-section { margin-bottom: 7px; }
.nav-section > p { margin: 14px 10px 7px; color: var(--faint); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.nav-item { width: 100%; padding: 8px 7px; margin: 0; border: 0; border-radius: var(--radius); background: transparent; color: #4f5967; display: flex; align-items: center; gap: 8px; text-align: left; font-size: 11.5px; font-weight: 800; }
.nav-item:hover { background: var(--surface); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-icon { width: 8px; height: 8px; flex: 0 0 auto; overflow: hidden; border-radius: 2px; background: var(--line); color: transparent; font-size: 0; }
.nav-item.active .nav-icon { background: var(--accent); transform: rotate(45deg); }
.app-shell.sidebar-collapsed .nav-item { justify-content: center; padding: 9px 0; }
.app-shell.sidebar-collapsed .nav-item span:not(.nav-icon) { display: none; }
.sidebar-footer { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); }
.profile { display: flex; align-items: center; gap: 8px; }
.profile > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; font-weight: 900; }
.profile strong, .profile small { display: block; max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile strong { font-size: 11.5px; }
.profile small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.text-button { padding: 8px 0 0; border: 0; background: none; color: var(--muted); font-size: 10.5px; font-weight: 700; }

.main { min-width: 0; flex: 1; display: flex; flex-direction: column; background: var(--bg); }
.topbar { min-height: 64px; padding: 14px 22px 10px; background: var(--bg); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar h1 { font-size: 18px; font-weight: 900; line-height: 1.25; }
.topbar p { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.scope-chip, .sync-state, .icon-button { height: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); display: inline-flex; align-items: center; justify-content: center; }
.scope-chip, .sync-state { padding: 0 10px; color: var(--muted); font-size: 11.5px; }
.scope-chip { color: var(--accent); font-weight: 900; }
.icon-button { width: 32px; color: var(--ink); font-size: 15px; }
.page { width: 100%; max-width: none; padding: 12px 22px 22px; overflow: auto; }

.grid { display: grid; gap: 8px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 10px; }
.two-col { grid-template-columns: 1.2fr .8fr; align-items: start; }
.card { min-width: 0; background: var(--paper); border: 1px solid #e8edf3; border-radius: var(--radius); box-shadow: 0 4px 14px rgba(33, 72, 111, .045); }
.stat-card { min-height: 70px; padding: 10px; }
.stat-card .label { color: var(--muted); font-size: 10.8px; font-weight: 800; }
.stat-card strong { display: block; margin-top: 5px; font-size: 18px; font-weight: 900; }
.stat-card small { display: block; margin-top: 9px; color: var(--muted); font-size: 10.5px; }
.stat-card.success strong { color: var(--green); }
.stat-card.danger strong { color: var(--red); }
.section-card { margin-top: 8px; }
.card-head { min-height: 46px; padding: 12px; border-bottom: 1px solid var(--surface-2); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-head h2 { font-size: 13px; font-weight: 900; line-height: 1.35; }
.card-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.card-body { padding: 12px; }

.filters, .toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.filters input, .filters select, .field input, .field select, .field textarea { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); outline: none; font-size: 11.5px; font-weight: 700; }
.filters input, .filters select { height: 30px; padding: 0 8px; }
.filters input { min-width: 190px; }
.filters .date-filter { height: 30px; padding: 0 4px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--muted); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 9.5px; font-weight: 800; }
.filters .date-filter input { width: 116px; min-width: 0; height: 26px; padding: 0; border: 0; background: transparent; font-size: 10.5px; }
.filters input:focus, .filters select:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.btn { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-size: 11.5px; font-weight: 800; }
.btn.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn.danger { border-color: #ffc8c4; background: #fff5f4; color: var(--red); }
.btn.small { min-height: 26px; padding: 0 8px; font-size: 11px; }
.btn.full { width: 100%; height: 36px; }

.table-wrap { overflow: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: auto; }
.data-table th { padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--faint); text-align: left; white-space: nowrap; font-size: 10.5px; font-weight: 900; letter-spacing: .03em; }
.data-table td { padding: 11px 10px; border-bottom: 1px solid var(--surface-2); vertical-align: middle; font-size: 12.5px; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover, .data-table tbody tr.selected { background: var(--accent-soft); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.status { padding: 3px 8px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; font-size: 10.5px; font-weight: 900; }
.status.success, .status.active, .status.done { background: #eaf8ef; color: var(--green); }
.status.error, .status.failed, .status.suspended { background: #ffeded; color: var(--red); }
.status.processing, .status.queued { background: #fff4df; color: var(--amber); }
.channel { color: var(--accent); font-size: 10.5px; font-weight: 900; }
.channel.web { color: #6e49ba; }
.pill { padding: 3px 7px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: 10.5px; font-weight: 800; }

.notice { padding: 10px 12px; border: 1px solid var(--blue-line); border-radius: var(--radius); background: #f3f7ff; color: #16408f; font-size: 12px; line-height: 1.5; }
.summary-grid { margin-bottom: 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.summary-card { padding: 11px; border: 1px solid #e8edf3; border-radius: var(--radius); background: var(--paper); box-shadow: 0 4px 14px rgba(33, 72, 111, .045); }
.summary-card span { color: var(--muted); font-size: 10.8px; font-weight: 800; }
.summary-card strong { display: block; margin-top: 5px; font-size: 17px; }
.filter-strip { margin-bottom: 10px; display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 8px; }
.filter { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.filter label { display: block; margin-bottom: 5px; color: var(--faint); font-size: 10.5px; font-weight: 900; letter-spacing: .04em; }
.filter select, .filter input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12.5px; font-weight: 800; }
.inquiry-search { grid-column: span 2; }
.admin-grid-2 { margin-bottom: 8px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); align-items: start; gap: 8px; }
.admin-panel { min-width: 0; padding: 12px; border: 1px solid #e8edf3; border-radius: var(--radius); background: var(--paper); box-shadow: 0 4px 14px rgba(33, 72, 111, .045); }
.admin-panel-head { margin-bottom: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-panel-head h2, .admin-panel-head h3 { font-size: 13px; font-weight: 900; line-height: 1.35; }
.admin-panel-head p { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.admin-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-field { margin-bottom: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: block; }
.admin-field > span, .garment-admin-row label > span { margin-bottom: 5px; color: var(--faint); display: block; font-size: 10.5px; font-weight: 900; letter-spacing: .04em; }
.admin-field input, .admin-field select, .admin-field textarea, .garment-admin-row input, .garment-admin-row select { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12.5px; font-weight: 800; }
.admin-field textarea { min-height: 66px; line-height: 1.5; }
.admin-field input[type="file"] { font-size: 11.5px; }
.admin-check { margin: 0 0 10px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.admin-check input { width: auto; }
.form-actions, .admin-actions { margin-top: 10px; justify-content: flex-start; }
.publish-admin { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); align-items: start; gap: 8px; }
.home-banner-panel { grid-column: 1 / -1; }
.publish-list { display: grid; gap: 8px; }
.publish-item { padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.publish-item strong { margin-bottom: 4px; display: block; font-size: 12.5px; }
.publish-item > span { color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.admin-image-preview { width: 100%; height: 120px; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #f2f3f1; object-fit: contain; cursor: zoom-in; display: block; }
.banner-preview { height: 240px; }
.notice-preview { height: 100px; }
.garment-preview { grid-column: 1 / -1; height: 90px; }
.current-image { margin-top: 8px; }
.event-filters { grid-template-columns: 1fr 1fr; }
.garment-head { margin-top: 12px; }
.garment-admin-list { margin-bottom: 8px; display: grid; gap: 8px; }
.garment-admin-row { padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; grid-template-columns: minmax(140px,1fr) 120px 110px minmax(170px,1.2fr) auto; align-items: end; gap: 6px; }
.garment-admin-row label { min-width: 0; }
.garment-admin-row input, .garment-admin-row select { height: 30px; padding: 0 7px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.garment-admin-row input[type="file"] { padding-top: 5px; font-size: 10.5px; }
.garment-admin-row small { margin-top: 4px; color: var(--muted); display: block; font-size: 10px; }
.garment-admin-row .shopping-url { grid-column: 1 / -1; }
.inquiry-table { min-width: 850px; }
.inquiry-detail { min-height: 180px; }
.inquiry-messages { max-height: 390px; margin-bottom: 12px; padding-right: 5px; overflow-y: auto; display: grid; gap: 8px; }
.inquiry-message { padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.inquiry-message.admin { background: #f3f7ff; }
.inquiry-message > div:first-child { margin-bottom: 7px; display: flex; justify-content: space-between; gap: 8px; }
.inquiry-message span { color: var(--muted); font-size: 10.5px; }
.inquiry-message p { white-space: pre-wrap; line-height: 1.55; }
.inquiry-files { margin-top: 9px; justify-content: flex-start; }
.image-preview-overlay { position: fixed; z-index: 9999; inset: 0; padding: 32px; background: rgba(0,0,0,.82); display: flex; align-items: center; justify-content: center; }
.image-preview-overlay img { max-width: 94vw; max-height: 90vh; border-radius: 10px; background: #fff; object-fit: contain; display: block; }
.image-preview-overlay button { position: fixed; top: 18px; right: 22px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #fff; color: #111; font-size: 28px; line-height: 38px; }
.empty { padding: 42px 18px; color: var(--muted); text-align: center; font-size: 11.5px; }
.empty strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 12.5px; }
.action-list, .list-stack { display: grid; gap: 8px; }
.action-row, .list-item { padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.action-row { display: flex; align-items: center; justify-content: space-between; }
.action-row strong, .list-item h3 { display: block; margin-bottom: 4px; font-size: 12.5px; }
.action-row small, .list-item p { color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.list-item { cursor: pointer; }
.list-item:hover { border-color: var(--blue-line); }
.kv { padding: 4px 0; display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.chart-bars { height: 170px; padding-top: 15px; display: flex; align-items: flex-end; gap: 8px; }
.chart-bar { min-width: 24px; flex: 1; color: var(--muted); text-align: center; font-size: 10px; }
.chart-bar i { min-height: 4px; margin-bottom: 6px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--accent-2), var(--accent)); display: block; }
.loading { padding: 70px 20px; color: var(--muted); text-align: center; }
.loading::before { content: ""; width: 24px; height: 24px; margin: 0 auto 10px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; display: block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.detail-panel { position: fixed; z-index: 50; top: 0; right: -580px; bottom: 0; width: min(560px, 94vw); padding: 18px; overflow: auto; background: var(--paper); border-left: 1px solid var(--line); box-shadow: -12px 0 28px rgba(33, 72, 111, .1); transition: right .18s ease; }
.detail-panel.open { right: 0; }
.detail-panel > header, .modal header { padding-bottom: 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.detail-panel h2, .modal h2 { margin-top: 4px; font-size: 15px; }
.detail-section { padding: 14px 0; border-bottom: 1px solid var(--surface-2); }
.detail-section h3 { margin-bottom: 10px; font-size: 12px; }
.detail-section-head { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-section-head h3 { margin-bottom: 0; }
.detail-result-image, .image-unavailable { width: 100%; min-height: 220px; border: 1px solid var(--line); border-radius: var(--radius); background: #f7f9fb; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.detail-result-image img { display: block; width: auto; height: auto; max-width: 100%; max-height: 540px; object-fit: contain; }
.image-loading, .image-unavailable { padding: 28px; color: var(--muted); text-align: center; font-size: 11.5px; line-height: 1.55; }
.image-loading { width: 100%; }
.panel-scrim { position: fixed; z-index: 40; inset: 0; display: none; background: rgba(21, 26, 34, .22); }
.panel-scrim.show { display: block; }

.dashboard-analysis { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); align-items: start; }
.segmented { padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: inline-flex; gap: 2px; }
.segmented button { min-height: 26px; padding: 0 10px; border: 0; border-radius: calc(var(--radius) - 2px); background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 900; }
.segmented button.active { background: var(--paper); color: var(--accent); box-shadow: 0 1px 4px rgba(33, 72, 111, .12); }
.trend-summary { margin-bottom: 12px; display: flex; align-items: center; gap: 7px 16px; flex-wrap: wrap; color: var(--muted); font-size: 10.5px; }
.trend-summary span { display: inline-flex; align-items: baseline; gap: 4px; }
.trend-summary strong { color: var(--ink); font-size: 13px; }
.trend-chart { width: 100%; height: 175px; min-height: 0; overflow: visible; display: block; }
.trend-grid-line { stroke: #e9eef5; stroke-width: 1; }
.trend-axis-text { fill: var(--muted); font-size: 9px; }
.trend-value-text { fill: var(--accent); stroke: var(--paper); stroke-width: 3px; paint-order: stroke; font-size: 9px; font-weight: 900; }
.trend-area { fill: url(#dashboardTrendArea); }
.trend-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.trend-point { fill: var(--paper); stroke: var(--accent); stroke-width: 2.5; }
.demand-list { display: grid; gap: 15px; }
.demand-row { display: grid; gap: 7px; }
.demand-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.demand-label strong { font-size: 11.5px; }
.demand-label span { color: var(--muted); font-size: 10.5px; }
.demand-track { height: 7px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.demand-track i { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); display: block; }
.danger-notice { border-color: #ffc8c4; background: #fff5f4; color: #9f2420; }
.request-load-state { min-height: 46px; padding: 12px 16px; border-top: 1px solid var(--surface-2); color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; font-size: 10.5px; }
.request-load-sentinel { height: 1px; }
.request-load-spinner::before { content: ""; width: 13px; height: 13px; margin-right: 7px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; vertical-align: -3px; display: inline-block; animation: spin .7s linear infinite; }
.request-loading { padding: 42px 20px; }
.analytics-toolbar { margin-bottom: 10px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.analytics-toolbar h2 { margin-top: 3px; font-size: 15px; }
.analytics-toolbar small { margin-top: 4px; color: var(--muted); display: block; font-size: 10.5px; }
.analytics-filter-bar { display: flex; align-items: flex-end; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.analytics-filter-bar > span { padding-bottom: 8px; color: var(--muted); font-size: 10px; }
.analytics-filter-bar label { color: var(--muted); display: grid; gap: 4px; font-size: 9.5px; font-weight: 800; }
.analytics-filter-bar input, .analytics-filter-bar select { min-width: 124px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); outline: none; font-size: 10.5px; font-weight: 700; }
.analytics-filter-bar select { min-width: 150px; }
.analytics-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 10px; }
.analytics-kpis.web-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.analytics-summary-strip { margin-bottom: 10px; padding: 12px 16px; grid-template-columns: repeat(3, minmax(0,1fr)); border-radius: var(--radius); background: linear-gradient(120deg, #102641, #1b4d78); color: #fff; box-shadow: 0 8px 20px rgba(16,38,65,.14); }
.analytics-summary-strip div { padding: 4px 14px; border-right: 1px solid rgba(255,255,255,.16); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.analytics-summary-strip div:last-child { border-right: 0; }
.analytics-summary-strip span { color: rgba(255,255,255,.65); font-size: 10.5px; font-weight: 800; }
.analytics-summary-strip strong { font-size: 14px; }
.analytics-main-grid { grid-template-columns: minmax(0,1.2fr) minmax(320px,.8fr); align-items: start; }
.analytics-wide { grid-column: 1 / -1; }
.hourly-chart { height: 230px; padding: 18px 2px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(24, minmax(8px,1fr)); align-items: end; gap: 3px; }
.hourly-column { height: 100%; min-width: 0; display: grid; grid-template-rows: 20px 1fr 22px; align-items: end; text-align: center; }
.hourly-value { height: 18px; color: var(--accent); overflow: hidden; font-size: 8px; font-weight: 900; }
.hourly-bar { height: 100%; min-height: 20px; border-radius: 3px 3px 0 0; background: var(--surface); display: flex; align-items: flex-end; overflow: hidden; }
.hourly-bar i { width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #4b8cff, var(--accent)); display: block; }
.hourly-column span { padding-top: 7px; color: var(--muted); white-space: nowrap; font-size: 8px; }
.analytics-table tbody tr { cursor: default; }
.analytics-table tbody tr:hover { background: var(--surface); }
.metric-rate { color: var(--green); font-weight: 900; }
.analytics-notice { margin-top: 10px; }

.modal-wrap { position: fixed; z-index: 80; inset: 0; padding: 20px; background: rgba(21, 26, 34, .3); display: grid; place-items: center; }
.modal { width: min(500px, 100%); max-height: 88vh; padding: 16px; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 34px rgba(33, 72, 111, .16); }
.modal footer { padding-top: 14px; display: flex; justify-content: flex-end; gap: 6px; }
.field { display: block; margin: 11px 0; color: var(--faint); font-size: 10.5px; font-weight: 900; }
.field input, .field select, .field textarea { width: 100%; margin-top: 5px; padding: 8px 9px; display: block; }
.field input, .field select { min-height: 34px; }
.field textarea { min-height: 72px; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: -70px; padding: 9px 12px; transform: translateX(-50%); border-radius: var(--radius); background: var(--ink); color: #fff; font-size: 11px; transition: bottom .16s ease; }
.toast.show { bottom: 20px; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two-col, .dashboard-analysis { grid-template-columns: 1fr; }
  .summary-grid, .filter-strip { grid-template-columns: repeat(2, 1fr); }
  .admin-grid-2, .publish-admin { grid-template-columns: 1fr; }
  .home-banner-panel { grid-column: auto; }
  .garment-admin-row { grid-template-columns: 1fr; }
  .garment-admin-row .shopping-url, .garment-preview { grid-column: auto; }
  .analytics-kpis, .analytics-kpis.web-kpis { grid-template-columns: repeat(3, 1fr); }
  .analytics-main-grid { grid-template-columns: 1fr; }
  .analytics-wide { grid-column: auto; }
}
@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar, .app-shell.sidebar-collapsed .sidebar { width: 100%; padding: 12px 9px; border-right: 0; border-bottom: 1px solid var(--line); }
  .app-shell.sidebar-collapsed .brand, .app-shell.sidebar-collapsed .nav-section > p, .app-shell.sidebar-collapsed .sidebar-footer { display: block; }
  .app-shell.sidebar-collapsed .nav-item span:not(.nav-icon) { display: inline; }
  .app-shell.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 8px 7px; }
  .menu-toggle { display: none; }
  #nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .nav-section { min-width: 0; }
  .sidebar-footer { display: none !important; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { justify-content: flex-start; }
  .page { padding: 12px 18px 18px; }
  .analytics-toolbar { align-items: stretch; flex-direction: column; }
  .analytics-filter-bar { justify-content: flex-start; }
}
@media (max-width: 560px) {
  #nav { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .filters input { width: 100%; min-width: 0; }
  .summary-grid, .filter-strip, .admin-split { grid-template-columns: 1fr; }
  .inquiry-search { grid-column: auto; }
  .topbar { padding: 12px 14px 8px; }
  .page { padding: 8px 12px 16px; }
  .sync-state { display: none; }
  .request-filters { width: 100%; justify-content: stretch; }
  .request-filters select { flex: 1; }
  .request-filters .date-filter { flex: 1; }
  .analytics-kpis, .analytics-kpis.web-kpis, .analytics-summary-strip { grid-template-columns: 1fr; }
  .analytics-summary-strip div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.16); }
  .analytics-summary-strip div:last-child { border-bottom: 0; }
  .analytics-filter-bar label { flex: 1; }
  .analytics-filter-bar input, .analytics-filter-bar select { width: 100%; min-width: 0; }
  .trend-chart { height: 155px; }
}
