/**
 * Nordic Login - Split Layout Design
 * Modern Scandinavian-inspired login page
 * Always Light Mode - no dark mode switching
 */

/* ========================================
   CSS Variables (Light Nordic - always)
   ======================================== */
:root {
  --login-accent-slate: #5b7c8d;
  --login-accent-mint: #7fb3a1;
  --login-bg-primary: #fafbfc;
  --login-bg-card: #ffffff;
  --login-bg-secondary: #f5f7f9;
  --login-text-primary: #2c3e50;
  --login-text-secondary: #64748b;
  --login-text-muted: #94a3b8;
  --login-border-light: #e2e8f0;
  --login-border-medium: #cbd5e1;
  --login-shadow-sm: 0 1px 2px rgba(44, 62, 80, 0.04), 0 1px 3px rgba(44, 62, 80, 0.06);
  --login-shadow-md: 0 4px 6px rgba(44, 62, 80, 0.05), 0 2px 4px rgba(44, 62, 80, 0.06);
}

/* ========================================
   Base Layout
   ======================================== */
body.nordic-login {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Rubik', sans-serif !important;
  background: #fafbfc !important;
  color: #2c3e50 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light !important;
}

.nordic-login-wrapper {
  display: flex;
  min-height: 100vh;
  background: none;
}

/* ========================================
   Left Side - Image Panel
   ======================================== */
.nordic-login-image {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.nordic-login-image__bg {
  position: absolute;
  inset: 0;
  background: url("../img/bg-auth.jpg") center / cover no-repeat;
}

.nordic-login-image__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(44, 62, 80, 0.85) 0%,
    rgba(44, 62, 80, 0.5) 40%,
    rgba(91, 124, 141, 0.3) 100%
  );
}

.nordic-login-image__content {
  position: relative;
  z-index: 2;
  padding: 3rem;
  max-width: 500px;
}

.nordic-login-image__title {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff !important;
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.nordic-login-image__subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  line-height: 1.6;
  font-weight: 400;
}

/* ========================================
   Right Side - Form Panel
   ======================================== */
.nordic-login-form {
  width: 480px;
  min-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2.5rem;
  background: #fafbfc !important;
  border-left: 1px solid #e2e8f0;
  position: relative;
  overflow-y: auto;
}

.nordic-login-form__inner {
  width: 100%;
  max-width: 360px;
}

/* ========================================
   Logo
   ======================================== */
.nordic-login-logo {
  text-align: center;
  margin-bottom: 2.5rem;
}

.nordic-login-logo img {
  height: 14vh;
  max-height: 120px;
  width: auto;
  object-fit: contain;
}

/* ========================================
   Title & Description
   ======================================== */
.nordic-login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50 !important;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
}

.nordic-login-description {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 2rem 0;
  line-height: 1.5;
}

/* ========================================
   Form Elements
   ======================================== */
.nordic-login-field {
  margin-bottom: 1.25rem;
}

.nordic-login-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.4rem;
}

.nordic-login-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.nordic-login-forgot {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #5b7c8d;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nordic-login-forgot:hover {
  color: #7fb3a1;
  text-decoration: none;
}

.nordic-login-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: #2c3e50 !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.nordic-login-input::placeholder {
  color: #94a3b8;
}

.nordic-login-input:focus {
  border-color: #5b7c8d !important;
  box-shadow: 0 0 0 3px rgba(91, 124, 141, 0.08) !important;
}

/* Password field with eye toggle */
.nordic-login-password-wrapper {
  position: relative;
}

.nordic-login-password-wrapper .nordic-login-input {
  padding-right: 2.75rem;
}

.nordic-login-password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #94a3b8;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nordic-login-password-toggle:hover {
  color: #64748b;
}

.nordic-login-password-toggle svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   Checkbox
   ======================================== */
.nordic-login-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.nordic-login-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  accent-color: #5b7c8d;
  margin: 0;
}

