:root {
  --bg: #0f172a;
  --bg-soft: #111b35;
  --panel: #162242;
  --line: #2d3f6f;
  --text: #e8ecf8;
  --muted: #b4c1e1;
  --accent: #5dd39e;
  --accent-2: #7aa9ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 300px at 10% -10%, #253561 0%, transparent 60%),
    radial-gradient(900px 300px at 90% -10%, #1d3a57 0%, transparent 60%),
    var(--bg);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(270px, 320px) 1fr;
  gap: 1rem;
  padding: 1rem;
}

.landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.landing-card {
  width: min(560px, 96vw);
  margin: 0;
  text-align: center;
}

.landing-card h1 {
  margin: 0;
  font-size: 2rem;
}

.landing-card .hint {
  margin: 0.8rem 0 1.2rem;
}

.sidebar {
  height: calc(100vh - 2rem);
  position: sticky;
  top: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.content {
  min-width: 0;
}

.hero h1 {
  margin: 0;
  font-size: 2rem;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.app-version {
  font-size: 0.52em;
  color: var(--muted);
  font-weight: 500;
  vertical-align: middle;
  margin-left: 0.25rem;
}

.config-icon-btn {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.1rem;
  border-radius: 999px;
}

.header-meet-select {
  min-width: 260px;
  max-width: 46vw;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.hero p {
  margin: 0.5rem 0 1rem;
  color: var(--muted);
}

.data-status {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.data-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
}

.data-chip strong {
  font-weight: 700;
}

.data-chip.ok {
  border-color: #2ca26a;
  color: #9ae7bf;
}

.data-chip.bad {
  border-color: #a24b4b;
  color: #ffc2c2;
}

.panel {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel), transparent 10%);
  padding: 1rem;
}

select,
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1730;
  color: var(--text);
  padding: 0.45rem 0.7rem;
}

button {
  cursor: pointer;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.82rem;
}

.pill-ok {
  border-color: #2ca26a;
  color: #9ae7bf;
}

.pill-bad {
  border-color: #a24b4b;
  color: #ffc2c2;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.event-list {
  margin-top: 0.8rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.75);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 30;
}

.modal-card {
  width: min(900px, 96vw);
  margin: 0;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.modal-head h3 {
  margin: 0;
}

.modal-actions {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.6rem;
}

.config-row {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.92rem;
}

.config-row input,
.config-row select {
  width: 100%;
}

.toggle-row {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.toggle-row input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
}

.browser-row {
  display: flex;
  gap: 0.5rem;
}

.browser-list {
  margin-top: 0.5rem;
  max-height: 420px;
  overflow-y: auto;
}

.browser-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.browser-open,
.browser-latch {
  padding: 0.25rem 0.45rem;
  font-size: 0.78rem;
}

.browser-name {
  font-size: 0.82rem;
}

.event-item {
  width: 100%;
  text-align: left;
  margin-bottom: 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1630;
}

.event-item.is-active {
  border-color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2), transparent 85%);
}

.event-title {
  display: block;
  font-weight: 600;
}

.event-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.event-meta-row {
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  border-radius: 8px;
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.event-item.status-completed .status-chip {
  background: #1f5f3a;
  border-color: #2f8d56;
  color: #d9f8e7;
}

.event-item.status-in-progress .status-chip {
  background: #6f5b1d;
  border-color: #a3882e;
  color: #fff4cc;
}

.event-item.status-completed {
  border-left: 4px solid #3fbf74;
}

.event-item.status-in-progress {
  border-left: 4px solid #e0be42;
}

.evt-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.8rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.45rem;
  text-align: left;
  font-size: 0.92rem;
}

th {
  background: color-mix(in srgb, var(--panel), white 8%);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.meta-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem;
}

.meta-item .label {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }
}
