/* Veduis client portal. Dark surface, cyan accent, AA contrast for body text. */
:root {
  --bg: #000;
  --surface: #0a0a0a;
  --surface-2: #101010;
  --line: rgba(255, 255, 255, 0.12);
  --text: #e8e8e8;
  --muted: #9a9a9a;
  --cyan: #00ffff;
  --cyan-ink: #001414;
  --ok: #4ade80;
  --warn: #fbbf24;
  --err: #f87171;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: #fff; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.02em; }
h1 { font-size: clamp(24px, 3vw, 34px); }
h2 { font-size: 19px; }
p { margin: 0 0 12px; }
code, pre, .key { font-family: var(--mono); }
.muted { color: var(--muted); }
.mt { margin-top: 24px; }
.req { color: var(--err); }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 32px); border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.9); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px);
}
.brand { font-weight: 700; letter-spacing: 0.18em; color: #fff; text-transform: uppercase; }
.brand span { color: var(--cyan); }
.brand em { font-style: normal; letter-spacing: 0.08em; color: var(--muted); font-size: 11px; margin-left: 8px; text-transform: none; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.who { color: var(--muted); font-size: 13px; }
.inline { display: inline; }
.link-button { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.link-button:hover { color: #fff; }

main { max-width: 960px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 32px) 80px; }
main.wide { max-width: 1120px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 12px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 14px; }
.tabs a:hover { color: #fff; text-decoration: none; }
.tabs a.active { color: #fff; border-bottom-color: var(--cyan); }

.page-head { margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card > h2:first-child { margin-top: 0; }
.card form + form { margin-top: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat-label { margin: 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.stat-value { margin: 6px 0 0; font-size: 24px; font-weight: 600; color: #fff; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--text); }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; background: #050505; color: var(--text); border: 1px solid rgba(255,255,255,0.28);
  border-radius: 10px; padding: 11px 12px; font: inherit;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: var(--cyan); }
.hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 11px 20px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--cyan); background: var(--cyan); color: var(--cyan-ink);
  cursor: pointer; text-decoration: none; min-height: 44px;
}
.btn:hover { background: #7dffff; border-color: #7dffff; text-decoration: none; }
.btn-ghost { background: transparent; color: #e8e8e8; border-color: rgba(255,255,255,0.22); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--cyan); color: #fff; }
.btn-small { padding: 7px 14px; min-height: 34px; font-size: 12.5px; }

.flash { border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-size: 14px; border: 1px solid var(--line); }
.flash-ok { border-color: rgba(74,222,128,0.4); background: rgba(74,222,128,0.08); }
.flash-err { border-color: rgba(248,113,113,0.45); background: rgba(248,113,113,0.08); }

.badge { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid var(--line); }
.badge-ok { color: var(--ok); border-color: rgba(74,222,128,0.4); }
.badge-warn { color: var(--warn); border-color: rgba(251,191,36,0.4); }
.badge-err { color: var(--err); border-color: rgba(248,113,113,0.4); }
.badge-info { color: #7dd3fc; border-color: rgba(125,211,252,0.4); }
.badge-neutral { color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }
td { font-size: 14px; }
.ta-right { text-align: right; }
tr:last-child td { border-bottom: 0; }

.empty { border: 1px dashed var(--line); border-radius: 12px; padding: 22px; text-align: left; }
.empty-title { margin: 0 0 4px; color: #fff; font-weight: 600; }

.auth-card { max-width: 440px; margin: 24px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.landing { padding: 28px 0 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 11px; color: var(--cyan); margin-bottom: 10px; }
.lead { color: var(--muted); font-size: 17px; max-width: 60ch; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 8px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.plan-card h2 { font-size: 17px; }
.price { font-size: 26px; font-weight: 600; color: #fff; margin: 0 0 8px; }
.price .per { font-size: 13px; color: var(--muted); font-weight: 400; }
.tag { color: var(--cyan); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }

.thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.message { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); }
.message.mine { border-color: rgba(0,255,255,0.25); }
.message header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.message-body { font-size: 15px; }
.prose p:last-child { margin-bottom: 0; }
.prose pre { background: #050505; border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-x: auto; }
.prose .code-wrap { position: relative; margin: 12px 0; }
.prose .code-wrap pre { margin: 0; padding-right: 72px; }
.prose .code-wrap .btn { position: absolute; top: 8px; right: 8px; }
.prose code { background: rgba(255,255,255,0.07); padding: 1px 5px; border-radius: 5px; font-size: 0.9em; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { border-left: 2px solid var(--cyan); margin: 12px 0; padding: 4px 14px; color: var(--muted); }
.prose table { margin: 12px 0; }
.prose img { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.prose ul, .prose ol { padding-left: 22px; }

.files { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 12px; flex-wrap: wrap; }
.files li { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; }

.key { background: #050505; border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.keys { background: #050505; border: 1px solid var(--line); border-radius: 10px; padding: 14px; white-space: pre-wrap; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.inline-form input, .inline-form select { width: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack { display: grid; gap: 8px; }
.plain { list-style: none; padding: 0; margin: 0; }

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
  .who { display: none; }
  th, td { padding: 9px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
