:root {
  --ink: #0b1c2c;
  --ink-2: #13293d;
  --sea: #1a6b7a;
  --foam: #e8f2f4;
  --signal: #e85d04;
  --signal-2: #f48c06;
  --muted: #5b6e7c;
  --line: rgba(11, 28, 44, 0.12);
  --ok: #1b7a3e;
  --err: #b42318;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Sora", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(26,107,122,.18), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(232,93,4,.12), transparent 55%),
    linear-gradient(180deg, #f7fbfc 0%, #eef5f7 100%);
  min-height: 100vh;
}
a { color: var(--sea); text-decoration: none; }
a:hover { color: var(--signal); }

.sl-wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.sl-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 0; gap: 1rem;
}
.sl-brand {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.35rem; color: var(--ink);
  letter-spacing: -0.02em;
}
.sl-brand span { color: var(--signal); }
.sl-nav-links { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.sl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 0; border-radius: 999px; padding: .7rem 1.15rem;
  font-weight: 600; font-family: inherit; cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.sl-btn:hover { transform: translateY(-1px); }
.sl-btn-primary { background: var(--ink); color: #fff; }
.sl-btn-primary:hover { background: var(--sea); color: #fff; }
.sl-btn-signal { background: var(--signal); color: #fff; }
.sl-btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

.sl-hero {
  min-height: calc(100vh - 5rem);
  display: grid; align-content: center; gap: 1.2rem;
  padding: 2rem 0 4rem;
  animation: rise .7s ease both;
}
.sl-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: .95; letter-spacing: -0.03em; margin: 0;
  max-width: 12ch;
}
.sl-hero p {
  max-width: 36rem; color: var(--muted); font-size: 1.05rem; margin: 0;
  animation: rise .8s ease .08s both;
}
.sl-hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; animation: rise .8s ease .14s both; }
.sl-hero-plane {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: -1;
  background:
    linear-gradient(120deg, rgba(11,28,44,.04), transparent 40%),
    repeating-linear-gradient(90deg, transparent 0 48px, rgba(26,107,122,.05) 48px 49px);
}

.sl-section { padding: 3rem 0; }
.sl-section h2 {
  font-family: var(--font-display); font-size: 2rem; margin: 0 0 .5rem; letter-spacing: -0.02em;
}
.sl-muted { color: var(--muted); }
.sl-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 800px) { .sl-grid-3 { grid-template-columns: 1fr; } }
.sl-feature {
  padding: 1.25rem 0; border-top: 1px solid var(--line);
}
.sl-feature strong { display: block; margin-bottom: .35rem; }
.sl-dash-list {
  margin: .5rem 0 1rem; padding-left: 1.15rem; color: var(--muted); line-height: 1.55;
}
.sl-dash-list li { margin: .35rem 0; }
.sl-dash-list strong { color: var(--ink); }
.sl-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  margin-bottom: .25rem;
}
@media (max-width: 900px) { .sl-kpi-grid { grid-template-columns: 1fr 1fr; } }
.sl-kpi {
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  display: grid;
  gap: .2rem;
}
.sl-kpi-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sl-kpi strong {
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1.1;
  color: var(--ink);
}
.sl-kpi-sub { font-size: .82rem; color: var(--muted); }

