/* Minimal, responsive auth page styles */

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #666666;
  --accent: #0a84ff;
  --border: #e6e6e6;
  --surface: #ffffff;
  --btn-bg: #f8f8f8;
}

/* Dark theme via CSS variables */
body.theme-dark {
  --bg: #0b0b0b;
  --fg: #f2f2f2;
  --muted: #9aa0a6;
  --border: #2a2a2a;
  --surface: #121212;
  --btn-bg: #1a1a1a;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Verdana, Geneva, Tahoma, sans-serif, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--fg);
  background: var(--bg);
  line-height: 1.4;
  transition: background-color 160ms ease, color 160ms ease;
}

.center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

form {
  width: 100%;
  max-width: 360px;
  /* mobile default */
}

.title {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.hint,
.help {
  color: var(--muted);
}

.row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}

label {
  font-weight: 500;
}

input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--surface);
  color: var(--fg);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

button {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--btn-bg);
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--fg);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.hidden {
  display: none;
}

/* Top-right theme toggle */
.topbar {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999; /* ensure above main */
  pointer-events: none; /* let only the button receive clicks */
}

.topbar .theme-btn {
  padding: 8px 12px;
  pointer-events: auto; /* clickable even if header is non-interactive */
}

/* Responsive breakpoints: mobile (default), tablet, notebook, desktop */

/* Tablet */
@media (min-width: 600px) {
  form {
    max-width: 480px;
  }

  .title {
    font-size: 1.75rem;
  }
}

/* Notebook */
@media (min-width: 900px) {
  form {
    max-width: 640px;
  }

  input {
    font-size: 1.05rem;
  }
}

/* Desktop */
@media (min-width: 1200px) {
  form {
    max-width: 720px;
  }

  .title {
    font-size: 2rem;
  }
}
