:root {
  --bg-page: #0b101b;
  --bg-panel: #111827;
  --bg-card: #161f32;
  --bg-card-hover: #1c2740;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(56, 189, 248, 0.42);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #fb7185;
  --radius: 16px;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 12% 10%, #172554 0%, var(--bg-page) 48%);
  color: var(--text-main);
  min-height: 100vh;
}

.mono {
  font-family: "JetBrains Mono", monospace;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1680px;
  margin: 0 auto;
  padding: 12px 16px;
  gap: 12px;
}

/* TOPBAR */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(17, 24, 39, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-emerald));
  box-shadow: 0 0 16px var(--accent);
}

.brand h1 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-live {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid var(--border);
  color: #cbd5e1;
}

.dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.btn-ghost, .btn-outline, .btn-primary, .btn-zalo {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-ghost {
  background: rgba(30, 41, 59, 0.72);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 6px 11px;
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: rgba(56, 189, 248, 0.12);
}

.btn-zalo {
  background: linear-gradient(135deg, #0068ff, #0284c7);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.5);
  padding: 6px 12px;
}

.btn-zalo:hover {
  filter: brightness(1.12);
}

.voice-select {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  background: rgba(30, 41, 59, 0.88);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 7px 12px;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  border: none;
  padding: 8px 14px;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

/* STUDIO LAYOUT */
.studio-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 14px;
}

/* LEFT: AVATAR PANEL */
.avatar-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 0;
  box-shadow: var(--shadow);
}

.avatar-stage {
  position: relative;
  height: 290px;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #1e3a5f 0%, #090e1a 78%);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

#avatarCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-overlay-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  pointer-events: none;
}

.state-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 16, 27, 0.76);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  color: var(--accent-emerald);
}

.state-chip.thinking { color: var(--accent-amber); }
.state-chip.speaking { color: var(--accent); }
.state-chip.listening { color: var(--accent-rose); }

.readback-shield {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.24);
  border: 1px solid rgba(245, 158, 11, 0.65);
  color: #fde68a;
  text-align: center;
}

.autoplay-banner {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.75);
  background: rgba(2, 132, 199, 0.94);
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
  z-index: 12;
  white-space: nowrap;
}

/* CHAT TRANSCRIPT */
.chat-transcript {
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.msg {
  max-width: 92%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.48;
}

.msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0369a1, #0284c7);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg.assistant {
  align-self: flex-start;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid var(--border);
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

.msg.system {
  align-self: center;
  font-size: 11px;
  color: var(--text-muted);
  background: transparent;
  padding: 2px 6px;
}

.chat-qr-box {
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(11, 16, 27, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.45);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.chat-qr-img {
  width: 180px;
  max-width: 100%;
  border-radius: 10px;
  display: block;
  background: #ffffff;
  padding: 4px;
  border: 2px solid #38bdf8;
  cursor: pointer;
}

.chat-qr-meta {
  font-size: 12px;
  color: #e0f2fe;
}

.btn-zalo-chat {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0068ff, #0284c7);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

/* INPUT DOCK */
.input-dock {
  display: flex;
  align-items: center;
  gap: 7px;
}

.btn-mic, .btn-upload {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.85);
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}

.btn-mic.recording {
  background: rgba(244, 63, 94, 0.28);
  border-color: var(--accent-rose);
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.45);
}

.btn-mic:hover, .btn-upload:hover {
  border-color: var(--accent);
}

.text-input {
  flex: 1;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-main);
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.text-input:focus {
  border-color: var(--accent);
}

.btn-send {
  height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  color: #06131f;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* RIGHT: SHOWCASE PANEL */
.showcase-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-height: 0;
  overflow-y: auto;
}

.showcase-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.showcase-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fpill {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
}

.fpill.cleared {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fda4af;
  text-decoration: line-through;
}

.fpill.muted {
  background: rgba(30, 41, 59, 0.65);
  border-color: var(--border);
  color: var(--text-muted);
}

/* INLINE ZALO BANNER */
.zalo-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 104, 255, 0.2), rgba(15, 23, 42, 0.94));
  border: 1px solid rgba(56, 189, 248, 0.55);
  flex-wrap: wrap;
}

