/* ============================================================
   CHECKLYN — APP STYLES
   Reconstructed from Design System v1.1
   ============================================================ */

@font-face {
  font-family: "Geist";
  src: url("https://fonts.gstatic.com/s/geist/v1/gyByhwUxId8gMEwYGFU3SrCa.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@import url("https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  background: var(--bg-page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; }

h1, h2, h3, h4 {
  color: var(--ink-strong);
  font-weight: 600;
  line-height: var(--lh-tight);
  margin: 0;
  text-wrap: balance;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-sunken);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  color: var(--ink-strong);
}

::selection { background: var(--accent-soft); color: var(--ink-strong); }

/* ---------- Brand mark ---------- */
.brand a {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--ink-strong);
  text-transform: uppercase;
}
.brand a:hover { text-decoration: none; color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: var(--bg-raised);
  color: var(--ink-strong);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease, transform .04s ease;
  display: inline-flex; align-items: center; gap: 8px;
  letter-spacing: var(--tracking-snug);
  text-decoration: none;
}
.btn:hover { background: var(--bg-sunken); border-color: var(--ink-faint); }
.btn:active { transform: translateY(1px); box-shadow: var(--shadow-press); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary  { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover  { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-secondary { background: var(--bg-raised); color: var(--ink-strong); }
.btn-ghost    { background: transparent; border-color: transparent; color: var(--ink-muted); }
.btn-ghost:hover { background: var(--bg-sunken); color: var(--ink-strong); }
.btn-success  { background: var(--success); border-color: var(--success); color: #fff; }
.btn-danger   { background: var(--danger); border-color: var(--danger); color: #fff; }

.btn-sm { font-size: var(--fs-xs); padding: 7px 11px; }
.btn-lg { font-size: var(--fs-md); padding: 14px 22px; }

/* ---------- Pills + badges ---------- */
.status-pill {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  padding: 3px 8px 2px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--rule);
  color: var(--ink-muted);
  background: var(--bg-raised);
  display: inline-flex; align-items: center; gap: 6px;
}
.status-pill::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.7;
}
.status-done       { color: var(--success); border-color: color-mix(in oklch, var(--success) 30%, var(--rule)); }
.status-processing { color: var(--info); border-color: color-mix(in oklch, var(--info) 30%, var(--rule)); }
.status-processing::before { animation: pulse 1.4s ease-in-out infinite; }
.status-pending    { color: var(--ink-muted); }
.status-failed     { color: var(--danger); border-color: color-mix(in oklch, var(--danger) 30%, var(--rule)); }
.status-warning    { color: var(--warning); border-color: color-mix(in oklch, var(--warning) 30%, var(--rule)); }

@keyframes pulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }

.level-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 500;
  border-radius: var(--radius-xs);
  color: #fff;
}
.level-badge[data-level="1"] { background: var(--level-1); }
.level-badge[data-level="2"] { background: var(--level-2); }
.level-badge[data-level="3"] { background: var(--level-3); }
.level-badge[data-level="4"] { background: var(--level-4); }

.lang-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--ink-faint);
  padding: 1px 5px;
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-xs);
  vertical-align: 2px;
}

/* ---------- Form fields ---------- */
.form-field { display: grid; gap: 6px; }
.form-label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--ink-faint);
  display: inline-flex; align-items: center; gap: 6px;
}
input[type="text"], input[type="email"], input[type="number"], input[type="search"], textarea, select {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  color: var(--ink-strong);
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  width: 100%;
  transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus);
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }

.form-help  { font-size: var(--fs-xs); color: var(--ink-muted); }
.form-error { font-size: var(--fs-xs); color: var(--danger); }

/* ---------- Progress ---------- */
.vt-progress-bar {
  height: 4px; background: var(--bg-sunken);
  border-radius: 2px; overflow: hidden;
}
.vt-progress-inner {
  height: 100%; background: var(--accent);
  border-radius: 2px;
  transition: width .35s ease;
}

/* ---------- Flash ---------- */
.flash {
  padding: 12px 14px 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--ink-faint);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--ink);
}
.flash.success { border-left-color: var(--success); }
.flash.info    { border-left-color: var(--info); }
.flash.warning { border-left-color: var(--warning); }
.flash.danger  { border-left-color: var(--danger); }
