/* =======================================================
   LOGIN OVERLAY & AUTHENTICATION STYLES
   ======================================================= */
.login-overlay {
  position: fixed;
  inset: 0;
  background: #090d16;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.22) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.18) 0px, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  backdrop-filter: blur(12px);
  animation: fadeInModal 0.25s ease;
}

.login-card {
  width: 420px;
  max-width: 100%;
  background: rgba(18, 25, 41, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-brand-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 6px 20px var(--primary-glow);
  margin-bottom: 14px;
}

.login-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.login-header p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 11px 18px;
  font-size: 14.5px;
  margin-top: 4px;
}

.login-error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.login-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.login-badge-info {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.login-hint {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

.login-hint strong {
  color: #c7d2fe;
}

/* USER PROFILE BADGE IN SIDEBAR */
.user-profile-badge {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.user-details {
  flex: 1;
  overflow: hidden;
}

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

.user-role-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-logout-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout-icon:hover {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}

/* SUPERADMIN STYLES */
.nav-superadmin {
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
  margin-top: 6px;
}

.nav-superadmin:hover {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

.modal-card-wide {
  width: 760px;
  max-width: 95vw;
}

.admin-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-icon {
  font-size: 20px;
}

.superadmin-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: 75vh;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-section-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
}

.admin-section-box h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.create-user-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.flex-1 {
  flex: 1;
}

.admin-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-user-table th, .admin-user-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.admin-user-table th {
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
}

.admin-user-table td {
  color: var(--text-main);
}

.role-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.role-badge.superadmin {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.role-badge.member {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

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

.btn-table-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-table-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-table-action.delete:hover {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}

/* PWA INSTALL BUTTON IN TOPBAR */
.btn-pwa-install {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-main);
}

.btn-pwa-install:hover {
  background: var(--primary);
  color: #fff;
}
