* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #F6F8FB;
  color: #0F172A;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #D5DCE6; border-radius: 8px; border: 2px solid #F6F8FB; }
::-webkit-scrollbar-thumb:hover { background: #C2CBD9; }
input::placeholder, textarea::placeholder { color: #A6B0C0; }
input, textarea, select, button { font-family: 'Manrope', sans-serif; }
input:focus, textarea:focus, select:focus {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
button { cursor: pointer; }
a { text-decoration: none; color: inherit; }
@keyframes mcfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mcfade { animation: mcfade .35s ease both; }
/* Login-only fade — page navigations must not flash */
.login-box.mcfade { animation: mcfade .35s ease both; }
.page.mcfade, .page-narrow.mcfade { animation: none; }

#app { min-height: 100vh; }

/* ===== Login ===== */
.login-wrap { display: flex; min-height: 100vh; }
.login-left { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px; background: #fff; }
.login-box { width: 100%; max-width: 392px; }
.brand-row { display: flex; align-items: center; gap: 11px; margin-bottom: 44px; }
.brand-logo { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(150deg, #3B82F6, #1D4ED8); display: flex; align-items: center; justify-content: center; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: #0F172A; }
.login-box h1 { margin: 0 0 8px; font-size: 27px; font-weight: 800; letter-spacing: -.025em; }
.login-box > p { margin: 0 0 32px; font-size: 14.5px; color: #64748B; line-height: 1.5; }
.field-label { display: block; font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 7px; }
.text-input {
  width: 100%; padding: 11px 13px; border: 1px solid #E2E8F0; border-radius: 10px;
  font-size: 14px; color: #0F172A; background: #fff; outline: none;
}
.mb-18 { margin-bottom: 18px; }
.mb-20 { margin-bottom: 20px; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.link-blue { font-size: 12px; font-weight: 700; color: #2563EB; cursor: pointer; }
.checkbox-row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #475569; cursor: pointer; margin: 4px 0 24px; user-select: none; }
.checkbox-tick { width: 18px; height: 18px; border-radius: 5px; background: #2563EB; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1.5px solid #2563EB; box-sizing: border-box; }
.checkbox-tick.off { background: #fff; border-color: #CBD5E1; }
.checkbox-empty { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #CBD5E1; flex-shrink: 0; }
.btn-primary {
  width: 100%; padding: 12px; border: none; border-radius: 10px; background: #2563EB; color: #fff;
  font-size: 14.5px; font-weight: 700; box-shadow: 0 6px 16px rgba(37,99,235,.28);
}
.btn-primary:hover { background: #1D4ED8; }
.btn-primary:disabled { background: #93C5FD; cursor: not-allowed; box-shadow: none; }
.login-error { color: #B91C1C; font-size: 13px; margin: -10px 0 16px; }
.login-note { margin: -6px 0 16px; font-size: 12.5px; line-height: 1.5; color: #64748B; }
.login-note.success { color: #15803D; background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 10px; padding: 10px 12px; margin-top: 4px; }
.login-dev-link {
  margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: #F8FAFC;
  border: 1px solid #E2E8F0; font-size: 12px; line-height: 1.5; color: #475569; word-break: break-all;
}
.login-dev-link span { font-weight: 800; color: #0F172A; }
.login-dev-link a { color: #2563EB; }
.login-right {
  flex: 1; position: relative; overflow: hidden;
  background: linear-gradient(155deg, #1E40AF 0%, #2563EB 55%, #3B82F6 100%);
  display: flex; align-items: center; justify-content: center; padding: 56px; color: #fff;
}
.login-right-content { position: relative; max-width: 440px; }
.login-right h2 { margin: 0 0 18px; font-size: 34px; line-height: 1.18; font-weight: 800; letter-spacing: -.03em; }
.login-right > .login-right-content > p { margin: 0 0 36px; font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.82); }
.feature-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.feature-item { display: flex; align-items: center; gap: 13px; font-size: 14.5px; color: rgba(255,255,255,.92); }
.feature-check { width: 24px; height: 24px; border-radius: 7px; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chip-pill { padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: 13px; font-weight: 700; }
.deco-circle { position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); }

@media (max-width: 900px) {
  .login-right { display: none; }
}

/* ===== App shell ===== */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex-shrink: 0; background: #fff; border-right: 1px solid #EAEEF3;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 18px;
  min-height: 58px;
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.14);
  background: linear-gradient(165deg, #1E4BB8 0%, #1A3FA3 55%, #183891 100%);
  cursor: pointer;
  text-align: left;
  font: inherit;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.08);
}
.sidebar-brand:hover {
  background: linear-gradient(165deg, #2356C9 0%, #1E4BB8 55%, #1A3FA3 100%);
}
.sidebar-brand:hover .brand-name { color: #fff; }
.sidebar-brand .brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.sidebar-brand .brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
}
.nav { flex: 1; padding: 6px 14px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-section { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #A6B0C0; padding: 14px 12px 7px; }
.nav-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 9px 12px; border: none; border-radius: 9px; font-size: 14px; font-weight: 600;
  background: transparent; color: #475569; cursor: pointer;
}
.nav-btn:hover { background: #F6F8FB; }
.nav-btn.active { background: #EFF3FF; color: #2563EB; }
.nav-btn svg { flex-shrink: 0; }
.nav-label { flex: 1; min-width: 0; text-align: left; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-parent { position: relative; }
.nav-chevron {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: auto; flex-shrink: 0; transition: transform .18s ease;
}
.nav-chevron svg { width: 14px; height: 14px; stroke: #94A3B8; }
.nav-group.open .nav-chevron { transform: rotate(0deg); }
.nav-group:not(.open) .nav-chevron { transform: rotate(-90deg); }
.nav-group.section-active > .nav-parent { color: #2563EB; }
.nav-children {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 0 6px 12px;
}
.nav-children[hidden] { display: none; }
.nav-child {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px 8px 14px; border: none; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; background: transparent; color: #64748B;
  cursor: pointer;
}
.nav-child:hover { background: #F6F8FB; color: #334155; }
.nav-child.active { background: #EFF3FF; color: #2563EB; font-weight: 700; }
.nav-child svg { flex-shrink: 0; width: 16px; height: 16px; }
.nav-ch-badge {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
}
.nav-ebay-badge {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; background: #E6F0FE; color: #0064D2;
}
.nav-beta {
  display: inline-flex; align-items: center; margin-left: 8px;
  padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; text-transform: lowercase; background: #2563EB; color: #fff;
  vertical-align: middle;
}
.nav-divider {
  height: 1px; background: #E6EBF2; margin: 10px 8px;
}
.nav-label {
  display: inline-flex; align-items: center; flex: 1; min-width: 0;
}
.tool-card { min-height: 220px; }
.tool-illus {
  width: 44px; height: 44px; border-radius: 12px; background: #EFF6FF; color: #2563EB;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.tool-illus svg { width: 22px; height: 22px; }
.tool-copy { margin: 0; color: #64748B; font-size: 14px; line-height: 1.55; }
.tool-copy code {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px;
  background: #F1F5F9; padding: 1px 5px; border-radius: 4px;
}

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: linear-gradient(180deg, #2F6FED 0%, #2563EB 55%, #1D4ED8 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset;
}
.topbar-search-wrap {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-width: 240px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 8px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: text;
}
.search-box:focus-within {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}
.search-box svg { stroke: rgba(255, 255, 255, 0.92) !important; flex-shrink: 0; }
.search-box input {
  flex: 1;
  min-width: 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  background: transparent;
}
.search-box input::placeholder { color: rgba(255, 255, 255, 0.72); }
.search-box input::-webkit-search-decoration,
.search-box input::-webkit-search-cancel-button { appearance: none; }
.kbd {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.12);
  border-radius: 5px;
  padding: 2px 7px;
  line-height: 1.2;
  flex-shrink: 0;
}
.topbar-dd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.topbar-dd svg { stroke: rgba(255, 255, 255, 0.9) !important; }
.topbar-dd:hover,
.topbar-dd.open {
  background: rgba(15, 23, 42, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  color: #fff;
}
.icon-btn svg { stroke: #fff !important; }
.icon-btn.open, .user-btn.open {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}
.dot-badge {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FBBF24;
  border: 1.5px solid #1D4ED8;
}
.user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.14);
}
.user-btn svg { stroke: rgba(255, 255, 255, 0.9) !important; }
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(150deg, #F97316, #EA580C);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.user-email {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-menu-wrap { position: relative; }
.header-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; width: 260px; background: #fff;
  border: 1px solid #E6EBF2; border-radius: 14px; box-shadow: 0 18px 40px rgba(15,23,42,.12);
  z-index: 40; padding: 8px; overflow: hidden;
}
.header-dropdown-left { left: 0; right: auto; }
.header-dropdown-search {
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  max-height: min(420px, 70vh);
  overflow: auto;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
}
.gs-empty {
  padding: 18px 14px 12px;
  text-align: left;
}
.gs-empty-title {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 4px;
}
.gs-empty-sub {
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.4;
}
.gs-footer-action {
  font-weight: 700;
  color: #2563EB;
}
.header-dropdown-section {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94A3B8;
}
.header-dropdown-wide { width: 340px; padding: 0; }
.header-dropdown-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 14px 10px; border-bottom: 1px solid #F1F5F9;
}
.header-dropdown-title { font-size: 14px; font-weight: 800; color: #0F172A; }
.header-dropdown-sub { font-size: 12px; color: #94A3B8; margin-top: 2px; }
.header-dropdown-body { max-height: 320px; overflow: auto; padding: 6px; }
.header-dropdown-profile { display: flex; align-items: center; gap: 10px; padding: 10px 8px 8px; }
.header-dropdown-sep { height: 1px; background: #F1F5F9; margin: 4px 0; }
.header-menu-item {
  width: 100%; display: block; text-align: left; border: none; background: transparent;
  border-radius: 10px; padding: 10px 10px; cursor: pointer; color: #334155;
}
.header-menu-item:hover { background: #F8FAFC; }
.header-menu-item.danger { color: #B91C1C; font-weight: 700; }
.header-menu-item-title { font-size: 13px; font-weight: 700; color: #0F172A; line-height: 1.35; }
.header-menu-item-sub { font-size: 12px; color: #94A3B8; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-menu-empty { padding: 22px 14px; font-size: 13px; color: #94A3B8; text-align: center; }
.main-content { flex: 1; padding: 30px 32px 56px; }
.page { max-width: 1240px; margin: 0 auto; }
.page-narrow { max-width: 1180px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.025em; }
.page-head p { margin: 0; font-size: 14px; color: #64748B; }
.head-actions { display: flex; gap: 10px; }
.btn-secondary {
  display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid #E6EBF2; border-radius: 10px;
  padding: 10px 15px; font-size: 13px; font-weight: 700; color: #334155;
}
.btn-secondary:hover { background: #FAFBFD; }
.btn-blue {
  display: flex; align-items: center; gap: 7px; background: #2563EB; border: none; border-radius: 10px;
  padding: 10px 16px; font-size: 13px; font-weight: 700; color: #fff; box-shadow: 0 5px 14px rgba(37,99,235,.25);
}
.btn-blue:hover { background: #1D4ED8; }

/* Cards */
.card { background: #fff; border: 1px solid #EAEEF3; border-radius: 16px; }
.card-pad { padding: 22px 24px; }

/* Dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 18px; }
.stat-card { background: #fff; border: 1px solid #EAEEF3; border-radius: 16px; padding: 20px; }
.stat-label { font-size: 12.5px; font-weight: 700; color: #64748B; margin-bottom: 12px; }
.stat-value { font-size: 27px; font-weight: 800; letter-spacing: -.03em; color: #0F172A; margin-bottom: 9px; }
.stat-delta { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 7px; }
.stat-sub { font-size: 12px; color: #94A3B8; margin-left: 7px; }
.grid-2fr { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 1050px) { .grid-2fr, .stat-grid { grid-template-columns: 1fr; } }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.chart-title { font-size: 15px; font-weight: 700; color: #1E293B; }
.chart-sub { font-size: 13px; color: #94A3B8; margin-top: 2px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #475569; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 200px; border-bottom: 1px solid #EEF1F6; padding-bottom: 1px; }
.bar-col { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.bar-fill { width: 100%; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #3B82F6, #BFDBFE); }
.bar-labels { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11.5px; color: #A6B0C0; font-weight: 600; }

/* SureDone-style dashboard */
.sd-dash .page-head h1 { font-size: 28px; }
.sd-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.sd-panel { min-height: 280px; display: flex; flex-direction: column; }
.sd-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 10px; flex-shrink: 0;
}
.sd-panel-meta {
  min-width: 24px; height: 24px; border-radius: 999px; background: #EFF6FF; color: #1D4ED8;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
}
.sd-panel-body { flex: 1; overflow: auto; max-height: 260px; padding-right: 4px; }
.sd-action-item {
  display: block; width: 100%; text-align: left; border: 1px solid #EEF1F6; border-radius: 12px;
  padding: 12px 13px; margin-bottom: 10px; background: #FAFBFD; cursor: pointer;
}
.sd-action-item:hover { border-color: #BFDBFE; background: #F8FBFF; }
.sd-action-title { font-size: 13.5px; font-weight: 800; color: #0F172A; margin-bottom: 3px; }
.sd-action-detail { font-size: 12.5px; color: #64748B; line-height: 1.45; }
.sd-empty-tasks { text-align: center; padding: 28px 12px 12px; }
.sd-empty-illus { margin-bottom: 12px; opacity: .9; }
.sd-channel-stack {
  display: flex;
  flex-direction: column;
  max-height: 260px;
  min-height: 0;
}
.sd-channel-stack .sd-panel-body.sd-channel-list {
  flex: 1;
  max-height: none;
  min-height: 0;
  overflow: auto;
}
.sd-channel-list { display: flex; flex-direction: column; }
.sd-channel-footer {
  flex-shrink: 0;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #E6EEF8;
  border-bottom: none;
}
.sd-channel-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid #F1F4F8;
  min-width: 0;
}
.sd-channel-row:last-child { border-bottom: none; }
.sd-channel-row .sd-channel-meta {
  flex: 1;
  min-width: 0;
}
.sd-channel-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sd-channel-sub {
  font-size: 12px;
  color: #94A3B8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sd-channel-row .ch-status { flex-shrink: 0; }
.sd-authorize-row {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 0;
  padding: 8px 4px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sd-authorize-row:hover { background: transparent; }
.sd-authorize-row .sd-channel-name { color: #2563EB !important; font-size: 13.5px; }
.sd-authorize-row .sd-channel-sub { display: none; }
.sd-authorize-icon { display: none; }
.sd-authorize-chevron { color: #2563EB; font-size: 16px; font-weight: 700; padding: 0; }
.sd-gear {
  width: 32px; height: 32px;
  border: none; background: transparent; color: #64748B;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; padding: 0; border-radius: 8px;
}
.sd-gear:hover { color: #2563EB; background: transparent; }
.sd-gear svg { width: 18px; height: 18px; }
.ch-status.enabled { background: #DCFCE7; color: #15803D; }
.ch-status.disabled { background: #FEE2E2; color: #B91C1C; }

.add-channel-search {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #E6EBF2; border-radius: 10px;
  padding: 11px 14px; margin-bottom: 10px; max-width: 520px;
}
.add-channel-search input {
  flex: 1; border: none; outline: none; font-size: 14px; background: transparent; color: #0F172A;
}
.add-channel-list { overflow: hidden; }
.add-channel-row {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px; border-bottom: 1px solid #EEF1F6;
}
.add-channel-row:last-child { border-bottom: none; }
.add-channel-logo {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; text-transform: lowercase;
}
.add-channel-copy { flex: 1; min-width: 0; }
.add-channel-name { font-size: 16px; font-weight: 800; color: #0F172A; margin-bottom: 6px; }
.add-channel-blurb { font-size: 13.5px; color: #64748B; line-height: 1.5; max-width: 640px; }
.btn-add-channel {
  flex-shrink: 0;
  background: #16A34A; color: #fff; border: none; border-radius: 8px;
  padding: 11px 18px; font-size: 13.5px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 12px rgba(22, 163, 74, .22);
}
.btn-add-channel:hover { background: #15803D; }
.btn-add-channel:disabled { opacity: .65; cursor: default; }
.custom-channel-card { margin-top: 16px; }
.custom-channel-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.custom-channel-row .field-input {
  flex: 1;
  min-width: 200px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #D0D7E2;
  border-radius: 8px;
  font-size: 14px;
}
.custom-channel-row .field-input:focus {
  outline: none;
  border-color: #94A3B8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}
.sd-announce-row {
  display: flex; justify-content: space-between; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid #F1F4F8;
  width: 100%;
  text-align: left;
  border-left: none; border-right: none; border-top: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.sd-announce-row:hover .sd-announce-title { color: #2563EB; }
.sd-announce-row:last-child { border-bottom: none; }
.sd-announce-title { font-size: 13.5px; font-weight: 700; color: #0F172A; margin-bottom: 3px; }
.sd-announce-detail { font-size: 12.5px; color: #64748B; line-height: 1.4; }
.sd-announce-date { font-size: 11.5px; color: #94A3B8; font-weight: 600; white-space: nowrap; }

/* Product Updates (SureDone-style) */
.pu-page-head h1 { font-size: 32px; letter-spacing: -.02em; }
.pu-toolbar { margin: 4px 0 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pu-warn { font-size: 12.5px; color: #B45309; font-weight: 600; }
.pu-archive {
  display: inline-block;
  margin-top: 18px;
  color: #2563EB;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.pu-archive:hover { text-decoration: underline; }
.pu-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.pu-sort-btn svg { width: 14px; height: 14px; color: #94A3B8; }
.pu-sort-btn:hover { border-color: #CBD5E1; background: #F8FAFC; }
.pu-list { display: flex; flex-direction: column; gap: 12px; max-width: 920px; }
.pu-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  overflow: hidden;
}
.pu-card-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.pu-card-head:hover { background: #F8FAFC; }
.pu-card-text { min-width: 0; flex: 1; }
.pu-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.35;
  margin-bottom: 6px;
}
.pu-card-meta {
  font-size: 13px;
  color: #94A3B8;
  font-weight: 500;
}
.pu-card-chevron {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  transition: transform .18s ease;
}
.pu-card-chevron svg { width: 16px; height: 16px; }
.pu-card.open .pu-card-chevron { transform: rotate(180deg); color: #64748B; }
.pu-card-body {
  padding: 0 20px 18px;
  border-top: 1px solid #F1F5F9;
}
.pu-card-html {
  margin-top: 14px;
  color: #475569;
  font-size: 13.5px;
  line-height: 1.55;
}
.pu-card-html ul { margin: 0 0 10px; padding-left: 18px; }
.pu-card-html ul ul { margin: 6px 0 8px; }
.pu-card-html li { margin-bottom: 4px; }
.pu-card-html strong { color: #0F172A; font-weight: 700; }
.pu-card-html code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  background: #F1F5F9;
  padding: 1px 5px;
  border-radius: 4px;
}
.pu-card-html p { margin: 0 0 10px; }
.pu-card-html a { color: #2563EB; }
.sd-range-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 14px; flex-wrap: wrap;
  position: relative;
  z-index: 5000;
}
.sd-range-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sd-range-label { font-size: 13px; font-weight: 700; color: #475569; }
.sd-range-toggle { display: inline-flex; background: #fff; border: 1px solid #E6EBF2; border-radius: 10px; overflow: hidden; }
.sd-range-btn {
  border: none; background: transparent; padding: 8px 12px; font-size: 12.5px; font-weight: 700;
  color: #64748B; cursor: pointer;
}
.sd-range-btn.active { background: #EFF6FF; color: #1D4ED8; }
.sd-range-btn:disabled { opacity: .6; cursor: default; }
.sd-range-spacer { height: 310px; }

.sd-range-picker { position: relative; z-index: 5001; }
.sd-range-fields {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sd-range-field {
  min-width: 118px;
  padding: 9px 14px;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  text-align: left;
  line-height: 1.25;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.sd-range-field:hover {
  border-color: #93C5FD;
  background: #F8FBFF;
}
.sd-range-field.active {
  border-color: #3B82F6;
  background: #fff;
  box-shadow: 0 0 0 1px #3B82F6;
}
.sd-range-to {
  font-size: 14px;
  font-weight: 500;
  color: #6B7280;
}
.sd-range-updating {
  font-size: 12.5px;
  font-weight: 700;
  color: #2563EB;
  animation: sdPulse 1s ease-in-out infinite;
}
@keyframes sdPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
.sd-chart-card { position: relative; z-index: 1; }
.sd-chart-card.is-chart-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, .55);
  pointer-events: none;
  z-index: 2;
}
.sd-range-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 5002;
  width: 300px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
  padding: 12px 14px 14px;
  pointer-events: auto;
}
.sd-range-popover.align-end {
  left: auto;
  right: 0;
}
.sd-cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; gap: 8px;
}
.sd-cal-month {
  font-size: 15px; font-weight: 700; color: #111827;
}
.sd-cal-nav {
  width: 28px; height: 28px; border-radius: 6px; border: none;
  background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.sd-cal-nav:hover { background: #F3F4F6; }
.sd-cal-dows {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px;
}
.sd-cal-dows span {
  text-align: center; font-size: 12px; font-weight: 600; color: #9CA3AF; padding: 4px 0;
}
.sd-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.sd-cal-day {
  height: 34px;
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1;
}
button.sd-cal-day:hover:not(.is-in-range) {
  background: #EFF6FF;
  color: #1D4ED8;
}
.sd-cal-day.is-outside { color: #D1D5DB; font-weight: 500; }
.sd-cal-day.is-future {
  color: #E5E7EB !important;
  cursor: default;
}
.sd-cal-day.is-in-range {
  background: #5BA4D9;
  color: #fff !important;
  font-weight: 700;
}
.sd-cal-day.is-in-range.is-outside {
  background: #8FBFDF;
}
.sd-cal-day.is-start,
.sd-cal-day.is-end {
  background: #3B8EC8 !important;
  color: #fff !important;
}
.sd-cal-day.is-today:not(.is-in-range) {
  box-shadow: inset 0 0 0 1.5px #93C5FD;
}
.sd-sales-card { margin-bottom: 16px; }
.sd-sales-head {
  margin-bottom: 8px;
}
.sd-sales-head .chart-title,
.sd-sales-head .sd-chart-total {
  font-size: 16px;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0;
}
.sd-sales-wrap {
  height: 360px;
}
.sd-chart-card {
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  border-color: #E5E9F0;
}
.sd-chart-total { font-size: 20px; font-weight: 700; color: #1E293B; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.sd-chart-wrap { width: 100%; height: 300px; position: relative; }
.sd-chart-wrap.sm { height: 280px; }
.sd-chart-host { position: relative; width: 100%; height: 100%; cursor: crosshair; }
.sd-chartjs-host { cursor: default; }
.sd-chartjs-host canvas { width: 100% !important; height: 100% !important; }
.dash-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart-axis {
  font-size: 11px; fill: #64748B;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-weight: 400;
}
.chart-axis-x { font-size: 10.5px; }
.chart-grid { stroke: #DDE3EC; stroke-width: 1; stroke-dasharray: 3 3; }
.chart-baseline { stroke: #CBD5E1; stroke-width: 1; }
.chart-line { fill: none; }
.chart-dot { pointer-events: none; }
.chart-dot.is-visible { opacity: 1; }
.chart-dot.is-active { r: 5; }
.chart-bar { transition: opacity .1s ease; }
.chart-bar.is-active { opacity: 1; filter: brightness(0.92); }
.chart-hover-band {
  fill: rgba(148, 163, 184, 0.22);
  pointer-events: none;
}
.sd-chart-tooltip {
  position: absolute; z-index: 5; pointer-events: none;
  min-width: 140px; max-width: 240px;
  background: #fff; border: 1px solid #E2E8F0; border-radius: 4px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
  padding: 8px 10px; transform: translate(-50%, calc(-100% - 10px));
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}
.sd-chart-tooltip[hidden] { display: none; }
.sd-tip-line {
  font-size: 12px; font-weight: 600; color: #334155; line-height: 1.45;
  white-space: nowrap;
}
.sd-tip-date-line { color: #64748B; font-weight: 500; margin-top: 2px; }
.sd-chart-legend {
  display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 8px;
}
.sd-chart-legend .legend-item {
  font-size: 12px; font-weight: 500; color: #64748B;
}
.legend-mark {
  width: 12px; height: 12px; border-radius: 2px; display: inline-block; flex-shrink: 0;
  margin-right: 2px; vertical-align: -1px;
}
.sd-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 14px;
}
.sd-foot-note { font-size: 12.5px; color: #94A3B8; font-weight: 600; margin-top: 4px; }
@media (max-width: 1100px) {
  .sd-top-grid { grid-template-columns: 1fr; }
  .sd-metrics-grid { grid-template-columns: 1fr; }
}
.ch-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #F1F4F8; }
.ch-badge { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.ch-name { font-size: 13.5px; font-weight: 700; color: #0F172A; }
.ch-sub { font-size: 12px; color: #94A3B8; }
.pill { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.pill-lg { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.activity-row { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid #F1F4F8; }
.activity-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.activity-text { flex: 1; font-size: 13.5px; color: #334155; font-weight: 500; }
.activity-time { font-size: 12px; color: #A6B0C0; font-weight: 600; }
.announce-card {
  background: linear-gradient(160deg, #0F2A66, #1E40AF); border-radius: 16px; padding: 24px; color: #fff;
  position: relative; overflow: hidden;
}
.announce-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; background: rgba(255,255,255,.15); padding: 5px 11px; border-radius: 999px; margin-bottom: 16px;
}
.announce-card h3 { margin: 0 0 9px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.announce-card p { margin: 0 0 18px; font-size: 13.5px; line-height: 1.55; color: rgba(255,255,255,.8); }

/* Tabs / toolbar */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid #E6EBF2; flex-wrap: wrap; }
.tab-item { padding: 10px 4px; margin-right: 18px; font-size: 13.5px; font-weight: 600; color: #64748B; border-bottom: 2px solid transparent; }
.tab-item.active { font-weight: 700; color: #2563EB; border-bottom: 2px solid #2563EB; }
.tab-count { color: #94A3B8; font-weight: 600; }
.tab-item.active .tab-count { color: #94A3B8; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar-search { flex: 1; max-width: 340px; display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid #E6EBF2; border-radius: 10px; padding: 9px 12px; }
.toolbar-search input { flex: 1; border: none; outline: none; font-size: 13.5px; color: #0F172A; background: transparent; }
.toolbar-btn { display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid #E6EBF2; border-radius: 10px; padding: 9px 13px; font-size: 13px; font-weight: 600; color: #475569; }
.toolbar-fill { flex: 1; }
.toolbar-note { font-size: 13px; color: #94A3B8; font-weight: 600; }

/* Table */
.table-card { background: #fff; border: 1px solid #EAEEF3; border-radius: 16px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: #FAFBFD; border-bottom: 1px solid #EEF1F6; }
th { padding: 13px 14px; text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #94A3B8; }
tbody tr { border-bottom: 1px solid #F1F4F8; cursor: pointer; }
tbody tr:hover { background: #FAFBFD; }
td { padding: 13px 14px; font-size: 14px; color: #334155; }
.mono { font-family: 'JetBrains Mono', monospace; }
.check-box { display: inline-block; width: 17px; height: 17px; border: 1.5px solid #CBD5E1; border-radius: 5px; }
.prod-thumb { width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.prod-cell { display: flex; align-items: center; gap: 13px; }
.prod-title { font-size: 14px; font-weight: 700; color: #0F172A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.prod-sku { font-size: 12px; color: #94A3B8; margin-top: 2px; }
.ch-chip { width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.table-pager { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid #EEF1F6; }
.page-btn { padding: 7px 13px; border: 1px solid #E6EBF2; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; color: #334155; }
.page-btn:disabled { color: #94A3B8; cursor: not-allowed; }
.empty-row td { text-align: center; padding: 40px; color: #94A3B8; }

/* Breadcrumb / detail header */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #94A3B8; font-weight: 600; margin-bottom: 16px; }
.breadcrumb .crumb-link { cursor: pointer; color: #64748B; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.detail-title-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.back-btn { width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; border: 1px solid #E6EBF2; background: #fff; display: flex; align-items: center; justify-content: center; }
.detail-title { margin: 0 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: #0F172A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 560px; }
.detail-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-outline { padding: 10px 16px; border: 1px solid #E6EBF2; border-radius: 10px; background: #fff; font-size: 13.5px; font-weight: 700; color: #475569; }
.btn-outline:hover { background: #FAFBFD; }
.btn-danger {
  padding: 10px 16px;
  border: 1px solid #FECACA;
  border-radius: 10px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 700;
  color: #B91C1C;
  cursor: pointer;
}
.btn-danger:hover { background: #FEF2F2; }
.channel-danger-zone {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #EEF1F6;
}
.channel-danger-zone h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.channel-danger-zone p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #64748B;
  line-height: 1.5;
}
.channel-danger-zone p strong { color: #334155; font-weight: 700; }
.btn-save { padding: 10px 18px; border: none; border-radius: 10px; background: #2563EB; color: #fff; font-size: 13.5px; font-weight: 700; box-shadow: 0 5px 14px rgba(37,99,235,.25); }
.btn-save:hover { background: #1D4ED8; }
.green-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #15803D; background: #DCFCE7; padding: 3px 10px; border-radius: 999px; }
.green-dot { width: 6px; height: 6px; border-radius: 50%; background: #16A34A; }

/* Detail layout */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.detail-grid.order-grid { grid-template-columns: 1fr 300px; }
@media (max-width: 950px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-left { display: flex; flex-direction: column; gap: 20px; }
.detail-right { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 88px; }
.section-card { background: #fff; border: 1px solid #EAEEF3; border-radius: 16px; padding: 24px; }
.section-card h2 { margin: 0 0 20px; font-size: 15px; font-weight: 800; color: #0F172A; }
.section-card.tight h2 { margin: 0; }
.field-help { margin: 8px 0 0; font-size: 12.5px; color: #94A3B8; line-height: 1.45; }
.settings-pending {
  background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 12px; padding: 14px 16px; margin-bottom: 18px;
}
.settings-pending-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.settings-pending-badge {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: #B45309; background: #FEF3C7; border-radius: 999px; padding: 3px 9px;
}
.settings-pending-cancel {
  border: none; background: transparent; color: #B45309; font-size: 13px; font-weight: 700;
  cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px;
}
.settings-pending-cancel:hover { color: #92400E; }
.settings-pending-cancel:disabled { opacity: .5; cursor: default; }
.settings-pending-title { font-size: 14px; font-weight: 800; color: #92400E; margin-bottom: 4px; }
.settings-pending-text { font-size: 12.5px; color: #A16207; line-height: 1.5; }
.field-input[readonly] { background: #F8FAFC; color: #475569; }
.field-group { margin-bottom: 18px; }
.field-label-up { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #94A3B8; margin-bottom: 7px; }
.field-label-up.small { font-size: 11px; margin-bottom: 6px; }
.field-input {
  width: 100%; padding: 10px 12px; border: 1px solid #E2E8F0; border-radius: 9px; font-size: 13.5px; color: #0F172A; background: #fff; outline: none;
}
.field-input.small { padding: 9px 11px; font-size: 13px; border-radius: 8px; }
textarea.field-input { resize: vertical; line-height: 1.55; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.media-row { display: flex; gap: 14px; flex-wrap: wrap; }
.media-thumb {
  width: 120px; height: 120px; border-radius: 12px; background: repeating-linear-gradient(45deg, #F1F5F9, #F1F5F9 9px, #E9EEF4 9px, #E9EEF4 18px);
  border: 1px solid #E6EBF2; display: flex; align-items: center; justify-content: center; position: relative;
}
.media-tag { position: absolute; top: 6px; left: 6px; font-size: 10px; font-weight: 800; background: #2563EB; color: #fff; padding: 2px 7px; border-radius: 6px; }
.media-caption { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: #94A3B8; text-align: center; padding: 0 8px; }
.media-add {
  width: 120px; height: 120px; border-radius: 12px; border: 1.5px dashed #CBD5E1; background: #FAFBFD;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #64748B;
}
.media-add span { font-size: 11.5px; font-weight: 700; }

.channel-card { border: 1px solid #EEF1F6; border-radius: 13px; padding: 18px; margin-top: 16px; }
.channel-card-head { display: flex; align-items: center; gap: 12px; }
.channel-card-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; padding-top: 16px; margin-top: 16px; border-top: 1px solid #F1F4F8; }
@media (max-width: 640px) { .channel-card-fields { grid-template-columns: 1fr; } }
.toggle { width: 42px; height: 24px; border-radius: 999px; display: flex; align-items: center; padding: 0 3px; flex-shrink: 0; border: none; }
.toggle-knob { width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle.on { background: #2563EB; justify-content: flex-end; }
.toggle.off { background: #E2E8F0; justify-content: flex-start; }
.toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.attr-row { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid #F4F6FA; }
@media (max-width: 640px) { .attr-row { grid-template-columns: 1fr; } }
.attr-key { font-size: 13px; font-weight: 700; color: #475569; }
.add-attr-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #2563EB; }

.tag-chip { font-size: 12px; font-weight: 700; background: #EFF4FF; color: #2563EB; padding: 4px 10px; border-radius: 7px; }
.side-facts { background: #FAFBFD; border: 1px solid #EEF1F6; border-radius: 16px; padding: 18px; }
.side-fact-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 5px 0; }
.side-fact-row span:first-child { color: #94A3B8; font-weight: 600; }
.side-fact-row span:last-child { color: #475569; font-weight: 700; }
.notify-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-top: 1px solid #F1F4F8;
}
.notify-row:first-of-type { border-top: none; padding-top: 0; }
.notify-title { font-size: 13.5px; font-weight: 700; color: #0F172A; }
.notify-sub { font-size: 12.5px; color: #94A3B8; margin-top: 3px; line-height: 1.4; }
.notify-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn-tiny { padding: 7px 10px; font-size: 12px; border-radius: 8px; }

.order-item-card { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px solid #EEF1F6; border-radius: 12px; }
.order-thumb { width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0; background: repeating-linear-gradient(45deg, #F1F5F9, #F1F5F9 7px, #E9EEF4 7px, #E9EEF4 14px); border: 1px solid #E6EBF2; }
.summary-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; }
.summary-row.total { font-size: 15px; padding: 12px 0 2px; margin-top: 6px; border-top: 1px solid #EEF1F6; }

/* Channels page */
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.channel-tile { background: #fff; border: 1px solid #EAEEF3; border-radius: 16px; padding: 22px; }
.channel-tile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.channel-tile-badge { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; }

/* Settings */
.settings-grid { display: flex; flex-direction: column; gap: 20px; max-width: 720px; }
.save-toast { font-size: 13px; font-weight: 700; color: #15803D; background: #DCFCE7; padding: 8px 14px; border-radius: 8px; display: inline-block; margin-top: 10px; }

/* Dashboard extras */
.dash-mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 22px; }
.dash-mini-card { background: #fff; border: 1px solid #EAEEF3; border-radius: 14px; padding: 16px 18px; }
.dash-mini-label { font-size: 12px; font-weight: 700; color: #94A3B8; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.dash-mini-value { font-size: 22px; font-weight: 800; color: #0F172A; }
.dash-alert-list { display: flex; flex-direction: column; gap: 10px; }
.dash-alert { display: block; width: 100%; text-align: left; border: 1px solid #E2E8F0; border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff; }
.dash-alert:hover { filter: brightness(0.99); }
.dash-alert-title { font-size: 13.5px; font-weight: 800; margin-bottom: 4px; }
.dash-alert-detail { font-size: 12.5px; color: #64748B; line-height: 1.45; }
.empty-inline { color: #94A3B8; font-size: 13px; padding: 18px 0; }
@media (max-width: 980px) {
  .dash-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Placeholder */
.placeholder-card {
  background: #fff; border: 1px solid #EAEEF3; border-radius: 16px; padding: 72px 24px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.placeholder-icon { width: 72px; height: 72px; border-radius: 20px; background: linear-gradient(150deg, #EFF4FF, #DCE7FF); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.placeholder-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.placeholder-card p { margin: 0 0 22px; font-size: 14px; color: #64748B; max-width: 420px; line-height: 1.55; }

/* Search builder (SureDone-style) */
.sb-page .sb-head { margin-bottom: 14px; }
.sb-title-row { display: flex; align-items: center; gap: 10px; }
.sb-title-row h1 { margin: 0; }
.sb-title-icon {
  width: 36px; height: 36px; border-radius: 10px; background: #EFF6FF;
  display: inline-flex; align-items: center; justify-content: center; color: #2563EB;
}
.sb-title-icon svg { width: 18px; height: 18px; }
.sb-builder { margin-bottom: 16px; }
.sb-tabs {
  display: flex; gap: 18px; border-bottom: 1px solid #E6EBF2; margin: -4px 0 16px;
}
.sb-tab {
  border: none; background: transparent; padding: 10px 2px 12px;
  font-size: 14px; font-weight: 600; color: #64748B; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.sb-tab.active { color: #0F172A; font-weight: 800; border-bottom-color: #1E3A8A; }
.sb-active-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px;
}
.sb-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #F1F5F9; border: 1px solid #E2E8F0; border-radius: 999px;
  padding: 5px 8px 5px 12px; font-size: 12.5px; font-weight: 600; color: #334155;
}
.sb-chip-x {
  width: 20px; height: 20px; border: none; border-radius: 50%;
  background: #E2E8F0; color: #64748B; cursor: pointer; line-height: 1; font-size: 14px;
}
.sb-chip-x:hover { background: #CBD5E1; color: #0F172A; }
.sb-clear { font-size: 12.5px; border: none; background: transparent; cursor: pointer; padding: 0; }
.sb-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.sb-where { font-size: 13.5px; font-weight: 700; color: #0F172A; flex-shrink: 0; }
.sb-select, .sb-input {
  border: 1px solid #E2E8F0; border-radius: 8px; background: #fff;
  padding: 9px 12px; font-size: 13.5px; color: #0F172A; outline: none;
}
.sb-select:focus, .sb-input:focus { border-color: #93C5FD; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.sb-field { min-width: 180px; flex: 1; }
.sb-op { min-width: 140px; }
.sb-input { min-width: 140px; flex: 1; }
.sb-input:disabled { background: #F8FAFC; color: #94A3B8; }
.sb-add { width: auto; white-space: nowrap; padding: 9px 14px; }
.sb-add:disabled { opacity: .5; cursor: default; }
.sb-results { margin-bottom: 16px; scroll-margin-top: 18px; }
.sb-results-flash {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .28);
  transition: box-shadow .35s ease;
}
.sb-lower {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-bottom: 16px;
}
.sb-card-title { margin: 0 0 14px; font-size: 15px; font-weight: 800; color: #0F172A; }
.sb-useful-list { display: flex; flex-direction: column; gap: 8px; }
.sb-useful-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; border: 1px solid #E2E8F0; background: #F8FAFC;
  border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 600; color: #475569;
  cursor: pointer;
}
.sb-useful-btn:hover { background: #EFF6FF; border-color: #BFDBFE; color: #1D4ED8; }
.sb-useful-icon { display: inline-flex; color: #94A3B8; }
.sb-useful-icon svg { width: 14px; height: 14px; }
.sb-link-list { margin: 0; padding-left: 18px; color: #475569; }
.sb-link-list li { margin-bottom: 10px; }
.sb-link-list .link-blue { border: none; background: transparent; padding: 0; cursor: pointer; font: inherit; }
.sb-tips-panel {
  margin-top: 12px; padding: 12px 14px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 10px;
}
.sb-tips-panel ul { margin: 0; padding-left: 18px; color: #475569; font-size: 13px; line-height: 1.5; }
.sb-tips-panel li { margin-bottom: 6px; }
.sb-results-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px;
}
.sb-results-head .sb-card-title { margin: 0; }
.sb-result-count { font-size: 13px; font-weight: 700; color: #94A3B8; }
.sb-result-note { font-size: 12.5px; color: #94A3B8; padding: 10px 0 0; }
.click-row { cursor: pointer; }
.click-row:hover td { background: #F8FAFC; }
@media (max-width: 900px) {
  .sb-lower { grid-template-columns: 1fr; }
  .sb-row { align-items: stretch; }
  .sb-field, .sb-op, .sb-input { min-width: 0; width: 100%; }
}

