/* Soft light theme: off-white surfaces and dark-grey (not black) text, gentle on the eyes without being dark. */
:root {
  color-scheme: light;
  --bg: #e9eff2; --card: #f8fbfb; --ink: #2b3845; --muted: #607080; --line: #d3dce2;
  --brand: #2a7f66; --brand-ink: #ffffff; --accent: #dff0e8; --warn: #a85c0e; --danger: #b3382e; --chip: #e0e8ed;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, "Segoe UI", sans-serif; }
a { color: var(--brand); }
.top { display: flex; align-items: center; gap: 24px; padding: 10px 20px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand small { font-weight: 400; color: var(--muted); }
.logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--brand); color: var(--brand-ink); }
nav a { margin-right: 6px; padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
nav a.on { background: var(--accent); color: var(--brand); font-weight: 600; }
main { max-width: 1150px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 22px; margin: 0 0 14px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
button, .btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
button.danger { color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
.search { flex: 1 1 260px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover { background: var(--accent); }
.chip { display: inline-block; padding: 1px 8px; margin: 1px 3px 1px 0; border-radius: 99px; background: var(--chip); font-size: 12px; white-space: nowrap; }
.chip.ok { background: var(--accent); color: var(--brand); }
.chip.warn { background: transparent; color: var(--warn); border: 1px dashed var(--warn); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 14px; }
.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 700; background: var(--accent); color: var(--brand); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.editable { cursor: pointer; position: relative; }
.avatar .edit-badge { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 13px; display: grid; place-items: center; opacity: .85; }
.avatar.editable:hover .edit-badge { opacity: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 .full { grid-column: 1 / -1; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label.f input, label.f select, label.f textarea { color: var(--ink); font-size: 15px; }
.certs { display: flex; flex-wrap: wrap; gap: 8px; }
.certs label { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.certs label:has(input:checked) { background: var(--accent); border-color: var(--brand); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.photo img { width: 100%; height: 120px; object-fit: cover; display: block; cursor: zoom-in; }
.photo div { padding: 6px 8px; font-size: 12px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.photo button { padding: 1px 7px; font-size: 12px; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); margin-top: 12px; }
.drop.over { border-color: var(--brand); background: var(--accent); }
/* drop-down you can type in */
.combo { position: relative; }
.combo input { width: 100%; padding-right: 34px; }
.combo-toggle { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 32px; padding: 0; border: 0; border-radius: 0 7px 7px 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; }
.combo-toggle:hover { background: var(--accent); color: var(--brand); }
.combo-menu { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; max-height: 260px; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 22px rgba(43, 56, 69, .18); z-index: 40; }
.combo-opt { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; cursor: pointer; }
.combo-opt:hover, .combo-opt.active { background: var(--accent); }
.combo-empty { padding: 8px 10px; }
.suggest { border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; background: var(--card); max-height: 260px; overflow: auto; }
.suggest button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.suggest button:hover { background: var(--accent); }
.stat { display: inline-block; margin-right: 18px; }
.stat b { font-size: 20px; }
dialog { border: 0; border-radius: 12px; padding: 12px; max-width: 94vw; background: var(--card); }
dialog img { max-width: 90vw; max-height: 80vh; display: block; margin-bottom: 10px; }
dialog::backdrop { background: rgba(43, 56, 69, .4); }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; z-index: 20; }
.row.end { justify-content: flex-end; margin-top: 14px; }
.top .grow { flex: 1; }
.top .me { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 12px; text-align: center; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; background: var(--chip); }
.tag.admin { background: var(--brand); color: var(--brand-ink); }
.tag.pending { background: #f5d98b; color: #4a3500; }
.tag.approved { background: var(--accent); color: var(--brand); }
.tag.denied, .tag.failed { background: #f6d0cd; color: #7a1610; }
.chip.photo { cursor: pointer; }
.chip.photo:hover { outline: 1px solid var(--brand); }
.issues { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 7%, var(--card)); }
.issue { padding: 10px 0; border-top: 1px solid var(--line); }
.issue:first-of-type { border-top: 0; }
.issue h3 { margin: 0 0 2px; font-size: 14px; }
.issue .acts { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.warnbtn { color: var(--warn); border-color: var(--warn); font-weight: 600; }
.mini { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); }
.sbs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.sbs .mini.keep { border-color: var(--brand); background: var(--accent); }
.modal { width: min(640px, 94vw); }
.modal h2 { margin-top: 0; }
.modal textarea, .modal .row input { width: 100%; flex: 1 1 140px; }
.login { max-width: 380px; margin: 8vh auto; }
.login input { width: 100%; margin-bottom: 10px; }
.err { color: var(--danger); min-height: 1.4em; }
.pick { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
@media (max-width: 720px) {
  .sbs { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .top { gap: 10px; padding: 8px 12px; }
  .brand small { display: none; }
}
