/* ==========================================================================
   사고관리 로그인 및 회원가입 전용 스타일 (login.css)
   ========================================================================== */

.login-section {
  background: radial-gradient(circle at 10% 20%, rgba(240, 247, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 90%);
  padding: 120px 0 100px;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
}

.login-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
}

/* 1. Left Info Panel */
.login-info-panel {
  background: linear-gradient(135deg, #0a2e5c 0%, #0d47a1 50%, #1565c0 100%);
  color: var(--white);
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-info-panel::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 300px;
  height: 300px;
  background-color: rgba(0, 176, 255, 0.15);
  border-radius: 50%;
  filter: blur(80px);
}

.system-tag {
  font-family: var(--font-en);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--secondary);
  margin-bottom: 16px;
  display: block;
}

.login-info-panel h2 {
  color: var(--white);
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 24px;
}

.login-info-panel p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 40px;
}

.feature-bullets {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feature-bullet {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.bullet-icon {
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
  color: var(--accent);
}

.feature-bullet h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 4px;
}

.feature-bullet p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
  line-height: 1.4;
  margin-bottom: 0;
}

/* 2. Right Form Card */
.login-card {
  padding: 50px;
  background-color: var(--white);
  display: flex;
  flex-direction: column;
}

/* Tabs Navigation */
.login-tabs {
  display: flex;
  position: relative;
  background-color: var(--bg-light);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 35px;
  border: 1px solid var(--border-light);
}

.tab-btn {
  flex: 1;
  padding: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
  z-index: 2;
  transition: color var(--transition-fast);
}

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

.tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background-color: var(--white);
  border-radius: calc(var(--radius-md) - 2px);
  box-shadow: var(--shadow-sm);
  z-index: 1;
  transition: transform var(--transition-normal);
}

/* Form Slider & Slide Content */
.forms-slider-wrap {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.forms-slider {
  display: flex;
  transition: transform var(--transition-normal);
  width: 200%; /* Two forms side-by-side */
}

.form-slide {
  width: 50%;
  flex-shrink: 0;
  padding: 0 4px; /* Tiny buffer to avoid shadows getting clipped */
  transition: opacity var(--transition-normal);
}

.form-slide.slide-login {
  opacity: 1;
}

.form-slide.slide-signup {
  opacity: 0;
}

.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-subtitle {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 28px;
}

/* Forms layout grids */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-label span {
  color: #ef4444; /* Required mark red */
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1.125rem;
  color: var(--text-muted);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.9375rem;
  color: var(--text-dark);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.input-wrap .form-input {
  padding-left: 44px; /* Spacing for the icon */
}

.form-input:focus {
  border-color: var(--primary-vivid);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* Helpers (Checkboxes, links) */
.form-helper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 0.8125rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-medium);
  font-weight: 500;
}

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

.find-link {
  color: var(--text-light);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.find-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.form-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 24px;
}

.form-checkbox-label {
  font-size: 0.8125rem;
  color: var(--text-medium);
  line-height: 1.5;
  cursor: pointer;
}

.form-checkbox-label a {
  color: var(--primary-vivid);
  font-weight: 600;
}

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

/* Submit Button & Animations */
.form-submit-btn {
  width: 100%;
  padding: 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  justify-content: center;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Validation Feedback message */
.validation-message {
  display: block;
  font-size: 0.75rem;
  margin-top: 4px;
  font-weight: 500;
  position: absolute;
  bottom: -18px;
  right: 0;
}

.validation-message.error {
  color: #ef4444;
}

.validation-message.success {
  color: #10b981;
}

/* Success simulated modals styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background-color: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #ecfdf5;
  color: #10b981;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-weight: 700;
  border: 1px solid #d1fae5;
}

.modal-icon.error {
  background-color: #fef2f2;
  color: #ef4444;
  border-color: #fee2e2;
}

.modal-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.modal-desc {
  font-size: 0.9375rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 991px) {
  .login-wrapper {
    grid-template-columns: 1fr;
    max-width: 550px;
  }

  .login-info-panel {
    display: none; /* Hide panels on mobile for better usability */
  }

  .login-card {
    padding: 40px 30px;
  }
}

@media (max-width: 576px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .login-tabs {
    margin-bottom: 25px;
  }

  .login-card {
    padding: 30px 20px;
  }
}
