/* ========================================================
   DAYONE ADMIN — Dashboard shell (sidebar + topbar)
   ======================================================== */
:root {
  --c-bg: #f5f6fa;
  --c-surface: #ffffff;
  --c-border: #e5e7eb;
  --c-border-soft: #eef0f3;
  --c-text: #111827;
  --c-text-sub: #6b7280;
  --c-text-muted: #9ca3af;
  --c-brand: #5a5448;
  --c-brand-hover: #3f3a31;
  --c-brand-soft: #f4efe4;
  --c-sidebar: #1f2937;
  --c-sidebar-hover: #374151;
  --c-sidebar-active: #5a5448;
  --c-sidebar-text: #cbd5e1;
  --c-sidebar-dim: #6b7280;
  --c-danger: #dc2626;
  --c-danger-soft: #fef2f2;
  --c-success: #16a34a;
  --c-warn: #f59e0b;
  --c-info: #2563eb;
  --sb-w: 240px;
  --tb-h: 60px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-pop: 0 8px 24px rgba(16, 24, 40, 0.12);
}

* {
  box-sizing: border-box;
}
.admin-body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.admin-body:not(.auth-ready) .admin-sidebar,
.admin-body:not(.auth-ready) .admin-backdrop,
.admin-body:not(.auth-ready) .admin-layout,
.admin-body:not(.auth-ready) .toast {
  visibility: hidden;
}

/* ========== SIDEBAR ========== */
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sb-w);
  height: 100vh;
  background: var(--c-sidebar);
  color: var(--c-sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform 0.2s ease;
}
.sidebar-brand {
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--c-brand);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-brand-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #fff;
}
.sidebar-brand-text small {
  display: block;
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 400;
  color: var(--c-sidebar-dim);
  margin-top: 2px;
}

.sidebar-nav {
  padding: 14px 12px;
  flex: 1;
  overflow-y: auto;
}
.sidebar-section {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--c-sidebar-dim);
  padding: 14px 12px 6px;
  text-transform: uppercase;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--c-sidebar-text);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 140ms;
  margin-bottom: 2px;
}
.sidebar-link:hover {
  background: var(--c-sidebar-hover);
  color: #fff;
}
.sidebar-link.active {
  background: var(--c-sidebar-active);
  color: #fff;
}
.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}
.sidebar-link.active svg {
  opacity: 1;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user {
  flex: 1;
  min-width: 0;
}
.sidebar-user-name {
  font-size: 12px;
  color: #fff;
  font-weight: 500;
}
.sidebar-user-email {
  font-size: 11px;
  color: var(--c-sidebar-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-logout {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--c-sidebar-text);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  transition: all 140ms;
}
.sidebar-logout:hover {
  background: var(--c-danger);
  border-color: var(--c-danger);
  color: #fff;
}

/* ========== LAYOUT ========== */
.admin-layout {
  margin-left: var(--sb-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.admin-topbar {
  position: sticky;
  top: 0;
  height: var(--tb-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 20;
}
.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.admin-topbar h1 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-topbar-sub {
  font-size: 12px;
  color: var(--c-text-sub);
}
.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-toggle {
  display: none;
  border: none;
  background: none;
  padding: 6px;
  cursor: pointer;
  border-radius: 4px;
}
.sidebar-toggle svg {
  width: 22px;
  height: 22px;
  color: var(--c-text);
}
/* nav 라벨: 데스크탑=긴 라벨, 모바일=축약 */
.nav-label-short {
  display: none;
}
/* topbar 로그아웃: 기본 숨김 (사이드바의 로그아웃 사용), 모바일에서만 표시 */
.topbar-logout {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--c-text-sub);
  cursor: pointer;
  min-width: 32px;
  min-height: 32px;
}
.topbar-logout:hover {
  background: #f3f4f6;
  color: var(--c-text);
}

/* API Status */
.admin-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: 11px;
  color: var(--c-text-sub);
  letter-spacing: 0.3px;
}
.admin-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-text-muted);
}
.admin-status[data-state="online"] .dot {
  background: var(--c-success);
}
.admin-status[data-state="offline"] .dot {
  background: var(--c-danger);
}
.admin-status[data-state="offline"] .txt::before {
  content: "Fallback · ";
}

/* Content */
.admin-content {
  padding: 28px 28px 200px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
}
.admin-main {
  padding: 0;
  margin: 0;
  max-width: none;
}

/* Page header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-header h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}
.page-header p {
  font-size: 13px;
  color: var(--c-text-sub);
  margin: 0;
  line-height: 1.6;
}

/* Section / Card */
.admin-section,
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.card-tight {
  padding: 16px 18px;
}
.admin-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.admin-section-head h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}
.admin-sub {
  font-size: 13px;
  color: var(--c-text-sub);
  margin: 0;
  line-height: 1.6;
}
.admin-sub strong {
  color: var(--c-text);
}

/* ========== DASHBOARD GRID ========== */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.dash-card {
  display: block;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: inherit;
  text-decoration: none;
  transition: all 160ms;
  box-shadow: var(--shadow-card);
}
.dash-card:hover {
  border-color: var(--c-brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-pop);
}
.dash-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.dash-card-head h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.2px;
  color: var(--c-text);
}
.dash-card-count {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-brand);
  line-height: 1;
}
.dash-card p {
  font-size: 11px;
  color: var(--c-text-sub);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 1200px) {
  .dash-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== DASHBOARD SUMMARY BLOCKS ========== */
.dash-block {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.dash-block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.dash-block-head h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--c-text);
  letter-spacing: -0.2px;
}
.dash-block-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--c-text-muted);
  margin-left: 4px;
}
.dash-block-link {
  font-size: 12px;
  color: var(--c-brand);
  text-decoration: none;
  font-weight: 500;
}
.dash-block-link:hover {
  text-decoration: underline;
}
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 860px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.dash-kpi {
  background: #fafbfc;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 14px 16px;
  min-width: 0;
}
.dash-kpi-label {
  font-size: 11px;
  color: var(--c-text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.dash-kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.dash-kpi-foot {
  font-size: 11px;
  color: var(--c-text-muted);
  margin-top: 6px;
}
/* 관리 바로가기 블록 안의 dash-grid는 margin-bottom 제거 */
.dash-block .dash-grid {
  margin-bottom: 0;
}
/* 대시보드 내 top-table 여백 조정 */
.dash-block .top-table {
  margin-top: 2px;
}
.dash-block .top-table tbody td {
  padding: 10px 10px;
}
.src-chip,
.status-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.6;
}
.src-chip.src-home {
  background: #eef4ff;
  color: #1e40af;
}
.src-chip.src-meta {
  background: #fef4e6;
  color: #b45309;
}
.status-chip {
  background: #f3f4f6;
  color: var(--c-text-sub);
}

/* ========== TOOLBAR ========== */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-row label {
  font-size: 12px;
  color: var(--c-text-sub);
}
.filter-row select,
.filter-row input[type="search"] {
  padding: 7px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--c-surface);
  min-width: 180px;
  color: var(--c-text);
}
.filter-row select:focus,
.filter-row input:focus {
  outline: none;
  border-color: var(--c-brand);
}

/* ========== DATA TABLE ========== */
.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  background: #fafbfc;
  color: var(--c-text-sub);
  font-weight: 500;
  letter-spacing: 0.3px;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--c-border);
  font-size: 11px;
  text-transform: uppercase;
}
.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--c-border-soft);
  vertical-align: middle;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr:hover {
  background: #fafbfc;
  cursor: pointer;
}
.data-table tbody tr.is-selected {
  background: var(--c-brand-soft);
}
.data-table code {
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--c-brand);
  font-family: "Courier New", monospace;
}
.cell-thumb {
  width: 44px;
  height: 44px;
  background: #f3f4f6 no-repeat center/cover;
  border-radius: 4px;
  border: 1px solid var(--c-border-soft);
}
.cell-title {
  font-weight: 500;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text);
}
.cell-sub {
  font-size: 11px;
  color: var(--c-text-muted);
}
.td-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

