/* ==========================================================================
   DigMeet Barcelona - Modern Glassmorphism, Dark/Light Mode & Sidebar System
   ========================================================================== */

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #121927;
  --bg-main: #0a0e17;
  --bg-card: rgba(22, 31, 49, 0.75);
  --bg-sidebar: #0d1320;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #00d2ff;
  
  --accent-cyan: #00d2ff;
  --accent-blue: #3a7bd5;
  --accent-purple: #7f00ff;
  --accent-danger: #ff4757;
  --accent-success: #2ed573;
  --accent-warning: #ffa502;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --sidebar-text: #334155;
  --sidebar-text-active: #0284c7;
  
  --accent-cyan: #0284c7;
  --accent-purple: #7e22ce;

  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #cbd5e1;
  --glass-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.06);
}

/* Responsive Dark/Light SaaS & Tenant Logos */
.digmeet-logo-dark,
.tenant-logo-dark {
  display: inline-block !important;
}
.digmeet-logo-light,
.tenant-logo-light {
  display: none !important;
}
[data-theme="light"] .digmeet-logo-dark,
[data-theme="light"] .tenant-logo-dark {
  display: none !important;
}
[data-theme="light"] .digmeet-logo-light,
[data-theme="light"] .tenant-logo-light {
  display: inline-block !important;
}

.timeline-session-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.transcript-code-box {
  font-size: 0.85rem;
  color: var(--text-main);
  font-family: monospace;
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.85rem;
  border-radius: 6px;
  line-height: 1.6;
  transition: all 0.3s ease;
}

.transcript-code-box.collapsed-preview {
  max-height: 76px;
  overflow: hidden;
  position: relative;
}

.transcript-code-box.collapsed-preview::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.95) 100%);
  pointer-events: none;
}

[data-theme="light"] .transcript-code-box.collapsed-preview::after {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0) 0%, rgba(241, 245, 249, 0.98) 100%);
}

.transcript-code-box.expanded-full {
  max-height: 600px;
  overflow-y: auto;
}

.transcript-code-box.expanded-full::after {
  display: none;
}

.ai-summary-box {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  color: #e056fd;
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

[data-theme="light"] .timeline-session-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .transcript-code-box {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .ai-summary-box {
  background: #f3e8ff;
  border: 1px solid #d8b4fe;
  color: #6b21a8;
  font-weight: 600;
}

/* Onboarding Step Cards */
.onboarding-step-card {
  padding: 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.6);
  transition: all 0.2s ease;
}

.onboarding-step-card.is-done {
  border-color: var(--accent-success) !important;
  background: rgba(46, 213, 115, 0.08) !important;
}

[data-theme="light"] .onboarding-step-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .onboarding-step-card.is-done {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
}

[data-theme="light"] .onboarding-step-card p {
  color: #64748b !important;
}

/* Landing Page Footer Theme Support */
.landing-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  padding: 4rem 2rem 2rem;
  width: 100%;
  box-sizing: border-box;
}

[data-theme="light"] .landing-footer {
  background: #f1f5f9 !important;
  border-top: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .landing-footer p,
[data-theme="light"] .landing-footer span,
[data-theme="light"] .landing-footer a,
[data-theme="light"] .landing-footer ul li {
  color: #475569 !important;
}

[data-theme="light"] .landing-footer hr {
  border-top: 1px solid #cbd5e1 !important;
}

/* Calendar & Agenda Adaptive Classes */
.calendar-day-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  min-height: 70px;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  text-align: left;
}

.calendar-day-box.is-holiday {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid #f59e0b;
}

.calendar-day-box.has-app {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
}

[data-theme="light"] .calendar-day-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .calendar-day-box.is-holiday {
  background: #fef3c7;
  border: 1px solid #f59e0b;
}

[data-theme="light"] .calendar-day-box.has-app {
  background: #d1fae5;
  border: 1px solid #10b981;
}

.cal-text-holiday {
  color: #b45309;
  font-weight: 700;
}

.cal-text-app {
  color: #047857;
  font-weight: 700;
}

[data-theme="dark"] .cal-text-holiday {
  color: #ffeaa7;
}

[data-theme="dark"] .cal-text-app {
  color: #7bed9f;
}

