/* Gatekeeper auth styles.
   NowNow craft (Inter, dark graphite, centered card) + Sunrise warm-orange accent. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-700.woff2") format("woff2"); }

:root {
  /* NowNow graphite */
  --app: #0d0f12;
  --panel: #16181d;
  --panel-2: #1a1d23;
  --line: #23262d;
  --line-2: #2c313a;
  --ink: #e7e9ee;
  --ink-2: #9aa1ad;
  --ink-3: #6b7280;
  /* Sunrise warm accent */
  --accent: #e85d04;
  --accent-hover: #ff6b0a;
  --on-accent: #1a1206;
  --brand: #f37123; /* official Sunrise logo orange */
  --error: #d8503a;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--app);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* a faint warm glow from the top — Sunrise atmosphere, dialed right down */
  background-image: radial-gradient(80% 55% at 50% -10%, rgba(232, 93, 4, 0.08), transparent 70%);
}

.auth {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--ink);
}
.brand-mark { width: 26px; height: 26px; color: var(--brand); }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

.auth h1 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.auth p {
  margin: 0 0 24px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}
.auth p strong { color: var(--ink); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--panel-2); border-color: var(--ink-3); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

.error {
  margin: 0 0 20px;
  padding: 10px 13px;
  background: rgba(216, 80, 58, 0.12);
  border: 1px solid rgba(216, 80, 58, 0.32);
  border-radius: 9px;
  color: #f0a89b;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

.preview-nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 4px;
}
.preview-nav .btn { text-transform: capitalize; }

.org {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Portal (apps dashboard) ─────────────────────────────────────────────── */
.auth--portal { max-width: 40rem; }

.user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1.5rem;
}
.user-bar__id { color: var(--ink-2); font-size: 0.9rem; }

.section-label {
  align-self: flex-start;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin: 0 0 0.5rem;
}

.apps { display: flex; flex-wrap: wrap; gap: 0.5rem; width: 100%; }

.app-card {
  flex: 1 1 calc(50% - 0.5rem);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  background: var(--panel);
  border: 1px solid var(--ink-3);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
a.app-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(232, 93, 4, 0.18);
}
.app-card__name { color: var(--ink); font-weight: 500; }
.app-card__url { color: var(--ink-3); font-size: 0.75rem; word-break: break-all; }
.app-card--nolink { opacity: 0.75; }

.empty-state { align-self: flex-start; color: var(--ink-2); font-size: 0.9rem; }

@media (max-width: 560px) {
  .app-card { flex: 1 1 100%; }
}