.zalo-banner-qr {
  width: 118px;
  height: 118px;
  border-radius: 12px;
  background: #ffffff;
  padding: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

.zalo-banner-body {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zalo-banner-body h3 {
  font-size: 14.5px;
  color: #e0f2fe;
}

.zalo-banner-body p {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.45;
}

/* BOOKING CARD */
.booking-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.booking-card.confirmed {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.94));
  border-color: rgba(16, 185, 129, 0.55);
}

.booking-card h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 12.5px;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.booking-actions {
  display: flex;
  gap: 8px;
}

/* COMPARE DRAWER */
.compare-drawer {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

/* ROOMS GRID */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 14px;
}

.room-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.room-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.room-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28);
}

.room-photo-wrap {
  position: relative;
  height: 176px;
  background: #0f172a;
  overflow: hidden;
}

.room-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.price-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(9, 14, 26, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-weight: 700;
  font-size: 12.5px;
}

.code-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(9, 14, 26, 0.78);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
}

.match-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(16, 185, 129, 0.9);
  color: #052e16;
  font-size: 11px;
  font-weight: 700;
}

.photo-thumbs {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: rgba(9, 14, 26, 0.55);
  overflow-x: auto;
}

.photo-thumbs img {
  width: 38px;
  height: 30px;
  border-radius: 5px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.65;
  border: 1px solid transparent;
}

.photo-thumbs img.active, .photo-thumbs img:hover {
  opacity: 1;
  border-color: var(--accent);
}

.room-body {
  padding: 11px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.room-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.room-addr {
  font-size: 11.5px;
  color: var(--text-muted);
}

.sub-units-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px dashed rgba(56, 189, 248, 0.3);
  font-size: 11.5px;
}

.sub-unit-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(51, 65, 85, 0.68);
  color: #cbd5e1;
}

.tag.pet-yes { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
.tag.pet-no { background: rgba(244, 63, 94, 0.16); color: #fda4af; }

.fees-row {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.45;
}

.room-actions {
  margin-top: auto;
  padding-top: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.74);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-box {
  width: 92%;
  max-width: 420px;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.zalo-modal-box {
  text-align: center;
}

.zalo-reason {
  font-size: 12.5px;
  color: #cbd5e1;
  margin-bottom: 12px;
  line-height: 1.45;
}

.zalo-qr-frame {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  display: inline-block;
  margin-bottom: 10px;
}

.zalo-qr-frame img {
  width: 240px;
  height: auto;
  display: block;
  border-radius: 8px;
}

.zalo-contact-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #38bdf8;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
}

.modal-room-label {
  font-size: 12.5px;
  color: var(--accent);
  margin-bottom: 12px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.form-row label {
  font-size: 12px;
  color: var(--text-muted);
}

.form-row input {
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #0b101b;
  color: #fff;
  padding: 0 10px;
  font-family: inherit;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 980px) {
  .app-shell { height: auto; }
  .studio-grid { grid-template-columns: 1fr; }
  .avatar-stage { height: 240px; }
}

/* V7: TOPBAR ADMIN LINK, REPLAY BUTTON, DISTANCE BADGE & ROOM DETAIL LIGHTBOX MODAL */
.btn-admin-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.msg-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.btn-replay {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.btn-replay:hover {
  background: rgba(56, 189, 248, 0.28);
  color: #ffffff;
}

.dist-badge {
  display: inline-block;
  margin: 4px 0 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  font-size: 11.5px;
  font-weight: 600;
}

.room-photo-wrap img { cursor: pointer; }

.detail-modal-box {
  width: min(980px, 94vw) !important;
  max-width: 980px !important;
  max-height: 90vh;
  overflow-x: hidden !important;
  overflow-y: auto;
  padding: 22px 24px;
  border-radius: 18px;
  box-sizing: border-box;
}

.detail-modal-box *,
.detail-modal-grid > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.detail-modal-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 22px;
  align-items: start;
  margin-top: 12px;
}

@media (max-width: 820px) {
  .detail-modal-grid { grid-template-columns: 1fr; }
}

.lightbox-stage {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #090e1a;
  border: 1px solid var(--border);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.lb-prev { left: 10px; }
.lb-next { right: 10px; }

.lb-counter {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
}

.detail-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 8px;
  padding: 6px 0;
}

.detail-thumbs img {
  width: 64px;
  height: 48px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.72;
}
.detail-thumbs img.active {
  border-color: #38bdf8;
  opacity: 1;
}

.detail-desc-wrap {
  margin-top: 10px;
}

.detail-desc-label {
  font-size: 12px;
  font-weight: 700;
  color: #bae6fd;
  margin-bottom: 5px;
}

.detail-desc {
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
  line-height: 1.55;
  color: #cbd5e1;
  white-space: pre-line;
  max-height: 170px;
  overflow-y: auto;
  word-break: break-word;
}

.fees-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 12px;
}

.fee-tile {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.fee-tile-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.fee-tile-val {
  font-size: 12.5px;
  font-weight: 700;
  color: #f1f5f9;
}

.cost-calc-box {
  margin-top: 8px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.cost-calc-box h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: #bae6fd;
}

.calc-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 10px;
}

.calc-controls label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: #cbd5e1;
}

.calc-controls input[type="range"] {
  width: 100%;
  accent-color: #38bdf8;
}

.calc-breakdown {
  font-size: 12.5px;
  line-height: 1.65;
  color: #e2e8f0;
}

.calc-elec-note {
  margin-top: 6px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
  font-size: 12px;
}

.calc-total-line {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  font-size: 14px;
  font-weight: 700;
  color: #7dd3fc;
}

.detail-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.detail-cta-row button {
  width: 100%;
  justify-content: center;
  text-align: center;
  padding: 10px 12px;
  font-size: 13px;
}

/* V8: ADMIN UNLOCK GLOW, IN-CHAT ADMIN BUTTON & MIC HELPER MODAL */
.admin-unlocked-glow {
  border-color: #38bdf8 !important;
  background: rgba(2, 132, 199, 0.28) !important;
  color: #e0f2fe !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

.btn-admin-unlock-chat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}
.btn-admin-unlock-chat:hover { filter: brightness(1.1); }

.mic-modal-box {
  width: min(620px, 94vw) !important;
  max-width: 620px !important;
}

.mic-https-banner {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 12.5px;
  color: #a7f3d0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.mic-https-banner.warn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fde68a;
}

.mic-diag-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 6px 0 12px;
}

