/* ORYN Design System v1 — Components.
 * All values resolve to tokens. No literals beyond 0/transparent/currentColor. */

/* ── Button / CTA ───────────────────────────────────────────────── */
.o-btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--grad-brand); color: #05060d;
  padding: 11px 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; border: none; cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-cta);
  transition: transform var(--motion-fast), box-shadow var(--motion-base);
}
.o-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-cta-hover); color: #05060d; }
.o-btn--alt    { background: transparent; color: var(--text); box-shadow: 0 0 0 1px var(--line-2) inset; }
.o-btn--alt:hover { box-shadow: 0 0 0 1px var(--line-strong) inset; }
.o-btn--ghost  { background: transparent; color: var(--text); box-shadow: none; padding: 10px 14px; }
.o-btn--ghost:hover { background: rgba(255,255,255,0.04); }
.o-btn--danger { background: var(--bad); color: #fff; box-shadow: none; }
.o-btn--icon   { padding: 8px; border-radius: var(--radius-sm); }

/* ── Card ──────────────────────────────────────────────────────── */
.o-card {
  background: var(--grad-card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.o-card--lg { border-radius: var(--radius-lg); padding: 28px; }
.o-card--raised { box-shadow: var(--shadow-card-hover); }

/* ── Eyebrow ───────────────────────────────────────────────────── */
.o-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--cyan); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: rgba(93,200,255,0.08);
  border: 1px solid rgba(93,200,255,0.25);
}
.o-eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

/* ── Pill / chip ───────────────────────────────────────────────── */
.o-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--radius-pill);
}
.o-pill--signal  { color: var(--cyan-soft);   background: rgba(93,200,255,0.12);  border: 1px solid rgba(93,200,255,0.30); }
.o-pill--module  { color: var(--violet-soft); background: rgba(124,92,255,0.12);  border: 1px solid rgba(124,92,255,0.30); }
.o-pill--tier    { color: #ffb8d1;            background: rgba(255,107,138,0.10); border: 1px solid rgba(255,107,138,0.30); }
.o-pill--good    { color: var(--good);        background: rgba(76,224,163,0.10);  border: 1px solid rgba(76,224,163,0.30); }
.o-pill--warn    { color: var(--warn);        background: rgba(255,180,84,0.10);  border: 1px solid rgba(255,180,84,0.30); }
.o-pill--bad     { color: var(--bad);         background: rgba(255,107,138,0.10); border: 1px solid rgba(255,107,138,0.30); }
.o-pill--muted   { color: var(--muted);       background: rgba(255,255,255,0.04); border: 1px solid var(--line-2); }

/* ── Input / select / textarea ─────────────────────────────────── */
.o-input, .o-select, .o-textarea {
  background: rgba(10,12,28,0.60);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: var(--density-pad-y) var(--density-pad-x);
  font: 14px/1.4 var(--font-sans);
  width: 100%;
  transition: border-color var(--motion-fast);
}
[data-theme="light"] .o-input,
[data-theme="light"] .o-select,
[data-theme="light"] .o-textarea { background: #ffffff; }
.o-input:focus, .o-select:focus, .o-textarea:focus { border-color: var(--cyan); outline: none; }
.o-textarea { min-height: 96px; resize: vertical; }

/* ── Toggle ────────────────────────────────────────────────────── */
.o-toggle { position: relative; display: inline-block; width: 38px; height: 22px; }
.o-toggle input { opacity: 0; width: 0; height: 0; }
.o-toggle__track {
  position: absolute; inset: 0; cursor: pointer;
  background: rgba(255,255,255,0.10);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-pill);
  transition: background var(--motion-base);
}
.o-toggle__track::before {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text);
  transition: transform var(--motion-base);
}
.o-toggle input:checked + .o-toggle__track { background: var(--cyan); border-color: var(--cyan); }
.o-toggle input:checked + .o-toggle__track::before { transform: translateX(16px); background: #05060d; }

/* ── Dialog (modal) ────────────────────────────────────────────── */
.o-dialog-backdrop {
  position: fixed; inset: 0;
  background: rgba(5,6,13,0.65); backdrop-filter: blur(8px);
  z-index: var(--z-dialog);
  display: grid; place-items: center;
  animation: oryn-fade-in var(--motion-base) var(--ease-standard);
}
.o-dialog {
  background: var(--grad-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  min-width: 320px; max-width: 560px; width: calc(100% - 48px);
  box-shadow: var(--shadow-popover);
}

/* ── Drawer ────────────────────────────────────────────────────── */
.o-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(5,6,13,0.55); backdrop-filter: blur(6px);
  z-index: var(--z-overlay);
}
.o-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: var(--panel);
  border-left: 1px solid var(--line-strong);
  z-index: calc(var(--z-overlay) + 1);
  animation: oryn-slide-in-right var(--motion-base) var(--ease-emphasis);
  display: flex; flex-direction: column;
}

/* ── Toast ─────────────────────────────────────────────────────── */
.o-toast-region {
  position: fixed; bottom: var(--space-5); right: var(--space-5);
  z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--space-2);
}
.o-toast {
  padding: 12px 16px;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-popover);
  font-size: 14px;
  animation: oryn-fade-in var(--motion-base) var(--ease-standard);
}

/* ── Empty / loading / error state ─────────────────────────────── */
.o-empty, .o-error, .o-loading {
  padding: var(--space-7) var(--space-5);
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}
.o-error { color: var(--bad); border-color: rgba(255,107,138,0.30); }

/* ── Tooltip ───────────────────────────────────────────────────── */
.o-tooltip {
  position: absolute;
  padding: 6px 10px;
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow-popover);
  pointer-events: none;
}

/* ── Breadcrumbs ───────────────────────────────────────────────── */
.o-breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.o-breadcrumbs__sep { color: var(--muted-2); }
.o-breadcrumbs__last { color: var(--text); }

/* ── Tabs ──────────────────────────────────────────────────────── */
.o-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.o-tab {
  background: transparent; border: none;
  padding: var(--density-pad-y) var(--density-pad-x);
  color: var(--muted); cursor: pointer;
  font: 600 13px/1 var(--font-sans);
  border-bottom: 2px solid transparent;
  transition: color var(--motion-fast), border-color var(--motion-fast);
}
.o-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--cyan); }
.o-tab:hover { color: var(--text); }

/* ── Table ─────────────────────────────────────────────────────── */
.o-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.o-table th, .o-table td {
  text-align: left;
  padding: var(--density-pad-y) var(--density-pad-x);
  border-bottom: 1px solid var(--line);
}
.o-table th {
  color: var(--muted); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(20,24,51,0.40);
}
.o-table tbody tr:hover { background: rgba(255,255,255,0.02); }