/* ========== BUTTONS ========== */
.btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 140ms;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.btn-primary {
  background: var(--c-brand);
  color: #fff;
  border-color: var(--c-brand);
}
.btn-primary:hover:not(:disabled) {
  background: var(--c-brand-hover);
  border-color: var(--c-brand-hover);
}
.btn-ghost {
  background: var(--c-surface);
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--c-text-sub);
  background: var(--c-bg);
}
.btn-danger {
  background: var(--c-danger);
  color: #fff;
  border-color: var(--c-danger);
}
.btn-danger:hover:not(:disabled) {
  opacity: 0.9;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  background: var(--c-surface);
  color: var(--c-text-sub);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 140ms;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover:not(:disabled) {
  color: var(--c-text);
  border-color: var(--c-text-sub);
}
.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.icon-btn.danger:hover:not(:disabled) {
  color: var(--c-danger);
  border-color: var(--c-danger);
}

/* ========== FORM FIELDS ========== */
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 12px;
  color: var(--c-text-sub);
  margin-bottom: 6px;
  font-weight: 500;
}
.field input[type="url"],
.field input[type="text"],
.field input[type="number"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="password"],
.field input[type="search"],
.field input[type="date"],
.field input[type="datetime-local"],
.field select,
.field textarea,
.meta-form textarea,
.admin-panel input,
.admin-panel select,
.admin-panel textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-surface);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-brand);
}
.field input[type="file"] {
  padding: 6px 0;
  font-size: 12px;
  color: var(--c-text-sub);
  border: none;
  background: transparent;
}
.field .hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--c-text-muted);
  line-height: 1.6;
}
.field .hint code {
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
}
.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.field-row .or {
  font-size: 11px;
  color: var(--c-text-muted);
}
.field-row input {
  flex: 1;
  min-width: 200px;
}
.field-inline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 640px) {
  .field-inline {
    grid-template-columns: 1fr;
  }
}
.req {
  color: var(--c-danger);
}

.field-preview {
  margin-bottom: 12px;
}
.field-preview.hidden {
  display: none;
}
.preview {
  width: 100%;
  height: 180px;
  background-color: #f3f4f6;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.pair-fold {
  margin: 14px 0;
  background: #fafbfc;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.pair-fold summary {
  font-size: 12px;
  color: var(--c-text-sub);
  cursor: pointer;
  padding: 4px 0;
}
.pair-fold[open] summary {
  margin-bottom: 12px;
  color: var(--c-text);
}

/* ========== BADGES ========== */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: #f3f4f6;
  color: #4b5563;
  font-weight: 500;
}
.status-pending {
  background: #fef3c7;
  color: #92400e;
}
.status-contact {
  background: #dbeafe;
  color: #1e40af;
}
.status-estimate {
  background: #d1fae5;
  color: #065f46;
}
.status-done {
  background: #dcfce7;
  color: #14532d;
}
.status-cancel {
  background: #fee2e2;
  color: #991b1b;
}
.src-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  line-height: 1.5;
}
.src-homepage {
  background: #eef2ff;
  color: #4338ca;
}
.src-meta {
  background: #dbeafe;
  color: #1d4ed8;
}
.src-google {
  background: #dbeafe;
  color: #1e40af;
}
.src-naver {
  background: #dcfce7;
  color: #166534;
}
.src-youtube {
  background: #fee2e2;
  color: #b91c1c;
}
.src-kakao {
  background: #fef3c7;
  color: #854d0e;
}
.src-referral,
.src-other {
  background: #f1f5f9;
  color: #475569;
}
.session-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
  margin-left: 6px;
}
.session-pill.is-new {
  background: #d1fae5;
  color: #065f46;
}
.session-pill.is-repeat {
  background: #fef3c7;
  color: #92400e;
}

/* ========== MEMO THREAD ========== */
.memo-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.memo-item {
  background: #fafbfc;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 10px 12px;
}
.memo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--c-text-sub);
  margin-bottom: 6px;
}
.memo-head strong {
  color: var(--c-text);
  font-weight: 600;
}
.memo-actions {
  display: flex;
  gap: 4px;
}
.memo-actions button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-text-sub);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}
.memo-actions button:hover {
  background: #f3f4f6;
  color: var(--c-text);
}
.memo-body {
  font-size: 13px;
  color: var(--c-text);
  white-space: pre-wrap;
  line-height: 1.5;
}
.memo-editor textarea {
  width: 100%;
  min-height: 70px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 8px 10px;
  box-sizing: border-box;
  resize: vertical;
}
.memo-editor-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  justify-content: flex-end;
}
.memo-empty {
  font-size: 12px;
  color: var(--c-text-sub);
  padding: 10px 0;
}

/* ========== HISTORY (prev submissions) ========== */
.history-box {
  border: 1px dashed var(--c-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafbfc;
  margin-bottom: 10px;
}
.history-box h4 {
  margin: 0 0 6px 0;
  font-size: 12px;
  color: var(--c-text-sub);
  font-weight: 600;
}
.history-item {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  padding: 4px 0;
}
.history-item .h-date {
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}
.history-item .h-meta {
  color: var(--c-text-sub);
}

/* ========== SLIDE LIST (hero) ========== */
.slides-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.slide-item {
  display: grid;
  grid-template-columns: 40px 160px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: border-color 140ms;
}
.slide-item:hover {
  border-color: var(--c-text-sub);
}
.slide-index {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-muted);
  text-align: center;
}
.slide-thumb {
  width: 100%;
  height: 90px;
  background: #f3f4f6 no-repeat center/cover;
  border-radius: 4px;
  border: 1px solid var(--c-border-soft);
}
.slide-meta {
  min-width: 0;
}
.slide-alt {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slide-url {
  font-size: 11px;
  color: var(--c-text-muted);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slide-href {
  font-size: 11px;
  color: var(--c-text-muted);
}
.slide-href.has-link {
  color: var(--c-brand);
}
.slide-actions {
  display: flex;
  gap: 4px;
}

.empty-state {
  text-align: center;
  padding: 44px 0;
  color: var(--c-text-muted);
  font-size: 13px;
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
}

/* ADD form */
.slide-add {
  border-top: 1px solid var(--c-border-soft);
  padding-top: 18px;
}
.btn-add {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-sm);
  color: var(--c-text-sub);
  font-size: 13px;
  cursor: pointer;
  transition: all 140ms;
}
.btn-add:hover:not(:disabled) {
  color: var(--c-text);
  border-color: var(--c-text-sub);
  background: #fafbfc;
}
.btn-add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.add-form {
  margin-top: 14px;
  background: #fafbfc;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 18px;
}
.add-form.hidden {
  display: none;
}

/* ========== SAVE BAR ========== */
.save-bar {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--c-border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.save-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}
.count-label {
  color: var(--c-text-sub);
}
.count-label strong {
  color: var(--c-text);
}
.dirty-label {
  display: inline-block;
  padding: 2px 10px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  font-size: 11px;
}
.dirty-label.hidden {
  display: none;
}
.save-actions {
  display: flex;
  gap: 8px;
}

/* ========== MODAL ========== */
.modal[hidden] {
  display: none;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
}
.modal-panel {
  position: relative;
  background: var(--c-surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-pop);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--c-border-soft);
}
.modal-head h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.modal-body {
  padding: 20px 22px;
}

