:root {
  --asa-green-950: #0f3b37;
  --asa-green-900: #155149;
  --asa-green-800: #1d695f;
  --asa-green-700: #2d8578;
  --asa-green-100: #dcebe7;
  --asa-green-50: #eff7f4;
  --asa-ink: #18221f;
  --asa-muted: #64726d;
  --asa-line: #d7dfdc;
  --asa-paper: #fff;
  --asa-canvas: #f3f5f2;
  --asa-warm: #f8f5ef;
  --asa-amber: #a26900;
  --asa-red: #b42318;
  --asa-blue: #175cd3;
  --asa-shadow: 0 18px 48px rgba(15, 59, 55, .09);
  --asa-gutter: clamp(18px, 2.6vw, 54px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--asa-ink);
  background: var(--asa-canvas);
  font-family: Inter, Montserrat, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}
button, input { font: inherit; }
button { cursor: pointer; }
.is-hidden { display: none !important; }

.access-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 22px;
  background: radial-gradient(circle at 20% 10%, rgba(45, 133, 120, .22), transparent 32rem), linear-gradient(145deg, #edf4f1, #f7f4ee);
}
.access-card {
  width: min(430px, 100%);
  padding: 38px;
  border: 1px solid rgba(21, 81, 73, .13);
  border-radius: 24px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 28px 80px rgba(15, 59, 55, .18);
}
.access-card > img { display: block; width: 74px; height: 74px; margin-bottom: 22px; object-fit: contain; }
.access-card h1 { margin: 3px 0 8px; color: var(--asa-green-950); font-size: 2.15rem; line-height: 1.08; }
.access-intro { margin: 0 0 25px; color: var(--asa-muted); }
.access-card label { display: grid; gap: 7px; font-size: .84rem; font-weight: 800; }
.access-card input {
  width: 100%;
  min-height: 46px;
  margin: 7px 0 10px;
  padding: 10px 12px;
  border: 1px solid #b8c5c0;
  border-radius: 9px;
  outline: none;
}
.access-card input:focus { border-color: var(--asa-green-700); box-shadow: 0 0 0 3px rgba(45, 133, 120, .14); }

.button {
  min-height: 43px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 800;
  transition: transform .15s, background .2s, opacity .2s;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .62; transform: none; }
