/* ACCG Awards portal. Same look as the Board Nomination Portal (public_html/nomination/assets/style.css). */
[hidden] { display: none !important; }
:root {
  --navy: #0b3b6f; --navy-dark: #072a50; --gold: #c99a2e;
  --text: #1d2733; --muted: #5d6b7a; --line: #d8dee6; --bg: #f4f6f9; --card: #fff;
  --error: #b42318; --error-bg: #fdecea; --ok: #1a7f37; --ok-bg: #e7f5ec; --info-bg: #e8f0fb;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--navy); }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .25rem; color: var(--navy-dark); }
h2 { font-size: 1.25rem; margin: 1.5rem 0 .75rem; color: var(--navy-dark); }
h3 { font-size: 1.05rem; margin: 1rem 0 .5rem; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 24px; padding-bottom: 48px; min-height: 70vh; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; }

.site-header { background: var(--navy); color: #fff; border-bottom: 4px solid var(--gold); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 600; }
.brand img { height: 44px; width: auto; display: block; }
.main-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.main-nav a, .main-nav .link { color: #fff; text-decoration: none; opacity: .9; font-size: .95rem; }
.main-nav a[aria-current] { opacity: 1; border-bottom: 2px solid var(--gold); }
.main-nav a:hover, .main-nav .link:hover { opacity: 1; text-decoration: underline; }
/* Admin side menu */
main.admin-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; position: sticky; top: 16px; }
.admin-nav-title { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; color: var(--muted); font-weight: 600; margin: 4px 8px 6px; }
.admin-nav a { display: block; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--text); }
.admin-nav a:hover { background: var(--bg); }
.admin-nav a[aria-current] { background: var(--info-bg); color: var(--navy-dark); font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
.site-footer { color: var(--muted); font-size: .85rem; padding: 24px 0; border-top: 1px solid var(--line); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; }
.card.narrow { max-width: 480px; margin: 24px auto; }
.card > h2:first-child, .card > .row:first-child h2 { margin-top: 0; }
fieldset.card { min-width: 0; }
legend { font-size: 1.2rem; font-weight: 700; color: var(--navy-dark); padding: 0 6px; margin-left: -6px; }
.page-head { margin-bottom: 20px; }
.page-head.row, .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; color: var(--muted); margin: 0 0 4px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.instructions { background: var(--info-bg); border-radius: var(--radius); padding: 12px 16px; margin-top: 12px; }
details.instructions summary { cursor: pointer; }
details.instructions[open] summary { margin-bottom: 8px; }
.award-page { max-width: 760px; margin: 8px auto 24px; }

label { display: block; font-weight: 600; margin-bottom: 14px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .875rem; }
.req { color: var(--error); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]), select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 11px; font: inherit; font-weight: 400; color: inherit;
  border: 1px solid #b9c3cf; border-radius: 6px; background: #fff;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid rgba(11,59,111,.35); outline-offset: 1px; border-color: var(--navy); }
input.sm { width: 6.5rem; }
input[type=file] { display: block; margin-top: 6px; max-width: 100%; }
.signature-input { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 1.5rem; max-width: 480px; }
.check, .radio { display: inline-flex; align-items: flex-start; gap: 8px; font-weight: 400; margin: 0 0 8px; cursor: pointer; }
.check input, .radio input { margin-top: .3em; width: 1.05rem; height: 1.05rem; flex: none; }
.check-list { display: flex; flex-direction: column; margin-top: 6px; }
.check-list .check, .check-list .radio { display: flex; }
.yn-group { display: inline-flex; gap: 18px; margin-top: 6px; }
.yn-group .radio { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid-2 > label, .grid-3 > label { display: flex; flex-direction: column; }
.grid-2 > label > .label-text, .grid-3 > label > .label-text { flex: 1 0 auto; }
.stack > * { margin-bottom: 14px; }
.stack-inline { display: flex; gap: 6px; margin-top: 8px; }
.stack-inline input { margin: 0; min-width: 0; }
.question { display: block; font-weight: 600; margin-bottom: 4px; }
.question-block { margin-bottom: 20px; }
fieldset.choice-group { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
fieldset.choice-group > legend { font-size: 1rem; color: var(--text); padding: 0; margin: 0 0 2px; }
.word-count { display: block; text-align: right; font-weight: 400; font-size: .85rem; color: var(--muted); }
.word-count.over { color: var(--error); font-weight: 600; }
.upload { padding: 4px 0 0; }
.upload > label { margin-bottom: 4px; }
.current-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.current-file .check { margin: 0; }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }
.has-error > th, .has-error > td { background: var(--error-bg); }
.field-error { display: block; color: var(--error); font-size: .875rem; font-weight: 600; margin-top: 4px; }

.btn { display: inline-block; padding: 9px 16px; font: inherit; font-weight: 600; border-radius: 6px; border: 1px solid #b9c3cf; background: #fff; color: var(--navy-dark); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #eef2f7; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-danger { background: #fff; border-color: var(--error); color: var(--error); }
.btn-sm { padding: 6px 10px; font-size: .875rem; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }
.link:disabled { color: #b9c3cf; cursor: default; text-decoration: none; }
form.inline { display: inline; }
.form-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.danger-zone { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
details.danger-zone summary { cursor: pointer; color: var(--error); font-weight: 600; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.links { margin-top: 16px; font-size: .95rem; }
.share-link h2 { margin-top: 0; }
.share-link .stack-inline input { flex: 1; }
.share-link .stack-inline .btn { flex: none; }

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid transparent; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert-error { background: var(--error-bg); border-color: #f5c2bd; color: #7a1a12; }
.alert-success { background: var(--ok-bg); border-color: #b7e0c4; color: #145c29; }
.alert-info { background: var(--info-bg); border-color: #c4d6f0; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; vertical-align: middle; margin-right: 4px; }
.badge-submitted, .badge-open { background: var(--ok-bg); color: var(--ok); }
.badge-draft, .badge-upcoming { background: #fff4d6; color: #7a5a00; }
.badge-closed, .badge-hidden { background: #e9edf2; color: var(--muted); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; background: var(--card); }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafc; }
.table .num { text-align: right; }
.table td.actions { display: table-cell; white-space: nowrap; }
.table td.actions a, .table td.actions .link { margin-right: 10px; }
.table.compact td { padding: 5px 8px; }
.question-table td.actions .link { font-size: 1.1rem; text-decoration: none; margin-right: 6px; }
.question-table tr.q-heading td { background: #f8fafc; }
.question-table tr.q-hidden td { color: var(--muted); }
.form-order-note { text-align: center; border-style: dashed; padding: 10px; }
.form-order-note p { margin: 0; }
.yn-yes { color: var(--ok); font-weight: 600; }
.filters { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; padding: 14px 16px; }
.filters label { margin: 0; }
.period-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.period-card h3 { margin-top: 0; }
.user-actions summary { cursor: pointer; color: var(--navy); }
.user-actions[open] { min-width: 260px; }
.profile-card { max-width: 640px; }

.report section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 16px; margin-bottom: 16px; }
.report-head { margin-bottom: 16px; }
.report-head p { margin: 4px 0; }
.qa h3 { font-size: 1rem; margin-bottom: 4px; }
.qa p { margin: 0 0 12px; }
.signature { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 1.8rem; margin: 8px 0; }
.file-list { padding-left: 18px; }
.file-list li { margin-bottom: 6px; }
.report-image { margin: 4px 0 8px; }
.report-image img { display: block; max-width: min(100%, 320px); max-height: 400px; height: auto; border-radius: 6px; border: 1px solid var(--line); }

/* Email settings & templates, invitations */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.template-editor { align-items: start; }
.template-editor .card h2:first-child { margin-top: 0; }
.email-preview { background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; padding: 12px; max-height: 420px; overflow: auto; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; white-space: nowrap; }

@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 1.45rem; }
  .card { padding: 16px; }
  .brand span { font-size: .95rem; }
  main.admin-layout { grid-template-columns: 1fr; gap: 16px; }
  .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; padding: 6px; }
  .admin-nav-title { display: none; }
}
@media print {
  body { background: #fff; font-size: 11pt; }
  .no-print, .site-header, .site-footer, .form-actions { display: none !important; }
  main.wrap { padding: 0; max-width: none; }
  main.admin-layout { display: block; }
  .report section { border: 0; border-top: 1px solid #999; border-radius: 0; padding: 0 0 8px; break-inside: avoid-page; }
  .qa { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* County Chairs / Administrative Contacts (admin/contacts.php) */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.stat-value { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.2; color: var(--navy-dark); }
.stat-of { font-size: 1rem; font-weight: 600; color: var(--muted); }
.stat-label { font-size: .85rem; color: var(--muted); }
.stat-warn { border-color: #f0d68a; background: #fffaeb; }
.stat-warn .stat-value { color: #7a5a00; }
details.card > summary { cursor: pointer; font-weight: 700; color: var(--navy-dark); }
details.card[open] > summary { margin-bottom: 14px; }
.import-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 28px; }
.import-grid .instructions { margin-top: 0; }
.radio .hint { margin-top: 1px; }
.form-buttons { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.summary-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.summary-badges .badge { font-size: .85rem; padding: 3px 12px; }
.badge-error { background: var(--error-bg); color: var(--error); }
.row-removed td { color: var(--muted); }
.sub-details { margin-top: 10px; }
.sub-details > summary { cursor: pointer; color: var(--navy); font-size: .9rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .table tbody tr:last-child td { border-bottom: 0; }
.card.flush .empty { margin: 0; padding: 20px; }
.card-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.card-toolbar label { margin: 0; }
.card-toolbar input, .card-toolbar select { margin-top: 0 !important; }
.card-toolbar .grow { flex: 1 1 260px; }
.card-toolbar .count { margin-left: auto; }
.table td.actions .link-danger { color: var(--error); }
.table tbody tr:hover td { background: #fafbfd; }
@media (max-width: 720px) {
  .import-grid { grid-template-columns: 1fr; }
  .card-toolbar .count { margin-left: 0; width: 100%; }
}

/* County electronic signatures */
.badge-awaiting_signature, .badge-pending { background: var(--info-bg); color: var(--navy-dark); }
.badge-signed { background: var(--ok-bg); color: var(--ok); }
.badge-declined { background: var(--error-bg); color: var(--error); }
.badge-cancelled { background: #e9edf2; color: var(--muted); }
.test-banner { background: #fff4d6; border: 1px solid #e0c060; color: #5c4400; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }
.sign-card { border-left: 4px solid var(--gold); }

/* Admin awards overview (admin/index.php) */
.award-card { padding: 18px 20px; }
.award-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 20px; flex-wrap: wrap; }
.award-card-head h2 { margin: 0 0 2px; font-size: 1.2rem; }
.award-card-head h2 a { color: var(--navy-dark); text-decoration: none; }
.award-card-head h2 a:hover { text-decoration: underline; }
.award-card-head h2 .badge { margin-left: 6px; }
.award-card-head p { margin: 0; }
.award-card-head .actions { gap: 8px; }
.award-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.award-stat { display: block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; text-decoration: none; color: inherit; }
.award-stat:hover { border-color: var(--navy); background: var(--info-bg); }
.award-stat .stat-value { font-size: 1.4rem; }
.award-stat.is-waiting { background: var(--info-bg); border-color: #c4d6f0; }
@media (max-width: 720px) {
  .award-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
