/* ClaudeTunnel console, matched to the GrokIQ admin shell. */
:root {
  --header-height: 3rem;
  --sidebar-width: 13rem;
  --radius: .75rem;
  --background: oklch(100% 0 0);
  --foreground: oklch(12.9% .042 264.695);
  --card: oklch(100% 0 0);
  --primary: oklch(62.3% .188 259.81);
  --primary-foreground: #fff;
  --muted: oklch(96.8% .007 247.896);
  --muted-foreground: oklch(55.4% .046 257.417);
  --border: oklch(92.9% .013 255.508);
  --input: oklch(92.9% .013 255.508);
  --ring: oklch(62.3% .188 259.81);
  --destructive: oklch(57.7% .245 27.325);
  --success: oklch(32% .07 163);
  --success-bg: oklch(96% .03 163);
  --warning: oklch(41% .1 70);
  --warning-bg: oklch(97% .04 85);
  --danger: oklch(45% .16 25);
  --danger-bg: oklch(96% .03 25);
  --sidebar-accent: #e8f3ff;
  --sidebar-accent-foreground: #0070e8;
  --aside: #09090b;
  color-scheme: light;
}
html.dark {
  --background: oklch(12.9% .042 264.695);
  --foreground: oklch(98.4% .003 247.858);
  --card: oklch(14% .04 259.21);
  --primary: oklch(70% .14 250);
  --muted: oklch(27.9% .041 260.031);
  --muted-foreground: oklch(70.4% .04 256.788);
  --border: oklch(100% 0 0 / .1);
  --input: oklch(100% 0 0 / .15);
  --ring: oklch(70% .14 250);
  --destructive: oklch(70.4% .191 22.216);
  --success: oklch(86% .08 163);
  --success-bg: oklch(28% .05 163);
  --warning: oklch(90% .08 80);
  --warning-bg: oklch(30% .05 75);
  --danger: oklch(90% .06 22);
  --danger-bg: oklch(30% .06 22);
  --sidebar-accent: color-mix(in oklch, oklch(70% .14 250) 22%, var(--background));
  --sidebar-accent-foreground: oklch(86% .08 250);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button, a { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
::selection { background: #dbeafe; color: #1e3a8a; }
.ico { width: 16px; height: 16px; display: block; flex: 0 0 auto; }

.shell { min-height: 100svh; display: flex; flex-direction: column; background: var(--background); }
.topbar {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo {
  width: 32px; height: 32px; border-radius: 9px;
  display: inline-grid; place-items: center;
  background: #fff; color: #2563eb;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
.logo .ico { width: 18px; height: 18px; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; }
.brand-name { font-family: Manrope, Inter, sans-serif; font-size: 14px; line-height: 16px; font-weight: 650; }
.brand-sub { font-size: 11px; line-height: 14px; color: var(--muted-foreground); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--background);
  color: var(--foreground); font-size: 12px; font-weight: 500;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
.icon-button, .logout {
  height: 32px; padding: 0 10px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; color: var(--muted-foreground);
}
.icon-button:hover, .logout:hover { background: var(--muted); color: var(--foreground); }

.body { flex: 1; min-height: 0; display: flex; }
.side {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  border-right: 1px solid var(--border);
  overflow: auto;
  padding: 8px 0 16px;
  background: var(--background);
}
.side nav { display: flex; flex-direction: column; }
.nav-label {
  margin: 10px 12px 4px;
  padding: 0 8px;
  color: color-mix(in oklch, var(--muted-foreground) 70%, transparent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.side a {
  display: flex; align-items: center; gap: 8px;
  margin: 1px 12px; min-height: 34px; padding: 0 12px;
  border-radius: 999px; color: var(--foreground); font-size: 14px;
}
.side a:hover { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); }
.side a[aria-current="page"] {
  background: var(--sidebar-accent);
  color: var(--sidebar-accent-foreground);
  font-weight: 600;
}
.workspace { flex: 1; min-width: 0; overflow: auto; }
.page { padding: 20px 24px 48px; }
.flash { margin: 0; }
.flash:empty { display: none; }
.flash:not(:empty) {
  margin: 12px 24px 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in oklch, var(--primary) 30%, var(--border));
  border-radius: 12px;
  background: var(--sidebar-accent);
  color: var(--sidebar-accent-foreground);
}
.flash.bad {
  border-color: color-mix(in oklch, var(--destructive) 35%, var(--border));
  background: var(--danger-bg);
  color: var(--danger);
}

h1, h2 { font-family: Manrope, Inter, "PingFang SC", sans-serif; letter-spacing: -.03em; }
h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.25; font-weight: 650; }
h2 { margin: 0 0 12px; font-size: 16px; font-weight: 650; }
.lede, .note { max-width: 72ch; margin: 0 0 16px; color: var(--muted-foreground); }
.note { margin-top: 8px; }
.strip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.strip + .strip { margin-top: 12px; }
.arrive { animation: rise .45s cubic-bezier(.33,1,.68,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.slip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field span, .field > label, th { color: var(--foreground); font-size: 13px; font-weight: 600; }
input, select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px;
  border: 1px solid var(--input); border-radius: 12px;
  background: var(--background); color: var(--foreground);
}
textarea { min-height: 7.5rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted-foreground); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 25%, transparent); }
.check { display: flex; gap: 8px; align-items: center; min-height: 40px; }
.check input { width: auto; min-height: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
button {
  min-height: 36px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--background); color: var(--foreground);
  font-weight: 600; white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease;
}
button:hover { background: var(--muted); }
button.primary { border-color: transparent; background: var(--primary); color: var(--primary-foreground); }
button.primary:hover { filter: brightness(1.05); }
button.danger { border-color: color-mix(in oklch, var(--destructive) 35%, var(--border)); background: var(--danger-bg); color: var(--danger); }
button.ghost, .icon-button, .logout, .eye { background: transparent; }
button:disabled { opacity: .45; cursor: not-allowed; }
.alert { margin: 0; color: var(--destructive); font-weight: 650; }
.pending { color: var(--muted-foreground); }

span.good, span.bad, span.warn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 650;
}
span.good { color: var(--success); background: var(--success-bg); }
span.bad { color: var(--danger); background: var(--danger-bg); }
span.warn { color: var(--warning); background: var(--warning-bg); }
span.good::before, span.bad::before, span.warn::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 0 10px 8px; text-align: left; color: var(--muted-foreground); font-size: 12px; font-weight: 600; }
td { padding: 10px; border-top: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover td { background: color-mix(in oklch, var(--muted) 55%, transparent); }
td[colspan] { color: var(--muted-foreground); }
.num, code, .mono, pre.note { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 12.5px; }
a.rowlink { color: var(--sidebar-accent-foreground); font-weight: 650; }
pre.note {
  margin: 12px 0 0; padding: 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--muted); color: var(--foreground); white-space: pre-wrap;
}
.settings-layout { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); gap: 12px; align-items: start; }
.strip.tablist { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.strip.tablist a {
  display: flex; align-items: center; min-height: 34px; padding: 0 12px;
  border-radius: 999px; color: var(--foreground);
}
.strip.tablist a:hover, .strip.tablist a[aria-current="page"] {
  background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); font-weight: 600;
}

