/* ===== Login oldal – az original planzee kinézete ===== */

:root {
  /* Ugyanaz a primér kék mint az /attendance (.attendance-page --ws-primary) */
  --ws-primary: #2563eb;
  --btn-bg-1: rgba(59, 130, 246, 0.92);
  --btn-bg-2: rgba(37, 99, 235, 0.92);
  --btn-text: #ffffff;
  --btn-ring: #93c5fd;
  --btn-shadow: 0 12px 24px rgba(37, 99, 235, 0.2), 0 2px 6px rgba(0, 0, 0, 0.08);
  --btn-shadow-hover: 0 14px 28px rgba(37, 99, 235, 0.28), 0 6px 10px rgba(0, 0, 0, 0.1);
}

body.guest-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

body.guest-page .login-page-wrapper {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body.guest-page .app-footer {
  width: 100%;
  flex-shrink: 0;
}

.login-page-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 0;
  flex-wrap: wrap;
  min-height: 0;
  overflow: hidden;
  overflow-x: hidden;
  box-sizing: border-box;
}

.left-side-wrapper {
  flex: 0 1 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.left-logo {
  background: url('/images/logo.webp') no-repeat left center;
  background-size: contain;
  width: 100%;
  height: 12vh;
  padding: 0;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.left-side {
  position: relative;
  width: 100%;
  min-height: 500px;
  background: url('/images/login_man.webp') no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.login-container {
  width: 450px;
  padding: 30px;
  /* /attendance .glass-panel + fejléc panelek: 16px, ugyanaz a háttér és szegély */
  border-radius: 16px;
  position: relative;
  color: #0f172a;
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform, backdrop-filter;
  background-clip: padding-box;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid #EBEBEB;
  overflow: hidden;
  font-variant-ligatures: none;
  -webkit-font-feature-settings: "liga" off, "clig" off, "calt" off;
  font-feature-settings: "liga" off, "clig" off, "calt" off;
}

.login-container::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 100%);
  border-radius: 50%;
  filter: blur(12px);
  pointer-events: none;
}

.login-container::after {
  content: "";
  position: absolute;
  box-shadow:
    50px 260px 0 0 rgba(37, 99, 235, 0.06),
    240px 240px 0 0 rgba(59, 130, 246, 0.08);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
}

.login-container .corner-glow {
  position: absolute;
  top: -70px;
  left: -70px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.42) 20%, transparent 42%),
    radial-gradient(circle, rgba(37,99,235,0.12) 0%, rgba(59,130,246,0.06) 40%, rgba(255,255,255,0.04) 75%, transparent 100%);
  filter: blur(18px);
}

.login-title-wrap {
  text-align: center;
  margin-bottom: 28px;
}

.login-container h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  color: #0f172a;
}

.login-subtitle {
  margin: 10px 0 0 0;
  font-size: 15px;
  font-weight: 500;
  color: #64748b;
}

.login-title-wrap::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, var(--ws-primary), transparent);
  border-radius: 2px;
  opacity: 0.85;
}

.login-container .error-banner {
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.96) 0%, rgba(254, 226, 226, 0.92) 100%);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 14px;
  margin-bottom: 16px;
  text-align: left;
  font-size: 14px;
}

/* Inaktív fiók / cég – informatív, nem „hiba” stílus */
.login-container .notice-banner {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96) 0%, rgba(241, 245, 249, 0.92) 100%);
  border: 1px solid rgba(203, 213, 225, 0.8);
  color: #334155;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  text-align: left;
  font-size: 14px;
}

.login-container .notice-banner--disabled {
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.96) 0%, rgba(254, 243, 199, 0.94) 100%);
  border-color: rgba(245, 158, 11, 0.35);
  color: #92400e;
}

.login-container .notice-banner__title {
  margin: 0 0 6px 0;
  font-weight: 600;
  font-size: 15px;
}

.login-container .notice-banner__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  opacity: 1;
}

.login-container .success-banner {
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.96) 0%, rgba(220, 252, 231, 0.94) 100%);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #166534;
  padding: 10px 12px;
  border-radius: 14px;
  margin-bottom: 16px;
  text-align: left;
  font-size: 14px;
}

/* Elfelejtett jelszó – visszajelzés doboz + „Mi a teendő?” */
.login-container .forgot-feedback {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  text-align: left;
  font-size: 14px;
}
.login-container .forgot-feedback__message {
  margin: 0 0 12px 0;
  font-weight: 600;
}
.login-container .forgot-feedback__teendo-title {
  margin: 0 0 6px 0;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.95;
}
.login-container .forgot-feedback__teendo-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.5;
}
.login-container .forgot-feedback.success-banner {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #14532d;
}
.login-container .forgot-feedback.error-banner {
  background: rgba(255, 84, 84, 0.16);
  border: 1px solid rgba(255, 84, 84, 0.35);
  color: #ffecec;
}
.login-container .forgot-feedback.notice-banner {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.95);
}

