:root {
  --bg: #0b0e17;
  --panel: #141826;
  --panel-2: #1b2030;
  --field: #10131f;
  --line: #262c3d;
  --text: #eef1f7;
  --muted: #8b93ab;
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --audio: #34d399;
  --video: #a78bfa;
  --radius: 16px;
  --shadow: 0 12px 34px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(139,92,246,.16), transparent 60%),
    radial-gradient(900px 520px at 0% 0%, rgba(52,211,153,.08), transparent 55%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Top bar */
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 26px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: rgba(11,14,23,.85); backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand .dot {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px rgba(99,102,241,.5);
}
.brand h1 { font-size: 19px; margin: 0; letter-spacing: -.2px; }
.brand p { margin: 0; font-size: 12.5px; color: var(--muted); }
.date-pill {
  margin: 0 auto; font-weight: 700; font-size: 22px;
  padding: 11px 26px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); letter-spacing: .2px;
}
.actions { display: flex; align-items: center; gap: 10px; }
.live { color: var(--audio); font-size: 12.5px; font-weight: 700; }
.live.stale { color: var(--muted); }

.note {
  max-width: 1240px; margin: 18px auto 0; padding: 0 26px;
  color: var(--muted); font-size: 14px; text-align: center;
}

button {
  font: inherit; cursor: pointer; border-radius: 10px;
  border: 1px solid transparent; padding: 8px 14px; transition: .12s; color: var(--text);
}
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover { filter: brightness(1.08); }
button.ghost { background: var(--panel-2); border-color: var(--line); }
button.ghost:hover { background: #232a3d; }
button.ghost.small { padding: 6px 11px; font-size: 13px; }
button.danger { background: transparent; border-color: #ef4444; color: #f87171; }
button.danger:hover { background: rgba(239,68,68,.12); }
.hidden { display: none !important; }

/* Columns of time slots */
main { max-width: 1240px; margin: 22px auto 0; padding: 0 26px 46px; }
.columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 20px;
}
@media (max-width: 1080px) { .columns { grid-template-columns: repeat(2, minmax(240px, 1fr)); } }
@media (max-width: 560px)  { .columns { grid-template-columns: 1fr; } }

.col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.col-head {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
  font-weight: 700; font-size: 17px;
  padding: 14px 10px;
  margin-bottom: 8px;
}

.role-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: .11em;
  text-transform: uppercase; margin: 12px 2px 2px;
}
.role-label.audio { color: var(--audio); }
.role-label.video { color: var(--video); }

.namefield {
  width: 100%; font: inherit; color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  transition: border-color .12s, box-shadow .12s;
}
.namefield::placeholder { color: #59617a; }
.namefield:hover { border-color: #39415a; }
.namefield:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99,102,241,.25);
  background: #131829;
}
.namefield.saved { border-color: var(--audio); }
.namefield.role-video:focus { border-color: var(--video); box-shadow: 0 0 0 3px rgba(167,139,250,.25); }

/* Modal + toast */
.modal {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(4,6,12,.62);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 16px; overflow-y: auto;
}
.modal-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow);
  width: 100%; max-width: 400px; padding: 24px; position: relative;
}
.close {
  position: absolute; top: 12px; right: 12px; background: transparent;
  border: 0; font-size: 22px; color: var(--muted); line-height: 1;
  width: 32px; height: 32px; border-radius: 8px;
}
.close:hover { background: var(--panel-2); color: var(--text); }
.modal-card h2 { margin: 0 0 4px; font-size: 20px; }
.form { display: flex; flex-direction: column; gap: 13px; margin-top: 12px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.form input {
  font: inherit; color: var(--text); padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
}
.form input:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.form-actions { display: flex; align-items: center; gap: 9px; margin-top: 4px; }
.form-actions .spacer { flex: 1; }
.muted { color: var(--muted); font-size: 13px; }

.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 0 26px 40px; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #0b0e18; border: 1px solid var(--line); color: #fff;
  padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); z-index: 60; font-size: 14px;
}

@media (max-width: 560px) { .date-pill { order: 3; margin: 4px 0 0; } }
