/* ============================================
   비버챌린지 공유 컴포넌트 (M1)
   ============================================ */

.pill-button,
.pill-button-outline {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 28px;
  border-radius: 100px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    color 150ms ease,
    transform 150ms ease;
  cursor: pointer;
}

.pill-button {
  border: 0;
  background: var(--primary);
  color: var(--text-on-primary);
  box-shadow: 0 8px 20px rgb(139 92 246 / 25%);
}

.pill-button:hover {
  background: var(--primary-dark);
  color: var(--text-on-primary);
  text-decoration: none;
}

.pill-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgb(167 139 250 / 35%),
    0 8px 20px rgb(139 92 246 / 25%);
}

.pill-button:active {
  transform: translateY(1px);
}

.pill-button-outline {
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
}

.pill-button-outline:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
  text-decoration: none;
}

.pill-button-outline:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(167 139 250 / 30%);
}

.pill-button:disabled,
.pill-button-outline:disabled,
.pill-button[aria-disabled="true"],
.pill-button-outline[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--primary-soft);
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.section-header__title {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
}

.section-header__more {
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.section-header__more:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

.list-item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-width: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.list-item__title {
  flex: 1;
  min-width: 0;
  max-width: 400px;
  overflow: hidden;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item__date {
  flex-shrink: 0;
  font-family: Inter, sans-serif;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary);
}

.news-list-item__inner {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.date-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-info__icon {
  width: 22px;
  height: 22px;
}

.date-info__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.date-info__label {
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.date-info__value {
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.checkbox__box {
  position: relative;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg-page);
}

.checkbox__label {
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-subtle);
}

.checkbox--checked .checkbox__box {
  border-color: var(--primary);
  background: var(--primary);
}

.checkbox--checked .checkbox__box::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 6px;
  height: 10px;
  border: solid var(--text-on-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox--checked .checkbox__label {
  color: var(--text-primary);
}

.feature-card {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  border-radius: 20px;
  background: var(--bg-page);
  box-shadow: 0 4px 24px rgb(0 0 0 / 3%);
  overflow: hidden;
}

.feature-card__image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 200px;
}

.feature-card__image--primary {
  background: var(--primary-dark);
}

.feature-card__image--tertiary {
  background: var(--tertiary);
}

.feature-card__image--secondary {
  background: var(--secondary);
}

.feature-card__image .icon,
.feature-card__icon {
  width: 64px;
  height: 64px;
  color: #fff;
}

.feature-card__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
}

.feature-card__title {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

.feature-card__desc {
  margin: 0;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
}

.board-table {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: var(--bg-page);
  box-shadow: 0 4px 24px rgb(0 0 0 / 3%);
  overflow: hidden;
}

.board-table__header {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card);
}

.board-table__th {
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-subtle);
}

.board-table__th--num {
  width: 56px;
  text-align: center;
}

.board-table__th--title {
  flex: 1;
}

.board-table__th--date {
  width: 180px;
  min-width: 180px;
  text-align: right;
}

.board-table__row {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
}

.board-table__row:last-child {
  border-bottom: 0;
}

.board-table__cell-num {
  width: 56px;
  text-align: center;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.board-table__cell-title {
  flex: 1;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.board-table__cell-date {
  width: 180px;
  min-width: 180px;
  text-align: right;
  white-space: nowrap;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary);
}

.board-table__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 200px;
}

.board-table__empty-text {
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-tertiary);
  text-align: center;
}

.board-pagination-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 32px;
}

.board-pagination {
  display: flex;
  gap: 8px;
}

.board-pagination__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
}

.board-pagination__btn:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.board-pagination__btn--active,
.board-pagination__btn--active:hover {
  background: var(--primary);
  color: var(--text-on-primary);
  font-weight: 600;
}

@media (width <= 767px) {
  .pill-button,
  .pill-button-outline {
    width: 100%;
  }

  .list-item {
    padding: 14px 16px;
  }

  .list-item__title {
    max-width: 230px;
  }

  .board-table__header,
  .board-table__row {
    padding: 14px 16px;
  }

  .board-table__th--num,
  .board-table__cell-num {
    width: 44px;
  }

  .board-table__th--date,
  .board-table__cell-date {
    width: 140px;
    min-width: 140px;
  }
}

