@import url("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600;700&display=swap");

:root {
  --login-btn-color: #dc5f13;
  --login-btn-border-color: #a35229;
  --panel-bg: #566672;
  --info-bg: #051a2b;
  --accent: #dc5f13;
  --text: #ffffff;
  --muted: #cfd6dc;
  --font-ui: "Source Sans Pro", system-ui, sans-serif;
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: #0a1520 url("assets/esube/img/bg_login.jpg") no-repeat center center fixed;
  background-size: cover;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #ffd2b3;
  text-decoration: none;
}

a:hover {
  color: #fff;
  text-decoration: underline;
}

.auth-page {
  padding: 40px 16px 32px;
  max-width: 1180px;
  margin: 0 auto;
}

.auth-logo-wrap {
  text-align: center;
  margin-bottom: 8px;
}

.auth-logo-wrap img {
  max-width: min(520px, 92vw);
  height: auto;
  display: inline-block;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-top: 20px;
}

.auth-panel {
  background: var(--panel-bg);
  border-radius: var(--radius);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.auth-panel--form {
  padding: 14px 14px 18px;
}

.auth-panel--register {
  min-height: 420px;
}

.auth-panel-title {
  margin: 4px 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.auth-field {
  margin-bottom: 10px;
}

.auth-label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  margin-bottom: 4px;
  font-family: var(--font-ui);
}

.auth-input,
.auth-select {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #d2d6de;
  border-radius: 3px;
  background: #fff;
  color: #333;
  font-family: var(--font-ui);
  font-size: 14px;
  outline: none;
}

.auth-input:focus,
.auth-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(220, 95, 19, 0.25);
}

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

.auth-input-wrap--toggle .auth-input {
  padding-right: 42px;
}

.auth-toggle-pass {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #666;
  cursor: pointer;
  padding: 4px;
  border-radius: 3px;
}

.auth-toggle-pass:hover {
  color: #222;
  background: rgba(0, 0, 0, 0.06);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
  font-size: 13px;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.auth-link {
  color: #ffe0cc;
  font-size: 13px;
  font-weight: 600;
}

.auth-btn {
  width: 100%;
  height: 44px;
  border: 1px solid var(--login-btn-border-color);
  border-radius: 3px;
  background: var(--login-btn-color);
  color: #fff !important;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}

.auth-btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-btn.is-loading {
  color: transparent !important;
  position: relative;
}

.auth-btn.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.auth-footer-text {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: #e8eef2;
}

.auth-footer-text a {
  color: #fff;
  font-weight: 700;
}

.auth-error {
  display: none;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 3px;
  background: rgba(185, 74, 72, 0.2);
  border: 1px solid #eed3d7;
  color: #ffd7d7;
  font-size: 13px;
}

.auth-error.is-visible {
  display: block;
}

.auth-strength {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin-top: 6px;
  overflow: hidden;
  display: none;
}

.auth-strength.is-on {
  display: block;
}

.auth-strength-bar {
  height: 100%;
  width: 0;
  transition: width 0.25s, background 0.25s;
}

.auth-strength-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.auth-panel--slider {
  background: var(--info-bg);
  border: 4px solid var(--accent);
  padding: 0;
  overflow: hidden;
  min-height: 280px;
  height: auto;
  align-self: stretch;
}

.slider-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.auth-info {
  margin-top: 20px;
  margin-left: auto;
  width: min(760px, 100%);
  background: var(--info-bg);
  border-radius: var(--radius);
  padding: 18px 22px 22px;
  min-height: 180px;
}

.auth-info h2 {
  margin: 0 0 12px;
  text-align: center;
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
}

.auth-info p {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.auth-pwa-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 5001;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid rgba(220, 95, 19, 0.7);
  background: rgba(5, 26, 43, 0.9);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-pwa-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  background: #fff;
  border-radius: 3px;
  padding: 1px;
}

.auth-pwa-btn[hidden] {
  display: none !important;
}

.auth-loading {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 26, 43, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
}

.auth-loading.is-visible {
  display: flex;
}

.auth-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(220, 95, 19, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.auth-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  padding: 0.875rem 1.25rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 2000;
  transition: transform 0.35s ease, opacity 0.35s ease;
  opacity: 0;
  max-width: min(90vw, 400px);
  text-align: center;
}

.auth-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.auth-toast--ok {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.auth-toast--err {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

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

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

  .auth-panel--slider {
    height: 220px;
    min-height: 220px;
  }

  .auth-info {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .auth-page {
    padding: 24px 12px 24px;
  }

  .auth-panel--form {
    padding: 12px;
  }
}
