/* ==========================================================================
   LinguaReel Studio — Frame.io v4 Cinema Studio Authentication & Admin UI
   ========================================================================== */

/* ==========================================================================
   1. AUTH MODAL & 9:16 CINEMA POSTER WALL BACKDROP
   ========================================================================== */

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #09090b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

.auth-modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Simulated 9:16 Vertical Cinema Grid Backdrop */
.auth-cinema-backdrop {
  position: absolute;
  inset: -40px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.auth-poster-wall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  width: 106%;
  margin-left: -3%;
  transform: perspective(1200px) rotateX(6deg) rotateZ(-1.5deg) scale(1.02);
  opacity: 0.72;
}

.auth-poster-tile {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 50% 34%, rgba(245, 158, 11, 0.34), transparent 55%),
    linear-gradient(175deg, #232132 0%, #14141c 58%, #09090b 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.auth-poster-tile::before {
  content: "9:16 MASTER REEL";
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(9, 9, 11, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a1a1aa;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.auth-poster-tile.p1,
.auth-poster-tile.p6,
.auth-poster-tile.p10 {
  background:
    radial-gradient(circle at 35% 30%, rgba(244, 63, 94, 0.32), transparent 55%),
    linear-gradient(180deg, #2a1828 0%, #13131a 100%);
}

.auth-poster-tile.p3,
.auth-poster-tile.p7,
.auth-poster-tile.p12 {
  background:
    radial-gradient(circle at 65% 30%, rgba(16, 185, 129, 0.3), transparent 55%),
    linear-gradient(180deg, #142b27 0%, #13131a 100%);
}

.auth-poster-tile.is-rendering {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.65), 0 0 32px rgba(245, 158, 11, 0.42);
}

.auth-tile-pill {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(9, 9, 11, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f4f4f6;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
}

.auth-tile-pill.gold {
  background: linear-gradient(135deg, #f59e0b, #ffd700);
  border-color: #ffd700;
  color: #09090b;
}

.auth-cinema-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(9, 9, 11, 0.28) 0%, rgba(9, 9, 11, 0.82) 76%, #09090b 100%);
}

/* Cinema Studio Glassmorphism Auth Card */
.auth-card {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 2;
  border-radius: 14px;
  background: rgba(17, 17, 21, 0.82);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.85), 0 0 42px rgba(245, 158, 11, 0.16);
  padding: 30px 28px 26px;
  overflow: hidden;
  animation: authCardIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-card::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 150px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, rgba(255, 215, 0, 0.1) 60%, transparent 80%);
  filter: blur(35px);
  pointer-events: none;
}

.auth-header {
  text-align: center;
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
}

.auth-brand-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f59e0b, #ffd700);
  border: 1px solid #ffd700;
  color: #09090b;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.4);
  margin-bottom: 10px;
}

.auth-brand-emblem .lucide-icon {
  width: 22px;
  height: 22px;
}

.auth-studio-kicker {
  display: block;
  margin-bottom: 4px;
  color: #ffd700;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.auth-header h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 5px;
  color: #f4f4f6;
}

.auth-header p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

/* Tab Switcher */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 9px;
  background: #09090b;
  border: 1px solid var(--line);
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}

.auth-tab-btn {
  height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-tab-btn:hover {
  color: #f4f4f6;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, #f59e0b, #ffd700);
  color: #09090b;
  font-weight: 700;
  border-color: #ffd700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.32);
}

/* Error Banner */
.auth-alert {
  padding: 10px 13px;
  border-radius: 8px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.32);
  color: #fda4af;
  font-size: 11.5px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Fields & Inputs */
.auth-field {
  margin-bottom: 13px;
}

.auth-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #e4e4e7;
  margin-bottom: 5px;
}

.req-star {
  color: #ffd700;
  font-weight: 700;
}

.auth-input-box {
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #09090b;
  padding: 0 11px;
  transition: all 0.16s ease;
}

.auth-input-box:focus-within {
  border-color: #ffd700;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
  background: #0d0d11;
}

.auth-input-icon {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  margin-right: 9px;
  flex: none;
}

.auth-input-box input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  padding: 0;
  height: 100%;
}

.auth-input-box input::placeholder {
  color: var(--soft);
}

.auth-toggle-pwd {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
}
.auth-toggle-pwd:hover {
  color: #ffd700;
}

.auth-action-btn {
  width: 100%;
  height: 42px;
  border: 1px solid #ffd700;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b 0%, #ffd700 100%);
  color: #09090b;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  box-shadow: 0 8px 24px -4px rgba(245, 158, 11, 0.5);
  transition: all 0.16s ease;
}

.auth-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.auth-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   2. TOPBAR USER PROFILE & DROPDOWN
   ========================================================================== */

.user-profile-menu {
  position: relative;
}

.user-avatar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 91, 255, 0.28), rgba(56, 189, 248, 0.16));
  border: 1px solid rgba(99, 91, 255, 0.45);
  color: #ffffff;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  position: relative;
  transition: all 0.16s ease;
}

.user-avatar-btn:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(99, 91, 255, 0.35);
}

