:root {
  --ink: #17201b;
  --muted: #637069;
  --line: #dce4de;
  --surface: #ffffff;
  --soft: #f5f7f2;
  --green: #16a34a;
  --green-dark: #0f7435;
  --blue: #2563eb;
  --yellow: #f4b942;
  --danger: #dc2626;
  --shadow: 0 18px 48px rgba(23, 32, 27, 0.12);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--soft); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 48px; background: rgba(255,255,255,0.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; background: var(--green); color: #fff; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; color: var(--muted); }
.nav-action, .primary-button, .secondary-button { border: 0; border-radius: 8px; min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 700; }
.nav-action, .primary-button { background: var(--green); color: #fff; }
.secondary-button { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.hero-shell { min-height: calc(100vh - 76px); display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 54px; align-items: center; padding: 56px 48px 72px; max-width: 1220px; margin: 0 auto; }
.eyebrow { margin: 0 0 12px; text-transform: uppercase; color: var(--green-dark); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; }
h1 { margin: 0; font-size: clamp(38px, 6vw, 72px); line-height: 0.96; letter-spacing: 0; max-width: 760px; }
.hero-text { font-size: 19px; color: var(--muted); line-height: 1.6; max-width: 640px; margin: 24px 0 30px; }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-product { background: #101815; color: #f8fff9; border-radius: 8px; padding: 20px; box-shadow: var(--shadow); }
.terminal-head { display: flex; gap: 8px; margin-bottom: 22px; }
.terminal-head span { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); }
.terminal-head span:nth-child(2) { background: var(--green); }
.terminal-head span:nth-child(3) { background: var(--blue); }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.metric-grid div { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 16px; }
.metric-grid strong { display: block; font-size: 27px; }
.metric-grid small { color: #b8c8bf; }
.flow-list { margin-top: 18px; display: grid; gap: 10px; }
.flow-list p { margin: 0; background: rgba(255,255,255,0.06); padding: 12px; border-radius: 8px; color: #dce8df; }
.flow-list b { color: var(--yellow); margin-right: 8px; }
.section-grid { max-width: 1220px; margin: 0 auto; padding: 32px 48px 84px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.section-grid article, .module-band, .work-card, .stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 26px rgba(23,32,27,0.06); }
.section-grid article { padding: 26px; }
.icon-chip { display: inline-flex; padding: 6px 10px; border-radius: 8px; background: #e6f6eb; color: var(--green-dark); font-weight: 800; font-size: 12px; }
h2 { margin: 12px 0 8px; font-size: 24px; letter-spacing: 0; }
p { line-height: 1.55; }
.section-grid p, .module-band p { color: var(--muted); }
.module-band { max-width: 1124px; margin: 0 auto 70px; padding: 28px; display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: center; }
.module-list { display: flex; flex-wrap: wrap; gap: 10px; }
.module-list span { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 10px 12px; font-weight: 700; }
.panel-body { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; background: #eef2ee; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px; background: #111815; color: #edf7ef; display: flex; flex-direction: column; gap: 8px; }
.panel-brand { margin-bottom: 22px; }
.tab-button, .docs-link { min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: #c7d4cc; text-align: left; padding: 0 12px; cursor: pointer; display: flex; align-items: center; }
.tab-button.active, .tab-button:hover, .docs-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.docs-link { margin-top: auto; border: 1px solid rgba(255,255,255,0.14); }
.panel-main { padding: 28px; min-width: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.panel-header h1 { font-size: 34px; line-height: 1.1; }
.status-pill { border-radius: 8px; padding: 9px 12px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-weight: 700; }
.status-pill.online { color: var(--green-dark); }
.status-pill.offline { color: var(--danger); }
.auth-strip { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; margin-bottom: 18px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 800; color: #39433d; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; min-height: 40px; padding: 9px 11px; background: #fff; color: var(--ink); outline: none; }
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,0.14); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { padding: 18px; }
.stat-card small { color: var(--muted); font-weight: 800; }
.stat-card strong { display: block; margin-top: 8px; font-size: 36px; }
.work-card { padding: 20px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
pre { margin: 16px 0 0; padding: 14px; overflow: auto; max-height: 360px; background: #101815; color: #e9f8ed; border-radius: 8px; font-size: 12px; line-height: 1.5; }
.timeline { display: flex; flex-wrap: wrap; gap: 10px; }
.timeline span { padding: 10px 12px; border-radius: 8px; background: #f7faf7; border: 1px solid var(--line); font-weight: 700; }
@media (max-width: 900px) {
  .topbar { padding: 0 18px; }
  .nav-links a:not(.nav-action) { display: none; }
  .hero-shell, .section-grid, .module-band { grid-template-columns: 1fr; padding-left: 18px; padding-right: 18px; }
  .panel-body { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .auth-strip, .dashboard-grid, .form-grid { grid-template-columns: 1fr; }
  .panel-main { padding: 18px; }
}

.notice-card { background: #fff7df; border: 1px solid #efd27b; border-radius: 8px; padding: 14px 16px; margin-bottom: 18px; color: #4f3b09; }
.muted-text { color: var(--muted); margin-top: 0; }
.form-grid.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
input:disabled { background: #f2f4f2; color: #758078; }
@media (max-width: 900px) { .form-grid.two-cols { grid-template-columns: 1fr; } }
.hidden-json { display: none; }
.empty-state { border: 1px dashed var(--line); background: #f8faf8; color: var(--muted); padding: 18px; border-radius: 8px; }
.client-visual { margin-top: 16px; display: grid; gap: 14px; }
.client-summary { display: flex; justify-content: space-between; gap: 18px; align-items: center; background: #f8fbf8; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.client-summary h2 { margin: 8px 0 4px; }
.client-summary p { margin: 0; color: var(--muted); }
.limit-badge { min-width: 112px; min-height: 82px; border-radius: 8px; display: grid; place-items: center; background: #e6f6eb; color: var(--green-dark); }
.limit-badge strong { font-size: 34px; line-height: 1; }
.limit-badge span { font-size: 12px; font-weight: 800; }
.credential-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.credential-grid div, .delivery-box { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.credential-grid small { display: block; color: var(--muted); font-weight: 800; margin-bottom: 8px; }
.credential-grid code { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #101815; color: #e9f8ed; border-radius: 8px; padding: 10px; font-size: 12px; }
.credential-grid button { margin-top: 10px; border: 1px solid var(--line); background: #fff; border-radius: 8px; min-height: 34px; padding: 0 12px; cursor: pointer; font-weight: 800; }
.delivery-box h3 { margin: 0 0 10px; }
.delivery-box p { margin: 6px 0; color: var(--muted); }
@media (max-width: 900px) { .client-summary, .credential-grid { grid-template-columns: 1fr; } .client-summary { display: grid; } }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.error-state { border: 1px solid #fecaca; background: #fff1f2; color: #991b1b; padding: 16px; border-radius: 8px; }
.error-state p { margin: 6px 0 0; color: #991b1b; }
.saved-client-list { display: grid; gap: 16px; }
.saved-client-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.saved-client-card h3 { margin: 14px 0 10px; }
.client-summary.compact { padding: 14px; margin-bottom: 12px; }
.client-summary.compact h2 { font-size: 20px; }
button:disabled { opacity: 0.65; cursor: wait; }
.delivery-box hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.delivery-box code { display: inline-block; background: #101815; color: #e9f8ed; border-radius: 8px; padding: 8px 10px; margin: 4px 4px 0 0; font-size: 12px; }