.button.primary { color: #fff; background: var(--asa-green-800); }
.button.primary:hover { background: var(--asa-green-950); }
.button.link { color: var(--asa-green-700); background: transparent; }
.button.full { width: 100%; margin-top: 6px; }
.form-feedback { margin: 8px 0; padding: 10px 12px; border-radius: 8px; font-size: .86rem; font-weight: 700; }
.form-feedback.error { color: #9b1c13; background: #fee4e2; }
.form-feedback.success { color: #176b50; background: #d9f4e8; }

.eyebrow { margin: 0; color: var(--asa-green-700); font-size: .74rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.app-shell { min-height: 100vh; }
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 68px;
  padding: 9px var(--asa-gutter);
  border-bottom: 1px solid rgba(21, 81, 73, .14);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}
.back-link { color: var(--asa-green-900); font-weight: 800; text-decoration: none; }
.brand-title { display: flex; align-items: center; gap: 11px; }
.brand-logo { display: block; width: 42px; height: 42px; object-fit: contain; }
.brand-title div { display: grid; line-height: 1.15; }
.brand-title span { color: var(--asa-muted); font-size: .72rem; }
.icon-button { justify-self: end; padding: 8px 12px; border: 1px solid var(--asa-line); border-radius: 9px; color: var(--asa-green-900); background: #fff; font-weight: 800; }

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  padding: 50px var(--asa-gutter) 54px;
  color: #fff;
  background: linear-gradient(120deg, var(--asa-green-950), var(--asa-green-800));
}
.hero h1 { margin: 8px 0 9px; font-size: clamp(2rem, 3.7vw, 3.45rem); line-height: 1.05; }
.hero p:not(.eyebrow) { max-width: 760px; margin: 0; color: #d7e8e4; }
.hero .eyebrow { color: #a8d8ce; }
.hero-summary { display: grid; min-width: 250px; padding: 20px 23px; border: 1px solid rgba(255,255,255,.24); border-radius: 16px; background: rgba(255,255,255,.09); }
.hero-summary span { font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.hero-summary strong { margin: 2px 0; font-size: 1.55rem; }
.hero-summary small { color: #cfe1dd; }

.content-shell { width: 100%; padding: 42px var(--asa-gutter) 78px; }
.section-heading, .panel-heading, .detail-title-row { display: flex; justify-content: space-between; gap: 24px; }
.section-heading { align-items: end; margin-bottom: 20px; }
.section-heading h2, .detail-heading h2 { margin: 4px 0 0; color: var(--asa-green-950); font-size: clamp(1.65rem, 3vw, 2.45rem); }
.result-count, .panel-badge { padding: 7px 12px; border-radius: 999px; color: var(--asa-green-800); background: var(--asa-green-100); font-size: .76rem; font-weight: 900; white-space: nowrap; }

.meeting-list { display: grid; gap: 13px; }
.meeting-card {
  display: grid;
  grid-template-columns: 130px minmax(280px, 1fr) auto auto;
  gap: 22px;
  align-items: center;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--asa-line);
  border-radius: 16px;
  color: inherit;
  background: var(--asa-paper);
  box-shadow: 0 8px 28px rgba(15, 59, 55, .05);
  text-align: left;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.meeting-card:hover { transform: translateY(-2px); border-color: #9dbab3; box-shadow: var(--asa-shadow); }
.meeting-card:focus-visible { outline: 3px solid rgba(45, 133, 120, .28); outline-offset: 3px; }
.meeting-card[aria-expanded="true"] {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13), 0 14px 34px rgba(30, 64, 175, .12);
}
.meeting-card[aria-expanded="true"] .meeting-date,
.meeting-card[aria-expanded="true"] .meeting-date.is-upcoming { background: linear-gradient(145deg, #1d4ed8, #3b82f6); }
.meeting-card[aria-expanded="true"] .meeting-kicker,
.meeting-card[aria-expanded="true"] .meeting-open-text { color: #1d4ed8; }
.meeting-card[aria-expanded="true"] .meeting-open-text b { transform: rotate(90deg); }
.meeting-date { display: grid; place-items: center; align-content: center; min-height: 116px; color: #fff; background: var(--asa-green-800); }
.meeting-date b { font-family: Georgia, serif; font-size: 2.45rem; line-height: 1; }
.meeting-date small { margin-top: 5px; font-weight: 700; }
.meeting-date.is-upcoming { background: linear-gradient(145deg, #8a5b00, #b67a09); }
.meeting-main { display: grid; gap: 3px; }
.meeting-main strong { color: var(--asa-green-950); font-family: Georgia, serif; font-size: 1.32rem; }
.meeting-main small { color: var(--asa-muted); }
.meeting-kicker { color: var(--asa-green-700); font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.meeting-status { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; color: #176b50; background: #e0f3ea; font-size: .8rem; font-weight: 800; }
.meeting-status i { width: 8px; height: 8px; border-radius: 50%; background: #21966f; }
.meeting-status.is-planned { color: #7a5000; background: #fff0c7; }
.meeting-status.is-planned i { background: #d89512; }
.meeting-open-text { display: flex; align-items: center; gap: 9px; padding-right: 25px; color: var(--asa-green-800); font-weight: 800; }
.meeting-open-text b { font-size: 1.55rem; transition: transform .2s ease; }

.meeting-detail { grid-column: 1 / -1; margin: 2px 0 18px; scroll-margin-top: 92px; }
.detail-heading { padding: 26px 28px; border: 1px solid var(--asa-line); border-radius: 16px 16px 0 0; background: #fff; }
.back-to-list { padding: 0; border: 0; color: var(--asa-green-800); background: transparent; font-weight: 800; }
.detail-title-row { align-items: end; margin-top: 22px; }
.detail-title-row p:not(.eyebrow) { margin: 5px 0 0; color: var(--asa-muted); }
.detail-meta { display: grid; min-width: 230px; padding: 13px 15px; border-left: 4px solid var(--asa-green-700); background: var(--asa-green-50); }
.detail-meta span { color: var(--asa-muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-meta strong { color: var(--asa-green-950); }
.detail-meta--planned { border-left-color: #d89512; background: #fff8e6; }

.detail-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-right: 1px solid var(--asa-line); border-left: 1px solid var(--asa-line); background: #fff; }
.detail-tab { min-height: 62px; padding: 12px 18px; border: 0; border-right: 1px solid var(--asa-line); color: #4b5b56; background: #fff; font-weight: 850; }
.detail-tab:last-child { border-right: 0; }
.detail-tab span { margin-right: 7px; color: #8a9793; font-size: .74rem; }
.detail-tab.is-active { color: #fff; background: var(--asa-green-800); }
.detail-tab.is-active span { color: #cfe7e1; }
.detail-tabs--two { grid-template-columns: repeat(2, 1fr); }

.detail-panel { padding: 30px 28px 34px; border: 1px solid var(--asa-line); border-radius: 0 0 16px 16px; background: #fff; box-shadow: var(--asa-shadow); }
.panel-heading { align-items: end; margin-bottom: 18px; }
.panel-heading h3 { margin: 4px 0 0; color: var(--asa-green-950); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 500; }
.panel-intro { max-width: 1100px; margin: -6px 0 20px; color: var(--asa-muted); }
.info-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; border: 1px solid var(--asa-line); border-radius: 11px; overflow: hidden; }
.info-strip span { display: grid; gap: 3px; padding: 13px 16px; border-right: 1px solid var(--asa-line); }
.info-strip span:last-child { border-right: 0; }
.info-strip b { color: var(--asa-muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }

.table-wrap { width: 100%; overflow: auto; border: 1px solid #ccd7d3; border-radius: 12px; background: #fff; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .83rem; }
.data-table th, .data-table td { padding: 12px 13px; border-right: 1px solid #d8e0dd; border-bottom: 1px solid #d8e0dd; vertical-align: top; text-align: left; }
.data-table th:last-child, .data-table td:last-child { border-right: 0; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table thead th { position: sticky; top: 0; z-index: 2; color: #fff; background: var(--asa-green-900); font-size: .72rem; letter-spacing: .025em; }
.data-table tbody tr:nth-child(even) td { background: #fbfaf7; }
.data-table tbody tr:hover td { background: #f1f7f5; }
.participant-table { min-width: 920px; }
.participant-table th:first-child, .participant-table td:first-child { width: 58px; text-align: center; }
.presence-badge, .signature-state, .status-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: .72rem; font-weight: 850; white-space: nowrap; }
.presence-badge { color: #176b50; background: #e0f3ea; }
.signature-state { color: #6b4d00; background: #fff1c7; }
.signature-state.is-signed { color: #176b50; background: #e0f3ea; }
.privacy-note { margin-top: 17px; padding: 13px 15px; border-left: 4px solid var(--asa-green-700); color: #4f625c; background: var(--asa-green-50); font-size: .84rem; }
.empty-state { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 190px; padding: 30px; border: 1px dashed #aebdb8; border-radius: 12px; color: var(--asa-muted); background: #fafbf9; text-align: left; }
.empty-state > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: var(--asa-green-800); background: var(--asa-green-100); font-size: 1.55rem; }
.empty-state strong { display: block; color: var(--asa-green-950); font-size: 1.05rem; }
.empty-state p { margin: 4px 0 0; }

.protocol-table { min-width: 1580px; table-layout: fixed; }
.protocol-table th:nth-child(1) { width: 52px; }
.protocol-table th:nth-child(2) { width: 185px; }
.protocol-table th:nth-child(3) { width: 235px; }
.protocol-table th:nth-child(4) { width: 250px; }
.protocol-table th:nth-child(5) { width: 170px; }
.protocol-table th:nth-child(6) { width: 135px; }
.protocol-table th:nth-child(7) { width: 115px; }
.protocol-table th:nth-child(8) { width: 235px; }
.protocol-table td:first-child { text-align: center; font-weight: 900; }
.status-badge.is-done { color: #176b50; background: #dff3ea; }
.status-badge.is-open { color: #a13327; background: #fee4e2; }
.status-badge.is-paused { color: #5d6570; background: #e9ecef; }
.status-badge.is-planned { color: #175c9b; background: #dceeff; }

@media (max-width: 900px) {
  .app-header { grid-template-columns: 1fr auto; }
  .brand-title { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 38px; }
  .hero-summary { min-width: 0; }
  .meeting-card { grid-template-columns: 95px 1fr; gap: 15px; }
  .meeting-date { grid-row: span 2; min-height: 132px; }
  .meeting-status { justify-self: start; }
  .meeting-open-text { display: none; }
  .detail-title-row { align-items: stretch; flex-direction: column; }
  .detail-meta { min-width: 0; }
  .detail-tabs { grid-template-columns: 1fr; }
  .detail-tab { border-right: 0; border-bottom: 1px solid var(--asa-line); text-align: left; }
  .detail-tab:last-child { border-bottom: 0; }
  .info-strip { grid-template-columns: 1fr; }
  .info-strip span { border-right: 0; border-bottom: 1px solid var(--asa-line); }
  .info-strip span:last-child { border-bottom: 0; }
}

@media (max-width: 600px) {
  .access-card { padding: 28px 22px; }
  .content-shell { padding-right: 12px; padding-left: 12px; }
  .section-heading, .panel-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .meeting-card { grid-template-columns: 78px 1fr; }
  .meeting-date { min-height: 142px; }
  .meeting-date b { font-size: 2rem; }
  .meeting-main { padding-right: 10px; }
  .meeting-main strong { font-size: 1.08rem; }
  .detail-heading, .detail-panel { padding: 22px 15px; }
}

@media print {
  body { color: #000; background: #fff; }
  .no-print, .hero, .meeting-list-section { display: none !important; }
  .content-shell { padding: 0; }
  .meeting-detail { display: block !important; margin: 0; }
  .detail-heading, .detail-panel { padding: 12px 0; border: 0; box-shadow: none; }
  .detail-panel[hidden] { display: none !important; }
  .table-wrap { overflow: visible; border-color: #777; }
  .data-table { min-width: 0; font-size: 8pt; }
  .data-table thead th { position: static; color: #000; background: #ddd !important; }
  .data-table th, .data-table td { padding: 5px; border-color: #777; }
}
