/* Multi Scraper v2 */
:root {
  --accent: #ff6a00;
  --accent-2: #ff9a3c;
  --accent-soft: #fff1e6;
  --accent-ink: #b54700;
  --bg: #f6f4f1;
  --bg-2: #efebe6;
  --surface: #ffffff;
  --surface-2: #faf8f6;
  --border: #e8e2db;
  --border-2: #d9d1c8;
  --text: #1d1712;
  --muted: #7a6e64;
  --dark: #1b2530;
  --green: #12a150; --green-soft: #e6f7ed;
  --red: #e5383b; --red-soft: #fdecec;
  --amber: #c27c00; --amber-soft: #fff5db;
  --purple: #7c4dff; --purple-soft: #f0ebff;
  --shadow-sm: 0 1px 2px rgba(40, 25, 10, .06);
  --shadow: 0 6px 20px -6px rgba(60, 35, 10, .14), 0 2px 6px -2px rgba(60, 35, 10, .06);
  --shadow-lg: 0 24px 60px -12px rgba(40, 20, 0, .28);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar: 272px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --accent-soft: #2c1a0c;
  --accent-ink: #ffb27a;
  --bg: #0e0f11;
  --bg-2: #15171a;
  --surface: #17191c;
  --surface-2: #1d2024;
  --border: #272a2f;
  --border-2: #353940;
  --text: #f1eee9;
  --muted: #9a958e;
  --dark: #e9e4dd;
  --green-soft: #0f2a1b; --red-soft: #2e1415; --amber-soft: #2b2110; --purple-soft: #1f1736;
  --shadow: 0 8px 24px -8px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -10px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14.5px/1.5 "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
code { font: 12.5px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--bg-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
kbd { font: 11px ui-monospace, Consolas, monospace; padding: 1px 6px; border-radius: 5px; border: 1px solid currentColor; opacity: .55; }
hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
svg { display: block; flex-shrink: 0; }
i { display: inline-flex; font-style: normal; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.pad { padding: 20px; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.txt-green { color: var(--green); } .txt-red { color: var(--red); }
.noscript { padding: 16px; background: var(--red); color: #fff; text-align: center; }
.hidden-frame { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--surface); --c: var(--text); --bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--b); color: var(--c); border: 1px solid var(--bd);
  font: 600 13.5px/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s, opacity .2s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { border-color: var(--border-2); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { --b: linear-gradient(135deg, var(--accent), #ff8a2a); --c: #fff; --bd: transparent; box-shadow: 0 6px 16px -6px rgba(255, 106, 0, .6); }
.btn-primary:hover { box-shadow: 0 10px 22px -8px rgba(255, 106, 0, .7); border-color: transparent; }
.btn-dark { --b: var(--dark); --c: var(--bg); --bd: transparent; }
.btn-danger { --b: var(--red); --c: #fff; --bd: transparent; }
.danger-ghost { --c: var(--red); }
.btn-lg { height: 46px; padding: 0 20px; font-size: 14.5px; border-radius: 12px; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s, transform .15s;
}
.icon-btn:hover { background: var(--bg-2); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: 600 13px inherit; font-family: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ---------- form ---------- */
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field > small { display: block; margin-top: 6px; }
input:not([type=checkbox]), .select {
  width: 100%; height: 42px; padding: 0 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: 500 14px inherit; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:not([type=checkbox]):focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 106, 0, .14); }
.select { width: auto; padding-right: 30px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
.field .select { width: 100%; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input { padding-right: 76px; }
.input-wrap .input-icon { position: absolute; right: 6px; }
.input-wrap .input-icon + .input-icon { right: 40px; }
.input-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; }
.input-icon:hover { color: var(--text); background: var(--bg-2); }
.input-wrap.big input { height: 52px; font-size: 15.5px; padding-left: 44px; border-radius: 12px; }
.input-lead { position: absolute; left: 15px; color: var(--muted); pointer-events: none; }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13px; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check span { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-2); background: var(--surface); display: grid; place-items: center; transition: all .15s var(--ease); flex-shrink: 0; }
.check span::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .15s var(--ease); }
.check input:checked + span { background: var(--accent); border-color: var(--accent); }
.check input:checked + span::after { transform: rotate(-45deg) scale(1); }

/* ---------- misc components ---------- */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--bg-2); color: var(--muted); white-space: nowrap; }
.b-green { background: var(--green-soft); color: var(--green); }
.b-purple { background: var(--purple-soft); color: var(--purple); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-gray { background: var(--bg-2); color: var(--muted); }
.pill { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--bg-2); color: var(--muted); }
.avatar {
  --h: 24; display: inline-grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 13px; font-weight: 800; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 85% 58%), hsl(calc(var(--h) + 35) 80% 48%));
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.avatar.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.avatar.xs { width: 24px; height: 24px; border-radius: 7px; font-size: 11px; background: var(--dark); color: var(--bg); box-shadow: none; }
.avatar.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #ffb15c); color: #fff; font-weight: 800; letter-spacing: -.03em;
  box-shadow: 0 8px 18px -8px rgba(255, 106, 0, .8);
}
.logo-mark.big { width: 56px; height: 56px; border-radius: 16px; font-size: 19px; margin: 0 auto 14px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--radius-sm); font-size: 13px; margin: 0 0 14px; }
.alert svg { width: 17px; height: 17px; margin-top: 1px; }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-warn { background: var(--amber-soft); color: var(--amber); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 106, 0, .2); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; flex-shrink: 0; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
.btn-primary .spinner { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--bg-2) 25%, var(--surface-2) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
.sk-line { height: 12px; margin: 10px 0; }
.sk-row { height: 42px; margin: 6px 0; border-radius: 10px; }
.sk-av { width: 44px; height: 44px; border-radius: 13px; margin-bottom: 18px; }
.sk-img { aspect-ratio: 1; border-radius: 0; }
.sk-gallery { aspect-ratio: 1.1; border-radius: 14px; margin-bottom: 18px; }
.w60 { width: 60%; } .w40 { width: 40%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- login ---------- */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; overflow: hidden; background: #160c05; color: #fff; display: flex; align-items: flex-end; padding: 56px; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .85; animation: float 14s ease-in-out infinite; }
.orb-1 { width: 420px; height: 420px; background: #ff6a00; top: -80px; left: -60px; }
.orb-2 { width: 340px; height: 340px; background: #ff2d55; bottom: 10%; right: -80px; animation-delay: -5s; opacity: .55; }
.orb-3 { width: 260px; height: 260px; background: #ffc14d; top: 40%; left: 35%; animation-delay: -9s; opacity: .45; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(40px, 30px) scale(1.08); } 66% { transform: translate(-30px, 20px) scale(.95); } }
.login-art-text { position: relative; max-width: 470px; }
.login-art h2 { font-size: 40px; line-height: 1.1; font-weight: 800; }
.login-art h2 span { background: linear-gradient(90deg, #ffd29c, #ff9a3c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-art p { opacity: .8; font-size: 15.5px; margin: 16px 0 22px; }
.login-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.login-chips span { padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); font-size: 12.5px; font-weight: 600; backdrop-filter: blur(6px); }
.login-panel { display: grid; place-items: center; padding: 32px; }
.login-card { width: 100%; max-width: 380px; text-align: left; animation: rise .5s var(--ease); }
.login-card h1 { text-align: center; font-size: 26px; }
.login-card > p { text-align: center; margin: 4px 0 26px; }

/* ---------- layout ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
  display: flex; flex-direction: column; gap: 14px; padding: 18px 14px;
  background: var(--surface); border-right: 1px solid var(--border);
  transition: transform .3s var(--ease);
}
.sb-head { display: flex; align-items: center; gap: 11px; padding: 2px 6px; }
.sb-title { display: flex; flex-direction: column; line-height: 1.25; flex: 1; }
.sb-title b { font-size: 15.5px; }
.sb-title small { color: var(--muted); font-size: 11.5px; }
.sb-close { display: none; }
.sb-new { height: 42px; }
.sb-new kbd { margin-left: auto; border-color: rgba(255, 255, 255, .6); color: #fff; opacity: .8; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; text-decoration: none; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.sb-nav a:hover { background: var(--bg-2); color: var(--text); }
.sb-nav a.active { background: var(--accent-soft); color: var(--accent-ink); }
.sb-section { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sb-label { display: flex; justify-content: space-between; align-items: center; padding: 8px 11px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sb-search { position: relative; margin: 0 4px 8px; }
.sb-search i { position: absolute; left: 10px; top: 9px; color: var(--muted); }
.sb-search svg { width: 15px; height: 15px; }
.sb-search input { height: 34px; padding-left: 32px; font-size: 13px; }
.sb-brands { overflow-y: auto; flex: 1; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; text-decoration: none; transition: background .15s, transform .15s; }
.sb-brand:hover { background: var(--bg-2); transform: translateX(2px); }
.sb-brand.active { background: var(--accent-soft); }
.sb-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sb-brand-text b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-brand-text small { color: var(--muted); font-size: 11.5px; }
.sb-foot { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--border); padding-top: 12px; }
.sb-user { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; min-width: 0; }
.sb-backdrop { display: none; }

.main { margin-left: var(--sidebar); padding: 14px 32px 120px; min-height: 100vh; }
.topbar { display: flex; align-items: center; gap: 10px; height: 52px; margin-bottom: 10px; }
.menu-btn { display: none; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--muted); min-width: 0; }
.crumbs a { text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--text); }
.crumbs span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.crumbs b { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs svg { width: 14px; height: 14px; }
.job-pill { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 13px inherit; font-family: inherit; cursor: pointer; box-shadow: var(--shadow); animation: glow 2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 5px rgba(255, 106, 0, .14), var(--shadow); } }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); font-size: 13px; font-weight: 600; }
.banner span { flex: 1; }
.banner svg { width: 17px; height: 17px; }

.view { animation: rise .35s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- dashboard ---------- */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 6px 0 24px; flex-wrap: wrap; }
.hero h1 { font-size: 30px; font-weight: 800; }
.hero p { margin: 6px 0 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 34px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.stat small { display: block; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.stat b { font-size: 25px; font-weight: 800; letter-spacing: -.03em; }
.stat b.sm { font-size: 16px; }
.stat-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.stat-ic.c2 { background: var(--purple-soft); color: var(--purple); }
.stat-ic.c3 { background: var(--green-soft); color: var(--green); }
.stat-ic.c4 { background: var(--amber-soft); color: var(--amber); }
.stat-ic svg { width: 21px; height: 21px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-head h2 { font-size: 19px; }
.search { position: relative; display: flex; align-items: center; }
.search > i { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.search > i svg { width: 17px; height: 17px; }
.search input { padding-left: 40px; padding-right: 40px; }
.search kbd { position: absolute; right: 12px; }
.search .icon-btn { position: absolute; right: 6px; }
.search.sm { width: 240px; }
.search.sm input { height: 36px; font-size: 13px; }

.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.brand-card {
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; color: var(--text); font-family: inherit;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms);
}
.brand-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-2); }
.brand-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.brand-card h3 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-host { color: var(--muted); font-size: 12.5px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.bc-host:hover { color: var(--accent); }
.bc-count { display: flex; align-items: baseline; gap: 6px; margin: 16px 0 14px; }
.bc-count b { font-size: 28px; font-weight: 800; letter-spacing: -.04em; }
.bc-count span { color: var(--muted); font-size: 13px; }
.bc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--border); margin-top: auto; }
.add-card { align-items: center; justify-content: center; gap: 6px; min-height: 210px; border: 2px dashed var(--border-2); background: transparent; box-shadow: none; }
.add-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.add-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; transition: transform .3s var(--ease); }
.add-card:hover .add-ic { transform: rotate(90deg) scale(1.08); background: var(--surface); }
.sk-card { cursor: default; animation: none; }
.sk-card:hover { transform: none; box-shadow: none; }

/* menu */
.menu-wrap { position: relative; }
.menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: 500 13.5px inherit; font-family: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.menu button:hover, .menu a:hover { background: var(--bg-2); }
.menu .danger { color: var(--red); }
.menu svg { width: 16px; height: 16px; color: var(--muted); }
.menu .danger svg { color: var(--red); }

/* ---------- brand view ---------- */
.brand-hero { display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: 20px; margin-bottom: 18px; flex-wrap: wrap;
  background: radial-gradient(circle at 0% 0%, var(--accent-soft), transparent 55%), var(--surface); border: 1px solid var(--border); }
.bh-info { flex: 1; min-width: 220px; }
.bh-info h1 { font-size: 26px; font-weight: 800; }
.bh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; font-size: 13px; }
.bh-meta a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); }
.bh-meta a:hover { color: var(--accent); }
.bh-meta svg { width: 14px; height: 14px; }
.bh-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.toolbar {
  position: sticky; top: 0; z-index: 20; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 0; margin-bottom: 4px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
}
.toolbar .search { min-width: 220px; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--bg-2); gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 600 13px inherit; font-family: inherit; cursor: pointer; transition: all .2s var(--ease); white-space: nowrap; }
.seg button em { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--border); color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg button.on em { background: var(--accent-soft); color: var(--accent-ink); }
.seg.icons button { padding: 0 9px; }
.result-line { display: flex; align-items: center; gap: 16px; margin: 6px 0 14px; font-size: 13px; flex-wrap: wrap; }
.slow-note { display: inline-flex; align-items: center; gap: 8px; }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.pcard {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
  animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms);
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pcard.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 106, 0, .18); }
.pimg { position: relative; aspect-ratio: 1; background: #fff; overflow: hidden; border-bottom: 1px solid var(--border); }
[data-theme="dark"] .pimg { background: #f4f2ef; }
.pimg img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s var(--ease); }
.pcard:hover .pimg img { transform: scale(1.06); }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; color: #c9c1b8; background: var(--surface-2); }
.noimg svg { width: 34px; height: 34px; }
.noimg.big svg { width: 54px; height: 54px; }
.pcheck { position: absolute; top: 10px; left: 10px; z-index: 2; opacity: 0; transform: scale(.8); transition: all .2s var(--ease); }
.pcheck span { box-shadow: var(--shadow); }
.pcard:hover .pcheck, .pcard.selected .pcheck { opacity: 1; transform: none; }
.sale-tag { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 800; }
.sale-tag.static { position: static; }
.img-count { position: absolute; bottom: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 99px; background: rgba(20, 15, 10, .62); color: #fff; font-size: 11px; font-weight: 700; backdrop-filter: blur(4px); }
.img-count svg { width: 12px; height: 12px; }
.pbody { padding: 12px 14px 14px; }
.pbody h4 { font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 6px; }
.price-row b { font-size: 16px; font-weight: 800; color: var(--accent-ink); }
.price-row s { font-size: 12.5px; color: var(--muted); }
.pfoot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock.in { color: var(--green); }
.stock.out { color: var(--red); }

.ptable-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.ptable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ptable th { text-align: left; padding: 11px 12px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.ptable td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ptable tr { cursor: pointer; transition: background .15s; }
.ptable tbody tr:hover { background: var(--surface-2); }
.ptable tr.selected { background: var(--accent-soft); }
.prow { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.thumb-sm { width: 44px; height: 44px; border-radius: 9px; overflow: hidden; background: #fff; border: 1px solid var(--border); flex-shrink: 0; }
.thumb-sm img { width: 100%; height: 100%; object-fit: contain; }
.row-go { color: var(--muted); }

.empty { text-align: center; padding: 60px 20px; }
.empty-ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--muted); }
.empty h3 { font-size: 18px; }
.empty p { margin: 6px 0 16px; }
.sentinel { height: 1px; }

.bulk-bar {
  position: fixed; left: calc(50% + var(--sidebar) / 2); bottom: 22px; transform: translateX(-50%); z-index: 45;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 16px;
  background: var(--dark); color: var(--bg); box-shadow: var(--shadow-lg);
}
.bulk-bar b { margin-right: 6px; font-size: 13.5px; white-space: nowrap; }
.bulk-bar .btn { --b: rgba(255, 255, 255, .1); --c: var(--bg); --bd: rgba(255, 255, 255, .14); box-shadow: none; }
[data-theme="dark"] .bulk-bar .btn { --b: rgba(0, 0, 0, .08); --bd: rgba(0, 0, 0, .14); }
.bulk-bar .icon-btn { color: inherit; opacity: .7; }
.t-up { transition: opacity .25s, transform .3s var(--ease); }
.t-up-from { opacity: 0; transform: translate(-50%, 20px); }

/* ---------- drawer ---------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(15, 10, 5, .42); backdrop-filter: blur(3px); }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%);
  display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow-lg);
}
.t-slide { transition: transform .35s var(--ease); }
.t-slide-from { transform: translateX(100%); }
.dr-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.dr-head h3 { font-size: 17px; line-height: 1.35; margin-top: 2px; }
.dr-body { flex: 1; overflow-y: auto; padding: 20px; }
.dr-foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.gallery { margin-bottom: 18px; }
.g-main { position: relative; aspect-ratio: 1.1; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--border); cursor: zoom-in; }
.g-main img { width: 100%; height: 100%; object-fit: contain; animation: fadein .3s ease; }
@keyframes fadein { from { opacity: 0; } }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255, 255, 255, .92); color: #222; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s, transform .2s; }
.g-main:hover .g-nav, .lightbox .g-nav { opacity: 1; }
.g-nav:hover { transform: translateY(-50%) scale(1.08); }
.g-nav.prev { left: 10px; } .g-nav.next { right: 10px; }
.g-nav.big { width: 50px; height: 50px; }
.lightbox .g-nav.prev { left: 24px; } .lightbox .g-nav.next { right: 24px; }
.g-count { position: absolute; bottom: 10px; left: 10px; padding: 3px 9px; border-radius: 99px; background: rgba(20, 15, 10, .62); color: #fff; font-size: 11.5px; font-weight: 700; }
.g-dl { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--dark); color: var(--bg); box-shadow: var(--shadow); transition: transform .15s; }
.g-dl:hover { transform: scale(1.08); }
.g-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.g-thumbs button { flex-shrink: 0; width: 62px; height: 62px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #fff; cursor: pointer; opacity: .65; transition: all .2s; }
.g-thumbs button.on { border-color: var(--accent); opacity: 1; }
.g-thumbs button:hover { opacity: 1; }
.g-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.dr-price { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.dr-price b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--accent-ink); }
.dr-price s { color: var(--muted); }
.chip-group { margin-bottom: 14px; }
.chip-group small, .kv small, .desc small { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border-radius: 8px; border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; background: var(--surface-2); }
.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 14px; margin: 18px 0; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.kv b { font-size: 13.5px; }
.desc p { margin: 0; white-space: pre-line; font-size: 13.5px; line-height: 1.65; }
.desc p.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.desc .link { margin-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.tag { font-size: 12px; color: var(--muted); }
.dr-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(8, 6, 4, .92); display: grid; place-items: center; }
.lightbox img { max-width: 90vw; max-height: 86vh; object-fit: contain; border-radius: 10px; background: #fff; animation: zoomin .3s var(--ease); }
@keyframes zoomin { from { transform: scale(.92); opacity: 0; } }
.lb-close { position: absolute; top: 18px; right: 18px; color: #fff; background: rgba(255, 255, 255, .1); }
.lb-close:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.lb-count { position: absolute; bottom: 22px; color: #fff; font-weight: 700; opacity: .8; }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(15, 10, 5, .45); backdrop-filter: blur(5px); }
.modal-wrap.top { z-index: 90; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg); }
.t-pop { transition: transform .3s var(--ease), opacity .2s; }
.t-pop-from { transform: scale(.94) translateY(10px); opacity: 0; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 4px; }
.modal-head h2 { font-size: 21px; }
.modal-head p { margin: 4px 0 0; }
.modal-body { padding: 18px 24px 8px; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 14px 24px 22px; flex-wrap: wrap; }
.detect-card { margin: -4px 0 14px; }
.detect-inner { display: flex; gap: 13px; align-items: flex-start; padding: 13px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); animation: rise .3s var(--ease); }
.detect-inner p { margin: 2px 0 0; }
.detect-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }

.run-hero { position: relative; height: 170px; display: grid; place-items: center; margin-bottom: 14px; }
.orbit { position: absolute; width: 160px; height: 160px; }
.orbit span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); animation: spin 1.6s linear infinite; }
.orbit span:nth-child(2) { inset: 14px; border-top-color: #ffb15c; animation-duration: 2.2s; animation-direction: reverse; }
.orbit span:nth-child(3) { inset: 28px; border-top-color: #ff2d55; animation-duration: 3s; opacity: .7; }
.run-count { position: relative; text-align: center; }
.run-count b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.04em; }
.run-count small { color: var(--muted); font-weight: 600; }
.progress { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.progress .bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ffb15c); transition: width .6s var(--ease); }
.progress.indeterminate .bar { width: 35% !important; animation: indet 1.4s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.run-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.run-stats div { padding: 11px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.run-stats small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.run-stats b { font-size: 17px; }
.run-log { list-style: none; margin: 0; padding: 0; max-height: 190px; overflow: hidden; }
.run-log li { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--border); animation: rise .3s var(--ease); }
.run-log li:first-child { font-weight: 600; }
.run-log li:not(:first-child) { opacity: .6; }
.run-log li span { flex: 1; }
.run-log li i { color: var(--green); }
.run-log li svg { width: 14px; height: 14px; }
.run-log small { color: var(--muted); font-size: 11px; }
.done-step { padding: 36px 28px 28px; text-align: center; }
.done-step h2 { font-size: 22px; margin-top: 16px; }
.done-step > p { margin: 6px 0 22px; }
.done-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.done-ic svg { width: 84px; height: 84px; margin: 0 auto; }
.done-ic circle { fill: var(--green-soft); stroke: var(--green); stroke-width: 2.5; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .6s var(--ease) forwards; }
.done-ic path { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s .45s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.err-ic { width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red); animation: shake .5s; }
.err-ic svg { width: 34px; height: 34px; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.confirm { max-width: 400px; padding: 26px; text-align: center; }
.confirm h3 { font-size: 18px; margin-top: 14px; }
.confirm p { margin: 8px 0 22px; font-size: 13.5px; }
.confirm-ic { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.confirm-ic.danger { background: var(--red-soft); color: var(--red); }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions .btn { flex: 1; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; align-items: center; gap: 11px; padding: 12px 10px 12px 14px; border-radius: 14px; background: var(--dark); color: var(--bg); box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500; }
.toast > i { color: var(--accent-2); }
.toast.success > i { color: #3ddc84; }
.toast.error > i { color: #ff6b6e; }
.toast.loading > i { animation: spin 1.6s linear infinite; }
.toast span { flex: 1; }
.toast .icon-btn { color: inherit; opacity: .6; }
.toast .icon-btn:hover { background: rgba(255, 255, 255, .1); opacity: 1; color: inherit; }
.toast .link { color: var(--accent-2); }
.t-toast { transition: transform .35s var(--ease), opacity .25s; }
.t-toast-from { transform: translateX(30px) scale(.96); opacity: 0; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); animation: rise .4s var(--ease) both; }
.card.wide { grid-column: 1 / -1; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head > i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.card-head > i svg { width: 17px; height: 17px; }
.card-head h3 { font-size: 15.5px; flex: 1; }
.ok-line, .warn-line { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; font-weight: 600; margin: 0 0 12px; }
.ok-line { color: var(--green); } .warn-line { color: var(--amber); }
.ok-line svg, .warn-line svg { width: 17px; height: 17px; margin-top: 1px; }
.endpoint { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; padding: 10px 0; border-top: 1px dashed var(--border); }
.endpoint small { grid-column: 1 / -1; font-weight: 700; color: var(--muted); font-size: 11.5px; }
.client-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.client-row div { display: flex; flex-direction: column; line-height: 1.3; }
.clean-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.clean-row:last-child { border: 0; }
.clean-row div { display: flex; flex-direction: column; line-height: 1.35; }
.sys-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sys-grid small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.sys-grid b { font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .sys-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sb-open .sidebar { transform: none; }
  .sb-close, .menu-btn { display: inline-grid; }
  .sb-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(15, 10, 5, .4); }
  .main { margin-left: 0; padding: 10px 16px 120px; }
  .bulk-bar { left: 50%; }
  .settings-grid { grid-template-columns: 1fr; }
  .login-screen { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat b { font-size: 20px; }
  .pgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pbody { padding: 10px; }
  .toolbar .search { min-width: 100%; }
  .section-head .search.sm { width: 160px; }
  .brand-hero { padding: 16px; }
  .bh-actions { width: 100%; }
  .run-stats b { font-size: 15px; }
  .kv { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- send to website ---------- */
.site-modal { max-width: 620px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.info-box { display: flex; gap: 12px; padding: 13px; border-radius: 12px; background: var(--accent-soft); margin-bottom: 14px; }
.info-box > i { color: var(--accent); margin-top: 2px; }
.info-box p { margin: 4px 0 0; }
.info-box .warn-line { margin-top: 8px; }
.run-stats.four { grid-template-columns: repeat(4, 1fr); }
.run-stats .c-green b { color: var(--green); }
.run-stats .c-blue b { color: #1155cc; }
.run-stats .c-red b { color: var(--red); }
[data-theme="dark"] .run-stats .c-blue b { color: #6ea8ff; }
.err-list { margin-top: 12px; max-height: 180px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; background: var(--surface-2); }
.err-list > small { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.err-list div { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.err-list div:last-child { border: 0; }
.err-list span { color: var(--red); }
.test-box { margin-top: 12px; }
.test-box p { margin: 0 0 8px; font-size: 13px; }
@media (max-width: 600px) { .grid2, .run-stats.four { grid-template-columns: 1fr 1fr; } }
