/* Reset */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; background: #0a0a0a; color: #fff; }
#main { display: contents; }

/* App shell */
.app-shell { display: flex; flex-direction: column; height: 100dvh; }
.app-content { flex: 1; overflow-y: auto; }

/* Header */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: 56px; background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a; flex-shrink: 0;
}
.app-header__title { font-size: 1.1rem; font-weight: 600; }
.app-header__back { color: #4f8ef7; text-decoration: none; font-size: 0.95rem; }
.btn-logout {
  background: none; border: 1px solid #555; color: #ccc;
  padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.85rem;
}

/* Tab inputs hidden */
.tab-inputs { display: none; }

/* Tab bar */
.tab-bar {
  display: flex; height: 60px; background: #1a1a1a;
  border-top: 1px solid #2a2a2a; flex-shrink: 0;
}
.tab-bar__label {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; color: #888; font-size: 0.75rem; gap: 2px; user-select: none;
}

/* Tab panels: hidden by default, shown when corresponding radio is checked */
.tab-panel { display: none; padding: 12px; }
#tab-calls:checked ~ .app-content .tab-panel--calls { display: block; }
#tab-people:checked ~ .app-content .tab-panel--people { display: block; }

/* Active tab highlight */
#tab-calls:checked ~ .tab-bar label[for="tab-calls"],
#tab-people:checked ~ .tab-bar label[for="tab-people"] { color: #4f8ef7; }

/* Badge */
.tab-badge {
  background: #e53e3e; color: #fff; border-radius: 10px;
  font-size: 0.65rem; padding: 1px 5px; min-width: 16px;
  text-align: center; display: inline-block; line-height: 1.4;
}
.tab-badge:empty { display: none; }

/* Call cards */
.call-card {
  background: #1e1e1e; border-radius: 12px; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.call-card__name { font-size: 1rem; font-weight: 500; }
.call-card__actions { display: flex; gap: 8px; }
.btn-join {
  background: #22c55e; color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; cursor: pointer; font-size: 0.9rem; text-decoration: none;
  display: inline-block;
}
.btn-decline {
  background: #e53e3e; color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; cursor: pointer; font-size: 0.9rem;
}

/* People cards */
.people-card {
  background: #1e1e1e; border-radius: 12px; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.btn-call {
  background: #4f8ef7; color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; cursor: pointer; font-size: 0.9rem;
}

/* Video list */
.video-list { display: flex; flex-direction: column; gap: 8px; padding: 8px; }

@media (min-width: 640px) {
  .video-list { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Video card */
.video-card {
  width: 100%; aspect-ratio: 16 / 9; background: #111;
  border-radius: 10px; overflow: hidden; position: relative;
}
.video-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card__label {
  position: absolute; bottom: 8px; left: 10px;
  font-size: 0.75rem; color: #ccc; background: rgba(0,0,0,0.5);
  padding: 2px 6px; border-radius: 4px;
}

/* Room controls */
.room-controls {
  display: flex; justify-content: center; gap: 16px;
  padding: 14px 16px; background: #1a1a1a;
  border-top: 1px solid #2a2a2a; flex-shrink: 0;
}
.btn-control {
  background: #2a2a2a; color: #fff; border: none; border-radius: 50%;
  width: 52px; height: 52px; cursor: pointer; font-size: 1.2rem;
}
.btn-control--muted { background: #e53e3e; }
.btn-control--video-off { background: #e53e3e; }
