/* Room access log */
.ral-status { color: var(--text-secondary, #4b5563); padding: 24px 0; }

.ral-error {
  border: 1px solid var(--danger-color, #b91c1c);
  background: var(--danger-50, #fef2f2);
  color: var(--danger-text, #7f1d1d);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.ral-actions { margin: 12px 0 0; }

.ral-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.ral-btn-primary { background: var(--primary-color, #1d4ed8); color: #fff; }

.ral-table-wrap {
  overflow-x: auto;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
}

.ral-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 0.875rem; }
.ral-table th, .ral-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border-color, #e5e7eb); }
.ral-table th { font-weight: 600; color: var(--text-secondary, #4b5563); white-space: nowrap; }
.ral-table td { color: var(--text-primary, #111827); }
.ral-table td:nth-child(1), .ral-table td:nth-child(2) { overflow-wrap: anywhere; min-width: 9rem; }
.ral-table td:nth-child(3), .ral-table td:nth-child(4) { white-space: nowrap; }
.ral-table tbody tr:last-child td { border-bottom: none; }

/* Phone: one block per entry, each value labelled, so nothing sits off-screen to the right */
@media (max-width: 640px) {
  .ral-table { min-width: 0; }
  .ral-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ral-table, .ral-table tbody, .ral-table tr, .ral-table td { display: block; }
  .ral-table tr { padding: 10px 14px; border-bottom: 1px solid var(--border-color, #e5e7eb); }
  .ral-table tbody tr:last-child { border-bottom: none; }
  .ral-table td { border-bottom: none; padding: 3px 0; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .ral-table td::before { content: attr(data-label); display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary, #4b5563); }
}

.ral-back { color: var(--primary-color, #1d4ed8); text-decoration: underline; }

[data-theme="dark"] .ral-error { background: #3b1212; color: #fecaca; border-color: #f87171; }
[data-theme="dark"] .ral-table-wrap { background: #111827; border-color: #374151; }
[data-theme="dark"] .ral-table th, [data-theme="dark"] .ral-table td { border-color: #374151; color: #e5e7eb; }
[data-theme="dark"] .ral-back { color: #93c5fd; }
[data-theme="dark"] .ral-table tr { border-color: #374151; }
[data-theme="dark"] .ral-table td::before { color: #9ca3af; }
