/* ============================================================
   Secure Access — Components
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  padding: 0 18px;
  height: 46px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease),
              background var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible { outline: 2px solid var(--brand-a); outline-offset: 2px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: var(--glow-brand);
}
.btn-primary:hover { box-shadow: 0 14px 50px color-mix(in oklab, var(--brand-a) 50%, transparent); transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-3); border-color: color-mix(in oklab, var(--brand-a) 40%, var(--border)); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
  border-color: color-mix(in oklab, var(--danger) 30%, transparent);
}
.btn-danger-ghost:hover { background: var(--danger-soft); }

.btn-lg { height: 54px; font-size: 16px; padding: 0 26px; border-radius: var(--r-lg); }
.btn-sm { height: 38px; font-size: 13.5px; padding: 0 14px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}
.card-2 { background: var(--surface-2); }
.card-pad-lg { padding: var(--sp-8); }
.card-interactive { transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease), background var(--t-base) var(--ease); }
.card-interactive:hover { border-color: color-mix(in oklab, var(--brand-a) 35%, var(--border)); transform: translateY(-2px); }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 5px 11px 5px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  line-height: 1;
  white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-success { color: var(--success); background: var(--success-soft); border-color: color-mix(in oklab, var(--success) 28%, transparent); }
.pill-warning { color: var(--warning); background: var(--warning-soft); border-color: color-mix(in oklab, var(--warning) 28%, transparent); }
.pill-danger  { color: var(--danger);  background: var(--danger-soft);  border-color: color-mix(in oklab, var(--danger) 28%, transparent); }
.pill-neutral { color: var(--text-dim); }
.pill-brand   { color: #cdd7ff; background: var(--brand-grad-soft); border-color: color-mix(in oklab, var(--brand-a) 35%, transparent); }
.pill-success .dot { box-shadow: 0 0 0 3px color-mix(in oklab, var(--success) 25%, transparent); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.55} }

/* ---------- Tiles / icon chips ---------- */
.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--brand-grad-soft);
  border: 1px solid color-mix(in oklab, var(--brand-a) 22%, transparent);
  color: #cdd7ff;
  flex: none;
}
.tile svg { width: 22px; height: 22px; }
.tile-lg { width: 54px; height: 54px; border-radius: var(--r-lg); }
.tile-lg svg { width: 26px; height: 26px; }
.tile-plain { background: var(--surface-2); border-color: var(--border); color: var(--text-muted); }

/* ---------- Inputs ---------- */
.input {
  width: 100%;
  height: 50px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 0 16px;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.input::placeholder { color: var(--text-faint); }
.input:focus { outline: none; border-color: var(--brand-a); background: var(--surface-3); }

/* ---------- Toggle ---------- */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 46px; height: 27px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
  flex: none;
}
.toggle .knob {
  position: absolute;
  left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #cfd5e3;
  transition: transform var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.toggle[aria-checked="true"] {
  background: var(--brand-grad);
  border-color: transparent;
}
.toggle[aria-checked="true"] .knob { transform: translateX(19px); background: #fff; }

/* ---------- Device card ---------- */
.device {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t-base) var(--ease);
}
.device:hover { border-color: color-mix(in oklab, var(--brand-a) 28%, var(--border)); }
.device-head { display: flex; align-items: center; gap: var(--sp-3); }
.device-name { font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; }
.device-sub  { font-size: 12.5px; color: var(--text-dim); margin-top: 1px; }
.device-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ---------- Section label / eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: ""; width: 18px; height: 1.5px; background: var(--brand-grad); border-radius: 2px; }

/* ---------- Logo ---------- */
.sa-logo { display: inline-flex; align-items: center; gap: 9px; }
.sa-mark { flex: none; filter: drop-shadow(0 2px 8px color-mix(in oklab, var(--brand-a) 40%, transparent)); }
.sa-word { font-weight: 650; font-size: 17px; letter-spacing: -0.025em; color: var(--text); white-space: nowrap; }

/* ---------- Divider ---------- */
.divider { height: 1px; background: var(--border-soft); border: 0; margin: var(--sp-5) 0; }

/* ---------- Skeleton ---------- */
.skeleton {
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
