@import url('/static/login/noto-sans-kr.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #164A99;
  --primary-dark:  #0f3570;
  --primary-light: #eef2f9;
  --danger:        #c0392b;
  --danger-bg:     #fdf2f1;
  --danger-border: #f5c6c2;
  --success:       #1a7a4a;
  --success-bg:    #f0fdf4;
  --warning-bg:    #fffbeb;
  --text:          #1e2940;
  --text-sub:      #4b5675;
  --text-muted:    #8a93a8;
  --border:        #dde3ee;
  --border-input:  #c8d0e0;
  --bg:            #f0f3f8;
  --bg-card:       #ffffff;
  --radius:        12px;
  --radius-sm:     7px;
  --shadow:        0 2px 20px rgba(22, 74, 153, 0.09);
}

/* ── Base ─────────────────────────────────────────── */
html, body {
  min-height: 100vh;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

/* ── Card ─────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  padding: 40px 44px 32px;
  border-top: 3px solid var(--primary);
}

.card-sm { max-width: 420px; }
.card-lg { max-width: 860px; }

/* ── Logo & header ────────────────────────────────── */
.hwpl-logo {
  display: block;
  height: 52px;
  width: auto;
  margin: 0 auto 20px;
}

.page-title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.3px;
}

/* ── Form elements ────────────────────────────────── */
.form-group { margin-bottom: 16px; }

label, .form-group > label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 5px;
  letter-spacing: 0.1px;
}

/* Target all Django-rendered inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: none;
  -webkit-appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a93a8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

input[readonly], input[disabled] {
  background: #f7f8fb;
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Birthdate row */
.date-row {
  display: flex;
  gap: 8px;
}
.date-row select { flex: 1; }

/* Radio / checkbox group */
.radio-group, .check-item {
  display: flex;
  gap: 20px;
  padding: 4px 0;
}

.radio-group label, .check-item label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text);
  font-weight: 400;
  cursor: pointer;
  margin-bottom: 0;
}

input[type="radio"], input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  box-shadow: none;
}

/* Input + button row */
.input-btn-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.input-btn-row > div { flex: 1; }
.input-btn-row .btn-inline {
  white-space: nowrap;
  padding: 10px 14px;
  font-size: 13px;
  flex-shrink: 0;
  margin-bottom: 0;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: block;
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.17s, transform 0.1s, box-shadow 0.17s;
  letter-spacing: -0.2px;
}

.btn:active { transform: scale(0.988); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(22, 74, 153, 0.25);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 2px 8px rgba(192, 57, 43, 0.22);
}
.btn-danger:hover { background: #a93226; }

.btn-success {
  background: #1a7a4a;
  color: #fff;
}
.btn-success:hover { background: #146040; }

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  width: auto;
}

.mt-btn { margin-top: 8px; }

/* ── Alerts ───────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #bbf7d0;
}

.alert-warning {
  background: var(--warning-bg);
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-info {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #c3d4f0;
}

/* ── Footer nav ───────────────────────────────────── */
.page-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  gap: 0;
}

.page-nav a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 3px 10px;
  border-right: 1px solid var(--border);
  transition: color 0.15s;
  white-space: nowrap;
}

.page-nav a:last-child { border-right: none; }
.page-nav a:hover { color: var(--primary); }

/* ── Language switcher ────────────────────────────── */
.lang-bar {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.lang-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px 4px 10px;
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.lang-select-wrap:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.lang-select-wrap svg { flex-shrink: 0; }

.lang-select-wrap select {
  border: none;
  background: transparent;
  font-size: 12px;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

.lang-select-wrap select:focus {
  outline: none;
  box-shadow: none;
  border: none;
}

/* ── Copyright ────────────────────────────────────── */
.copyright {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ── Two-column layout (signup / profile) ─────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 44px;
}

.col-divider {
  border: none;
  border-left: 1px solid var(--border);
  margin: 0;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
  letter-spacing: -0.2px;
}

/* ── Terms check ──────────────────────────────────── */
.terms-box {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
}

.terms-row input[type="checkbox"] {
  margin-top: 2px;
  width: 15px;
  height: 15px;
}

.terms-row label {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 0;
  font-weight: 400;
  line-height: 1.5;
}

.terms-row a {
  color: var(--primary);
  text-decoration: underline;
}

/* ── Notice list (profile) ────────────────────────── */
.notice-list { list-style: none; }

.notice-item {
  padding: 12px 14px;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  transition: border-color 0.15s;
}

.notice-item:hover { border-color: var(--primary); }

.notice-item a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 3px;
}

.notice-item a:hover { color: var(--primary); }

.notice-date {
  font-size: 11.5px;
  color: var(--text-muted);
}

.notice-empty {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 24px 0;
}

/* ── Account info box ─────────────────────────────── */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
}

.info-table tr { border-bottom: 1px solid var(--border); }
.info-table tr:last-child { border-bottom: none; }

.info-table th, .info-table td {
  padding: 10px 12px;
  font-size: 13.5px;
  text-align: left;
}

.info-table th {
  color: var(--text-muted);
  font-weight: 500;
  width: 40%;
  background: #f7f8fb;
}

.info-table td {
  color: var(--text);
  font-weight: 500;
}

/* ── Pay CTA ──────────────────────────────────────── */
.pay-cta {
  text-align: center;
  margin: 24px 0;
}

.pay-cta a {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(22,74,153,0.25);
  transition: background 0.17s;
}

.pay-cta a:hover { background: var(--primary-dark); }

/* ── Success page ─────────────────────────────────── */
.success-icon {
  text-align: center;
  margin: 0 auto 16px;
  width: 56px;
  height: 56px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg { display: block; }

.success-heading {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.success-sub {
  text-align: center;
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 28px;
}

/* ── Captcha container ────────────────────────────── */
.captcha-wrap {
  margin-bottom: 14px;
}

.captcha-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

/* ── Verify result ────────────────────────────────── */
.verify-result {
  font-size: 12.5px;
  margin-top: 5px;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 680px) {
  .card { padding: 28px 22px 24px; }
  .two-col { grid-template-columns: 1fr; gap: 32px 0; }
  .col-divider { display: none; }
  .date-row { gap: 6px; }
}