/* ========== BLOCK EDITOR (community) ========== */
.meta-form {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}
.block-editor {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 22px;
}
.be-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}
.block-guide {
  background: #f8fafc;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--c-text-sub);
}
.block-guide summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--c-text);
  padding: 2px 0;
  user-select: none;
}
.block-guide[open] summary {
  margin-bottom: 8px;
}
.block-guide ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}
.block-guide strong {
  color: var(--c-text);
}
.blocks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.block-item {
  background: #fafbfc;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.block-tag {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--c-text-sub);
  font-weight: 600;
  text-transform: uppercase;
}
.block-actions {
  display: flex;
  gap: 4px;
}
.block-text {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  background: var(--c-surface);
}
.block-text:focus {
  outline: none;
  border-color: var(--c-brand);
}
.block-image-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 640px) {
  .block-image-body {
    grid-template-columns: 1fr;
  }
}
.block-image-preview {
  width: 100%;
  height: 120px;
  background: #f3f4f6;
  border: 1px solid var(--c-border-soft);
  border-radius: 4px;
  overflow: hidden;
}
.block-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.block-image-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.block-image-fields input[type="url"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  font-size: 12px;
}
.blocks-add {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ========== ESTIMATES DETAIL ========== */
.est-quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.est-stat-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 0;
}
.est-stat-label {
  display: inline-flex;
  align-items: center;
  color: var(--c-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.est-stat-card strong {
  display: block;
  color: var(--c-text);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.est-stat-card em {
  display: block;
  margin-top: 6px;
  color: var(--c-text-muted);
  font-size: 12px;
  font-style: normal;
}
@media (max-width: 760px) {
  .est-quick-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .est-stat-card {
    padding: 12px 10px;
  }
  .est-stat-card strong {
    font-size: 22px;
  }
}
.est-layout {
  display: block;
}
.est-list {
  display: grid;
  gap: 16px;
  align-items: start;
}
.est-date-group {
  min-width: 0;
  display: grid;
  gap: 8px;
}
.est-date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}
.est-date-head strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}
.est-date-head span {
  font-size: 11px;
  color: var(--c-text-muted);
  white-space: nowrap;
}
.est-date-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.est-card {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 10px;
  text-align: left;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--c-text);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition:
    border-color 140ms,
    background 140ms,
    box-shadow 140ms;
}
.est-card:hover {
  border-color: var(--c-text-muted);
  background: #fafbfc;
}
.est-card.is-selected {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  box-shadow: 0 0 0 2px rgba(90, 84, 72, 0.12);
}
.est-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  min-width: 0;
}
.est-card-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.est-card-title strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
}
.est-card-title small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text-sub);
  font-size: 12px;
  line-height: 1.4;
}
.est-card-tags {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}
.est-card-tags .badge,
.est-card-tags .src-badge,
.branch-chip,
.est-card-info .session-pill {
  white-space: nowrap;
}
.est-card-info .session-pill {
  margin-left: 0;
}
.branch-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  background: #f3f4f6;
  color: var(--c-text-sub);
}
.est-card-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  padding: 10px 0;
  border-top: 1px solid var(--c-border-soft);
  border-bottom: 1px solid var(--c-border-soft);
}
.est-card-info > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.est-card-info b,
.est-card-summary b {
  font-size: 10px;
  color: var(--c-text-muted);
  font-weight: 700;
  letter-spacing: 0.2px;
}
.est-card-info em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  font-size: 12px;
  color: var(--c-text);
  line-height: 1.5;
}
.est-card-summary {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.est-card-summary em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  font-size: 12px;
  color: var(--c-text);
  line-height: 1.5;
}
.est-card-action {
  justify-self: end;
  color: var(--c-brand);
  font-size: 12px;
  font-weight: 700;
}
@media (max-width: 760px) {
  .est-list {
    grid-template-columns: 1fr;
  }
  .est-date-cards {
    grid-template-columns: 1fr;
  }
  .est-card-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .est-card-info {
    grid-template-columns: 1fr;
  }
  .est-card-summary em {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}
.est-modal {
  padding: 18px;
}
.est-edit-modal {
  z-index: 70;
}
.est-modal-panel {
  max-width: min(1040px, calc(100vw - 36px));
}
.est-edit-panel {
  max-width: min(760px, calc(100vw - 36px));
}
.est-modal-head {
  align-items: flex-start;
  gap: 14px;
}
.modal-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}
.est-detail-body {
  padding: 18px 20px 20px;
}
.est-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 12px;
}
.est-info-panel {
  min-width: 0;
  background: #fafbfc;
  border: 1px solid var(--c-border-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.est-info-panel h3,
.est-info-panel .history-box h4 {
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: 0.3px;
  color: var(--c-text-sub);
  text-transform: uppercase;
}
.est-info-main {
  grid-row: span 3;
}
.est-manage-panel .form-actions,
.est-memo-panel .form-actions {
  margin-top: 10px;
}
.est-manage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}
.est-history-panel .history-box {
  border: 0;
  background: transparent;
  padding: 0;
}
.est-memo-panel .memo-thread {
  max-height: 240px;
  overflow: auto;
}
.customer-edit-form {
  display: block;
}
@media (max-width: 820px) {
  .est-modal {
    align-items: stretch;
    padding: 10px;
  }
  .est-modal-panel,
  .est-edit-panel {
    max-width: none;
    max-height: calc(100vh - 20px);
  }
  .est-modal-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .modal-head-actions {
    width: 100%;
  }
  .modal-head-actions .btn {
    flex: 1;
  }
  .est-detail-body {
    padding: 14px;
  }
  .est-detail-grid {
    grid-template-columns: 1fr;
  }
  .est-info-main {
    grid-row: auto;
  }
  .est-manage-grid {
    grid-template-columns: 1fr;
  }
}

/* 모바일 (≤640px): 하단 가로 네비게이션 + 테이블 → 카드 뷰 */
@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }
  /* 사이드바 → 하단 고정 가로 탭바로 전환 */
  .admin-sidebar {
    top: auto !important;
    bottom: 0;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-width: 100vw;
    height: 58px;
    transform: none !important;
    background: #fff;
    border-right: none;
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
    padding: 0 !important;
    z-index: 40;
    display: flex !important;
    flex-direction: row;
    overflow: hidden;
    box-sizing: border-box;
  }
  .sidebar-brand,
  .sidebar-footer {
    display: none !important;
  }
  .sidebar-nav {
    display: flex;
    flex-direction: row;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    gap: 0;
    overflow: visible;
  }
  .sidebar-link {
    flex: 1 1 0;
    min-width: 0;
    width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px;
    margin: 0;
    border-radius: 0;
    font-size: 10px;
    font-weight: 500;
    color: var(--c-text-sub, #64748b);
    background: transparent !important;
    position: relative;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
  }
  .sidebar-link:hover {
    background: transparent !important;
    color: var(--c-text);
  }
  .sidebar-link svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
  }
  .sidebar-link.active {
    color: var(--c-brand, #1a2f4e) !important;
    background: transparent !important;
  }
  .sidebar-link.active svg {
    opacity: 1;
  }
  .sidebar-link.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22%;
    right: 22%;
    height: 2.5px;
    background: var(--c-brand, #1a2f4e);
    border-radius: 0 0 3px 3px;
  }
  .nav-label-full {
    display: none;
  }
  .nav-label-short {
    display: inline;
    font-size: 10px;
  }

  /* 레이아웃: 하단 nav 만큼 본문 여백 */
  .admin-layout {
    margin-left: 0 !important;
  }
  .admin-content {
    padding-bottom: 200px;
  }

  /* 햄버거/백드롭 숨김 */
  .sidebar-toggle {
    display: none !important;
  }
  .admin-backdrop {
    display: none !important;
  }

  /* 상단바 로그아웃 버튼 활성화 */
  .topbar-logout {
    display: inline-flex;
  }
  /* topbar 공간 확보: status 는 dot만 */
  .admin-topbar {
    padding: 0 12px;
  }
  .admin-status {
    padding: 4px 6px;
  }
  .admin-status .txt {
    display: none;
  }
  .admin-topbar-right {
    gap: 6px;
  }

  /* wrapper 박스 제거 — 카드별로 독립 테두리만 */
  .data-table-wrap.est-list {
    overflow: visible;
    border: none;
    background: transparent;
    border-radius: 0;
  }
  .est-list .data-table {
    display: block;
    width: 100%;
    min-width: 0;
    border: none;
    background: transparent;
    table-layout: auto;
  }
  .est-list .data-table thead {
    display: none;
  }
  .est-list .data-table tbody {
    display: block;
    width: 100%;
  }
  .est-list .data-table tbody tr {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
  }
  .est-list .data-table tbody td .badge,
  .est-list .data-table tbody td .src-badge {
    display: inline-block;
    max-width: 100%;
  }
  .est-list .data-table tbody tr.is-selected {
    border-color: var(--c-text-sub, #64748b);
    box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.12);
  }
  /* 기본 셀: grid 2컬럼 (라벨 고정폭, 값 1fr) — flex+anonymous text 이슈 회피 */
  .est-list .data-table tbody td {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px;
    align-items: baseline;
    padding: 5px 0;
    border: none;
    font-size: 13px;
    color: var(--c-text);
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .est-list .data-table tbody td::before {
    content: attr(data-label);
    font-size: 11px;
    color: var(--c-text-sub, #64748b);
    font-weight: 500;
    white-space: nowrap;
  }
  .est-list .data-table tbody td > * {
    min-width: 0;
    max-width: 100%;
  }
  /* 이름 셀은 상단 강조 블록 — 라벨 숨기고 큰 제목 + 부제 */
  .est-list .data-table tbody td[data-label="이름"] {
    display: block;
    padding: 0 0 8px;
    border-bottom: 1px dashed var(--c-border);
    margin: 0 0 8px;
  }
  .est-list .data-table tbody td[data-label="이름"]::before {
    display: none;
  }
  .est-list .data-table tbody td[data-label="이름"] .cell-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--c-text);
    word-break: break-word;
  }
  .est-list .data-table tbody td[data-label="이름"] .cell-sub {
    display: block;
    margin-top: 2px;
    color: var(--c-text-sub, #64748b);
    font-size: 11px;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.4;
  }
  /* 비어있는 값은 셀 자체 숨김 (라벨만 덩그러니 남는 문제 방지) */
  .est-list .data-table tbody td:empty {
    display: none;
  }

  /* 필터 바: 라벨 숨기고 입력요소 전폭 */
  .filter-row {
    gap: 8px;
  }
  .filter-row label {
    display: none;
  }
  .filter-row select {
    min-width: 0;
    flex: 1 1 45%;
    font-size: 13px;
  }
  .filter-row input[type="search"] {
    min-width: 0;
    flex: 1 1 100%;
    font-size: 13px;
  }

  /* 상세 영역 - 여백 축소, overflow 방지, 헤더 줄바꿈, dl 블록 레이아웃 */
  .est-detail {
    padding: 14px;
    min-height: auto;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }
  .est-detail * {
    max-width: 100%;
  }
  .est-detail .btn {
    max-width: 100%;
    white-space: normal;
  }
  .form-actions {
    flex-wrap: wrap;
  }
  .form-actions .btn {
    flex: 1 1 auto;
  }
  .detail-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }
  .detail-head h2 {
    font-size: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .detail-dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .detail-dl dt {
    font-size: 11px;
    margin-top: 10px;
  }
  .detail-dl dt:first-child {
    margin-top: 0;
  }
  .detail-dl dd {
    font-size: 13px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--c-border-soft, #e5e7eb);
    overflow-wrap: anywhere;
  }
  .detail-dl dd:last-of-type {
    border-bottom: none;
  }

  /* admin-panel 여백 축소 */
  .admin-panel {
    padding: 12px 14px;
  }

  /* 쓰레드 메모 */
  .memo-item {
    padding: 10px;
    overflow: hidden;
  }
  .memo-head {
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 11px;
    align-items: center;
  }
  .memo-head > span:first-child {
    flex: 1 1 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .memo-actions {
    flex: 0 0 auto;
    display: inline-flex;
    gap: 2px;
  }
  .memo-actions button {
    padding: 6px 10px;
    font-size: 12px;
  }
  .memo-body {
    font-size: 13px;
    overflow-wrap: anywhere;
  }
  .memo-editor-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .memo-editor-row input {
    flex: 1 1 100%;
    width: 100%;
  }

  /* 회차/히스토리 박스 */
  .history-box {
    padding: 10px 12px;
  }
  .history-item {
    flex-wrap: wrap;
    row-gap: 2px;
  }
  .history-item .h-meta {
    width: 100%;
    padding-left: 0;
  }
  .session-pill {
    font-size: 12px;
    padding: 3px 10px;
  }

  /* 출처뱃지 한 줄 유지 */
  .src-badge {
    white-space: nowrap;
  }
}
.est-detail {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 22px;
  min-height: 400px;
  box-shadow: var(--shadow-card);
}
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-border-soft);
}
.detail-head h2 {
  font-size: 16px;
  margin: 0 0 4px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.detail-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-sub {
  font-size: 11px;
  color: var(--c-text-muted);
}
.detail-title-note {
  min-width: 0;
  flex: 1 1 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
.detail-dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px 14px;
  font-size: 12px;
  margin-bottom: 18px;
}
.detail-dl dt {
  color: var(--c-text-sub);
}
.detail-dl dd {
  margin: 0;
  color: var(--c-text);
  word-break: break-word;
}
.detail-note {
  background: #fafbfc;
  border: 1px solid var(--c-border-soft);
  border-radius: 4px;
  padding: 8px 10px;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.6;
}
.file-chip {
  display: inline-block;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--c-brand);
  margin: 2px 4px 2px 0;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  text-decoration: none;
}
.file-chip:hover {
  border-color: var(--c-brand);
}
.admin-panel {
  background: #fafbfc;
  border: 1px solid var(--c-border-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 16px;
}
.admin-panel h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: 0.3px;
  color: var(--c-text-sub);
  text-transform: uppercase;
}
.panel-hint {
  font-size: 12px;
  color: var(--c-text-sub);
  line-height: 1.6;
  margin: -4px 0 12px;
}
.field-row-2,
.field-row-3 {
  display: flex;
  gap: 12px;
}
.field-row-2 > .field,
.field-row-3 > .field {
  flex: 1;
  margin-bottom: 14px;
  min-width: 0;
}
@media (max-width: 640px) {
  .field-row-2,
  .field-row-3 {
    flex-direction: column;
    gap: 0;
  }
  .field-row-3 > .field[style*="flex"] {
    flex: 1 !important;
  }
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--c-text);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 240ms,
    transform 240ms;
  z-index: 100;
  pointer-events: none;
  box-shadow: var(--shadow-pop);
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.error {
  background: var(--c-danger);
}

