/* Client portal - built on top of style.css's shared tokens (--bg, --panel,
   --accent, etc.) and its .card/.btn/.login-card/.toast/.field/.empty-state
   base classes. This file only adds what the portal needs beyond that:
   a mobile-first header + room list + confirm modal. */

.portal-shell {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px 16px calc(40px + env(safe-area-inset-bottom));
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.portal-header .brand { padding: 0; }

.credit-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px 6px 12px;
}

.credit-badge .credit-count { font-weight: 700; font-size: 15px; color: var(--accent); }
.credit-badge .credit-label { color: var(--text-muted); font-size: 12px; }

.portal-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  cursor: pointer;
  padding: 6px 4px;
}
.portal-logout:hover { color: var(--text); }

.room-list { display: flex; flex-direction: column; gap: 10px; }

.room-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.room-name { font-weight: 600; font-size: 15px; }

.room-status-unlocked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 3px;
}

.unlock-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.unlock-btn:hover { background: var(--accent); color: #1a1206; }
.unlock-btn:disabled { opacity: 0.5; cursor: default; background: var(--accent-soft); color: var(--accent); }

/* ---------- confirm modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 15, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal {
  width: 100%;
  max-width: 340px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.modal h2 { margin: 0 0 8px; font-size: 16px; }
.modal p { margin: 0 0 20px; color: var(--text-muted); font-size: 13.5px; line-height: 1.5; }
.modal p strong { color: var(--text); }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

@media (max-width: 420px) {
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; justify-content: center; }
}
