:root {
  color-scheme: light;
  --ink: #192922;
  --muted: #56675f;
  --brand: #225b43;
  --brand-dark: #184431;
  --canvas: #f4f6f0;
  --paper: #fff;
  --edge: #dce4dc;
  --rose: #8d303c;
  --rose-soft: #fce9eb;
  --green-soft: #e4f3e9;
  --radius: 18px;
  font-family: 'Aptos', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.5; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
button,input,select,textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #538c70; outline-offset: 3px; }
h1,h2,p { margin: 0; }
h1 { font-size: clamp(2.05rem, 5vw, 3.25rem); line-height: 1.06; letter-spacing: -.055em; }
h2 { font-size: 1.16rem; line-height: 1.2; letter-spacing: -.022em; }
.site-header { background: #fdfefb; border-bottom: 1px solid var(--edge); }
.header-inner { max-width: 1250px; padding: 15px 26px; margin: auto; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.63rem; font-weight: 650; letter-spacing: -.07em; line-height: .83; text-decoration: none; }
.mark { display: grid; height: 38px; width: 38px; place-items: center; border-radius: 13px; background: #d9ecdd; color: var(--brand-dark); font-size: 1.43rem; letter-spacing: 0; }
.brand-sub { display: block; font-size: .46rem; letter-spacing: .28em; font-weight: 750; margin-top: 6px; }
.header-inner nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; justify-content: end; font-size: .85rem; }
.header-inner nav a, .text-button { text-decoration: none; color: var(--brand-dark); font-weight: 650; }
.text-button { border: 0; background: none; padding: 0; }
.shell { width: min(calc(100% - 48px), 1200px); margin: 0 auto; padding: 42px 0 70px; }
.public-shell { width: min(calc(100% - 48px), 935px); }
.eyebrow { color: var(--brand-dark); font-size: .73rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 750; margin-bottom: 9px; }
.intro { padding: 42px 38px; background: #dceede; border: 1px solid #d2e4d4; border-radius: 26px; }
.intro h1 { font-size: clamp(2.15rem, 6vw, 4.2rem); }
.intro > p:last-child, .form-intro > p:last-child, .admin-intro > p:last-child, .detail-head p:last-child { color: var(--muted); margin-top: 11px; }
.roles { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-top: 18px; }
.role-card { text-decoration: none; display: flex; justify-content: space-between; align-items: flex-end; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--radius); padding: 23px; color: var(--ink); }
.role-card:hover { border-color: #82a891; }
.role-card h2 { font-size: 1.65rem; margin-top: 12px; }
.role-card p { margin-top: 4px; color: var(--muted); }
.circle-arrow { display: grid; place-items: center; border: 1px solid var(--edge); border-radius: 50%; width: 36px; height: 36px; color: var(--brand); }
.home-footer { margin-top: 23px; font-size: .92rem; }
.panel,.form-section { border-radius: var(--radius); border: 1px solid var(--edge); background: var(--paper); }
.message,.login { max-width: 530px; margin: 24px auto; padding: 35px; }
.message h1,.login h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
.message p { color: var(--muted); margin-top: 12px; }
.message .button { margin-top: 22px; }
.message-mark { display: grid; place-items: center; height: 45px; width: 45px; border-radius: 15px; margin-bottom: 18px; background: var(--green-soft); color: var(--brand-dark); font-size: 1.3rem; }
.reference { display: block; margin-top: 16px; font-family: ui-monospace, Consolas, monospace; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 41px; background: var(--brand); color: white; border: 1px solid transparent; border-radius: 10px; padding: 9px 15px; font-size: .87rem; line-height: 1.18; font-weight: 680; text-decoration: none; text-align: center; }
.button:hover { background: var(--brand-dark); }
.button.secondary { background: var(--paper); border-color: #cad8cf; color: var(--brand-dark); }
.button.secondary:hover { background: #edf4eb; }
.application { max-width: 750px; margin: auto; }
.form-intro,.admin-intro { margin-bottom: 24px; }
.form-section { padding: 22px; margin: 0 0 14px; min-width: 0; }
.form-section h2 { margin-bottom: 14px; }
.hint { font-size: .87rem; color: var(--muted); }
.form-section .hint { margin: -7px 0 14px; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.field-wide { grid-column: 1 / -1; }
.field label,.login label,.filters label,.status-form label { display: block; font-size: .87rem; font-weight: 680; margin-bottom: 5px; }
.asterisk,.error-text { color: var(--rose); }
.error-text { display: block; font-size: .82rem; margin-top: 5px; }
input:not([type=checkbox]),select,textarea { min-width: 0; width: 100%; padding: 9px 11px; min-height: 41px; color: var(--ink); background: var(--paper); border: 1px solid #cdd9d1; border-radius: 9px; }
textarea { display: block; resize: vertical; }
input[aria-invalid=true],textarea[aria-invalid=true] { border-color: #ae5360; }
.upload { position: relative; display: flex; min-height: 45px; align-items: center; padding: 8px 12px; border: 1px dashed #a6bfae; border-radius: 10px; color: var(--brand-dark); background: #f8fbf7; }
.upload:focus-within { outline: 3px solid #538c70; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-submit { margin-top: 22px; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: .91rem; max-width: 630px; }
.consent input { margin: 4px 0 0; width: 17px; height: 17px; accent-color: var(--brand); flex: 0 0 17px; }
.form-submit .button { margin-top: 19px; }
.notice { border-radius: 10px; margin: 0 0 15px; padding: 10px 13px; }
.danger { color: var(--rose); background: var(--rose-soft); }
.open { color: #225a3c; background: var(--green-soft); }
.new { color: #7a501f; background: #fcf0db; }
.neutral { color: #45564e; background: #edf1ee; }
.pill { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: .75rem; font-weight: 720; white-space: nowrap; }
.login form { margin-top: 22px; display: grid; }
.login input { margin-bottom: 15px; }
.login .notice { margin: 15px 0 0; }
.login .button { justify-self: start; }
.admin-roles { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.admin-card { padding: 17px; }
.card-title,.data-title { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.card-number { font-size: 2.15rem; font-weight: 720; line-height: 1; margin-top: 16px; letter-spacing: -.055em; }
.admin-card .hint { margin: 4px 0 12px; }
.copy-group { display: flex; gap: 5px; }
.copy-group input { font-size: .73rem; }
.copy-group button { white-space: nowrap; font-size: .76rem; padding-inline: 8px; }
.role-action { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.role-action a { font-size: .78rem; }
.role-action .button { min-height: 36px; font-size: .78rem; padding-inline: 10px; }
.data-title,.filters { padding: 18px 19px; }
.data-title span { color: var(--muted); font-size: .87rem; }
.filters { display: grid; grid-template-columns: minmax(140px,2fr) repeat(3,minmax(100px,1fr)) auto; gap: 9px; align-items: end; padding-top: 0; }
.filters label { display: grid; gap: 4px; margin: 0; }
.filters input,.filters select { font-weight: 450; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .87rem; }
th,td { padding: 11px 14px; border-bottom: 1px solid var(--edge); vertical-align: top; overflow-wrap: anywhere; }
th { font-weight: 700; }
thead th { background: #eff4ee; white-space: nowrap; }
tbody tr:last-child td,tbody tr:last-child th { border-bottom: 0; }
tr:hover td { background: #f9fbf8; }
.row-title { font-weight: 680; }
td small { display: block; color: var(--muted); margin-top: 4px; }
td.archive-red { background: var(--rose-soft); }
.empty,.pagination { padding: 18px 20px; color: var(--muted); }
.pagination,.pagination div { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.back { display: inline-block; margin-bottom: 13px; }
.detail-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.status-form { display: flex; gap: 10px; align-items: center; padding: 14px 17px; margin-bottom: 14px; flex-wrap: wrap; }
.status-form label { margin: 0; }
.status-form select { width: auto; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; align-items: start; }
.detail-section { padding: 18px; }
.detail-section dl { margin-bottom: 0; }
.detail-section dl div { display: grid; grid-template-columns: minmax(100px,1fr) minmax(0,1.3fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--edge); }
.detail-section dl div:last-child { border: 0; }
dt { color: var(--muted); font-size: .86rem; }
dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
details { margin-top: 10px; }
summary { cursor: pointer; }
.history { padding-left: 18px; }
@media (max-width: 920px) {
  .admin-roles { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .filters label:first-child { grid-column: span 2; }
}
@media (max-width: 580px) {
  .header-inner { padding-inline: 15px; }
  .header-inner nav { gap: 10px; font-size: .77rem; }
  .shell,.public-shell { width: calc(100% - 28px); padding-top: 28px; }
  .intro,.message,.login { padding: 23px; }
  .roles { gap: 8px; }
  .role-card { padding: 13px; }
  .role-card h2 { font-size: 1.35rem; }
  .role-card p { font-size: .82rem; }
  .circle-arrow { display: none; }
  .fields,.detail-grid { grid-template-columns: 1fr; }
  .form-section { padding: 16px; }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-card { padding: 11px; }
  .admin-roles { gap: 8px; }
  .role-action { align-items: flex-start; flex-direction: column; }
  .data-title,.filters { padding-inline: 12px; }
}
