/* Shared styles for the account, sign-in and playground pages (Tailwind zinc palette). */
:root {
  --zinc-950: #09090b; --zinc-900: #18181b; --zinc-800: #27272a; --zinc-700: #3f3f46;
  --zinc-500: #71717a; --zinc-400: #a1a1aa; --zinc-100: #f4f4f5;
  --cyan: #22d3ee; --emerald: #34d399; --amber: #fbbf24; --violet: #a78bfa; --rose: #fb7185;
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--zinc-950); color: var(--zinc-100);
       font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 420px; pointer-events: none; z-index: -1;
               background: radial-gradient(60% 100% at 50% 0%, rgba(34,211,238,.08), transparent 70%); }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px 56px; }
.wrap.narrow { max-width: 440px; }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; flex-wrap: wrap; }
.brand { font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--zinc-100); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
               background: linear-gradient(135deg, var(--cyan), var(--violet)); color: var(--zinc-950); font-size: 12px; }
.brand .name span { color: var(--cyan); }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a, nav button { color: var(--zinc-400); font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 8px;
                    background: none; border: 0; cursor: pointer; }
nav a:hover, nav button:hover { color: var(--zinc-100); background: var(--zinc-900); text-decoration: none; }
nav a.active { color: var(--zinc-100); background: var(--zinc-900); }

h1 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -.02em; margin: 20px 0 6px; }
h2 { font-size: 18px; margin: 0 0 4px; }
.lede, .muted { color: var(--zinc-400); }
.lede { margin: 0 0 28px; max-width: 680px; }
small, .small { font-size: 13px; }

.panel { background: rgba(24,24,27,.6); border: 1px solid var(--zinc-800); border-radius: 16px; padding: 22px; margin-bottom: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head p { margin: 2px 0 0; color: var(--zinc-400); font-size: 14px; max-width: 620px; }

/* forms */
label { display: block; font-size: 13px; color: var(--zinc-400); margin: 0 0 6px; font-weight: 500; }
input, select, textarea { width: 100%; font: inherit; font-size: 14px; color: var(--zinc-100); background: var(--zinc-950);
  border: 1px solid var(--zinc-800); border-radius: 10px; padding: 9px 12px; }
textarea { font-family: var(--mono); font-size: 13px; resize: vertical; min-height: 88px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(34,211,238,.45); outline-offset: 0; border-color: transparent; }
.field { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; align-items: center; gap: 8px; color: var(--zinc-400); font-size: 14px; margin: 0; }
.check input { width: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600;
       border-radius: 10px; padding: 9px 16px; border: 1px solid var(--zinc-700); background: var(--zinc-900); color: var(--zinc-100); cursor: pointer; }
.btn:hover { border-color: var(--zinc-500); }
.btn.primary { background: linear-gradient(135deg, var(--cyan), #38bdf8); color: var(--zinc-950); border: 0; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--rose); border-color: rgba(251,113,133,.35); background: transparent; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* tabs / segmented control */
.seg { display: inline-flex; background: var(--zinc-950); border: 1px solid var(--zinc-800); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { font: inherit; font-size: 13px; font-weight: 600; color: var(--zinc-400); background: none; border: 0;
              padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--zinc-800); color: var(--zinc-100); }

/* code */
code { font-family: var(--mono); font-size: 13px; }
.codebox { position: relative; }
.codebox pre { margin: 0; background: var(--zinc-950); border: 1px solid var(--zinc-800); border-radius: 10px;
               padding: 12px 14px; overflow-x: auto; font: 13px/1.6 var(--mono); white-space: pre; }
.codebox .copy { position: absolute; top: 8px; right: 8px; }
.secret { font-family: var(--mono); font-size: 13px; background: var(--zinc-950); border: 1px solid var(--zinc-800);
          border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; flex: 1; min-width: 0; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--zinc-800); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--zinc-500); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
     padding: 10px 14px; border-bottom: 1px solid var(--zinc-800); background: rgba(9,9,11,.6); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--zinc-800); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td.empty { color: var(--zinc-400); text-align: center; padding: 20px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* status pills */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--zinc-500); display: inline-block; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 2px 9px 2px 7px;
        border-radius: 999px; border: 1px solid var(--zinc-800); color: var(--zinc-400); white-space: nowrap; }
.pill.ok, .pill.computing, .pill.running, .pill.succeeded { color: var(--emerald); border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.08); }
.pill.ok .dot, .pill.computing .dot, .pill.running .dot, .pill.succeeded .dot { background: var(--emerald); }
.pill.running .dot, .pill.computing .dot { animation: glow 1.6s infinite; }
.pill.idle, .pill.dispatched, .pill.warn { color: var(--amber); border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.08); }
.pill.idle .dot, .pill.dispatched .dot, .pill.warn .dot { background: var(--amber); }
.pill.failed, .pill.expired, .pill.cancelled { color: var(--rose); border-color: rgba(251,113,133,.3); background: rgba(251,113,133,.08); }
.pill.failed .dot, .pill.expired .dot, .pill.cancelled .dot { background: var(--rose); }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } }

.notice { border: 1px solid rgba(34,211,238,.3); background: rgba(34,211,238,.06); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.notice.warn { border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.06); }
.error { color: var(--rose); font-size: 14px; min-height: 20px; margin: 8px 0 0; }
.output { background: var(--zinc-950); border: 1px solid var(--zinc-800); border-radius: 10px; padding: 12px 14px; min-height: 120px;
          max-height: 420px; overflow: auto; font: 13px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
footer { color: var(--zinc-500); font-size: 12px; border-top: 1px solid var(--zinc-800); padding-top: 18px; margin-top: 36px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