.login-container .forgot-intro {
  color: #1e293b;
  font-size: 14px;
  margin-bottom: 16px;
  text-align: center;
}

.login-container .forgot-tips {
  margin-top: 20px;
  font-size: 13px;
  color: #334155;
  text-align: center;
}

.login-container .forgot-tips ul {
  margin: 8px auto 0;
  padding-left: 0;
  list-style-position: inside;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.login-container .forgot-tips li {
  margin-bottom: 6px;
}

.login-container .back-to-login {
  margin-top: 20px;
  text-align: center;
}

.login-container .back-to-login a,
.login-container .forgot-password-link {
  color: #1e40af;
  text-decoration: none;
  font-size: 14px;
}

.login-container .back-to-login a:hover,
.login-container .forgot-password-link:hover {
  text-decoration: underline;
}

.login-container .btn-primary-inline {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(180deg, var(--btn-bg-1), var(--btn-bg-2));
  color: var(--btn-text);
  border: 1px solid #1d4ed8;
  border-radius: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--btn-shadow);
}

.login-container .btn-primary-inline:hover {
  box-shadow: var(--btn-shadow-hover);
}

/* Vissza gomb – ugyanolyan, mint attendance / work_schedule fejlécben */
.login-page-wrapper .glass-btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 0.75rem;
  padding: 8px 12px;
  text-decoration: none;
  color: #1e293b;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 14px rgba(2, 15, 34, 0.08);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.login-page-wrapper .glass-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(2, 15, 34, 0.12);
}
.login-page-wrapper .glass-btn.btn-back {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  gap: 8px;
}
.login-page-wrapper .glass-btn.btn-back .btn-back-icon {
  flex-shrink: 0;
  display: block;
  color: currentColor;
}

.input-container {
  margin-bottom: 18px;
}

.input-container label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
  text-align: left;
  letter-spacing: 0.2px;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 14px;
  padding: 0 40px 0 12px;
  height: 54px;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.input-wrapper .input-icon {
  color: var(--ws-primary);
  font-size: 16px;
  margin-right: 10px;
  flex-shrink: 0;
}

.input-wrapper input {
  flex: 1;
  border: none;
  background: transparent !important;
  background-color: transparent !important;
  color: #0f172a;
  font-size: 16px;
  outline: none;
  min-width: 0;
  -webkit-text-fill-color: #0f172a;
}

.input-wrapper input::placeholder {
  color: rgba(15, 23, 42, 0.45);
  -webkit-text-fill-color: rgba(15, 23, 42, 0.45);
}

/* Autofill: ne legyen háttér a szövegnek / mezőnek */
.input-wrapper input:-webkit-autofill,
.input-wrapper input:-webkit-autofill:hover,
.input-wrapper input:-webkit-autofill:focus,
.input-wrapper input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
  box-shadow: 0 0 0 1000px transparent inset !important;
  -webkit-text-fill-color: #0f172a;
  transition: background-color 5000s ease-in-out 0s;
}

.input-wrapper:focus-within {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
  background: #fff;
  outline: none;
}

.show-password-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.15s ease;
}

.show-password-btn i {
  font-size: 13px;
  color: var(--ws-primary);
  pointer-events: none;
}

.show-password-btn:hover {
  background: rgba(37, 99, 235, 0.14);
  transform: translateY(-50%) scale(1.05);
}

.show-password-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 14px;
  color: #475569;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.remember-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
  cursor: pointer;
}

.custom-checkbox-text {
  color: #475569 !important;
  font-size: 14px;
}

.forgot-password-link {
  color: var(--ws-primary) !important;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.95;
  transition: opacity 0.2s ease, text-decoration-color 0.2s;
}

.forgot-password-link:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.actions-container {
  margin-top: 22px;
  text-align: center;
}

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border: 1px solid #1d4ed8;
  border-radius: 0.75rem;
  padding: 0.95rem 1.2rem;
  cursor: pointer;
  color: var(--btn-text);
  /* /attendance .glass-primary-btn */
  background: linear-gradient(180deg, var(--btn-bg-1), var(--btn-bg-2));
  box-shadow: var(--btn-shadow);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  isolation: isolate;
  overflow: hidden;
}

.btn-primary .btn-content {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.btn-primary .btn-icon {
  font-size: 0.95rem;
  transform: translateX(0);
  transition: transform 0.18s ease;
}

.btn-primary .btn-glow {
  position: absolute;
  inset: -2px;
  background: radial-gradient(120px 60px at 10% -20%, rgba(255,255,255,.35), transparent 60%),
              radial-gradient(140px 80px at 100% 0%, rgba(255,255,255,.18), transparent 65%);
  mix-blend-mode: screen;
  z-index: 1;
  pointer-events: none;
  opacity: 0.75;
}

.btn-primary .btn-edge {
  position: absolute;
  inset: 1px;
  border-radius: calc(0.75rem - 1px);
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.06));
  mix-blend-mode: overlay;
  z-index: 1;
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--btn-shadow-hover);
  filter: saturate(1.08);
}

