:root {
  --green: #32b34c;         /* CFlo brand green — primary */
  --green-hover: #2aa042;
  --green-deep: #1d7a35;    /* headings, emphasis */
  --green-tint: #eaf7ec;
  --amber: #f0b429;
  --red: #e05243;
  --bg: #f0f3ee;            /* same canvas as the emails */
  --ink: #1f2d25;
  --muted: #68766d;
  --line: #e4e9e2;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(30, 60, 40, .08);
  --grad: linear-gradient(120deg, #135029 0%, #1d7a35 45%, #2ea44a 100%);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.55 "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 {
  font-size: 24px; margin: 0; color: var(--green-deep);
  letter-spacing: -.01em; font-weight: 700;
}
h1::after {
  content: ""; display: block; width: 44px; height: 4px;
  background: var(--green); border-radius: 2px; margin-top: 9px;
}
h2 { font-size: 16px; margin: 0; }
h3 { font-size: 15px; margin: 0 0 8px; color: var(--green-deep); }
h4 { margin: 0 0 12px; color: var(--green-deep); font-size: 12px;
     text-transform: uppercase; letter-spacing: .09em; }
.card > h3 {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .09em;
  margin-bottom: 12px;
}
.subtitle { color: var(--muted); margin: 10px 0 24px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.warn { color: var(--red); }

/* ------------------------------------------------ nav — the email header band */
.topnav {
  display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap;
  background: var(--grad); padding: 10px 24px; min-height: 62px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 18px rgba(19, 80, 41, .35);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 36px; display: block; filter: drop-shadow(0 1px 3px rgba(0,0,0,.25)); }
.brand-name {
  font-size: 19px; color: #fff; font-weight: 800; letter-spacing: -.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.brand-name em { font-style: normal; font-weight: 400; color: #b8ecc4; }
.navlinks { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.navlinks a {
  color: rgba(255, 255, 255, .92); padding: 8px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.navlinks a:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.navlinks a.active {
  background: #fff; color: var(--green-deep); font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .22);
}
.navuser { display: flex; gap: 14px; align-items: center; font-size: 13px; white-space: nowrap; }
.navname { font-weight: 700; color: #fff; }
.logout {
  color: rgba(255, 255, 255, .85); display: inline-flex; align-items: center;
  gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .35); font-weight: 600;
}
.logout:hover { background: rgba(255, 255, 255, .15); text-decoration: none; }
.door-icon { width: 15px; height: 15px; }
.fy-select {
  border: none; border-radius: 999px; padding: 7px 12px;
  font: inherit; font-size: 12.5px; background: rgba(255, 255, 255, .95);
  color: var(--green-deep); font-weight: 700;
}
.archive-banner {
  background: #fdf2d0; color: #7a5c0d; padding: 9px 22px; font-size: 13px;
  border-bottom: 1px solid #f0e0aa;
}

.container { max-width: 1420px; margin: 26px auto 40px; padding: 0 22px; }

/* ------------------------------------------------ hero band (dashboard / leader) */
.hero {
  background: var(--grad); border-radius: 20px; color: #fff;
  padding: 28px 30px 24px; margin-bottom: 22px;
  box-shadow: 0 14px 34px rgba(19, 80, 41, .30);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; right: -70px; top: -110px;
  width: 340px; height: 340px; border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.hero::after {
  content: ""; position: absolute; right: 90px; bottom: -140px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255, 255, 255, .05);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.hero h1::after { background: var(--amber); }
.hero .subtitle { color: rgba(255, 255, 255, .88); margin-bottom: 20px; }
.hero .stat-row { margin-bottom: 14px; }
.hero .stat {
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: none; backdrop-filter: blur(6px);
}
.hero .stat-n { color: #fff; }
.hero .stat-l { color: rgba(255, 255, 255, .78); }
.hero .dist-row { color: rgba(255, 255, 255, .92); margin-bottom: 0; }
.hero .hint {
  background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22);
  color: #fff;
}
.hero .leader-head { margin-bottom: 14px; }
.hero .subtitle, .hero .leader-head .subtitle { color: rgba(255, 255, 255, .85); }
.footer { text-align: center; color: #9aa89e; font-size: 11.5px; padding: 20px; }
.ver-chip {
  display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .4); color: rgba(255, 255, 255, .85);
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; vertical-align: middle;
}

/* ------------------------------------------------ cards & stats — email card look */
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.stat {
  background: var(--card); border-radius: var(--radius);
  padding: 13px 20px; text-align: center; min-width: 104px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.stat-n { font-size: 23px; font-weight: 700; color: var(--green); letter-spacing: -.02em; }
.stat-l { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.dist-row { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 16px; font-size: 13px; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 4px; margin: 0 3px -1px 6px; }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red); }
.dot-grey { background: #cfd5d0; }

/* ------------------------------------------------ tables */
.table-scroll { overflow-x: auto; }
.tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
.tbl th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); border-bottom: 2px solid var(--line); padding: 8px;
  white-space: nowrap; background: var(--card); position: sticky; top: 0; font-weight: 700;
}
.tbl td { border-bottom: 1px solid #eef1ec; padding: 9px 8px; vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.num { text-align: center !important; }
.rowlink { cursor: pointer; }
.rowlink:hover td { background: #f4faf4; }

/* ------------------------------------------------ badges & pills — vibrant email chips */
.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap; color: #fff;
}
.badge-lg { font-size: 13px; padding: 6px 16px; }
.badge-OnTrack { background: var(--green); }
.badge-AtRisk { background: var(--amber); }
.badge-OffTrack { background: var(--red); }
.badge-NotScored { background: #c2ccc4; }
.pill {
  display: inline-block; background: var(--green-tint); color: var(--green-deep);
  border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 700;
}
.pill-top { background: #fdf0ce; color: #916708; }
.pill-hidden { background: #fbe4e0; color: #a33a28; }
.pill-tracked { background: #eef0ed; color: #8b978e; font-weight: 600; }
.ceo-tag {
  font-size: 10px; background: var(--green-tint); color: var(--green-deep);
  border-radius: 999px; padding: 2px 8px; vertical-align: middle; font-weight: 700;
}

/* ------------------------------------------------ leader page */
.leader-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.leader-head .subtitle { margin: 6px 0 0; }
.leader-score { display: flex; align-items: center; gap: 14px; }
.hint {
  background: var(--green-tint); border: 1px solid #cdebd3; padding: 10px 15px;
  border-radius: 10px; color: #24603a; font-size: 13px;
}
.obj-card { border-left: 4px solid var(--green); }
.obj-card.is-hidden { opacity: .65; outline: 1px dashed #c9d3ca; }
.obj-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.obj-head h2, .obj-head h3 { flex: 1; color: var(--green-deep); font-size: 15px; }
.kr-tbl td { padding: 6px; }
.kr-code { white-space: nowrap; font-weight: 700; font-size: 12px; }
.top-star { color: var(--amber); margin-right: 2px; }
.upd-count {
  background: var(--green); color: #fff; font-size: 10px; border-radius: 999px;
  padding: 0 6px; margin-left: 4px; vertical-align: middle; font-weight: 700;
}
.kr-desc { min-width: 280px; max-width: 430px; cursor: pointer; }
.kr-desc:hover .kr-d { color: var(--green); }
.kr-d { font-weight: 500; }
.kr-t { color: var(--muted); font-size: 12px; white-space: pre-line; }
.mcol-h, .qcol-h { text-align: center !important; font-size: 9.5px !important; }
.qcol-h { background: #ecf3ec !important; }
.mcell {
  width: 30px; min-width: 30px; height: 30px; cursor: pointer;
  border-left: 1px solid #eef1ec; text-align: center; position: relative;
}
.mcell-lg { width: 44px; min-width: 44px; }
.mcell:hover { outline: 2px solid var(--green-deep); outline-offset: -2px; border-radius: 4px; }
.rag-cell-none { background: #fafcf8; }
.rag-cell-green { background: var(--green); }
.rag-cell-amber { background: var(--amber); }
.rag-cell-red { background: var(--red); }
.cur-month { box-shadow: inset 0 0 0 2px rgba(29, 122, 53, .5); }
.note-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, .95); vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(20, 40, 25, .25);
}
.rag-cell-none .note-dot { background: rgba(20, 40, 25, .45); box-shadow: none; }
.qcell { background: #ecf3ec; text-align: center; min-width: 52px; }
/* quarterly RAG = a colour dot (circle), unmistakably NOT a score box */
.qrag {
  width: 26px; height: 26px; border-radius: 50%; margin: 0 auto;
  border: 2px dashed #b9c6b8; background: transparent !important;
}
.qrag.rag-cell-green { background: var(--green) !important; border: none; }
.qrag.rag-cell-amber { background: var(--amber) !important; border: none; }
.qrag.rag-cell-red { background: var(--red) !important; border: none; }
.qrag:hover { outline: 2px solid var(--green-deep); outline-offset: 1px; }
.score-in {
  width: 48px; text-align: center; border: 1px solid var(--line);
  border-radius: 7px; padding: 4px; font-weight: 700; background: #fff;
}
.score-in:disabled { background: #e7ebe6; color: #99a59c; }
.score-ro { font-weight: 700; }
.score-empty { color: #b6c1b5; font-weight: 400; }
.score-pending {
  color: #a8b3a7; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.score-due {
  color: #916708; background: #fdf0ce; border-radius: 999px; padding: 2px 8px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
.mini-score.mini-due { border-color: var(--amber); color: #916708; background: #fdf0ce; }
/* leaders see their own action (progress log) first in the KR panel */
.modal-cols.log-first #ciSection { order: 2; }
.is-hidden td { opacity: .55; }
.lock-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.lock-item { user-select: none; }

/* ------------------------------------------------ login — the email card itself */
.login-wrap { display: flex; justify-content: center; padding: 54px 0; }
.login-card {
  background: var(--card); border-radius: 16px; width: 410px; overflow: hidden;
  box-shadow: 0 4px 24px rgba(30, 60, 40, .14); padding: 0;
}
.login-head { background: var(--grad); padding: 24px 34px; position: relative; }
.head-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.head-close:hover { background: rgba(255, 255, 255, .3); text-decoration: none; }
.head-close svg { width: 16px; height: 16px; }
.login-head img { height: 46px; display: block; }
.login-body { padding: 26px 34px 30px; }
.login-brand { font-size: 25px; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.login-sub { color: var(--muted); margin: 4px 0 22px; }
.login-note { color: var(--muted); font-size: 12px; margin-top: 16px; }
.otp-in { font-size: 24px; letter-spacing: 12px; text-align: center; font-weight: 700; }
.pw-details {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px 16px;
}
.pw-details .btn { box-shadow: none; }
.pw-details summary {
  cursor: pointer; font-weight: 700; color: var(--green-deep); font-size: 13.5px;
  user-select: none;
}
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--muted);
  padding: 6px; display: flex; align-items: center;
}
.pw-eye:hover { color: var(--green-deep); }
.pw-eye svg { width: 20px; height: 20px; }
.alert {
  background: #fbe4e0; color: #a33a28; padding: 10px 13px; border-radius: 9px;
  margin-bottom: 14px; font-size: 13px;
}
.alert-ok { background: var(--green-tint); color: var(--green-deep); }
.alert-info { background: #fcf0d2; color: #8a6410; }

/* ------------------------------------------------ forms & buttons — email CTA */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
input[type=email], input[type=password], input[type=text], input[type=number],
textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  font: inherit; background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(50, 179, 76, .4); border-color: var(--green);
}
textarea { resize: vertical; }
select { width: auto; }
.inline-in { padding: 6px 9px !important; font-size: 13px; }
.btn {
  background: linear-gradient(120deg, #2aa042, #32b34c); color: #fff;
  border: none; border-radius: 10px;
  padding: 11px 20px; font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 3px 10px rgba(50, 179, 76, .35);
  transition: filter .12s, transform .08s;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-ghost { background: #fff; color: var(--green-deep); border: 1.5px solid var(--green); box-shadow: none; }
.btn-ghost:hover { background: var(--green-tint); filter: none; }
.btn-danger { background: var(--red); box-shadow: 0 3px 10px rgba(224, 82, 67, .3); }
.btn-danger:hover { background: #c8402f; filter: none; }
.btn-danger-ghost { color: var(--red) !important; border-color: #f0b9b1 !important; }
.btn-danger-ghost:hover { background: #fdefec !important; }
.msg { margin-left: 10px; font-size: 13px; color: var(--green-deep); font-weight: 600; }
.toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.btn-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form input[type=text] { max-width: 420px; }
.grid-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px; margin-bottom: 8px;
}
.role-select { font-size: 12.5px; padding: 5px 7px; }

/* ------------------------------------------------ people */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.person-card {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--card); border-radius: var(--radius);
  padding: 16px; color: var(--ink) !important; box-shadow: var(--shadow);
  transition: transform .1s, box-shadow .1s;
}
.person-card:hover {
  text-decoration: none !important; transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(30, 60, 40, .14);
}
.person-card.inactive { opacity: .6; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--green);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0; object-fit: cover;
}
.avatar-sm { width: 32px; height: 32px; font-size: 11px; }
.avatar-lg { width: 60px; height: 60px; font-size: 20px; }
.avatar-nav {
  width: 26px; height: 26px; display: inline-flex; vertical-align: middle;
  margin-right: 6px; border: 2px solid rgba(255, 255, 255, .8);
}
.photo-cell { cursor: pointer; display: inline-block; }
.photo-cell:hover .avatar { outline: 2px solid var(--green); outline-offset: 2px; }
.leader-id, .account-id { display: flex; align-items: center; gap: 16px; }
.person-name { font-weight: 700; }
.person-title { font-size: 12.5px; color: var(--muted); }
.person-rep { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ------------------------------------------------ modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(18, 32, 22, .5); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px;
  overflow-y: auto; backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 16px; width: 900px; max-width: 100%;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28); overflow: hidden;
}
.modal-sm { width: 540px; }
.ka-top {
  display: block; background: #fdf7e3; border: 1px solid #f0e4bb;
  border-radius: 10px; padding: 11px 13px; font-size: 13px; margin-bottom: 12px;
  cursor: pointer; user-select: none;
}
.ka-top input { width: auto; margin-right: 6px; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px; background: var(--grad);
}
.modal-head .pill { background: rgba(255, 255, 255, .95); }
.modal-head .pill-top { background: #ffe9a8; }
.close-btn { background: none; border: none; font-size: 26px; cursor: pointer; color: #fff; line-height: 1; }
.modal-body { padding: 20px 22px; }
.modal-body > h3 { margin-bottom: 6px; color: var(--green-deep); font-size: 16px; }
.target { color: var(--muted); white-space: pre-line; font-size: 13px; margin: 0 0 16px; }
.modal-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 720px) { .modal-cols { grid-template-columns: 1fr; } }
.mcol { min-width: 0; }
.rag-picker { display: flex; gap: 8px; }
.rag {
  width: 36px; height: 30px; border: 2px solid transparent; border-radius: 8px; cursor: pointer;
}
.rag-green { background: var(--green); }
.rag-amber { background: var(--amber); }
.rag-red { background: var(--red); }
.rag-none { background: #fafcf8; border-color: var(--line) !important; color: var(--muted); }
.rag.sel { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(50, 179, 76, .4); }
.rag:disabled { cursor: default; opacity: .55; }
.updates { max-height: 300px; overflow-y: auto; margin-top: 10px; }
.update-item { border-left: 3px solid var(--green); padding: 7px 11px; margin-bottom: 8px; background: #f6fbf5; border-radius: 0 8px 8px 0; }
.update-meta { font-size: 11px; color: var(--muted); }
.link-btn {
  background: none; border: none; padding: 0; margin-left: 8px; cursor: pointer;
  font-size: 11px; color: var(--green-deep); text-decoration: underline;
}
.link-danger { color: var(--red); }
.admin-row { margin-top: 16px; padding-top: 13px; border-top: 1px dashed var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.sub-panel {
  margin-top: 12px; padding: 14px; background: #f5faf4;
  border: 1px solid var(--line); border-radius: 10px;
}
.hidden-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #eef1ec; font-size: 13px;
}
.editable { min-height: 20px; border-bottom: 1px dashed var(--line); outline: none; }
.editable:focus { background: #fbfdf9; }

/* ------------------------------------------------ quarterly entry in KR panel */
.q-section { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.q-grid { display: grid; grid-template-columns: repeat(4, minmax(64px, 1fr)); gap: 12px; max-width: 430px; }
.q-cell { text-align: center; }
.q-cell label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.q-cell input { text-align: center; font-weight: 700; }
.q-cell .qrag { margin: 0 auto; width: 34px; height: 34px; }

/* ------------------------------------------------ mobile KR cards */
.kr-cards { display: none; }
.kr-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 13px;
  margin-bottom: 10px; cursor: pointer; background: #fff;
}
.kr-card:active { background: var(--green-tint); }
.kr-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.kr-card-top .spacer { flex: 1; }
.kr-card-desc { font-size: 13.5px; font-weight: 500; margin-bottom: 9px; line-height: 1.4; }
.kr-card-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mini-dot {
  width: 13px; height: 13px; border-radius: 4px; display: inline-block;
  border: 1px solid #e0e5de;
}
.mini-dot.mini-cur { outline: 2px solid var(--green-deep); outline-offset: 0; }
.mini-q {
  font-size: 10px; font-weight: 700; color: #fff; border-radius: 999px; padding: 3px 8px;
}
.mini-q.rag-cell-none {
  color: #8b978e; background: transparent; border: 1.5px dashed #c2ccc1;
}
.mini-score {
  font-size: 10.5px; font-weight: 700; border: 1.5px solid var(--green);
  color: var(--green-deep); border-radius: 999px; padding: 2px 8px;
}
.meta-label {
  font-size: 9.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; margin-right: 3px;
}
.tap-hint { margin-left: auto; color: var(--green-deep); font-size: 12px; font-weight: 700; }

/* ------------------------------------------------ tablet & mobile */
.table-scroll { -webkit-overflow-scrolling: touch; }

@media (max-width: 1024px) {
  .container { padding: 0 16px; }
  .kr-desc { min-width: 250px; max-width: 340px; }
}

@media (max-width: 760px) {
  .topnav { padding: 8px 12px; gap: 6px 8px; }
  .brand-logo { height: 26px; }
  .brand-name { font-size: 15px; }
  .navlinks { order: 3; flex: 0 0 100%; width: 100%; }
  .navlinks a { padding: 6px 10px; font-size: 12.5px; }
  .navuser { margin-left: auto; gap: 8px; font-size: 12px; }
  .navname { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .logout span { display: none; }           /* icon-only logout on phones */
  .logout { padding: 7px 9px; }
  .fy-select { padding: 5px 8px; font-size: 11px; }
  .archive-banner { padding: 8px 14px; }

  .container { margin: 14px auto 28px; padding: 0 10px; }
  h1 { font-size: 20px; }
  .subtitle { margin: 8px 0 16px; font-size: 13px; }
  .hero { padding: 16px 14px 14px; border-radius: 15px; margin-bottom: 14px; }
  .stat-row { gap: 8px; margin-bottom: 12px; }
  .stat { min-width: 0; flex: 1 1 28%; padding: 9px 8px; }
  .stat-n { font-size: 18px; }
  .stat-l { font-size: 9px; }
  .dist-row { gap: 10px 14px; font-size: 12px; }
  .card { padding: 13px 12px; border-radius: 12px; margin-bottom: 12px; }
  .obj-head { flex-wrap: wrap; }
  .kr-desc { min-width: 200px; max-width: 240px; }
  .kr-t { display: none; }                  /* target hidden on phones — full text in the KR panel */
  .leader-head { gap: 10px; }
  .leader-id { gap: 10px; }
  .avatar-lg { width: 46px; height: 46px; font-size: 16px; }
  .leader-score { width: 100%; }
  .people-grid { grid-template-columns: 1fr; }
  .login-wrap { padding: 20px 0; }
  .login-card { width: 100%; }
  .login-body { padding: 20px 20px 24px; }
  /* KR panel becomes a bottom sheet; the wide table becomes tap cards */
  .kr-cards { display: block; }
  .obj-card .table-scroll { display: none; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 94vh; overflow-y: auto; }
  .modal-body { padding: 14px 14px 26px; }
  .modal-cols { gap: 16px; }
  .rag { width: 52px; height: 40px; }
  .q-grid { max-width: none; }
  .btn-row, .inline-form { gap: 8px; }
  .toolbar { flex-wrap: wrap; gap: 10px; }

  /* prevent iOS focus-zoom: fields must be >=16px on phones */
  input[type=email], input[type=password], input[type=text], input[type=number],
  textarea, select { font-size: 16px; }
  .score-in { width: 44px; font-size: 14px; }
}
