/* ============================================
   USERS LIST SCREEN
   Frosted glass overlay (same pattern as devices).
   ============================================ */

.users-screen {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: rgba(247, 247, 245, 0.88);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-radius: var(--frame-radius);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  overflow: hidden;
}

.users-screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Header: back | title | menu — aligned with home logo-row ---- */

.users-header {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-top: max(30px, env(safe-area-inset-top, 0px));
  padding: 0 var(--side-padding);
}

.users-back {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.15s ease;
  flex-shrink: 0;
}

.users-back:hover {
  background: rgba(0, 0, 0, 0.05);
}

.users-header-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  color: #1A1A1A;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}

/* ---- Scrollable user list ---- */

.users-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px var(--side-padding) 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

.users-content::-webkit-scrollbar {
  display: none;
}

/* ---- User Card — glassmorphism (same as device-card) ---- */

.user-card {
  position: relative;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-left-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.user-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 60%);
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.user-card:hover {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.user-card:hover::before {
  opacity: 0.7;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .user-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
}

/* ---- Left: name + status ---- */

.user-card-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.user-name {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  color: #1A1A1A;
  line-height: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 13px;
  color: rgba(26, 26, 26, 0.5);
  line-height: normal;
}

.user-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.user-status-dot--online {
  background: #00c37f;
}

.user-status-dot--offline {
  background: #ffa948;
}

/* ---- Right: chevron ---- */

.user-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-chevron svg {
  color: #1A1A1A;
  opacity: 0.35;
}

/* ---- Add User button (fixed at bottom) ---- */

.users-footer {
  flex-shrink: 0;
  padding: 16px var(--side-padding) max(24px, env(safe-area-inset-bottom, 0px));
}

.users-add-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.users-add-btn:hover {
  background: #333;
}

.users-add-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}