.btn-primary:hover .btn-icon {
  transform: translateX(2px);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--btn-ring), var(--btn-shadow-hover);
}

.btn-primary:active {
  transform: translateY(0);
  filter: saturate(1.02);
}

.btn-primary.loading,
.btn-primary:disabled {
  cursor: progress;
  opacity: 0.95;
  filter: grayscale(0.05) brightness(0.98);
}

.btn-primary.loading .btn-content {
  opacity: 0;
}

.btn-primary.loading .btn-spinner {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.95);
  animation: login-spin 0.8s linear infinite;
  z-index: 3;
}

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

@media (max-width: 768px) {
  body.guest-page {
    min-height: 100dvh;
    min-height: 100vh;
  }

  .login-page-wrapper {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    gap: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .left-side {
    display: none !important;
  }

  .left-side-wrapper {
    width: 100%;
    height: auto;
    max-height: 140px;
    min-height: 80px;
    padding: 10px 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
  }

  .left-logo {
    width: 280px;
    height: 100px;
    max-height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0;
    padding: 0;
  }

  .login-container {
    width: 100%;
    max-width: 90vw;
    padding: 16px;
    border-radius: 16px;
    margin: 0 auto 16px;
    flex-shrink: 0;
    box-sizing: border-box;
  }

  .login-container h1 {
    font-size: 24px;
  }

  .input-wrapper input {
    font-size: 14px;
    color: #000;
  }

  .input-wrapper input::placeholder {
    color: rgba(0, 0, 0, 0.5);
  }

  .options-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .forgot-password-link {
    font-size: 13px;
    margin-top: 5px;
  }

  .btn-primary {
    padding: 0.9rem 1rem;
  }
}

/* Tableten: login felül, footer alul látszik, görgetés nélkül */
@media (min-width: 769px) and (max-width: 1024px) {
  body.guest-page {
    height: 100vh;   /* fallback */
    height: 100dvh;  /* látható viewport tableten/mobilon (böngésző UI nélkül) */
    min-height: 0;
    overflow: hidden;
  }

  .login-page-wrapper {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0 16px 16px;
    gap: 0;
    min-height: 0;
    overflow: hidden;
    overflow-x: hidden;
  }

  .left-side {
    display: none !important;
  }

  .left-side-wrapper {
    width: 100%;
    height: auto;
    max-height: 140px;
    padding: 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
  }

  .left-logo {
    width: 280px;
    height: 100px;
    max-height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0;
    padding: 0;
  }

  .login-container {
    width: 100%;
    max-width: 420px;
    padding: 16px 20px;
    border-radius: 16px;
    margin: 12px auto;
    flex-shrink: 0;
    box-sizing: border-box;
  }

  .login-container h1 {
    font-size: 24px;
  }

  .input-wrapper input {
    font-size: 14px;
    color: #000;
  }

  .input-wrapper input::placeholder {
    color: rgba(0, 0, 0, 0.5);
  }

  .options-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .forgot-password-link {
    font-size: 13px;
    margin-top: 5px;
  }
}

/* 2FA setup: asztali nézetben a login-container margin */
@media (min-width: 1025px) {
  .page-2fa-setup .login-container {
    margin-top: 10px;
    margin-bottom: 10px;
  }
}

/* 2FA beállítás / ellenőrzés – Planzee keretek (account-security kapcsolódó flow) */
.page-2fa-setup .two-fa-setup-intro {
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.5;
  text-align: center;
}

.page-2fa-setup .two-fa-qr-wrap,
.page-2fa-verify .two-fa-qr-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  margin-bottom: 1rem;
}

.page-2fa-setup .two-fa-qr-frame,
.page-2fa-verify .two-fa-qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  border-radius: 16px;
  border: 1px solid #ebebeb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  background: #ffffff;
  padding: 8px;
  box-sizing: border-box;
}

.page-2fa-setup .two-fa-qr-frame svg,
.page-2fa-verify .two-fa-qr-frame svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

.page-2fa-setup .two-fa-secret-block {
  text-align: center;
  margin-bottom: 1.2rem;
}

.page-2fa-setup .two-fa-secret-label {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.page-2fa-setup .two-fa-secret-pill {
  background: #f8fafc;
  border: 1px solid #ebebeb;
  border-radius: 0.5rem;
  padding: 0.6rem 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: 1px;
  font-size: 0.95rem;
  display: inline-block;
  color: #0f172a;
}

.page-2fa-setup .two-fa-codes-block {
  background: #0f172a;
  color: #34d399;
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92rem;
  white-space: pre-wrap;
  margin-top: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