.user-avatar-btn.is-admin {
  border-color: rgba(124, 102, 255, 0.65);
  background: linear-gradient(135deg, rgba(99, 91, 255, 0.38), rgba(236, 72, 153, 0.2));
}

.user-status-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #08090d;
  box-shadow: 0 0 6px var(--green);
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 236px;
  background: #121522;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  padding: 12px;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.user-dropdown-header {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.user-info-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.user-role-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.user-role-badge.admin {
  background: rgba(99, 91, 255, 0.2);
  color: #c7d2fe;
  border: 1px solid rgba(99, 91, 255, 0.42);
}

.user-role-badge.user {
  background: rgba(56, 189, 248, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.32);
}

.user-username {
  font-size: 10.5px;
  color: var(--muted);
}

.dropdown-item {
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.dropdown-item.logout:hover {
  background: rgba(244, 63, 94, 0.14);
  color: #fda4af;
}

/* ==========================================================================
   3. ADMIN USERS MANAGEMENT PAGE (#page-users)
   ========================================================================== */

.admin-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #c7d2fe;
  background: rgba(99, 91, 255, 0.14);
  border: 1px solid rgba(99, 91, 255, 0.35);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.users-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.user-metric-card {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.user-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 91, 255, 0.38);
}

.metric-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: none;
  position: relative;
}

.metric-icon-box.total {
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.metric-icon-box.admin {
  background: rgba(99, 91, 255, 0.14);
  color: #c7d2fe;
  border: 1px solid rgba(99, 91, 255, 0.32);
}

.metric-icon-box.active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.metric-icon-box.pending {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.metric-icon-box.jobs {
  background: rgba(245, 158, 11, 0.12);
  color: var(--orange);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.user-metric-card small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 3px;
}

.user-metric-card strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Toolbar */
.users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.users-search-box {
  flex: 1;
  max-width: 360px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #0a0c12;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
}

.users-search-box input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  padding: 0;
  height: 100%;
}

.users-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.role-filter-select {
  height: 38px;
  width: auto;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #0a0c12;
  color: var(--text);
  padding: 0 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

/* User Table */
.users-table-panel {
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.users-table th {
  padding: 13px 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #10131e;
  border-bottom: 1px solid var(--line);
}

.users-table td {
  padding: 14px 18px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
  vertical-align: middle;
}

.users-table tr:hover td {
  background: rgba(99, 91, 255, 0.05);
}

.user-cell-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-table-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 91, 255, 0.2), rgba(56, 189, 248, 0.14));
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
}

.user-table-avatar.admin-avatar {
  background: linear-gradient(135deg, rgba(99, 91, 255, 0.35), rgba(236, 72, 153, 0.2));
  border-color: rgba(99, 91, 255, 0.45);
  color: #e0e7ff;
}

.user-cell-name {
  font-weight: 700;
  color: #ffffff;
  font-size: 12.5px;
}

.user-cell-username {
  font-size: 10.5px;
  color: var(--soft);
}

/* Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

.status-pill.active {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.status-pill.disabled {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.28);
}

.status-pill.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.active .status-indicator-dot {
  box-shadow: 0 0 6px var(--green);
}

.job-count-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
}

.user-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-btn-mini {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  transition: all 0.15s ease;
}

.action-btn-mini:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.action-btn-mini.approve-btn {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 8px;
  width: auto;
}

.action-btn-mini.approve-btn:hover {
  background: rgba(16, 185, 129, 0.28);
}

.action-btn-mini.key-btn:hover {
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.45);
}

.action-btn-mini.lock-btn:hover {
  color: var(--orange);
  border-color: rgba(245, 158, 11, 0.45);
}

.action-btn-mini.role-btn:hover {
  color: #c7d2fe;
  border-color: rgba(99, 91, 255, 0.45);
}

.action-btn-mini.delete-btn:hover {
  color: var(--red);
  border-color: rgba(244, 63, 94, 0.45);
}

.action-btn-mini:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* User Admin & Worker Modals */
.user-dialog {
  position: relative;
  width: min(440px, 94vw);
  background: #11141f;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  padding: 26px;
}

.user-dialog h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.user-dialog p {
  color: var(--muted);
  font-size: 11.5px;
  margin: 0 0 18px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .users-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .users-metrics-grid {
    grid-template-columns: 1fr;
  }
  .users-table-panel {
    overflow-x: auto;
  }
}

/* ==========================================================================
   4. PERMISSION LOCKED STYLES & ADMIN PERMISSION PILLS
   ========================================================================== */

.launch-btn.permission-locked {
  filter: blur(1.5px) grayscale(0.8);
  opacity: 0.42;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transform: none !important;
  user-select: none;
}

.permission-locked-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(244, 63, 94, 0.06));
  border: 1px solid rgba(245, 158, 11, 0.35);
  margin-bottom: 12px;
}

#voicePermissionAlert {
  grid-column: 1 / -1;
}

.permission-locked-banner .perm-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.permission-locked-banner .perm-content {
  flex: 1;
}

.permission-locked-banner strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 2px;
}

