/* ---------- design tokens ---------- */
:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --border: #e3e6ed;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #0c8b7a;          /* EOTS teal */
  --brand-dark: #086c5e;
  --brand-light: #d6f1ec;
  --accent: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 1px 3px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.04);
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 28px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 0; }
h3 { font-size: 16px; margin: 0 0 6px; }
.muted { color: var(--muted); }
.text-link { color: var(--brand); font-size: 14px; }

/* ---------- header ---------- */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 9px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
.brand-mark.big { font-size: 18px; padding: 10px 14px; }
.brand-name { font-weight: 600; color: var(--text); }
.primary-nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.primary-nav a { color: var(--text); font-weight: 500; font-size: 14px; }
.primary-nav a:hover { color: var(--brand); text-decoration: none; }
.admin-link { color: var(--accent) !important; }
.user-chip { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.user-chip .email { font-weight: 500; color: var(--text); }
.user-chip .logout { color: var(--muted); }

/* ---------- page shell ---------- */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
}

.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 32px 28px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.hero h1 { color: #fff; margin: 0 0 6px; font-size: 26px; }
.hero-sub { margin: 0; opacity: .85; }

.page-header { margin-bottom: 24px; }
.page-header h1 { margin-bottom: 4px; }

/* ---------- sections / cards ---------- */
.card-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}
.subhead {
  margin-top: 16px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 0;
}
.two-col > * { margin-bottom: 24px; }
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- announcements ---------- */
.announcement-list { display: flex; flex-direction: column; gap: 14px; }
.announcement {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}
.announcement.pinned {
  border-color: var(--accent);
  background: #fffaeb;
}
.announcement-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.announcement-head h3 { font-size: 15px; margin: 0; }
.announcement-body { margin: 6px 0 0; white-space: pre-wrap; }
.pin-badge { font-size: 12px; color: var(--accent); font-weight: 600; }

/* ---------- programs ---------- */
.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.program-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  color: var(--text);
  transition: all .15s;
}
.program-card:hover {
  text-decoration: none;
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.program-icon { font-size: 28px; margin-bottom: 8px; }
.program-title { font-weight: 600; margin-bottom: 4px; }
.program-desc { font-size: 13px; color: var(--muted); }

/* ---------- people lists ---------- */
.people-list { list-style: none; padding: 0; margin: 6px 0; }
.people-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.people-list li:last-child { border-bottom: none; }
.people-name { font-weight: 500; }
.people-meta { color: var(--muted); font-size: 13px; }

/* ---------- newsletter ---------- */
.newsletter-card { padding: 4px 2px; }
.newsletter-period {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
  letter-spacing: .8px;
}
.newsletter-title { font-size: 17px; font-weight: 600; margin: 4px 0 6px; }

.newsletter-archive { list-style: none; padding: 0; margin: 0; }
.newsletter-archive-item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

/* ---------- events ---------- */
.event-list { list-style: none; padding: 0; margin: 0; }
.event-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.event-list li:last-child { border-bottom: none; }
.event-date { font-weight: 600; color: var(--brand); }
.event-title { flex: 1; }
.event-loc { color: var(--muted); font-size: 13px; }

.event-list-full { list-style: none; padding: 0; margin: 0; }
.event-list-full li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.event-date-big { font-weight: 600; color: var(--brand); }

/* ---------- kudos ---------- */
.kudos-mini { list-style: none; padding: 0; margin: 0; }
.kudos-mini li { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.kudos-mini li:last-child { border-bottom: none; }

.kudo-form, .suggestion-form, .kudo-form label, .suggestion-form label, .filters {
  display: flex; flex-direction: column; gap: 4px;
}
.kudo-form, .suggestion-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
  display: grid;
  gap: 14px;
  max-width: 720px;
}
.kudo-form label, .suggestion-form label { display: grid; gap: 4px; }
.checkbox-row { flex-direction: row !important; align-items: center; gap: 8px !important; }

.kudo-feed { list-style: none; padding: 0; margin: 0; }
.kudo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.kudo-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }

/* ---------- quick links ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.quick-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-light);
  color: var(--brand-dark);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.quick-chip:hover { background: var(--brand); color: #fff; text-decoration: none; }
.chip-icon { font-size: 16px; }

/* ---------- directory ---------- */
.filters {
  flex-direction: row !important;
  gap: 10px !important;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filters input[type=search], .filters select {
  flex: 1;
  min-width: 200px;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.person-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.person-photo img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
}
.person-initials {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.person-name { font-weight: 600; }
.person-role { font-size: 13px; color: var(--brand-dark); font-weight: 500; }
.person-dept { font-size: 12px; }
.person-contacts { font-size: 13px; margin-top: 4px; }
.person-fact { font-style: italic; font-size: 13px; margin: 6px 0 0; }

/* ---------- policies ---------- */
.policy-group { margin-bottom: 24px; }
.policy-list { list-style: none; padding: 0; margin: 0; }
.policy-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.policy-title { font-weight: 600; }

/* ---------- onboarding ---------- */
.onboarding-list { list-style: none; padding: 0; counter-reset: step; }
.onboarding-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.step-number {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.step-title { font-weight: 600; margin-bottom: 4px; }

/* ---------- forms + buttons ---------- */
input[type=text], input[type=email], input[type=url], input[type=tel],
input[type=search], input[type=date], input[type=number], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
textarea { resize: vertical; }
label > span { font-size: 13px; color: var(--muted); font-weight: 500; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: var(--brand-light); border-color: var(--brand-light); color: var(--brand-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-google { background: #fff; border: 1px solid #dadce0; color: #3c4043; padding: 12px 18px; font-weight: 500; }

.callout {
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}
.callout-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.callout-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.callout-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ---------- login ---------- */
.login-body {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
.login-brand h1 { margin-top: 12px; }
.login-brand p { color: var(--muted); margin: 4px 0 24px; }
.login-hint { font-size: 13px; color: var(--muted); margin: 16px 0 0; }

/* ---------- admin ---------- */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
@media (max-width: 800px) { .admin-shell { grid-template-columns: 1fr; } }
.admin-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; flex-direction: column; gap: 4px;
  height: fit-content;
}
.admin-sidebar a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}
.admin-sidebar a.active { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.admin-sidebar a:hover { background: var(--bg); text-decoration: none; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-table th { background: var(--bg); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.admin-table tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 6px; }
.inline-form { display: inline; }

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 700px) { .admin-form-grid { grid-template-columns: 1fr; } }
.admin-form-grid .full { grid-column: 1 / -1; }
