/* ===== LOGIN MODAL ===== */
.cfb-modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cfb-fade-in 0.3s ease;
}

@keyframes cfb-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cfb-modal-content {
  background: white;
  border-radius: 0.75rem;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: cfb-slide-up 0.3s ease;
}

@keyframes cfb-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cfb-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  transition: color 0.2s;
}

.cfb-modal-close:hover {
  color: #333;
}

.cfb-modal h2 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  color: #1a1714;
}

/* ===== FORM ===== */
.cfb-auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cfb-form-group {
  display: flex;
  flex-direction: column;
}

.cfb-form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
  font-size: 0.95rem;
}

.cfb-form-group input {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.cfb-form-group input:focus {
  outline: none;
  border-color: var(--cf-red);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* ===== BUTTONS ===== */
.cfb-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-size: 0.95rem;
}

.cfb-btn-primary {
  background: var(--cf-red);
  color: white;
}

.cfb-btn-primary:hover {
  background: var(--cf-red);
  opacity: 0.85;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.cfb-btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.cfb-btn-secondary {
  background: transparent;
  color: var(--cf-red);
  border: 1px solid var(--cf-red);
}

.cfb-btn-secondary:hover {
  background: #f0f7ff;
}

.w-100 {
  width: 100%;
}

/* ===== DIVIDER ===== */
.cfb-auth-divider {
  text-align: center;
  color: #999;
  margin: 1rem 0;
  position: relative;
}

.cfb-auth-divider::before,
.cfb-auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 45%;
  height: 1px;
  background: #ddd;
}

.cfb-auth-divider::before {
  left: 0;
}

.cfb-auth-divider::after {
  right: 0;
}

/* ===== LINKS ===== */
.cfb-auth-link {
  text-align: center;
  margin: 0;
}

.cfb-auth-link a {
  color: var(--cf-red);
  text-decoration: none;
  transition: color 0.2s;
}

.cfb-auth-link a:hover {
  color: var(--cf-red);
  opacity: 0.8;
  text-decoration: underline;
}

/* ===== MESSAGES ===== */
.cfb-auth-message {
  padding: 0.75rem;
  border-radius: 0.375rem;
  text-align: center;
  font-size: 0.9rem;
  display: none;
  margin-top: 1rem;
}

.cfb-auth-message.error {
  display: block;
  background: #fee;
  color: #c00;
  border: 1px solid #fcc;
}

.cfb-auth-message.success {
  display: block;
  background: #efe;
  color: #060;
  border: 1px solid #cfc;
}

/* ===== HEADER LOGIN BUTTON ===== */
.cfb-header-login {
  padding: 0;
  background: none;
  color: var(--cf-red);
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-weight: 600;
  transition: color 0.2s;
}

.cfb-header-login:hover {
  color: var(--cf-red);
  opacity: 0.8;
}

.cfb-header-user-menu {
  position: relative;
  display: inline-block;
}

.cfb-header-user-menu .dropdown-toggle {
  padding: 0.5rem 1rem;
  background: #f0f0f0;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.cfb-header-user-menu .dropdown-toggle:hover {
  background: #e0e0e0;
}

.cfb-header-user-menu .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 0.375rem;
  min-width: 150px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
}

.cfb-header-user-menu .dropdown-menu.show {
  display: block;
}

.cfb-header-user-menu .dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
  border-bottom: 1px solid #eee;
}

.cfb-header-user-menu .dropdown-menu a:last-child {
  border-bottom: none;
}

.cfb-header-user-menu .dropdown-menu a:hover {
  background: #f5f5f5;
}

/* ===== MENU INTEGRATION ===== */
.cfb-auth-menu-item {
  display: flex;
  align-items: center;
}

.cfb-auth-menu-item .cfb-header-login,
.cfb-auth-menu-item .cfb-header-user-menu {
  margin-left: 1rem;
}

.cfb-auth-menu-item .cfb-header-user-menu .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .cfb-modal-content {
    width: 95%;
    padding: 1.5rem;
  }

  .cfb-modal h2 {
    font-size: 1.25rem;
  }

  .cfb-auth-menu-item .cfb-header-login,
  .cfb-auth-menu-item .cfb-header-user-menu {
    margin-left: 0;
  }

  .cfb-header-user-menu .dropdown-menu {
    right: auto;
    left: 0;
  }
}
