:root {
  --bg-main: #090d16;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(15, 23, 42, 0.7);
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
  --accent-glow: rgba(6, 182, 212, 0.25);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Background Glowing Ambient Orbs */
.background-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #06b6d4, #3b82f6);
  top: -100px;
  left: -100px;
}

.glow-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #8b5cf6, #ec4899);
  bottom: -100px;
  right: -100px;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 820px;
  position: relative;
  z-index: 10;
  margin: auto;
}

/* Shared Card Styling */
.view {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

/* Auth / Login View */
.auth-card {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--accent-cyan);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.shield-icon {
  width: 16px;
  height: 16px;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 28px;
}

.auth-form {
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.label-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  pointer-events: none;
}

input[type="tel"],
input[type="password"],
input[type="text"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 12px 14px 12px 42px;
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-form input {
  padding-left: 14px !important;
}

input:focus, textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.auth-footer {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  padding: 12px 20px;
  font-size: 0.95rem;
  box-shadow: 0 4px 18px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 12px 20px;
  font-size: 0.95rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline-sm {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.btn-outline-sm:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-primary-sm {
  background: var(--accent-gradient);
  color: #fff;
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* Dashboard Header & Mode Switcher */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--bg-card-border);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 14px;
}

.mode-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-card-border);
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn:hover {
  color: var(--text-main);
}

.mode-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

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

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 12px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.user-phone {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Tabs */
.tab-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.tab-btn.active {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--text-main);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

.tab-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-btn.active .tab-icon-wrap {
  background: var(--accent-gradient);
  color: #fff;
}

.tab-icon-wrap svg {
  width: 18px;
  height: 18px;
}

.tab-text {
  display: flex;
  flex-direction: column;
}

.tab-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.tab-tag {
  font-size: 0.72rem;
  margin-top: 2px;
}

.tab-tag.rec {
  color: var(--accent-cyan);
}

.tab-tag.alt {
  color: #a78bfa;
}

/* Protocol Content */
.qr-and-actions {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 30px;
}

@media (max-width: 600px) {
  .qr-and-actions {
    grid-template-columns: 1fr;
  }
}

.qr-box {
  text-align: center;
}

.qr-frame {
  background: #ffffff;
  padding: 12px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: inline-block;
  margin-bottom: 10px;
}

.qr-image {
  width: 200px;
  height: 200px;
  display: block;
}

.qr-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.actions-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
}

.info-row .label {
  color: var(--text-muted);
}

.info-row .value {
  font-weight: 600;
  font-family: var(--font-mono);
}

.badge {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 4px;
}

.text-success {
  color: var(--success) !important;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vless-link-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.code-input {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 10px;
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  width: 100%;
}

.code-textarea {
  width: 100%;
  height: 140px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 10px;
  margin-top: 12px;
  resize: vertical;
}

/* Instructions Section */
.instructions-section {
  border-top: 1px solid var(--bg-card-border);
  padding-top: 24px;
}

.instructions-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 600px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

.step-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.step-card h4 {
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.step-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.app-links {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.app-link {
  font-size: 0.75rem;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.app-link:hover {
  background: rgba(6, 182, 212, 0.3);
}

/* SECTION 2: All Configs Manager */
.stats-summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  align-items: center;
}

@media (max-width: 768px) {
  .stats-summary-bar {
    grid-template-columns: 1fr 1fr;
  }
  .stat-actions {
    grid-column: span 2;
    justify-content: flex-start !important;
  }
}

.stat-box {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.76rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.stat-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.filter-bar {
  margin-bottom: 20px;
}

.filter-bar input {
  padding-left: 16px !important;
}

/* Config Cards Grid */
.configs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.config-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.config-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.config-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

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

.client-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-cyan);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.client-info h4 {
  font-size: 1rem;
  font-weight: 700;
}

.client-info .client-phone {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-pill.online {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.offline {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-pill.blocked {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

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

.status-pill.online .dot-indicator {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.status-pill.offline .dot-indicator {
  background: var(--text-dim);
}

.status-pill.blocked .dot-indicator {
  background: var(--error);
}

.config-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.metric-item {
  display: flex;
  gap: 6px;
  align-items: center;
}

.metric-item .m-label {
  color: var(--text-dim);
}

.metric-item .m-val {
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-main);
}

.config-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

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

.actions-secondary {
  display: flex;
  gap: 6px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 580px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-card.small-modal {
  max-width: 420px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: #fff;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--bg-card-border);
  margin-bottom: 18px;
}

.modal-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.modal-tab-btn.active {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.modal-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.modal-actions-row .btn {
  flex: 1;
}

.warning-box {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.4;
  margin-bottom: 14px;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 200;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Admin Subtabs Navigation */
.admin-subtabs-bar {
  display: flex;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 6px;
  margin-bottom: 22px;
}

.admin-subtab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-subtab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.admin-subtab-btn.active {
  background: rgba(6, 182, 212, 0.15);
  color: #fff;
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.subtab-icon {
  font-size: 1.1rem;
}

.subtab-badge {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.admin-subtab-btn.active .subtab-badge {
  background: var(--accent-cyan);
  color: #090d16;
}

/* User Accounts Section */
.users-section-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.users-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.users-section-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.users-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.user-account-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.user-account-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #8b5cf6, #3b82f6);
}

.user-account-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.12);
}

.user-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.user-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar-big {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(59, 130, 246, 0.25));
  border: 1px solid rgba(139, 92, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #c4b5fd;
}

.user-main-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-phone-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.user-badges-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.role-badge-admin {
  font-size: 0.72rem;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.role-badge-user {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.pwd-status-pill {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.pwd-status-pill.set {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pwd-status-pill.empty {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-dim);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* User Devices Container inside User Card */
.user-devices-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.user-devices-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-devices-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-device-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
}

.user-device-chip .dev-ip {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.user-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
}

/* Device Config Card Enhancements */
.device-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
}

.device-owner-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-delete-config {
  color: var(--error) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

.btn-delete-config:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--error) !important;
}

.btn-delete-user {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-delete-user:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: var(--error);
  color: #fff;
}

.chip-delete-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 3px;
  font-size: 13px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
  margin-left: 5px;
}

.chip-delete-btn:hover {
  opacity: 1;
  transform: scale(1.2);
}

.modal-delete-btn {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.modal-delete-btn:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: var(--error) !important;
}

.hidden {
  display: none !important;
}


