/* Giza Follow-up -- its own stylesheet, ERP-calm: one green, generous
   whitespace, tables that read like ledgers. No framework, no inline styles
   (the CSP would not allow them anyway). */

:root {
  --green: #14532e;
  --green-soft: #e7f4ea;
  --ink: #1c2420;
  --muted: #6b7a72;
  --line: #dfe7e2;
  --bg: #f4f7f5;
  --card: #ffffff;
  --bad: #b3261e;
  --bad-bg: #fbe9e7;
  --warn: #9a6b00;
  --warn-bg: #fdf3d7;
  --ok: #14532e;
  --ok-bg: #e2f1e6;
  --focus: #2e7d4f;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin: 0; }
code, .mono { font-family: var(--mono); font-size: 13px; }

.ico { vertical-align: -2px; }

/* ------------------------------------------------------------- chrome --- */

.topbar {
  display: flex; align-items: center; gap: 20px;
  background: var(--green); color: #e7f4ea;
  padding: 0 20px; height: 52px;
  position: sticky; top: 0; z-index: 10;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  color: #fff; font-weight: 650; font-size: 16px; letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.navtabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.navtabs a {
  display: flex; align-items: center; gap: 7px;
  color: #cfe5d6; padding: 6px 12px; border-radius: 8px;
  font-weight: 500; white-space: nowrap;
}
.navtabs a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; text-decoration: none; }
.navtabs a.on { background: rgba(255, 255, 255, 0.16); color: #fff; }

.usermenu { position: relative; }
.usermenu summary {
  display: flex; align-items: center; gap: 7px; cursor: pointer; list-style: none;
  color: #e7f4ea; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
}
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: rgba(255, 255, 255, 0.1); }
.usermenu .menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(20, 40, 28, 0.14);
  min-width: 170px; padding: 6px; display: flex; flex-direction: column;
}
.usermenu .menu a, .usermenu .menu button {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 7px; color: var(--ink);
  background: none; border: 0; font: inherit; text-align: left; cursor: pointer; width: 100%;
}
.usermenu .menu a:hover, .usermenu .menu button:hover { background: var(--green-soft); text-decoration: none; }