/* ========== GUIDE ========== */
.admin-guide {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-top: 16px;
}
.admin-guide summary {
  padding: 14px 22px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
}
.admin-guide summary:hover {
  background: #fafbfc;
}
.guide-body {
  padding: 0 22px 22px;
  font-size: 13px;
  color: var(--c-text-sub);
  line-height: 1.7;
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}
.spec-table th,
.spec-table td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--c-border-soft);
  font-size: 12px;
}
.spec-table th {
  background: #fafbfc;
  color: var(--c-text-sub);
  font-weight: 500;
}
.spec-table code {
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--c-brand);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-pop);
  }
  .admin-layout {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: inline-flex;
  }
  .admin-content {
    padding: 20px 16px 200px;
  }
  .admin-topbar {
    padding: 0 16px;
  }
  .slide-item {
    grid-template-columns: 30px 100px 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
  }
  .slide-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .save-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .save-actions {
    justify-content: stretch;
  }
  .save-actions .btn {
    flex: 1;
  }
}

/* ========== MOBILE BACKDROP ========== */
.admin-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms;
}
@media (max-width: 900px) {
  .admin-backdrop {
    display: block;
  }
  .admin-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }
  body.drawer-open {
    overflow: hidden;
  }
}

/* Page header (topbar 대신 main 내부에서 쓸 경우) */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}
.page-header p {
  font-size: 13px;
  color: var(--c-text-sub);
  margin: 0;
  line-height: 1.6;
}

