:root {
  --ink: #111111;
  --muted: #6d6d68;
  --line: #deded8;
  --canvas: #f4f4f0;
  --white: #ffffff;
  --yellow: #facc15;
  --yellow-soft: #fff7c2;
  --green: #2f8f5b;
  --green-soft: #e7f5ed;
  --red: #b43b37;
  --red-soft: #fae9e8;
  --amber: #9f6800;
  --amber-soft: #fff1ce;
  --radius: 10px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 238px 1fr; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: 238px;
  display: flex; flex-direction: column; background: var(--ink); color: white; padding: 26px 16px 18px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 30px; }
.brand img { width: 43px; height: 43px; border-radius: 9px; object-fit: cover; }
.brand div { display: grid; line-height: 1; }
.brand strong { font-size: 20px; letter-spacing: .02em; }
.brand span { color: var(--yellow); font-size: 12px; font-weight: 800; margin-top: 6px; text-transform: uppercase; letter-spacing: .14em; }
nav { display: grid; gap: 5px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; border: 0; border-radius: 7px; padding: 12px 13px;
  color: #cfcfcb; background: transparent; text-align: left; font-weight: 650;
}
.nav-item:hover { background: #242422; color: white; }
.nav-item.active { background: var(--yellow); color: var(--ink); }
.nav-icon { width: 20px; font-size: 18px; text-align: center; }
.prototype-note {
  margin-top: auto; display: flex; align-items: center; gap: 10px; border: 1px solid #343432;
  border-radius: 8px; padding: 12px; color: #e9e9e5;
}
.prototype-note div { display: grid; gap: 4px; }
.prototype-note strong { font-size: 12px; }
.prototype-note small { color: #8e8e89; font-size: 11px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgb(250 204 21 / .12); }
main { grid-column: 2; min-width: 0; }
.topbar {
  min-height: 84px; display: flex; align-items: center; justify-content: space-between;
  background: white; border-bottom: 1px solid var(--line); padding: 15px 34px;
}
.topbar h1 { margin: 2px 0 0; font-size: 22px; }
.eyebrow { margin: 0; color: var(--muted); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 10px; }
.account { display: flex; align-items: center; gap: 10px; }
.account div { display: grid; gap: 2px; text-align: right; }
.account strong { font-size: 12px; }
.account small { color: var(--muted); }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--yellow); font-weight: 850; font-size: 12px; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 23px; }
.content { padding: 32px 34px 50px; max-width: 1500px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; }
.intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.intro-row h2 { margin: 0 0 7px; font-size: 28px; letter-spacing: -.035em; }
.intro-row p { margin: 0; color: var(--muted); }
.primary, .secondary {
  min-height: 42px; border-radius: 6px; padding: 0 18px; font-weight: 800; border: 1px solid transparent;
}
.primary { background: var(--yellow); color: var(--ink); }
.primary:hover { background: #ffd93f; }
.secondary { background: white; border-color: #cecec8; color: var(--ink); }
.secondary:hover { border-color: var(--ink); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric {
  min-height: 134px; display: flex; gap: 16px; background: white; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: 0 3px 12px rgb(0 0 0 / .025);
}
.metric-icon { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 8px; background: var(--yellow-soft); font-weight: 900; }
.metric div { display: grid; align-content: start; }
.metric small { color: var(--muted); font-weight: 700; }
.metric strong { font-size: 28px; line-height: 1; margin: 9px 0 7px; letter-spacing: -.04em; }
.metric p { margin: 0; font-size: 11px; color: var(--muted); }
.metric.green .metric-icon { background: var(--green-soft); color: var(--green); }
.metric.amber .metric-icon { background: var(--amber-soft); color: var(--amber); }
.metric.dark { background: var(--ink); color: white; border-color: var(--ink); }
.metric.dark .metric-icon { background: #292927; color: var(--yellow); }
.metric.dark small, .metric.dark p { color: #aaa9a3; }
.panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 16px rgb(0 0 0 / .025); }
.panel-head { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0 0 5px; font-size: 17px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 12px; }
.tools { display: flex; gap: 9px; }
.search { display: flex; align-items: center; gap: 8px; min-width: 260px; height: 40px; border: 1px solid #cecec8; border-radius: 6px; padding: 0 12px; }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(250 204 21 / .3); }
.search input { width: 100%; border: 0; outline: 0; }
select, input, textarea { border: 1px solid #cecec8; border-radius: 6px; background: white; color: var(--ink); }
.tools select { min-width: 160px; height: 40px; padding: 0 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1000px; }
th { padding: 11px 16px; background: #f7f7f4; color: #777771; font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .08em; }
td { padding: 15px 16px; border-top: 1px solid #ecece7; font-size: 12px; vertical-align: middle; }
tbody tr { cursor: pointer; transition: background .15s; }
tbody tr:hover { background: #fffdf2; }
td strong, td small { display: block; }
td small { margin-top: 4px; color: var(--muted); }
.codcli { font-size: 13px; letter-spacing: .05em; }
.pill { display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 5px 9px; border-radius: 99px; font-size: 10px; font-weight: 850; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.success { background: var(--green-soft); color: var(--green); }
.pill.warning, .pill.pending { background: var(--amber-soft); color: var(--amber); }
.pill.danger { background: var(--red-soft); color: var(--red); }
.pill.neutral { background: #efefeb; color: #5e5e59; }
.result-ok { color: var(--green); font-weight: 750; }
.row-button { width: 30px; height: 30px; border: 1px solid #d7d7d1; border-radius: 6px; background: white; font-size: 20px; line-height: 1; }
.empty { display: grid; justify-items: center; padding: 40px; color: var(--muted); gap: 6px; }
.hidden { display: none !important; }
.timeline { padding: 8px 22px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 18px 1fr auto; gap: 15px; padding: 20px 0; border-bottom: 1px solid #ecece7; }
.timeline-item:last-child { border-bottom: 0; }
.timeline-mark { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 5px var(--yellow-soft); }
.timeline-main div { display: flex; align-items: center; gap: 9px; }
.activity-type { padding: 3px 6px; border-radius: 4px; background: #efefeb; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.timeline-main p { margin: 7px 0 5px; }
.timeline-main small, .timeline time { color: var(--muted); font-size: 11px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.setting-card { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 15px; padding: 20px; }
.setting-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: var(--yellow-soft); font-size: 20px; font-weight: 900; }
.setting-card div { min-width: 0; }
.setting-card small { color: var(--muted); font-weight: 700; }
.setting-card h3 { margin: 4px 0; font-size: 15px; }
.setting-card p { margin: 0; color: var(--muted); font-size: 12px; }
dialog { width: min(680px, calc(100vw - 28px)); border: 0; border-radius: 12px; padding: 0; box-shadow: 0 24px 90px rgb(0 0 0 / .3); }
dialog::backdrop { background: rgb(0 0 0 / .55); backdrop-filter: blur(2px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 4px 0 0; font-size: 22px; }
.icon-button { width: 34px; height: 34px; border: 1px solid #d7d7d1; background: white; border-radius: 6px; font-size: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px 24px 10px; }
.form-grid label { display: grid; gap: 7px; font-size: 11px; font-weight: 800; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 10px 11px; outline: 0; font-weight: 500; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(250 204 21 / .3); }
.future-url { margin: 8px 24px 0; padding: 12px 14px; border-radius: 7px; background: #f5f5f1; display: grid; gap: 4px; }
.dialog-explainer { margin: 10px 24px 4px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.future-url span { color: var(--muted); font-size: 10px; text-transform: uppercase; font-weight: 850; letter-spacing: .08em; }
.future-url strong { font-size: 13px; }
.form-error { margin: 10px 24px 0; padding: 10px; background: var(--red-soft); color: var(--red); border-radius: 6px; font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 20px 24px 24px; }
.detail-dialog { width: min(720px, calc(100vw - 28px)); }
.detail-head { border: 0; padding-bottom: 14px; }
.detail-identity { background: var(--ink); color: white; margin: 0 24px; padding: 18px; border-radius: 9px; }
.detail-identity div { display: flex; justify-content: space-between; align-items: center; }
.detail-identity div > strong { color: var(--yellow); font-size: 18px; letter-spacing: .08em; }
.detail-identity p { margin: 18px 0 3px; font-weight: 800; }
.detail-identity small { color: #9e9e98; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 20px 24px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.detail-grid div { background: white; padding: 15px; display: grid; gap: 5px; }
.detail-grid small, .detail-notes small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.detail-grid span { color: var(--muted); font-size: 11px; }
.detail-notes { margin: 0 24px 20px; padding: 14px; background: #f5f5f1; border-radius: 8px; }
.detail-notes p { margin: 7px 0 0; }
.detail-actions { display: flex; gap: 8px; padding: 0 24px 20px; }
.pairing-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 24px 12px;
  padding: 16px;
  border: 1px solid #deded8;
  border-radius: 10px;
  background: #f7f7f4;
}
.pairing-panel div { display: grid; gap: 3px; }
.pairing-panel small, .pairing-result small { color: #6b6b65; font-size: 12px; }
.pairing-panel span { color: #65655f; font-size: 13px; }
.pairing-result {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 24px 16px;
  padding: 14px 16px;
  border: 2px solid #facc15;
  border-radius: 10px;
  background: #fff9d9;
}
.pairing-result strong { font-size: 22px; letter-spacing: 2px; }
.pairing-result span { margin-left: auto; color: #555; font-size: 12px; }
.status-actions { display: flex; align-items: center; gap: 8px; padding: 15px 24px; border-top: 1px solid var(--line); background: #f7f7f4; }
.status-actions span { margin-right: auto; color: var(--muted); font-size: 11px; font-weight: 800; }
.status-actions button { border: 1px solid #cfcfc9; border-radius: 6px; background: white; padding: 7px 10px; font-size: 11px; font-weight: 750; }
.status-actions .danger-text { color: var(--red); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; transform: translateY(20px); opacity: 0; pointer-events: none; background: var(--ink); color: white; border-left: 5px solid var(--yellow); border-radius: 7px; padding: 14px 17px; font-size: 12px; font-weight: 700; transition: .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.fatal { max-width: 600px; margin: 80px auto; padding: 30px; background: white; border-radius: 10px; }
.catalog-preview { min-height: 100vh; display: grid; grid-template-rows: 70px 1fr 70px; background: #fafaf7; }
.catalog-preview header, .catalog-preview footer { display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 6vw, 80px); background: var(--ink); color: white; }
.catalog-preview header span, .catalog-preview footer span { color: #888882; font-size: 12px; }
.catalog-preview footer a { color: var(--yellow); text-decoration: none; font-weight: 800; font-size: 12px; }
.catalog-preview main { grid-column: auto; display: grid; place-items: center; padding: 40px 24px; background: radial-gradient(circle at 65% 35%, #fff5b8 0, transparent 32%); }
.suspended-card, .catalog-active { max-width: 820px; text-align: center; }
.suspended-card h1, .catalog-active h1 { font-size: clamp(36px, 6vw, 72px); line-height: .98; letter-spacing: -.055em; margin: 18px 0; }
.suspended-card > p:last-child, .catalog-active > p { color: var(--muted); font-size: 17px; }
.catalog-mark { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 25px; border-radius: 10px; background: var(--yellow); font-weight: 900; font-size: 28px; }
.catalog-stats { display: flex; justify-content: center; gap: 12px; margin: 28px 0; }
.catalog-stats span { min-width: 150px; padding: 16px; border: 1px solid var(--line); background: white; border-radius: 8px; display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.catalog-stats strong { color: var(--ink); font-size: 22px; }
.catalog-placeholder { margin-top: 40px; border: 1px dashed #b9b9b2; border-radius: 10px; padding: 36px; color: var(--muted); background: rgb(255 255 255 / .65); }
@media (max-width: 1050px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  main { grid-column: auto; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 12px 0 35px rgb(0 0 0 / .2); }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: block; }
  .topbar { padding: 12px 18px; gap: 12px; }
  .topbar > div:first-of-type { margin-right: auto; }
  .topbar h1 { font-size: 18px; }
  .account div { display: none; }
  .content { padding: 24px 16px 40px; }
  .intro-row { align-items: stretch; flex-direction: column; }
  .metrics { grid-template-columns: 1fr; }
  .panel-head { align-items: stretch; flex-direction: column; }
  .tools { flex-direction: column; }
  .search { min-width: 0; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .form-grid label.wide { grid-column: auto; }
  .detail-actions, .status-actions { flex-wrap: wrap; }
  .timeline-item { grid-template-columns: 18px 1fr; }
  .timeline time { grid-column: 2; }
  .catalog-preview header span { display: none; }
  .catalog-stats { flex-direction: column; align-items: center; }
}