.sl-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sl-mobile-bar { display: none; }
.sl-nav-backdrop { display: none; }
.sl-side {
  background: var(--ink); color: #dce8ee; padding: 1.25rem 1rem;
}
.sl-side-nav { display: grid; gap: .15rem; }
.sl-side a { color: #c9d7e0; display: block; padding: .55rem .7rem; border-radius: 10px; }
.sl-side a:hover, .sl-side a.active { background: rgba(255,255,255,.08); color: #fff; }
.sl-side .brand { color: #fff; font-family: var(--font-display); font-size: 1.25rem; margin: .2rem .7rem 1.2rem; }
.sl-side-logout { margin-top: 1rem; }
.sl-side-logout-btn {
  background: transparent; color: #f6b59a; border: 0; padding: .55rem .7rem;
  cursor: pointer; font: inherit; text-align: left; width: 100%; border-radius: 10px;
}
.sl-side-logout-btn:hover { background: rgba(255,255,255,.06); }
.sl-main { padding: 1.5rem 1.5rem 3rem; min-width: 0; }
.sl-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.sl-top h1 { word-break: break-word; }
.sl-balance {
  font-family: var(--font-display); font-size: 1.6rem; white-space: nowrap;
}
.sl-panel {
  background: rgba(255,255,255,.72); border: 1px solid var(--line);
  border-radius: 18px; padding: 1.25rem;
  backdrop-filter: blur(8px);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sl-form { display: grid; gap: .85rem; }
.sl-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
label { display: grid; gap: .35rem; font-size: .86rem; color: var(--muted); font-weight: 600; }
input, select, textarea {
  width: 100%; max-width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: .7rem .8rem; font: inherit; font-size: 16px; background: #fff; color: var(--ink);
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .65rem .4rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
pre, code, .sl-sample-pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  word-break: break-word;
}
.sl-btn { min-height: 44px; }
body.sl-nav-lock { overflow: hidden; }

@media (max-width: 900px) {
  .sl-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .sl-mobile-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    position: sticky;
    top: 0;
    z-index: 40;
    padding: .7rem .9rem;
    padding-top: max(.7rem, env(safe-area-inset-top));
    background: rgba(11, 28, 44, .96);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .sl-mobile-brand {
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
    flex: 1;
    min-width: 0;
  }
  .sl-mobile-brand span { color: var(--signal-2); }
  .sl-mobile-balance {
    font-family: var(--font-display);
    font-size: 1rem;
    white-space: nowrap;
  }
  .sl-nav-toggle {
    width: 42px; height: 42px; border: 0; border-radius: 10px;
    background: rgba(255,255,255,.08); display: grid; place-content: center; gap: 5px;
    padding: 0; cursor: pointer;
  }
  .sl-nav-toggle span {
    display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
  }
  .sl-shell.nav-open .sl-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .sl-shell.nav-open .sl-nav-toggle span:nth-child(2) { opacity: 0; }
  .sl-shell.nav-open .sl-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .sl-side {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(300px, 86vw);
    z-index: 55;
    transform: translateX(-105%);
    transition: transform .22s ease;
    overflow-y: auto;
    padding-top: max(1.25rem, env(safe-area-inset-top));
    box-shadow: 12px 0 40px rgba(0,0,0,.28);
  }
  .sl-shell.nav-open .sl-side { transform: none; }
  .sl-nav-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(8, 16, 24, .48);
    z-index: 50;
  }
  .sl-nav-backdrop[hidden] { display: none !important; }
  .sl-main {
    padding: 1rem .9rem 5.5rem;
    width: 100%;
  }
  .sl-top { margin-bottom: 1rem; }
  .sl-top h1 { font-size: 1.55rem !important; }
  .sl-balance { font-size: 1.25rem; }
  .sl-panel { padding: 1rem; border-radius: 14px; }
  .sl-kpi strong { font-size: 1.35rem; }
  .sl-hero { min-height: auto; padding: 1.5rem 0 2.5rem; }
  .sl-hero h1 { font-size: clamp(2.2rem, 12vw, 3.4rem); max-width: none; }
  .sl-section { padding: 2rem 0; }
  .sl-section h2 { font-size: 1.55rem; }
  .sl-nav { flex-wrap: wrap; gap: .75rem; }
  .sl-nav-links { width: 100%; justify-content: flex-start; }
  .sl-nav-links .sl-btn { flex: 1 1 auto; }
  table { min-width: 520px; }
}

@media (max-width: 700px) {
  .sl-form-grid { grid-template-columns: 1fr; }
  .sl-hero-actions .sl-btn { width: 100%; }
  .sl-panel .sl-btn { width: auto; }
  .sl-top > div:first-child { flex: 1 1 100%; }
}

@media (max-width: 560px) {
  .sl-kpi-grid { grid-template-columns: 1fr 1fr; }
  .sl-auth { padding: 1rem .75rem; }
  .sl-wrap { width: min(1120px, calc(100% - 1.25rem)); }
}
.sl-impersonate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .65rem 1rem;
  background: #1a1a1a;
  color: #f5f5f5;
  font-size: .9rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.sl-impersonate-bar strong { color: #fff; }
.sl-price-vendor {
  border: 1px solid var(--line, #e5e5e5);
  border-radius: 12px;
  padding: .65rem 1rem;
  margin: .75rem 0;
  background: #fafafa;
}
.sl-price-vendor > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  list-style: none;
  font-size: 1.05rem;
}
.sl-price-vendor > summary::-webkit-details-marker { display: none; }
.sl-price-vendor[open] > summary { margin-bottom: .75rem; }
.sl-price-table { width: 100%; }
.sl-price-table input { max-width: 7rem; }
.sl-flash { margin: .75rem 0; padding: .75rem 1rem; border-radius: 12px; }
.sl-flash.ok { background: #e8f6ee; color: var(--ok); }
.sl-flash.err { background: #fdecea; color: var(--err); }
.sl-auth {
  min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
}
.sl-auth .sl-panel { width: min(420px, 100%); }
.sl-auth h1 { font-family: var(--font-display); margin: 0 0 1rem; font-size: 2rem; }
.sl-footnote { font-size: .85rem; color: var(--muted); margin-top: 1rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.sl-success-pop { animation: rise .5s ease both; }

.sl-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: #ffe8d6;
  color: #9a4a12;
  vertical-align: middle;
}
.sl-chat-panel .sl-chat-thread {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-height: 420px;
  overflow-y: auto;
  padding: .25rem;
}
.sl-bubble {
  max-width: min(520px, 92%);
  padding: .7rem .9rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.sl-bubble.user { align-self: flex-end; background: #eef6f3; border-color: #cfe4db; }
.sl-bubble.staff { align-self: flex-start; background: #fff8f1; border-color: #f0dcc8; }
.sl-bubble .meta { font-size: .75rem; color: var(--muted); margin-bottom: .35rem; }
.sl-bubble .body { white-space: pre-wrap; line-height: 1.45; }