/* ========== GRID + DRAG CARDS (공통) ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 1400px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.drag-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: grab;
  transition:
    border-color 140ms,
    transform 140ms,
    box-shadow 140ms;
  position: relative;
  user-select: none;
}
.drag-card:hover {
  border-color: var(--c-text-sub);
}
.drag-card.dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.drag-card.drag-over {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 2px var(--c-brand-soft);
}
.drag-card.file-over {
  border-color: var(--c-info);
  box-shadow: 0 0 0 2px #dbeafe;
}
.drag-card.file-over::after {
  content: "📥 이미지 드롭";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.2);
  color: var(--c-info);
  font-weight: 600;
  pointer-events: none;
  border-radius: var(--radius-sm);
}

.drag-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f3f4f6 no-repeat center/cover;
  position: relative;
  border-bottom: 1px solid var(--c-border-soft);
}
.drag-card-thumb.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  font-size: 11px;
}

.drag-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(17, 24, 39, 0.85);
  color: #fff;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  pointer-events: none;
}

.drag-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 140ms;
}
.drag-card:hover .drag-card-actions,
.drag-card:focus-within .drag-card-actions {
  opacity: 1;
}
.drag-card-action {
  background: rgba(17, 24, 39, 0.85);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms;
}
.drag-card-action:hover {
  background: rgba(17, 24, 39, 1);
}
.drag-card-action.danger:hover {
  background: var(--c-danger);
}

.drag-card-meta {
  padding: 10px 12px;
}
.drag-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0 0 4px;
}
.drag-card-sub {
  font-size: 11px;
  color: var(--c-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drag-card-sub.accent {
  color: var(--c-brand);
}
.drag-card-tags {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.card-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 16px;
  color: var(--c-text-muted);
  font-size: 13px;
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
}

/* ========== THUMB UPLOAD (single) ========== */
.thumb-upload {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.thumb-preview {
  width: 160px;
  height: 100px;
  background: #f3f4f6 no-repeat center/cover;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  font-size: 11px;
}
.thumb-preview.has-image::before {
  content: "";
}
.thumb-preview.empty::before {
  content: "미등록";
}
.thumb-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.thumb-actions .btn {
  justify-content: flex-start;
}

/* ========== GALLERY (multi-image upload) ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0;
}
@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.gallery-item {
  position: relative;
  aspect-ratio: 1;
  background: #f3f4f6 no-repeat center/cover;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  transition:
    border-color 140ms,
    box-shadow 140ms;
}
.gallery-item.dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.gallery-item.drag-over {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 2px var(--c-brand-soft);
}
.gallery-item-order {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(17, 24, 39, 0.85);
  color: #fff;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.gallery-item-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(17, 24, 39, 0.85);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 140ms;
}
.gallery-item:hover .gallery-item-remove {
  opacity: 1;
}
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 28px 16px;
  color: var(--c-text-muted);
  font-size: 12px;
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-sm);
}

/* ========== ANALYTICS ========== */
.notice-banner {
  background: #fff8e6;
  border: 1px solid #f1d97a;
  color: #7a5d0a;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.notice-banner strong {
  color: #5a4608;
}
.analytics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  background: #f3f5f8;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--c-text-sub);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.seg-btn:hover {
  color: var(--c-text);
}
.seg-btn.active {
  background: var(--c-brand);
  color: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.16);
}
.analytics-compare {
  font-size: 12px;
  color: var(--c-text-muted);
}
.analytics-range-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 4px 8px;
}
.analytics-range-picker[hidden] {
  display: none;
}
.analytics-range-picker label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--c-text-muted);
}
.analytics-range-picker input[type="date"] {
  border: 0;
  outline: none;
  font-size: 12px;
  padding: 2px 4px;
  color: var(--c-text);
  background: transparent;
  font-family: inherit;
}
.btn-apply-range {
  appearance: none;
  border: 0;
  background: var(--c-brand);
  color: #fff;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}
.btn-apply-range:hover {
  opacity: 0.9;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 860px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.kpi-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.kpi-label {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--c-text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}
.kpi-delta {
  font-size: 12px;
  color: var(--c-text-muted);
}
.delta {
  font-weight: 600;
}
.delta.up {
  color: #15803d;
}
.delta.down {
  color: #b91c1c;
}
.delta.flat {
  color: var(--c-text-muted);
}
.analytics-row {
  margin-bottom: 18px;
}
.analytics-row.two-col {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
}
@media (max-width: 860px) {
  .analytics-row.two-col {
    grid-template-columns: 1fr;
  }
}
.panel {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.panel-head h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--c-text);
}
.panel-sub {
  font-size: 11px;
  color: var(--c-text-muted);
}
.ops-dashboard {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}
.ops-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ops-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-brand);
}
.ops-head h2 {
  margin: 0;
  color: var(--c-text);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
}
.ops-period {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(54px, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: #f3f5f8;
  flex: 0 0 auto;
}
.ops-period-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--c-text-sub);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  white-space: nowrap;
}
.ops-period-btn.active {
  background: var(--c-brand);
  color: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.16);
}
.ops-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.ops-kpi {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e7ebf0;
  border-radius: 10px;
  background: #fafbfc;
}
.ops-kpi.is-alert {
  background: #fff8ed;
  border-color: #f3d3a3;
}
.ops-kpi span,
.ops-kpi em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-kpi span {
  color: var(--c-text-muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 5px;
}
.ops-kpi strong {
  display: block;
  color: var(--c-text);
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ops-kpi em {
  color: var(--c-text-muted);
  font-size: 11px;
  font-style: normal;
  margin-top: 5px;
}
.ops-target-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #e7ebf0;
  border-radius: 10px;
  background: #fafbfc;
}
.ops-target-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.ops-target-copy strong {
  color: var(--c-text);
  font-size: 12px;
  font-weight: 800;
}
.ops-target-copy span {
  color: var(--c-text-muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-target-manual,
.ops-target-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--c-text-sub);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.ops-target-manual input {
  width: 16px;
  height: 16px;
  accent-color: var(--c-brand);
}
.ops-target-input {
  padding: 5px 8px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: #fff;
}
.ops-target-input input {
  width: 74px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--c-text);
  font: inherit;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ops-target-input input:disabled {
  color: var(--c-text-muted);
}
.ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.95fr);
  gap: 14px;
  align-items: start;
}
.ops-main-stack {
  grid-column: 1;
  display: grid;
  gap: 14px;
  min-width: 0;
}
.ops-panel {
  padding: 16px;
}
.ops-side {
  grid-column: 2;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.ops-heatmap-mobile {
  display: none;
}
.ops-bars {
  display: grid;
  gap: 11px;
  min-width: 0;
}
.ops-bar-row {
  display: grid;
  grid-template-columns: minmax(78px, 0.25fr) minmax(0, 1fr) minmax(50px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.ops-bar-label,
.ops-bar-value {
  color: var(--c-text);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ops-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-bar-value {
  text-align: right;
}
.ops-bar-track {
  position: relative;
  min-width: 0;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}
.ops-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c-brand), #c2a679);
}
.ops-bar-row.is-forecast .ops-bar-fill {
  background: linear-gradient(90deg, #0ea5e9, #c2a679);
}
.ops-target {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  background: #f7f8fa;
  color: var(--c-text-sub);
  font-size: 12px;
  line-height: 1.5;
}
.ops-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.ops-weekday {
  min-width: 0;
  padding: 8px 4px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fafbfc;
  text-align: center;
}
.ops-weekday strong,
.ops-weekday span {
  display: block;
}
.ops-weekday strong {
  color: var(--c-text);
  font-size: 12px;
  font-weight: 800;
}
.ops-weekday span {
  margin-top: 3px;
  color: var(--c-text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.ops-weekday.is-hot {
  background: #b91c1c;
  border-color: #991b1b;
}
.ops-weekday.is-hot strong,
.ops-weekday.is-hot span {
  color: #fff;
}
.ops-weekday.is-warm {
  background: #fee2e2;
  border-color: #fecaca;
}
.ops-weekday.is-warm strong,
.ops-weekday.is-warm span {
  color: #991b1b;
}
.ops-weekday.is-cool {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.ops-weekday.is-cool strong,
.ops-weekday.is-cool span {
  color: #1d4ed8;
}
.ops-weekday.is-cold {
  background: #dbeafe;
  border-color: #60a5fa;
}
.ops-weekday.is-cold strong,
.ops-weekday.is-cold span {
  color: #1e3a8a;
}
.ops-weekday-meter {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
  margin-top: 7px;
}
.ops-weekday-meter i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--c-brand);
}
.ops-weekday.is-hot .ops-weekday-meter,
.ops-weekday.is-warm .ops-weekday-meter {
  background: rgba(255, 255, 255, 0.42);
}
.ops-weekday.is-hot .ops-weekday-meter i {
  background: #fff;
}
.ops-weekday.is-warm .ops-weekday-meter i {
  background: #dc2626;
}
.ops-weekday.is-cool .ops-weekday-meter i,
.ops-weekday.is-cold .ops-weekday-meter i {
  background: #2563eb;
}
.ops-actions,
.ops-mini-ranks,
.ops-campaigns {
  display: grid;
  gap: 8px;
}
.ops-action,
.ops-rank {
  display: grid;
  grid-template-columns: minmax(76px, 0.28fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fafbfc;
}
.ops-action span,
.ops-rank span {
  color: var(--c-text-muted);
  font-size: 11px;
  font-weight: 700;
}
.ops-action strong,
.ops-rank strong {
  min-width: 0;
  overflow: hidden;
  color: var(--c-text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-rank strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ops-rank b {
  color: var(--c-brand);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.ops-campaign {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fafbfc;
}
.ops-campaign-head {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ops-campaign-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--c-brand);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.ops-campaign-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--c-text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-campaign-head b {
  color: var(--c-brand);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.ops-campaign-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
  margin-top: 7px;
}
.ops-campaign-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c-brand), #c2a679);
}
.ops-campaign em {
  display: block;
  margin-top: 4px;
  color: var(--c-text-muted);
  font-size: 10.5px;
  font-style: normal;
}
.ops-heatmap {
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}
.ops-heatmap-grid {
  display: grid;
  grid-template-columns: 58px repeat(var(--heatmap-days), 18px);
  gap: 5px;
  align-items: center;
  width: max-content;
  min-width: 100%;
}
.ops-heatmap-corner,
.ops-heatmap-date,
.ops-heatmap-label,
.ops-heatmap-cell {
  min-width: 0;
}
.ops-heatmap-date {
  color: var(--c-text-muted);
  font-size: 10px;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ops-heatmap-label {
  display: grid;
  gap: 2px;
}
.ops-heatmap-label strong,
.ops-heatmap-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-heatmap-label strong {
  color: var(--c-text);
  font-size: 11px;
  font-weight: 800;
}
.ops-heatmap-label span {
  color: var(--c-text-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.ops-heatmap-cell {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid #e4e8ee;
  border-radius: 4px;
  background: #f4f6f8;
  color: transparent;
  cursor: default;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ops-heatmap-cell:focus-visible {
  outline: 2px solid rgba(26, 47, 78, 0.28);
  outline-offset: 1px;
}
.ops-heatmap-cell span {
  display: block;
  transform: translateY(0.5px);
}
.ops-heatmap-cell.level-0 {
  color: transparent;
}
.ops-heatmap-cell.level-1 {
  color: rgba(26, 47, 78, 0.62);
}
.ops-heatmap-cell.level-2,
.ops-heatmap-cell.level-3 {
  color: rgba(26, 47, 78, 0.86);
}
.ops-heatmap-cell.level-4 {
  color: #fff;
}
.ops-heatmap-cell.is-visitors.level-1 {
  background: #dbeafe;
  border-color: #bfdbfe;
}
.ops-heatmap-cell.is-visitors.level-2 {
  background: #93c5fd;
  border-color: #60a5fa;
}
.ops-heatmap-cell.is-visitors.level-3 {
  background: #3b82f6;
  border-color: #2563eb;
}
.ops-heatmap-cell.is-visitors.level-4 {
  background: #1d4ed8;
  border-color: #1e40af;
}
.ops-heatmap-cell.is-pageviews.level-1 {
  background: #fef3c7;
  border-color: #fde68a;
}
.ops-heatmap-cell.is-pageviews.level-2 {
  background: #fcd34d;
  border-color: #fbbf24;
}
.ops-heatmap-cell.is-pageviews.level-3 {
  background: #d97706;
  border-color: #b45309;
}
.ops-heatmap-cell.is-pageviews.level-4 {
  background: #92400e;
  border-color: #78350f;
}
.ops-heatmap-cell.is-submissions.level-1 {
  background: #dcfce7;
  border-color: #bbf7d0;
}
.ops-heatmap-cell.is-submissions.level-2 {
  background: #86efac;
  border-color: #4ade80;
}
.ops-heatmap-cell.is-submissions.level-3 {
  background: #16a34a;
  border-color: #15803d;
}
.ops-heatmap-cell.is-submissions.level-4 {
  background: #166534;
  border-color: #14532d;
}
.ops-heatmap-summary {
  min-height: 18px;
  margin-top: 10px;
  color: var(--c-text-sub);
  font-size: 11px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.ops-empty {
  padding: 18px 10px;
  color: var(--c-text-muted);
  font-size: 12px;
  text-align: center;
  border: 1px dashed var(--c-border);
  border-radius: 8px;
  background: #fafbfc;
}
.ops-insights-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.ops-insight-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.82fr);
  gap: 12px;
  min-width: 0;
}
.ops-insight-panel {
  overflow: hidden;
}
.ops-funnel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ops-funnel-step {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fafbfc;
}
.ops-funnel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.ops-funnel-head span,
.ops-funnel-step em {
  color: var(--c-text-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.ops-funnel-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-funnel-head strong {
  flex: 0 0 auto;
  color: var(--c-text);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ops-funnel-track,
.ops-conversion-track,
.ops-hour-meter {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}
.ops-funnel-track {
  height: 10px;
  margin: 10px 0 7px;
}
.ops-funnel-track i,
.ops-conversion-track i,
.ops-hour-meter i {
  display: block;
  height: 100%;
  width: 0;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c-brand), #c2a679);
}
.ops-funnel-summary {
  min-height: 18px;
  margin-top: 10px;
  color: var(--c-text-sub);
  font-size: 11px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.ops-conversion-list {
  display: grid;
  gap: 9px;
}
.ops-conversion-list .ops-empty,
.ops-hour-grid .ops-empty,
.ops-location-list .ops-empty {
  grid-column: 1 / -1;
}
.ops-conversion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 7px 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fafbfc;
}
.ops-conversion-source {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 4px 7px;
  min-width: 0;
}
.ops-conversion-source .source-kpi-dot {
  margin-top: 5px;
}
.ops-conversion-source strong,
.ops-conversion-source em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-conversion-source strong {
  color: var(--c-text);
  font-size: 12px;
  font-weight: 800;
}
.ops-conversion-source em {
  grid-column: 2;
  color: var(--c-text-muted);
  font-size: 10.5px;
  font-style: normal;
}
.ops-conversion-rate {
  color: var(--c-brand);
  font-size: 15px;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ops-conversion-track {
  grid-column: 1 / -1;
  height: 6px;
}
.ops-hour-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.ops-hour-item {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fafbfc;
}
.ops-hour-item.is-hot {
  background: var(--c-brand);
  border-color: var(--c-brand);
}
.ops-hour-item.is-warm {
  background: #fff8ed;
  border-color: #f3d3a3;
}
.ops-hour-item.is-cool {
  background: #f8fafc;
  border-color: #dbe3ee;
}
.ops-hour-item.is-empty {
  background: #f7f8fa;
  border-color: #edf0f4;
}
.ops-hour-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.ops-hour-head span {
  color: var(--c-text-muted);
  font-size: 10.5px;
  font-weight: 800;
}
.ops-hour-head strong {
  color: var(--c-text);
  font-size: 16px;
  line-height: 1.1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ops-hour-item em {
  display: block;
  margin-top: 5px;
  color: var(--c-text);
  font-size: 13px;
  font-weight: 800;
  font-style: normal;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.ops-hour-meter {
  height: 6px;
  margin-top: 8px;
}
.ops-hour-meter i {
  background: var(--c-brand);
}
.ops-hour-item.is-hot .ops-hour-head span,
.ops-hour-item.is-hot .ops-hour-head strong,
.ops-hour-item.is-hot em {
  color: #fff;
}
.ops-hour-item.is-hot .ops-hour-meter {
  background: rgba(255, 255, 255, 0.24);
}
.ops-hour-item.is-hot .ops-hour-meter i {
  background: #c2a679;
}
.ops-hour-item.is-warm .ops-hour-head strong,
.ops-hour-item.is-warm em {
  color: #8a5f18;
}
.ops-hour-item.is-warm .ops-hour-meter i {
  background: #c2a679;
}
.ops-hour-item.is-cool .ops-hour-meter i {
  background: #6b7f9b;
}
.ops-hour-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.ops-hour-summary-item {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fff;
}
.ops-hour-summary-item span,
.ops-hour-summary-item strong,
.ops-hour-summary-item em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-hour-summary-item span {
  color: var(--c-text-muted);
  font-size: 10px;
  font-weight: 800;
}
.ops-hour-summary-item strong {
  margin-top: 3px;
  color: var(--c-text);
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ops-hour-summary-item em {
  margin-top: 2px;
  color: var(--c-text-muted);
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.ops-location-top {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #edf0f4;
}
.ops-location-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.ops-location-head strong {
  color: var(--c-text);
  font-size: 12px;
  font-weight: 800;
}
.ops-location-head span {
  color: var(--c-text-muted);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.ops-location-list {
  display: grid;
  gap: 7px;
}
.ops-location-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fafbfc;
}
.ops-location-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--c-brand);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.ops-location-main {
  min-width: 0;
}
.ops-location-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.ops-location-title strong {
  min-width: 0;
  overflow: hidden;
  color: var(--c-text);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-location-title b {
  flex: 0 0 auto;
  color: var(--c-brand);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.ops-location-main em {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--c-text-muted);
  font-size: 10.5px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-location-track {
  position: relative;
  width: 100%;
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}
.ops-location-track i {
  display: block;
  width: 0;
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}
.ops-location-detail-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  color: var(--c-text);
  cursor: pointer;
  text-align: left;
}
.ops-location-detail-btn strong {
  font-size: 12px;
  font-weight: 800;
}
.ops-location-detail-btn span {
  flex: 0 0 auto;
  color: var(--c-text-muted);
  font-size: 10.5px;
  font-weight: 700;
}
.ops-location-detail-btn:hover,
.ops-location-detail-btn:focus-visible {
  border-color: var(--c-brand);
  outline: none;
}
.visitor-detail-panel {
  max-width: 980px;
}
.visitor-detail-head {
  align-items: flex-start;
}
.visitor-detail-head h2 {
  margin-bottom: 3px;
}
.visitor-detail-head p {
  margin: 0;
  color: var(--c-text-muted);
  font-size: 11px;
  font-weight: 700;
}
.visitor-detail-close {
  width: 32px;
  height: 32px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  color: var(--c-text);
  font-size: 20px;
  line-height: 1;
}
.visitor-detail-body {
  display: grid;
  gap: 14px;
}
.visitor-detail-filter {
  display: grid;
  gap: 10px;
}
.visitor-detail-seg {
  flex-wrap: wrap;
}
.visitor-detail-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}
.visitor-detail-picker[hidden] {
  display: none;
}
.visitor-detail-picker label {
  display: grid;
  gap: 4px;
  color: var(--c-text-muted);
  font-size: 10.5px;
  font-weight: 800;
}
.visitor-detail-picker input {
  min-height: 34px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--c-text);
  font: inherit;
}
.visitor-detail-content {
  display: grid;
  gap: 14px;
}
.visitor-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.visitor-detail-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fafbfc;
}
.visitor-detail-metric span,
.visitor-detail-metric strong,
.visitor-detail-metric em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.visitor-detail-metric span {
  color: var(--c-text-muted);
  font-size: 10.5px;
  font-weight: 800;
}
.visitor-detail-metric strong {
  margin-top: 5px;
  color: var(--c-text);
  font-size: 18px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.visitor-detail-metric em {
  margin-top: 3px;
  color: var(--c-text-muted);
  font-size: 10.5px;
  font-style: normal;
}
.visitor-detail-section {
  display: grid;
  gap: 9px;
}
.visitor-detail-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.visitor-detail-section-head h3 {
  margin: 0;
  color: var(--c-text);
  font-size: 13px;
  font-weight: 850;
}
.visitor-detail-section-head span {
  color: var(--c-text-muted);
  font-size: 10.5px;
  font-weight: 800;
}
.visitor-detail-top-list {
  display: grid;
  gap: 7px;
}
.visitor-detail-top-row {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  padding: 10px 12px 14px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fff;
}
.visitor-detail-top-row > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #edf4ff;
  color: #2563eb;
  font-size: 10.5px;
  font-weight: 850;
}
.visitor-detail-top-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--c-text);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.visitor-detail-top-row em {
  color: var(--c-text-muted);
  font-size: 11px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.visitor-detail-top-row i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}
.visitor-detail-month {
  overflow: hidden;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fff;
}
.visitor-detail-month summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
}
.visitor-detail-month summary::-webkit-details-marker {
  display: none;
}
.visitor-detail-month summary strong {
  color: var(--c-text);
  font-size: 12px;
  font-weight: 850;
}
.visitor-detail-month summary span {
  color: var(--c-brand);
  font-size: 11px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.visitor-detail-day-list {
  display: grid;
  border-top: 1px solid #edf0f4;
}
.visitor-detail-day-row {
  display: grid;
  grid-template-columns: 62px 80px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px 12px;
}
.visitor-detail-day-row + .visitor-detail-day-row {
  border-top: 1px solid #f1f3f6;
}
.visitor-detail-day-row span {
  color: var(--c-text-muted);
  font-size: 11px;
  font-weight: 800;
}
.visitor-detail-day-row strong {
  color: var(--c-text);
  font-size: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.visitor-detail-day-row em {
  min-width: 0;
  overflow: hidden;
  color: var(--c-text-muted);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.visitor-detail-event-list {
  display: grid;
  gap: 7px;
}
.visitor-detail-event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fafbfc;
}
.visitor-detail-event-row div,
.visitor-detail-event-row p {
  min-width: 0;
}
.visitor-detail-event-row strong {
  color: var(--c-text);
  font-size: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.visitor-detail-event-row span {
  margin-left: 7px;
  color: var(--c-text-muted);
  font-size: 11px;
  font-weight: 700;
}
.visitor-detail-event-row em {
  color: var(--c-text-muted);
  font-size: 10.5px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.visitor-detail-event-row p {
  grid-column: 1 / -1;
  margin: 0;
  overflow: hidden;
  color: var(--c-text-muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 860px) {
  .ops-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ops-layout {
    grid-template-columns: 1fr;
  }
  .ops-main-stack,
  .ops-side,
  .ops-heatmap-mobile {
    grid-column: auto;
  }
  .ops-heatmap-desktop {
    display: none;
  }
  .ops-heatmap-mobile {
    display: block;
  }
  .ops-main-stack {
    display: contents;
  }
  .ops-main-panel {
    order: 1;
  }
  .ops-side {
    order: 2;
  }
  .ops-heatmap-mobile {
    order: 3;
  }
  .ops-insights-stack {
    order: 4;
  }
  .ops-funnel {
    grid-template-columns: 1fr;
  }
  .ops-insight-two {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .analytics-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .seg {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    border-radius: 12px;
  }
  .seg-btn {
    min-width: 0;
    padding: 8px 6px;
    font-size: 12px;
  }
  .analytics-range-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    gap: 8px;
  }
  .analytics-range-picker label,
  .analytics-range-picker input[type="date"] {
    min-width: 0;
    width: 100%;
  }
  .btn-apply-range {
    grid-column: 1 / -1;
    min-height: 34px;
  }
  .ops-dashboard {
    padding: 12px;
    border-radius: 10px;
  }
  .ops-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ops-head h2 {
    font-size: 18px;
  }
  .ops-period {
    width: 100%;
    border-radius: 12px;
  }
  .ops-period-btn {
    padding: 9px 6px;
  }
  .ops-kpi-grid {
    gap: 8px;
  }
  .ops-kpi {
    padding: 12px 10px;
    border-radius: 8px;
  }
  .ops-kpi strong {
    font-size: 24px;
  }
  .ops-kpi em {
    font-size: 10.5px;
  }
  .ops-target-control {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 11px 10px;
  }
  .ops-target-copy span {
    white-space: normal;
  }
  .ops-target-manual,
  .ops-target-input {
    width: 100%;
  }
  .ops-target-input {
    justify-content: space-between;
  }
  .ops-target-input input {
    flex: 1;
    width: auto;
  }
  .ops-panel {
    padding: 13px 12px;
  }
  .ops-panel .panel-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-bottom: 12px;
  }
  .ops-bar-row {
    grid-template-columns: 64px minmax(0, 1fr) 42px;
    gap: 7px;
  }
  .ops-bar-label,
  .ops-bar-value {
    font-size: 11px;
  }
  .ops-bar-track {
    height: 11px;
  }
  .ops-target {
    font-size: 11px;
  }
  .ops-weekdays {
    grid-template-columns: repeat(7, minmax(34px, 1fr));
    gap: 4px;
  }
  .ops-weekday {
    padding: 7px 2px;
    border-radius: 7px;
  }
  .ops-weekday strong {
    font-size: 11px;
  }
  .ops-weekday span {
    font-size: 10px;
  }
  .ops-action,
  .ops-rank {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }
  .ops-heatmap-grid {
    grid-template-columns: 54px repeat(var(--heatmap-days), 17px);
    gap: 4px;
  }
  .ops-heatmap-cell {
    width: 17px;
    height: 17px;
    border-radius: 4px;
    font-size: 8px;
  }
  .ops-funnel-step,
  .ops-conversion-row,
  .ops-hour-item,
  .ops-location-row {
    padding: 9px 10px;
  }
  .ops-funnel-head strong {
    font-size: 16px;
  }
  .ops-conversion-row {
    grid-template-columns: minmax(0, 1fr) 58px;
  }
  .ops-hour-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ops-location-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .ops-location-head span {
    white-space: normal;
  }
  .ops-location-detail-btn {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .ops-location-detail-btn span {
    white-space: normal;
  }
  .visitor-detail-modal {
    align-items: stretch;
    padding: 10px;
  }
  .visitor-detail-panel {
    max-height: calc(100vh - 20px);
  }
  .visitor-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .visitor-detail-top-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .visitor-detail-top-row em {
    grid-column: 2;
    white-space: normal;
  }
  .visitor-detail-day-row {
    grid-template-columns: 54px 64px minmax(0, 1fr);
  }
  .visitor-detail-event-row {
    grid-template-columns: 1fr;
  }
  .visitor-detail-event-row span {
    display: block;
    margin: 3px 0 0;
  }
  .visitor-detail-event-row em {
    white-space: normal;
  }
}
@media (max-width: 380px) {
  .ops-dashboard {
    margin-inline: -2px;
    padding-inline: 10px;
  }
  .ops-kpi {
    padding-inline: 8px;
  }
  .ops-kpi strong {
    font-size: 22px;
  }
  .ops-weekdays {
    grid-template-columns: repeat(7, minmax(31px, 1fr));
  }
  .ops-bar-row {
    grid-template-columns: 58px minmax(0, 1fr) 38px;
  }
}
.sub-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
@media (max-width: 640px) {
  .sub-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}
.sub-kpi-item {
  background: #fafbfc;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 12px 14px;
}
.sub-kpi-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--c-text-muted);
  margin-bottom: 4px;
}
.sub-kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}
.source-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.source-kpi-item {
  background: #fafbfc;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}
.source-kpi-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--c-text-muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.source-kpi-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.source-kpi-name span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-kpi-value {
  color: var(--c-text);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.source-kpi-sub {
  color: var(--c-text-muted);
  font-size: 11px;
  margin-top: 2px;
}
.chart-wrap {
  position: relative;
  height: 260px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.chart-wrap canvas {
  max-width: 100% !important;
}
.chart-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  font-size: 13px;
  background: #fafbfc;
  border: 1px dashed var(--c-border);
  border-radius: 6px;
}
@media (max-width: 640px) {
  .chart-wrap {
    height: 300px;
  }
}
.top-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.top-table thead th {
  text-align: left;
  padding: 8px 10px;
  color: var(--c-text-muted);
  font-size: 11px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--c-border);
  font-weight: 500;
}
.top-table tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid #f1f3f5;
  color: var(--c-text);
}
.top-table tbody tr:last-child td {
  border-bottom: 0;
}
.top-table td.num {
  color: var(--c-text-sub);
  font-variant-numeric: tabular-nums;
}
.top-table td.path {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--c-text);
}
.connect-steps {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--c-text-sub);
}
.connect-steps li + li {
  margin-top: 2px;
}
