/* ========================================================
   AUTHENTICATION & USER PROFILE STYLES (URBANSTYLE)
   ======================================================== */

/* User Auth Button & Dropdown in Navbar */
.auth-nav-wrapper {
  position: relative;
  display: inline-block;
}

.auth-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-user-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.auth-user-btn .user-avatar-mini {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

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

/* Dropdown Menu */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 8px 0;
  z-index: 200;
  display: none;
  animation: fadeInDown 0.15s ease-out;
}

.user-dropdown-menu.active {
  display: block;
}

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

.dropdown-user-header .dh-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
}

.dropdown-user-header .dh-email {
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-user-header .role-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 4px;
  background: #eff6ff;
  color: #2563eb;
}

.dropdown-user-header .role-tag.role-admin {
  background: #fdf2f8;
  color: #db2777;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: #f8fafc;
  color: var(--accent);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* ========================================================
   MODAL ĐĂNG NHẬP / ĐĂNG KÝ (CUSTOMER AUTH MODAL)
   ======================================================== */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.auth-modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.auth-card {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
  transform: translateY(15px);
  transition: transform 0.25s ease;
}

.auth-modal-backdrop.active .auth-card {
  transform: translateY(0);
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 0.95rem;
  transition: all 0.2s;
  z-index: 10;
}

.auth-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Modal Tabs */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.auth-tab-btn {
  flex: 1;
  padding: 16px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: #ffffff;
}

.auth-body {
  padding: 24px;
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
}

/* Alert Notification */
.auth-alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

.auth-alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Form Controls */
.auth-form-group {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.auth-input-wrapper {
  position: relative;
}

.auth-input-wrapper i.prefix-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
}

.auth-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-main);
  background: #fff;
  transition: all 0.2s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.auth-footer-hint {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 16px;
}

.auth-footer-hint a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.auth-footer-hint a:hover {
  text-decoration: underline;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
