:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18212f;
  background: #f4f7fb;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, input { font: inherit; }

.login-page {
  display: grid;
  place-items: center;
  padding: 32px;
  background: radial-gradient(circle at top left, #dfefff, transparent 34%), #f4f7fb;
}
.login-card {
  width: min(520px, 100%);
  background: rgba(255,255,255,.94);
  border: 1px solid #dde5ef;
  border-radius: 24px;
  padding: 42px;
  box-shadow: 0 24px 70px rgba(35,55,80,.12);
}
.brand-mark {
  width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 25px;
  background: #18212f; color: white;
}
.eyebrow { margin: 18px 0 6px; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; color: #64748b; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
h1 { font-size: 34px; }
h2 { font-size: clamp(32px, 5vw, 58px); max-width: 760px; }
.lead { color: #526071; font-size: 18px; line-height: 1.6; }
.muted { color: #718096; }
.small { font-size: 13px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 18px; border-radius: 12px;
  border: 0; text-decoration: none; cursor: pointer;
  background: #18212f; color: white; font-weight: 750;
}
.secondary { background: #e8eef5; color: #18212f; }
.google-button { width: 100%; margin-top: 12px; }
.notice { margin: 20px 0; padding: 15px 16px; border-radius: 12px; background: #edf4fb; color: #334155; line-height: 1.45; }
.notice.danger { background: #fff0f0; color: #8a2525; }
.topbar {
  min-height: 96px; padding: 24px clamp(24px, 5vw, 72px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: white; border-bottom: 1px solid #e5eaf0;
}
.topbar .eyebrow { margin: 0 0 5px; }
.topbar h1 { font-size: 28px; }
.userbox { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: #596579; font-size: 14px; }
.userbox a, .link-button { color: #315b86; text-decoration: none; }
.link-button { padding: 0; border: 0; background: none; cursor: pointer; }
.page-shell { padding: clamp(28px, 5vw, 72px); }
.hero { padding: clamp(32px, 6vw, 82px) 0; }
.hero p:not(.eyebrow) { max-width: 720px; color: #64748b; font-size: 18px; line-height: 1.6; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.project-card {
  position: relative; display: block; min-height: 210px; padding: 26px;
  background: white; border: 1px solid #e0e7ef; border-radius: 18px;
  text-decoration: none; box-shadow: 0 10px 30px rgba(25,40,60,.05);
}
.project-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(25,40,60,.08); }
.project-card h3 { margin-top: 54px; font-size: 23px; }
.project-card p { color: #64748b; line-height: 1.5; }
.project-icon { position: absolute; right: 24px; top: 22px; font-size: 24px; }
.table-card { overflow-x: auto; background: white; border: 1px solid #e0e7ef; border-radius: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 18px; border-bottom: 1px solid #edf1f5; text-align: left; vertical-align: middle; }
th { color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.status { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status-approved { background: #e8f7ee; color: #21663c; }
.status-pending { background: #fff7dd; color: #7b5b00; }
.status-revoked { background: #ffeded; color: #912b2b; }
.actions { display: flex; gap: 8px; }
.actions form { margin: 0; }
.actions button { border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; background: #eaf2fb; color: #315b86; }
.actions .danger-button { background: #fff0f0; color: #922c2c; }
@media (max-width: 680px) { .topbar { align-items: flex-start; flex-direction: column; } .login-card { padding: 28px; } }

.project-status {
  display: inline-block; margin-top: 10px; padding: 5px 9px;
  border-radius: 999px; background: #edf4fb; color: #315b86;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
}
.compact-hero { padding-bottom: 38px; }
.metric-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px;
}
.metric-card {
  min-height: 120px; padding: 22px; border-radius: 16px;
  background: white; border: 1px solid #e0e7ef;
}
.metric-card span, .system-detail span { display: block; color: #64748b; font-size: 12px; margin-bottom: 8px; }
.metric-card strong { font-size: 22px; }
.system-detail {
  margin-top: 18px; padding: 22px; border-radius: 16px;
  background: white; border: 1px solid #e0e7ef;
  display: grid; gap: 16px;
}

/* Dark theme */
:root {
  color: #eef4ff;
  background: #0b1017;
  color-scheme: dark;
}
body { background: #0b1017; color: #eef4ff; }
.login-page {
  background: radial-gradient(circle at top left, #1b3550, transparent 38%), #0b1017;
}
.login-card, .topbar, .project-card, .table-card, .metric-card, .system-detail {
  background: #111923;
  border-color: #263342;
  color: #eef4ff;
}
.login-card { box-shadow: 0 24px 70px rgba(0,0,0,.38); }
.brand-mark { background: #e8f2ff; color: #0b1017; }
.topbar { border-bottom-color: #263342; }
.eyebrow, .muted, .userbox, th,
.hero p:not(.eyebrow), .project-card p,
.metric-card span, .system-detail span { color: #9aabc0; }
.userbox a, .link-button { color: #8bc4ff; }
.button { background: #e8f2ff; color: #0b1017; }
.secondary { background: #202d3b; color: #eef4ff; }
.notice { background: #16283a; color: #d9e9fa; }
.notice.danger { background: #3a1d24; color: #ffc9d0; }
.project-card { box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.project-card:hover { box-shadow: 0 16px 36px rgba(0,0,0,.32); border-color: #3c5269; }
.project-status { background: #172b40; color: #8bc4ff; }
th, td { border-bottom-color: #263342; }
.actions button { background: #1a3148; color: #9bd0ff; }
.actions .danger-button { background: #3a1d24; color: #ffc1c8; }
.static-card { cursor: default; }

/* System status: label and value belong together */
.metric-card {
  min-height: 92px;
  display: flex;
  align-items: baseline;
  align-content: center;
  gap: .45rem;
  flex-wrap: wrap;
}
.metric-card span, .system-detail span {
  display: inline;
  margin: 0;
  font-size: 14px;
}
.metric-card strong { font-size: 20px; }
.system-detail > div {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  flex-wrap: wrap;
}
.system-detail strong { font-size: 16px; }