.wrap { max-width: 1080px; margin: 26px auto 60px; padding: 0 20px; }
.pagehead { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead .sub { color: var(--muted); font-size: 14px; }
.pagectl { display: flex; gap: 8px; align-items: center; }

/* -------------------------------------------------------------- cards --- */

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 18px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
}
.card-head h2 { display: flex; align-items: center; gap: 8px; color: var(--green); }
.card-aside { color: var(--muted); font-size: 13px; }
.card-body { padding: 14px 18px; }
.card-foot {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 18px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px; background: #fafcfb;
}
.card-body-pad { padding: 14px 18px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- stats --- */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px;
}
.stat .n { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.stat .n.bad { color: var(--bad); }
.stat .n.warn { color: var(--warn); }
.stat .l { color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- tables --- */

.tbl { overflow-x: auto; }
table.rows { width: 100%; border-collapse: collapse; font-size: 14px; }
table.rows th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); font-weight: 600;
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.rows td { padding: 9px 12px; border-bottom: 1px solid #edf2ef; vertical-align: top; }
table.rows tr:last-child td { border-bottom: 0; }
table.rows tr.muted td { color: var(--muted); }
table.rows tr.muted td a { color: var(--muted); }
.nowrap { white-space: nowrap; }
.rowctl { display: inline-flex; gap: 6px; align-items: center; }
tr:hover .rowctl { opacity: 1; }
.rowctl { opacity: 0.35; transition: opacity 120ms; }

/* -------------------------------------------------------------- pills --- */

.pill {
  display: inline-block; padding: 2px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: #eef1ef; color: var(--muted);
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.act { text-transform: capitalize; }
.pill.nodot { font-weight: 500; }

/* -------------------------------------------------------------- forms --- */

input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 14px; cursor: pointer; font-weight: 550;
}
.btn:hover { border-color: var(--focus); text-decoration: none; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: #1a6b3c; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.danger { color: var(--bad); border-color: #e5b6b2; }
.btn.danger:hover { background: var(--bad-bg); }

.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 550; }
.field input, .field select, .field textarea { width: 100%; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 140px; }
.row-end { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

.adddetails { margin: 12px 18px 14px; }
.adddetails summary {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  color: var(--green); font-weight: 550; font-size: 14px;
  padding: 5px 10px; border: 1px dashed var(--line); border-radius: 8px;
  user-select: none;
}
.adddetails summary:hover { border-color: var(--focus); }
.adddetails[open] summary { border-style: solid; margin-bottom: 10px; }
.addform { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.addform input, .addform select { font-size: 14px; }

.filters {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end;
  padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fafcfb;
}
.filters label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 550; }
.filters select, .filters input { font-size: 14px; padding: 5px 8px; }

.inline { display: inline; }
.minlink {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); border: 0; background: none; cursor: pointer;
  padding: 3px; border-radius: 6px;
}
.minlink:hover { color: var(--green); background: var(--green-soft); text-decoration: none; }
.minlink.del:hover { color: var(--bad); background: var(--bad-bg); }

/* ---------------------------------------------------------- feedback --- */

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  border-radius: 10px; padding: 11px 14px; margin-bottom: 16px; font-size: 14px;
}
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.good { background: var(--ok-bg); color: var(--ok); }
.alert.info { background: #e8f0fb; color: #1e4f9c; }
.empty { color: var(--muted); padding: 16px 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green); }

/* ------------------------------------------------------------- content --- */

.comment { padding: 10px 0; border-bottom: 1px solid #edf2ef; }
.comment:last-child { border-bottom: 0; }
.comment-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; display: flex; gap: 8px; align-items: center; }
.comment-meta b { color: var(--ink); font-weight: 600; }
.comment-body { white-space: pre-wrap; word-break: break-word; }
.addcomment { display: flex; gap: 8px; margin-top: 10px; }
.addcomment textarea { flex: 1; min-height: 44px; resize: vertical; }

.attach { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #edf2ef; }
.attach:last-child { border-bottom: 0; }
.attach .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach .sz { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.scorebox { display: flex; align-items: center; gap: 10px; }
.scorebox select { width: auto; }
.score-big { font-size: 24px; font-weight: 700; color: var(--green); }

.credbox {
  background: var(--green-soft); border: 1px solid #cbe3d2; border-radius: 10px;
  padding: 16px 18px; margin-bottom: 14px;
}
.credbox .cred { font-family: var(--mono); font-size: 16px; font-weight: 600; word-break: break-all; }
.qr { display: block; margin: 12px auto; border-radius: 8px; }
.auth-wrap { max-width: 380px; margin: 8vh auto 0; }
.auth-wrap .card { padding: 6px 6px 2px; }
.auth-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 18px; color: var(--green); font-weight: 700; font-size: 18px; }

/* ------------------------------------------------- small utilities --- */
/* Inline style attributes are forbidden by the CSP, so the few layout
   nudges views need live here as classes. */

.narrow { max-width: 640px; }
.mb8 { margin-bottom: 8px; }
.mt6 { margin-top: 6px; }
.mt10 { margin-top: 10px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

.addform.col { flex-direction: column; align-items: stretch; }
.field.checkline {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 550; margin: 4px 0 12px;
}
.field.checkline input { flex: 0 0 auto; }
.filepick { padding: 6px; background: #fafcfb; }
.filemsg { min-height: 18px; }

/* In-card filter tabs (the recurring page's cadence switch). */
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs a { padding: 4px 11px; border-radius: 99px; color: var(--muted); font-size: 13px; font-weight: 550; }
.tabs a:hover { background: var(--green-soft); text-decoration: none; color: var(--green); }
.tabs a.on { background: var(--green-soft); color: var(--green); }

/* The people page's manage menu opens inline in its table cell. */
.usermenu.static { position: static; }
.menu.wide { min-width: 230px; }
.menu .field { margin: 6px 10px; }
.menu .btn.small { margin: 4px 10px 8px; }

.credbox p { margin: 0 0 5px; }
.credbox p:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .brand span { display: none; }
  .navtabs a span { display: none; }
  .navtabs a { padding: 6px 9px; }
  .wrap { margin-top: 16px; padding: 0 12px; }
}

/* --- outlook review page ------------------------------------------------ */
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.inlinerow { display: inline-block; margin-inline-start: 6px; vertical-align: middle; }