.nordic-login-checkbox label {
  font-size: 0.85rem;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

/* ========================================
   Submit Button
   ======================================== */
.nordic-login-button {
  width: 100%;
  padding: 0.7rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  color: #ffffff;
  background: #5b7c8d;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.nordic-login-button:hover {
  background: #7fb3a1;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(44, 62, 80, 0.05), 0 2px 4px rgba(44, 62, 80, 0.06);
}

.nordic-login-button:active {
  transform: translateY(0);
}

.nordic-login-button:focus-visible {
  outline: 2px solid #5b7c8d;
  outline-offset: 2px;
}

/* ========================================
   Divider
   ======================================== */
.nordic-login-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.nordic-login-divider::before,
.nordic-login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.nordic-login-divider span {
  font-size: 0.8125rem;
  color: #94a3b8;
  font-weight: 400;
  white-space: nowrap;
}

/* ========================================
   Footer Link
   ======================================== */
.nordic-login-footer {
  text-align: center;
}

.nordic-login-footer p {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0;
}

.nordic-login-footer a {
  color: #5b7c8d;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nordic-login-footer a:hover {
  color: #7fb3a1;
}

/* ========================================
   Password Hint (Register page)
   ======================================== */
.nordic-login-password-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.375rem;
  line-height: 1.4;
}

/* ========================================
   Inline Link (e.g. AGB link in checkbox)
   ======================================== */
.nordic-login-link {
  color: #5b7c8d;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nordic-login-link:hover {
  color: #7fb3a1;
}

/* ========================================
   Error Messages
   ======================================== */
.nordic-login-alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* ========================================
   Notification bar (top)
   ======================================== */
body.nordic-login .meldung {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: auto;
  max-width: 500px;
  min-width: 300px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 991.98px) {
  .nordic-login-image {
    display: none;
  }

  .nordic-login-form {
    width: 100%;
    min-width: 100%;
    min-height: 100vh;
    border-left: none;
  }
}

@media (max-width: 480px) {
  .nordic-login-form {
    padding: 2rem 1.5rem;
  }

  .nordic-login-form__inner {
    max-width: 100%;
  }

  .nordic-login-image__title {
    font-size: 1.5rem;
  }
}

/* ========================================
   2FA Modal Nordic Overrides
   ======================================== */
body.nordic-login .modal-content {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  background: #ffffff;
}

body.nordic-login .modal-header {
  border-bottom: 1px solid #e2e8f0;
  padding: 1.25rem 1.5rem;
}

body.nordic-login .modal-header .modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2c3e50;
}

body.nordic-login .modal-body {
  padding: 1.5rem;
}

body.nordic-login .modal-footer {
  border-top: 1px solid #e2e8f0;
  padding: 1rem 1.5rem;
}

body.nordic-login .modal-footer .btn-outline-primary,
body.nordic-login .modal-footer .btn-outline-primary:focus,
body.nordic-login .modal-footer .btn-outline-primary:active {
  background: #2c3e50 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: none !important;
}

body.nordic-login .modal-footer .btn-outline-primary:hover {
  background: #5b7c8d !important;
}

body.nordic-login .modal-footer .btn-outline-secondary,
body.nordic-login .modal-footer .btn-outline-secondary:focus,
body.nordic-login .modal-footer .btn-outline-secondary:active {
  border-radius: 8px;
  border: 1px solid #cbd5e1 !important;
  color: #64748b !important;
  background: transparent !important;
  font-weight: 500;
  box-shadow: none !important;
}

/* ========================================
   OTC Input (2FA code field)
   ======================================== */
body.nordic-login .otc .form-control {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1.5rem;
  letter-spacing: 0.5rem;
  padding: 0.75rem;
  color: #2c3e50;
  background: #ffffff;
  transition: all 0.2s ease;
}

body.nordic-login .otc .form-control:focus {
  border-color: #5b7c8d;
  box-shadow: 0 0 0 3px rgba(91, 124, 141, 0.08);
}
