﻿:root {
  --paper: rgba(255, 250, 241, 0.92);
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(92, 63, 29, 0.12);
  --text: #2d2418;
  --muted: #6f5b43;
  --primary: #8a5c31;
  --primary-strong: #6e431d;
  --secondary: #184660;
  --accent: #d2a148;
  --danger: #a13f35;
  --shadow: 0 20px 60px rgba(70, 46, 18, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(210, 161, 72, 0.28), transparent 28%),
    radial-gradient(circle at top right, rgba(24, 70, 96, 0.16), transparent 24%),
    linear-gradient(180deg, #f3ead8 0%, #faf4e9 55%, #efe3cf 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  min-height: 100vh;
}

.page-header,
.hero,
.section,
.footer,
.form-section,
.alert,
.page-main {
  width: min(var(--content-width), calc(100% - 24px));
  margin: 0 auto;
}

.page-header {
  padding-top: 24px;
}

.page-topbar,
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  background: rgba(255, 250, 241, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(60, 40, 18, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--secondary), #346884);
  color: #fff8eb;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-text strong {
  font-size: 1rem;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.82rem;
}

.utility-links,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--muted);
  align-items: center;
}

.utility-links a,
.nav-links a {
  padding: 8px 0;
  position: relative;
}

.utility-links a::after,
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.utility-links a:hover::after,
.utility-links a:focus-visible::after,
.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.user-greeting {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(24, 70, 96, 0.08);
  color: var(--secondary);
  font-weight: 700;
}

.page-main {
  padding: 22px 0 30px;
}

.hero,
.section,
.form-section {
  margin-bottom: 22px;
}

.page-hero {
  padding-top: 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 28px;
}

.hero-copy,
.hero-panel,
.section,
.form-card,
.alert,
.contact-box,
.post-content {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 54px;
  background:
    linear-gradient(135deg, rgba(255, 248, 234, 0.95), rgba(255, 255, 255, 0.82)),
    linear-gradient(145deg, rgba(210, 161, 72, 0.16), transparent);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.hero-panel {
  display: grid;
  gap: 18px;
}

.panel-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: rgba(25, 58, 76, 0.94);
  color: #f7f0e1;
}

.panel-card.accent {
  background: linear-gradient(135deg, rgba(138, 92, 49, 0.95), rgba(210, 161, 72, 0.92));
}

.eyebrow,
.section-kicker,
.panel-label,
.chip,
.member-badge,
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.section-kicker {
  color: var(--primary);
}

.panel-label,
.chip {
  color: rgba(255, 248, 234, 0.75);
}

.hero h1,
.section-heading h2,
.footer h2,
.post-head h2 {
  margin: 12px 0;
  font-family: "Nanum Myeongjo", serif;
  font-size: clamp(1.9rem, 3vw, 3.6rem);
  line-height: 1.25;
}

.hero-text,
.section-heading p,
.feature-card p,
.board-card p,
.member-card p,
.contact-box p,
.post-content,
.panel-card p,
.form-card label,
.post-meta,
.board-meta,
.preview-list span {
  color: var(--muted);
  line-height: 1.75;
}

.hero-actions,
.form-actions,
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 150px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 12px 24px rgba(109, 67, 27, 0.25);
}

.btn-secondary {
  color: var(--secondary);
  background: rgba(24, 70, 96, 0.08);
  border: 1px solid rgba(24, 70, 96, 0.12);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, var(--danger), #7e2f28);
}

.alert {
  margin-bottom: 18px;
  padding: 16px 22px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.alert.success {
  color: #1f5c39;
}

.alert.error {
  color: #8b2d25;
}

.section,
.form-card,
.contact-box,
.post-content {
  padding: 34px;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.88);
}

.section.alt {
  background: linear-gradient(180deg, rgba(255, 247, 233, 0.97), rgba(247, 239, 225, 0.93));
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-heading.narrow {
  max-width: 560px;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.intro-card,
.feature-card,
.board-card,
.member-card,
.list-table-wrap,
.footer.compact,
.contact-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 30px rgba(72, 49, 18, 0.06);
}

.intro-card,
.feature-card,
.board-card,
.member-card {
  padding: 24px;
}

.intro-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}

.intro-card strong {
  font-size: 1.05rem;
}

.philosophy-grid,
.board-grid,
.member-showcase {
  display: grid;
  gap: 18px;
}

.philosophy-grid,
.member-showcase {
  grid-template-columns: repeat(3, 1fr);
}

.board-grid {
  grid-template-columns: repeat(2, 1fr);
}

.board-card-head,
.board-toolbar,
.post-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.preview-list,
.panel-list {
  margin: 16px 0 0;
  padding-left: 18px;
}

.preview-list li,
.panel-list li {
  margin-bottom: 10px;
}

.preview-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.empty-line {
  color: var(--muted);
  text-align: center;
}

.text-link {
  color: var(--secondary);
  font-weight: 700;
}

.org-chart {
  display: grid;
  gap: 18px;
}

.org-level {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.org-box {
  min-width: 180px;
  padding: 18px 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-weight: 700;
}

.org-box.primary {
  color: #fff8eb;
  background: linear-gradient(135deg, var(--primary), #a97442);
}

.org-box.soft {
  background: rgba(24, 70, 96, 0.08);
}

.form-card {
  display: grid;
  gap: 18px;
}

.form-card label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}

.form-card input,
.form-card textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(92, 63, 29, 0.18);
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
}

.form-card textarea {
  resize: vertical;
}

.list-table-wrap {
  overflow: hidden;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
}

.list-table th,
.list-table td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(92, 63, 29, 0.1);
  text-align: left;
}

.list-table th {
  background: rgba(24, 70, 96, 0.08);
}

.title-col a {
  font-weight: 700;
}

.board-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tag {
  color: var(--secondary);
}

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

.pagination a {
  min-width: 40px;
  text-align: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
}

.pagination a.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.post-content {
  font-size: 1.02rem;
}

