body { font-family: system-ui, -apple-system, Segoe UI, Roboto, 'Noto Sans KR', sans-serif; margin:0; }
a { color: inherit; text-decoration: none; }
.container { max-width: 420px; margin: 80px auto; padding: 24px; border: 1px solid #e5e7eb; border-radius: 12px; }
.row { margin: 12px 0; }
label { display:block; font-size: 12px; color:#374151; margin-bottom: 6px; }
input { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px; }
input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
button { width:100%; padding: 10px 12px; border:0; border-radius: 10px; cursor:pointer; }
.btn-primary { background: #111827; color:#fff; }
.error { margin-top: 12px; color:#b91c1c; font-size: 13px; min-height: 18px; }

/* 로그인·전입전출 등 게이트 페이지 공통 */
body.page-gate { min-height: 100vh; background: linear-gradient(145deg, #f0f4ff 0%, #e8eef8 50%, #f5f7fa 100%); display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; }
.page-gate .gate-card { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04); padding: 40px 36px; }
.page-gate .gate-title { font-size: 22px; font-weight: 700; color: #1e293b; margin: 0 0 8px 0; letter-spacing: -0.02em; }
.page-gate .gate-desc { color: #64748b; font-size: 13px; line-height: 1.5; margin-bottom: 28px; }
.page-gate .form-row { margin-bottom: 20px; }
.page-gate .form-row label { display: block; font-size: 13px; font-weight: 500; color: #334155; margin-bottom: 8px; }
.page-gate input[type="text"],
.page-gate input[type="password"],
.page-gate select { width: 100%; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 14px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.page-gate input:focus,
.page-gate select:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.page-gate .btn-primary { width: 100%; padding: 14px; font-size: 15px; font-weight: 600; border-radius: 10px; background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%); color: #fff; border: none; cursor: pointer; transition: transform .02s, box-shadow .15s; }
.page-gate .btn-primary:hover { box-shadow: 0 4px 14px rgba(37,99,235,0.35); }
.page-gate .btn-primary:active { transform: scale(0.99); }
.page-gate .error { color: #dc2626; font-size: 13px; margin-top: 12px; min-height: 18px; }
.page-gate .muted { color: #94a3b8; font-size: 12px; }
.page-gate .check-row { display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.page-gate .check-row label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #475569; font-weight: 400; margin: 0; cursor: pointer; }
.page-gate .check-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: #2563eb; cursor: pointer; }
.page-gate .link { color: #2563eb; font-size: 14px; font-weight: 500; }
.page-gate .link:hover { text-decoration: underline; }
.page-gate .gate-footer { margin-top: 24px; padding-top: 20px; border-top: 1px solid #f1f5f9; text-align: center; }
.page-gate .gate-footer .link { display: inline-block; margin-top: 8px; }
.page-gate select { cursor: pointer; }
/* 전입전출 전용: 카드 더 넓게 */
body.page-gate.transfer-page .gate-card { max-width: 520px; }
.page-gate .form-group-inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.page-gate .form-group-inline .field { flex: 1; min-width: 120px; }
.page-gate .form-group-inline .field label { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.page-gate .radio-group { display: flex; gap: 20px; flex-wrap: wrap; }
.page-gate .radio-group label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #334155; cursor: pointer; margin: 0; }
.page-gate .radio-group input[type="radio"] { width: 18px; height: 18px; accent-color: #2563eb; }
.page-gate .hint { font-size: 12px; color: #94a3b8; margin-top: 6px; line-height: 1.4; }
.topbar { height: 56px; display:flex; align-items:center; justify-content:space-between; padding: 0 16px; border-bottom: 1px solid #e5e7eb; }
.layout { display:flex; min-height: calc(100vh - 56px - 44px); }
.sidebar { width: 240px; border-right: 1px solid #e5e7eb; padding: 12px; }
.sidebar .item { padding: 10px 10px; border-radius: 10px; cursor:pointer; }
.sidebar .item:hover { background: #f3f4f6; }
.content { flex:1; padding: 16px; }
.footer { height: 44px; display:flex; align-items:center; justify-content:center; border-top: 1px solid #e5e7eb; color:#6b7280; font-size: 12px; }
.card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.h1 { font-size: 18px; font-weight: 700; margin: 0 0 8px 0; }
.muted { color:#6b7280; font-size: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #e5e7eb; padding: 8px; text-align:left; font-size: 13px; }
th { color:#374151; font-weight: 600; }

/* 전입/전출 승인 페이지 (관리자 본문) */
.admin-transfer-page { padding: 0 2px; }
.admin-transfer-page .atp-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-transfer-page .atp-title-wrap { flex: 1; min-width: 200px; }
.admin-transfer-page .atp-title { font-size: 20px; font-weight: 700; color: #1e293b; margin: 0 0 6px 0; letter-spacing: -0.02em; }
.admin-transfer-page .atp-desc { font-size: 13px; color: #64748b; line-height: 1.5; margin: 0; }
.admin-transfer-page .atp-filters { display: flex; gap: 8px; }
.admin-transfer-page .atp-filter-btn { padding: 8px 16px; font-size: 13px; font-weight: 500; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; color: #475569; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.admin-transfer-page .atp-filter-btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.admin-transfer-page .atp-filter-btn-active { background: #2563eb; border-color: #2563eb; color: #fff; }
.admin-transfer-page .atp-filter-btn-active:hover { background: #1d4ed8; border-color: #1d4ed8; }
.admin-transfer-page .atp-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); border: 1px solid #f1f5f9; margin-bottom: 24px; overflow: hidden; }
.admin-transfer-page .atp-card-body { padding: 20px; }
.admin-transfer-page .atp-table-wrap { padding: 0; overflow-x: auto; }
.admin-transfer-page .atp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-transfer-page .atp-table th { text-align: left; padding: 12px 16px; background: #f8fafc; color: #475569; font-weight: 600; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.admin-transfer-page .atp-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; color: #334155; }
.admin-transfer-page .atp-table tbody tr:hover { background: #fafbfc; }
.admin-transfer-page .atp-table tbody tr:last-child td { border-bottom: none; }
.admin-transfer-page .atp-card-header { padding: 18px 20px; border-bottom: 1px solid #f1f5f9; background: #fafbfc; }
.admin-transfer-page .atp-card-title { font-size: 16px; font-weight: 600; color: #1e293b; margin: 0; }
.admin-transfer-page .atp-handover-desc { font-size: 13px; color: #64748b; line-height: 1.5; margin: 0 0 20px 0; }
.admin-transfer-page .atp-handover-form { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.admin-transfer-page .atp-field { display: flex; flex-direction: column; gap: 6px; }
.admin-transfer-page .atp-field label { font-size: 12px; font-weight: 500; color: #475569; }
.admin-transfer-page .atp-input { padding: 10px 12px; font-size: 13px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; min-width: 140px; transition: border-color .15s, box-shadow .15s; }
.admin-transfer-page .atp-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.12); }
.admin-transfer-page .atp-field-btn { align-self: flex-end; }
.admin-transfer-page .atp-field-btn .atp-btn-primary { padding: 10px 20px; font-size: 14px; font-weight: 600; border: none; border-radius: 8px; background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%); color: #fff; cursor: pointer; transition: box-shadow .15s; white-space: nowrap; }
.admin-transfer-page .atp-field-btn .atp-btn-primary:hover { box-shadow: 0 4px 12px rgba(37,99,235,0.35); }
.admin-transfer-page .atp-result { margin-top: 12px; font-size: 13px; color: #64748b; min-height: 18px; }
.admin-transfer-page .atp-table button { padding: 6px 12px; font-size: 12px; font-weight: 500; border-radius: 6px; cursor: pointer; transition: background .15s, box-shadow .15s; border: none; }
.admin-transfer-page .atp-table .kt-btn-primary { background: #2563eb; color: #fff; }
.admin-transfer-page .atp-table .kt-btn-primary:hover { background: #1d4ed8; box-shadow: 0 2px 8px rgba(37,99,235,0.3); }
.admin-transfer-page .atp-table .kt-btn:not(.kt-btn-primary) { background: #f1f5f9; color: #475569; }
.admin-transfer-page .atp-table .kt-btn:not(.kt-btn-primary):hover { background: #e2e8f0; }
.admin-transfer-page .atp-table td { vertical-align: middle; }
.admin-transfer-page .atp-table .kt-btn + .kt-btn { margin-left: 6px; }

/* ========== 안보포털 스타일 로그인 (index.jsp / .login-portal) ========== */
body.page-gate.login-portal {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  background: transparent;
  font-family: "Noto Sans KR", system-ui, -apple-system, sans-serif;
  color: #fff;
  position: relative;
  overflow-x: hidden;
}

.login-portal-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, #0a1628 0%, #122a4a 35%, #1a3a62 70%, #2563a8 100%);
}

.login-portal-mesh {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(10, 22, 40, 0.85) 0%, transparent 55%),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(255,255,255,0.06) 47px, rgba(255,255,255,0.06) 48px),
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(255,255,255,0.05) 47px, rgba(255,255,255,0.05) 48px),
    radial-gradient(ellipse 120% 80% at 50% 100%, rgba(147, 197, 253, 0.25) 0%, transparent 55%);
  opacity: 0.95;
}

.login-portal-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 16px 8px;
}

.login-portal-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.login-portal-org {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.login-portal-main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px 24px;
  gap: 28px;
}

/* 육각형 카드 */
.login-hex-outer {
  filter: drop-shadow(0 16px 48px rgba(0, 0, 0, 0.35));
}

.login-hex {
  background: #1e3a5f;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  padding: 2px;
  box-sizing: border-box;
}

.login-hex-inner {
  background: #fff;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  /* 하단(육각 끝단)에서 IP 문구가 잘리지 않도록 여백 충분히 */
  padding: 2.4rem 2.2rem 3rem;
  width: min(100vw - 48px, 380px);
  box-sizing: border-box;
  text-align: center;
}

.portal-title-ko {
  margin: 0 0 6px 0;
  font-size: 1.65rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.portal-title-en {
  margin: 0 0 1.35rem 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #334155;
  letter-spacing: 0.02em;
}

.portal-hl {
  color: #2563eb;
  font-weight: 700;
}

.login-portal-form {
  text-align: left;
}

.login-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 4px 4px 12px;
  margin-bottom: 12px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input-wrap:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-input-icon {
  color: #64748b;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.login-input-field {
  flex: 1;
  border: none !important;
  padding: 11px 10px 11px 0 !important;
  font-size: 0.95rem !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-width: 0;
}

.login-input-field:focus {
  outline: none !important;
  box-shadow: none !important;
}

.login-portal-submit {
  width: 100%;
  margin-top: 6px;
  padding: 14px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border: none !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #fff !important;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.05s;
}

.login-portal-submit:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.login-portal-submit:active {
  transform: scale(0.99);
}

.login-portal-check-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 14px;
}

.login-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #475569;
  cursor: pointer;
  margin: 0;
  font-weight: 400;
}

.login-check-secondary {
  font-size: 0.8rem;
  color: #64748b;
}

.login-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
}

.login-current-ip {
  margin: 14px 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 0 6px 2px;
  box-sizing: border-box;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
}

.login-current-ip-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.04em;
}

.login-current-ip-value {
  font-size: 0.88rem;
  color: #dc2626;
  font-weight: 600;
  word-break: break-all;
}

.login-portal-err {
  margin-top: 10px;
  text-align: center;
  color: #dc2626 !important;
}

.login-portal-links {
  width: 100%;
  max-width: 720px;
  padding: 0 8px;
}

.login-link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 640px) {
  .login-link-grid {
    grid-template-columns: 1fr;
  }
  .login-hex-inner {
    padding: 2rem 1.5rem 2.75rem;
  }
}

.login-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #f1f5f9;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  backdrop-filter: blur(8px);
}

.login-link-btn:hover {
  background: rgba(30, 58, 95, 0.65);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.login-link-arr {
  opacity: 0.85;
  font-weight: 600;
}

.login-portal-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
  padding: 12px 16px 20px;
}

.login-portal-dev-hint {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 14px;
}
