:root {
  --corporate-red: #940000;
  --accent-soft-red: #fff5f5;
  --primary-bg: #ffffff;
  --text-dark: #1a1a1a;
  --text-muted: #666666;
  --font-century: "Century Gothic", "CenturyGothic", "Apple Gothic", "Trebuchet MS", sans-serif;
  --header-gradient: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
  --auth-shadow: 0 24px 60px rgba(148, 0, 0, 0.12);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-century);
  color: var(--text-dark);
}

.auth-page {
  background: var(--header-gradient);
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr 1fr;
}

.auth-panel {
  position: relative;
  background-color: var(--corporate-red);
  background-image: var(--auth-panel-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #ffffff;
  overflow: hidden;
}

.auth-panel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(148, 0, 0, 0.92) 0%,
    rgba(148, 0, 0, 0.78) 45%,
    rgba(80, 0, 0, 0.88) 100%
  );
}

.auth-panel-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 2.5rem 3rem;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
}

.auth-brand .brand-logo-img {
  height: 42px;
  width: auto;
  filter: brightness(0) invert(1);
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--corporate-red);
  margin-bottom: 1rem;
}

.auth-mobile-brand .brand-logo-text {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--corporate-red) !important;
}

.auth-panel-content h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 420px;
}

.auth-panel-content p {
  font-size: 1.05rem;
  line-height: 1.65;
  opacity: 0.95;
  max-width: 440px;
  margin-bottom: 1.75rem;
}

.auth-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.auth-features li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}

.auth-features i {
  font-size: 1.1rem;
  opacity: 0.9;
  flex-shrink: 0;
}

.auth-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.85rem;
  font-weight: 600;
}

.auth-panel-copy {
  opacity: 0.75;
  font-size: 0.85rem;
}

.auth-form-side {
  display: flex;
  flex-direction: column;
  background: var(--header-gradient);
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem 0;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--corporate-red);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.auth-back-link:hover {
  color: #7a0000;
}

.auth-lang-btn {
  background: var(--primary-bg);
  color: var(--corporate-red) !important;
  border: 1px solid rgba(148, 0, 0, 0.25) !important;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: none;
}

.auth-lang .dropdown-item.active {
  background: var(--accent-soft-red);
  color: var(--corporate-red);
  font-weight: 600;
}

.auth-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 2rem 2rem;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--primary-bg);
  border: 1px solid rgba(148, 0, 0, 0.1);
  border-radius: 16px;
  padding: 1.35rem 1.5rem 1.25rem;
  box-shadow: var(--auth-shadow);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 1rem;
}

.auth-icon-wrap {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft-red);
  color: var(--corporate-red);
  font-size: 1.2rem;
}

.auth-card-header h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--corporate-red);
  margin: 0 0 0.25rem;
}

.auth-card-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.auth-alert {
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
}

.auth-alert-danger {
  background: #fff5f5;
  border: 1px solid rgba(148, 0, 0, 0.2);
  color: #7a0000;
}

.auth-alert-success {
  background: #f0fdf4;
  border: 1px solid rgba(22, 163, 74, 0.25);
  color: #166534;
}

.auth-field {
  margin-bottom: 0.85rem;
}

.auth-field label {
  display: block;
  font-weight: 600;
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
  color: var(--text-dark);
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .field-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--corporate-red);
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 1;
}

.auth-input {
  width: 100%;
  height: 40px;
  padding: 0 0.85rem 0 2.4rem;
  border: 1px solid rgba(148, 0, 0, 0.2);
  border-radius: 10px;
  font-size: 0.85rem;
  background: var(--primary-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--corporate-red);
  box-shadow: 0 0 0 3px rgba(148, 0, 0, 0.12);
}

.auth-input.is-invalid {
  border-color: #dc3545;
}

.auth-toggle-password {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 0.25rem;
  cursor: pointer;
  line-height: 1;
}

.auth-toggle-password:hover {
  color: var(--corporate-red);
}

.auth-input-wrap:has(.auth-toggle-password) .auth-input {
  padding-right: 2.75rem;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.auth-remember input {
  accent-color: var(--corporate-red);
  width: 0.9rem;
  height: 0.9rem;
}

.auth-forgot {
  color: var(--corporate-red);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-forgot:hover {
  color: #7a0000;
  text-decoration: underline;
}

.auth-submit {
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: var(--corporate-red);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.auth-submit i {
  font-size: 0.95rem;
}

.auth-submit:hover {
  background: #7a0000;
  transform: translateY(-1px);
  color: #ffffff;
}

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

.auth-footer-note {
  text-align: center;
  margin: 0.9rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.auth-footer-note a {
  color: var(--corporate-red);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer-note a:hover {
  text-decoration: underline;
}

@media (max-width: 991px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    display: none;
  }

  .auth-mobile-brand {
    display: flex;
  }

  .auth-form-wrap {
    padding: 1rem 1.25rem 2rem;
  }

  .auth-card {
    padding: 1.15rem 1.15rem 1rem;
  }
}

@media (max-width: 480px) {
  .auth-topbar {
    padding: 1rem 1.25rem 0;
  }

  .auth-options {
    flex-direction: column;
    align-items: flex-start;
  }
}
