/* ==========================================================================
   RESUM - Responsive & Accessible CSS Design System
   ========================================================================== */

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

:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  --brand-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --brand-hover: linear-gradient(135deg, #047857 0%, #059669 100%);
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #10b981;
  --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  --shadow-btn: 0 4px 14px rgba(16, 185, 129, 0.35);
  --shadow-btn-hover: 0 6px 20px rgba(16, 185, 129, 0.45);
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Layout Wrapper & Card Container
   ========================================================================== */

.wrapper {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.container {
  width: 100%;
  display: flex;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ==========================================================================
   Left Column - Branding & Logo
   ========================================================================== */

.col-left {
  width: 42%;
  background: var(--brand-gradient);
  padding: 48px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.col-left::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.login-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-logo {
  max-width: 160px;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.brand-logo:hover {
  transform: scale(1.03);
}

.brand-title {
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ==========================================================================
   Right Column - Form Area
   ========================================================================== */

.col-right {
  width: 58%;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

.login-form {
  width: 100%;
}

.login-form h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.form-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Alert Notification */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
}

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

.alert i {
  font-size: 16px;
  flex-shrink: 0;
}

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

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

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

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-light);
  font-size: 16px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.form-control {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 46px;
  font-family: var(--font-primary);
  font-size: 15px;
  color: var(--text-primary);
  background-color: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-control:focus {
  background-color: #ffffff;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.input-icon-wrapper:focus-within .input-icon {
  color: var(--border-focus);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  padding: 0 24px;
  border: none;
  border-radius: 12px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.99);
  box-shadow: var(--shadow-btn);
}

.btn i {
  transition: transform 0.2s ease;
}

.btn:hover i {
  transform: translateX(4px);
}

/* Footer Credit */
.credit {
  margin-top: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 400;
}

.credit p {
  margin: 0;
}

/* ==========================================================================
   Responsive Breakpoints for Mobile & Screen Optimization
   ========================================================================== */

/* Tablet & Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }

  .wrapper {
    max-width: 480px;
  }

  .container {
    flex-direction: column;
    border-radius: 20px;
  }

  .col-left {
    width: 100%;
    padding: 32px 24px;
  }

  .brand-logo {
    max-width: 130px;
    margin-bottom: 12px;
  }

  .brand-title {
    font-size: 24px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .col-right {
    width: 100%;
    padding: 32px 24px;
  }

  .login-form h2 {
    font-size: 22px;
  }

  .form-desc {
    margin-bottom: 20px;
  }
}

/* Small Mobile Screens (<= 480px) */
@media (max-width: 480px) {
  body {
    padding: 8px;
  }

  .col-left {
    padding: 24px 16px;
  }

  .brand-logo {
    max-width: 110px;
    padding: 8px;
    margin-bottom: 8px;
  }

  .col-right {
    padding: 24px 16px;
  }

  .form-control,
  .btn {
    height: 48px;
    font-size: 15px;
  }

  .credit {
    margin-top: 16px;
    font-size: 12px;
  }
}

/* Dark Mode / High Contrast Accessibility Preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
