:root {
  --bg: #0a0d11;
  --bg-alt: #0f1319;
  --surface: #151a21;
  --border: #262e39;

  --text: #eef1f5;
  --text-dim: #aab2bf;
  --text-faint: #6c7684;

  --accent: #e8934a;
  --accent-dim: #c97a38;
  --accent-tint: rgba(232, 147, 74, 0.12);

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 18px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

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

.back-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.back-btn:hover { border-color: #3a4451; color: var(--text); }

/* ---------- Login page ---------- */

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 10%, rgba(232, 147, 74, 0.08) 0%, transparent 45%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-l);
  padding: 40px 36px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

.login-logo { height: 40px; margin: 0 auto 28px; }

.login-card h1 { font-size: 20px; font-weight: 650; margin: 0 0 6px; text-align: center; letter-spacing: -0.01em; }
.login-card .sub { font-size: 14px; color: var(--text-dim); text-align: center; margin: 0 0 28px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.field input {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color 0.2s var(--ease);
}
.field input:focus { outline: none; border-color: var(--accent-dim); }

.btn {
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #14100a;
  font-size: 14.5px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s var(--ease), opacity 0.2s var(--ease);
}
.btn:hover { background: #f0a05f; }
.btn:disabled { opacity: 0.6; cursor: default; }

.form-error {
  min-height: 18px;
  font-size: 13px;
  color: #f08a6c;
  margin-top: 12px;
  text-align: center;
}

.login-footnote {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.6;
}
.login-footnote a { color: var(--accent); text-decoration: none; }

/* ---------- Home / tile grid ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
}
.topbar-logo { height: 32px; }
.topbar-user { display: flex; align-items: center; gap: 16px; }
.topbar-email { font-size: 13.5px; color: var(--text-dim); }

.btn-ghost {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.btn-ghost:hover { border-color: #3a4451; background: rgba(255,255,255,0.03); }

.home-main { max-width: 1080px; margin: 0 auto; padding: 48px 32px 80px; }
.home-main h1 { font-size: 26px; font-weight: 650; margin: 0 0 6px; letter-spacing: -0.01em; }
.home-main .sub { font-size: 15px; color: var(--text-dim); margin: 0 0 40px; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.tile {
  display: block;
  padding: 26px 24px;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}
.tile:hover { border-color: var(--accent-dim); background: #1b212a; transform: translateY(-2px); }
.tile h3 { font-size: 16.5px; font-weight: 650; color: var(--text); margin: 0 0 8px; }
.tile p { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; margin: 0; }

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius-m);
  padding: 48px 32px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.7;
}
.empty-state[hidden] { display: none; }
.empty-state a { color: var(--accent); }