/* Patient Details CRM Adaptive Classes */
.patient-profile-banner {
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.08), rgba(127, 0, 255, 0.08));
}

.patient-profile-banner span.label-muted {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.patient-profile-banner span.val-highlight {
  color: #a855f7;
  font-weight: 700;
}

.appointment-item-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.task-item-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

[data-theme="light"] .patient-profile-banner {
  background: linear-gradient(135deg, #e0f2fe, #f3e8ff);
  border: 1px solid #7dd3fc;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .patient-profile-banner span.val-highlight {
  color: #6b21a8;
  font-weight: 700;
}

[data-theme="light"] .appointment-item-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .task-item-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .task-input-form-control {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

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

a {
  text-decoration: none;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Overall App Sidebar Layout */
.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Left Vertical Sidebar (GetDigDesk Style) */
.app-sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  color: var(--text-main);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.sidebar-brand span.highlight {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  background: rgba(0, 210, 255, 0.08);
  color: var(--text-main);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), rgba(58, 123, 213, 0.2));
  border: 1px solid var(--accent-cyan);
  color: var(--sidebar-text-active) !important;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2);
}

/* Sidebar Dropdown Menu (ERP, etc.) */
.sidebar-dropdown {
  position: relative;
  display: flex;
  flex-direction: column;
}

.sidebar-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
}

.sidebar-dropdown-arrow {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.25s ease, color 0.2s ease;
  margin-left: auto;
}

.sidebar-dropdown:hover .sidebar-dropdown-arrow,
.sidebar-dropdown.open .sidebar-dropdown-arrow {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.sidebar-submenu {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 0.75rem;
  margin-left: 1.1rem;
  border-left: 2px solid rgba(0, 210, 255, 0.25);
  margin-top: 0.25rem;
  margin-bottom: 0.35rem;
  animation: fadeInSubmenu 0.2s ease-out;
}

@keyframes fadeInSubmenu {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.sidebar-dropdown:hover .sidebar-submenu,
.sidebar-dropdown.open .sidebar-submenu,
.sidebar-dropdown:focus-within .sidebar-submenu {
  display: flex;
}

.sidebar-submenu .sidebar-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.86rem;
  gap: 0.6rem;
}

.sidebar-submenu .sidebar-link.active {
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid var(--accent-cyan);
  box-shadow: none;
}

.sidebar-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  padding-bottom: 2.25rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Content Area */
.app-main-content {
  padding: 2rem;
  max-width: 1300px;
}

/* Header & Badges */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none !important;
}

.brand-logo span.highlight {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-group {
  display: flex;
  gap: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.badge.bcn {
  border-color: rgba(255, 165, 2, 0.3);
  color: #ffeaa7;
}

.badge.gdpr {
  border-color: rgba(46, 213, 115, 0.3);
  color: #7bed9f;
}

[data-theme="light"] .badge {
  background: rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
  color: #334155;
  font-weight: 600;
}

[data-theme="light"] .badge.bcn {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.4);
  color: #92400e;
  font-weight: 700;
}

[data-theme="light"] .badge.gdpr {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #065f46;
  font-weight: 700;
}

/* Hero Container & Landing Page Rhythm */
.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 1.5rem;
  max-width: 1360px;
  width: 96%;
  margin: 0 auto;
}

.landing-std-section {
  max-width: 1140px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.landing-wide-section {
  max-width: 1320px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.landing-block-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 24px;
  padding: 3rem 2rem;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Feature Showcase Grid - 10 items (3 columns on desktop with 10th card centered in column 2) */
@media (min-width: 992px) {
  .features-showcase-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
  }
  .features-showcase-grid > .card:last-child:nth-child(3n+1) {
    grid-column: 2 !important;
  }
}

@media (min-width: 641px) and (max-width: 991px) {
  .features-showcase-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
}

@media (max-width: 640px) {
  .features-showcase-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 650px;
}

.action-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

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

/* Select Dropdown Contrast System */
select.form-input {
  background-color: #121927;
  color: var(--text-main);
  cursor: pointer;
}

select.form-input option {
  background-color: #0f172a;
  color: #f8fafc;
  padding: 0.5rem;
}

[data-theme="light"] select.form-input {
  background-color: #ffffff;
  color: #0f172a;
}

[data-theme="light"] select.form-input option {
  background-color: #ffffff;
  color: #0f172a;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
  opacity: 0.95;
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.45);
}