/* ============================================
   M2: Header / Footer / Sub-page Hero
   ============================================ */

body {
  margin: 0;
  color: var(--text-primary);
  font-family: Inter, sans-serif;
  line-height: 1.5;
}

a {
  color: var(--primary);
}

.site-main {
  min-height: calc(100vh - 72px);
}

.header {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: 72px;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(8px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
  padding: 0 80px;
}

.header__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  text-decoration: none;
}

.header__logo-icon {
  display: block;
  height: 56px;
  width: auto;
  border-radius: 12px;
  object-fit: contain;
}

.header__staging-badge {
  margin-left: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.header__menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.header__menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text-primary);
}

.header__nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.header__menu-list {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header__menu-item {
  position: relative;
  line-height: 1;
}

.header__menu-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text-primary);
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.header__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  flex-direction: column;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(0 0 0 / 10%);
}

.header__menu-item--dropdown:hover > .header__dropdown,
.header__menu-item--dropdown:focus-within > .header__dropdown,
.header__menu-item--dropdown[data-open="true"] > .header__dropdown {
  display: flex;
}

.header__dropdown-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  text-decoration: none;
}

.header__dropdown-item:hover,
.header__dropdown-item:focus-visible {
  background: var(--primary-soft);
  color: var(--primary-dark);
  text-decoration: none;
}

.header__actions {
  display: flex;
  align-items: center;
}

