:root {
      --meet-blue: #1a73e8;
      --meet-blue-hover: #1557b0;
      --meet-red: #ea4335;
      --meet-red-hover: #d93025;
      --meet-green: #34a853;
      --meet-bg: #202124;
      --meet-surface: #2d2e30;
      --meet-surface-hover: #3c4043;
      --meet-border: #3c4043;
      --meet-text: #e8eaed;
      --meet-muted: #9aa0a6;
    }

    * { box-sizing: border-box; }
    html, body {
      margin: 0;
      padding: 0;
      height: 100%;
      font-family: "Google Sans", "Inter", system-ui, -apple-system, sans-serif;
      -webkit-font-smoothing: antialiased;
    }

    /* ---------------- LOBBY VIEW ---------------- */
    #lobby-view {
      min-height: 100vh;
      background: #ffffff;
      color: #202124;
      display: flex;
      flex-direction: column;
    }

    .lobby-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 28px;
      border-bottom: 1px solid #f1f3f4;
      gap: 16px;
      flex-wrap: wrap;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 22px;
      font-weight: 500;
      color: #5f6368;
      letter-spacing: -0.2px;
    }

    .brand-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: linear-gradient(135deg, #00897b, #1a73e8);
      display: grid;
      place-items: center;
      color: #fff;
      box-shadow: 0 2px 6px rgba(26, 115, 232, 0.25);
    }

    .brand strong { color: #202124; font-weight: 600; }

    .header-meta {
      display: flex;
      align-items: center;
      gap: 10px;
      color: #5f6368;
      font-size: 14px;
      flex-wrap: wrap;
    }

    .fabei-pill {
      background: #e8f0fe;
      color: #1967d2;
      font-size: 12px;
      font-weight: 600;
      padding: 5px 11px;
      border-radius: 999px;
    }

    .user-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #e6f4ea;
      color: #137333;
      font-size: 12.5px;
      font-weight: 600;
      padding: 5px 10px 5px 12px;
      border-radius: 999px;
    }

    .btn-pill-sm {
      border: 1px solid #dadce0;
      background: #fff;
      color: #3c4043;
      font-size: 12.5px;
      font-weight: 600;
      padding: 7px 13px;
      border-radius: 999px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .btn-pill-sm:hover { background: #f1f3f4; }

    .btn-signout-sm {
      border: none;
      background: rgba(19, 115, 51, 0.14);
      color: #137333;
      font-size: 11px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 999px;
      cursor: pointer;
    }

    .lobby-main {
      flex: 1;
      display: grid;
      grid-template-columns: 1.05fr 1fr;
      align-items: start;
      gap: 44px;
      max-width: 1200px;
      width: 100%;
      margin: 0 auto;
      padding: 40px 32px;
    }

    .lobby-copy h1 {
      font-size: 42px;
      line-height: 1.15;
      font-weight: 400;
      margin: 0 0 16px;
      letter-spacing: -0.5px;
    }

    .lobby-copy p {
      font-size: 17px;
      line-height: 1.5;
      color: #5f6368;
      margin: 0 0 24px;
      max-width: 480px;
    }

    .auth-banner {
      background: #fef7e0;
      border: 1px solid #fbbc04;
      color: #5f4200;
      padding: 10px 14px;
      border-radius: 8px;
      font-size: 13.5px;
      margin-bottom: 18px;
      max-width: 460px;
    }

    .name-row { margin-bottom: 18px; max-width: 420px; }
    .name-row label {
      display: block;
      font-size: 12px;
      font-weight: 600;
      color: #5f6368;
      margin-bottom: 6px;
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }

    .input-field {
      width: 100%;
      height: 44px;
      padding: 0 13px;
      border: 1px solid #dadce0;
      border-radius: 8px;
      font-size: 14.5px;
      color: #202124;
      background: #fff;
      outline: none;
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .input-field:focus {
      border-color: var(--meet-blue);
      box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.18);
    }

    .lobby-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

    .btn-primary {
      height: 44px;
      padding: 0 18px;
      border: none;
      border-radius: 8px;
      background: var(--meet-blue);
      color: #fff;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: background 0.15s, box-shadow 0.15s;
    }

    .btn-primary:hover {
      background: var(--meet-blue-hover);
      box-shadow: 0 2px 6px rgba(26, 115, 232, 0.35);
    }

    .btn-primary:disabled, .ctrl-btn:disabled {
      opacity: 0.42;
      cursor: not-allowed;
      box-shadow: none;
    }

    .btn-secondary {
      height: 44px;
      padding: 0 16px;
      border: 1px solid #dadce0;
      border-radius: 8px;
      background: #fff;
      color: #3c4043;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .btn-secondary:hover { background: #f1f3f4; }

    .btn-danger {
      height: 44px;
      padding: 0 16px;
      border: none;
      border-radius: 8px;
      background: var(--meet-red);
      color: #fff;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
    }

    .btn-danger:hover { background: var(--meet-red-hover); }

    .join-group { display: flex; align-items: center; gap: 8px; }
    .join-group .input-field { width: 210px; height: 44px; }

    .btn-text {
      height: 44px;
      padding: 0 16px;
      border: none;
      border-radius: 8px;
      background: transparent;
      color: var(--meet-blue);
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
    }

    .btn-text:hover { background: #e8f0fe; }

    /* ---------------- CORPORATE SSO CARD ---------------- */
    .sso-card {
      margin-top: 24px;
      max-width: 460px;
      background: #f8f9fa;
      border: 1px solid #dadce0;
      border-radius: 12px;
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .sso-card-title {
      font-size: 12.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.4px;
      color: #5f6368;
    }

    .sso-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      height: 44px;
      border-radius: 8px;
      border: 1px solid #dadce0;
      background: #fff;
      color: #202124;
      font-size: 14px;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
      transition: background 0.15s, box-shadow 0.15s;
    }

    .sso-btn:hover { background: #f1f3f4; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }

    .dir-login-box {
      border-top: 1px solid #e0e3e7;
      padding-top: 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .dir-login-form { display: flex; flex-direction: column; gap: 8px; }

    .lobby-divider {
      margin: 24px 0 14px;
      border: none;
      border-top: 1px solid #dadce0;
      max-width: 460px;
    }

    .lobby-footnote { font-size: 13px; color: #5f6368; line-height: 1.5; }

    .lobby-right-col {
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .lobby-upcoming-card {
      background: #f8f9fa;
      border: 1px solid #dadce0;
      border-radius: 14px;
      padding: 18px 20px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .lobby-mtg-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 12px;
      background: #fff;
      border: 1px solid #e8eaed;
      border-radius: 10px;
      font-size: 13.5px;
    }

    /* ---------------- CALENDAR & SCHEDULER VIEW ---------------- */
    #calendar-view {
      min-height: 100vh;
      background: #f6f8fa;
      color: #202124;
      display: flex;
      flex-direction: column;
    }

    .cal-layout {
      max-width: 1160px;
      width: 100%;
      margin: 0 auto;
      padding: 28px 24px 60px;
      display: grid;
      grid-template-columns: 420px 1fr;
      gap: 24px;
      align-items: start;
    }

    .cal-card {
      background: #fff;
      border: 1px solid #dadce0;
      border-radius: 16px;
      padding: 24px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .cal-card h2 {
      margin: 0;
      font-size: 19px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .mini-cal-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 4px;
      text-align: center;
      font-size: 12.5px;
    }

    .mini-cal-dow {
      font-weight: 700;
      color: #5f6368;
      padding: 6px 0;
      font-size: 11px;
      text-transform: uppercase;
    }

    .mini-cal-day {
      padding: 8px 0;
      border-radius: 999px;
      color: #202124;
      font-weight: 500;
    }

    .mini-cal-day.is-muted { color: #bdc1c6; }
    .mini-cal-day.is-today {
      background: var(--meet-blue);
      color: #fff;
      font-weight: 700;
      box-shadow: 0 2px 6px rgba(26, 115, 232, 0.35);
    }

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

    .agenda-card {
      display: flex;
      gap: 14px;
      padding: 14px 16px;
      border: 1px solid #e8eaed;
      border-left: 4px solid var(--meet-blue);
      border-radius: 12px;
      background: #fbfcfe;
      transition: box-shadow 0.15s, border-color 0.15s;
    }

    .agenda-card:hover {
      box-shadow: 0 3px 10px rgba(26, 115, 232, 0.08);
      border-color: #d2e3fc;
      border-left-color: var(--meet-blue);
    }

    .agenda-time-col {
      min-width: 108px;
      padding-right: 12px;
      border-right: 1px solid #e8eaed;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 2px;
    }

    .agenda-date { font-size: 12px; font-weight: 700; color: var(--meet-blue); }
    .agenda-time { font-size: 12px; color: #5f6368; font-weight: 500; }
    .agenda-main { flex: 1; display: flex; flex-direction: column; gap: 3px; }
    .agenda-title { font-size: 15px; font-weight: 600; color: #202124; }

    .cal-action-bar {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      padding-top: 12px;
      border-top: 1px solid #e8eaed;
    }

    .lobby-preview-card {
      background: #202124;
      border-radius: 16px;
      padding: 20px;
      color: #e8eaed;
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .preview-stage {
      aspect-ratio: 16 / 10;
      border-radius: 12px;
      background: #2d2e30;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      text-align: center;
      padding: 24px;
      border: 1px solid #3c4043;
    }

    .preview-avatar {
      width: 72px;
      height: 72px;
      border-radius: 50%;
      background: linear-gradient(135deg, #1a73e8, #00897b);
      display: grid;
      place-items: center;
      font-size: 28px;
      font-weight: 600;
      color: #fff;
    }

    .prejoin-bar {
      display: flex;
      justify-content: center;
      gap: 12px;
    }

    .prejoin-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 16px;
      border-radius: 999px;
      border: 1px solid #5f6368;
      background: #3c4043;
      color: #fff;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
    }

    .prejoin-pill:hover { background: #4a4e52; }
    .prejoin-pill.is-off { background: var(--meet-red); border-color: var(--meet-red); }
    .prejoin-pill:disabled { opacity: 0.55; cursor: not-allowed; }

    .hw-status-row {
      display: flex;
      justify-content: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .hw-pill {
      font-size: 11.5px;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 999px;
      background: #3c4043;
      color: #e8eaed;
    }

    .hw-pill.is-ok { background: rgba(52, 168, 83, 0.22); color: #81c995; }
    .hw-pill.is-missing { background: rgba(234, 67, 53, 0.22); color: #f28b82; }

    /* ---------------- ADMIN CONSOLE VIEW ---------------- */
    #admin-view {
      min-height: 100vh;
      background: #f6f8fa;
      color: #202124;
      display: flex;
      flex-direction: column;
    }

    .admin-topbar {
      background: #fff;
      border-bottom: 1px solid #dadce0;
      padding: 14px 28px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .admin-tabs {
      background: #fff;
      border-bottom: 1px solid #dadce0;
      padding: 0 28px;
      display: flex;
      gap: 8px;
      overflow-x: auto;
    }

    .admin-tab-btn {
      border: none;
      background: transparent;
      padding: 14px 16px;
      font-size: 14px;
      font-weight: 600;
      color: #5f6368;
      cursor: pointer;
      border-bottom: 3px solid transparent;
      white-space: nowrap;
    }

    .admin-tab-btn:hover { color: #202124; }
    .admin-tab-btn.is-active { color: var(--meet-blue); border-bottom-color: var(--meet-blue); }

    .admin-body {
      max-width: 1040px;
      width: 100%;
      margin: 0 auto;
      padding: 24px 24px 60px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .admin-card {
      background: #fff;
      border: 1px solid #dadce0;
      border-radius: 12px;
      padding: 22px 24px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }

    .admin-card-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
      gap: 12px;
      flex-wrap: wrap;
    }

    .admin-card-head h2 { margin: 0; font-size: 18px; font-weight: 600; }

    .toggle-label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 13.5px;
      font-weight: 600;
      color: #3c4043;
      cursor: pointer;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px 18px;
    }

    .form-field { display: flex; flex-direction: column; gap: 5px; }
    .form-field.full { grid-column: 1 / -1; }
    .form-field label {
      font-size: 12px;
      font-weight: 600;
      color: #5f6368;
      display: flex;
      justify-content: space-between;
    }

    .secret-hint { font-weight: 500; color: #1967d2; }

    .admin-card-foot {
      margin-top: 16px;
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      flex-wrap: wrap;
    }

    .admin-login-card {
      max-width: 420px;
      margin: 64px auto;
      background: #fff;
      border: 1px solid #dadce0;
      border-radius: 14px;
      padding: 28px;
      box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .dir-users-list, .audit-list {
      margin-top: 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .dir-user-row, .audit-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 12px;
      border: 1px solid #e8eaed;
      border-radius: 8px;
      background: #f8f9fa;
      font-size: 13.5px;
      flex-wrap: wrap;
    }

    .dept-tag {
      background: #e8f0fe;
      color: #1967d2;
      font-size: 11.5px;
      font-weight: 600;
      padding: 3px 9px;
      border-radius: 999px;
    }

    .audit-badge {
      background: #e6f4ea;
      color: #137333;
      font-size: 11px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 6px;
      font-family: ui-monospace, SFMono-Regular, monospace;
    }

    .role-badge {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      padding: 3px 9px;
      border-radius: 999px;
      letter-spacing: 0.3px;
    }
    .role-admin     { background: #fce8e6; color: #c5221f; }
    .role-moderator { background: #f3e8fd; color: #7627bb; }
    .role-host      { background: #e8f0fe; color: #1967d2; }
    .role-member    { background: #e6f4ea; color: #137333; }
    .role-guest     { background: #f1f3f4; color: #5f6368; }

    .status-active {
      font-size: 11px;
      font-weight: 600;
      color: #137333;
      background: #e6f4ea;
      padding: 3px 8px;
      border-radius: 6px;
    }
    .status-suspended {
      font-size: 11px;
      font-weight: 600;
      color: #c5221f;
      background: #fce8e6;
      padding: 3px 8px;
      border-radius: 6px;
    }

    .rbac-matrix {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 18px;
    }
    .rbac-tile {
      background: #f8f9fa;
      border: 1px solid #e8eaed;
      border-radius: 10px;
      padding: 12px;
      font-size: 12px;
      color: #3c4043;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .muted-sm { font-size: 12.5px; color: #5f6368; }

    /* ---------------- CALL VIEW ---------------- */
    #call-view {
      height: 100vh;
      background: var(--meet-bg);
      color: var(--meet-text);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      position: relative;
    }

    .call-body {
      flex: 1;
      display: flex;
      min-height: 0;
      padding: 16px 16px 0;
      gap: 16px;
      position: relative;
    }

    .video-grid {
      flex: 1;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
      align-items: center;
      min-width: 0;
      min-height: 0;
      position: relative;
    }

    /* Spotlight / Pin layout: remote fills stage, local floats in corner */
    .video-grid.spotlight-mode {
      display: block;
    }

    .video-grid.spotlight-mode #remote-tile {
      width: 100%;
      height: 100%;
    }

    .video-grid.spotlight-mode #local-tile {
      position: absolute;
      right: 20px;
      bottom: 20px;
      width: 260px;
      height: 160px;
      z-index: 6;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
      border: 2px solid #5f6368;
    }

    .video-tile {
      position: relative;
      width: 100%;
      height: 100%;
      max-height: calc(100vh - 110px);
      background: var(--meet-surface);
      border-radius: 14px;
      overflow: hidden;
      border: 1px solid var(--meet-border);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .video-tile video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      background: #17181a;
    }

    #local-video { transform: scaleX(-1); transition: filter 0.2s; }
    #local-video.fx-soft   { filter: contrast(0.95) brightness(1.06) blur(0.6px) saturate(1.08); }
    #local-video.fx-warm   { filter: sepia(0.18) saturate(1.22) brightness(1.04); }
    #local-video.fx-bright { filter: brightness(1.22) contrast(1.08); }

    #captions-bar {
      position: absolute;
      left: 50%;
      bottom: 88px;
      transform: translateX(-50%);
      max-width: min(760px, 86vw);
      background: rgba(18, 19, 22, 0.88);
      backdrop-filter: blur(8px);
      color: #fff;
      padding: 10px 18px;
      border-radius: 10px;
      font-size: 15px;
      line-height: 1.4;
      text-align: center;
      z-index: 12;
      border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .top-call-badges {
      position: absolute;
      top: 24px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 8px;
      z-index: 12;
    }

    .rec-pill {
      background: rgba(234, 67, 53, 0.92);
      color: #fff;
      font-size: 12px;
      font-weight: 700;
      padding: 4px 11px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      letter-spacing: 0.4px;
    }

    .locked-pill {
      background: rgba(32, 33, 36, 0.88);
      border: 1px solid #fbbc04;
      color: #fbbc04;
      font-size: 12px;
      font-weight: 600;
      padding: 4px 11px;
      border-radius: 999px;
    }

    .ctrl-active-pill {
      background: rgba(251, 188, 4, 0.94);
      color: #202124;
      font-size: 12px;
      font-weight: 700;
      padding: 4px 8px 4px 12px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .ctrl-revoke-btn {
      border: none;
      background: #202124;
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      padding: 3px 9px;
      border-radius: 999px;
      cursor: pointer;
    }

    #ctrl-request-banner {
      position: absolute;
      top: 64px;
      left: 50%;
      transform: translateX(-50%);
      background: #ffffff;
      color: #202124;
      padding: 12px 16px;
      border-radius: 12px;
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
      display: flex;
      align-items: center;
      gap: 12px;
      z-index: 20;
      font-size: 13.5px;
      font-weight: 500;
    }

    #remote-video.is-controlling {
      cursor: crosshair;
      outline: 3px solid #fbbc04;
      outline-offset: -3px;
    }

    #remote-cursor {
      position: fixed;
      top: 0;
      left: 0;
      pointer-events: none;
      z-index: 9999;
      display: none;
      align-items: flex-start;
      gap: 4px;
      transition: transform 0.04s linear;
    }

    .rc-dot {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: #fbbc04;
      border: 2px solid #202124;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
      transition: transform 0.15s;
    }

    #remote-cursor.is-clicking .rc-dot {
      transform: scale(1.65);
      background: #ea4335;
    }

    #remote-cursor-label {
      background: #202124;
      color: #fbbc04;
      font-size: 11px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 6px;
      white-space: nowrap;
    }

    #activities-pane, #host-pane {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow-y: auto;
    }

    .poll-vote-btn {
      width: 100%;
      text-align: left;
      padding: 9px 12px;
      border: 1px solid #dadce0;
      border-radius: 8px;
      background: #fff;
      color: #202124;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
    }

    .poll-vote-btn:hover { background: #e8f0fe; border-color: var(--meet-blue); }

    .cam-off-overlay {
      position: absolute;
      inset: 0;
      background: #28292c;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      z-index: 1;
    }

    .avatar-circle {
      width: 92px;
      height: 92px;
      border-radius: 50%;
      background: linear-gradient(135deg, #1a73e8, #00897b);
      display: grid;
      place-items: center;
      font-size: 38px;
      font-weight: 600;
      color: #fff;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }

    .avatar-initial {
      display: inline-block;
      width: 1ch;
      overflow: hidden;
      white-space: nowrap;
      text-transform: uppercase;
      text-align: center;
    }

    .tile-overlay-top {
      position: absolute;
      top: 12px;
      right: 12px;
      display: flex;
      gap: 8px;
      z-index: 3;
    }

    .status-chip {
      background: rgba(32, 33, 36, 0.85);
      backdrop-filter: blur(6px);
      color: #fff;
      font-size: 12px;
      font-weight: 500;
      padding: 5px 10px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .status-chip.hand { background: #fbbc04; color: #202124; font-weight: 600; }
    .status-chip.muted { background: var(--meet-red); }

    .tile-name {
      position: absolute;
      bottom: 12px;
      left: 14px;
      background: rgba(32, 33, 36, 0.8);
      backdrop-filter: blur(6px);
      color: #fff;
      font-size: 13px;
      font-weight: 500;
      padding: 5px 12px;
      border-radius: 8px;
      z-index: 3;
    }

    .remote-status-pill {
      position: absolute;
      top: 12px;
      left: 14px;
      background: rgba(32, 33, 36, 0.82);
      color: var(--meet-text);
      font-size: 12px;
      padding: 5px 11px;
      border-radius: 999px;
      z-index: 3;
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #fbbc04;
    }

    .status-dot.is-live {
      background: #34a853;
      box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.28);
    }

    /* ---------------- REACTIONS ---------------- */
    #reactions-overlay {
      position: absolute;
      left: 28px;
      bottom: 92px;
      display: flex;
      flex-direction: column-reverse;
      gap: 8px;
      pointer-events: none;
      z-index: 10;
    }

    .reaction-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(32, 33, 36, 0.88);
      border: 1px solid #3c4043;
      padding: 6px 12px;
      border-radius: 999px;
      animation: floatUp 0.25s ease-out;
    }

    .reaction-emoji { font-size: 20px; }
    .reaction-sender { font-size: 12px; color: #e8eaed; font-weight: 500; }

    @keyframes floatUp {
      from { opacity: 0; transform: translateY(10px) scale(0.95); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    #reactions-tray {
      position: absolute;
      bottom: 84px;
      left: 50%;
      transform: translateX(-50%);
      background: #2d2e30;
      border: 1px solid #5f6368;
      border-radius: 999px;
      padding: 6px 12px;
      display: flex;
      gap: 6px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
      z-index: 15;
    }

    .react-choice {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: none;
      background: transparent;
      font-size: 22px;
      cursor: pointer;
      transition: transform 0.12s, background 0.12s;
    }

    .react-choice:hover { background: #3c4043; transform: scale(1.18); }

    /* ---------------- SIDE PANEL ---------------- */
    #side-panel {
      width: 340px;
      background: #ffffff;
      color: #202124;
      border-radius: 14px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      margin-bottom: 4px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 18px;
      border-bottom: 1px solid #e8eaed;
      font-size: 16px;
      font-weight: 500;
    }

    .panel-close {
      background: transparent;
      border: none;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      cursor: pointer;
      font-size: 20px;
      color: #5f6368;
    }

    .panel-close:hover { background: #f1f3f4; }

    #chat-pane, #people-pane, #info-pane {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 0;
    }

    .info-body {
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      font-size: 13.5px;
    }

    .info-box {
      background: #f8f9fa;
      border: 1px solid #e8eaed;
      border-radius: 10px;
      padding: 12px;
      word-break: break-all;
    }

    .chat-messages {
      flex: 1;
      overflow-y: auto;
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .chat-empty {
      background: #f1f3f4;
      color: #5f6368;
      font-size: 12.5px;
      padding: 12px;
      border-radius: 8px;
      text-align: center;
      line-height: 1.4;
    }

    .chat-msg { display: flex; flex-direction: column; gap: 3px; }
    .chat-msg-meta { font-size: 12px; font-weight: 600; color: #202124; }
    .chat-msg-meta span { font-weight: 400; color: #5f6368; margin-left: 6px; font-size: 11px; }
    .chat-msg-text { font-size: 13.5px; color: #3c4043; line-height: 1.4; word-break: break-word; }

    .chat-compose {
      padding: 12px;
      border-top: 1px solid #e8eaed;
      display: flex;
      gap: 8px;
      background: #f8f9fa;
    }

    .chat-compose input {
      flex: 1;
      border: 1px solid #dadce0;
      border-radius: 20px;
      padding: 9px 14px;
      font-size: 13.5px;
      outline: none;
    }

    .chat-compose button {
      border: none;
      background: var(--meet-blue);
      color: #fff;
      border-radius: 20px;
      padding: 0 14px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
    }

    .people-list {
      flex: 1;
      overflow-y: auto;
      padding: 12px 16px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .person-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 6px;
      border-radius: 8px;
    }

    .person-row:hover { background: #f8f9fa; }

    .person-left { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }

    .person-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: #1a73e8;
      color: #fff;
      display: grid;
      place-items: center;
      font-size: 13px;
      font-weight: 600;
      overflow: hidden;
      text-transform: uppercase;
    }

    .person-badges { display: flex; gap: 6px; font-size: 13px; }

    /* ---------------- BOTTOM CONTROL BAR ---------------- */
    .control-bar {
      min-height: 76px;
      padding: 8px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .bar-left {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13.5px;
      font-weight: 500;
      min-width: 210px;
    }

    .code-btn {
      background: var(--meet-surface);
      border: 1px solid var(--meet-border);
      color: var(--meet-text);
      border-radius: 8px;
      padding: 6px 10px;
      font-size: 12.5px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .code-btn:hover { background: var(--meet-surface-hover); }

    .bar-center {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      flex-wrap: wrap;
    }

    .bar-sep {
      width: 1px;
      height: 24px;
      background: #3c4043;
      margin: 0 3px;
    }

    .ctrl-btn {
      position: relative;
      width: 41px;
      height: 41px;
      border-radius: 50%;
      border: none;
      background: var(--meet-surface);
      color: #fff;
      cursor: pointer;
      display: grid;
      place-items: center;
      transition: background 0.15s, transform 0.1s;
    }

    .ctrl-btn:hover { background: var(--meet-surface-hover); }
    .ctrl-btn.is-off { background: var(--meet-red); }
    .ctrl-btn.is-off:hover { background: var(--meet-red-hover); }
    .ctrl-btn.is-active { background: #8ab4f8; color: #202124; }

    .hangup-btn {
      width: 56px;
      height: 40px;
      border-radius: 999px;
      border: none;
      background: var(--meet-red);
      color: #fff;
      cursor: pointer;
      display: grid;
      place-items: center;
      margin-left: 4px;
    }

    .hangup-btn:hover { background: var(--meet-red-hover); }

    .bar-right {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 7px;
      min-width: 210px;
    }

    .badge-count {
      position: absolute;
      top: -3px;
      right: -3px;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      border-radius: 999px;
      background: #5f6368;
      color: #fff;
      font-size: 11px;
      font-weight: 600;
      display: grid;
      place-items: center;
    }

    .badge-dot {
      position: absolute;
      top: 4px;
      right: 4px;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: #8ab4f8;
    }

    @media (max-width: 900px) {
      .lobby-main, .video-grid, .form-grid, .cal-layout { grid-template-columns: 1fr; }
      .rbac-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .bar-left, .bar-right { min-width: auto; }
    }

/* ==================== ACTIVE SPEAKER, WAITING ROOM & MULTI-TILE SFU ==================== */
.video-tile.is-speaking {
  box-shadow: 0 0 0 3px #34a853, 0 8px 24px rgba(52, 168, 83, 0.35);
}
.video-grid.multi-tile {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.waiting-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 950;
  padding: 20px;
}
.waiting-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.waiting-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e8eaed;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: fabei-spin 0.9s linear infinite;
}
@keyframes fabei-spin {
  to { transform: rotate(360deg); }
}
.waiting-banner {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: #202124;
  color: #fff;
  border: 1px solid #3c4043;
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 820;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.chat-file-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f0fe;
  color: #1967d2;
  border: 1px solid #d2e3fc;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.chat-file-card:hover { background: #d2e3fc; }
.mini-cal-day { cursor: pointer; }
.mini-cal-day:hover { background: #e8f0fe; color: #1967d2; }
.mini-cal-day.is-selected { background: #1a73e8; color: #fff; font-weight: 700; }

/* ==================== WHITEBOARD, BREAKOUT BAR & KEYBOARD SHORTCUTS ==================== */
.breakout-bar {
  position: fixed;
  top: 14px;
  right: 20px;
  background: rgba(32, 33, 36, 0.94);
  color: #fff;
  border: 1px solid #3c4043;
  border-radius: 999px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 810;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.wb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 910;
  padding: 20px;
}
.wb-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  width: min(980px, 95vw);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}
.wb-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid #e8eaed;
  color: #202124;
  gap: 10px;
  flex-wrap: wrap;
}
.wb-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}
.wb-swatch.is-active { border-color: #202124; transform: scale(1.12); }
#wb-canvas {
  width: 100%;
  height: auto;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
  display: block;
}
.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  font-size: 13.5px;
  color: #3c4043;
}
.sc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f1f3f4;
}
.sc-row kbd {
  background: #f1f3f4;
  border: 1px solid #dadce0;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 600;
  color: #202124;
}

/* ==================== LASER POINTER ANNOTATION & SHARED TIMER ==================== */
.annotate-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
}
.annotate-canvas.is-drawing {
  pointer-events: auto;
  cursor: crosshair;
}

/* ==================== PRIVATE DM BADGE & BACKGROUND BLUR ==================== */
.dm-badge {
  display: inline-block;
  background: #f3e8fd;
  color: #7627bb;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
}
#local-video.fx-bg-blur {
  filter: blur(0px) contrast(1.04);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
}
