:root{
  --navy: #262452;
  --navy-deep: #262452;
  --navy-light: #262452;
  --burgundy: #941730;
  --burgundy-light: #b8253f;
  --burgundy-dark: #6e1024;
  --gold: #AD832F;
  --gold-light: #c9a250;
  --gold-pale: #e8d6ab;
  --paper: #faf8f4;
  --paper-dim: #f1ede4;
  --ink: #201f36;
  --ink-soft: #55536f;
  --line: rgba(38,36,82,0.14);
  --white: #ffffff;
  --ok: #2f6b4f;
  --shadow-lg: 0 24px 60px -20px rgba(26,25,56,0.45);
  --shadow-md: 0 10px 30px -12px rgba(26,25,56,0.35);
  --radius: 14px;
  --radius-sm: 8px;
  --font-display: "Resonay Solid", serif;
  --font-serif: "Resonay Solid", serif;
  --font-body: "Rapor", sans-serif;
}

  @font-face {
    font-family: "Resonay Solid";
    src: url("fonts/resonay-solid.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
  }
  @font-face {
    font-family: "Rapor";
    src: url("fonts/rapor-regular.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
  }

*,*::before,*::after{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img{ max-width:100%; display:block; }
button{ font-family: inherit; }
a{ color: inherit; }
::selection{ background: var(--gold-pale); }

/* focus visibility */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.eyebrow{
  font-family: var(--font-body);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
}

/* ===================== App shell / topbar ===================== */
.app-shell{ min-height:100vh; display:flex; flex-direction:column; }

.topbar{
  background: var(--navy);
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky; top:0; z-index: 40;
}
.topbar-inner{
  max-width: 1180px; margin:0 auto; padding: 10px 24px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.brand{ display:flex; align-items:center; gap:12px; text-decoration:none; }
.brand img{ height: 70px; width:auto; }
.brand-text{ display:flex; flex-direction:column; line-height:1.15; }
.brand-text .name{ font-family: var(--font-display); font-weight:600; font-size: 16px; color:#fff; letter-spacing:.01em; }
.brand-text .sub{ font-size: 10.5px; letter-spacing:.14em; text-transform:uppercase; color: var(--gold-light); font-weight:600; }

.topbar-actions{ display:flex; align-items:center; gap:10px; }
.role-pill{
  font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  padding: 5px 12px; border-radius: 999px; background: rgba(173,131,47,0.18);
  color: var(--gold-light); border: 1px solid rgba(173,131,47,0.4);
}
.topbar-link{
  font-size:13px; font-weight:600; color: rgba(255,255,255,0.82); text-decoration:none;
  display:flex; align-items:center; gap:6px; padding:8px 10px; border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.topbar-link:hover{ background: rgba(255,255,255,0.08); color:#fff; }
.btn-logout{
  font-size:13px; font-weight:700; color: var(--navy); background: var(--gold-light);
  border:none; padding:8px 14px; border-radius:8px; cursor:pointer;
  transition: filter .15s ease, transform .1s ease;
}
.btn-logout:hover{ filter: brightness(1.08); }
.btn-logout:active{ transform: translateY(1px); }

.main-area{ flex:1; }

.footer{
  background: var(--navy-deep); color: rgba(255,255,255,0.6);
  padding: 28px 24px 34px;
  box-shadow:
        0 -10px 30px rgba(0,0,0,.25),
        0 -2px 8px rgba(0,0,0,.15);
    border-top: 1px solid rgba(255,255,255,.08);
}
.footer-inner{ max-width:1180px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.footer-inner img{ height:70px; opacity:.85; }
.footer-links{ display:flex; gap:18px; font-size:12.5px; }
.footer-links a{ color: rgba(255,255,255,0.65); text-decoration:none; margin-top:4px; transition: color .15s ease; }
.footer-links a:hover{ color: var(--gold-light); }
.footer-note{ font-size: 11.5px; color: rgba(255,255,255,0.38); }

/* ===================== Access / Login page ===================== */
.access-wrap{
  min-height: calc(100vh - 60px);
  display:grid;
  grid-template-columns: 1.05fr 1fr;
}
@media (max-width: 900px){
  .access-wrap{ grid-template-columns: 1fr; }
}

.access-hero{
  background:var(--navy);
  color:#fff;
  position: relative;
  overflow:hidden;
  padding: 64px 56px;
  display:flex; flex-direction:column; justify-content:center;
  min-height: 420px;
}
.beam{
  position:absolute; 

    top: calc(-24% - 750px);
    right: calc(27% - 750px);
    width:2400px;
    height:2400px;

    background:conic-gradient(
            from 00deg at 50% 50%,
            transparent 0deg,
            rgba(173,131,47,.16) 8deg,
            transparent 22deg,
            transparent 360deg
    );    
    animation:sweep 9s linear infinite; pointer-events:none;
}
@keyframes sweep{ from{ transform: rotate(0deg); } to{ transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .beam{ animation:none; } }

.access-hero-content{ position:relative; max-width: 460px; }
.access-hero img.wordmark{ height: 120px; width:auto; margin-bottom: 34px; }
.access-hero h1{
  font-family: var(--font-display); font-weight:400; font-size: 34px; line-height:1.18;
  margin: 0 0 16px; letter-spacing: -0.01em;
}
.access-hero h1 em{ font-style: italic; color: var(--gold-light); }
.access-hero p{ font-size: 15px; line-height:1.65; color: rgba(255,255,255,0.72); margin: 0 0 30px; max-width: 420px; }

.hero-meta{ display:flex; gap:28px; margin-top: 8px; flex-wrap: wrap; }
.hero-meta-item{ display:flex; flex-direction:column; gap:2px; }
.hero-meta-item .num{ font-family: var(--font-display); font-size: 20px; color: var(--gold-light); font-weight:600; }
.hero-meta-item .lbl{ font-size: 10.5px; letter-spacing:.12em; text-transform:uppercase; color: rgba(255,255,255,0.5); }

.hero-official-link{
  margin-top: 36px; display:inline-flex; align-items:center; gap:8px;
  font-size: 13px; font-weight:600; color: var(--gold-light); text-decoration:none;
  border-bottom: 1px solid rgba(201,162,80,0.4); padding-bottom:2px; width:fit-content;
}
.hero-official-link:hover{ color:#fff; border-color:#fff; }

/* ---- form side ---- */
.access-form-side{
  background: var(--paper);
  display:flex; align-items:center; justify-content:center;
  padding: 56px 40px;
}
.access-card{ width:100%; max-width: 420px; }

.role-tabs{
  display:flex; gap:6px; padding:5px; background: var(--paper-dim);
  border-radius: 12px; margin-bottom: 26px; border: 1px solid var(--line);
}
.role-tab{
  flex:1; text-align:center; padding: 10px 6px; border-radius: 8px; border:none;
  background: transparent; cursor:pointer; font-size: 12.5px; font-weight:700;
  letter-spacing: .03em; color: var(--ink-soft);
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.role-tab.active{ background: var(--navy); color:#fff; box-shadow: var(--shadow-md); }
.role-tab:not(.active):hover{ background: rgba(38,36,82,0.06); }

.card-title{ font-family: var(--font-display); font-size: 22px; font-weight:600; margin: 2px 0 6px; color: var(--navy); }
.card-sub{ font-size: 13.5px; color: var(--ink-soft); margin: 0 0 24px; line-height:1.5; }

.subtab-row{ display:flex; gap:18px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.subtab{
  background:none; border:none; cursor:pointer; padding: 4px 2px 12px; font-size: 13.5px;
  font-weight:600; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom:-1px;
}
.subtab.active{ color: var(--burgundy); border-bottom-color: var(--burgundy); }

.field{ margin-bottom: 16px; }
.field label{ display:block; font-size: 12px; font-weight:700; color: var(--navy); margin-bottom:6px; letter-spacing:.01em; }
.field .hint{ font-size:11.5px; color: var(--ink-soft); margin-top:5px; }
.input, select.input, textarea.input{
  width:100%; padding: 11px 13px; border-radius: 9px; border: 1.5px solid var(--line);
  font-size: 14px; font-family: inherit; background:#fff; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus{ border-color: var(--gold); box-shadow: 0 0 0 3px rgba(173,131,47,0.15); outline:none; }
textarea.input{ resize: vertical; min-height: 96px; line-height:1.5; }
.field-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width:520px){ .field-row{ grid-template-columns: 1fr; } }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 12px 20px; border-radius: 9px; border:none; cursor:pointer;
  font-size: 14px; font-weight:700; letter-spacing:.01em; font-family:inherit;
  transition: transform .1s ease, filter .15s ease, box-shadow .15s ease;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{ background: var(--burgundy); color:#fff; width:100%; box-shadow: 0 10px 24px -10px rgba(148,23,48,0.55); }
.btn-primary:hover{ filter: brightness(1.08); }
.btn-gold{ background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover{ filter: brightness(1.06); }
.btn-navy{ background: var(--navy); color:#fff; }
.btn-navy:hover{ filter: brightness(1.15); }
.btn-outline{ background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn-outline:hover{ background: var(--paper-dim); }
.btn-ghost{ background: transparent; color: var(--burgundy); padding: 8px 10px; }
.btn-ghost:hover{ background: rgba(148,23,48,0.06); }
.btn-sm{ padding: 7px 13px; font-size: 12.5px; border-radius:7px; }
.btn-block{ width:100%; }
.btn[disabled]{ opacity:.55; cursor:not-allowed; }

.form-msg{
  font-size: 12.5px; padding: 10px 13px; border-radius: 8px; margin-bottom: 16px;
  display:flex; align-items:flex-start; gap:8px; line-height:1.45;
}
.form-msg.error{ background: rgba(148,23,48,0.08); color: var(--burgundy-dark); border:1px solid rgba(148,23,48,0.22); }
.form-msg.success{ background: rgba(47,107,79,0.09); color: var(--ok); border:1px solid rgba(47,107,79,0.25); }
.form-msg.info{ background: rgba(173,131,47,0.10); color: #7a5c1f; border: 1px solid rgba(173,131,47,0.3); }

.divider-note{ text-align:center; font-size: 11.5px; color: var(--ink-soft); margin-top: 22px; line-height:1.6; }

/* ===================== Dashboard shells ===================== */
.page{ max-width: 1180px; margin: 0 auto; padding: 34px 24px 60px; }
.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1{ font-family: var(--font-display); font-size: 28px; margin:0 0 6px; color: var(--navy); font-weight:600; }
.page-head p{ margin:0; color: var(--ink-soft); font-size: 14px; }
.page-head .tag-line{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

.chip{
  display:inline-flex; align-items:center; gap:6px; padding: 4px 11px; border-radius:999px;
  font-size: 11.5px; font-weight:700; letter-spacing:.02em;
}
.chip-navy{ background: rgba(38,36,82,0.08); color: var(--navy); }
.chip-gold{ background: rgba(173,131,47,0.14); color:#7a5c1f; }
.chip-country{ background: var(--paper-dim); color: var(--ink-soft); border:1px solid var(--line); }

.status-badge{ display:inline-flex; align-items:center; gap:6px; padding:5px 11px; border-radius:999px; font-size:11.5px; font-weight:700; letter-spacing:.02em; }
.status-badge .dot{ width:6px; height:6px; border-radius:50%; }
.status-pending{ background: rgba(173,131,47,0.14); color:#7a5c1f; }
.status-pending .dot{ background: var(--gold); }
.status-accepted{ background: rgba(47,107,79,0.12); color: var(--ok); }
.status-accepted .dot{ background: var(--ok); }
.status-declined{ background: rgba(148,23,48,0.10); color: var(--burgundy-dark); }
.status-declined .dot{ background: var(--burgundy); }

.grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items:start; }
@media (max-width: 940px){ .grid-2{ grid-template-columns: 1fr; } }

.panel{
  background:#fff; border:1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-md);
}
.panel-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; gap:10px; }
.panel-head h2{ font-family: var(--font-display); font-size: 18px; margin:0; color: var(--navy); font-weight:600; }
.panel-head .count{ font-size:12px; color: var(--ink-soft); font-weight:600; }

.tabs-min{ display:flex; gap:4px; background: var(--paper-dim); padding:4px; border-radius:9px; margin-bottom:18px; }
.tabs-min button{
  flex:1; border:none; background:transparent; padding:8px 10px; border-radius:6px; cursor:pointer;
  font-size:12.5px; font-weight:700; color: var(--ink-soft);
}
.tabs-min button.active{ background:#fff; color: var(--burgundy); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }

.sub-item{
  border: 1px solid var(--line); border-radius: 11px; padding: 16px 17px; margin-bottom: 12px;
  transition: border-color .15s ease;
}
.sub-item:hover{ border-color: rgba(38,36,82,0.28); }
.sub-item-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:8px; }
.sub-item-title{ font-weight:700; font-size: 14.5px; color: var(--navy); margin:0 0 3px; font-family: var(--font-serif); }
.sub-item-meta{ font-size: 11.5px; color: var(--ink-soft); display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.sub-item-body{ font-size: 13px; color: var(--ink); line-height:1.6; margin: 8px 0 10px; white-space:pre-wrap; }
.sub-item-actions{ display:flex; gap:8px; margin-top: 10px; flex-wrap:wrap; }
.amend-of{ font-size: 11px; color: var(--burgundy); font-weight:700; margin-bottom:4px; text-transform:uppercase; letter-spacing:.04em; }

.empty-state{ text-align:center; padding: 40px 20px; color: var(--ink-soft); }
.empty-state .glyph{ font-size: 30px; margin-bottom: 10px; opacity:.5; }
.empty-state p{ font-size: 13px; margin: 4px 0 0; }

.stat-row{ display:grid; grid-template-columns: repeat(3,1fr); gap:14px; margin-bottom:24px; }
@media (max-width:700px){ .stat-row{ grid-template-columns: 1fr 1fr; } }
.stat-card{ background:#fff; border:1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat-card .n{ font-family: var(--font-display); font-size: 26px; color: var(--navy); font-weight:600; }
.stat-card .l{ font-size: 11px; text-transform:uppercase; letter-spacing:.08em; color: var(--ink-soft); font-weight:700; margin-top:2px; }

.table-wrap{ overflow-x:auto; }
table.data-table{ width:100%; border-collapse: collapse; font-size: 13px; }
table.data-table th{ text-align:left; padding: 10px 12px; font-size: 11px; text-transform:uppercase; letter-spacing:.06em; color: var(--ink-soft); border-bottom: 2px solid var(--line); }
table.data-table td{ padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data-table tr:last-child td{ border-bottom:none; }

.committee-row{ display:flex; align-items:center; justify-content:space-between; padding: 13px 15px; border:1px solid var(--line); border-radius:10px; margin-bottom:10px; }
.committee-row .info b{ color: var(--navy); font-family: var(--font-serif); font-size:14.5px; }
.committee-row .info div.small{ font-size:11.5px; color: var(--ink-soft); margin-top:2px; }

.inline-form{ display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; }
.inline-form .field{ margin-bottom:0; flex:1; min-width: 160px; }

.select-wrap select.input{ appearance:none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23262452'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position: right 14px center; padding-right: 34px; }

/* toast */
#toast-root{ position: fixed; top: 78px; right: 20px; z-index: 200; display:flex; flex-direction:column; gap:10px; }
.toast{
  background: var(--navy); color:#fff; padding: 14px 18px; border-radius: 10px; box-shadow: var(--shadow-lg);
  font-size: 13.5px; max-width: 320px; display:flex; align-items:center; gap:10px;
  animation: toast-in .25s ease;
  border-left: 4px solid var(--gold);
}
.toast.success{ border-left-color: var(--ok); }
.toast.error{ border-left-color: var(--burgundy); }
@keyframes toast-in{ from{ opacity:0; transform: translateY(-8px); } to{ opacity:1; transform:none; } }

#confetti-canvas{ position:fixed; inset:0; pointer-events:none; z-index: 300; }

.badge-count{ background: var(--burgundy); color:#fff; font-size:10.5px; font-weight:800; border-radius:999px; padding:1px 7px; margin-left:6px; }

.lock-note{ display:flex; gap:8px; align-items:flex-start; font-size:11.5px; color: var(--ink-soft); background: var(--paper-dim); border:1px solid var(--line); padding:10px 12px; border-radius:8px; margin-top:18px; line-height:1.5; }

.link-btn{ background:none; border:none; color: var(--burgundy); font-weight:700; font-size:inherit; cursor:pointer; padding:0; }
.link-btn:hover{ text-decoration: underline; }