/* ===== LOGIN PAGE STYLES ===== */

.login-body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0a0d14;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.login-bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: float 8s ease-in-out infinite;
}

.login-bg-circle-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #6366f1, transparent);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.login-bg-circle-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #8b5cf6, transparent);
  bottom: -100px;
  right: -100px;
  animation-delay: -3s;
}

.login-bg-circle-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #06b6d4, transparent);
  top: 50%;
  right: 30%;
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(20px);
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255,255,255,0.05) inset;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.login-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: white;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.login-brand-text {
  display: flex;
  flex-direction: column;
}

.login-brand-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.login-brand-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  margin: 0 0 28px;
}

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  color: #fca5a5;
  font-size: 14px;
  margin-bottom: 20px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.2px;
}

.form-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-input:focus {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-input::placeholder {
  color: rgba(255,255,255,0.2);
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
  margin-top: 4px;
  font-family: inherit;
}

.login-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.45);
}

.login-btn:active {
  transform: translateY(0);
}

.login-footer {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.2);
  margin: 28px 0 0;
}

/* ===== USER MENU IN TOPBAR ===== */

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-menu {
  position: relative;
}

.user-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  padding: 7px 12px;
  cursor: pointer;
  color: inherit;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
  font-family: inherit;
}

.user-avatar:hover {
  background: rgba(99, 102, 241, 0.2);
}

.avatar-initials {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.user-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1e2130;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  min-width: 220px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04) inset;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.user-dropdown.open {
  display: block;
  animation: dropdown-in 0.15s ease;
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
  padding: 14px 16px;
  background: rgba(99, 102, 241, 0.08);
}

.dropdown-name {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.dropdown-role {
  font-size: 11px;
  font-weight: 600;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 2px 0;
}

.dropdown-email {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

.dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
}

.dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

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

.dropdown-logout {
  color: #fca5a5;
}

.dropdown-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

/* ===== ROLE BADGES ===== */

.badge.role-admin {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge.role-manager {
  background: rgba(251, 146, 60, 0.15);
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, 0.2);
}

.badge.role-user {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-success {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #86efac !important;
  border: 1px solid rgba(34, 197, 94, 0.2) !important;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

/* ===== EXTRA FORM STYLES ===== */
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, rgba(255,255,255,0.5));
  margin-bottom: 5px;
}

.field-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.field-input:focus {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.field-input:disabled {
  cursor: not-allowed;
}

.required {
  color: #f87171;
}

.btn-sm {
  padding: 5px 10px !important;
  font-size: 12px !important;
}

.btn-warning {
  background: rgba(251, 146, 60, 0.15) !important;
  color: #fdba74 !important;
  border: 1px solid rgba(251, 146, 60, 0.25) !important;
}

.btn-warning:hover {
  background: rgba(251, 146, 60, 0.25) !important;
}

.btn-success {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #86efac !important;
  border: 1px solid rgba(34, 197, 94, 0.2) !important;
}

.profile-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 14px;
}
