@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --midnight: #18191d;
  --bg-deep: #141519;
  --surface: #222428;
  --surface-raised: #292b30;
  --surface-soft: #1d1f23;
  --ocean: #2d6cf6;
  --ocean-hover: #417cf7;
  --ocean-soft: rgba(45,108,246,.12);
  --blue-grey: #293f6b;
  --text: #e2e4e8;
  --text-strong: #f5f6f8;
  --muted: #9ba0aa;
  --muted-low: #858b96;
  --border: #34363d;
  --border-soft: rgba(255,255,255,.065);
  --success: #48c78e;
  --danger: #ef6474;
  --warning: #e7b45a;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 12px;
  --shadow-float: 0 16px 42px rgba(0,0,0,.24);
  --shadow-focus: 0 0 0 3px rgba(45,108,246,.16);
  --ease: cubic-bezier(.22,.8,.3,1);
  --motion-fast: 150ms;
  --motion: 220ms;
  --motion-slow: 320ms;
  --sidebar-motion: 360ms;
  --sidebar-ease: cubic-bezier(.22,1,.36,1);
  --sidebar-width: 256px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--midnight); scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #3b3e46 transparent; }
body { min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--text); background: var(--midnight); font-family: Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size: 14px; line-height: 1.55; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
body.sidebar-collapsed { --sidebar-width: 84px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid #6b99ff; outline-offset: 2px; }
::selection { color: #fff; background: rgba(45,108,246,.45); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 99px; background: #3d4048; background-clip: padding-box; }

.ambient { position: fixed; z-index: -1; width: 420px; height: 420px; border-radius: 50%; filter: blur(150px); opacity: .035; pointer-events: none; }
.ambient-one { top: -270px; right: 12vw; background: var(--ocean); }
.ambient-two { bottom: -320px; left: 32vw; background: #315aaf; }
.react-dashboard { height: 100vh; height: 100dvh; overflow: hidden; }
.app-shell { height: 100%; min-height: 0; display: grid; grid-template-columns: var(--sidebar-width) minmax(0,1fr); transition: grid-template-columns var(--sidebar-motion) var(--sidebar-ease); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 22px 16px 18px; overflow: visible; border-right: 1px solid var(--border); background: #1c1d21; transition: width var(--sidebar-motion) var(--sidebar-ease),padding var(--sidebar-motion) var(--sidebar-ease),transform var(--sidebar-motion) var(--sidebar-ease); will-change: width,transform; }
.react-dashboard .cult-side-panel.sidebar { transform-origin: left center; }
.sidebar-brand-row { position: relative; min-height: 47px; display: flex; align-items: center; margin-bottom: 24px; }
.brand { width: 100%; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 2px 0; overflow: hidden; color: var(--text-strong); text-align: left; text-decoration: none; transition: gap var(--sidebar-motion) var(--sidebar-ease),padding var(--sidebar-motion) var(--sidebar-ease); }
.brand-mark { width: 40px; height: 40px; display: block; flex: 0 0 40px; object-fit: contain; padding: 1px; border: 2px solid rgba(255,255,255,.92); border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.22); image-rendering: auto; }
.brand-copy { width: 158px; max-width: 158px; min-width: 0; overflow: hidden; opacity: 1; transform: translateX(0); text-align: left; white-space: nowrap; transition: width var(--sidebar-motion) var(--sidebar-ease),max-width var(--sidebar-motion) var(--sidebar-ease),opacity 180ms ease,transform var(--motion) var(--sidebar-ease); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.sidebar-toggle { position: absolute; top: 8px; right: -29px; width: 27px; height: 27px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); background: #222428; cursor: pointer; box-shadow: 0 5px 18px rgba(0,0,0,.18); transition: color var(--motion-fast),border-color var(--motion-fast),background var(--motion-fast),box-shadow var(--motion-fast); }
.sidebar-toggle:hover { color: var(--text-strong); border-color: #4a4d56; background: var(--surface-raised); }
.sidebar-toggle svg, .mobile-menu-toggle svg, .notification-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-toggle svg { transition: transform var(--sidebar-motion) var(--sidebar-ease); }
.tabs { display: grid; gap: 3px; }
.sidebar-tabs { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; gap: 0; }
.sidebar-tabs-main, .sidebar-tabs-bottom { display: grid; gap: 3px; }
.sidebar-tabs-bottom { margin-top: auto; padding-top: 12px; }
.tab-button { position: relative; width: 100%; min-height: 42px; display: grid; grid-template-columns: 19px minmax(0,1fr); align-items: center; gap: 11px; padding: 9px 42px 9px 11px; overflow: hidden; border: 1px solid transparent; border-radius: 8px; color: #92969f; background: transparent; text-align: left; white-space: nowrap; cursor: pointer; transition: color var(--motion-fast),background var(--motion-fast),border-color var(--motion-fast),transform var(--motion-fast),grid-template-columns var(--sidebar-motion) var(--sidebar-ease),gap var(--sidebar-motion) var(--sidebar-ease),padding var(--sidebar-motion) var(--sidebar-ease); }
.tab-button::before { content: ""; position: absolute; inset: 7px auto 7px 0; width: 2px; border-radius: 2px; background: var(--ocean); opacity: 0; transform: scaleY(.35); transition: opacity var(--motion-fast),transform var(--motion) var(--ease); }
.tab-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab-button > span:not(.nav-count) { width: 150px; max-width: 150px; overflow: hidden; opacity: 1; transform: translateX(0); transition: width var(--sidebar-motion) var(--sidebar-ease),max-width var(--sidebar-motion) var(--sidebar-ease),opacity 160ms ease,transform var(--motion) var(--sidebar-ease); }
.tab-button:first-child svg { fill: currentColor; stroke: none; }
.tab-button:hover { color: #c8cbd1; background: rgba(255,255,255,.035); }
.tab-button:active { transform: scale(.985); }
.tab-button.active { color: #f7f8fa; border-color: rgba(45,108,246,.16); background: rgba(45,108,246,.11); }
.tab-button.active::before { opacity: 1; transform: scaleY(1); }
.tab-button.active svg { color: #73a0ff; }
.nav-count { position: absolute; top: 50%; right: 11px; min-width: 22px; padding: 1px 6px; border-radius: 99px; color: #a5aab3; background: rgba(255,255,255,.065); font-size: 11px; text-align: center; transform: translateY(-50%) scale(1); transition: top var(--sidebar-motion) var(--sidebar-ease),right var(--sidebar-motion) var(--sidebar-ease),min-width var(--sidebar-motion) var(--sidebar-ease),padding var(--sidebar-motion) var(--sidebar-ease),font-size var(--sidebar-motion) var(--sidebar-ease),transform var(--sidebar-motion) var(--sidebar-ease),background var(--motion-fast),color var(--motion-fast); }
.tab-button.active .nav-count { color: #a9c4ff; background: rgba(45,108,246,.18); }
.sidebar-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 13px 8px 2px; color: var(--muted); white-space: nowrap; transition: gap var(--sidebar-motion) var(--sidebar-ease),padding var(--sidebar-motion) var(--sidebar-ease); }
.sidebar-foot > span:last-child { width: 172px; max-width: 172px; overflow: hidden; opacity: 1; transform: translateX(0); transition: width var(--sidebar-motion) var(--sidebar-ease),max-width var(--sidebar-motion) var(--sidebar-ease),opacity 180ms ease,transform var(--motion) var(--sidebar-ease); }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { color: #c7cad0; font-size: 12px; font-weight: 500; }
.sidebar-foot small { margin-top: 2px; font-size: 11px; }
.session-clock { display: grid !important; gap: 1px; color: var(--muted-low); font-variant-numeric: tabular-nums; line-height: 1.35; }
.session-clock span, .session-clock b { display: block; }
.session-clock b { color: #9bb9fb; font-size: 11px; font-weight: 600; letter-spacing: .015em; }
.status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(72,199,142,.08); }
.sidebar-collapsed .brand-copy, .sidebar-collapsed .sidebar-foot > span:last-child { width: 0; max-width: 0; opacity: 0; transform: translateX(-7px); pointer-events: none; }
.sidebar-collapsed .sidebar { padding-inline: 14px; }
.sidebar-collapsed .brand { gap: 0; justify-content: center; padding-inline: 0; }
.sidebar-collapsed .tab-button { grid-template-columns: 20px minmax(0,0fr); gap: 0; justify-content: initial; padding-inline: 18px; }
.sidebar-collapsed .tab-button > span:not(.nav-count) { width: 0; max-width: 0; opacity: 0; transform: translateX(-7px); }
.sidebar-collapsed .nav-count { top: 3px; right: 3px; min-width: 16px; padding: 0 3px; font-size: 10px; transform: translateY(0) scale(.94); }
.sidebar-collapsed .sidebar-foot { gap: 0; justify-content: center; padding-inline: 0; }
.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.nav-backdrop { display: none; }

.workspace { grid-column: 2; min-width: 0; width: 100%; max-width: 100%; height: 100%; display: grid; grid-template-rows: 78px minmax(0,1fr); overflow-x: clip; overflow-y: hidden; padding: 0 32px 20px; transition: padding var(--motion-slow) var(--ease); }
.topbar { position: sticky; top: 0; z-index: 18; min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); background: rgba(24,25,29,.88); backdrop-filter: blur(18px); }
.topbar-context { display: flex; align-items: center; gap: 12px; }
.topbar-eyebrow { display: block; margin-bottom: 2px; color: var(--muted-low); font-size: 11px; font-weight: 600; letter-spacing: .12em; }
.mobile-menu-toggle { display: none; }
h1,h2,h3,h4 { margin: 0; color: var(--text-strong); font-family: Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; letter-spacing: -.025em; }
h1 { font-size: 21px; font-weight: 600; }
h2 { font-size: clamp(23px,2.2vw,29px); font-weight: 650; }
h3 { font-size: 17px; font-weight: 600; }
h4 { font-size: 15px; }
.kicker, .section-label { display: block; margin: 0 0 5px; color: #8eaff8; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.notification-toggle { min-height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: var(--surface-soft); font: inherit; cursor: pointer; transition: color var(--motion-fast),background var(--motion-fast),border-color var(--motion-fast),transform var(--motion-fast); }
.notification-toggle:disabled { cursor: wait; opacity: .7; }
.notification-toggle b { font-size: 12px; font-weight: 600; }
.notification-toggle:hover { color: var(--text); border-color: #454850; background: var(--surface); }
.notification-toggle:active { transform: scale(.97); }
.notification-toggle.active { color: #7dddb2; border-color: rgba(72,199,142,.24); background: rgba(72,199,142,.07); }
.tab-panel { display: none; min-height: 0; padding: 26px 0 0; }
.tab-panel.active { height: 100%; display: block; overflow: hidden; animation: panel-in var(--motion) var(--ease) both; }
.tab-panel.active > div { min-height: 0; height: 100%; }
@keyframes panel-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.surface { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,.018); }
.page-heading { min-width: 0; min-height: 58px; display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
.page-heading > div { min-width: 0; }
.page-heading p { max-width: 680px; margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.split-heading { align-items: center; }

.hero-card { position: relative; min-height: 178px; display: flex; align-items: center; overflow: hidden; padding: 28px 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(112deg,#222428 0%,#202329 64%,#202734 100%); }
.hero-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 82% 42%,rgba(45,108,246,.12),transparent 23%); pointer-events: none; }
.hero-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px rgba(255,255,255,.025); pointer-events: none; }
.hero-card > div:first-child { position: relative; z-index: 1; }
.hero-card h2 { margin: 16px 0 7px; font-size: clamp(25px,3vw,34px); line-height: 1.12; }
.hero-card h2 em { color: #78a1ff; font-style: normal; }
.hero-card p { max-width: 560px; margin: 0; color: var(--muted); font-size: 14px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid rgba(72,199,142,.2); border-radius: 6px; color: #a8e3c7; background: rgba(72,199,142,.06); font-size: 11px; }
.live-pill i, .live-sync i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(72,199,142,.08); }
.hero-brand { position: absolute; right: 5%; width: 122px; height: 122px; overflow: hidden; border: 1px solid rgba(255,255,255,.19); border-radius: 50%; opacity: .85; box-shadow: 0 14px 32px rgba(0,0,0,.22); }
.hero-brand img { width: 100%; height: 100%; display: block; object-fit: cover; }

.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 14px 0; }
.metric-card { min-height: 112px; display: flex; flex-direction: column; justify-content: center; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color var(--motion-fast),background var(--motion-fast); }
@keyframes card-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.metric-card:hover { border-color: #41444c; background: #25272c; }
.metric-card > span { color: var(--muted); font-size: 12px; }
.metric-card strong { margin: 7px 0 4px; color: var(--text-strong); font-size: 29px; font-weight: 650; line-height: 1; letter-spacing: -.04em; }
.metric-card strong sup { margin-left: 3px; color: var(--muted); font-size: 12px; font-weight: 500; }
.metric-card small { color: var(--muted-low); font-size: 11px; }
.accent-card { border-color: rgba(45,108,246,.28); background: linear-gradient(135deg,rgba(45,108,246,.105),#222428 52%); }
.accent-card strong { color: #83a9ff; }
.warning-card strong { color: var(--warning); }
.overview-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; }
.view-overview > div { display: grid; grid-template-rows: auto auto minmax(0,1fr); }
.view-overview .overview-grid { min-height: 0; }
.view-overview .activity-card, .view-overview .recent-card { min-height: 0; height: 100%; display: flex; flex-direction: column; }
.view-overview .activity-bars, .view-overview .recent-list { min-height: 0; overflow-y: auto; padding-right: 8px; }
.view-overview .activity-bars { flex: 1; height: auto; }
.view-overview .recent-list { flex: 1; align-content: start; padding-bottom: 18px; }
.view-overview .recent-item, .view-overview .activity-row { scroll-margin-block: 9px; }
.activity-card, .recent-card, .chart-card, .table-card, .create-card { padding: 20px; }
.section-heading, .chart-header, .catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ghost-link { padding: 5px 7px; border: 0; border-radius: 6px; color: #9bb9fb; background: transparent; cursor: pointer; font-size: 12px; transition: color var(--motion-fast),background var(--motion-fast); }
.ghost-link:hover { color: #c2d4ff; background: var(--ocean-soft); }
.activity-bars { height: 176px; display: grid; align-content: start; gap: 11px; margin-top: 15px; padding: 3px 8px 18px 0; overflow-y: auto; }
.activity-row { min-height: 23px; display: grid; grid-template-columns: minmax(92px,145px) minmax(90px,1fr) 72px; align-items: center; gap: 11px; }
.activity-row strong { overflow: hidden; color: #d2d5da; font-size: 12px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.activity-row b { color: #e2e4e8; font-size: 12px; font-weight: 600; text-align: right; white-space: nowrap; }
.activity-track { height: 7px; overflow: hidden; border-radius: 4px; background: #2c2e34; }
.activity-track i { display: block; min-width: 5px; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#245bcf,var(--ocean)); transform-origin: left; animation: bar-grow 520ms var(--ease) both; }
@keyframes bar-grow { from { transform: scaleX(0); opacity: .4; } to { transform: scaleX(1); opacity: 1; } }
.recent-list { display: grid; gap: 6px; margin-top: 10px; }
.recent-item { position: relative; width: 100%; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid rgba(45,108,246,.12); border-radius: 8px; color: inherit; background: rgba(45,108,246,.025); text-align: left; text-decoration: none; cursor: pointer; transition: color var(--motion-fast),background var(--motion-fast),border-color var(--motion-fast),box-shadow var(--motion-fast),transform var(--motion-fast); }
.recent-item:hover, .recent-item:focus-visible { color: #b9ceff; border-color: rgba(76,127,241,.5); background: rgba(45,108,246,.09); box-shadow: 0 6px 18px rgba(0,0,0,.14); transform: translateX(2px); }
.recent-icon { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(45,108,246,.28); border-radius: 7px; color: #8db0ff; background: rgba(45,108,246,.11); transition: color var(--motion-fast),background var(--motion-fast),border-color var(--motion-fast),transform var(--motion-fast); }
.recent-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.recent-item:hover .recent-icon, .recent-item:focus-visible .recent-icon { color: #fff; border-color: var(--ocean-hover); background: var(--ocean); transform: translateX(2px); }
.recent-item strong, .recent-item small { display: block; }
.recent-item strong { overflow: hidden; color: #edf2ff; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; transition: color var(--motion-fast); }
.recent-item:hover strong, .recent-item:focus-visible strong { color: #8db0ff; }
.recent-item small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.recent-cta { display: inline-block; margin-top: 3px; color: #8eaff8; font-size: 10px; font-weight: 650; letter-spacing: .01em; }
.recent-cta::after { content: "  →"; }
.recent-item b { color: #e7e9ed; font-size: 13px; font-weight: 600; }

input, select, textarea { min-width: 0; width: 100%; outline: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: #1b1c20; padding: 10px 11px; caret-color: #79a2ff; transition: border-color var(--motion-fast),background var(--motion-fast),box-shadow var(--motion-fast); }
input::placeholder, textarea::placeholder { color: #858b96; }
input:hover, select:hover, textarea:hover { border-color: #464951; }
input:focus, select:focus, textarea:focus { border-color: #4c7ff1; background: #1d1f24; box-shadow: var(--shadow-focus); }
textarea { resize: vertical; }
select { cursor: pointer; }
label { display: grid; gap: 6px; color: #c8cbd1; font-size: 12px; font-weight: 500; }
label small { color: var(--muted-low); font-size: 11px; line-height: 1.45; }
.filter-bar { display: grid; grid-template-columns: minmax(230px,2fr) repeat(3,minmax(135px,1fr)); gap: 8px; margin-bottom: 14px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: #1e2024; }
.search-field { position: relative; display: flex; align-items: center; }
.search-field span, .search-field svg { position: absolute; left: 12px; top: 50%; z-index: 1; width: 14px; height: 14px; color: var(--muted); pointer-events: none; transform: translateY(-50%); }
.search-field span { display: grid; place-items: center; font-size: 16px; line-height: 1; }
.search-field input { padding-left: 36px; }
.primary-button, .secondary-button, .delete-button, .ai-button { min-height: 40px; border: 1px solid transparent; border-radius: 8px; padding: 9px 14px; font-size: 13px; font-weight: 650; cursor: pointer; transition: color var(--motion-fast),background var(--motion-fast),border-color var(--motion-fast),box-shadow var(--motion-fast),transform var(--motion-fast); }
.product-card .save-changes-button { transition: opacity 180ms ease,color var(--motion-fast),background var(--motion-fast),border-color var(--motion-fast),box-shadow var(--motion-fast),transform var(--motion-fast); }
.product-card .save-changes-button.save-pending:disabled { cursor: wait; opacity: 1; }
.product-card .save-changes-button.save-fade:disabled { animation: save-button-fade 650ms ease-out forwards; }
@keyframes save-button-fade { from { opacity: 1; } to { opacity: .38; } }
.primary-button { color: white; background: var(--ocean); box-shadow: 0 6px 18px rgba(45,108,246,.16); }
.primary-button:hover { background: var(--ocean-hover); box-shadow: 0 8px 22px rgba(45,108,246,.22); transform: translateY(-1px); }
.primary-button:active, .secondary-button:active, .delete-button:active, .ai-button:active, .offer-link:active, .export-button:active { transform: scale(.985); }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .38; box-shadow: none; transform: none; }
.primary-button.wide { width: 100%; }
.secondary-button { color: #d0d3d9; border-color: var(--border); background: #292b30; }
.secondary-button:hover:not(:disabled) { border-color: #494c54; background: #303238; }
.delete-button { color: #f17d8a; background: transparent; }
.delete-button:hover { background: rgba(239,100,116,.08); }
.ai-button { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; color: #dfe8ff; border-color: rgba(45,108,246,.28); background: rgba(45,108,246,.12); }
.ai-button:hover { border-color: rgba(80,133,248,.48); background: rgba(45,108,246,.18); transform: translateY(-1px); }
.ai-button:disabled { cursor: wait; opacity: .72; }
.spark { color: #7da5ff; }
.button-loader { display: none; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.ai-button.loading .button-loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.offer-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.scroll-zone { max-height: calc(100vh - 232px); overflow: auto; padding: 0 8px 18px 0; }
.offer-grid.scroll-zone { padding-top: 12px; }
.view-offers > div { display: flex; flex-direction: column; }
.view-offers .page-heading, .view-offers .filter-bar { flex: 0 0 auto; }
.view-offers .offer-grid { flex: 1 1 auto; min-height: 0; max-height: none; align-content: start; }
.offer-card { min-width: 0; display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: #202226; transition: border-color var(--motion-fast),background var(--motion-fast),transform var(--motion),box-shadow var(--motion); animation: card-in 260ms var(--ease) both; }
.offer-grid .offer-card { scroll-margin-block: 9px; }
.offer-card:nth-child(2) { animation-delay: 28ms; }.offer-card:nth-child(3) { animation-delay: 56ms; }.offer-card:nth-child(4) { animation-delay: 84ms; }.offer-card:nth-child(5) { animation-delay: 112ms; }.offer-card:nth-child(6) { animation-delay: 140ms; }
.offer-card:hover { border-color: #44474f; background: #24262b; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,.14); }
.offer-card.best-offer { border-color: rgba(72,199,142,.3); background: linear-gradient(145deg,rgba(72,199,142,.04),#202226 42%); }
.offer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #969ba5; font-size: 11px; }
.offer-top time { flex: 0 0 auto; }
.badge-stack { min-width: 0; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.best-badge { padding: 3px 7px; border-radius: 5px; color: #9ce0c1; background: rgba(72,199,142,.09); font-size: 10px; font-weight: 650; }
.source-badge, .soft-badge, .step-badge { max-width: 180px; overflow: hidden; padding: 3px 7px; border: 1px solid var(--border); border-radius: 6px; color: #adb2bb; background: rgba(255,255,255,.018); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.offer-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(95px,auto); align-items: center; gap: 14px; margin: 17px 0 14px; }
.offer-body > div { min-width: 0; }
.offer-body h3 { display: -webkit-box; overflow: hidden; font-size: 15px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.offer-body p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.offer-price { max-width: 170px; color: #8eaff8; font-size: 18px; font-weight: 650; line-height: 1.25; text-align: right; }
.offer-specs { display: flex; flex-wrap: wrap; gap: 5px; margin: -1px 0 10px; }
.offer-specs span { padding: 4px 7px; border: 1px solid #39404d; border-radius: 6px; color: #c7d2e5; background: #252a32; font-size: 11px; font-weight: 550; }
.product-code { color: #88adff; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-decoration: none; }
a.product-code:hover { color: #acc6ff; text-decoration: underline; text-underline-offset: 3px; }
.product-code-button { position: relative; z-index: 2; min-height: 25px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; overflow: visible; border: 1px solid rgba(45,108,246,.3); border-radius: 6px; color: #9ab8ff; background: rgba(45,108,246,.09); cursor: pointer; transition: color var(--motion-fast),border-color var(--motion-fast),background var(--motion-fast); }
.product-code-button em { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: max-content; max-width: min(320px,calc(100vw - 24px)); padding: 8px 10px; overflow: hidden; color: #dce6ff; background: #292b30; border: 1px solid #474b55; border-radius: 7px; box-shadow: var(--shadow-float); font-size: 11px; font-style: normal; font-weight: 550; letter-spacing: 0; line-height: 1.4; opacity: 0; pointer-events: none; text-align: left; text-overflow: ellipsis; white-space: normal; transform: translateY(-3px); transition: opacity var(--motion-fast),transform var(--motion-fast); }
.product-code-button svg { width: 12px; height: 12px; flex: 0 0 auto; }
.product-code-button:hover, .product-code-button:focus-visible { border-color: rgba(91,139,248,.68); color: #c3d5ff; background: rgba(45,108,246,.17); }
.product-code-button:hover em, .product-code-button:focus-visible em { opacity: 1; transform: none; }
.product-code-preview { position: fixed; z-index: 1000; width: max-content; max-width: min(300px,calc(100vw - 24px)); padding: 9px 11px; border: 1px solid #474b55; border-radius: 7px; color: #edf0f5; background: #292b30; box-shadow: var(--shadow-float); font-size: 12px; font-weight: 600; line-height: 1.45; pointer-events: none; animation: tooltip-in var(--motion-fast) var(--ease) both; }
@keyframes tooltip-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.offer-facts { display: grid; gap: 7px; margin: 0; padding: 10px 11px; border: 1px solid var(--border-soft); border-radius: 7px; background: #1c1e22; }
.offer-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 11px; }
.offer-facts span { color: var(--muted); font-size: 11px; }
.offer-facts strong { color: #e1e4e9; font-size: 13px; font-weight: 600; text-align: right; }
.tag-row, .saved-chips, .keyword-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.offer-card .tag-row { margin-top: 13px; }
.offer-card .tag-row:empty { display: none; }
.tag-row > span, .saved-chips span, .keyword-chip { padding: 4px 7px; border-radius: 6px; color: #c1c5cd; background: rgba(255,255,255,.05); font-size: 10px; }
.tag-row .coupon-tag { padding: 7px 10px; color: #b9ceff; border: 1px solid rgba(45,108,246,.25); background: rgba(45,108,246,.1); font-size: 11px; line-height: 1.3; letter-spacing: .02em; }
.coupon-tag b { color: #f4f7ff; font-size: 13px; }
.offer-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; min-height: 36px; margin-top: auto; padding-top: 15px; }
.offer-link, .export-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(45,108,246,.42); border-radius: 8px; color: #eef3ff; background: var(--ocean); text-decoration: none; font-size: 12px; font-weight: 650; transition: background var(--motion-fast),border-color var(--motion-fast),box-shadow var(--motion-fast),transform var(--motion-fast); }
.offer-link { flex: 1 1 auto; width: auto; padding: 8px 11px; }
.offer-link:hover, .export-button:hover { border-color: #6b97fa; background: var(--ocean-hover); box-shadow: 0 7px 20px rgba(45,108,246,.18); transform: translateY(-1px); }
.coupon-redeem-link { display: inline-flex; flex: 0 1 auto; align-items: center; justify-content: center; gap: 7px; min-width: 132px; padding: 8px 11px; border: 1px solid rgba(72,199,142,.34); border-radius: 8px; color: #b9efd5; background: rgba(72,199,142,.09); font-size: 12px; font-weight: 650; text-decoration: none; transition: color var(--motion-fast),border-color var(--motion-fast),background var(--motion-fast),transform var(--motion-fast); }
.coupon-redeem-link:hover { border-color: rgba(72,199,142,.68); color: #e3fff1; background: rgba(72,199,142,.16); transform: translateY(-1px); }
.missing-link { display: inline-flex; flex: 1 1 auto; align-items: center; color: var(--muted-low); font-size: 11px; }
.offer-delete-form { display: flex; flex: 0 0 auto; margin: 0; }
.offer-delete-button { flex: 0 0 38px; border-color: rgba(239,100,116,.24); background: rgba(239,100,116,.055); }
.offer-delete-button:hover { border-color: rgba(239,100,116,.55); background: rgba(239,100,116,.13); }
.offer-delete-button:disabled { opacity: .45; cursor: wait; transform: none; }
.confirm-open { overflow: hidden; }
.confirm-overlay { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 20px; background: rgba(10,11,14,.72); backdrop-filter: blur(8px); }
.confirm-dialog { position: relative; width: min(100%,440px); display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 15px; padding: 21px; overflow: hidden; border: 1px solid #3d4048; border-radius: 11px; color: var(--text); background: linear-gradient(145deg,#292b30,#222428 62%); box-shadow: 0 24px 70px rgba(0,0,0,.45),inset 0 1px rgba(255,255,255,.035); }
.confirm-dialog::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg,transparent,rgba(239,100,116,.82),transparent); }
dialog.confirm-dialog:not([open]) { display: none; }
dialog.confirm-dialog { position: fixed; inset: 0; max-width: calc(100vw - 40px); margin: auto; }
dialog.confirm-dialog[open] { animation: confirm-dialog-in 200ms var(--ease) both; }
dialog.confirm-dialog::backdrop { background: rgba(10,11,14,.72); backdrop-filter: blur(8px); animation: confirm-backdrop-in 160ms ease both; }
.confirm-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(239,100,116,.25); border-radius: 9px; color: #f38b97; background: rgba(239,100,116,.09); }
.confirm-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.confirm-copy { min-width: 0; }
.confirm-copy h3 { margin-top: 5px; font-size: 17px; }
.confirm-copy p { margin: 8px 0 0; color: #b9bdc5; font-size: 13px; line-height: 1.55; }
.confirm-actions { grid-column: 1/-1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 5px; padding-top: 15px; border-top: 1px solid var(--border-soft); }
.confirm-actions button { min-width: 104px; }
.confirm-delete-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border: 1px solid rgba(239,100,116,.42); border-radius: 8px; color: #fff1f3; background: #b84654; font-size: 13px; font-weight: 650; cursor: pointer; transition: background var(--motion-fast),border-color var(--motion-fast),transform var(--motion-fast),box-shadow var(--motion-fast); }
.confirm-delete-button:hover { border-color: #f17d8a; background: #cb5260; box-shadow: 0 8px 22px rgba(184,70,84,.2); transform: translateY(-1px); }
.confirm-delete-button:disabled { opacity: .62; cursor: wait; transform: none; }
.confirm-spinner { width: 13px; height: 13px; display: inline-block; border: 2px solid rgba(255,255,255,.32); border-top-color: #fff; border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes confirm-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes confirm-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.offer-card details { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.offer-card summary { display: flex; justify-content: space-between; color: var(--muted); cursor: pointer; list-style: none; font-size: 11px; transition: color var(--motion-fast); }
.offer-card summary:hover { color: #bcc0c8; }
.offer-card summary::-webkit-details-marker { display: none; }
.offer-card summary span { transition: transform var(--motion); }
.offer-card details[open] summary span { transform: rotate(45deg); }
.detail-copy { color: #b5bac3; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; animation: detail-in var(--motion) var(--ease) both; }
@keyframes detail-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.detail-copy a { color: #91b2ff; text-decoration: none; }

.period-switch, .catalog-tabs { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: #1d1f23; }
.period-switch a, .catalog-tabs button { position: relative; padding: 6px 10px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; text-decoration: none; cursor: pointer; font-size: 11px; transition: color var(--motion-fast),background var(--motion-fast),box-shadow var(--motion-fast); }
.period-switch a.active, .catalog-tabs button.active { color: #f5f7fb; background: #2c3037; box-shadow: inset 0 0 0 1px rgba(45,108,246,.28); }
.history-filter { display: grid; grid-template-columns: minmax(180px,.55fr) minmax(260px,1fr) minmax(180px,.4fr); gap: 9px; margin: -5px 0 14px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #1e2024; }
.history-metrics { min-height: 74px; display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin-bottom: 10px; }
.history-stat { padding: 13px 15px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); animation: card-in var(--motion) var(--ease) both; }
.history-stat span, .history-stat strong { display: block; }
.history-stat span { color: var(--muted); font-size: 11px; }
.history-stat strong { margin-top: 4px; color: var(--text-strong); font-size: 16px; font-weight: 650; }
.chart-card { height: calc(100vh - 282px); min-height: 380px; }
.chart-canvas { position: relative; height: calc(100% - 50px); margin-top: 15px; }
.chart-canvas canvas { width: 100% !important; height: 100% !important; animation: chart-in 520ms var(--ease) both; }
.react-dashboard .chart-scroll { position: relative; width: 100%; height: calc(100% - 50px); min-width: 0; margin-top: 15px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #4b5565 transparent; }
.react-dashboard .chart-scroll::-webkit-scrollbar { height: 8px; }
.react-dashboard .chart-scroll::-webkit-scrollbar-track { background: transparent; }
.react-dashboard .chart-scroll::-webkit-scrollbar-thumb { border-radius: 999px; background: #4b5565; }
.react-dashboard .chart-scroll .chart-canvas { height: 100%; min-height: 0; margin-top: 0; }
@keyframes chart-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.chart-legend { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; color: var(--muted); font-size: 10px; }
.react-dashboard .chart-legend { flex-wrap: nowrap; justify-content: flex-start; max-width: 100%; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; scrollbar-color: #4b5565 transparent; white-space: nowrap; }
.react-dashboard .chart-legend::-webkit-scrollbar { height: 6px; }
.react-dashboard .chart-legend::-webkit-scrollbar-thumb { border-radius: 999px; background: #4b5565; }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-item i { width: 7px; height: 7px; border-radius: 2px; }
.chart-tooltip { position: absolute; z-index: 3; display: none; max-width: min(300px,calc(100% - 16px)); pointer-events: none; padding: 8px 10px; border: 1px solid #464951; border-radius: 7px; color: white; background: #292b30; box-shadow: var(--shadow-float); font-size: 11px; line-height: 1.4; white-space: normal; overflow-wrap: normal; animation: tooltip-in var(--motion-fast) var(--ease) both; }
.chart-tooltip span { color: var(--muted); }.chart-tooltip em { color: #8fb1ff; font-style: normal; }

.api-metrics { margin-top: 0; }
.export-button { padding: 9px 12px; white-space: nowrap; }
.table-card { padding-bottom: 7px; }
.table-wrap { max-height: calc(100vh - 350px); overflow: auto; margin-top: 13px; padding-bottom: 18px; }
.view-history > div, .view-logs > div, .view-coupons > div, .view-api > div { display: flex; flex-direction: column; }
.view-history .page-heading, .view-history .history-filter, .view-history .history-metrics,
.view-logs .page-heading, .view-coupons .page-heading, .view-api .page-heading, .view-api .api-metrics { flex: 0 0 auto; }
.view-history .chart-card { flex: 1 1 auto; min-height: 0; height: auto; }
.view-history .history-chart { display: flex; flex-direction: column; overflow: hidden; }
.view-history .history-chart .chart-header { flex: 0 0 auto; }
.view-history .history-chart .chart-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.history-product-filters { grid-template-columns: minmax(220px,.8fr) minmax(180px,.45fr); max-width: 760px; }
.history-product-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-content: start; gap: 14px; overflow-y: auto; padding: 2px 6px 14px 2px; }
.history-product-card { position: relative; min-width: 0; min-height: 174px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 17px 42px 16px 17px; border: 1px solid var(--border); border-radius: 11px; color: var(--text); background: var(--surface); text-align: left; cursor: pointer; transition: border-color var(--motion-fast),background var(--motion-fast),transform var(--motion-fast),box-shadow var(--motion-fast); }
.history-product-card:hover, .history-product-card:focus-visible { border-color: rgba(76,127,241,.55); background: #25282e; box-shadow: 0 8px 22px rgba(0,0,0,.16); transform: translateY(-1px); outline: none; }
.history-product-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 10px; }
.history-product-card-top > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-product-card-top i { flex: 0 0 auto; color: #9aa0aa; font-size: 9px; font-style: normal; }
.history-product-card-top i.active { color: #7fd3a3; }
.history-product-card > strong { display: -webkit-box; overflow: hidden; color: #edf0f5; font-size: 15px; font-weight: 650; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.history-product-card > small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.history-product-card-bottom { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 14px; }
.history-product-card-bottom b { color: #e6eaf0; font-size: 16px; font-weight: 650; }
.history-product-card-bottom span { overflow: hidden; color: var(--muted-low); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.history-product-arrow { position: absolute; top: 50%; right: 13px; width: 16px; height: 16px; color: #8baeff; transform: translateY(-50%); }
.history-detail-heading { display: grid; grid-template-columns: minmax(0,1fr) minmax(170px,220px); align-items: end; gap: 24px; margin-bottom: 18px; }
.history-detail-main { min-width: 0; display: grid; justify-items: start; gap: 14px; }
.history-back-button { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 2px 0 0; border: 0; border-radius: 4px; color: #aeb8cb; background: transparent; font: inherit; font-size: 12px; font-weight: 550; white-space: nowrap; cursor: pointer; }
.history-back-button:hover { color: #a8c4ff; }
.history-back-button:focus-visible { outline: 2px solid #7da6ff; outline-offset: 3px; }
.history-back-button svg { width: 15px; height: 15px; }
.history-detail-copy { min-width: 0; }
.history-detail-copy h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-detail-copy p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.history-period-select { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.history-graph-summary { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 5px; color: #aeb5c1; }
.history-graph-summary p { margin: 0; font-size: 10px; line-height: 1.4; }
.history-graph-summary > span { flex: 0 0 auto; color: #d0d6e0; font-size: 10px; white-space: nowrap; }
.history-chart-toolbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin: 5px 0 9px; }
.history-chart-hint { color: var(--muted-low); font-size: 10px; }
.history-zoom-controls { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--border-soft); border-radius: 8px; background: #1d1f23; }
.history-zoom-controls button { min-width: 28px; min-height: 26px; padding: 3px 7px; border: 0; border-radius: 5px; color: #d8e2f4; background: transparent; font: inherit; font-size: 14px; cursor: pointer; }
.history-zoom-controls button:hover:not(:disabled), .history-zoom-controls button:focus-visible { background: #303847; outline: none; }
.history-zoom-controls button:disabled { color: #707783; cursor: default; }
.history-zoom-controls output { min-width: 35px; color: #becce4; font-size: 10px; text-align: center; }
.history-zoom-controls .history-zoom-reset { padding: 3px 9px; border-left: 1px solid var(--border-soft); border-radius: 0 5px 5px 0; font-size: 10px; white-space: nowrap; }
.history-variant-legend { flex: 0 0 auto; justify-content: flex-start; gap: 6px; margin-bottom: 2px; }
.history-variant-legend .legend-item { flex: 0 0 auto; min-width: 0; max-width: 100%; gap: 6px; padding: 4px 7px; border: 1px solid var(--border-soft); border-radius: 6px; background: rgba(255,255,255,.018); }
.history-variant-legend .legend-item > span { max-width: min(260px,42vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-variant-legend .legend-item small { color: var(--muted-low); font-size: 9px; }
.view-history .history-chart .chart-scroll { flex: 1 1 auto; height: auto; min-height: 240px; margin-top: 4px; overflow: hidden; }
.view-history .history-chart .chart-canvas { width: 100%; height: 100%; min-width: 0 !important; margin: 0; }
.view-history .history-chart .chart-canvas canvas { touch-action: none; }
@media (max-width: 1280px) { .history-product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 980px) { .history-product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.view-logs .table-card, .view-coupons .table-card, .view-api .table-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.view-logs .table-wrap, .view-coupons .table-wrap, .view-api .table-wrap { flex: 1 1 auto; min-height: 0; max-height: none; }
.view-logs .table-wrap { margin-top: 0; }
.coupon-logs-page { width: 100%; min-width: 0; }
.coupon-log-code { color: #b9d0ff; letter-spacing: .02em; }
.table-link { color: #8eb4ff; text-decoration: none; }
.table-link:hover { color: #d7e4ff; text-decoration: underline; }
.coupon-table-card td { vertical-align: top; }
.coupon-observation-text { display: block; max-height: 7.2em; padding-right: 5px; overflow-y: auto; overflow-wrap: anywhere; scrollbar-width: thin; scrollbar-color: #454954 transparent; }
table { width: 100%; min-width: 780px; border-collapse: collapse; }
th,td { padding: 11px 10px; border-bottom: 1px solid var(--border-soft); text-align: left; white-space: nowrap; font-size: 11px; }
th { position: sticky; top: 0; z-index: 2; color: #969ca7; background: #222428; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
tbody tr { transition: background var(--motion-fast); }
tbody tr:hover { background: rgba(255,255,255,.024); }
td { color: #aeb2ba; }
td strong, td small { display: block; }
td strong { color: #d9dce1; font-weight: 550; }
td small { color: var(--muted-low); }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 5px; font-weight: 550; }
.status-pill.success { color: #86d7b1; background: rgba(72,199,142,.08); }
.status-pill.failed { color: #f08a96; background: rgba(239,100,116,.08); }
.status-pill.neutral { color: #e5bd72; background: rgba(231,180,90,.08); }
.reason-cell { max-width: 420px; white-space: normal; overflow-wrap: anywhere; }

.product-layout { display: grid; grid-template-columns: minmax(320px,.78fr) minmax(480px,1.22fr); gap: 14px; align-items: start; }
.view-products > div { display: flex; flex-direction: column; }
.view-products .page-heading { flex: 0 0 auto; }
.view-products .product-layout { flex: 1 1 auto; min-height: 0; }
/* Ajuste do cadastro no painel HTML */
#products.tab-panel.active { display: flex; flex-direction: column; }
#products.tab-panel.active > .page-heading { height: auto; flex: 0 0 auto; }
#products.tab-panel.active > .product-layout { height: auto; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.create-card { max-height: 100%; display: grid; align-content: start; gap: 13px; overflow-x: hidden; overflow-y: auto; padding-bottom: 20px; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #3b3e46 transparent; }
.form-note { margin: 0; color: #9298a3; font-size: 11px; line-height: 1.45; text-align: center; }
.keyword-chips:empty { display: none; }
.product-preview { padding: 12px; border: 1px solid rgba(72,199,142,.2); border-radius: 8px; background: rgba(72,199,142,.055); animation: detail-in var(--motion) var(--ease) both; }
.product-preview strong, .product-preview small { display: block; }
.product-preview small { margin-top: 3px; color: var(--muted); }
.product-preview .saved-chips { margin-top: 8px; }
.scope-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scope-badge { display: inline-flex; width: fit-content; align-items: center; padding: 4px 7px; border: 1px solid rgba(45,108,246,.3); border-radius: 5px; color: #b8cdfa; background: rgba(45,108,246,.09); font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.scope-review { display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(45,108,246,.18); border-radius: 8px; background: rgba(45,108,246,.035); animation: detail-in var(--motion) var(--ease) both; }
.scope-review h4 { margin: 3px 0 0; color: #e8eaee; font-size: 14px; line-height: 1.45; }
.scope-review label small { margin-top: 4px; }
.scope-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.scope-facts span { display: grid; gap: 2px; min-width: 90px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; color: #d0d3d9; background: rgba(255,255,255,.018); font-size: 11px; }
.scope-facts b { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.scope-rule { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 8px; align-items: start; padding: 8px 9px; border-left: 2px solid #4a4d55; border-radius: 0 6px 6px 0; color: #bec2ca; background: rgba(255,255,255,.018); font-size: 11px; line-height: 1.5; }
.scope-rule b { color: #e0e2e6; font-size: 10px; }
.scope-rule.required { border-color: #4f82ee; }
.scope-rule.optional { border-color: #748099; }
.scope-rule.excluded { border-color: #d66d79; }
.product-validation { display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 9px; align-items: start; padding: 10px 11px; border: 1px solid rgba(72,199,142,.2); border-radius: 8px; color: #9bddbd; background: rgba(72,199,142,.055); animation: detail-in var(--motion) var(--ease) both; }
.product-validation.corrected { color: #f0c879; border-color: rgba(231,180,90,.25); background: rgba(231,180,90,.06); }
.product-validation.accepted { color: #9bddbd; border-color: rgba(72,199,142,.28); background: rgba(72,199,142,.07); }
.product-validation.unverified { color: #f298a2; border-color: rgba(239,100,116,.24); background: rgba(239,100,116,.06); }
.product-validation.duplicate { color: #f3c977; border-color: rgba(231,180,90,.34); background: rgba(231,180,90,.075); }
.product-validation svg { width: 17px; height: 17px; margin-top: 1px; }
.product-validation strong, .product-validation span { display: block; }
.product-validation strong { color: currentColor; font-size: 12px; }
.product-validation span { margin-top: 2px; color: #b9bdc5; font-size: 11px; line-height: 1.5; }
.verification-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.verification-sources a { padding: 4px 7px; border: 1px solid rgba(45,108,246,.28); border-radius: 6px; color: #abc3ff; background: rgba(45,108,246,.08); font-size: 10px; font-weight: 650; text-decoration: none; }
.verification-sources a:hover { border-color: rgba(76,127,241,.6); background: rgba(45,108,246,.14); }
.apply-correction-button { width: fit-content; margin-top: 10px; padding: 7px 10px; border: 1px solid rgba(240,200,121,.32); border-radius: 7px; color: #f5d995; background: rgba(240,200,121,.09); font-size: 11px; font-weight: 700; cursor: pointer; transition: border-color var(--motion-fast),background var(--motion-fast),transform var(--motion-fast); }
.apply-correction-button:hover { border-color: rgba(240,200,121,.62); background: rgba(240,200,121,.15); transform: translateY(-1px); }
.open-duplicate-button { width: fit-content; margin-top: 10px; padding: 7px 10px; border: 1px solid rgba(80,133,248,.45); border-radius: 7px; color: #dce7ff; background: rgba(45,108,246,.14); font-size: 11px; font-weight: 700; cursor: pointer; transition: border-color var(--motion-fast),background var(--motion-fast),transform var(--motion-fast); }
.open-duplicate-button:hover { border-color: rgba(107,151,250,.78); background: rgba(45,108,246,.23); transform: translateY(-1px); }
.ai-halo-button { width: 100%; margin-top: 2px; overflow: hidden; border-radius: 8px; isolation: isolate; background: transparent !important; box-shadow: none !important; }
.ai-halo-button > div, .ai-halo-button button { width: 100%; }
.ai-halo-button button { min-height: 42px; overflow: hidden; padding: 10px 16px !important; border: 1px solid rgba(96, 126, 190, .42) !important; border-radius: 8px !important; color: #e8efff; background-clip: padding-box; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 5px 16px rgba(0, 0, 0, .18) !important; }
.ai-halo-button > div { padding: 0 !important; overflow: hidden; border-radius: 8px !important; background: transparent !important; box-shadow: none !important; }
.keyword-chip { border: 1px solid rgba(45,108,246,.18); color: #b9ccf7; background: rgba(45,108,246,.08); cursor: pointer; transition: background var(--motion-fast),border-color var(--motion-fast); }
.keyword-chip:hover { border-color: rgba(45,108,246,.38); background: rgba(45,108,246,.14); }
.keyword-chip::after { content: " ×"; color: #7b8598; }
.suggest-feedback { justify-self: start; width: fit-content; max-width: 100%; box-sizing: border-box; padding: 7px 10px; border-radius: 7px; font-size: 11px; line-height: 1.45; }
.suggest-feedback.success { color: #9bddbd; background: rgba(72,199,142,.08); }
.suggest-feedback.warning { color: #f0c879; background: rgba(231,180,90,.08); }
.suggest-feedback.error { color: #f298a2; background: rgba(239,100,116,.08); }
.catalog-column { min-width: 0; min-height: 0; height: 100%; display: flex; align-self: stretch; flex-direction: column; overflow: hidden; }
.catalog-head { min-height: 43px; margin-bottom: 9px; }
.catalog-tabs { margin-bottom: 8px; }
.category-filter { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 9px; }
.category-filter button { padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; transition: color var(--motion-fast),background var(--motion-fast),border-color var(--motion-fast); }
.category-filter button:hover { color: #c4c7ce; border-color: #494c54; }
.category-filter button.active { color: #eff4ff; border-color: rgba(45,108,246,.4); background: rgba(45,108,246,.12); }
.product-list { min-height: 0; max-height: none; display: flex; flex: 1 1 auto; flex-direction: column; gap: 9px; overflow-x: hidden; overflow-y: auto; padding: 0 8px 18px 0; scroll-padding-block: 9px 18px; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #3b3e46 transparent; }
.product-card { min-width: 0; height: auto; display: grid; flex: 0 0 auto; gap: 12px; overflow: hidden; padding: 15px; scroll-margin-block: 9px; box-shadow: none; transition: border-color var(--motion-fast),background var(--motion-fast); animation: card-in var(--motion) var(--ease) both; }
.product-card:hover { border-color: #42454d; background: #25272b; }
.scroll-zone, .table-wrap, .activity-bars, .recent-list, .create-card, .product-list { scroll-padding-block: 9px 18px; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #3b3e46 transparent; }
.product-card-head { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.product-symbol { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(45,108,246,.18); border-radius: 8px; color: #8dafff; background: rgba(45,108,246,.09); }
.product-symbol .material-symbols-rounded { display: block; overflow: hidden; font-size: 20px; font-variation-settings: "FILL" 0,"wght" 450,"GRAD" 0,"opsz" 20; line-height: 1; }
.product-card-head strong, .product-card-head small { display: block; }
.product-card-head strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.product-card-head small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.scope-summary { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 5px 9px; align-items: start; padding: 9px 10px; border: 1px solid rgba(45,108,246,.14); border-radius: 7px; background: rgba(45,108,246,.025); }
.scope-summary p { margin: 1px 0 0; color: #d0d3d9; font-size: 11px; line-height: 1.5; }
.scope-summary small { grid-column: 1/-1; color: var(--muted); font-size: 10px; line-height: 1.5; }
.scope-summary small b { color: #bfc4ce; }
.display-name-field { gap: 5px; }
.display-name-field input { border-color: rgba(45,108,246,.24); }
.toggle { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.toggle span { position: relative; width: 30px; height: 18px; border: 1px solid #444750; border-radius: 99px; background: #2d3036; transition: background var(--motion),border-color var(--motion); }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: #858993; transition: transform var(--motion) var(--ease),background var(--motion); }
.toggle input:focus-visible + span { outline: 2px solid #6b99ff; outline-offset: 2px; }
.toggle input:checked + span { border-color: #3972f0; background: var(--ocean); }
.toggle input:checked + span::after { background: #fff; transform: translateX(12px); }
.toggle em { color: var(--muted); font-size: 10px; font-style: normal; }
.edit-grid { min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.edit-grid > * { min-width: 0; }
.react-dashboard .edit-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.react-dashboard .edit-grid > label:first-child { grid-column: 1/-1; }
.saved-chips { min-height: 20px; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; }
.card-actions .suggest-feedback { margin-right: auto; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0; }
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.empty-state { grid-column: 1/-1; min-height: 210px; display: grid; place-items: center; align-content: center; padding: 28px; border: 1px dashed #41444c; border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty-state span { color: #7fa6ff; font-size: 25px; }
.empty-state h3 { margin-top: 7px; color: #d0d3d9; }
.empty-state p { margin: 4px 0 0; }
.empty-state.compact { min-height: 96px; border: 0; }
.live-sync { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; margin-inline-start: auto; padding-inline: 2px; color: #9ce0c1; font-size: 11px; white-space: nowrap; }
.focused-card { position: relative; padding-top: 44px !important; scroll-margin: 90px; border: 2px solid #5790ff !important; outline: 3px solid rgba(45,108,246,.17); background: linear-gradient(145deg,rgba(45,108,246,.11),#23262c 44%) !important; box-shadow: 0 0 0 1px rgba(255,255,255,.12),0 15px 38px rgba(0,0,0,.24) !important; animation: focused-pulse 1s var(--ease) 3; }
.focused-card::after { content: "VOCÊ ESTÁ AQUI"; position: absolute; z-index: 3; top: 10px; right: 12px; padding: 5px 8px; border: 1px solid #8db2ff; border-radius: 6px; color: #fff; background: var(--ocean); box-shadow: 0 6px 16px rgba(45,108,246,.22); font-size: 10px; font-weight: 750; letter-spacing: .06em; }
.offer-card.focused-card { padding-top: 16px !important; }
.offer-card.focused-card::after { top: -12px; }
@keyframes focused-pulse { 0%,100% { outline-color: rgba(45,108,246,.17); } 50% { outline-color: rgba(97,148,255,.46); } }
.soft-refresh { animation: soft-update 260ms var(--ease) both; }
@keyframes soft-update { from { opacity: .65; transform: translateY(2px); } to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .workspace { padding-inline: 24px; }
  .offer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }
  .hero-brand { opacity: .42; right: 2%; }
}
@media (max-width: 820px) {
  :root, body.sidebar-collapsed { --sidebar-width: 0px; }
  .react-dashboard { height: auto; min-height: 100vh; overflow: visible; }
  .app-shell { height: auto; min-height: 100vh; display: block; }
  .sidebar { width: min(276px,calc(100vw - 46px)) !important; padding: 22px 16px 18px; transform: translateX(-105%); box-shadow: 16px 0 40px rgba(0,0,0,.32); }
  .mobile-nav-open .sidebar { transform: translateX(0); }
  .sidebar-collapsed .brand { gap: 11px; }
  .sidebar-collapsed .brand-copy, .sidebar-collapsed .sidebar-foot > span:last-child { width: auto; max-width: none; opacity: 1; transform: none; pointer-events: auto; }
  .sidebar-collapsed .sidebar-foot { gap: 10px; padding: 13px 8px 2px; }
  .sidebar-collapsed .tab-button { grid-template-columns: 19px minmax(0,1fr); gap: 11px; justify-content: initial; padding: 9px 42px 9px 11px; }
  .sidebar-collapsed .tab-button > span:not(.nav-count) { width: auto; max-width: none; opacity: 1; transform: none; }
  .sidebar-collapsed .nav-count { top: 50%; right: 11px; min-width: 22px; padding: 1px 6px; font-size: 11px; transform: translateY(-50%) scale(1); }
  .sidebar-collapsed .sidebar-toggle svg { transform: none; }
  .sidebar-toggle { display: none; }
  .nav-backdrop { position: fixed; inset: 0; z-index: 29; display: block; border: 0; background: rgba(7,8,11,.65); opacity: 0; pointer-events: none; backdrop-filter: blur(3px); transition: opacity var(--motion); }
  .mobile-nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .workspace { height: auto; display: block; overflow: visible; padding: 0 18px 32px; }
  .topbar { min-height: 70px; }
  .mobile-menu-toggle { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: var(--surface); }
  .notification-toggle b { display: none; }
  .hero-card { min-height: 168px; padding: 24px; }
  .hero-brand { display: none; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1/-1; }
  .tab-panel.active, .tab-panel.active > div { height: auto; overflow: visible; }
  .view-overview > div, .view-offers > div, .view-history > div, .view-logs > div, .view-coupons > div, .view-api > div, .view-products > div { display: block; }
  .view-overview .activity-card, .view-overview .recent-card, .view-logs .table-card, .view-coupons .table-card, .view-api .table-card { height: auto; display: block; overflow: visible; }
  .view-overview .activity-bars { height: 176px; overflow-y: auto; }
  .view-overview .recent-list { overflow: visible; }
  .product-layout { display: grid; grid-template-columns: 1fr; grid-template-rows: none; }
  .create-card, .catalog-column { height: auto; max-height: none; overflow: visible; scrollbar-gutter: auto; }
  .product-list, .scroll-zone, .table-wrap { max-height: none; overflow: visible; }
  .chart-card { height: 430px; }
  .view-history .history-chart { height: 430px; min-height: 360px; }
  .history-product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: none; overflow: visible; }
  .history-detail-heading { grid-template-columns: minmax(0,1fr) minmax(170px,220px); }
  .view-history .history-chart .chart-scroll { min-height: 220px; }

  .view-coupons { overflow-x: hidden; }
  .view-coupons .coupon-logs-page { max-width: 100%; overflow: hidden; }
  .view-coupons .coupon-table-card { width: 100%; max-width: 100%; padding: 10px; overflow: hidden; }
  .view-coupons .coupon-table-card .table-wrap { width: 100%; max-width: 100%; margin: 0; padding: 0; overflow: visible; }
  .view-coupons .coupon-table-card table,
  .view-coupons .coupon-table-card tbody { display: block; width: 100%; min-width: 0; }
  .view-coupons .coupon-table-card thead { display: none; }
  .view-coupons .coupon-table-card tbody { display: grid; gap: 10px; }
  .view-coupons .coupon-log-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(104px,.72fr); gap: 12px 14px; width: 100%; min-width: 0; padding: 14px; border: 1px solid var(--border-soft); border-radius: 10px; background: #202226; }
  .view-coupons .coupon-log-row:hover { background: #23262b; }
  .view-coupons .coupon-log-row td { display: flex; min-width: 0; padding: 0; border: 0; flex-direction: column; gap: 4px; color: #c3c7cf; white-space: normal; overflow-wrap: anywhere; }
  .view-coupons .coupon-log-row td::before { content: attr(data-label); color: #777e8a; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .view-coupons .coupon-time,
  .view-coupons .coupon-source,
  .view-coupons .coupon-observations { grid-column: 1 / -1; }
  .view-coupons .coupon-time { padding-bottom: 10px; border-bottom: 1px solid var(--border-soft); color: #959ba6; }
  .view-coupons .coupon-log-code { color: #dce6ff; font-size: 13px; overflow-wrap: anywhere; }
  .view-coupons .coupon-source { padding-top: 2px; }
  .view-coupons .coupon-observations { padding-top: 10px; border-top: 1px solid var(--border-soft); }
  .view-coupons .coupon-observation-text { max-height: 8.4em; font-size: 11px; line-height: 1.5; }
}
@media (max-width: 700px) {
  #products.tab-panel.active > .product-layout { flex: none; overflow: visible; }
}
@media (max-width: 560px) {
  .workspace { padding-inline: 13px; }
  .tab-panel { padding-top: 20px; }
  .page-heading, .split-heading { min-height: 0; align-items: flex-start; flex-direction: column; }
  .page-heading .export-button { width: 100%; }
  .hero-card h2 { font-size: 25px; }
  .metric-grid, .offer-grid, .history-metrics, .filter-bar, .history-filter, .edit-grid, .react-dashboard .edit-grid { grid-template-columns: 1fr; }
  .history-product-filters { grid-template-columns: 1fr; }
  .history-product-grid { grid-template-columns: 1fr; }
  .history-detail-heading { grid-template-columns: 1fr; align-items: start; }
  .history-period-select { width: 100%; }
  .search-field { grid-column: auto; }
  .metric-card { min-height: 98px; }
  .offer-body { grid-template-columns: minmax(0,1fr); }
  .offer-price { max-width: none; text-align: left; }
  .product-card-head { grid-template-columns: 34px minmax(0,1fr); }
  .toggle { grid-column: 1/-1; }
  .chart-header { align-items: flex-start; flex-direction: column; }
  .chart-legend { justify-content: flex-start; }
  .activity-row { grid-template-columns: 78px minmax(70px,1fr) 58px; gap: 7px; }
  .activity-row strong { font-size: 11px; }
  .activity-row b { font-size: 10px; }
  .focused-card::after { right: 8px; }
  .recent-item { grid-template-columns: 27px minmax(0,1fr); }
  .recent-item b { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@keyframes fiscalerta-spinner-rotate {
  to { transform: rotate(360deg); }
}
@keyframes fiscalerta-spinner-fill {
  0%, 100% { opacity: .5; stroke-dasharray: 8 48; stroke-dashoffset: 0; }
  50% { opacity: 1; stroke-dasharray: 42 14; stroke-dashoffset: -7; }
}
.halo-button-spinner {
  animation: fiscalerta-spinner-rotate .78s linear infinite !important;
  transform-origin: center;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .halo-button-spinner { animation: none !important; transform: none !important; }
  .halo-button-spinner-indicator { animation: fiscalerta-spinner-fill 1.6s ease-in-out infinite !important; }
}