.header__login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 5px 16px;
  border-radius: 24px;
  background: var(--primary);
  color: var(--text-on-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.header__login-btn:hover {
  background: var(--primary-dark);
  color: var(--text-on-primary);
  text-decoration: none;
}

.header__signout-form {
  margin: 0;
}

.header__dropdown-item--button {
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.site-footer {
  margin-top: 80px;
  background: var(--bg-dark);
}

.site-footer__inner {
  display: flex;
  gap: 64px;
  padding: 48px 80px;
}

.site-footer__left,
.site-footer__right {
  color: var(--text-on-primary-muted);
  font-size: 12px;
  line-height: 1.8;
}

.site-footer__left {
  flex: 1;
}

.site-footer__right {
  width: 320px;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.site-footer__logo-icon {
  display: block;
  height: 40px;
  width: auto;
  border-radius: 10px;
  object-fit: contain;
}

.site-footer p {
  margin: 0 0 12px;
}

.site-footer a {
  color: var(--text-on-primary-muted);
}

.site-footer a:hover {
  color: #fff;
}

/* 서브페이지 히어로: original-notion-doc 명세 */
.sub-page-hero {
  width: 100%;
  height: 320px;
  background-color: var(--primary);
  background-image:
    linear-gradient(rgb(15 23 42 / 58%), rgb(15 23 42 / 58%)),
    url("/static/img/background-20200912.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

.sub-page-hero__inner {
  width: 100%;
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 120px;
  box-sizing: border-box;
}

.sub-page-hero__title {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--text-on-primary);
  text-align: center;
}

.sub-page-hero__subtitle {
  margin: 0;
  font-family: Inter, sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--text-on-primary-muted);
  text-align: center;
}

@media (width <= 1023px) {
  .header__inner {
    padding: 0 24px;
  }

  .header__menu-list {
    gap: 18px;
  }
}

@media (width <= 1199px) {
  .header__menu-toggle {
    display: block;
  }

  .header__nav {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 18px;
    border-bottom: 1px solid var(--border);
    background: #fff;
  }

  .header__nav[data-open="true"] {
    display: flex;
  }

  .header__menu-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .header__menu-link {
    width: 100%;
    padding: 10px 2px;
    text-align: left;
  }

  .header__dropdown {
    position: static;
    margin-bottom: 6px;
    border-radius: 10px;
    box-shadow: none;
  }

  .header__actions {
    padding-top: 10px;
  }

  .header__login-btn {
    width: 100%;
  }
}

@media (width <= 767px) {
  .header__inner {
    padding: 0 16px;
  }

  .header__staging-badge {
    display: none;
  }

  .site-footer__inner {
    flex-direction: column;
    gap: 24px;
    padding: 36px 16px;
  }

  .site-footer__right {
    width: 100%;
  }

  .sub-page-hero {
    height: 240px;
  }

  .sub-page-hero__inner {
    padding: 0 24px;
  }

  .sub-page-hero__title {
    font-size: 30px;
  }

  .sub-page-hero__subtitle {
    font-size: 15px;
  }
}

/* ============================================
   M2 fallback for legacy pages
   ============================================ */

.container {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
}

.main {
  margin-top: 24px;
}

.main-raised {
  padding: 24px 0;
}

/* CenteredColumn 등에서 사용하는 margin auto (material-kit 미로드 시 대비) */
.ml-auto {
  margin-left: auto;
}

.mr-auto {
  margin-right: auto;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -12px;
  margin-left: -12px;
}

.col,
[class*=" col-"],
[class^="col-"] {
  box-sizing: border-box;
  width: 100%;
  padding-right: 12px;
  padding-left: 12px;
}

.col {
  flex: 1;
}

.col-md-12,
.col-lg-12,
.col-xl-12 {
  width: 100%;
}

.col-lg-8 {
  width: 66.6667%;
}

.col-lg-4 {
  width: 33.3333%;
}

/* PageHeader 내부에 Row/Container가 들어올 때 폭 축소(shrink-to-fit) 방지 */
.sub-page-hero__inner > .row,
.sub-page-hero__inner > .container,
.sub-page-hero__inner > form {
  width: 100%;
}

@media (width <= 991px) {
  .col-lg-8,
  .col-lg-4 {
    width: 100%;
  }
}

.card {
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background-clip: padding-box;
}

.card > .card-header:first-child {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.card-header__content {
  min-width: 0;
  flex: 1 1 auto;
}

.card-header__actions {
  flex: 0 0 auto;
}

.card-header-primary {
  background: var(--primary-soft);
  border-bottom-color: rgb(139 92 246 / 30%);
}

.card-header-info {
  background: rgb(2 132 199 / 10%);
  border-bottom-color: rgb(2 132 199 / 24%);
}

.card-header-success {
  background: rgb(16 185 129 / 10%);
  border-bottom-color: rgb(16 185 129 / 24%);
}

.card-header-warning {
  background: rgb(245 158 11 / 10%);
  border-bottom-color: rgb(245 158 11 / 24%);
}

.card-header-danger {
  background: rgb(239 68 68 / 10%);
  border-bottom-color: rgb(239 68 68 / 24%);
}

.card-header-default {
  background: var(--bg-card);
}

.card-header h4 {
  margin: 0;
  line-height: 1.25;
}

.card-body {
  padding: 20px;
}

.card-category {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.card-login {
  max-width: 520px;
  margin: 16px auto;
}

.footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
}

.float-left {
  float: left;
}

.float-right {
  float: right;
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary,
.btn-info,
.btn-default,
.btn-secondary,
.btn-success,
.btn-warning,
.btn-danger {
  background: var(--primary);
  color: #fff;
}

.btn-outline-primary,
.btn-outline-info,
.btn-outline-default,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-warning,
.btn-outline-danger {
  border-color: var(--primary);
  background: transparent;
  color: var(--primary);
}

.btn-sm {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.btn-lg {
  min-height: 44px;
  padding: 10px 16px;
}

.btn-link {
  border: 0;
  background: transparent;
  color: var(--primary);
}

.btn-block {
  width: 100%;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
  font-size: 14px;
}

.form-group {
  margin-bottom: 12px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-bottom: 12px;
}

.input-group > .form-control {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group-prepend,
.input-group-append {
  display: flex;
}

.input-group-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: var(--bg-card);
  color: var(--text-secondary);
  line-height: 1;
}

.input-group-prepend + .form-control {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

label {
  display: inline-block;
  margin-bottom: 6px;
}

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

.table th,
.table td {
  padding: 10px;
  border: 1px solid var(--border-light);
  text-align: left;
}

.img-fluid {
  max-width: 100%;
  height: auto;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: none;
  overflow: auto;
  background: rgb(0 0 0 / 45%);
}

.modal.show,
.modal[style*="block"] {
  display: block;
}

.modal-dialog {
  width: min(520px, calc(100% - 32px));
  margin: 60px auto;
}

.modal-content {
  border-radius: 14px;
  background: #fff;
}

.modal-header,
.modal-body,
.modal-footer {
  padding: 16px 18px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.modal-footer {
  border-top: 1px solid var(--border-light);
}

.close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
