:root{
  --bg:#0b0c10; --panel:#0f1218; --text:#e8eaed; --muted:#a1a1aa;
  --border:#1f2430; --accent:#2563eb; --ok:#22c55e; --err:#ef4444;
}
@media (prefers-color-scheme: light){
  :root{
    --bg:#f8fafc; --panel:#ffffff; --text:#0f172a; --muted:#475569;
    --border:#e5e7eb; --accent:#2563eb; --ok:#16a34a; --err:#dc2626;
  }
}

/* Base */
*{box-sizing:border-box}
body{
  margin:0; background:var(--bg); color:var(--text);
  font:16px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
}
.wrap{max-width:960px;margin:0 auto;padding:24px}

/* Back link (top-left) */
a.back, a.back:visited{
  color:var(--muted);
  text-decoration:none;
  display:inline-flex;
  gap:.4rem;
  align-items:center;
  margin-bottom:14px;
  font-weight:600;
}
a.back:hover{color:var(--accent)}

/* Panels & headings */
.panel{
  background:var(--panel); border:1px solid var(--border); border-radius:16px; padding:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
}
h1{margin:6px 0 18px 0;font-size:1.8rem;color:var(--accent)}
h2{margin:0 0 6px 0}

/* ---------- Form layout (rows like Chat Tester) ---------- */
#meetingForm {        /* kill any previous grid layout */
  display:block !important;
}
#meetingForm .row{
  display:flex; align-items:center; gap:12px; margin-bottom:12px;
}
#meetingForm .row:last-child{ margin-bottom:0; }

label{font-size:.95rem;color:var(--muted);min-width:140px}
select,
input[type=text],
input[type=password],
input[type=email],
input[type=search],
input[type=url],
input[type=tel],
textarea{
  background:transparent;color:var(--text);
  border:1px solid var(--border); padding:10px 12px; border-radius:12px; outline:none;
  min-width:200px; flex:1;
}
input::placeholder,textarea::placeholder{color:color-mix(in oklab, var(--text) 35%, transparent)}
input:focus,textarea:focus,select:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent);
}

/* Stack label above input on small screens */
@media (max-width:640px){
  #meetingForm .row{ flex-direction:column; align-items:stretch; }
  label{ min-width:0; }
}

/* Buttons */
.btn{
  background:var(--accent); color:#fff; border:0; padding:10px 16px; border-radius:12px;
  font-weight:600; cursor:pointer; transition:background .2s ease,transform .06s ease;
  display:inline-block; text-decoration:none; /* works for <a> and <button> */
}
.btn, .btn:visited, .btn:hover, .panel a.btn{ text-decoration:none !important; } /* never underline */
.btn:hover{ background:#1e40af }
.btn:active{ transform:translateY(1px) }

/* Secondary/soft action (Delete) */
.btn.delete{
  background:#6b7280; 
  color:#fff; 
  padding:10px 16px;
  min-width:120px;
  text-align:center;
  border-radius:12px;
}
.btn.delete:hover{ background:#4b5563 }

/* Status text */
.status{font-size:.92rem;color:var(--muted)}

/* ===== Recordings list ===== */
#fileList{display:grid;grid-template-columns:1fr;gap:12px;margin-top:16px}
.file{
  display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;
  background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:12px 14px;
}
.file-name{
  font-weight:400 !important; /* not bold */
  word-break:break-word;
  overflow-wrap:anywhere;
  line-height:1.3;
}
.file-name strong{ font-weight:400 !important; } /* guard if <strong> appears */
.meta{font-size:12px;color:var(--muted);margin-top:4px}
.file .btn{min-width:120px;text-align:center}

/* Responsive list */
@media (max-width:540px){
  .file{grid-template-columns:1fr;gap:8px}
  .file .btn{width:100%;min-width:0}
}
/* === Participants editor === */
#participantsEditor{display:flex;flex-direction:column;gap:10px}
#participantsEditor .participant-row{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
}
#participantsEditor .participant-row .input{
  background:var(--pill);
  border:1px solid var(--border);
  color:var(--txt);
  padding:10px 12px;
  border-radius:12px;
  height:44px;
  outline:none;
}
#participantsEditor .participant-row .input:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(47,102,255,.20);
}
/* Make fields align & stretch like the rest of the form */
#participantsEditor .participant-row .p-name{flex:1 1 340px;min-width:280px}
#participantsEditor .participant-row .p-email{flex:1 1 360px;min-width:280px}

/* Optional tiny remove button */
#participantsEditor .participant-row .remove{
  background:transparent;border:1px solid var(--border);
  color:var(--muted);border-radius:10px;padding:8px 10px;cursor:pointer
}
#participantsToolbar{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}

/* (Optional helpers) */
.mb12{margin-bottom:12px}

/* Emergency Evacuation clean table layout */
.evac-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.evac-table th,
.evac-table td {
  padding: 12px 8px;
  vertical-align: middle;
  text-align: left;
  font-size: 17px;
  line-height: 1.3;
}

.evac-table th {
  font-weight: 800;
  white-space: normal;
}

.evac-table .status {
  font-size: 15px;
  line-height: 1.35;
}

/* Visitors column widths */
.visitors-table th:nth-child(1),
.visitors-table td:nth-child(1) {
  width: 6%;
  text-align: center;
}

.visitors-table th:nth-child(2),
.visitors-table td:nth-child(2) {
  width: 24%;
}

.visitors-table th:nth-child(3),
.visitors-table td:nth-child(3) {
  width: 14%;
}

.visitors-table th:nth-child(4),
.visitors-table td:nth-child(4) {
  width: 10%;
}

.visitors-table th:nth-child(5),
.visitors-table td:nth-child(5) {
  width: 18%;
}

.visitors-table th:nth-child(6),
.visitors-table td:nth-child(6) {
  width: 10%;
}

.visitors-table th:nth-child(7),
.visitors-table td:nth-child(7) {
  width: 18%;
}

/* Staff column widths */
.staff-table th:nth-child(1),
.staff-table td:nth-child(1) {
  width: 6%;
  text-align: center;
}

.staff-table th:nth-child(2),
.staff-table td:nth-child(2) {
  width: 23%;
}

.staff-table th:nth-child(3),
.staff-table td:nth-child(3) {
  width: 14%;
}

.staff-table th:nth-child(4),
.staff-table td:nth-child(4) {
  width: 11%;
}

.staff-table th:nth-child(5),
.staff-table td:nth-child(5) {
  width: 15%;
}

.staff-table th:nth-child(6),
.staff-table td:nth-child(6) {
  width: 15%;
}

.staff-table th:nth-child(7),
.staff-table td:nth-child(7) {
  width: 16%;
}

/* Action buttons in table */
.evac-table td:last-child {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.evac-table td:last-child .btn {
  min-width: 0;
  width: 100%;
  padding: 9px 10px;
  font-size: 14px;
  border-radius: 12px;
  white-space: nowrap;
}

.evac-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}