:root {
  color-scheme: light;
  font-family:
    Pretendard,
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  --bg: #f6f7fb;
  --surface: rgba(255, 255, 255, 0.94);
  --text: #182033;
  --muted: #778197;
  --line: #e6e9f1;
  --violet: #7357ee;
  --violet-dark: #6144dc;
  --violet-soft: #f2efff;
  --shadow: 0 24px 70px rgba(43, 38, 80, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, #f2efff 0, transparent 35%),
    radial-gradient(circle at 90% 90%, #e9f5ff 0, transparent 32%),
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.attendance-login {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

.login-panel {
  width: min(100%, 560px);
  min-height: 100svh;
  padding:
    max(38px, env(safe-area-inset-top))
    clamp(32px, 5vw, 74px)
    max(30px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-inline: auto;
}

.brand-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(44px, 7vh, 72px);
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: 150px;
  height: 40px;
  object-fit: contain;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #ded8ff;
  border-radius: 999px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 12px;
  font-weight: 800;
}

.login-copy {
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(29px, 3vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.description {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 22px;
}

.field-group {
  display: grid;
  gap: 9px;
}

.field-group label {
  color: #444d60;
  font-size: 13px;
  font-weight: 800;
}

.field-group input {
  width: 100%;
  height: 56px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: var(--text);
  box-shadow: 0 5px 18px rgba(42, 48, 75, 0.025);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.field-group input::placeholder {
  color: #b4bac8;
}

.field-group input:focus {
  border-color: #a998fa;
  box-shadow: 0 0 0 4px rgba(115, 87, 238, 0.1);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 74px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  height: 36px;
  min-width: 52px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #7d8495;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.password-toggle:hover {
  background: #f5f6f9;
}

.login-status {
  min-height: 20px;
  margin: -6px 0 -2px;
  color: #dc4a5b;
  font-size: 12px;
  font-weight: 700;
}

.login-button {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 15px;
  background:
    linear-gradient(
      135deg,
      #7b61f4 0%,
      #6949e7 100%
    );
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.015em;
  box-shadow: 0 13px 28px rgba(105, 73, 231, 0.24);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

.login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(105, 73, 231, 0.3);
}

.login-button:active {
  transform: translateY(1px);
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.login-help {
  margin-top: 25px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #eceef4;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
}

.help-dot {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #9a86f4;
}

.login-help p {
  margin: 0;
  color: #82899a;
  font-size: 12px;
  line-height: 1.6;
}

.login-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 38px;
  color: #a2a8b5;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .attendance-login {
    grid-template-columns: 1fr;
  }

  .login-panel {
    width: min(100%, 520px);
    padding-inline:
      clamp(24px, 7vw, 52px);
  }
}

@media (max-width: 520px) {
  .login-panel {
    justify-content: flex-start;
    padding-top:
      max(34px, env(safe-area-inset-top));
  }

  .brand-area {
    margin-bottom: 50px;
  }

  .brand-logo {
    width: 135px;
    height: auto;
  }

  .product-badge {
    height: 28px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .login-copy h1 {
    font-size: 30px;
  }

  .field-group input {
    height: 58px;
  }

  .login-button {
    min-height: 60px;
  }
}

@media (orientation: landscape) and (max-height: 650px) {
  .login-panel {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .brand-area {
    margin-bottom: 24px;
  }

  .login-copy {
    margin-bottom: 20px;
  }

  .login-form {
    gap: 14px;
  }

  .field-group input {
    height: 48px;
  }

  .login-button {
    min-height: 50px;
  }

  .login-help {
    margin-top: 14px;
  }

  .login-footer {
    padding-top: 18px;
  }
}

/* ACAMATE PWA INSTALL V1 */
.install-app-area {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.install-app-area[hidden] {
  display: none;
}

.install-app-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid #ded8ff;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--violet);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(73, 57, 145, 0.06);
}

.install-app-button:hover {
  border-color: #c8bdff;
  background: var(--violet-soft);
}

.install-app-button:active {
  transform: translateY(1px);
}

.install-app-help {
  margin: 0;
  color: #9299aa;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.install-app-guide {
  margin: 3px 0 0;
  padding: 10px 12px;
  border: 1px solid #ded8ff;
  border-radius: 11px;
  background: var(--violet-soft);
  color: #6556a9;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.install-app-guide[hidden] {
  display: none;
}

@media (max-width: 520px) {
  .install-app-area {
    margin-top: 12px;
  }

  .install-app-button {
    min-height: 46px;
  }
}
