/* /htdocs/login_view/assets/login.css */

:root {
  --text: rgba(255,255,255,.94);
  --muted: rgba(255,255,255,.72);
  --brand: #21c17a;
  --input-bg: #fff;
  --input-text: #111;
  --input-border: #d8d8d8;
  --drawer-w: min(92vw, 420px);
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font);
  background: #071a14;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(4,16,12,.50), rgba(4,16,12,.62)),
    url("/assets/background/background_login_v1.png") center / cover no-repeat;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, rgba(7,26,20,.14), rgba(7,26,20,.03));
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 18px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  display: block;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  object-fit: contain;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.brand__text strong {
  overflow: hidden;
  font-size: 13px;
  letter-spacing: .4px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand__text span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.link {
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.link:hover,
.link:focus-visible {
  color: var(--text);
  background: rgba(255,255,255,.08);
}

.link:focus-visible,
.drawer__close:focus-visible,
.btn:focus-visible,
.noticePopup__button:focus-visible {
  outline: 2px solid rgba(59,228,155,.9);
  outline-offset: 2px;
}

.wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1100px;
  min-height: calc(100vh - 67px);
  min-height: calc(100dvh - 67px);
  margin: 0 auto;
  padding: 24px 18px 48px;
}

.loginCard {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  transform: translateY(-3vh);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

#loginForm {
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.field { margin-bottom: 16px; }

.phoneInputGroup {
  display: grid;
  grid-template-columns: minmax(165px,.9fr) minmax(0,1.25fr);
  overflow: hidden;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: var(--input-bg);
  transition: border-color .15s ease, outline-color .15s ease;
}

.phoneInputGroup:focus-within {
  border-color: #8b8b8b;
  outline: 3px solid rgba(255,255,255,.26);
  outline-offset: 2px;
}

.countrySelect,
.telephoneInput {
  width: 100%;
  min-width: 0;
  padding: 13px 12px;
  border: 0;
  outline: 0;
  color: var(--input-text);
  background: var(--input-bg);
  font: inherit;
  font-size: 14px;
}

.countrySelect {
  border-right: 1px solid var(--input-border);
  cursor: pointer;
}

.countrySelect option {
  color: var(--input-text);
  background: var(--input-bg);
}

.telephoneInput { font-size: 15px; }

.telephoneInput::placeholder {
  color: #777;
  opacity: 1;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 14px;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  color: #082014;
  background: linear-gradient(90deg, var(--brand), #3be49b);
  box-shadow: none;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}

.btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,.18);
  border-top-color: rgba(0,0,0,.55);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}

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

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  background: rgba(0,0,0,.55);
  transition: opacity .18s ease;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: var(--drawer-w);
  height: 100vh;
  height: 100dvh;
  overflow: auto;
  transform: translateX(105%);
  border-left: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(700px 420px at 18% 20%, rgba(33,193,122,.22), transparent 60%),
    linear-gradient(180deg, #123228, #071a14);
  box-shadow: 0 30px 80px rgba(0,0,0,.65);
  transition: transform .20s ease;
}

body.drawer-open .overlay {
  opacity: 1;
  pointer-events: auto;
}

body.drawer-open .drawer { transform: translateX(0); }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.drawer__close {
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  font-weight: 900;
  cursor: pointer;
}

.drawer__body { padding: 16px; }
.hero h3 { margin: 0 0 10px; }

.hero p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.hero__list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.hero__list li {
  display: flex;
  gap: 10px;
  color: rgba(255,255,255,.84);
  font-size: 13px;
  line-height: 1.4;
}

.check {
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(33,193,122,.35);
  border-radius: 6px;
  background: rgba(33,193,122,.16);
}

.check svg {
  width: 12px;
  height: 12px;
  fill: var(--brand);
}

.hero__footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.noticeOverlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(5px);
}

.noticeOverlay.is-open { display: flex; }

.noticePopup {
  width: min(92vw,390px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: linear-gradient(180deg,#123228,#071a14);
  box-shadow: 0 24px 70px rgba(0,0,0,.65);
}

.noticePopup__body {
  padding: 22px 20px 18px;
  text-align: center;
}

.noticePopup__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border: 1px solid rgba(255,93,93,.36);
  border-radius: 50%;
  color: #fff;
  background: rgba(255,93,93,.14);
  font-size: 22px;
  font-weight: 900;
}

.noticePopup__message {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.noticePopup__actions { padding: 0 20px 20px; }

.noticePopup__button {
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 13px;
  color: #082014;
  background: linear-gradient(90deg,var(--brand),#3be49b);
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 1023px) {
  .topbar__actions { display: none; }
  .topbar__inner { justify-content: flex-start; }

  .brand {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }
}

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

  .brand__text strong {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    line-height: 1.25;
  }

  .wrap {
    min-height: calc(100vh - 62px);
    min-height: calc(100dvh - 62px);
    padding: 20px 12px 32px;
  }

  .loginCard {
    max-width: 100%;
    transform: none;
  }

  .phoneInputGroup {
    grid-template-columns: clamp(124px,38vw,145px) minmax(0,1fr);
  }

  .countrySelect,
  .telephoneInput {
    padding-inline: 10px;
  }
}

@media (max-width: 390px) {
  .brand { gap: 9px; }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand__text strong { font-size: 12px; }
  .brand__text span { font-size: 11px; }
  .wrap { padding-inline: 10px; }

  .countrySelect,
  .telephoneInput {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .overlay,
  .drawer {
    transition: none;
  }

  .spinner { animation-duration: 1.5s; }
}