:root {
  color-scheme: light dark;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.97);
  --surface-muted: rgba(15, 23, 42, 0.08);
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --danger: #dc2626;
  --danger-strong: #b91c1c;
  --text: #0f172a;
  --text-muted: rgba(15, 23, 42, 0.68);
  --border: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.2);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  line-height: 1.5;
}
body {
  margin: 0 1rem;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      circle at top left,
      rgba(59, 130, 246, 0.18),
      transparent 55%
    ),
    radial-gradient(
    circle at bottom right,
    rgba(16, 185, 129, 0.18),
    transparent 55%
  ),
    linear-gradient(180deg, #f1f5f9, #e2e8f0);
  min-height: 100vh;
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(
        circle at top left,
        rgba(59, 130, 246, 0.3),
        transparent 60%
      ),
      radial-gradient(
      circle at bottom right,
      rgba(16, 185, 129, 0.28),
      transparent 60%
    ),
      linear-gradient(180deg, #020617, #0f172a);
    color: rgba(226, 232, 240, 0.94);
  }
  :root {
    --surface: rgba(15, 23, 42, 0.85);
    --surface-strong: rgba(15, 23, 42, 0.96);
    --surface-muted: rgba(226, 232, 240, 0.08);
    --text: rgba(226, 232, 240, 0.94);
    --text-muted: rgba(148, 163, 184, 0.9);
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(148, 163, 184, 0.28);
  }
}
main.page {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 900px;
}
main.signin {}
.page-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
}
.brand {
  display: grid;
  gap: 0.75rem;
}
.brand .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
}
.brand h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin: 0;
}
.brand .lead {
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  margin: 0;
  color: var(--text-muted);
}
.panel {
  display: grid;
  gap: 1.75rem;
}
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  padding: clamp(1rem, 2vw + 1rem, 2.25rem);
  display: grid;
  gap: 1rem;
  border: 1px solid var(--border);
}
.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .section-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}
.section-header h2,
.section-header h3 {
  margin: 0;
}
.section-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
#conditional-status[data-state="error"] {
  color: var(--danger-strong);
}
#conditional-status[data-state="success"] {
  color: var(--primary);
}
#conditional-status[data-state="info"] {
  color: var(--text-muted);
}
form.stack {
  display: grid;
  gap: 1.25rem;
}
.field {
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.field span {
  font-weight: 600;
}
input[type="text"],
input[type="search"] {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  padding: 0.8rem 1rem;
  font-size: 1rem;
  color: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
button {
  appearance: none;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}
button.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.26);
}
button.primary:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
  box-shadow: 0 22px 38px rgba(37, 99, 235, 0.3);
}
button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
button.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}
button.secondary.accent {
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
}
button.secondary.accent:hover {
  background: rgba(37, 99, 235, 0.16);
}
button.danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 16px 28px rgba(220, 38, 38, 0.28);
}
button.danger:hover {
  background: var(--danger-strong);
}
button.danger.outline {
  background: rgba(220, 38, 38, 0.12);
  color: var(--danger-strong);
  border-color: rgba(220, 38, 38, 0.24);
  box-shadow: none;
}
button.danger.outline:hover {
  background: rgba(220, 38, 38, 0.18);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.button-row.align-start {
  justify-content: flex-start;
}
.button-row.align-end {
  justify-content: flex-end;
}
.stack .button-row {
  width: 100%;
}
#guest-form .button-row {
  flex-direction: column;
  align-items: stretch;
}
#guest-form .button-row > button {
  width: 100%;
}
.credentials {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
.credentials li {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-strong);
  padding: 1.2rem 1.4rem;
  display: grid;
  gap: 0.8rem;
}
.credential-editor {
  display: grid;
  gap: 0.6rem;
}
.credential-editor-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
}
.credentials li.empty {
  color: var(--text-muted);
  font-style: italic;
}
.credential-header {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.75rem;
}
.credential-header strong {
  font-size: 1.05rem;
  flex: 1;
}
.credential-actions {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}
.tag.success {
  background: rgba(34, 197, 94, 0.18);
  color: #047857;
}
.tag.warning {
  background: rgba(251, 191, 36, 0.18);
  color: #92400e;
}
.credential-meta {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
@media (min-width: 720px) {
  .credential-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.credential-meta div {
  display: flex;
  gap: 0.45rem;
}
.credential-meta div span {
  font-weight: 600;
  color: var(--text);
  min-width: 5.5rem;
}
dialog {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.32);
  padding: 0;
  max-width: 420px;
  width: min(92vw, 420px);
  background: var(--surface-strong);
  color: inherit;
}
dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.dialog-form {
  display: grid;
  gap: 1.25rem;
  padding: 1.8rem;
}
.dialog-form h2 {
  margin: 0;
  font-size: 1.35rem;
}
[hidden] {
  display: none !important;
}
