/* 로그인 화면 — 전체 배경 사진 + 왼쪽에 떠 있는 유리 카드 */
:root {
  --brand-acuship: #225dc6;
  --brand-acuship-hover: #1a4a9e;
  --brand-eco: #4691ee;
  --text: #1a1a1a;
  --text-muted: #555;
  --sidebar-bg: rgba(255, 255, 255, 0.72);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
}

/* 배 사진과 연결선 그림(같은 16:9 캔버스에 미리 배치)을 같은 기준으로 맞춤.
 * 오른쪽 끝을 항상 화면 오른쪽에 고정 — 창을 좁혀도 연결선 끝의 큰 원이 화면 끝에 걸쳐 보이도록 (잘림은 왼쪽 배 뒤쪽부터) */
.login-page {
  --login-photo-pos: right center;
  position: relative;
  isolation: isolate;
  min-height: 100%;
  display: flex;
  align-items: center;
  padding: 32px 0 32px clamp(24px, 6vw, 96px);
}

/* 배경 사진: 대비·채도를 살짝 올려 선명하고 깊이 있게 (사진에만 필터가 걸리도록 별도 층) */
.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("../images/login/background.jpg") var(--login-photo-pos) / cover no-repeat;
  filter: contrast(1.08) saturate(1.12) brightness(1.02);
}

/* 위에서부터: 카드 쪽 어둡게(글자 대비) / 연결선 그림(투명 PNG) / 가장자리 비네팅 / 아래 깊은 바다색 / 하늘 쪽 은은한 차가운 톤 */
.login-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 30, 60, 0.35) 0%, rgba(10, 30, 60, 0.08) 45%, rgba(10, 30, 60, 0) 70%),
    url("../images/login/data-network.png") var(--login-photo-pos) / cover no-repeat,
    radial-gradient(ellipse 85% 75% at 60% 45%, rgba(0, 0, 0, 0) 55%, rgba(6, 18, 40, 0.38) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(8, 24, 52, 0.35) 100%),
    linear-gradient(180deg, rgba(40, 70, 110, 0.12) 0%, rgba(0, 0, 0, 0) 35%);
}

.login-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 380px;
  max-width: calc(100vw - 48px);
  padding: 32px 32px 28px;
  border-radius: 16px;
  background: var(--sidebar-bg);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 50px rgba(10, 30, 60, 0.28);
}

.login-brand {
  flex: 0 0 auto;
}

.login-logo {
  display: block;
  height: 36px;
  width: auto;
}

.login-form-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 24px;
}

/* 고정 높이 예약 — 문구 표시/교체 시 폼이 밀리지 않음 */
.login-error {
  box-sizing: border-box;
  min-height: 38px;
  margin-bottom: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e8a0a0;
  background: #fff0f0;
  color: #a00;
  font-size: 13px;
  line-height: 1.35;
}

.login-error[aria-hidden="true"] {
  visibility: hidden;
  border-color: transparent;
  background: transparent;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #5a6b82;
}

/* 입력칸: 테두리 없는 연회색 칸 + 왼쪽 아이콘, 포커스 시 파란 테두리와 은은한 빛 */
.input {
  width: 100%;
  height: 44px;
  padding: 0 12px 0 40px;
  font-size: 14px;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(241, 245, 250, 0.92) no-repeat 13px center / 16px 16px;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.input[name="user_id"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a9ab0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
}

.input[name="password"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a9ab0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
}

.input:hover {
  border-color: #d5deea;
}

.input:focus {
  outline: none;
  border-color: #3a7eee;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(58, 126, 238, 0.18);
}

/* 버튼: 메인 화면 사이드바와 같은 로고색 → 깊은 파랑 그라데이션 */
.btn-primary {
  padding: 11px 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #3a7eee, #2550a8);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(37, 80, 168, 0.32);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 80, 168, 0.38);
}

.btn-primary:active {
  transform: none;
  box-shadow: 0 4px 10px rgba(37, 80, 168, 0.3);
}

.login-btn {
  height: 44px;
  margin-top: 6px;
  width: 100%;
}

.login-btn::after {
  content: "→";
  margin-left: 8px;
  display: inline-block;
  transition: transform 0.15s;
}

.login-btn:hover::after {
  transform: translateX(3px);
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  margin: 0;
  flex-shrink: 0;
  border: 1px solid #a0b4d0;
  border-radius: 4px;
  background: #fff;
  outline: none;
  box-shadow: none;
  cursor: pointer;
}

.login-remember input:checked {
  background: var(--brand-eco);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M2 6l3 3 5-5'/%3E%3C/svg%3E");
  background-size: 11px 11px;
  background-position: center;
  background-repeat: no-repeat;
}

.session-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.session-modal[hidden] {
  display: none;
}

.session-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.session-modal-box {
  position: relative;
  z-index: 1;
  width: min(90vw, 360px);
  padding: 24px 22px 20px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.session-modal-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.session-modal-msg {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.session-modal-btn {
  min-width: 96px;
}

@media (max-width: 640px) {
  .login-page {
    justify-content: center;
    padding: 24px 16px;
  }

  .login-sidebar {
    width: 100%;
    max-width: none;
    padding: 28px 22px 24px;
  }
}