:root {
  --blue: #1a73e8;
  --blue-dark: #174ea6;
  --blue-bg: #e8f0fe;
  --green: #188038;
  --green-bg: #e6f4ea;
  --red: #c5221f;
  --red-bg: #fce8e6;
  --orange: #e37400;
  --orange-bg: #fef7e0;
  --grey-text: #5f6368;
  --border: #dadce0;
  --surface: #ffffff;
  --bg: #f8f9fa;
  --ink: #202124;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---- Top bar ---- */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: conic-gradient(from 0deg, #4285F4, #34A853, #FBBC05, #EA4335, #4285F4);
  display: inline-block;
}
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tab {
  color: var(--grey-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.tab:hover { background: var(--blue-bg); color: var(--blue-dark); }
.tab.active { background: var(--blue-bg); color: var(--blue-dark); }
.logout {
  color: var(--grey-text);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.logout:hover { color: var(--ink); }

/* ---- Layout ---- */
.page { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.page h1 {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 4px;
}
.page-sub { color: var(--grey-text); font-size: 14px; margin: 0 0 22px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.card h2, .card h3 { margin-top: 0; font-weight: 500; }
.card h2 { font-size: 16px; }
.card h3 { font-size: 15px; }

/* ---- Table (profile grid) ---- */
.grid-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 16px; font-size: 14px; border-bottom: 1px solid #f1f3f4; }
th { color: var(--grey-text); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; background: #fafbfc; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8f9fa; }
td a { color: var(--blue); text-decoration: none; font-weight: 500; }
td a:hover { text-decoration: underline; }

/* ---- Badges / pills ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-published { background: var(--green-bg); color: var(--green); }
.badge-not_published { background: var(--red-bg); color: var(--red); }
.badge-unknown { background: #f1f3f4; color: var(--grey-text); }

.pct-bar { background: #e8eaed; border-radius: 6px; height: 6px; width: 90px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.pct-fill { background: var(--green); height: 100%; }
.pct-fill.low { background: var(--red); }
.pct-fill.mid { background: var(--orange); }

.muted { color: var(--grey-text); font-size: 13px; }
.error { color: var(--red); background: var(--red-bg); padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }
.success { color: var(--green); background: var(--green-bg); padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }

/* ---- Forms ---- */
label { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 500; color: var(--ink); }
input[type=text], input[type=password], input[type=file], input[type=number], textarea, select {
  width: 100%; padding: 9px 12px; margin-top: 5px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: var(--surface); color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
textarea { min-height: 90px; resize: vertical; }

button, .btn {
  background: var(--blue); color: #fff; border: none; padding: 9px 18px; border-radius: 20px;
  font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
}
button:hover, .btn:hover { background: var(--blue-dark); }
button.secondary { background: #fff; color: var(--blue); border: 1px solid var(--border); }
button.secondary:hover { background: var(--blue-bg); }
button.plain { background: transparent; color: var(--grey-text); border: 1px solid var(--border); }

/* ---- Login ---- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.login-box { background: var(--surface); padding: 40px 36px; border-radius: 16px; width: 340px; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(60,64,67,.12); text-align: center; }
.login-box .brand-dot { width: 14px; height: 14px; }
.login-box h1 { font-size: 20px; margin: 14px 0 22px; font-weight: 500; }
.login-box label { text-align: left; }
.login-box button { width: 100%; margin-top: 6px; padding: 11px; }

/* ---- Checklist ---- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 20px; }
.checklist li { padding: 7px 0; border-bottom: 1px solid #f1f3f4; font-size: 14px; }
.checklist button { all: unset; cursor: pointer; width: 100%; }
.checklist .ok { color: var(--green); }
.checklist .ok::before { content: "✓  "; font-weight: 700; }
.checklist .missing { color: var(--red); }
.checklist .missing::before { content: "✗  "; font-weight: 700; }

/* ---- Misc ---- */
code { background: #f1f3f4; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--grey-text); }

@media (max-width: 700px) {
  .checklist { grid-template-columns: 1fr; }
  .topbar-inner { gap: 12px; padding: 0 12px; }
  .page { padding: 18px 12px 40px; }
}
