
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #182026; background: #f4f5f0; }
button, .button { border: 0; background: #1f6f5b; color: white; padding: 10px 14px; border-radius: 6px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 38px; }
button.secondary, .button.secondary { background: #d9ded6; color: #182026; }
input { width: 100%; border: 1px solid #c5cbc2; border-radius: 6px; padding: 10px; font: inherit; background: white; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: #3d4841; }
h1, h2 { margin: 0 0 18px; letter-spacing: 0; }
.portal, .login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.portal { position: relative; overflow: hidden; background: #26312b url('/assets/portal-bg.png') center / cover no-repeat; }
.portal::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,24,20,.58), rgba(14,24,20,.26) 48%, rgba(14,24,20,.5)), linear-gradient(0deg, rgba(14,24,20,.22), rgba(255,255,255,.08)); }
.portal .panel { position: relative; z-index: 1; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); }
.panel { background: white; border: 1px solid #d9ded6; border-radius: 8px; padding: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.narrow { width: min(100%, 380px); display: grid; gap: 14px; }
.error { color: #9d1d1d; background: #ffe8e8; border-radius: 6px; padding: 10px; margin: 0; }
.success { color: #1f6f5b; background: #e5f5ef; border-radius: 6px; padding: 10px; margin: 0; }
.topbar { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: #182026; color: white; }
.admin { padding: 24px; display: grid; gap: 18px; }
.metrics { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.metric { background: #ffffff; border: 1px solid #d9ded6; border-radius: 8px; padding: 14px; display: grid; gap: 6px; }
.metric span { color: #5f6b63; font-size: 12px; }
.metric strong { font-size: 24px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.tabs { display: inline-flex; border: 1px solid #c5cbc2; border-radius: 8px; overflow: hidden; }
.tabs a { padding: 9px 13px; color: #26312b; text-decoration: none; background: #f5f7f2; font-weight: 700; }
.tabs a.active { background: #1f6f5b; color: white; }
.inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.inline label { width: 150px; }
.table { display: grid; border-top: 1px solid #e2e5df; }
.row { display: grid; grid-template-columns: 120px 130px 145px minmax(170px, 1fr) 145px minmax(210px, 1fr) 250px 90px; gap: 12px; align-items: center; border-bottom: 1px solid #e2e5df; padding: 10px 0; }
.row.head { color: #5f6b63; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.accounting-table { display: grid; border-top: 1px solid #e2e5df; }
.acct-row { display: grid; grid-template-columns: 150px 130px 130px 130px minmax(180px, 1fr) 90px 90px 100px; gap: 12px; align-items: center; border-bottom: 1px solid #e2e5df; padding: 10px 0; }
.acct-head { color: #5f6b63; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.warn { color: #9d1d1d; }
.compact { display: grid; grid-template-columns: 1fr 1fr 48px; gap: 6px; }
.compact input { min-width: 0; }
.comment-form { display: grid; grid-template-columns: 1fr 48px; gap: 6px; }
.danger { background: #a83232; margin-top: 6px; width: 100%; }
.empty { color: #5f6b63; margin: 18px 0 0; }
@media (max-width: 980px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row, .row.head { grid-template-columns: 1fr; gap: 6px; }
  .acct-row, .acct-head { grid-template-columns: 1fr; gap: 6px; }
  .row.head { display: none; }
  .acct-head { display: none; }
}
