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

:root {
  --primary:    #7b86cc;
  --primary-dk: #6470bb;
  --primary-lt: #eef0fb;
  --navy:       #474c71;
  --navy-dk:    #363a57;
  --yellow:     #ffe58f;
  --yellow-dk:  #ffdb66;
  --yellow-lt:  #fff1c4;
  --green:      #7bc655;
  --green-dk:   #5ea83d;
  --green-lt:   #f0f9ea;
  --white:      #ffffff;
  --bg:         #eff0f8;
  --gray-lt: #efefef;
  --gray:       #dedede;
  --text:       #333333;
  --text-sub:   #888888;
  --danger:     #c0392b;
  --radius:     12px;
  --shadow:     0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.06);
  --sub:     var(--text-sub);
  --border:  var(--gray);
}

.app-shell,
body {
  font-family:
    "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic",
    "Segoe UI", sans-serif;
}

.app-header {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 48px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(123, 134, 204, 0.15);
}

.app-header-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.app-header-logo {
  display: block;
  width: auto;
  height: 24px;
  max-width: min(180px, 36vw);
  object-fit: contain;
  flex-shrink: 0;
}

.app-header-title {
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.6px;
  white-space: nowrap;
  background: linear-gradient(135deg, #363a57 0%, #7b86cc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-header-meta {
  color: #363a57;
  font-size: 13px;
  font-weight: 600;
}

.app-header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 22px;
  background: #7b86cc;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 20px;
  text-decoration: none;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 10px rgba(71, 76, 113, 0.25);
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.15s;
}

.app-header-button:hover {
  background: #6470bb;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(71, 76, 113, 0.32);
}

.app-footer {
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  padding: 14px 20px;
  font-size: 12px;
  color: #fff;
  text-align: center;
  background: rgb(48 55 89);
  border-top: 1px solid rgba(123, 134, 204, 0.12);
}

.foot_info {
  text-align: center;
  line-height: 1.7;
}

.foot_info address {
  margin: 0;
  font-style: normal;
  color: #fff;
}

.foot_info .copy {
  color: #fff;
}

.foot_info .nbsp {
  display: inline-block;
  width: 18px;
}

@media (max-width: 540px) {
  .app-header {
    padding: 14px 20px;
  }

  .app-header-logo {
    height: 30px;
  }

  .app-header-title {
    display: none;
  }

  .app-header-button {
    font-size: 12px;
    padding: 8px 14px;
  }

  .app-header-meta {
    display: none;
  }

  .app-header-right {
    margin-left: auto;
  }

  .app-footer {
    padding: 14px 16px;
  }

  .foot_info .nbsp {
    display: block;
    width: 0;
    height: 4px;
  }
}

/* ===== Password Change Modal ===== */
body.modal-open {
  overflow: hidden;
}

.password-modal-overlay[hidden] {
  display: none !important;
}

.password-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
}
.password-modal {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}
.password-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
}
.password-modal-title {
  margin: 0 0 10px;
  font-size: 18px;
  color: #333;
}
.password-modal-close {
  border: none;
  background: transparent;
  color: #888;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.password-modal-form {
  padding: 0 20px 20px;
}
.password-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.password-modal-field label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.password-modal-field label.required::before {
  content: "*";
  color: #c62828;
  margin-right: 4px;
}
.password-modal-field input {
  border: 1px solid #dedede;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.password-modal-field input:focus {
  outline: none;
  border-color: #7b86cc;
  box-shadow: 0 0 0 3px rgba(123, 134, 204, 0.18);
}
.password-modal-help {
  margin: 2px 0 0;
  color: #888;
  font-size: 12px;
  line-height: 1.5;
}
.password-rule-list {
  margin: 0;
  list-style-position: inside;
}
.password-modal-help .password-rule-list {
  padding-left: 0;
}
.password-modal-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #f5c0bb;
  color: #c0392b;
  font-size: 13px;
}
.password-modal-notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff1c4;
  border: 1px solid #ffdb66;
  color: #7a5000;
  font-size: 13px;
  line-height: 1.5;
}
.password-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.password-modal-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.password-modal-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}
.password-modal-btn-secondary {
  background: #ffffff;
  border-color: #dedede;
  color: #333;
}
.password-modal-btn-primary {
  background: #7b86cc;
  color: #ffffff;
}
.password-modal-btn-primary:hover {
  background: #6470bb;
}