/* ── Quill HTML 렌더링 (view.php 회의록 등) ── */
.ql-content h1 { font-size: 1.5rem; font-weight: 800; margin: 1.2em 0 .5em; font-family: "Nanum Myeongjo", serif; }
.ql-content h2 { font-size: 1.22rem; font-weight: 800; margin: 1.1em 0 .45em; }
.ql-content h3 { font-size: 1.05rem; font-weight: 700; margin: 1em 0 .4em; }
.ql-content p  { margin: 0 0 .7em; line-height: 1.78; }
.ql-content ul, .ql-content ol { margin: .5em 0 .8em 1.4em; padding: 0; line-height: 1.75; }
.ql-content li { margin-bottom: .25em; }
.ql-content strong, .ql-content b { font-weight: 700; }
.ql-content em, .ql-content i { font-style: italic; }
.ql-content u  { text-decoration: underline; }
.ql-content s, .ql-content strike { text-decoration: line-through; color: #999; }
.ql-content blockquote {
  margin: 1em 0; padding: .6em 1em;
  border-left: 4px solid var(--accent);
  background: rgba(210,161,72,.07); border-radius: 0 8px 8px 0;
  color: var(--muted);
}
.ql-content pre, .ql-content code {
  background: #f3f0eb; border-radius: 6px; font-family: monospace; font-size: .88em;
}
.ql-content pre { padding: .8em 1em; overflow-x: auto; margin: .7em 0; }
.ql-content code { padding: .15em .4em; }
.ql-content table {
  border-collapse: collapse; width: 100%; margin: 1em 0;
  font-size: .92rem;
}
.ql-content table td, .ql-content table th {
  border: 1px solid #d0cac2; padding: .45em .75em; min-width: 60px;
  vertical-align: top;
}
.ql-content table th { background: #f5f1ec; font-weight: 700; text-align: left; }
.ql-content table tr:nth-child(even) td { background: #faf8f5; }
.ql-content .ql-indent-1 { padding-left: 2em; }
.ql-content .ql-indent-2 { padding-left: 4em; }
.ql-content .ql-indent-3 { padding-left: 6em; }

.post-actions form {
  margin: 0;
}

.contact-box p {
  margin: 0 0 8px;
}

.footer.compact {
  width: min(var(--content-width), calc(100% - 24px));
  margin: 0 auto 28px;
  padding: 22px 28px;
  text-align: center;
}

.copyright {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .hero-content,
  .philosophy-grid,
  .member-showcase,
  .board-grid,
  .intro-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .page-topbar,
  .topbar,
  .board-toolbar,
  .board-card-head,
  .post-head {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 30px;
  }

  .hero-copy,
  .section,
  .form-card,
  .post-content,
  .contact-box {
    padding: 26px 22px;
  }

  .list-table th:nth-child(1),
  .list-table td:nth-child(1),
  .list-table th:nth-child(5),
  .list-table td:nth-child(5) {
    display: none;
  }
}

.roadmap-grid,
.support-grid,
.partnership-layout {
  display: grid;
  gap: 18px;
}

.roadmap-grid {
  grid-template-columns: repeat(4, 1fr);
}

.roadmap-card,
.strategy-card,
.support-card,
.seminar-box,
.seminar-box > div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 30px rgba(72, 49, 18, 0.06);
}

.roadmap-card,
.strategy-card,
.support-card,
.seminar-box > div {
  padding: 24px;
}

.roadmap-card.emphasis {
  background: linear-gradient(135deg, rgba(24, 70, 96, 0.95), rgba(61, 111, 140, 0.9));
  color: #fff8eb;
}

.roadmap-card.emphasis p,
.roadmap-card.emphasis h3,
.roadmap-card.emphasis .roadmap-year {
  color: #fff8eb;
}

.roadmap-year {
  display: inline-flex;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--secondary);
}

.strategy-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.strategy-card {
  padding: 28px;
}

.strategy-card.dark {
  background: linear-gradient(135deg, rgba(36, 45, 56, 0.96), rgba(21, 31, 40, 0.96));
  color: #fff9ee;
}

.strategy-card.dark h3,
.strategy-card.dark li {
  color: #fff9ee;
}

.strategy-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
  line-height: 1.9;
}

.support-grid,
.partnership-layout {
  grid-template-columns: repeat(3, 1fr);
}

.seminar-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 18px;
}

.seminar-box strong {
  display: block;
  margin-bottom: 10px;
}