.btn-danger {
  background: var(--accent-danger);
  color: #fff;
}

.btn-digdesk {
  background: linear-gradient(135deg, #f0932b, #eb4d4b);
  color: #fff;
}

.btn-plan-basic {
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan) !important;
  font-weight: 700;
}

.btn-plan-basic:hover {
  background: rgba(0, 210, 255, 0.25);
  color: #ffffff !important;
}

.btn-plan-clinic {
  background: rgba(127, 0, 255, 0.15);
  border: 1px solid var(--accent-purple);
  color: #a855f7 !important;
  font-weight: 700;
}

.btn-plan-clinic:hover {
  background: rgba(127, 0, 255, 0.25);
  color: #ffffff !important;
}

[data-theme="light"] .btn-plan-basic {
  background: #e0f2fe;
  border: 1px solid #0284c7;
  color: #0284c7 !important;
  font-weight: 700;
}

[data-theme="light"] .btn-plan-basic:hover {
  background: #0284c7;
  color: #ffffff !important;
}

[data-theme="light"] .btn-plan-clinic {
  background: #f3e8ff;
  border: 1px solid #7e22ce;
  color: #7e22ce !important;
  font-weight: 700;
}

[data-theme="light"] .btn-plan-clinic:hover {
  background: #7e22ce;
  color: #ffffff !important;
}

/* Meeting Room View Layout Fix */
.room-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  height: calc(100vh - 65px);
  padding: 0.85rem 1rem;
  gap: 1rem;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  background: var(--bg-main);
  transition: grid-template-columns 0.3s ease;
}

.room-container.chat-collapsed {
  grid-template-columns: 1fr 0px;
  gap: 0;
}

.video-section {
  display: flex;
  flex-direction: column;
  position: relative;
  background: #090d16;
  padding: 0;
  height: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  overflow: hidden;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  height: 100%;
  gap: 1rem;
  padding: 0.75rem;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
}

