:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --ink: #121722;
  --muted: #717887;
  --line: #e6e9ef;
  --accent: #111827;
  --soft: #f8fafc;
  --good: #087f5b;
  --bad: #b42318;
  --warn: #9a6700;
  --radius: 22px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #ffffff 0, var(--bg) 44%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, textarea, input { font: inherit; }
.shell { width: min(1500px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 48px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.045em; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.button { border: 0; border-radius: 13px; padding: 12px 16px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .58; transform: none; }
.button.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 5px 16px rgba(18, 23, 34, .04); }
.button.ghost.danger { color: var(--bad); }
.button.primary { background: var(--accent); color: #fff; box-shadow: 0 12px 24px rgba(17, 24, 39, .18); }
.button.full { width: 100%; min-height: 50px; margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: 0 8px 30px rgba(18, 23, 34, .04); }
.stat-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.stat-card strong { font-size: 30px; letter-spacing: -.04em; }
.grid { display: grid; grid-template-columns: minmax(350px, 450px) minmax(0, 1fr); gap: 14px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 42px rgba(18, 23, 34, .055); overflow: hidden; }
.input-panel { padding: 22px; position: sticky; top: 18px; }
.result-panel { min-height: 590px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.panel-title > div { display: flex; align-items: center; gap: 10px; }
.panel-title h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.result-panel .panel-title { padding: 22px 22px 0; }
.step { width: 30px; height: 30px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; }
.limit { color: var(--muted); font-size: 11px; font-weight: 700; }
.field-label { display: block; margin: 17px 0 9px; font-size: 12px; font-weight: 800; }
.platform-tabs { display: grid; gap: 7px; padding: 5px; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; }
.platform-tabs-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.platform-tabs button { border: 0; background: transparent; color: var(--muted); padding: 10px 6px; border-radius: 10px; font-size: 11px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.platform-tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 4px 14px rgba(18, 23, 34, .08); }
textarea { width: 100%; resize: vertical; min-height: 210px; border: 1px solid var(--line); border-radius: 15px; background: #fcfcfd; padding: 14px; color: var(--ink); font-size: 13px; line-height: 1.65; outline: none; }
textarea:focus, .text-input:focus { background: #fff; border-color: #aab2c0; box-shadow: 0 0 0 4px rgba(17, 24, 39, .055); }
.text-input { display: block; width: 100%; min-height: 47px; border: 1px solid var(--line); border-radius: 14px; background: #fcfcfd; padding: 0 14px; color: var(--ink); font-size: 13px; outline: none; }
.points { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.points span { border: 1px solid var(--line); background: var(--soft); border-radius: 999px; color: var(--muted); padding: 7px 9px; font-size: 10px; font-weight: 700; }
.inline-note { margin-top: 12px; padding: 10px 12px; border-radius: 11px; background: #fff7db; border: 1px solid #f6df8c; color: #725500; font-size: 11px; line-height: 1.45; }
.inline-note code { font-weight: 800; }
.notice { margin: 0 22px 14px; padding: 12px 14px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.notice.error { color: var(--bad); background: #fff1f0; border: 1px solid #ffd4cf; }
.notice.warning { color: #7a5700; background: #fff8df; border: 1px solid #f4dc82; }
.notice.success { color: var(--good); background: #ecfdf3; border: 1px solid #b7ebc9; }
.table-wrap { overflow: auto; max-height: 760px; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th { position: sticky; top: 0; z-index: 2; background: #fafbfc; color: var(--muted); text-align: left; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 13px 15px; border-bottom: 1px solid var(--line); }
td { padding: 15px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 12px; }
.profile-title { font-weight: 800; margin-bottom: 5px; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-title small { color: #7a8594; font-size: 11px; font-weight: 700; }
.profile-url { display: block; color: var(--muted); text-decoration: none; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-url:hover { color: var(--ink); text-decoration: underline; }
.platform-badge, .status-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 9px; font-size: 10px; font-weight: 800; }
.platform-badge { color: #344054; background: #f2f4f7; }
.platform-instagram { background: #fff0f6; color: #a61e4d; }
.platform-facebook { background: #edf4ff; color: #1959a8; }
.platform-tiktok { background: #eef0f2; color: #111827; }
.platform-threads { background: #f1f1f1; color: #111; }
.platform-x { background: #111827; color: #fff; }
.status-badge.found { color: var(--good); background: #eafaf1; }
.status-badge.empty { color: var(--warn); background: #fff7db; }
.status-badge.error { color: var(--bad); background: #fff0ee; }
.link-list { display: flex; flex-direction: column; gap: 7px; }
.bio-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: min(100%, 430px); background: var(--soft); border: 1px solid var(--line); padding: 8px 10px; border-radius: 10px; }
.bio-link a { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bio-link a:hover { text-decoration: underline; }
.copy-link { border: 0; background: #fff; border-radius: 7px; padding: 5px 8px; color: var(--muted); font-size: 9px; font-weight: 800; cursor: pointer; }
.error-detail, .empty-detail { color: var(--muted); line-height: 1.45; max-width: 360px; }
.empty-row td { color: var(--muted); text-align: center; padding: 70px 20px; }
.area-name { font-size: 11px; font-weight: 800; margin-bottom: 4px; }
.area-address { max-width: 220px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.muted-dash { color: var(--muted); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.provider-status { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .02em; border: 1px solid #d9e1ea; background: #f4f7fa; color: #677384; white-space: nowrap; }
.provider-status.ready { background: #eaf8ef; border-color: #bfe6cd; color: #18743b; }
.provider-status.missing { background: #fff1f1; border-color: #f3c6c6; color: #a52b2b; }
.mode-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 5px; margin-bottom: 17px; background: #eef1f5; border: 1px solid var(--line); border-radius: 15px; }
.mode-tabs button { border: 0; background: transparent; color: var(--muted); padding: 11px 10px; border-radius: 11px; font-size: 12px; font-weight: 800; cursor: pointer; }
.mode-tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 4px 14px rgba(18, 23, 34, .08); }
.mode-form[hidden], [hidden] { display: none !important; }
@media (max-width: 980px) {
  .shell { width: min(100% - 22px, 800px); padding-top: 20px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
  .input-panel { position: static; }
  .result-panel { min-height: 400px; }
}
@media (max-width: 580px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat-card:first-child { grid-column: 1 / -1; }
  .top-actions { width: 100%; }
  .top-actions .button { flex: 1; }
  .provider-status { width: 100%; justify-content: center; order: -1; }
  .panel, .input-panel { border-radius: 17px; }
  .input-panel { padding: 17px; }
  .result-panel .panel-title { padding: 17px 17px 0; }
  .platform-tabs-six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
