/* Facility */
.facility-controls {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.tab-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #bdcce0;
  color: #24436f;
  margin: 0;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn:hover,
.tab-btn:focus-visible {
  background: #eef4fc;
}

.tab-btn.is-active {
  background: #1f467b;
  border-color: #1f467b;
  color: #fff;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 10px;
}

.search-row input,
.search-row select {
  height: 44px;
  border-radius: 10px;
  border: 1px solid #bfcde0;
  background: #fff;
  font-size: 0.92rem;
  color: #23395f;
  font-weight: 500;
  padding: 0 12px;
}

/* Sub pages */
.page-hero {
  padding: 44px 0;
  background: linear-gradient(180deg, #f4f8fe 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

.page-hero h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 10px 0 0;
  color: var(--text-muted);
}

.breadcrumb {
  margin-bottom: 10px;
  color: #4d6184;
  font-size: 0.9rem;
}

.page-section + .page-section {
  margin-top: 16px;
}

.split-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

.table-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.basic-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.basic-table th,
.basic-table td {
  border-bottom: 1px solid #e8eef8;
  text-align: left;
  padding: 12px 14px;
  font-size: 0.9rem;
}

.basic-table th {
  background: #f4f8ff;
  color: #1d3660;
  font-weight: 700;
}

.basic-table tbody tr:hover {
  background: #f8fbff;
}

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.panel h3 {
  margin: 0;
  font-size: 1.04rem;
}

.panel p {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.page-login .section-space {
  padding: 40px 0 72px;
}

.login-page-layout {
  width: min(calc(100% - 40px), 420px);
  margin: 0 auto;
}

.login-card-panel {
  width: 100%;
  max-width: 420px;
  padding: 28px 28px 24px;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(14, 32, 64, 0.08);
}

.login-card-panel h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.login-form {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.login-inline-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.login-remember-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-remember-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  color: #23395f;
  font-weight: 500;
}

.login-remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2a6fdd;
}

.form-row {
  display: grid;
  gap: 6px;
}

.form-row label {
  margin: 0;
  color: #23395f;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  height: 48px;
  border: 1px solid #c7d4e6;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 0.96rem;
  background: #fbfdff;
}

.form-row textarea {
  min-width: 0;
  min-height: 90px;
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #6f84a6;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid rgba(56, 108, 189, 0.22);
  outline-offset: 1px;
  border-color: #89a9d6;
  background: #fff;
}

/* 파일 input 커스텀 스타일 */
.form-row input[type="file"] {
  padding: 8px 0;
  height: auto;
  cursor: pointer;
  border: none;
  background: transparent;
}

.form-row input[type="file"]::file-selector-button {
  background: #f0f4fb;
  color: #23395f;
  border: 1px solid #c2cfe2;
  border-radius: 8px;
  padding: 8px 14px;
  margin-right: 12px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.form-row input[type="file"]::file-selector-button:hover {
  background: #e5ecf7;
  border-color: #b8cbdc;
}

/* 소속·직급 가로 배치 */
.affiliation-inline-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.affiliation-inline-row .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.affiliation-inline-row .form-row label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1a2d47;
}

.affiliation-inline-row .form-row select {
  height: 42px;
  border: 1px solid #c2cfe2;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 0.93rem;
}

.form-help {
  margin: -2px 0 0;
  color: #536584;
  font-size: 0.84rem;
}

.auth-message {
  margin: 0;
  min-height: 0;
  font-size: 0.9rem;
  color: #1a4e86;
  line-height: 1.5;
}

.auth-message:empty {
  display: none;
}

.auth-message.is-error {
  color: #a52d25;
}

.auth-message.is-success {
  color: #136a43;
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.login-form .login-actions .btn {
  width: 100%;
  min-width: 0;
  height: 46px;
  font-size: 0.95rem;
}

.login-actions .btn[disabled] {
  opacity: 0.68;
  cursor: not-allowed;
}

.mypage-grid {
  grid-template-columns: 1.4fr 1fr;
}

.mypage-panel {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 2px 24px rgba(12, 28, 58, 0.10), 0 1px 4px rgba(12,28,58,0.06);
  overflow: hidden;
  padding: 0;
  border: none;
}

.mypage-panel h3 {
  margin-top: 8px;
  font-size: 1.14rem;
  letter-spacing: -0.01em;
  color: #173968;
}

.mypage-greeting {
  padding: 22px 24px 16px;
  font-size: 1.08rem;
  font-weight: 700;
  color: #0f1f3d;
  letter-spacing: -0.02em;
  border-bottom: 1px solid #f0f4fb;
}

/* ── 마이페이지 새 레이아웃 ── */
.mypage-section {
  padding: 20px 24px 16px;
}

.mypage-divider {
  margin: 0;
  border: none;
  border-top: 1px solid #f0f4fb;
}

.mypage-section-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #9bacc4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mypage-info-list {
  margin: 0;
  display: grid;
  gap: 0;
}

.mypage-info-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #f0f4fb;
}

.mypage-info-row:last-child {
  border-bottom: none;
}

.mypage-info-row dt {
  color: #9bacc4;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.mypage-info-row dd {
  margin: 0;
  color: #0f1f3d;
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mypage-info-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.mypage-info-row-2 .mypage-info-row {
  border-bottom: 1px solid #f0f4fb;
}

.mypage-section-pw {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}

.mypage-section-pw-label {
  color: #0f1f3d;
  font-size: 0.95rem;
  font-weight: 700;
}

.mypage-affiliation-guide {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  padding: 11px 14px;
  background: #f0f6ff;
  border: 1px solid #ccddf7;
  border-radius: 12px;
  color: #3a5a8a;
  font-size: 0.83rem;
  line-height: 1.6;
}

.affiliation-guide-icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  display: block;
  margin-top: 2px;
  color: #4a7fc1;
}

.mypage-affiliation-apply-btn {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mypage-affiliation-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mypage-affiliation-actions .btn {
  min-width: 112px;
}

.mypage-colleagues {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  background: #f8fbff;
}

.mypage-colleagues-title {
  margin: 0 0 8px;
  color: #365686;
  font-size: 0.82rem;
  font-weight: 800;
}

.mypage-colleagues-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.mypage-colleague-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.86rem;
  color: #223a5e;
}

.mypage-colleague-rank {
  color: #6f84a7;
  font-size: 0.8rem;
  font-weight: 700;
}

.mypage-colleagues-empty {
  margin: 0;
  color: #6d7f9d;
  font-size: 0.83rem;
}

/* 소속 뱃지 */
.mypage-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.mypage-status-badge.status-none {
  color: #7a8ea8;
  background: #f1f5f9;
  border-color: #dde5f0;
}

.mypage-status-badge.status-pending {
  color: #8a4b00;
  background: #fff7e6;
  border-color: #f1ddb0;
}

.mypage-status-badge.status-approved {
  color: #0f6a41;
  background: #e9f9f0;
  border-color: #b8e7cb;
}

.mypage-status-badge.status-rejected {
  color: #a52d25;
  background: #fff1f0;
  border-color: #f3c8c5;
}

/* 액션 버튼 */
.mypage-actions {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mypage-actions .btn {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
}

.mypage-actions-row {
  display: flex;
  gap: 8px;
}

.mypage-actions-row .btn {
  flex: 1;
}

/* 닉네임 변경 버튼 */
.mypage-info-row dd .btn-sm {
  padding: 0 10px;
  height: 28px;
  font-size: 0.76rem;
  border-radius: 8px;
  font-weight: 700;
}

/* 미디어쿼리: 소형 화면 */
@media (max-width: 480px) {
  .mypage-info-row-2 {
    grid-template-columns: 1fr 1fr;
    gap: 0 8px;
  }
  .mypage-section,
  .mypage-actions {
    padding-left: 18px;
    padding-right: 18px;
  }
  .mypage-greeting {
    padding: 18px 18px 14px;
  }
  .mypage-section-pw {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* ── 구버전 호환 (탭 등 미사용) ── */
.mypage-tab-bar { display: none; }
.mypage-tab-panel[hidden] { display: none; }
.mypage-tab-panel { margin-top: 0; }
.mypage-summary-list { display: none; }
.mypage-affiliation-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mypage-affiliation-head h4 { margin: 0; font-size: 0.96rem; color: #233f68; }
.mypage-affiliation-desc { margin: 6px 0 0; color: #7a8ea8; font-size: 0.84rem; }
.mypage-affiliation-meta { margin-top: 8px; display: grid; gap: 4px; color: #455775; font-size: 0.85rem; }

.surname-search-panel {
  display: grid;
  gap: 12px;
  max-width: 860px;
  width: 100%;
  margin-inline: auto;
}

.surname-search-controls {
  display: grid;
  grid-template-columns: minmax(420px, 720px) auto;
  gap: 10px;
  align-items: end;
}

.surname-search-controls .form-row {
  margin-bottom: 0;
}

.surname-search-controls input,
.surname-search-controls select {
  width: 100%;
  height: 42px;
  border: 1px solid #c2cfe2;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 0.93rem;
  background: #fff;
}

.surname-search-controls input:focus,
.surname-search-controls select:focus {
  outline: 2px solid #8eb0da;
  outline-offset: 1px;
}

.surname-search-controls .btn {
  height: 42px;
  padding: 0 16px;
  font-size: 0.9rem;
  border-radius: 10px;
  justify-self: start;
}

/* Age calc */
.age-calc-panel {
  max-width: 860px;
  width: 100%;
  margin-inline: auto;
}

.age-calc-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.age-form-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.age-form-col > label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #4f678f;
}

.age-form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.age-form-row label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #2f4a72;
  white-space: nowrap;
  flex-shrink: 0;
}

.age-form-row input[type="number"] {
  width: 130px;
  flex-shrink: 0;
  height: 42px;
  border: 1px solid #c2cfe2;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 1rem;
  background: #fff;
  color: #1a2e4a;
}

.age-form-row input[type="number"]:focus {
  outline: none;
  border-color: #1f5bb6;
  box-shadow: 0 0 0 3px rgba(31, 91, 182, 0.12);
}

.age-form-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.age-form-error {
  font-size: 0.85rem;
  color: #c0392b;
  min-height: 1.2em;
  margin: 0;
  padding-left: 2px;
}

.age-result-wrap {
  margin-top: 20px;
  border: 1px solid #dbe3f1;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.age-result-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.age-result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 22px 16px;
  border-right: 1px solid #edf1f8;
}

.age-result-card:last-child {
  border-right: 0;
}

.age-card-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #4f678f;
  letter-spacing: 0.02em;
}

.age-card-value {
  font-size: 2rem;
  font-weight: 800;
  color: #1a3a6e;
  line-height: 1.1;
}

.age-card-note {
  font-size: 0.76rem;
  color: #8fa3c0;
}

.age-result-formula {
  padding: 10px 18px;
  font-size: 0.82rem;
  color: #6b83a6;
  background: #f6f9fe;
  margin: 0;
  border-top: 1px solid #edf1f8;
  line-height: 1.7;
}

.age-table-section {
  margin-top: 28px;
}

.age-table-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #2f4a72;
  margin: 0 0 10px;
}

.age-table-wrap {
  border: 1px solid #dbe3f1;
  border-radius: 12px;
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
}

.age-table thead th {
  position: sticky;
  top: 0;
  background: #f3f7fd;
  z-index: 1;
  font-size: 0.88rem;
}

.age-table tbody tr.age-row-highlight {
  background: #fff7ed;
  font-weight: 700;
}

.age-table tbody tr.age-row-highlight td {
  color: #c05a00;
}

/* Ganji */
.ganji-panel {
  max-width: 860px;
  width: 100%;
  margin-inline: auto;
}

.ganji-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.ganji-search-row input[type="date"] {
  min-width: 190px;
  height: 40px;
  border: 1px solid #c2cfe2;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 0.92rem;
  background: #fff;
  color: #1a2e4a;
}

.ganji-search-row input[type="date"]:focus {
  outline: none;
  border-color: #1f5bb6;
  box-shadow: 0 0 0 3px rgba(31, 91, 182, 0.12);
}

.ganji-nav-row {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.ganji-error {
  margin: 10px 0 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: #c0392b;
}

.ganji-cards {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.ganji-card {
  border: 1px solid #dbe3f1;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}

.ganji-card.is-center {
  border: 2px solid #1f5bb6;
  background: #f8fbff;
}

.ganji-card-date {
  margin: 0 0 10px;
  color: #1f3658;
  font-size: 1rem;
}

.ganji-line {
  margin: 6px 0;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px;
  font-size: 0.92rem;
}

.ganji-line > span {
  color: #5c7398;
}

.ganji-line > strong {
  color: #243c60;
  font-weight: 600;
}

.surname-result-meta {
  margin: 0;
  color: #4f678f;
  font-size: 0.92rem;
}

.surname-list-wrap {
  border: 1px solid #dbe3f1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.surname-list-header,
.surname-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1.4fr);
  align-items: center;
  gap: 0;
}

.surname-list-header {
  background: #f3f7fd;
  border-bottom: 1px solid #dbe3f1;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #36527d;
}

.surname-list-header > span {
  padding: 0 4px;
}

.surname-row {
  padding: 8px 12px;
  border-bottom: 1px solid #e8edf5;
  font-size: 0.94rem;
  line-height: 1.45;
}

.surname-row:last-child {
  border-bottom: 0;
}

.surname-row:nth-child(even) {
  background: #fbfdff;
}

.surname-row:hover {
  background: #f0f5fc;
}

.surname-cell {
  padding: 0 4px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surname-cell-hanja {
  display: flex;
  align-items: center;
  gap: 8px;
}

.surname-hanja-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surname-copy-btn {
  border: 1px solid #c7d5ea;
  background: #f5f9ff;
  color: #2d4a74;
  border-radius: 8px;
  height: 28px;
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.surname-copy-btn:hover,
.surname-copy-btn:focus-visible {
  background: #eaf2ff;
}

.surname-empty-cell {
  color: #5f7397;
  padding: 16px;
  text-align: center;
}

.surname-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.surname-page-btn {
  border: 1px solid #cbd8ea;
  background: #fff;
  color: #2e4b74;
  border-radius: 8px;
  min-width: 36px;
  height: 34px;
  padding: 0 10px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.surname-page-btn:hover:not(:disabled),
.surname-page-btn:focus-visible:not(:disabled) {
  background: #eef3fb;
}

.surname-page-btn.is-active {
  border-color: #1f5bb6;
  background: #1f5bb6;
  color: #fff;
}

.surname-page-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.kpi-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kpi-box {
  border: 1px solid #d6e1f1;
  border-radius: 12px;
  background: #f7fbff;
  padding: 12px;
}

.kpi-box strong {
  display: block;
  font-size: 1.15rem;
}

.kpi-box span {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: #4e6181;
}

@media (max-width: 980px) {
  .split-grid {
    grid-template-columns: 1fr;
  }

  .mypage-edit-grid {
    grid-template-columns: 1fr;
  }

  .login-form .login-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .login-form .login-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .mypage-actions-row {
    display: flex;
    gap: 8px;
  }

  .mypage-actions-row .btn {
    flex: 1;
    width: auto;
  }

  .surname-search-controls {
    grid-template-columns: 1fr;
  }

  .surname-list-header,
  .surname-row {
    grid-template-columns: minmax(60px, 0.75fr) minmax(60px, 0.75fr) minmax(0, 1.5fr);
    padding: 6px 10px;
    gap: 4px;
  }

  .surname-list-header {
    font-size: 0.78rem;
  }

  .surname-row {
    font-size: 0.82rem;
  }

  .age-form-row {
    flex-wrap: nowrap;
  }

  .age-form-row input[type="number"] {
    flex: 1;
    width: auto;
    min-width: 80px;
  }

  .age-form-btns {
    flex-shrink: 0;
  }

  .age-result-card {
    padding: 16px 10px;
  }

  .age-card-value {
    font-size: 1.6rem;
  }

  .ganji-search-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ganji-search-row input[type="date"] {
    grid-column: 1 / -1;
  }

  .ganji-nav-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ganji-line {
    grid-template-columns: 84px 1fr;
    font-size: 0.86rem;
  }
}

@media (max-width: 760px) {
  .mypage-panel {
    max-width: 100%;
    border-radius: 18px;
    padding: 0;
  }

  .mypage-summary-list {
    gap: 10px;
  }

  .mypage-row-2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mypage-summary-list > div:not(.mypage-row-2),
  .mypage-row-2 > div {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
    padding: 12px;
  }

  .mypage-summary-list dt {
    font-size: 0.8rem;
  }

  .mypage-summary-list dd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.94rem;
    line-height: 1.45;
    word-break: break-word;
  }

  .mypage-summary-list dd .btn-sm {
    height: 30px;
    padding: 0 10px;
  }

  .mypage-actions {
    margin-top: 16px;
    gap: 8px;
  }

  .mypage-row-password {
    grid-template-columns: max-content max-content;
    align-items: center;
    justify-content: space-between;
  }

  .mypage-row-password dd {
    justify-content: flex-end;
  }

  .mypage-row-stats {
    grid-template-columns: 1fr 1fr;
  }

  .mypage-row-stats > div {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
  }

  .surname-search-panel {
    gap: 14px;
  }

  .surname-result-meta {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 20px;
  }

  .login-card-panel {
    border-radius: 16px;
  }

  .login-card-panel h3 {
    font-size: 1.2rem;
  }

  .login-form {
    margin-top: 16px;
    gap: 12px;
  }

  .form-row input,
  .form-row select,
  .form-row textarea {
    height: 46px;
    font-size: 0.94rem;
  }

  .surname-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef3fb;
    border-bottom: 1px solid #ccd9ec;
  }

  .surname-table tbody td {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .surname-table td:nth-child(2),
  .surname-table td:nth-child(3) {
    white-space: normal;
    word-break: keep-all;
  }

  .surname-table th:nth-child(1),
  .surname-table td:nth-child(1) {
    width: 24%;
  }

  .surname-table th:nth-child(2),
  .surname-table td:nth-child(2) {
    width: 30%;
  }

  .surname-table th:nth-child(3),
  .surname-table td:nth-child(3) {
    width: 46%;
  }
}

@media (max-width: 680px) {
  .search-row {
    grid-template-columns: 1fr;
  }

  .kpi-row {
    grid-template-columns: 1fr;
  }
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  width: min(90vw, 500px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e9f0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.modal-body .form-row {
  margin-bottom: 16px;
}

.modal-body .form-row:last-child {
  margin-bottom: 0;
}

.form-help {
  margin-top: 8px;
  font-size: 0.875rem;
  color: #666;
  min-height: 20px;
}

.form-help.is-error {
  color: #dc2626;
}

.form-help.is-success {
  color: #16a34a;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #e5e9f0;
}

.modal-footer .btn {
  min-width: 100px;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 0.875rem;
}

@media (max-width: 520px) {
  .page-login .section-space {
    padding: 24px 0 48px;
  }

  .modal-content {
    width: 100%;
    max-height: 100%;
    border-radius: 12px 12px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .login-page-layout {
    width: min(calc(100% - 24px), 420px);
  }

  .login-card-panel {
    padding: 20px 18px 18px;
    border-radius: 16px;
  }

  .login-card-panel h3 {
    font-size: 1.2rem;
  }

  .login-form {
    margin-top: 14px;
    gap: 10px;
  }

  .form-row input,
  .form-row select,
  .form-row textarea {
    height: 46px;
    font-size: 0.94rem;
  }

  .login-remember-row {
    margin-top: 2px;
  }

  .login-actions {
    gap: 8px;
    margin-top: 0;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
  }
}
