@font-face {
  font-family: Poppins;
  src: url("/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
}
@font-face {
  font-family: Poppins;
  src: url("/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
}
@font-face {
  font-family: Poppins;
  src: url("/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
}

:root {
  color-scheme: dark;
  --bg: #121212;
  --side: #181818;
  --panel: #1c1c1c;
  --line: #2c2c2c;
  --field: #2a2a2a;
  --red: #9e1d20;
  --text: #f2f2f2;
  --grey: #8a8a8a;
  --white: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Poppins, sans-serif; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.top {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 16px;
  background: #202020;
  border-bottom: 1px solid var(--line);
}
.dots { display: flex; gap: 8px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: #e8544a; }
.dots i:nth-child(2) { background: #e8b040; }
.dots i:nth-child(3) { background: #58ba60; }
#address { color: var(--grey); font-size: 14px; }

.home, .saved {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 80px;
}
.home img.brand, .saved img.brand { height: 36px; align-self: flex-start; }
.home h1, .saved h1 { margin: 72px 0 8px; font-size: 40px; font-weight: 600; }
.lede { margin: 0; color: var(--grey); }
.home form, .saved .note { width: min(500px, 100%); }
.home input {
  width: 100%;
  margin-top: 28px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 20px;
}
.primary, .ghost, .danger, a.ghost {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 16px;
}
a.ghost { display: inline-flex; align-items: center; text-decoration: none; }
.primary { background: var(--red); color: var(--white); }
.ghost { background: #F2F2F2; color: #222; }
.danger { background: transparent; color: var(--grey); }
.home .primary { width: 100%; margin-top: 16px; min-height: 52px; }
.fine { color: var(--grey); text-align: center; margin-top: 28px; font-size: 14px; }
.error { color: #e5484d; min-height: 1.2em; }

.shell { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 56px); }
.side { background: var(--side); padding: 24px 0 24px; border-right: 1px solid var(--line); }
.side .brand { height: 28px; margin: 0 24px 18px; }
.side h2 { margin: 0 24px; font-size: 16px; }
.side .code { margin: 4px 24px 24px; color: var(--grey); font-size: 13px; }
.side button.nav, .side a.nav {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  padding: 12px 21px;
  color: var(--grey);
  text-decoration: none;
}
.side button.nav.on, .side a.nav.on { background: #2a1718; color: var(--text); border-left-color: var(--red); }
.save-state { margin: 24px; min-height: 1.2em; color: var(--grey); font-size: 12px; }

.work { padding: 28px 32px 48px; }
.work header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.work h1 { margin: 0; font-size: 28px; }
.meta { display: flex; gap: 8px; align-items: center; color: var(--grey); margin-top: 8px; flex-wrap: wrap; }
.meta { gap: 8px 20px; }
.meta input { background: transparent; border: 0; border-bottom: 1px solid transparent; color: var(--text); width: 160px; padding: 2px 0; }
.meta #show-start { width: 64px; }
.meta input:focus { outline: none; border-bottom-color: var(--line); color: var(--text); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.table { width: 100%; border-collapse: collapse; margin-top: 22px; table-layout: fixed; }
.table th:nth-child(1), .table td:nth-child(1) { width: 48px; }
.table th:nth-child(4), .table td:nth-child(4) { width: 168px; }
.table th:nth-child(5), .table td:nth-child(5) { width: 96px; }
.table th:nth-child(7), .table td:nth-child(7) { width: 132px; padding-right: 8px; }
.table th { text-align: left; font-weight: 500; color: var(--grey); font-size: 13px; background: var(--panel); padding: 12px; }
.table td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:nth-child(even) td { background: #202020; }
.table input, .table select {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 6px 0;
}
.table input:focus, .table select:focus { outline: 1px solid var(--line); background: var(--field); }
.icon { background: #F2F2F2; border: 0; color: #222; width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.row-buttons { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.head-fields { flex: 1 1 420px; min-width: 0; }
.show-title { background: transparent; border: 0; border-bottom: 1px solid transparent; font-size: 28px; font-weight: 600; padding: 0; width: 100%; }
.show-title:hover, .meta input:hover { border-bottom-color: var(--line); }
.show-title:focus { outline: none; border-bottom-color: var(--grey); }
.meta label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.logo-grid.single { grid-template-columns: minmax(280px, 560px); }
.rec { margin-top: 6px; font-size: 13px; }
.warn { color: #e8b040; font-size: 13px; min-height: 0; margin: 6px 0 0; }
.empty { color: var(--grey); padding: 28px 0; }

.logo-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr); gap: 28px; margin-top: 8px; }
.drop {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
}
.drop.over { border-color: var(--red); }
.stage {
  margin-top: 12px;
  background: #000;
  border-radius: 12px;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}
.stage img { position: absolute; top: 28px; left: 28px; max-width: 42%; max-height: 28%; object-fit: contain; }
.stage .time { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stage .time strong { font-size: 48px; font-weight: 600; }
.stage .time span { color: var(--grey); }

@media (max-width: 900px) {
  .shell, .logo-grid, .logo-grid.single { grid-template-columns: 1fr; }
  .side { padding: 16px 0 8px; }
  .work { padding: 20px 16px 40px; }
  .table, .table tbody { display: block; }
  .table thead { display: none; }
  .table tr { display: grid; grid-template-columns: 32px 1fr 1fr; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table tr:nth-child(even) { background: #202020; }
  .table td, .table td:nth-child(n) { width: auto; padding: 0 6px; border: 0; background: transparent !important; }
  .table td:nth-child(1) { grid-row: 1; grid-column: 1; color: var(--grey); }
  .table td:nth-child(2) { grid-row: 1; grid-column: 2 / 4; }
  .table td:nth-child(3) { grid-column: 2 / 4; }
  .table td:nth-child(4) { grid-column: 2; }
  .table td:nth-child(5) { grid-column: 3; }
  .table td:nth-child(6) { grid-column: 2 / 4; }
  .table td:nth-child(7) { grid-column: 2 / 4; }
  .row-buttons { justify-content: flex-start; }
  .table input::placeholder { color: var(--grey); }
}
.f{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--grey);position:relative}
.fi{display:flex;align-items:center;gap:8px;background:var(--field);border:1px solid var(--line);border-radius:8px;padding:8px 10px;color:var(--text);font-size:14px;min-height:40px}
.fi{white-space:nowrap}.fi.on{border-color:var(--grey)}.req{color:#e8544a}
.fields{display:grid;grid-template-columns:170px 120px 160px 1fr;gap:14px;margin-top:14px;max-width:860px}
.dd{position:absolute;top:66px;left:0;z-index:5;background:#202020;border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 30px rgba(0,0,0,.6);padding:10px;color:var(--text);font-size:13px}
.cal{display:grid;grid-template-columns:repeat(7,34px);gap:2px;text-align:center}.cal span{padding:7px 0;border-radius:6px}.cal .h{color:var(--grey);font-size:11px}.cal .sel{background:var(--red)}.cal .mu{color:#555}
.sug div{padding:9px 10px;border-radius:6px}.sug div.hi{background:#2a2a2a}.sug b{font-weight:500}.sug small{display:block;color:var(--grey)}
.chip{font-size:12px;color:var(--grey);background:#202020;border:1px solid var(--line);border-radius:6px;padding:3px 9px}
.checker{background-color:#e9e9e9;background-image:linear-gradient(45deg,#cfcfcf 25%,transparent 25%),linear-gradient(-45deg,#cfcfcf 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#cfcfcf 75%),linear-gradient(-45deg,transparent 75%,#cfcfcf 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0}
.hint{font-size:11px;color:var(--grey);font-weight:400}


/* v2: event fields are title, date, start time, venue — no duration */
.fields { grid-template-columns: 220px 1fr; max-width: 720px; }

/* Meeting site extras on top of plan.css */

.table.delegates { table-layout: fixed; width: 1000px; max-width: 100%; }
.table.delegates th:nth-child(1),
.table.delegates td:nth-child(1) { width: 48px; }
.table.delegates th:nth-child(2),
.table.delegates td:nth-child(2) { width: 240px; }
.table.delegates th:nth-child(3),
.table.delegates td:nth-child(3) { width: 280px; }
.table.delegates th:nth-child(4),
.table.delegates td:nth-child(4) { width: 150px; }
.table.delegates th:nth-child(5),
.table.delegates td:nth-child(5) { width: 150px; }
.table.delegates th:nth-child(6),
.table.delegates td:nth-child(6) { width: 52px; padding-right: 8px; }
.table.delegates + .fine { margin-top: 200px; }

.role {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 6px 0;
  font-weight: 500;
  gap: 8px;
}
.role .chev { color: var(--grey); font-weight: 400; font-size: 11px; }
.role.delegate { color: #46C26B; }
.role.chairman { color: #F0B429; }

.country {
  position: relative;
}
.country-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 0;
  min-height: 32px;
  background: transparent;
  border: 0;
  color: var(--text);
  text-align: left;
}
.country-field .chev { margin-left: auto; color: var(--grey); font-size: 11px; }
.flag {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  flex: 0 0 auto;
  background: #111;
}


.country-dd {
  position: absolute;
  top: 38px;
  left: 0;
  z-index: 8;
  width: 280px;
  background: #202020;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.6);
  padding: 6px;
  max-height: 320px;
  overflow: auto;
}
.country-search { width: 100%; margin-bottom: 6px; background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }

.country-dd div.opt,
.country-dd button.opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13px;
  text-align: left;
}
.country-dd div.opt.hi { background: #2a2a2a; }

.avatar-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.avatar-cell img {
  width: 36px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  background: #111;
  display: block;
}
.avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 12px;
  line-height: 1.35;
}
.avatar-actions button,
button.link {
  background: none;
  border: 0;
  color: var(--grey);
  padding: 0;
  min-height: 0;
  text-align: left;
  font-size: 12px;
}
.avatar-actions button:hover,
button.link:hover { color: var(--text); }
.avatar-empty {
  width: 36px;
  height: 40px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey);
  font-size: 10px;
  text-align: center;
  line-height: 1.15;
  background: var(--panel);
}

.bg-stage {
  margin-top: 18px;
  max-width: 800px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.bg-preview {
  width: 100%;
  aspect-ratio: 800 / 424;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bg-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bg-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.home input#code {
  letter-spacing: 0.12em;
  text-align: center;
  font-weight: 500;
}

@media (max-width: 900px) {
  .shell, .side, .work { max-width: 100%; }
  .work { overflow: visible; padding-bottom: 220px; }
  .show-title { font-size: 22px; }
  .save-state { margin: 16px 24px 8px; overflow-wrap: anywhere; }
  .table.delegates { width: 100%; max-width: 100%; }
  .table.delegates, .table.delegates tbody { display: block; }
  .table.delegates thead { display: none; }
  .table.delegates tr {
    display: grid;
    grid-template-columns: 32px 1fr 1fr;
    gap: 6px 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .table.delegates tr:nth-child(even) { background: #202020; }
  .table.delegates td,
  .table.delegates td:nth-child(n) { width: auto; padding: 0 6px; border: 0; background: transparent !important; }
  .table.delegates td:nth-child(1) { grid-row: 1; grid-column: 1; color: var(--grey); }
  .table.delegates td:nth-child(2) { grid-row: 1; grid-column: 2 / 4; }
  .table.delegates td:nth-child(3) { grid-column: 2; }
  .table.delegates td:nth-child(4) { grid-column: 3; }
  .table.delegates td:nth-child(5) { grid-column: 2; }
  .table.delegates td:nth-child(6) { grid-column: 3; }
  .row-buttons { justify-content: flex-start; }
  .country-dd { width: min(280px, 78vw); }
  .table.delegates + .fine { margin-top: 200px; }
  .fields { grid-template-columns: 1fr 1fr; max-width: none; }
  .fields .f:last-child { grid-column: 1 / -1; }
  .fi { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .show-title { white-space: normal; }
}



.fi input, .fi input[type="date"] { width: 100%; background: transparent; border: 0; padding: 0; color: var(--text); }
.fi input:focus { outline: none; }
.venue-sug { width: min(420px, 80vw); max-height: 240px; overflow: auto; }
.venue-sug button { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: var(--text); padding: 8px 10px; border-radius: 6px; }
.venue-sug button:hover, .venue-sug button.hi { background: #2a2a2a; }
.role-menu { position: absolute; z-index: 7; background: #202020; border: 1px solid var(--line); border-radius: 8px; padding: 6px; min-width: 140px; }
.role-menu button { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 8px; }
.dash { min-height: 100vh; }
.dash-top { display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 28px; background: #202020; border-bottom: 1px solid #2c2c2c; }
.dash-top img.logo { height: 30px; }
.dash-top img.fav { height: 28px; border-radius: 6px; }
.dash-top h1 { margin: 0; font-size: 17px; font-weight: 600; }
.dash main { padding: 28px; }
.dash .tools { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.dash .tools input { width: min(360px, 100%); background: #2a2a2a; border: 1px solid #333; border-radius: 8px; padding: 9px 12px; }
.dash table { width: 100%; border-collapse: collapse; background: #1c1c1c; }
.dash th { text-align: left; color: #8a8a8a; font-weight: 500; font-size: 12px; padding: 12px 10px; border-bottom: 1px solid #2c2c2c; }
.dash td { padding: 11px 10px; border-bottom: 1px solid #262626; vertical-align: middle; }
.dash .code { font-weight: 600; letter-spacing: 2px; }
.dash .sub { display: block; color: #8a8a8a; font-size: 12px; }
.dash .ok { color: #58ba60; }
.tabs { display: flex; gap: 8px; }
.tabs button { background: transparent; border: 0; color: #8a8a8a; padding: 7px 14px; border-radius: 8px; }
.tabs button.on { background: #2a2a2a; color: #fff; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal form { background: #1c1c1c; border: 1px solid #2c2c2c; border-radius: 12px; padding: 24px; width: min(440px, 100%); }
.modal label { display: block; color: #8a8a8a; font-size: 12px; margin: 12px 0 5px; }
.modal input { width: 100%; background: #2a2a2a; border: 1px solid #333; border-radius: 8px; padding: 9px 12px; }
.login-card { width: min(420px, 92vw); margin: 12vh auto; background: #1c1c1c; border-radius: 16px; padding: 28px; }
@media (max-width: 800px) {
  .dash main { padding: 16px; }
  .dash table { display: block; overflow-x: auto; }
}