.video-grid.multi-peer,
.video-grid:has(.video-tile:nth-child(2)) {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* Layout Focus Mode (Patient in Large Screen + Host in PiP) */
.video-grid.layout-focus {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
}

.video-grid.layout-focus .video-tile.is-focus {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 1;
}

.video-grid.layout-focus .video-tile.is-pip {
  position: absolute;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 220px;
  height: 150px;
  border-radius: var(--radius-md);
  z-index: 35;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
}

.video-grid.layout-focus .video-tile.is-pip:hover {
  transform: scale(1.05);
  border-color: #ffffff;
}

.video-grid.layout-focus .video-tile.is-pip .lower-third-badge {
  display: none;
}

@media (max-width: 768px) {
  .video-grid.multi-peer,
  .video-grid:has(.video-tile:nth-child(2)) {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .video-grid.layout-focus .video-tile.is-pip {
    bottom: 5.5rem;
    right: 0.75rem;
    width: 120px;
    height: 170px;
    border-radius: 12px;
  }
}

.video-tile {
  position: relative;
  background: #090d16;
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.peer-name {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #ffffff !important;
  font-weight: 700;
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
}

/* Professional Lower-Third Name Badge (Chyron) - Placed safely above control bar */
.lower-third-badge {
  position: absolute;
  bottom: 5.5rem;
  left: 1.5rem;
  z-index: 25;
  display: flex;
  align-items: stretch;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(0, 210, 255, 0.45);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  max-width: 80%;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInLowerThird 0.4s ease forwards;
}

.lower-third-badge.style-purple {
  border-color: rgba(168, 85, 247, 0.55);
}
.lower-third-badge.style-purple .badge-accent-bar {
  background: linear-gradient(180deg, #a855f7, #7c3aed);
}

.lower-third-badge.style-emerald {
  border-color: rgba(46, 213, 115, 0.55);
}
.lower-third-badge.style-emerald .badge-accent-bar {
  background: linear-gradient(180deg, #2ed573, #10b981);
}

.lower-third-badge.style-dark {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.92);
}
.lower-third-badge.style-dark .badge-accent-bar {
  background: #94a3b8;
}

.lower-third-badge.hidden-badge {
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  pointer-events: none;
}

.badge-accent-bar {
  width: 5px;
  background: linear-gradient(180deg, var(--accent-cyan), #0070f3);
}

.badge-content {
  padding: 0.45rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.badge-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.badge-verified {
  font-size: 0.85rem;
}

.badge-company {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-weight: 600;
  white-space: nowrap;
  margin-top: 0.1rem;
}

@keyframes slideInLowerThird {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.controls-bar {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  background: rgba(15, 23, 38, 0.85);
  padding: 0.75rem 1.25rem;
  border-radius: 40px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  z-index: 100;
}

.control-btn {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn.btn-digdesk {
  width: auto;
  min-width: max-content;
  border-radius: 24px;
  white-space: nowrap;
  font-size: 0.85rem;
  padding: 0 1rem;
}

/* Whiteboard Header Layout */
.whiteboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  gap: 0.75rem;
}

.wb-header-top, .wb-header-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sidebar-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.sidebar-panel.hidden,
.room-container.chat-collapsed .sidebar-panel {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  color: #ffffff !important;
  font-size: 0.95rem;
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-bubble {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  color: #f8fafc !important;
}

.chat-bubble .sender {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent-cyan, #38bdf8);
  margin-bottom: 0.25rem;
}

.chat-bubble .msg {
  color: #e2e8f0 !important;
  font-size: 0.86rem;
  line-height: 1.45;
  word-break: break-word;
}

.chat-bubble.system-bubble {
  background: rgba(0, 210, 255, 0.12) !important;
  border: 1px solid rgba(0, 210, 255, 0.3) !important;
}

.chat-bubble.system-bubble .sender {
  color: #38bdf8 !important;
}

.chat-bubble.system-bubble .msg {
  color: #f1f5f9 !important;
}

.chat-input-area {
  padding: 1rem 1rem 1.25rem 1rem;
  margin-bottom: 0.4rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 200;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  max-width: 500px;
  width: 90%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--glass-shadow);
  position: relative;
}

/* ==========================================================================
   Mobile Responsive System (@media max-width: 900px & 768px)
   ========================================================================== */

/* Mobile Navigation Header bar for SaaS Panel & Client Portal */
.mobile-top-bar {
  display: none;
  height: 56px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1rem;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 150;
}

.mobile-nav-toggle {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.mobile-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 170;
}

.sidebar-backdrop.active {
  display: block;
}

@media (max-width: 900px) {
  .mobile-top-bar {
    display: flex;
  }

  .app-layout {
    display: block !important;
    width: 100% !important;
  }

  .app-main-content {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 1rem !important;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    width: 290px;
    max-width: 85vw;
    z-index: 9999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0 !important;
    padding: 1rem !important;
    width: 100% !important;
  }

  /* Grid layout responsive collapses */
  .grid-2, .grid-3, .grid-4, .stats-grid, .wizard-grid {
    grid-template-columns: 1fr !important;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .card {
    padding: 1.1rem !important;
  }
}

@media (max-width: 768px) {
  /* Landing Page Mobile Fixes */
  .app-header {
    padding: 0.65rem 1rem !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: auto !important;
    gap: 0.5rem !important;
  }

  .brand-logo {
    font-size: 1.15rem !important;
    gap: 0.4rem !important;
  }

  .badge-group {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
  }

  .badge.bcn, .badge.gdpr, .mobile-hide-badge {
    display: none !important;
  }

  .hero-container {
    padding: 1.75rem 1rem 4rem 1rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .hero-title {
    font-size: 1.85rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.75rem !important;
  }

  .hero-subtitle {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.5rem !important;
    padding: 0 0.25rem !important;
  }

  .action-card-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    width: 100% !important;
  }

  .card {
    padding: 1.25rem !important;
    box-sizing: border-box !important;
  }

  /* Floating Buttons on Mobile */
  .floating-theme-btn {
    bottom: 1rem !important;
    left: 1rem !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.75rem !important;
    border-radius: 30px !important;
  }

  .floating-whatsapp-btn {
    bottom: 1rem !important;
    right: 1rem !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.8rem !important;
    border-radius: 30px !important;
  }

  /* Video Room Mobile Ultra-Modern Optimizations */
  .room-header {
    height: 50px !important;
    padding: 0 0.75rem !important;
  }

  .room-header .hide-on-mobile {
    display: none !important;
  }

  .room-container {
    display: block !important;
    position: relative !important;
    height: calc(100dvh - 50px) !important;
    height: calc(100vh - 50px) !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .video-section {
    position: absolute !important;
    inset: 0 !important;
    height: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  .sidebar-panel#chatPanel {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 70vh !important;
    max-height: 70vh !important;
    z-index: 180 !important;
    border-radius: 20px 20px 0 0 !important;
    border: 1px solid var(--accent-cyan) !important;
    border-bottom: none !important;
    background: rgba(10, 14, 23, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.85) !important;
    transform: translateY(105%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .sidebar-panel#chatPanel.mobile-open {
    transform: translateY(0%) !important;
  }

  /* Whiteboard Mobile Optimization */
  .whiteboard-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }

  .wb-header-top {
    justify-content: space-between !important;
    width: 100% !important;
  }

  .wb-header-tools {
    justify-content: space-between !important;
    background: rgba(255, 255, 255, 0.05) !important;
    padding: 0.35rem 0.6rem !important;
    border-radius: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #whiteboardModal .modal-content {
    height: 85vh !important;
    padding: 0.75rem !important;
    max-width: 96vw !important;
  }

  /* Control Bar Mobile Frame Fix */
  .controls-bar {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: max(0.75rem, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: 94vw !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    justify-content: flex-start !important;
    padding: 0.4rem 0.6rem !important;
    gap: 0.45rem !important;
    border-radius: 14px !important;
    background: rgba(15, 23, 38, 0.94) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    contain: paint !important;
    z-index: 100 !important;
  }

  .controls-bar::-webkit-scrollbar {
    display: none !important;
  }

  .control-btn {
    flex-shrink: 0 !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    font-size: 1rem !important;
  }

  .control-btn.btn-digdesk {
    width: auto !important;
    min-width: max-content !important;
    white-space: nowrap !important;
    padding: 0 0.65rem !important;
    font-size: 0.75rem !important;
    border-radius: 10px !important;
  }

  #subtitlesBanner {
    bottom: 5.2rem !important;
    max-width: 92% !important;
    font-size: 0.82rem !important;
    padding: 0.45rem 0.75rem !important;
  }
}

/* Notification Bell Animation */
@keyframes pulseNotif {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(255, 71, 87, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}
/* High-Contrast Purple Buttons & Text */
.btn-purple-contrast {
  color: #9333ea !important;
  border-color: #9333ea !important;
  font-weight: 800 !important;
}

[data-theme="light"] .btn-purple-contrast,
body.light-mode .btn-purple-contrast {
  color: #7e22ce !important;
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: #7e22ce !important;
}

[data-theme="dark"] .btn-purple-contrast {
  color: #c084fc !important;
  border-color: #a855f7 !important;
  background: rgba(168, 85, 247, 0.18) !important;
}

[data-theme="light"] .patient-profile-banner span.val-highlight {
  color: #7e22ce !important;
  font-weight: 700;
}
/* ==========================================
   Adaptive Input, Select & Modal Color Engine
   ========================================== */
.form-input,
input.form-input,
select.form-input,
textarea.form-input {
  background-color: var(--bg-secondary) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
}

select.form-input option {
  background-color: var(--bg-secondary);
  color: var(--text-main);
}

[data-theme="light"] .form-input,
[data-theme="light"] input.form-input,
[data-theme="light"] select.form-input,
[data-theme="light"] textarea.form-input,
[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="submit"]):not([type="button"]),
[data-theme="light"] select,
[data-theme="light"] textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] .modal-content {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .modal-content label {
  color: #334155 !important;
}

[data-theme="light"] .card {
  background-color: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
}

[data-theme="light"] .filter-bar,
[data-theme="light"] .table-container {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

/* ==========================================================================
   DigMeet Barcelona - 4 Professional Video Room Archetypes / Themes
   ========================================================================== */

/* 1. CORPORATE & EXECUTIVE THEME (Navy, Platinum & Sapphire) */
[data-room-theme="corporate"],
body.room-theme-corporate {
  --bg-primary: #070d19;
  --bg-secondary: #0f1c30;
  --bg-card: rgba(15, 28, 48, 0.9);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #38bdf8;
  --accent-blue: #1d4ed8;
  --accent-purple: #2563eb;
  --border-color: rgba(56, 189, 248, 0.22);
  --glass-shadow: 0 10px 30px rgba(7, 13, 25, 0.6);
  --radius-md: 8px;
}
[data-room-theme="corporate"] .room-control-bar,
body.room-theme-corporate .room-control-bar {
  background: rgba(15, 28, 48, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
}
[data-room-theme="corporate"] .video-tile,
body.room-theme-corporate .video-tile {
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* 2. LEGAL & BUFETE THEME (Ebony, Warm Gold & Burgundy) */
[data-room-theme="legal"],
body.room-theme-legal {
  --bg-primary: #12100e;
  --bg-secondary: #1c1917;
  --bg-card: rgba(28, 25, 23, 0.92);
  --text-main: #fef3c7;
  --text-muted: #d6d3d1;
  --accent-cyan: #d97706;
  --accent-blue: #b45309;
  --accent-purple: #9a3412;
  --border-color: rgba(217, 119, 6, 0.28);
  --glass-shadow: 0 10px 30px rgba(18, 16, 14, 0.7);
  --radius-md: 6px;
}
[data-room-theme="legal"] .room-control-bar,
body.room-theme-legal .room-control-bar {
  background: rgba(28, 25, 23, 0.95);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 10px;
}
[data-room-theme="legal"] .video-tile,
body.room-theme-legal .video-tile {
  border-radius: 6px;
  border: 1px solid rgba(217, 119, 6, 0.25);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* 3. HEALTH & CLINICAL THEME (Teal Calm, Pure Mint & Slate) */
[data-room-theme="health"],
body.room-theme-health {
  --bg-primary: #021a19;
  --bg-secondary: #042f2e;
  --bg-card: rgba(4, 47, 46, 0.9);
  --text-main: #f0fdfa;
  --text-muted: #99f6e4;
  --accent-cyan: #14b8a6;
  --accent-blue: #0d9488;
  --accent-purple: #0f766e;
  --border-color: rgba(20, 184, 166, 0.25);
  --glass-shadow: 0 10px 30px rgba(2, 26, 25, 0.6);
  --radius-md: 12px;
}
[data-room-theme="health"] .room-control-bar,
body.room-theme-health .room-control-bar {
  background: rgba(4, 47, 46, 0.95);
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 16px;
}
[data-room-theme="health"] .video-tile,
body.room-theme-health .video-tile {
  border-radius: 12px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* 4. TECH & INNOVATION THEME (Obsidian Cyber & Neon Cyan) */
[data-room-theme="tech"],
body.room-theme-tech {
  --bg-primary: #0a0e17;
  --bg-secondary: #121927;
  --bg-card: rgba(22, 31, 49, 0.85);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #00d2ff;
  --accent-blue: #3a7bd5;
  --accent-purple: #7f00ff;
  --border-color: rgba(0, 210, 255, 0.25);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --radius-md: 14px;
}
[data-room-theme="tech"] .room-control-bar,
body.room-theme-tech .room-control-bar {
  background: rgba(18, 25, 39, 0.92);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: 20px;
}

/* ==========================================================================
   Per-Theme Control Buttons & Badge Customization
   ========================================================================== */

/* 1. CORPORATE: Rectangular, Steel & Sapphire */
[data-room-theme="corporate"] .control-btn,
body.room-theme-corporate .control-btn {
  border-radius: 8px !important;
  background: rgba(15, 28, 48, 0.85) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  color: #f1f5f9 !important;
  width: 44px;
  height: 44px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}
[data-room-theme="corporate"] .control-btn:hover,
body.room-theme-corporate .control-btn:hover {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}
[data-room-theme="corporate"] .lower-third-badge,
body.room-theme-corporate .lower-third-badge {
  border-left: 4px solid #38bdf8 !important;
  background: rgba(15, 28, 48, 0.95) !important;
  border-radius: 6px !important;
}

/* 2. LEGAL / BUFETE: Sharp Geometry, Ebony & Warm Gold */
[data-room-theme="legal"] .control-btn,
body.room-theme-legal .control-btn {
  border-radius: 4px !important;
  background: rgba(28, 25, 23, 0.92) !important;
  border: 1px solid rgba(217, 119, 6, 0.45) !important;
  color: #fef3c7 !important;
  width: 44px;
  height: 44px;
  box-shadow: 0 4px 14px rgba(18, 16, 14, 0.6);
  transition: all 0.2s ease;
}
[data-room-theme="legal"] .control-btn:hover,
body.room-theme-legal .control-btn:hover {
  background: rgba(217, 119, 6, 0.3) !important;
  border-color: #d97706 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}
[data-room-theme="legal"] .lower-third-badge,
body.room-theme-legal .lower-third-badge {
  border-left: 4px solid #d97706 !important;
  background: rgba(28, 25, 23, 0.96) !important;
  border-radius: 3px !important;
  box-shadow: 0 6px 25px rgba(0,0,0,0.7) !important;
}

/* 3. HEALTH / CLINICAL: Gentle Organic Curves & Calming Teal */
[data-room-theme="health"] .control-btn,
body.room-theme-health .control-btn {
  border-radius: 22px !important;
  background: rgba(4, 47, 46, 0.88) !important;
  border: 1px solid rgba(20, 184, 166, 0.4) !important;
  color: #ccfbf1 !important;
  width: 44px;
  height: 44px;
  box-shadow: 0 4px 12px rgba(2, 26, 25, 0.4);
  transition: all 0.2s ease;
}
[data-room-theme="health"] .control-btn:hover,
body.room-theme-health .control-btn:hover {
  background: rgba(20, 184, 166, 0.28) !important;
  border-color: #14b8a6 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}
[data-room-theme="health"] .lower-third-badge,
body.room-theme-health .lower-third-badge {
  border-left: 4px solid #14b8a6 !important;
  background: rgba(4, 47, 46, 0.95) !important;
  border-radius: 12px !important;
}

/* 4. TECH / CYBER: Rounded Neon & Glassmorphism */
[data-room-theme="tech"] .control-btn,
body.room-theme-tech .control-btn {
  border-radius: 50% !important;
  background: rgba(22, 31, 49, 0.8) !important;
  border: 1px solid rgba(0, 210, 255, 0.35) !important;
  color: #00d2ff !important;
  width: 46px;
  height: 46px;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
  transition: all 0.2s ease;
}
[data-room-theme="tech"] .control-btn:hover,
body.room-theme-tech .control-btn:hover {
  background: rgba(0, 210, 255, 0.3) !important;
  border-color: #00d2ff !important;
  box-shadow: 0 0 22px rgba(0, 210, 255, 0.55);
  transform: translateY(-2px) scale(1.05);
}

/* ==========================================================================
   Tenant Dark & Light Mode Adaptive Logo Switcher
   ========================================================================== */
.tenant-logo-dark,
.tenant-logo-light {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

[data-theme="dark"] .tenant-logo-light { display: none !important; }
[data-theme="dark"] .tenant-logo-dark { display: inline-block !important; }

[data-theme="light"] .tenant-logo-dark { display: none !important; }
[data-theme="light"] .tenant-logo-light { display: inline-block !important; }

/* ==========================================================================
   Waiting Room, Knock Floating Banner & Lobby Styles (Modern Room)
   ========================================================================== */

/* 1. Host Knock Floating Banner */
.host-knock-banner,
#hostKnockBanner:not(.room2-knock-banner) {
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 210, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  z-index: 10000;
  animation: knockSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.host-knock-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.host-knock-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.host-knock-name {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 700;
}

.host-knock-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.host-knock-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 2. Fullscreen Waiting Room Overlay */
.waiting-room-overlay,
#waitingRoomOverlay:not(.room2-waiting-overlay) {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.96);
  backdrop-filter: blur(20px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.waiting-card {
  max-width: 480px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.waiting-spinner {
  font-size: 3.2rem;
  display: inline-block;
  margin-bottom: 1rem;
  animation: waitingPulse 2s infinite ease-in-out;
}

.waiting-title {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
}

.waiting-msg {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.waiting-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

/* 3. Policy Radio Cards */
.policy-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.policy-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent-cyan);
}

.policy-card.active,
.policy-card input[type="radio"]:checked ~ * {
  border-color: var(--accent-cyan);
}

.policy-card input[type="radio"] {
  margin-top: 0.25rem;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