@media (max-width: 1080px) {
  .roadmap-grid,
  .support-grid,
  .partnership-layout,
  .seminar-box,
  .strategy-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 역할 배지 ── */
.role-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  vertical-align: middle;
  letter-spacing: .03em;
}
.badge-superadmin { background: #1a1a2e; color: #e0c97f; }
.badge-president  { background: #7b2d8b; color: #fff; }
.badge-auditor    { background: #1565c0; color: #fff; }
.badge-rights     { background: #2e7d32; color: #fff; }
.badge-regular    { background: #546e7a; color: #fff; }

/* 로그인 폼 힌트 */
.form-hint {
  margin-top: 1.2rem;
  font-size: .85rem;
  color: var(--c-muted, #888);
  text-align: center;
}

/* ── 협회원 목록 ── */
.members-section { max-width: 1100px; margin: 0 auto; padding: 2rem 1rem; }

.members-table-wrap { overflow-x: auto; margin-top: 1.5rem; }

.members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.members-table thead th {
  background: #1a1a2e;
  color: #e0c97f;
  padding: .7rem 1rem;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}
.members-table tbody tr { border-bottom: 1px solid #e8e8e8; }
.members-table tbody tr:hover { background: #f7f7fb; }
.members-table tbody td { padding: .65rem 1rem; vertical-align: middle; }

.td-no   { color: #aaa; font-size: .8rem; width: 40px; text-align: center; }
.td-name strong { font-weight: 700; }
.td-addr { color: #555; font-size: .85rem; }
.td-tel  { color: #555; font-size: .85rem; white-space: nowrap; }
.td-owner { font-weight: 600; }
.td-phone { white-space: nowrap; color: #1565c0; font-weight: 500; }
.td-role { white-space: nowrap; }

.members-admin-note {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.btn-sm {
  padding: .35rem .9rem;
  font-size: .85rem;
  background: #1a1a2e;
  color: #e0c97f;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}
.btn-sm:hover { background: #2d2d50; }
.muted { color: #aaa; font-size: .85rem; }

/* ── 조직도 개선 ── */
.org-chart { display: flex; flex-direction: column; align-items: center; gap: 0; }
.org-level { display: flex; gap: 2.5rem; justify-content: center; }
.org-connector-line { width: 2px; height: 36px; background: #ccc; margin: 0 auto; }
.org-box {
  display: flex; flex-direction: column; align-items: center;
  background: #fff; border: 2px solid #ddd; border-radius: 12px;
  padding: 1rem 1.8rem; min-width: 150px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.org-box.primary { border-color: #7b2d8b; background: #f8f0fb; }
.org-box.accent  { border-color: #1a1a2e; background: #f0f0f8; }
.org-title { font-size: .75rem; font-weight: 700; color: #888; letter-spacing: .05em; text-transform: uppercase; }
.org-name  { font-size: 1.2rem; font-weight: 800; margin: .2rem 0; color: #1a1a2e; }
.org-biz   { font-size: .82rem; color: #666; }

/* ── 게시판 제한 태그 ── */
.board-restrict-tag {
  display: inline-block; font-size: .72rem; padding: 1px 8px;
  border-radius: 20px; background: #fff3cd; color: #856404;
  border: 1px solid #ffe69c; margin-bottom: .4rem;
}
.board-desc { color: #666; font-size: .88rem; margin: .3rem 0 .5rem; }

/* ── 이미지 업로드 ── */
.image-upload-section { margin-top: 1rem; }
.image-upload-label { margin-bottom: .6rem; }
.image-upload-label small { display: block; color: #888; font-size: .82rem; margin-top: .1rem; }

.image-drop-zone {
  border: 2px dashed #bbb; border-radius: 10px;
  padding: 2rem 1rem; text-align: center; cursor: pointer;
  color: #888; font-size: .9rem; transition: background .2s, border-color .2s;
  white-space: pre-line;
}
.image-drop-zone:hover, .image-drop-zone.drag-over {
  background: #f0f4ff; border-color: #5c7cfa;
}

.image-preview-list {
  display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem;
}
.img-thumb {
  position: relative; width: 120px; height: 100px;
  border-radius: 8px; overflow: hidden; border: 1px solid #ddd;
  background: #f5f5f5;
}
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.6); color: #fff;
  border: none; border-radius: 50%; width: 22px; height: 22px;
  font-size: .75rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.img-remove:hover { background: #c0392b; }

/* ── 게시글 이미지 표시 ── */
.post-images {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #eee;
}
.post-img-link img {
  max-width: 100%; max-height: 400px; border-radius: 8px;
  border: 1px solid #ddd; object-fit: contain; display: block;
}

/* ── 회원 카드 CTA ── */
.member-card-cta {
  display: flex; align-items: center; justify-content: center;
  background: #f8f8fb; border: 2px dashed #bbb;
}
.member-card-cta a { font-weight: 700; color: #1a1a2e; text-decoration: none; font-size: .95rem; }
.member-card-cta a:hover { color: #7b2d8b; }

/* ═══════════════════════════════════════
   협회원 목록 페이지 (members.php)
   ═══════════════════════════════════════ */

/* 히어로 */
.mem-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 60%, #7b2d8b 100%);
  color: #fff;
  padding: 3.5rem 2rem 3rem;
  text-align: center;
}
.mem-hero-inner { max-width: 600px; margin: 0 auto; }
.mem-hero .section-kicker { color: #e0c97f; font-weight: 700; letter-spacing: .15em; font-size: .78rem; }
.mem-hero h1 { font-size: 2.4rem; font-weight: 800; margin: .4rem 0 .6rem; }
.mem-hero p  { color: rgba(255,255,255,.75); font-size: 1rem; }

/* 본문 래퍼 */
.mem-page { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem; }

/* 섹션 헤더 */
.mem-block { margin-bottom: 3rem; }
.mem-block-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.4rem; border-bottom: 2px solid #f0f0f0; padding-bottom: .8rem; }
.mem-block-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .12em; color: #7b2d8b; text-transform: uppercase; }
.mem-block-head h2 { font-size: 1.3rem; font-weight: 800; color: #1a1a2e; margin: 0; }

/* ─── 임원 카드 ─── */
.officer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }

.officer-card {
  border-radius: 16px; padding: 1.8rem 1.4rem;
  text-align: center; position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  transition: transform .2s, box-shadow .2s;
}
.officer-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,.13); }

.officer-president {
  background: linear-gradient(145deg, #f8f0fb, #eeddf8);
  border: 2px solid #c77ddb;
}
.officer-auditor {
  background: linear-gradient(145deg, #eef4ff, #dce8ff);
  border: 2px solid #74a0f0;
}
.officer-secretary {
  background: linear-gradient(145deg, #f0f8f4, #d8f0e4);
  border: 2px solid #5abf8a;
}

.officer-icon { font-size: 2.2rem; margin-bottom: .5rem; }
.officer-role {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #888; margin-bottom: .3rem;
}
.officer-biz  { font-size: 1rem; font-weight: 700; color: #1a1a2e; margin-bottom: .15rem; }
.officer-name { font-size: 1.4rem; font-weight: 800; color: #1a1a2e; margin-bottom: .8rem; }
.officer-phone {
  display: inline-block; background: rgba(0,0,0,.06); border-radius: 20px;
  padding: .3rem .9rem; font-size: .85rem; font-weight: 600; color: #1a1a2e;
  text-decoration: none; margin-bottom: .4rem;
}
.officer-phone:hover { background: rgba(0,0,0,.12); }
.officer-addr { font-size: .8rem; color: #888; margin-top: .2rem; }

/* ─── 일반 회원 카드 ─── */
.member-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.member-item {
  background: #fff; border: 1px solid #e8e8ee; border-radius: 14px;
  padding: 1.2rem 1.3rem; transition: box-shadow .2s, transform .2s;
}
.member-item:hover { box-shadow: 0 6px 22px rgba(0,0,0,.09); transform: translateY(-2px); }

.member-item-top { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.member-num { font-size: .78rem; color: #bbb; font-weight: 700; font-variant-numeric: tabular-nums; }
.member-item-biz { font-size: 1.1rem; font-weight: 800; color: #1a1a2e; margin: 0 0 .4rem; }
.member-item-addr { font-size: .82rem; color: #888; margin: 0 0 .7rem; }

.member-item-contacts { display: flex; flex-direction: column; gap: .35rem; }
.contact-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .82rem; border-radius: 20px; padding: .25rem .75rem;
  text-decoration: none; font-weight: 500; width: fit-content;
}
.chip-tel    { background: #f0f4ff; color: #3b5bdb; }
.chip-mobile { background: #f0fdf4; color: #2d6a4f; }
.chip-mobile:hover { background: #d8f5e4; }
.chip-name   { background: #f8f8f8; color: #555; }
.chip-empty  { background: #fafafa; color: #ccc; font-style: italic; }
.muted-sm    { color: #bbb; font-size: .85em; }

/* 관리자 바 */
.mem-admin-bar {
  display: flex; align-items: center; gap: 1rem;
  margin-top: 2rem; padding: 1rem 1.2rem;
  background: #f8f8f8; border-radius: 10px; border: 1px dashed #ddd;
}

/* 반응형 */
@media (max-width: 768px) {
  .officer-grid { grid-template-columns: 1fr; }
  .member-card-grid { grid-template-columns: 1fr; }
  .mem-hero h1 { font-size: 1.8rem; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .officer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════
   네비게이션 개선
   ═══════════════════════════════════════ */
.utility-links a,
.nav-links a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 500;
  color: #3a3028;
  transition: background .18s, color .18s;
  text-decoration: none;
}
.utility-links a::after,
.nav-links a::after { display: none; }   /* 기존 underline 제거 */

.utility-links a:hover,
.nav-links a:hover {
  background: rgba(109,67,27,.1);
  color: var(--primary);
}

/* 로그아웃은 구분 */
.utility-links a[href="logout.php"] {
  color: #999;
  font-size: .82rem;
}
.utility-links a[href="logout.php"]:hover {
  background: rgba(200,50,50,.08);
  color: #c0392b;
}

/* 유저 인사 배지 개선 */
.user-greeting {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1a1a2e, #2d1b4e);
  color: #e0c97f !important;
  font-weight: 700;
  font-size: .85rem;
  box-shadow: 0 2px 8px rgba(26,26,46,.2);
}

/* 게시판 링크에 약한 구분선 */
.nav-board-divider {
  width: 1px; height: 16px;
  background: rgba(0,0,0,.12);
  align-self: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   로그인 페이지
   ═══════════════════════════════════════ */
.login-page {
  min-height: calc(100vh - 140px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  width: 100%; max-width: 480px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(60,40,18,.12);
  padding: 2.8rem 2.4rem;
}

.login-brand { text-align: center; margin-bottom: 2rem; }
.login-brand-icon { font-size: 2.8rem; margin-bottom: .6rem; }
.login-brand h1 {
  font-family: "Nanum Myeongjo", serif;
  font-size: 1.7rem; font-weight: 800; margin: 0 0 .4rem; color: #1a1a2e;
}
.login-brand p { font-size: .88rem; color: #888; margin: 0; }

.login-error {
  background: #fff0f0; border: 1px solid #fcc; color: #c0392b;
  border-radius: 10px; padding: .75rem 1rem; font-size: .88rem;
  font-weight: 600; margin-bottom: 1.4rem;
}

.login-field { margin-bottom: 1.2rem; }
.login-label {
  display: block; font-size: .8rem; font-weight: 700;
  color: #555; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .5rem;
}

/* 이름/전화 입력 */
.login-input-wrap {
  display: flex; align-items: center; gap: .7rem;
  background: #f8f6f3; border: 1.5px solid #e8e4df;
  border-radius: 12px; padding: .75rem 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.login-input-wrap:focus-within {
  border-color: #7b4f2e; box-shadow: 0 0 0 3px rgba(123,79,46,.1);
}
.input-icon { font-size: 1rem; flex-shrink: 0; }
.login-input-wrap input {
  border: none; background: transparent; outline: none;
  width: 100%; font-size: .97rem; color: #1a1a2e;
}
.login-input-wrap input::placeholder { color: #bbb; }

/* 커스텀 셀렉트 */
.custom-select { position: relative; }

.custom-select-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; background: #f8f6f3; border: 1.5px solid #e8e4df;
  border-radius: 12px; padding: .75rem 1rem; cursor: pointer;
  font-size: .97rem; color: #1a1a2e; text-align: left;
  transition: border-color .2s, box-shadow .2s;
}
.custom-select-trigger:hover,
.custom-select.is-open .custom-select-trigger {
  border-color: #7b4f2e; box-shadow: 0 0 0 3px rgba(123,79,46,.1);
}
.select-arrow {
  width: 18px; height: 18px; color: #999; flex-shrink: 0;
  transition: transform .2s;
}
.custom-select.is-open .select-arrow { transform: rotate(180deg); }

.custom-select-dropdown {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 200;
  background: #fff; border: 1.5px solid #e8e4df;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(60,40,18,.15);
  max-height: 280px; overflow-y: auto;
}
.custom-select.is-open .custom-select-dropdown { display: block; }

.select-option {
  width: 100%; display: flex; align-items: center; gap: .8rem;
  padding: .7rem 1rem; background: none; border: none; cursor: pointer;
  text-align: left; transition: background .15s;
  border-bottom: 1px solid #f3f3f3;
}
.select-option:last-child { border-bottom: none; }
.select-option:hover { background: #f8f4ef; }
.select-option.is-selected { background: #fdf5ec; }

.option-num {
  font-size: .72rem; font-weight: 700; color: #bbb;
  font-variant-numeric: tabular-nums; flex-shrink: 0; width: 20px;
}
.option-name { font-size: .95rem; font-weight: 600; color: #1a1a2e; flex: 1; }
.option-check {
  width: 16px; height: 16px; color: #7b4f2e; flex-shrink: 0;
}

/* 제출 버튼 */
.login-submit {
  width: 100%; margin-top: .8rem;
  padding: .95rem 1rem;
  background: linear-gradient(135deg, #1a1a2e, #3a2060);
  color: #e0c97f; font-size: 1rem; font-weight: 700;
  border: none; border-radius: 14px; cursor: pointer;
  letter-spacing: .04em; transition: transform .18s, box-shadow .18s;
  box-shadow: 0 6px 20px rgba(26,26,46,.25);
}
.login-submit:hover {
  transform: translateY(-2px); box-shadow: 0 10px 28px rgba(26,26,46,.32);
}
.login-submit:active { transform: translateY(0); }

/* 문의 안내 */
.login-contact {
  text-align: center; font-size: .82rem; color: #aaa; margin-top: 1.4rem;
}
.login-contact strong { color: #777; }

/* ── 네비 컴팩트: 메뉴가 많아도 한 줄 유지 ── */
.utility-links,
.nav-links {
  gap: 4px;
  flex-wrap: nowrap;
}
.utility-links a,
.nav-links a {
  padding: 5px 9px;
  font-size: .82rem;
  white-space: nowrap;
}
.user-greeting {
  font-size: .78rem;
  padding: 4px 10px;
  white-space: nowrap;
}
.page-topbar,
.topbar {
  padding: 12px 18px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: .9rem;
}
.brand-text strong { font-size: .9rem; }
.brand-text small  { font-size: .75rem; }

/* ═══════════════════════════════════════
   게시판 목록 (board.php)
   ═══════════════════════════════════════ */
.board-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* 헤더 */
.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid #f0ede8;
}
.board-header-left {
  display: flex;
  align-items: center;
  gap: .9rem;
}
.board-header-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.board-header-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0 0 .25rem;
  font-family: "Nanum Myeongjo", serif;
}
.board-header-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.board-count {
  font-size: .8rem;
  color: #aaa;
  font-weight: 500;
}
.board-restrict-badge {
  font-size: .72rem;
  font-weight: 700;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffe69c;
  border-radius: 20px;
  padding: 1px 8px;
}

/* 글쓰기 버튼 */
.board-write-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.2rem;
  background: linear-gradient(135deg, #1a1a2e, #3a2060);
  color: #e0c97f;
  font-weight: 700;
  font-size: .88rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(26,26,46,.22);
  transition: transform .18s, box-shadow .18s;
  flex-shrink: 0;
}
.board-write-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(26,26,46,.3);
}

/* 테이블 */
.board-table-wrap {
  background: #fff;
  border: 1px solid #ede9e3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(60,40,18,.06);
}
.board-table {
  width: 100%;
  border-collapse: collapse;
}
.board-table thead th {
  background: #f8f5f0;
  font-size: .78rem;
  font-weight: 700;
  color: #999;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid #ede9e3;
  white-space: nowrap;
}
.board-table tbody tr {
  border-bottom: 1px solid #f5f2ee;
  transition: background .15s;
}
.board-table tbody tr:last-child { border-bottom: none; }
.board-table tbody tr:hover { background: #faf8f5; }
.board-table tbody td {
  padding: 1rem 1rem;
  vertical-align: middle;
  font-size: .9rem;
  color: #444;
}

/* 컬럼 너비 */
.col-num    { width: 56px; text-align: center; color: #bbb !important; font-size: .8rem !important; }
.col-title  { /* flex */ }
.col-author { width: 130px; color: #666 !important; }
.col-date   { width: 100px; color: #aaa !important; font-size: .82rem !important; white-space: nowrap; }
.col-views  { width: 60px; text-align: center; color: #bbb !important; font-size: .82rem !important; }

.post-title-link {
  font-weight: 700;
  color: #1a1a2e;
  text-decoration: none;
  display: block;
  transition: color .15s;
}
.post-title-link:hover { color: #7b2d8b; }

/* 빈 목록 */
.board-empty {
  padding: 3.5rem 1rem !important;
  text-align: center;
}
.board-empty-icon { font-size: 2.5rem; display: block; margin-bottom: .6rem; }
.board-empty p    { color: #aaa; margin: 0 0 .8rem; }
.board-empty a    { color: #7b2d8b; font-weight: 600; text-decoration: none; }

/* 페이지네이션 */
.board-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .35rem;
  margin-top: 1.6rem;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  background: #fff;
  border: 1px solid #ede9e3;
  color: #555;
  transition: background .15s, color .15s, border-color .15s;
}
.page-btn:hover { background: #f5f1ec; color: #1a1a2e; }
.page-btn.is-active {
  background: linear-gradient(135deg, #1a1a2e, #3a2060);
  color: #e0c97f;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(26,26,46,.22);
}
.page-btn-nav { font-size: 1.1rem; color: #aaa; }

/* ── 모바일 반응형 ── */
@media (max-width: 600px) {
  .board-page { padding: 1.2rem .75rem 2rem; }

  .board-header-title { font-size: 1.25rem; }
  .board-header-icon  { font-size: 1.6rem; }

  /* 번호·조회 컬럼 숨김 */
  .board-table .col-num,
  .board-table .col-views {
    display: none;
  }
  /* 작성자·날짜 모바일에서 제목 아래로 */
  .board-table .col-author,
  .board-table .col-date {
    display: none;
  }
  /* 제목 셀에 작성자·날짜 인라인 표시 */
  .board-table tbody td.col-title::after {
    content: attr(data-meta);
    display: block;
    font-size: .75rem;
    color: #bbb;
    font-weight: 400;
    margin-top: .2rem;
  }
  .board-write-btn span { display: none; }
}

/* ═══════════════════════════════════════
   협회비 출납 장부 (ledger.php)
   ═══════════════════════════════════════ */
.ledger-page {
  max-width: 1060px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* 헤더 */
.ledger-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid #f0ede8;
}
.ledger-header-left { display: flex; align-items: center; gap: .9rem; }
.ledger-icon  { font-size: 2.2rem; flex-shrink: 0; }
.ledger-title { font-size: 1.6rem; font-weight: 800; color: #1a1a2e; margin: 0 0 .2rem;
                font-family: "Nanum Myeongjo", serif; }
.ledger-subtitle { font-size: .8rem; color: #aaa; margin: 0; }

.ledger-add-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.2rem;
  background: linear-gradient(135deg, #1a1a2e, #3a2060);
  color: #e0c97f; font-weight: 700; font-size: .88rem;
  border: none; border-radius: 999px; cursor: pointer; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(26,26,46,.22);
  transition: transform .18s, box-shadow .18s;
}
.ledger-add-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(26,26,46,.3); }

/* 요약 카드 */
.ledger-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.summary-card {
  padding: 1.1rem 1.3rem;
  border-radius: 14px;
  display: flex; flex-direction: column; gap: .3rem;
  border: 1.5px solid transparent;
}
.summary-label  { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.summary-amount { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.summary-in      { background: #f0fdf4; border-color: #bbf7d0; }
.summary-in .summary-label  { color: #166534; }
.summary-in .summary-amount { color: #16a34a; }

.summary-out     { background: #fff1f2; border-color: #fecdd3; }
.summary-out .summary-label  { color: #9f1239; }
.summary-out .summary-amount { color: #e11d48; }

.summary-balance { background: linear-gradient(135deg, #f8f5f0, #ede8e0); border-color: #d6cfc5; }
.summary-balance .summary-label  { color: #78716c; }
.summary-balance .summary-amount { color: #1a1a2e; }

/* 입력 폼 */
.ledger-form-wrap {
  background: #f9f7f4;
  border: 1.5px solid #ede9e3;
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.4rem;
}
.ledger-form { display: flex; flex-direction: column; gap: .9rem; }
.lf-row { display: flex; gap: .8rem; flex-wrap: wrap; }
.lf-field { display: flex; flex-direction: column; gap: .35rem; flex: 1; min-width: 140px; }
.lf-wide  { flex: 3; }
.lf-full  { flex: 1 1 100%; }

.lf-field label { font-size: .75rem; font-weight: 700; color: #666; letter-spacing: .04em; text-transform: uppercase; }
.lf-req { color: #e11d48; }
.lf-field input,
.lf-field select {
  padding: .6rem .8rem;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: .9rem;
  background: #fff;
  transition: border-color .2s;
}
.lf-field input:focus,
.lf-field select:focus { border-color: #7b4f2e; outline: none; }

.lf-type-wrap { display: flex; gap: .8rem; align-items: center; padding: .55rem 0; }
.lf-radio { display: flex; align-items: center; gap: .35rem; font-size: .9rem; font-weight: 600; cursor: pointer; }

.lf-actions { display: flex; gap: .7rem; margin-top: .3rem; }
.lf-submit {
  padding: .6rem 1.8rem; background: linear-gradient(135deg, #1a1a2e, #3a2060);
  color: #e0c97f; font-weight: 700; border: none; border-radius: 999px; cursor: pointer; font-size: .9rem;
}
.lf-cancel {
  padding: .6rem 1.2rem; background: #f0ede8; color: #666;
  font-weight: 600; border: none; border-radius: 999px; cursor: pointer; font-size: .9rem;
}

/* 장부 테이블 */
.ledger-table-wrap {
  background: #fff;
  border: 1px solid #ede9e3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(60,40,18,.06);
  overflow-x: auto;
}
.ledger-table { width: 100%; border-collapse: collapse; min-width: 700px; }

.ledger-table thead th {
  background: #f8f5f0;
  font-size: .73rem; font-weight: 700; color: #999;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .8rem .9rem;
  text-align: left;
  border-bottom: 1px solid #ede9e3;
  white-space: nowrap;
}
.ledger-table tbody tr { border-bottom: 1px solid #f5f2ee; transition: background .12s; }
.ledger-table tbody tr:last-child { border-bottom: none; }
.row-in:hover  { background: #f9fffe; }
.row-out:hover { background: #fffbfb; }
.ledger-table tbody td { padding: .8rem .9rem; font-size: .88rem; vertical-align: middle; }

/* 컬럼 너비 */
.lt-date { width: 72px; color: #888; white-space: nowrap; }
.lt-cat  { width: 72px; }
.lt-desc { font-weight: 600; color: #1a1a2e; }
.lt-note { color: #aaa; font-size: .8rem; }
.lt-in   { width: 110px; text-align: right; }
.lt-out  { width: 110px; text-align: right; }
.lt-bal  { width: 120px; text-align: right; font-weight: 700; }
.lt-del  { width: 36px; text-align: center; }

.cat-chip {
  display: inline-block; font-size: .7rem; font-weight: 700;
  padding: 1px 7px; border-radius: 20px;
  background: #f0f0f8; color: #555;
}

.amount-in  { color: #16a34a; font-weight: 700; font-variant-numeric: tabular-nums; }
.amount-out { color: #e11d48; font-weight: 700; font-variant-numeric: tabular-nums; }
.bal-pos    { color: #1a1a2e; font-variant-numeric: tabular-nums; }
.bal-neg    { color: #e11d48; font-variant-numeric: tabular-nums; }

.del-btn {
  background: none; border: none; color: #ddd; cursor: pointer;
  font-size: .8rem; padding: 3px 6px; border-radius: 4px; transition: color .15s, background .15s;
}
.del-btn:hover { color: #e11d48; background: #fff0f0; }

/* 합계 행 */
.ledger-total-row td {
  background: #f8f5f0;
  font-weight: 800;
  font-size: .9rem;
  padding: .9rem .9rem;
  border-top: 2px solid #ede9e3;
}

.ledger-empty { padding: 3rem; text-align: center; color: #bbb; }

/* 모바일 */
@media (max-width: 640px) {
  .ledger-summary { grid-template-columns: 1fr; gap: .6rem; }
  .summary-amount { font-size: 1.15rem; }
  .ledger-title   { font-size: 1.3rem; }
  .lf-row { flex-direction: column; }
  .lt-note, .lt-del { display: none; }
}

/* ═══════════════════════════════════════
   출납 장부 v2 (ledger.php)
   ═══════════════════════════════════════ */

/* 2단 레이아웃 */
.ledger-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
  align-items: start;
}

/* 각 컬럼 */
.ledger-col {
  background: #fff;
  border: 1px solid #ede9e3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 3px 16px rgba(60,40,18,.06);
}

/* 컬럼 헤더 */
.ledger-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .85rem 1rem;
  border-bottom: 1px solid #ede9e3;
}
.income-head  { background: #f0fdf4; }
.expense-head { background: #fff1f2; }
.col-head-label { font-size: .82rem; font-weight: 700; }
.income-head  .col-head-label { color: #166534; }
.expense-head .col-head-label { color: #9f1239; }
.col-head-total {
  font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.income-head  .col-head-total { color: #16a34a; }
.expense-head .col-head-total { color: #e11d48; }

/* 테이블 */
.ledger-col-table { width: 100%; border-collapse: collapse; }
.ledger-col-table thead th {
  background: #faf8f5;
  font-size: .72rem; font-weight: 700; color: #bbb;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .6rem .9rem;
  text-align: left;
  border-bottom: 1px solid #f0ede8;
}
.th-amount { text-align: right !important; }
.ledger-col-table tbody tr { border-bottom: 1px solid #f8f5f2; transition: background .12s; cursor: pointer; }
.ledger-col-table tbody tr:last-child { border-bottom: none; }
.ledger-col-table tbody tr:hover { background: #faf8f5; }

.ledger-col-table tbody td { padding: .75rem .9rem; font-size: .88rem; vertical-align: middle; }
.td-date   { width: 52px; color: #aaa; white-space: nowrap; font-size: .82rem; }
.td-payer  { font-weight: 700; color: #1a1a2e; }
.td-desc   { color: #666; font-size: .84rem; }
.td-amount { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.income-amount  { color: #16a34a; }
.expense-amount { color: #e11d48; }

.col-empty { padding: 2.5rem; text-align: center; color: #ccc; font-size: .88rem; }

/* 최종 잔액 바 */
.ledger-balance-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.2rem;
  padding: 1.1rem 1.5rem;
  background: linear-gradient(135deg, #f8f5f0, #eee9e0);
  border-radius: 14px;
  border: 1px solid #ddd8d0;
}
.balance-item   { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.balance-label  { font-size: .7rem; font-weight: 700; color: #aaa; letter-spacing: .06em; text-transform: uppercase; }
.balance-val    { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.balance-val.in  { color: #16a34a; }
.balance-val.out { color: #e11d48; }
.balance-val.pos { color: #1a1a2e; }
.balance-val.neg { color: #e11d48; }
.balance-final  .balance-val { font-size: 1.4rem; }
.balance-op { font-size: 1.4rem; font-weight: 300; color: #bbb; }

/* ── 모달 ── */
.lm-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.lm-overlay.is-open { display: flex; }

.lm-box {
  background: #fff; border-radius: 20px;
  width: min(480px, calc(100vw - 2rem));
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;
}
.lm-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid #f0ede8;
}
.lm-head h3 { font-size: 1.05rem; font-weight: 800; color: #1a1a2e; margin: 0; }
.lm-close {
  background: none; border: none; font-size: 1rem; color: #aaa; cursor: pointer;
  padding: 4px 8px; border-radius: 6px; transition: background .15s;
}
.lm-close:hover { background: #f0ede8; color: #333; }

.lm-form { padding: 1.2rem 1.4rem; }
.lm-type-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem;
}
.lm-type-btn {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem 1rem; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: .9rem;
  border: 2px solid #eee; background: #fafafa; transition: all .15s;
}
.lm-type-btn input[type=radio] { display: none; }
.lm-type-btn.income-type.active  { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.lm-type-btn.expense-type.active { border-color: #fecdd3; background: #fff1f2; color: #9f1239; }

.lm-fields { display: flex; flex-direction: column; gap: .8rem; }
.lm-field  { display: flex; flex-direction: column; gap: .3rem; }
.lm-field label {
  font-size: .73rem; font-weight: 700; color: #888; letter-spacing: .04em; text-transform: uppercase;
}
.lm-field input,
.lm-field select {
  padding: .65rem .9rem; border: 1.5px solid #e5e0d8; border-radius: 10px;
  font-size: .9rem; background: #faf8f5; transition: border-color .18s;
}
.lm-field input:focus,
.lm-field select:focus { outline: none; border-color: #7b4f2e; background: #fff; }

.lm-actions {
  display: flex; gap: .6rem; margin-top: 1.2rem;
  padding-top: 1rem; border-top: 1px solid #f0ede8;
}
.lm-submit {
  flex: 1; padding: .7rem; border: none; border-radius: 10px; cursor: pointer; font-weight: 700;
  background: linear-gradient(135deg, #1a1a2e, #3a2060); color: #e0c97f; font-size: .9rem;
}
.lm-cancel {
  padding: .7rem 1.2rem; border: none; border-radius: 10px; cursor: pointer;
  background: #f0ede8; color: #666; font-weight: 600; font-size: .9rem;
}
.lm-delete {
  padding: .7rem 1.2rem; border: none; border-radius: 10px; cursor: pointer;
  background: #fff1f2; color: #e11d48; font-weight: 700; font-size: .9rem;
  margin-left: auto;
}
.lm-submit:hover { opacity: .9; }
.lm-cancel:hover { background: #e8e3db; }
.lm-delete:hover { background: #fecdd3; }

/* 모바일: 1단 */
@media (max-width: 720px) {
  .ledger-split { grid-template-columns: 1fr; }
  .ledger-balance-bar {
    flex-direction: column; align-items: stretch; gap: .7rem;
  }
  .balance-item { flex-direction: row; justify-content: space-between; align-items: center; }
  .balance-op   { display: none; }
  .balance-final .balance-val { font-size: 1.2rem; }
}

/* ── 영수증 첨부 (ledger) ── */
.receipt-drop-zone {
  border: 2px dashed #e0dbd4; border-radius: 10px;
  padding: 1rem; text-align: center; cursor: pointer;
  color: #aaa; font-size: .83rem; background: #faf8f5;
  transition: border-color .18s, background .18s;
}
.receipt-drop-zone:hover,
.receipt-drop-zone.drag-over { border-color: #7b4f2e; background: #fdf5ec; color: #7b4f2e; }

.receipt-preview {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem;
}
.receipt-thumb {
  position: relative; width: 72px; height: 72px;
  border-radius: 8px; overflow: hidden; border: 1px solid #ddd;
  background: #f5f5f5; flex-shrink: 0;
}
.receipt-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.receipt-remove {
  position: absolute; top: 2px; right: 2px;
  background: rgba(0,0,0,.55); color: #fff; border: none;
  border-radius: 50%; width: 18px; height: 18px; font-size: .65rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.receipt-remove:hover { background: #c0392b; }

.receipt-icon {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: .72rem; color: #e67e22; font-weight: 700;
  background: #fff8f0; padding: 0 5px; border-radius: 10px;
  margin-left: .3rem; vertical-align: middle; cursor: pointer;
}

/* ── 회원 수정 버튼 ── */
.mem-edit-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem; font-weight: 700; color: #7b4f2e;
  background: rgba(123,79,46,.08); border: 1px solid rgba(123,79,46,.2);
  border-radius: 20px; padding: 2px 10px; text-decoration: none;
  margin-top: .6rem; transition: background .15s;
}
.mem-edit-btn:hover { background: rgba(123,79,46,.16); }
.mem-edit-btn-sm {
  margin-top: 0; margin-left: auto;
  padding: 1px 7px; font-size: .68rem;
}

/* ═══════════════════════════════════════
   회원 수정 페이지 (member_edit.php)
   ═══════════════════════════════════════ */
.edit-page {
  max-width: 680px; margin: 0 auto; padding: 2rem 1rem 3rem;
}
.edit-card {
  background: #fff; border: 1px solid #ede9e3; border-radius: 20px;
  box-shadow: 0 4px 24px rgba(60,40,18,.07); overflow: hidden;
}
.edit-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1.8rem 2rem 1.4rem;
  border-bottom: 1px solid #f0ede8;
  background: linear-gradient(135deg, #faf8f5, #f4f0ea);
}
.edit-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .1em;
               color: #7b4f2e; text-transform: uppercase; margin: 0 0 .3rem; }
.edit-title  { font-size: 1.5rem; font-weight: 800; color: #1a1a2e; margin: 0;
               font-family: "Nanum Myeongjo", serif; }
.edit-back-btn {
  font-size: .82rem; font-weight: 600; color: #888; text-decoration: none;
  padding: .4rem .9rem; border-radius: 20px; background: rgba(0,0,0,.05);
  transition: background .15s; white-space: nowrap; flex-shrink: 0; margin-top: .3rem;
}
.edit-back-btn:hover { background: rgba(0,0,0,.1); color: #333; }

.edit-error-box {
  margin: 1.2rem 2rem 0; padding: .9rem 1rem;
  background: #fff0f0; border: 1px solid #fcc; border-radius: 10px;
  color: #c0392b; font-size: .88rem; font-weight: 600;
}
.edit-error-box p { margin: 0 0 .3rem; }
.edit-error-box p:last-child { margin: 0; }

.edit-form { padding: 1.6rem 2rem 2rem; display: flex; flex-direction: column; gap: 1.4rem; }

.edit-fieldset {
  border: 1.5px solid #ede9e3; border-radius: 14px; padding: 1.2rem 1.3rem;
  display: flex; flex-direction: column; gap: .9rem;
}
.edit-fieldset legend {
  font-size: .82rem; font-weight: 700; color: #7b4f2e;
  padding: 0 .5rem; letter-spacing: .03em;
}
.edit-fieldset-note { font-size: .72rem; color: #bbb; font-weight: 400; }

.edit-row  { display: flex; gap: .9rem; flex-wrap: wrap; }
.edit-field { display: flex; flex-direction: column; gap: .35rem; flex: 1; min-width: 180px; }
.edit-wide  { flex: 2; }

.edit-field label {
  font-size: .75rem; font-weight: 700; color: #888;
  letter-spacing: .04em; text-transform: uppercase;
}
.edit-field .req { color: #e11d48; }

.edit-field input,
.edit-field select {
  padding: .7rem .9rem; border: 1.5px solid #ddd; border-radius: 10px;
  font-size: .93rem; background: #faf8f5; transition: border-color .18s, background .18s;
}
.edit-field input:focus,
.edit-field select:focus { outline: none; border-color: #7b4f2e; background: #fff; }

.edit-actions {
  display: flex; gap: .8rem; align-items: center; padding-top: .4rem;
}
.edit-submit {
  padding: .8rem 2.5rem; background: linear-gradient(135deg, #1a1a2e, #3a2060);
  color: #e0c97f; font-size: .95rem; font-weight: 700;
  border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(26,26,46,.22); transition: transform .18s, box-shadow .18s;
}
.edit-submit:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(26,26,46,.3); }
.edit-cancel {
  padding: .8rem 1.4rem; background: #f0ede8; color: #666;
  font-weight: 600; border-radius: 12px; text-decoration: none;
  font-size: .93rem; transition: background .15s;
}
.edit-cancel:hover { background: #e8e3db; }

@media (max-width: 540px) {
  .edit-card-head, .edit-form { padding-left: 1.2rem; padding-right: 1.2rem; }
  .edit-row { flex-direction: column; }
}

.edit-readonly-chip {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .7rem .9rem; background: #f5f3f0; border: 1.5px solid #e5e0d8;
  border-radius: 10px; font-size: .93rem; font-weight: 600; color: #555;
}
.edit-readonly-note {
  font-size: .72rem; font-weight: 400; color: #bbb; white-space: nowrap;
}

/* ── 연락처 그리드 ── */
.contact-box-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.6rem 2rem;
}
.contact-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.contact-label {
  font-size: .8rem;
  font-weight: 700;
  color: #999;
  white-space: nowrap;
  min-width: 120px;
  letter-spacing: .02em;
}
.contact-value {
  font-size: .97rem;
  color: #1a1a2e;
  font-weight: 500;
}
a.contact-value {
  text-decoration: none;
  transition: color .15s;
}
a.contact-value:hover { color: #7b2d8b; }
.contact-tel { font-weight: 700; }

@media (max-width: 540px) {
  .contact-item { flex-direction: column; gap: .2rem; }
  .contact-label { min-width: unset; }
}

/* ── 비밀번호 입력 토글 ── */
.pw-toggle {
  background: none; border: none; cursor: pointer; font-size: .95rem;
  padding: 0 2px; color: #aaa; flex-shrink: 0;
}
.pw-toggle:hover { color: #555; }
.login-hint-small { font-size: .8rem; color: #aaa; }

/* ── 비밀번호 강도 ── */
.pw-strength-wrap {
  display: flex; align-items: center; gap: .7rem; margin: .4rem 0 .8rem;
}
.pw-strength-bar {
  height: 5px; border-radius: 10px; background: #eee;
  width: 0%; transition: width .3s, background .3s; min-width: 0;
  flex-shrink: 0;
}
.pw-strength-label { font-size: .75rem; font-weight: 700; }

/* ── 회원수정 비밀번호 초기화 영역 ── */
.edit-pw-reset-section {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 2rem 2rem;
  padding: 1rem 1.2rem;
  background: #faf8f5; border: 1px dashed #ddd; border-radius: 12px;
}
.edit-pw-reset-info {
  display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: #666;
}
.edit-pw-reset-info strong { color: #1a1a2e; font-size: .9rem; }
.pw-status { font-size: .78rem; font-weight: 700; }
.pw-not-set { color: #e67e22; }
.pw-set     { color: #16a34a; }
.edit-pw-reset-btn {
  padding: .55rem 1.2rem; background: #fff1f2; color: #e11d48;
  border: 1px solid #fecdd3; border-radius: 10px; font-weight: 700;
  font-size: .85rem; cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.edit-pw-reset-btn:hover { background: #fecdd3; }

/* ── 유저 배지: 마이페이지 링크로 ── */
a.user-greeting {
  text-decoration: none;
  transition: opacity .15s;
}
a.user-greeting:hover { opacity: .85; }

/* ═══════════════════════════════════════
   마이페이지 (mypage.php)
   ═══════════════════════════════════════ */
.mypage-wrap {
  max-width: 700px; margin: 0 auto; padding: 2rem 1rem 3rem;
}

/* 프로필 헤더 */
.mypage-header {
  display: flex; align-items: center; gap: 1.2rem;
  margin-bottom: 1.8rem;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(135deg, #1a1a2e, #3a2060);
  border-radius: 18px;
  color: #fff;
}
.mypage-avatar {
  width: 62px; height: 62px; border-radius: 16px; flex-shrink: 0;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 800; color: #e0c97f;
}
.mypage-header-info { display: flex; flex-direction: column; gap: .2rem; }
.mypage-role { margin-bottom: .1rem; }
.mypage-biz  { font-size: 1.3rem; font-weight: 800; margin: 0; color: #fff; }
.mypage-name { font-size: .88rem; color: rgba(255,255,255,.65); margin: 0; }

/* 탭 */
.mypage-tabs {
  display: flex; gap: .5rem; margin-bottom: 1.2rem;
}
.mypage-tab {
  padding: .55rem 1.2rem; border-radius: 999px; font-size: .88rem; font-weight: 600;
  text-decoration: none; color: #888; background: #f5f3f0;
  transition: background .15s, color .15s;
}
.mypage-tab:hover    { background: #ede9e3; color: #333; }
.mypage-tab.is-active { background: linear-gradient(135deg, #1a1a2e, #3a2060); color: #e0c97f; }

/* 오류 박스 */
.mypage-error {
  background: #fff0f0; border: 1px solid #fcc; border-radius: 10px;
  padding: .8rem 1rem; margin-bottom: 1rem; color: #c0392b; font-size: .88rem; font-weight: 600;
}
.mypage-error p { margin: 0 0 .2rem; } .mypage-error p:last-child { margin: 0; }

/* 카드 / 폼 */
.mypage-card {
  background: #fff; border: 1px solid #ede9e3;
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(60,40,18,.07);
}
.mypage-form { padding: 1.6rem 1.8rem; display: flex; flex-direction: column; gap: 1.2rem; }

.mypage-fieldset {
  border: 1.5px solid #ede9e3; border-radius: 12px; padding: 1.1rem 1.2rem;
  display: flex; flex-direction: column; gap: .85rem;
}
.mypage-fieldset legend {
  font-size: .82rem; font-weight: 700; color: #7b4f2e; padding: 0 .4rem;
}
.mypage-row   { display: flex; gap: .85rem; flex-wrap: wrap; }
.mypage-field { display: flex; flex-direction: column; gap: .3rem; flex: 1; min-width: 180px; }
.mypage-wide  { flex: 2; }

.mypage-field label {
  font-size: .74rem; font-weight: 700; color: #888;
  letter-spacing: .04em; text-transform: uppercase;
}
.req { color: #e11d48; }

.mypage-field input {
  padding: .65rem .85rem; border: 1.5px solid #ddd; border-radius: 10px;
  font-size: .92rem; background: #faf8f5; transition: border-color .18s, background .18s;
}
.mypage-field input:focus { outline: none; border-color: #7b4f2e; background: #fff; }
.mypage-field-note { font-size: .72rem; color: #bbb; margin-top: .15rem; }

.mypage-readonly { justify-content: flex-end; }
.mypage-readonly-val {
  display: flex; align-items: center; gap: .5rem;
  padding: .65rem .85rem; background: #f5f3f0;
  border: 1.5px solid #e5e0d8; border-radius: 10px;
  font-size: .9rem; font-weight: 600; color: #555;
}

/* 비밀번호 입력 래퍼 */
.mypage-pw-wrap {
  display: flex; align-items: center; gap: .4rem;
  background: #faf8f5; border: 1.5px solid #ddd; border-radius: 10px;
  padding: .65rem .85rem; transition: border-color .18s;
}
.mypage-pw-wrap:focus-within { border-color: #7b4f2e; background: #fff; }
.mypage-pw-wrap input { border: none; background: transparent; outline: none; flex: 1; font-size: .92rem; }
.mypage-pw-match { font-size: .75rem; font-weight: 700; margin-top: .2rem; }

/* 액션 버튼 */
.mypage-actions {
  display: flex; gap: .7rem; align-items: center;
  padding-top: .5rem; border-top: 1px solid #f0ede8;
}
.mypage-submit {
  padding: .75rem 2.2rem; background: linear-gradient(135deg, #1a1a2e, #3a2060);
  color: #e0c97f; font-size: .93rem; font-weight: 700;
  border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(26,26,46,.2); transition: transform .18s;
}
.mypage-submit:hover { transform: translateY(-2px); }
.mypage-cancel {
  padding: .75rem 1.3rem; background: #f0ede8; color: #666;
  font-weight: 600; border-radius: 12px; text-decoration: none; font-size: .93rem;
}
.mypage-cancel:hover { background: #e8e3db; }

@media (max-width: 540px) {
  .mypage-form { padding: 1.2rem 1rem; }
  .mypage-row  { flex-direction: column; }
  .mypage-header { padding: 1.1rem 1.2rem; }
}

/* ── 네비 2행 레이아웃 ── */
.utility-links-2row {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 4px;
  max-width: 680px;   /* 브랜드와 겹치지 않게 */
}

/* 1행 끝에서 강제 줄바꿈 */
.nav-line-break {
  flex-basis: 100%;
  height: 0;
  order: 10;   /* 메인·협회원·notice·minutes 다음에 오도록 */
}

/* 2행 항목들 order 높여서 줄바꿈 아래로 */
.utility-links-2row .nav-line-break ~ * {
  order: 20;
}

/* topbar: 2행일 때 세로로 늘어나도록 */
.page-topbar {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

/* 브랜드는 왼쪽 고정 */
.brand {
  flex-shrink: 0;
}

/* 1행 항목 order (기본 0 유지) */
.utility-links-2row > a:not(.user-greeting),
.utility-links-2row > span.nav-board-divider {
  order: 5;
}

/* user-greeting·회원관리·로그아웃은 2행 끝으로 */
.utility-links-2row > a.user-greeting,
.utility-links-2row > a[href="register.php"],
.utility-links-2row > a[href="logout.php"] {
  order: 20;
}

/* ── 2행 네비 정렬 보정 ── */
.utility-links-2row {
  justify-content: flex-start;
  width: auto;
  flex: 1;
}

/* 1행은 왼쪽, 2행(사용자 배지~로그아웃)은 오른쪽으로 밀기 */
.utility-links-2row > a.user-greeting {
  margin-left: auto;
}

/* ═══════════════════════════════════════
   회의록 이미지 그리드 & 라이트박스
═══════════════════════════════════════ */
.minutes-images-wrap {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(92,63,29,.12);
}
.minutes-img-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; font-size: .88rem; font-weight: 700; color: #555;
}
.minutes-img-tip { font-size: .78rem; color: #aaa; font-weight: 400; }

.minutes-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.minutes-img-thumb {
  position: relative; border-radius: 10px; overflow: hidden;
  aspect-ratio: 3/4; cursor: zoom-in;
  border: 1.5px solid rgba(92,63,29,.1);
  background: #f5f3f0;
  transition: transform .2s ease, box-shadow .2s ease;
}
.minutes-img-thumb:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.minutes-img-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.minutes-img-num {
  position: absolute; bottom: 5px; right: 7px;
  background: rgba(0,0,0,.5); color: #fff;
  font-size: .68rem; font-weight: 700; border-radius: 20px; padding: 1px 6px;
}

/* 라이트박스 */
.lb-overlay {
  display: none; position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.92); backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.lb-overlay.is-open { display: flex; }

.lb-content {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 80px);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.lb-content img {
  max-width: 100%; max-height: calc(100vh - 130px);
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
  object-fit: contain;
}
.lb-caption {
  color: rgba(255,255,255,.6); font-size: .85rem; font-weight: 600;
}
.lb-close {
  position: fixed; top: 18px; right: 22px;
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 50%; font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.lb-close:hover { background: rgba(255,255,255,.25); }

.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

@media (max-width: 600px) {
  .minutes-img-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .lb-content { max-width: calc(100vw - 20px); }
  .lb-nav { width: 36px; height: 36px; font-size: 1.3rem; }
}

/* ── 가로 이미지 자동 세로 회전 ── */

/* EXIF 방향 자동 보정 (브라우저 지원) */
.minutes-img-thumb img,
.lb-content img {
  image-orientation: from-image;
}

/* 썸네일: 가로로 판별된 이미지 → 90도 회전 후 잘라서 세로 채움 */
.minutes-img-thumb img.img-rotated {
  transform: rotate(90deg) scale(1.35);
  transform-origin: center center;
}

/* 라이트박스: 가로 이미지 → 90도 회전, 크기 보정 */
.lb-content img.lb-landscape {
  transform: rotate(90deg);
  /* 가로 이미지를 세운 뒤 화면 높이에 맞춤 */
  max-width:  calc(100vh - 130px);
  max-height: calc(100vw - 120px);
}

/* ═══════════════════════════════════════
   지회장 카드
═══════════════════════════════════════ */
.badge-branch { background: #92400e; color: #fef3c7; }

.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}
.branch-card {
  border-radius: 16px; padding: 1.6rem 1.4rem; text-align: center;
  background: linear-gradient(145deg, #fffbeb, #fef3c7);
  border: 2px solid #f59e0b;
  box-shadow: 0 4px 18px rgba(180,83,9,.1);
  transition: transform .2s, box-shadow .2s;
}
.branch-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(180,83,9,.18); }
.branch-icon { font-size: 2rem; margin-bottom: .4rem; }
.branch-role {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #92400e; margin-bottom: .3rem;
}
.branch-name { font-size: 1.3rem; font-weight: 800; color: #1a1a2e; margin-bottom: .15rem; }
.branch-biz  { font-size: .88rem; color: #78716c; margin-bottom: .7rem; }

/* ── 추가 담당자 chip ── */
.chip-extra {
  background: #f0f4ff; color: #3b4fd8;
  text-decoration: none; transition: background .15s;
}
.chip-extra:hover { background: #dde3ff; }

/* ── 편집 폼: 추가 담당자 행 ── */
.edit-contact-row {
  display: grid;
  /* 번호 고정 + 이름/직책/전화 균등 */
  grid-template-columns: 28px 1fr 1fr 1fr;
  align-items: end;
  gap: .6rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: rgba(92,63,29,.03);
  border: 1px solid rgba(92,63,29,.08);
  margin-bottom: .55rem;
}
.edit-contact-row:last-child { margin-bottom: 0; }
.edit-contact-num {
  flex-shrink: 0; width: 26px; height: 26px;
  border-radius: 50%; background: var(--primary); color: #fff;
  font-size: .72rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  /* grid 배치 시 label 높이에 맞춰 하단 정렬 */
  margin-bottom: .45rem;
}
.edit-contact-row .edit-field { min-width: 0; } /* grid 안에서 넘침 방지 */

/* 지회장 섹션 빈 상태 */
.mem-empty-note {
  color: #aaa; font-size: .9rem; padding: .5rem 0;
}

/* 비회원 배지 */
.badge-nonmember { background: #e5e7eb; color: #6b7280; }

@media (max-width: 680px) {
  .edit-contact-row {
    grid-template-columns: 28px 1fr 1fr;
    grid-template-rows: auto auto;
  }
  /* 전화번호를 2번째 줄 전체로 */
  .edit-contact-row .edit-field:last-child {
    grid-column: 2 / -1;
  }
}
@media (max-width: 480px) {
  .edit-contact-row {
    grid-template-columns: 28px 1fr;
  }
  .edit-contact-row .edit-field {
    grid-column: 2;
  }
}

/* ── 조직도 지회장 박스 ── */
.org-box.branch {
  border-color: #f59e0b;
  background: linear-gradient(145deg, #fffbeb, #fef3c7);
  color: #1a1a2e;
}
.org-box.branch .org-title { color: #92400e; }
.org-tel {
  display: block;
  font-size: .78rem;
  color: #78716c;
  margin-top: 4px;
}