.mic-sim-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #bae6fd;
  margin-bottom: 8px;
}

.mic-sim-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.mic-sim-btn {
  text-align: left;
  justify-content: flex-start;
  font-size: 12.5px;
}

.mic-sim-custom {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* V12: MOBILE & TIKTOK / FACEBOOK / INSTAGRAM BIO-LINK RESPONSIVE OPTIMIZATION */
@media (max-width: 900px) {
  .app-shell {
    height: auto;
    min-height: 100dvh;
    padding: 10px 10px 24px;
    gap: 10px;
  }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .topbar-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }
  .studio-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .avatar-stage {
    height: 210px;
  }
  .chat-transcript {
    min-height: 190px;
    max-height: 320px;
  }
  .room-grid {
    grid-template-columns: 1fr;
  }
  .detail-modal-box {
    width: 96vw !important;
    max-height: 92dvh;
    padding: 16px;
  }
  .detail-modal-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .lightbox-stage {
    height: 240px;
  }
}

@media (max-width: 600px) {
  .brand h1 {
    font-size: 16px;
  }
  .brand-sub {
    font-size: 11.5px;
  }
  .topbar-meta .btn-zalo,
  .topbar-meta .btn-ghost,
  .topbar-meta .pill-metric {
    font-size: 12px;
    padding: 7px 10px;
  }
  .avatar-stage {
    height: 210px;
  }
  .input-dock {
    padding: 10px;
    gap: 8px;
  }
  .btn-mic,
  .btn-upload {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 19px;
  }
  .text-input {
    height: 44px;
    font-size: 15px;
  }
  .btn-send {
    height: 44px;
    padding: 0 16px;
    font-size: 14px;
  }
  .fees-grid-2x2,
  .calc-controls,
  .detail-cta-row {
    grid-template-columns: 1fr;
  }
  .showcase-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
