/* Carplog fishery portal. Started from the admin panel's tokens and components; since the
   "Design refresh" block at the end (Nov 2026) the portal is styled on its own (customer-facing),
   and the admin keeps its original look. */
:root {
  --bg: #0c1108; --surface: #161e10; --surface2: #1f2a16; --surface3: #283520;
  --border: #364428; --text: #d4cba8; --muted: #8a9070; --dim: #5a6248;
  --accent: #6b8c3e; --accent-bright: #8cb84e; --accent-dim: #3d5222;
  --tan: #c4a060; --danger: #c44a28; --warning: #c4903a; --pb: #d4a020;
  --radius-sm: 6px; --radius: 10px; --radius-lg: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; min-height: 100vh; }
a { color: var(--accent-bright); }
[hidden] { display: none !important; }

/* ── Sign-in screens ───────────────────────────────────────────────────── */
.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 40px; width: 100%; max-width: 400px; }
.login-card .brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.login-card .brand img { width: 30px; height: 30px; border-radius: 7px; }
.ltitle { font-size: 22px; font-weight: 800; color: var(--accent-bright); letter-spacing: 4px; }
.lsub { font-size: 12px; color: var(--muted); text-align: center; letter-spacing: 1px; margin-bottom: 28px; }
.lhead { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.lnote { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 18px; }
.lerr { background: rgba(196,74,40,0.15); border: 1px solid var(--danger); color: var(--danger); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.lok { background: rgba(140,184,78,0.12); border: 1px solid var(--accent); color: var(--accent-bright); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; line-height: 1.5; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 6px; letter-spacing: 0.5px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13px; }
.auth-links button { background: none; border: none; color: var(--accent-bright); cursor: pointer; font-size: 13px; font-family: inherit; padding: 0; }
.auth-foot { margin-top: 22px; font-size: 12px; color: var(--dim); text-align: center; line-height: 1.6; }

/* ── App shell (same structure as the admin) ──────────────────────────── */
.header { background: var(--surface); border-bottom: 2px solid var(--border); padding: 0 20px; height: 54px; position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px; }
.header .wordmark { font-size: 18px; font-weight: 800; color: var(--accent-bright); letter-spacing: 3px; display: flex; align-items: center; gap: 8px; }
.header .wordmark img { width: 24px; height: 24px; border-radius: 6px; }
.header .badge { background: var(--accent-dim); border: 1px solid var(--accent); color: var(--accent-bright); font-size: 11px; padding: 2px 10px; border-radius: 10px; font-weight: 700; white-space: nowrap; }
.lake-switch { display: flex; align-items: center; gap: 8px; margin-left: 12px; min-width: 0; }
.lake-switch .lake-name { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lake-switch select { max-width: 260px; }
.acct-btn { margin-left: auto; height: 32px; border-radius: 16px; background: var(--accent-dim); border: 1px solid var(--accent);
  color: var(--accent-bright); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px 0 10px; font-family: inherit; font-weight: 600; flex-shrink: 0; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: var(--accent-bright); }
.acct-btn .acct-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-as-bar { background: rgba(196,144,58,0.14); border-bottom: 1px solid var(--warning); color: var(--warning); font-size: 13px; padding: 8px 20px; display: flex; align-items: center; gap: 8px; }

.layout { display: flex; align-items: flex-start; }
.sidebar { width: 210px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
  align-self: stretch; min-height: calc(100vh - 54px); position: sticky; top: 54px; padding: 14px 0; display: flex; flex-direction: column; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); font-weight: 700; padding: 16px 16px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 16px; width: 100%; text-align: left;
  background: none; border: none; border-left: 2px solid transparent; color: var(--muted); font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; }
.nav-item i { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item:hover { color: var(--text); background: var(--surface2); }
.nav-item.active { color: var(--accent-bright); border-left-color: var(--accent-bright); background: var(--surface2); }
.sidebar-foot { margin-top: auto; padding: 12px 16px 0; border-top: 1px solid var(--border); font-size: 12px; color: var(--dim); line-height: 1.6; }
.container { flex: 1; min-width: 0; padding: 24px; max-width: 1400px; }
.hamburger { display: none; background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  width: 38px; height: 36px; border-radius: 9px; font-size: 18px; cursor: pointer; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 40; }

@media (max-width: 900px) {
  .header { padding: 0 12px; }
  .header .badge { display: none; }
  .container { padding: 16px; }
  .hamburger { display: inline-flex; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; z-index: 50; width: 240px;
    transform: translateX(-100%); transition: transform 0.22s ease; box-shadow: 2px 0 24px rgba(0,0,0,0.5); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; }
  .acct-btn .acct-name { display: none; }
}
@media (max-width: 560px) {
  .header .wordmark span { display: none; }
  .lake-switch { margin-left: 4px; }
  .lake-switch select { max-width: 170px; }
}

/* ── Shared components (copied from the admin) ─────────────────────────── */
.page-head { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.page-head .sub { font-size: 13px; color: var(--dim); }
.page-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctl { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; height: 32px;
  color: var(--text); font-size: 12px; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ctl:hover { border-color: var(--dim); }
a.ctl { text-decoration: none; }
.ctl.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.ctl.primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); }
select.ctl { width: auto; padding-right: 6px; }
.inp { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 10px 14px; border-radius: 10px; font-size: 14px; outline: none; width: 100%; font-family: inherit; }
.inp:focus { border-color: var(--accent); }
.inp::placeholder { color: var(--dim); }
.btn { padding: 8px 16px; border-radius: 10px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-bright); }
.btn-primary:disabled { opacity: .5; cursor: default; }
.btn-block { width: 100%; padding: 13px; font-size: 15px; margin-top: 6px; }

.subtab-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.subtab-btn { background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: 20px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.subtab-btn:hover { color: var(--text); border-color: var(--dim); }
.subtab-btn.active { background: rgba(140,184,78,0.18); border-color: var(--accent-bright); color: var(--accent-bright); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat-card .label { font-size: 12px; color: var(--muted); font-weight: 500; line-height: 1.3; }
.stat-card .value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.stat-card .value.is-zero { color: var(--muted); }
.stat-card .trend { font-size: 11px; font-weight: 700; color: var(--dim); }
.stat-card .trend.up { color: var(--accent-bright); }
.stat-card .trend.down { color: #e57373; }

.dash-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.dash-row > .stats-panel { margin-bottom: 0; }
@media (max-width: 1100px) { .dash-row { grid-template-columns: 1fr; } }
.stats-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; min-width: 0; }
.stats-panel-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stats-panel-title > i { color: var(--accent-bright); font-size: 16px; }
.stats-panel-title .sub-note { font-size: 12px; color: var(--dim); font-weight: 500; }
.note { font-size: 12.5px; color: var(--dim); line-height: 1.55; }
.note + .note { margin-top: 6px; }
.quality { display: flex; gap: 12px; align-items: flex-start; }
.quality > i { font-size: 20px; color: var(--dim); }
.quality.good > i { color: var(--accent-bright); }
.quality .q-label { font-size: 14px; font-weight: 700; color: var(--text); }
.quality .q-detail { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.quality .q-sample { font-size: 12px; color: var(--dim); margin-top: 6px; }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.mini { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; min-width: 0; }
.mini .k { font-size: 11px; color: var(--dim); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.mini .v { font-size: 18px; font-weight: 700; color: var(--text); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.mini .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Horizontal bars (weight distribution, weather buckets) */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr 44px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-row .bl { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bt { display: block; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.bar-row .bf { display: block; height: 100%; background: var(--accent-bright); border-radius: 4px; }
.bar-row .bf.weak { opacity: .4; }
.bar-row .bn { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.wx-dim + .wx-dim { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.wx-dim h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.wx-dim .note { margin-bottom: 10px; }

/* Ranked lists and chips (swims, baits, rigs) */
.rank { display: flex; flex-direction: column; }
.rank-row { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.rank-row:last-child { border-bottom: none; }
.rank-row .n { color: var(--dim); font-weight: 700; }
.rank-row .name { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rank-row .val { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: var(--text); max-width: 100%; }
.chip b { color: var(--accent-bright); font-variant-numeric: tabular-nums; }

/* Heat strips (catches by day / hour) */
.heat { display: grid; gap: 4px; }
.heat.days { grid-template-columns: repeat(7, 1fr); }
.heat.hours { grid-template-columns: repeat(24, 1fr); }
.heat .cell { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.heat .cnt { font-size: 10px; color: var(--muted); height: 12px; font-variant-numeric: tabular-nums; }
.heat .sq { width: 100%; height: 26px; border-radius: 4px; background: var(--accent-bright); }
.heat .lbl { font-size: 10px; color: var(--dim); }
@media (max-width: 700px) { .heat.hours .lbl:not(.show) { visibility: hidden; } }

.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  border: 1px solid var(--border); color: var(--muted); background: var(--surface2); white-space: nowrap; vertical-align: middle; }
.pill.green  { color: var(--accent-bright); border-color: rgba(140,184,78,0.35); background: rgba(140,184,78,0.10); }
.pill.tan    { color: var(--tan);           border-color: rgba(196,160,96,0.35); background: rgba(196,160,96,0.10); }
.pill.warn   { color: var(--warning);       border-color: rgba(196,144,58,0.40); background: rgba(196,144,58,0.12); }
.pill.danger { color: var(--danger);        border-color: rgba(196,74,40,0.40);  background: rgba(196,74,40,0.12); }

.section { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.section-header { padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-header h2 { font-size: 15px; font-weight: 700; }
.table-scroll { overflow-x: auto; width: 100%; }
table { width: 100%; border-collapse: collapse; }
th { padding: 9px 14px; text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); background: var(--surface2); white-space: nowrap; }
td { padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.muted { color: var(--muted); }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); background: var(--surface2); display: block; cursor: zoom-in; }
.thumb.no-photo { display: flex; align-items: center; justify-content: center; color: var(--dim); cursor: default; font-size: 18px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; font-size: 13px; padding: 18px 20px; }
.kv dt { color: var(--dim); }
.kv dd { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 10px; } }

.empty { text-align: center; padding: 48px 24px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.empty i { display: block; font-size: 30px; color: var(--dim); margin-bottom: 10px; }
.loading { padding: 40px; text-align: center; color: var(--dim); font-size: 13px; }

.menu { position: fixed; z-index: 130; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 4px; box-shadow: 0 12px 32px rgba(0,0,0,0.5); display: none; }
.menu.open { display: block; }
.menu .who { padding: 8px 10px 6px; font-size: 12px; color: var(--dim); border-bottom: 1px solid var(--border); margin-bottom: 4px; overflow-wrap: anywhere; }
.menu .who b { display: block; color: var(--text); font-size: 13px; }
.menu button { display: flex; width: 100%; align-items: center; gap: 9px; background: none; border: none; color: var(--text); font-size: 13px;
  padding: 7px 10px; border-radius: 6px; cursor: pointer; text-align: left; font-family: inherit; }
.menu button:hover, .menu button:focus-visible { background: var(--surface2); outline: none; }
.menu button i { font-size: 15px; color: var(--dim); width: 16px; }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Help articles (our own HTML) */
.help-article p, .help-article ul { font-size: 14px; color: var(--text); line-height: 1.65; margin-bottom: 12px; }
.help-article ul { padding-left: 20px; }
.help-article li { margin-bottom: 6px; }
.help-article strong { color: var(--accent-bright); font-weight: 600; }

/* Dialog (portal) */
.p-modal-bd { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 150; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.p-modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 560px; padding: 22px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.p-modal.wide { max-width: 920px; }
.p-modal h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.p-modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* Fish register */
.fish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.fish-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; cursor: pointer; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.fish-card:hover, .fish-card:focus-visible { border-color: var(--accent); outline: none; }
.fish-card .ph { aspect-ratio: 4 / 3; background: var(--surface2); display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 30px; }
.fish-card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fish-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.fish-card .nm { font-size: 15px; font-weight: 700; color: var(--text); }
.fish-card .nm.unnamed { color: var(--muted); font-style: italic; }
.fish-card .meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-tile { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface2); }
.photo-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; cursor: zoom-in; }
.photo-tile .cap { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; font-size: 12px; color: var(--muted); }
.drop-zone { display: block; border: 2px dashed var(--border); border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); font-size: 14px; cursor: pointer; }
.drop-zone.over, .drop-zone:hover { border-color: var(--accent-bright); color: var(--text); }
.bulk-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 190px 110px 90px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.bulk-row img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; }
.bulk-row .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.bulk-row .st { font-size: 12px; text-align: right; }
.bulk-row .st.ok { color: var(--accent-bright); } .bulk-row .st.err { color: var(--danger); }
@media (max-width: 760px) { .bulk-row { grid-template-columns: 48px minmax(0, 1fr) 1fr; } .bulk-row .fn { grid-column: 2 / 4; } }

/* To identify */
.q-h { font-size: 15px; font-weight: 700; margin: 22px 0 10px; display: flex; gap: 10px; align-items: baseline; }
.q-card .nm { font-size: 17px; }
.q-card .ph { aspect-ratio: 16 / 9; }
.cand:hover:not([disabled]) { border-color: var(--accent) !important; }
details.section > summary { list-style: none; }
details.section > summary::-webkit-details-marker { display: none; }
@media (max-width: 760px) { .id-grid { grid-template-columns: 1fr !important; } }

/* Lake details */
.pf-bar { height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.pf-bar span { display: block; height: 100%; background: var(--accent-bright); border-radius: 4px; }
.pf-items { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pf-item { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.pf-item.done { color: var(--accent-bright); }
.pf-item:hover { color: var(--text); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 14px; }
.pf-grid .field.wide { grid-column: 1 / -1; }
.pf-grid.checks { gap: 8px 14px; }
.pf-grid.checks .field { grid-column: 1 / -1; margin-top: 6px; }
.pf-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.pf-check input { width: 16px; height: 16px; accent-color: var(--accent-bright); }
.pf-nudge { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-size: 13.5px; border-color: rgba(196,144,58,0.5); }
.pf-nudge > i:first-child { font-size: 20px; color: var(--warning); }
.pf-nudge > i:last-child { margin-left: auto; color: var(--dim); }
.pf-nudge:hover { border-color: var(--warning); }

/* Collapsible panels (portal.js enhanceCollapsibles) */
.stats-panel > .stats-panel-title, .section > .section-header { cursor: pointer; user-select: none; }
.coll-btn { margin-left: auto; flex-shrink: 0; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--muted); font-size: 15px; cursor: pointer; }
.coll-btn:hover { color: var(--text); border-color: var(--accent); }
.coll-btn i { transition: transform .15s ease; }
.collapsed .coll-btn i { transform: rotate(-90deg); }
.stats-panel.collapsed > .stats-panel-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.section.collapsed > .section-header { border-bottom: none; }
.stats-panel.collapsed > :not(.stats-panel-title), .section.collapsed > :not(.section-header) { display: none !important; }
.pf-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-chip-x { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 0 0 2px; }
.pf-chip-x:hover { color: var(--danger); }

/* Lake claims made in the app (above the first page) */
.claim-row { padding: 12px 20px; border-top: 1px solid var(--border); }
.section-header + .claim-row { border-top: none; }
.claim-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.claim-top .note { margin-left: auto; }

/* Lake map on Lake details */
.pf-map { display: block; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface2); max-width: 720px; }
.pf-map img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; background: var(--surface2); }
.pf-map.empty { display: flex; align-items: center; justify-content: center; gap: 8px; height: 140px; color: var(--dim); font-size: 13px; }
.pf-map.empty i { font-size: 22px; }

/* Catches page filters (weight / year, as in the app's Gallery) */
.catch-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.catch-filters .ctl { height: 32px; }

/* Weekly catch report */
.wr-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.wr-controls .seg { display: inline-flex; gap: 4px; }
.wr-controls .seg .ctl.on { border-color: var(--accent-bright); color: var(--accent-bright); }
.wr-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.wr-preview canvas { display: block; width: 100%; max-width: 520px; height: auto; border-radius: 12px; border: 1px solid var(--border); }
.wr-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--muted); margin-bottom: 6px; }
.wr-side textarea { width: 100%; font-size: 13px; line-height: 1.5; }
.wr-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
@media (max-width: 760px) { .wr-body { grid-template-columns: 1fr; } }

/* Syndicate overview: tiles in even rows of four (two on narrow screens). */
.stats-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .stats-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Settings: a save bar that stays in view while there are unsaved changes. */
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 0 0 16px;
  background: var(--surface2); border: 1px solid var(--warning); border-radius: 12px; box-shadow: 0 -6px 18px rgba(0,0,0,0.25); }
.savebar .note { color: var(--warning); margin: 0; }
.field .hint { font-size: 12px; color: var(--dim); margin-top: 5px; line-height: 1.45; }
.savebar[hidden] { display: none; }
/* Numbered rule editor (syndicate rules) */
.rule-edit { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rule-edit li { display: flex; align-items: center; gap: 8px; }
.rule-edit .rule-n { flex: 0 0 26px; height: 26px; border-radius: 13px; background: var(--surface2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--text); }
.rule-edit .inp { flex: 1; }

/* ── Design refresh (Nov 2026, dev) ────────────────────────────────────────────
   Layered surfaces instead of outlined boxes, readable muted text (AA contrast on the card colour),
   sentence-case labels, and a serif for figures (catch counts, weights) like an angler's ledger.
   Later rules override the earlier ones on purpose; remove this block to get the old look back. */
:root { --bg: #090e07; --surface: #111a0c; --surface2: #172211; --surface3: #1f2d17;
  --border: rgba(222,214,178,.13); --line: rgba(222,214,178,.075);
  --text: #ece6cd; --muted: #b0b59a; --dim: #8d9376;
  --accent: #86b048; --accent-bright: #9fcb57; --accent-dim: #26361a;
  --tan: #d2ad6a; --danger: #e0654a; --warning: #d9a24a; --ink: #0b1207;
  --shadow-card: 0 1px 0 rgba(255,255,255,.035) inset, 0 12px 30px -16px rgba(0,0,0,.75);
  --serif: Charter, 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; }
body { font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.header { height: 56px; border-bottom: 1px solid var(--line); background: rgba(17,26,12,.92); backdrop-filter: blur(10px); }
.header .wordmark { letter-spacing: .18em; font-size: 17px; }
.header .badge { background: transparent; border-color: var(--border); color: var(--muted); font-weight: 600; }
.acct-btn { background: var(--surface2); border: 1px solid var(--line); color: var(--text); }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: var(--accent); }
.sidebar { background: var(--bg); border-right: 1px solid var(--line); top: 56px; min-height: calc(100vh - 56px); padding: 18px 12px; width: 224px; }
.sidebar nav { gap: 2px; }
.nav-item { border-left: 0; border-radius: 9px; padding: 8px 12px; min-height: 38px; font-weight: 550; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: rgba(159,203,87,.13); color: var(--accent-bright); }
.nav-group-label { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--dim); font-weight: 600; }
.container { padding: 34px 40px 72px; max-width: 1360px; }
.page-head { margin: 0 0 26px; gap: 14px; align-items: flex-end; }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -.028em; line-height: 1.15; }
.page-head .sub { font-size: 14px; color: var(--muted); margin-top: 3px; }
.ctl { background: var(--surface2); border: 1px solid var(--line); border-radius: 9px; height: 34px; padding: 0 13px; font-size: 13px; font-weight: 550; transition: background .15s, border-color .15s; }
.ctl:hover { background: var(--surface3); border-color: var(--border); }
.ctl.primary, .btn-primary { background: var(--accent-bright); color: var(--ink); border-color: transparent; font-weight: 650; }
.ctl.primary:hover, .btn-primary:hover { background: #b3dc72; color: var(--ink); }
.btn { border-radius: 9px; padding: 9px 18px; }
#pfGuide { border-color: rgba(159,203,87,.45); color: var(--accent-bright); }
.inp { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px; transition: border-color .15s, box-shadow .15s; }
.inp:focus { border-color: var(--accent-bright); box-shadow: 0 0 0 3px rgba(159,203,87,.16); }
.inp::placeholder { color: var(--dim); }
.field label { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.subtab-btn { background: var(--surface); border: 1px solid transparent; border-radius: 999px; padding: 8px 15px; font-weight: 600; }
.subtab-btn:hover { background: var(--surface2); border-color: transparent; }
.subtab-btn.active { background: rgba(159,203,87,.15); border-color: transparent; color: var(--accent-bright); }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stats-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card, .stats-panel, .section { background: var(--surface); border: 0; box-shadow: var(--shadow-card); }
.stat-card { border-radius: 14px; padding: 18px 20px 20px; gap: 8px; }
.stat-card .label { font-size: 13px; color: var(--muted); font-weight: 550; }
.stat-card .value { font-family: var(--serif); font-size: clamp(24px, 2.1vw, 30px); font-weight: 600; letter-spacing: -.01em; color: var(--text); overflow: visible; }
.stat-card .trend { font-size: 12px; font-weight: 650; }
.stats-panel { border-radius: 16px; padding: 22px 24px; margin-bottom: 20px; }
.stats-panel-title { font-size: 15px; font-weight: 650; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.stats-panel-title > i { color: var(--accent-bright); }
.stats-panel-title .sub-note { color: var(--muted); }
.dash-row { gap: 20px; margin-bottom: 20px; }
.note { color: var(--muted); font-size: 13px; }
.quality .q-sample { color: var(--dim); }
.mini { background: var(--surface2); border: 0; border-radius: 12px; padding: 14px 16px; }
.mini .k { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mini .v { font-family: var(--serif); font-size: 19px; font-weight: 600; margin-top: 6px; white-space: normal; line-height: 1.25; overflow: visible; text-overflow: clip; }
.section { border-radius: 16px; margin-bottom: 20px; }
.section-header { background: transparent; border-bottom: 1px solid var(--line); padding: 16px 22px; }
th { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); background: transparent; border-bottom: 1px solid var(--line); padding: 11px 16px; }
td { border-bottom: 1px solid var(--line); padding: 11px 16px; }
tbody tr:hover td { background: rgba(255,255,255,.022); }
.coll-btn { background: transparent; border: 0; color: var(--muted); }
.coll-btn:hover { background: var(--surface2); color: var(--text); }
.pf-bar { height: 6px; background: var(--surface3); border-radius: 3px; }
.pf-bar span { background: linear-gradient(90deg, var(--accent), var(--accent-bright)); border-radius: 3px; }
.pf-item { font-size: 13.5px; }
.pf-check { background: var(--surface2); border: 1px solid transparent; border-radius: 10px; }
.pf-check:hover { border-color: var(--border); }
.pf-nudge { border: 0; background: linear-gradient(90deg, rgba(217,162,74,.14), rgba(217,162,74,.04) 60%), var(--surface); box-shadow: var(--shadow-card); }
.pf-map { border: 0; background: var(--surface2); }
.pill { border-color: transparent; }
.rank-row { border-bottom-color: var(--line); }
.chip { background: var(--surface2); border-color: transparent; }
.p-modal { border: 0; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.04) inset; }
.menu { border: 1px solid var(--line); }
.fish-card { background: var(--surface); border: 0; box-shadow: var(--shadow-card); }
.fish-card:hover, .fish-card:focus-visible { box-shadow: 0 0 0 1.5px var(--accent), var(--shadow-card); }
.savebar { border-color: rgba(217,162,74,.5); }
@media (max-width: 900px) { .container { padding: 20px 16px 56px; } .page-head h1 { font-size: 24px; }
  .stats-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sidebar { width: 248px; top: 0; min-height: 100vh; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Sidebar groups and clickable tiles (follow-up to the refresh) */
.nav-group-label { padding: 18px 12px 6px; }
.nav-group-label.nav-role { padding-top: 2px; color: var(--muted); }
button.stat-card { border: 0; color: inherit; font: inherit; width: 100%; transition: background .15s, transform .15s; }
button.stat-card:hover { background: var(--surface2); }
button.stat-card:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { button.stat-card:active { transform: none; } }
/* Long figures (e.g. a time range) wrap inside their tile instead of spilling out of it. */
.stat-card .value { font-size: clamp(20px, 1.65vw, 27px); white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }

/* Guided setup */
.gs-title { font-size: 15px; font-weight: 650; margin: 14px 0 6px; display: flex; align-items: center; gap: 8px; }
.gs-title > i { color: var(--accent-bright); font-size: 18px; }
.gs-left { margin: 0 0 4px 18px; color: var(--text); line-height: 1.7; }
.field-err { color: var(--danger); font-size: 12.5px; margin-top: 6px; }
.inp[aria-invalid="true"] { border-color: var(--danger); }

/* Setup assistant panel (Lake details, dev preview) */
.ai-panel .ai-notice { margin: 0 0 4px 18px; line-height: 1.7; color: var(--text); }
.ai-log { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; padding: 2px 2px 8px; }
.ai-empty { color: var(--muted); font-size: 13px; padding: 4px 0; }
.ai-msg { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.ai-msg.user { align-self: flex-end; align-items: flex-end; }
.ai-bubble { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; background: var(--surface2); }
.ai-msg.user .ai-bubble { background: rgba(159,203,87,.16); }
.ai-wait { color: var(--muted); }
.ai-card { background: var(--surface3); border-radius: 12px; padding: 12px 14px; box-shadow: inset 3px 0 0 var(--accent-bright); }
.ai-card.is-saved { box-shadow: inset 3px 0 0 var(--accent); opacity: .8; }
.ai-card.is-discarded { box-shadow: inset 3px 0 0 var(--dim); opacity: .6; }
.ai-card-title { font-weight: 650; font-size: 14px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.ai-card ul { margin: 0 0 10px 18px; line-height: 1.6; font-size: 13.5px; }
.ai-card-actions { display: flex; gap: 8px; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.ai-form { display: flex; gap: 8px; margin-top: 12px; }
.ai-form .inp { flex: 1; }
