/* static/css/base.css */
/*
  Simple, mobile-friendly base styles for Gniess.
*/

:root {
  --bg: #0f172a;
  --surface: #111827;
  --border: #1f2937;
  --accent: #38bdf8;
  --accent-hover: #38bdf8dd;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --radius: 10px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    -system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 60px;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:active, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Header */

header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: radial-gradient(circle at top, #0f172a 0, #020817 100%);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px 6px;
}

.header-row {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.header-title {
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 14px;
}

.header-nav {
  display: flex;
  gap: 14px;
  font-size: 13px;
}

/* Main content */

main {
  flex: 1;
  padding: 14px 14px 18px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Footer */

footer {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: linear-gradient(to top, #020817 80%, transparent);
  padding: 6px 14px 10px;
  font-size: 11px;
  color: var(--muted);
}

.footer-row {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
}

.card h2 {
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--accent);
}

.card p {
  font-size: 11px;
  color: var(--muted);
}

/* Clickable card wrapper (for dashboard) */

.card-link {
  text-decoration: none;
  color: inherit;
}

.card-link:active,
.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-link .card {
  cursor: pointer;
}

/* Dashboard */

.dashboard h1 {
  font-size: 18px;
  margin-bottom: 6px;
}

.dashboard > p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

/* Buttons */

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  background: radial-gradient(circle at top left, #38bdf8 0, #0284c7 100%);
  color: #020817;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.primary-button:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.9);
}

/* Login page */

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

.login-card {
  width: 100%;
  max-width: 320px;
  padding: 16px 14px;
  border-radius: 14px;
  background: radial-gradient(circle at top, #020817 0, #0f172a 100%);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.login-card h1 {
  text-align: center;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
  font-size: 18px;
}

.subtitle {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}

.login-card label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-card input {
  width: 100%;
  padding: 8px 9px;
  margin-bottom: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #020817;
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.login-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.login-card .primary-button {
  width: 100%;
  margin-top: 4px;
}

.error {
  font-size: 11px;
  color: #f97316;
  margin-bottom: 6px;
}

.small-note {
  margin-top: 8px;
  font-size: 9px;
  color: #4b5563;
  text-align: center;
}

/* Utility */

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 10px; }