.permission-locked-banner p {
  margin: 0;
  font-size: 11px;
  color: #e2e8f0;
  line-height: 1.45;
}

.voice-upload-panel.permission-locked {
  filter: blur(1.2px) grayscale(0.7);
  opacity: 0.48;
  pointer-events: none !important;
  user-select: none;
}

.perm-toggle-group {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}

.perm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
  width: fit-content;
}

.perm-pill.enabled {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.32);
  color: #34d399;
}

.perm-pill.enabled:hover {
  background: rgba(16, 185, 129, 0.22);
}

.perm-pill.disabled {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.28);
  color: #fda4af;
}

.perm-pill.disabled:hover {
  background: rgba(244, 63, 94, 0.18);
}

.perm-pill.readonly {
  cursor: default !important;
  background: rgba(99, 91, 255, 0.16);
  border-color: rgba(99, 91, 255, 0.38);
  color: #c7d2fe;
}

/* ==========================================================================
   5. PC WORKER (CAMERA-TO-CLOUD / GPU NODE) INDICATORS & MODAL
   ========================================================================== */

.worker-mini-row {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.mini-worker-link {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mini-worker-link:hover {
  background: rgba(99, 91, 255, 0.2);
  border-color: var(--indigo);
  color: #ffffff;
}

.worker-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
}

.worker-pill:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
}

.worker-pill.online {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.32);
  color: #34d399;
}

.worker-pill.online:hover {
  background: rgba(16, 185, 129, 0.16);
}

.worker-dialog {
  max-width: 620px !important;
}

.worker-modal-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #c7d2fe;
  background: rgba(99, 91, 255, 0.14);
  border: 1px solid rgba(99, 91, 255, 0.35);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.worker-live-card {
  background: #0c0e16;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 15px 17px;
  margin: 16px 0;
}

.worker-live-card.connected {
  border-color: rgba(16, 185, 129, 0.38);
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.07), #0c0e16);
}

.worker-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.worker-card-status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #ffffff;
}

.worker-pulse-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.worker-pulse-badge.online {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.38);
}

.worker-hardware-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.worker-hw-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.worker-hw-item small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.worker-hw-item strong {
  font-size: 12.5px;
  color: #ffffff;
  word-break: break-word;
}

.worker-token-section {
  margin: 16px 0;
}

.worker-token-section label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #ffffff;
}

.worker-token-box {
  display: flex;
  gap: 8px;
  align-items: center;
}

.worker-token-box input {
  flex: 1;
  background: #080a0f;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  outline: none;
}

.worker-download-section {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid rgba(99, 91, 255, 0.38);
  border-radius: 11px;
  background: rgba(99, 91, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.worker-download-section strong {
  color: #c7d2fe;
  display: block;
  font-size: 12.5px;
}
.worker-download-section small {
  color: var(--muted);
  font-size: 10.5px;
  display: block;
  margin-top: 3px;
}

.danger-btn-outline {
  background: transparent;
  border: 1px solid rgba(244, 63, 94, 0.38);
  color: #fda4af;
  height: 36px;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.danger-btn-outline:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.6);
  color: #ffffff;
}

.worker-setup-guide {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 11.5px;
  color: var(--muted);
}

.worker-setup-guide h4 {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: #ffffff;
}

.worker-setup-guide ol {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

.worker-setup-guide code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--cyan);
  font-family: var(--font-mono);
}

/* Real-time Online & Working Indicators */
.realtime-badge {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.32);
}

.realtime-pulse-indicator {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.user-cell-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.user-cell-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 10px;
}

.user-live-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  line-height: 1.3;
}

.user-live-status.working {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.32);
}

.user-live-status.online {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.32);
}

.user-live-status.offline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  border: 1px solid var(--line);
}

.user-live-status.worker-standby {
  background: rgba(99, 91, 255, 0.14);
  color: #c7d2fe;
  border: 1px solid rgba(99, 91, 255, 0.32);
}

.pulse-dot-amber,
.pulse-dot-green,
.dot-purple,
.dot-gray {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.pulse-dot-green {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.dot-purple {
  background: #a5b4fc;
  box-shadow: 0 0 6px #a5b4fc;
}

.pulse-dot-amber {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
  animation: pulse-amber 1.5s infinite;
}

@keyframes pulse-amber {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.dot-gray {
  background: rgba(255, 255, 255, 0.3);
}

.users-refresh-btn.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.users-refresh-btn.is-loading i,
.users-refresh-btn.is-loading::before {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

.users-loading-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.users-loading-spinner .spinner-icon {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(99, 91, 255, 0.25);
  border-top-color: var(--indigo);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

.users-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #10131e;
  flex-wrap: wrap;
}

.pagination-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 7px;
  padding: 5px 13px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(99, 91, 255, 0.18);
  border-color: var(--indigo);
  color: #ffffff;
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-page-label {
  font-size: 11.5px;
  color: var(--muted);
}

.pagination-page-label b {
  color: var(--cyan);
}

.total-users-hint {
  font-size: 11px;
  color: var(--soft);
  margin-left: 4px;
}

/* Honeypot hidden trap */
.honeypot-trap {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  overflow: hidden;
}
