:root {
  --bg: #16110e;
  --bg-elevated: #221c18;
  --ink: #f4ece3;
  --muted: #a89888;
  --line: #3a3028;
  --accent: #e8c07a;
  --accent-ink: #1a1410;
  --danger: #ff7a6a;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1000px 520px at 8% -8%, #3a2418 0%, transparent 55%),
    radial-gradient(800px 420px at 100% 0%, #2a1c14 0%, transparent 50%),
    linear-gradient(180deg, #16110e 0%, #1c1612 100%);
  color: var(--ink);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.shell {
  width: min(960px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 3.5rem 0 4rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.75rem;
}

.brand span { color: var(--accent); }

.lede {
  margin: 0 0 2.2rem;
  color: var(--muted);
  max-width: 36rem;
  font-size: 1.05rem;
}

.panel {
  background: color-mix(in srgb, var(--bg-elevated) 90%, transparent);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.75rem;
  backdrop-filter: blur(8px);
}

.panel h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: #120e0c;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  outline: none;
}

input[type="email"] { margin-bottom: 1rem; }

input[type="email"]:focus,
input[type="password"]:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

label.remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1rem 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
}

label.remember input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.8rem 1.2rem;
  border: 0;
  border-radius: 0.65rem;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover { filter: brightness(1.06); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  margin-top: 0;
}

.btn-ghost:hover { color: var(--ink); }

.error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: #ffb4ab;
  font-size: 0.92rem;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.app-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.app-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.15rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  min-height: 5.5rem;
}

.app-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #120e0c;
}

.app-copy {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.app-name {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.app-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.empty { color: var(--muted); margin: 0; }
code { font-family: var(--font-mono); font-size: 0.92em; }
