/* Login Page Styles */

:root {
  --primary-green: #27c291;
  --dark-bg: #0f172a;
  --dark-secondary: #1e293b;
  --light-bg: #ffffff;
  --text-light: #f8fafc;
  --text-dark: #1e293b;
  --border-light: #e2e8f0;
  --border-dark: #334155;
}

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

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a1a1a;
}

/* Full-Screen Carousel Background */
.carousel-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

/* Dark overlay over entire background */
.carousel-overlay-dark {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.login-container {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

/* Left Panel - Branding (transparent, content floats on carousel) */
.login-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 3rem 3rem;
  position: relative;
  z-index: 2;
}

/* Content on top of carousel */
.login-branding,
.login-footer {
  position: relative;
  z-index: 2;
}

.login-left::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(39, 194, 145, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.login-left::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(39, 194, 145, 0.08) 0%,
    transparent 70%
  );
  border-radius: 50%;
  bottom: -50px;
  left: -50px;
  pointer-events: none;
}

.login-branding {
  text-align: left;
  z-index: 10;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
}

.login-logo {
  width: 50px;
  height: 50px;
  background: rgba(39, 194, 145, 0.15);
  border: 2px solid rgba(39, 194, 145, 0.4);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #27c291;
  animation: float 3s ease-in-out infinite;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.2;
}

.login-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 300px;
  line-height: 1.6;
}

.login-features {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 350px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(39, 194, 145, 0.3);
  transform: translateX(5px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: rgba(39, 194, 145, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary-green);
  flex-shrink: 0;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feature-text h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
}

.feature-text p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.login-footer {
  text-align: left;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  z-index: 10;
}

/* Right Panel - Form */
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: transparent;
}

.login-form-wrapper {
  width: 100%;
  max-width: 560px;
  background: white;
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-form-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-form-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.login-form-header p {
  font-size: 0.95rem;
  color: #64748b;
}

/* Tabs */
.form-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-light);
}

.tab-btn {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
  text-align: center;
}

.tab-btn:hover {
  color: var(--text-dark);
}

.tab-btn.active {
  color: var(--primary-green);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary-green);
}

/* Form Content */
.form-content {
  display: none;
}

.form-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Form Fields */
.form-group {
  margin-bottom: 0.75rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.form-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  padding-left: 2.6rem;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
  background-color: #f8fafc;
}

.form-input[type="password"] {
  padding-right: 3rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-green);
  background-color: var(--light-bg);
  box-shadow: 0 0 0 3px rgba(39, 194, 145, 0.1);
}

.form-input::placeholder {
  color: #cbd5e1;
}

.form-input-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1.1rem;
  pointer-events: none;
}

/* Password toggle button styling (login page) */
.password-toggle {
  position: absolute !important;
  right: 0.75rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  color: #94a3b8 !important;
  font-size: 1.1rem !important;
  padding: 0.25rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.form-input.error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.form-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
  display: none;
}

.form-error.show {
  display: block;
}

/* Checkbox */
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-green);
}

.form-checkbox label {
  font-size: 0.9rem;
  color: #64748b;
  cursor: pointer;
}

/* Submit Button */
.form-submit {
  width: 100%;
  padding: 0.95rem;
  background: linear-gradient(135deg, #27c291 0%, #1fb584 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(39, 194, 145, 0.3);
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 194, 145, 0.4);
}

.form-submit:active {
  transform: translateY(0);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Link */
.form-link {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.form-link a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.form-link a:hover {
  text-decoration: underline;
}

/* Global Toast Notification */
.global-toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1000;
  transition: bottom 0.4s ease;
  border: 1px solid #e2e8f0;
}

.global-toast.show {
  bottom: 2rem;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 500;
}

.toast-content i {
  color: #27c291;
  font-size: 1.25rem;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 1.2rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.toast-close:hover {
  color: #1e293b;
}

/* Responsive */
@media (max-width: 1024px) {
  .login-container {
    flex-direction: column;
    height: 100%;
  }

  .login-left {
    height: 40%;
    width: 100%;
    padding: 1.5rem;
    display: flex;
  }

  .login-right {
    height: 60%;
    width: 100%;
    padding: 1rem;
  }

  .login-form-wrapper {
    max-width: 360px;
    padding: 2rem 1.75rem;
  }

  .login-features {
    flex-direction: row;
    max-width: 100%;
    gap: 1rem;
  }

  .login-title {
    font-size: 1.75rem;
  }

  .login-logo {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
  }

  .feature-item {
    padding: 0.75rem;
  }

  .login-form-header h2 {
    font-size: 1.5rem;
  }

  .form-tabs {
    margin-bottom: 1.5rem;
  }

  .form-submit {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 640px) {
  .login-left {
    display: none !important;
  }

  .login-right {
    height: 100%;
    width: 100%;
    padding: 1rem 0.75rem;
  }

  .login-form-wrapper {
    max-width: 100%;
    width: 100%;
    padding: 0 0.75rem;
  }

  .login-form-header {
    margin-bottom: 1rem;
  }

  .login-form-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
  }

  .login-form-header p {
    font-size: 0.85rem;
  }

  .form-tabs {
    margin-bottom: 1.25rem;
    padding: 0 -0.5rem;
  }

  .tab-btn {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  .form-group {
    margin-bottom: 0.7rem;
  }

  .form-label {
    font-size: 0.75rem;
    margin-bottom: 0.35rem;
  }

  .form-input {
    padding: 0.65rem 0.875rem;
    padding-left: 2.25rem;
    font-size: 16px;
  }

  .form-checkbox {
    margin-bottom: 0.75rem;
  }

  .form-checkbox label {
    font-size: 0.8rem;
  }

  .form-submit {
    padding: 0.7rem;
    font-size: 0.85rem;
  }

  .form-link {
    margin-top: 0.5rem;
    font-size: 0.75rem;
  }
}

.form-input.border-red-500 {
  border-color: #ef4444 !important;
}

.form-input.border-red-500:focus {
  border-color: #ef4444 !important;
  ring-color: #fecaca !important;
}

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.alert-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
}

.alert-success {
  background-color: #efe;
  border: 1px solid #cfc;
  color: #3c3;
}
