:root {
  --brand-blue: #005BAA;
  --brand-green: #9CBF49;
  --bg: #14161a;
  --panel-bg: #1e2126;
  --text: #eef0f2;
  --text-dim: #a8adb5;
  --danger: #d64545;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#callContainer {
  position: fixed;
  inset: 0;
}

#callContainer iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- connection status overlay ---------- */
.status {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(10, 11, 13, 0.92);
  text-align: center;
  padding: 24px;
  z-index: 20;
}
.status.hidden { display: none; }
.status p { max-width: 320px; color: var(--text-dim); margin: 0; }

/* ---------- floating files button ---------- */
.files-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--brand-blue);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  z-index: 30;
  transition: background 0.2s ease, transform 0.15s ease;
}
.files-toggle:hover { background: var(--brand-green); transform: scale(1.05); }

.files-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 999px;
  font-weight: 600;
}
.files-badge.hidden { display: none; }

/* ---------- files panel ---------- */
.files-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 100vw);
  background: var(--panel-bg);
  border-left: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  z-index: 25;
  transform: translateX(0);
  transition: transform 0.25s ease;
}
.files-panel.hidden { transform: translateX(100%); }

.files-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.files-panel h2 { font-size: 16px; margin: 0; }
.files-panel header button {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
}

.files-list {
  list-style: none;
  margin: 0;
  padding: 8px 16px;
  overflow-y: auto;
  flex: 1;
}
.files-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.files-list a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  flex: 1;
  word-break: break-word;
}
.files-list a:hover { color: var(--brand-green); }
.files-list .meta {
  font-size: 11px;
  color: var(--text-dim);
  display: block;
}

.files-empty {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 24px 16px;
}
.files-empty.hidden { display: none; }

.upload-form {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upload-form input[type="file"] {
  color: var(--text-dim);
  font-size: 13px;
}

.btn-primary {
  background: var(--brand-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-primary:hover { background: var(--brand-green); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.upload-progress {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
}
.upload-progress.hidden { display: none; }

@media (max-width: 480px) {
  .files-panel { width: 100vw; }
}
