/* auth.gbre.org - Solarized palette via prefers-color-scheme.
 * Mirrors ~/repos/docker-gomorrah/alerts-minisite/static/style.css.
 * Reference: https://ethanschoonover.com/solarized/
 *
 * base03  #002b36 (dark bg)
 * base02  #073642
 * base01  #586e75
 * base00  #657b83
 * base0   #839496
 * base1   #93a1a1
 * base2   #eee8d5
 * base3   #fdf6e3 (light bg)
 * yellow  #b58900
 * orange  #cb4b16
 * red     #dc322f
 * magenta #d33682
 * violet  #6c71c4
 * blue    #268bd2
 * cyan    #2aa198
 * green   #859900
 */

:root {
  /* Light (default). Overridden in @media (prefers-color-scheme: dark). */
  --bg:      #fdf6e3; /* base3 */
  --bg-alt:  #eee8d5; /* base2 */
  --fg:      #586e75; /* base01 */
  --fg-emph: #073642; /* base02 */
  --fg-mute: #93a1a1; /* base1 */
  --line:    #eee8d5; /* base2 */
  --link:    #268bd2; /* blue */
  --critical:#dc322f; /* red */
  --ok:      #859900; /* green */
  --shadow:  0 1px 0 rgba(0,0,0,0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #002b36; /* base03 */
    --bg-alt:  #073642; /* base02 */
    --fg:      #93a1a1; /* base1 */
    --fg-emph: #eee8d5; /* base2 */
    --fg-mute: #586e75; /* base01 */
    --line:    #073642; /* base02 */
    --link:    #268bd2; /* blue */
    --critical:#dc322f; /* red */
    --ok:      #859900; /* green */
    --shadow:  0 1px 0 rgba(0,0,0,0.4);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); }

/* ------- shell ------- */

.auth-shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 16px 96px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.auth-logo {
  width: 80px;
  height: 80px;
  display: block;
}

.auth-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--fg-emph);
  letter-spacing: 0.01em;
}

.auth-subtitle {
  margin: 0;
  color: var(--fg-mute);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ------- card ------- */

.auth-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  text-align: center;
}

.auth-card.hidden {
  display: none;
}

.auth-msg {
  margin: 0;
  font-size: 1rem;
  color: var(--fg-emph);
}

.auth-msg-ok {
  color: var(--ok);
  font-weight: 600;
}

.auth-msg-err {
  color: var(--critical);
  font-weight: 600;
}

.auth-user {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  color: var(--fg-emph);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  word-break: break-all;
}

.auth-foot {
  margin: 0;
  font-size: 0.85rem;
  color: var(--fg-mute);
}

.auth-err {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--critical);
  background: var(--bg);
  border: 1px solid var(--critical);
  border-radius: 4px;
  padding: 8px 10px;
  word-break: break-all;
}

/* ------- button ------- */

.auth-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--fg-mute);
  background: var(--bg);
  color: var(--fg-emph);
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  min-height: 44px; /* tap target */
  transition: background 0.1s ease;
}

.auth-btn:hover { background: var(--bg-alt); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.auth-btn-primary {
  background: var(--link);
  border-color: var(--link);
  color: #fff;
}

.auth-btn-primary:hover { background: #1d6fa5; }

/* ------- footer ------- */

.auth-footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--fg-mute);
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.auth-footer .sep { color: var(--line); }

/* ------- narrow viewport ------- */

@media (max-width: 480px) {
  .auth-shell { padding: 32px 12px 80px 12px; }
  .auth-card { padding: 20px 16px; }
  .auth-title { font-size: 1.4rem; }
}
