:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #10101c;
  color: #f5f5fb;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 6%; border-bottom: 1px solid #29283b;
}
.brand { color: white; font-weight: 900; letter-spacing: 1px; text-decoration: none; }
.brand span { color: #a99bff; }
.secure, .footnote, .chat-hint { color: #aaa9c2; font-size: .88rem; }
main { width: min(1000px, 92%); margin: 38px auto; }
.intro { text-align: center; margin-bottom: 28px; }
.eyebrow { color: #b5a9ff; letter-spacing: 3px; font-size: .75rem; font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin: 10px 0; }
.intro p:last-child { color: #c1bfd5; }
.notice, .profile-form, .chat-panel {
  background: #1c1b2c; border: 1px solid #37334f; border-radius: 16px;
  padding: 18px 20px; margin-bottom: 22px; line-height: 1.55;
}
.notice h2, .profile-form h2, .chat-panel h2 { margin: 0 0 8px; font-size: 1.15rem; }
.notice p { color: #c8c6d9; margin: 8px 0; }
.profile-form { display: grid; gap: 16px; }
.profile-fields {
  display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center;
  gap: 10px 14px;
}
.profile-fields label { font-weight: 700; }
.profile-fields input, .profile-fields select, .chat-form input, .admin-panel input, .admin-login input {
  width: 100%; border: 1px solid #49465e; border-radius: 9px; padding: 11px 12px;
  background: #11111d; color: #fff; font: inherit;
}
.profile-fields small { grid-column: 2; color: #aaa9c2; margin-top: -6px; }
.consent { display: flex; gap: 10px; align-items: flex-start; color: #d3d1e2; }
.consent input { margin-top: 5px; accent-color: #8877ff; }
.videos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.video-card {
  position: relative; overflow: hidden; background: #080811;
  border: 1px solid #353249; border-radius: 16px; aspect-ratio: 16 / 10;
}
video { width: 100%; height: 100%; object-fit: cover; }
.video-label {
  position: absolute; left: 12px; bottom: 12px; background: #171627dd;
  border-radius: 7px; padding: 6px 10px; font-size: .75rem;
}
#status { text-align: center; min-height: 26px; margin: 22px 0 16px; color: #c4baff; }
.controls { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
button {
  border: 1px solid #49465e; border-radius: 10px; padding: 12px 16px;
  background: #252438; color: white; font: inherit; font-weight: 700; cursor: pointer;
}
button.primary { background: #7762ef; border-color: #7762ef; justify-self: start; }
button.danger { border-color: #9c4259; }
button:disabled { opacity: .4; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #b5a9ff; outline-offset: 2px; }
.text-button { display: block; margin: 0 auto; background: transparent; border-color: transparent; color: #b5a9ff; }
.chat-panel { margin-top: 20px; }
.chat-panel h2 { margin-bottom: 2px; }
.chat-hint { margin: 3px 0 12px; }
.chat-messages {
  list-style: none; padding: 10px; margin: 0; min-height: 110px; max-height: 300px;
  overflow-y: auto; border: 1px solid #37334f; border-radius: 10px; background: #11111d;
}
.chat-messages:empty::before { content: "Your call messages will appear here."; color: #77758e; }
.chat-message { margin: 0 0 9px; overflow-wrap: anywhere; }
.chat-message:last-child { margin-bottom: 0; }
.chat-message strong { color: #b5a9ff; }
.chat-message.own strong { color: #9bd8c1; }
.chat-error { min-height: 1.4em; margin: 5px 0; color: #ff9bb2; font-size: .88rem; }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.footnote { text-align: center; line-height: 1.6; margin-top: 24px; }
footer { text-align: center; color: #77758e; padding: 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.admin-page main { width: min(1200px, 94%); }
.admin-login, .admin-panel { max-width: 700px; margin: 28px auto; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.admin-heading h1 { margin-top: 3px; }
.admin-login form, .admin-password-form { display: grid; gap: 12px; }
.admin-login label, .admin-password-form label { font-weight: 700; }
.admin-error { color: #ff9bb2; min-height: 1.4em; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.admin-tabs button[aria-pressed="true"] { background: #7762ef; border-color: #7762ef; }
.admin-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.summary-card { padding: 14px; border: 1px solid #37334f; border-radius: 12px; background: #11111d; }
.summary-card strong { display: block; font-size: 1.5rem; color: #b5a9ff; }
.table-wrap { overflow-x: auto; border: 1px solid #37334f; border-radius: 10px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #302e42; vertical-align: top; overflow-wrap: anywhere; }
.admin-table th { background: #151423; position: sticky; top: 0; }
.admin-pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.admin-note { color: #aaa9c2; font-size: .9rem; }
@media (max-width: 600px) {
  header { padding: 18px 4%; }
  .secure { font-size: .72rem; }
  main { margin-top: 24px; }
  .videos { grid-template-columns: 1fr; }
  .profile-fields { grid-template-columns: 1fr; gap: 7px; }
  .profile-fields small { grid-column: 1; margin: -2px 0 5px; }
  .profile-form { gap: 12px; }
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
  .admin-heading { align-items: flex-start; }
}
