*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #fff;
}

body {
  position: relative;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
}

.modal-card {
  width: min(100%, 440px);
  padding: 24px 22px 22px;
  border-radius: 16px;
  background: #fff;
  color: #1a2e24;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  text-align: left;
}

.modal-title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a7336;
}

.modal-text {
  margin: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #33443c;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2b3d34;
}

.modal-field input {
  height: 46px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #c8d5cc;
  font-size: 0.95rem;
  outline: none;
}

.modal-field input:focus {
  border-color: #1a7336;
  box-shadow: 0 0 0 3px rgba(26, 115, 54, 0.18);
}

.modal-error {
  margin: 0;
  font-size: 0.85rem;
  color: #c62828;
}

.modal-submit {
  margin-top: 4px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, #8fd44a 0%, #1a7336 55%, #0f5a28 100%);
}

.maintenance-card {
  text-align: center;
}

.maintenance-countdown {
  margin: 0 0 18px;
  padding: 12px;
  border-radius: 12px;
  background: #eef6ef;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.maintenance-countdown-label {
  font-size: 0.82rem;
  color: #4a5c52;
}

#maintenanceCountdown {
  font-size: 1.65rem;
  letter-spacing: 0.06em;
  color: #1a7336;
  font-variant-numeric: tabular-nums;
}

.bg-night {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("./assets/media/login/login-night.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-night::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 28, 18, 0.12) 0%,
    rgba(0, 20, 12, 0.22) 50%,
    rgba(0, 12, 8, 0.38) 100%
  );
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.brand-logo {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  border-radius: 999px;
}

.login-shell {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 20px 120px;
  text-align: center;
}

.title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 8px 0 28px;
  font-size: 1.05rem;
  opacity: 0.95;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  position: relative;
  display: block;
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(8, 28, 20, 0.55);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.82);
}

.field input:focus {
  border-color: #8fd44a;
  box-shadow: 0 0 0 3px rgba(143, 212, 74, 0.25);
}

.field-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
}

.field-captcha input {
  padding-right: 132px;
}

.captcha-box {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border-radius: 8px;
  padding: 2px 4px 2px 2px;
}

#captchaCanvas {
  display: block;
  border-radius: 6px;
}

.captcha-refresh {
  border: 0;
  background: transparent;
  color: #1a7336;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 4px;
}

.form-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.link-btn {
  border: 0;
  background: transparent;
  color: #fff;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
}

.submit-btn {
  margin-top: 6px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, #8fd44a 0%, #1a7336 55%, #0f5a28 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s, filter 0.15s;
}

.submit-btn:hover {
  filter: brightness(1.05);
}

.submit-btn:active {
  transform: scale(0.99);
}

.demo-banner {
  margin: 16px 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
}

.quick-links {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quick-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quick-icon {
  font-size: 1rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(960px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

.bottom-item {
  color: #fff;
  text-decoration: none;
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bottom-icon {
  font-size: 1.1rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  z-index: 20;
  max-width: min(90vw, 420px);
  text-align: center;
}

.hidden {
  display: none !important;
}

.eye-closed.hidden,
.eye-open.hidden {
  display: none;
}

@media (min-width: 768px) {
  .brand-logo {
    font-size: 1.6rem;
  }

  .login-shell {
    padding-top: 40px;
  }
}

@media (max-width: 720px) {
  .bottom-nav {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 12px;
  }

  .bottom-item {
    font-size: 0.68rem;
  }
}