.auth {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(23rem, .85fr) minmax(32rem, 1.15fr);
  background: color-mix(in oklch, var(--muted) 30%, var(--background));
}
.auth-aside {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; padding: 40px; color: #fff;
  background: var(--aside); border-right: 1px solid #18181b;
}
.auth-glow {
  position: absolute; z-index: 0; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(14,165,233,.18), transparent 35%),
    radial-gradient(circle at 80% 75%, rgba(16,185,129,.13), transparent 32%);
}
.auth-aside > :not(.auth-glow) { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .logo { border: 0; box-shadow: 0 10px 24px rgba(0,0,0,.28); }
.auth-brand .brand-text strong { display: block; font-family: Manrope, Inter, sans-serif; font-size: 16px; font-weight: 650; }
.auth-brand .brand-text span { display: block; margin-top: 2px; color: #a1a1aa; font-size: 12px; }
.auth-kicker { margin: 0 0 16px; color: #7dd3fc; font-size: 12px; font-weight: 650; letter-spacing: .18em; text-transform: uppercase; }
.auth-aside h1 {
  max-width: 16ch; margin: 0; color: #fff;
  font-size: 40px; line-height: 1.2; font-weight: 650; letter-spacing: -.03em;
}
.auth-points { margin: 36px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: #d4d4d8; font-size: 14px; }
.auth-points i {
  width: 24px; height: 24px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: rgba(14,165,233,.15); color: #bae6fd; font-style: normal;
}
.auth-points .ico { width: 14px; height: 14px; }
.auth-foot { display: flex; align-items: center; gap: 8px; color: #71717a; font-size: 12px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card {
  width: min(28rem, 100%);
  display: flex; flex-direction: column; gap: 20px;
  padding: 24px; border: 1px solid color-mix(in oklch, var(--border) 80%, transparent);
  border-radius: 16px; background: var(--card);
  box-shadow: 0 24px 70px -45px rgba(15, 23, 42, .55);
}
.auth-card .kicker { margin: 0; color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.auth-card h1 { margin: 4px 0 0; font-size: 28px; }
.auth-card .note { margin: 6px 0 0; }
.password-field { position: relative; }
.password-field input { padding-right: 42px; }
.eye {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 32px; height: 32px; min-height: 32px; padding: 0;
  border: 0; border-radius: 999px; color: var(--muted-foreground);
}
.eye:hover { background: var(--muted); color: var(--foreground); }
.auth-submit { width: 100%; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.auth-fine { margin: 0; text-align: center; color: var(--muted-foreground); font-size: 12px; }
.mobile-brand { display: none; }

@media (max-width: 1100px) {
  .auth-aside h1 { font-size: 32px; }
}
@media (max-width: 1024px) {
  .auth { display: block; }
  .auth-aside { display: none; }
  .mobile-brand { display: flex; }
}
@media (max-width: 980px) {
  .slip { grid-template-columns: 1fr 1fr; }
  .span-2, .span-4 { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .body { display: block; }
  .side { width: auto; flex: none; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px; }
  .side nav { flex-direction: row; overflow-x: auto; }
  .nav-label { display: none; }
  .side a { flex: 0 0 auto; margin: 0 4px; }
  .brand-copy, .pill { display: none; }
  .page { padding: 16px 14px 40px; }
  .flash:not(:empty) { margin: 12px 14px 0; }
}
@media (max-width: 640px) {
  .slip, .settings-layout { grid-template-columns: 1fr; }
}
@media (pointer: coarse) {
  .side a, button, input, select { min-height: 44px; }
  .eye { min-height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .arrive { animation: none; }
}
