/* ===== 이벤트 페이지 · 마케팅 이벤트 (2026-11 이벤트 기능) ===== */

/* 이벤트 페이지 ↔ 달력 전환 때 화면이 흔들리지 않게 스크롤바 자리 고정 */
html {
  scrollbar-gutter: stable;
}

/* 맨 위 버튼·제목 줄바꿈·겹침 금지 (1280px + 긴 계정 이름) */
.header-center button,
.header-center .admin-badge,
#calendarTitle,
.user-section > button,
#currentUserLabel {
  white-space: nowrap;
}

/* 오른쪽 버튼 줄은 제 폭 그대로, 남는 폭은 왼쪽이 줄어들며 흡수 (가운데 제목과 겹치지 않게) */
.header-left {
  flex: 1 1 0;
  min-width: 0;
}

.header-center {
  flex: 0 0 auto;
  margin: 0 12px;
}

.header-right {
  flex: 0 0 auto;
}

#currentUserLabel {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.user-section > button {
  height: 42px;
  line-height: 1;
  box-sizing: border-box;
}

.btn-evview {
  background: #f5f3ff !important;
  color: #6d28d9 !important;
  border: 1px solid #7c3aed !important;
  font-weight: 700 !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-evview b {
  background: #7c3aed;
  color: #fff;
  border-radius: 8px;
  padding: 0 6px;
  font-size: 11px;
}

.btn-evview.on {
  background: #7c3aed !important;
  color: #fff !important;
}

.btn-evview.on b {
  background: #fff;
  color: #7c3aed;
}

.btn-event {
  background: #fff !important;
  border: 1px solid #d1d5db !important;
  color: #111 !important;
}

/* 이벤트 페이지에서는 달 이동 버튼 숨김 */
body.ev-page #prevPeriod,
body.ev-page #todayBtn,
body.ev-page #nextPeriod {
  display: none;
}

.event-page {
  padding-bottom: 40px;
}

/* 표 */
.mk-tbl-top {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 0 10px;
}

.mk-seg {
  display: inline-flex;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  height: 36px;
  box-sizing: border-box;
}

.mk-seg button {
  border: none;
  background: none;
  padding: 6px 12px;
  height: 100%;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
}

.mk-seg button.on {
  background: #7c3aed;
  color: #fff;
}

.mk-seg button i {
  font-style: normal;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 8px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 11px;
}

.mk-seg button.on i {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.mk-q {
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  padding: 0 12px 0 34px;
  height: 36px;
  box-sizing: border-box;
  font: inherit;
  font-size: 13px;
  width: 270px;
  outline: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
}

.mk-q:focus {
  border-color: #7c3aed;
}

.mk-pub-note {
  margin-left: auto;
  font-size: 12.5px;
  color: #6b7280;
}

.mk-soon {
  margin-top: 14px;
}

.mk-grp-live {
  margin-top: 0;
}

.mk-soon summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 8px;
}

.mk-tbl-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow-x: auto;
}

table.mk-tbl {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mk-tbl th {
  background: #f9fafb;
  color: #6b7280;
  font-size: 12px;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.mk-tbl td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f2f4;
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-tbl th:nth-child(4),
.mk-tbl tr:not(.mk-mrow) td:nth-child(4) {
  padding-left: 2px;
  padding-right: 2px;
}

.mk-tbl tbody tr {
  cursor: pointer;
}

.mk-tbl tbody tr:hover {
  background: #faf5ff;
}

.mk-tbl td.tt {
  font-weight: 700;
  color: #1a1a2e;
}

.mk-tbl td.bn {
  color: #1a1a2e;
  font-weight: 600;
}

.mk-tbl td.empty {
  text-align: center;
  color: #9ca3af;
}

.mk-tbl tr.mk-mrow td {
  background: #f9fafb;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  padding-top: 7px;
  padding-bottom: 7px;
  cursor: default;
}

.mk-tbl tr.ended td,
.mk-tbl tr.ended .g {
  color: #9ca3af;
}

.mk-tbl tr.ended td.bn {
  filter: grayscale(1);
  opacity: 0.75;
}

.mk-tbl tr.ended .mk-ann {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #9ca3af;
}

.mk-tt {
  display: flex;
  align-items: center;
  min-width: 0;
}

.mk-tt > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.mk-tbl .bd {
  display: inline-block;
  flex: none;
  font-size: 10px;
  font-weight: 800;
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 6px;
  line-height: 16px;
  vertical-align: 1px;
}

.mk-tbl .bd.nw {
  background: #ff5a5f;
  color: #fff;
}

.mk-tbl .bd.ch {
  background: #f59e0b;
  color: #fff;
}

.mk-ann {
  display: inline-block;
  padding: 0 7px;
  border-radius: 6px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
}

.mk-per {
  white-space: nowrap;
}

.mk-tbl td b.hot {
  color: #dc2626;
}

.mk-more {
  display: inline-block;
  padding: 0 6px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  cursor: default;
}

.mk-more.hl {
  background: #fef08a;
  color: #1a1a2e;
}

mark.hl {
  background: #fef08a;
  color: inherit;
  font-weight: 800;
  border-radius: 2px;
  padding: 0 1px;
}

.mk-tbl .g {
  font-weight: 700;
  white-space: nowrap;
}

.mk-tbl .g.ok {
  color: #059669;
}

.mk-tbl .g.no {
  color: #b45309;
}

.mk-crm {
  font-weight: 500;
  font-size: 12px;
  color: #9ca3af;
}

.mk-q-empty {
  padding: 18px 4px;
  color: #9ca3af;
  font-size: 13px;
}

.mk-tbl-foot {
  font-size: 11.5px;
  color: #8888aa;
  margin-top: 8px;
}

/* 공유 캘린더(로그인 전): 대응 예시 칸 숨김 */
.event-page.ev-public .col-guide {
  display: none;
}

/* ===== 마케팅 이벤트 창 ===== */
.mk-modal-head-sub {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  margin-left: 8px;
}

.mk-form .form-input:disabled {
  background: #f3f4f6;
  color: #6b7280;
}

.mk-drow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.mk-drow .dl {
  width: 30px;
  flex: none;
  font-size: 12.5px;
  color: #6b7280;
  font-weight: 600;
}

.mk-drow input[type=date] {
  flex: none;
  width: 170px;
  margin: 0;
}

.mk-drow input[type=date]:disabled {
  background: #f3f4f6;
  color: #b0b4bb;
}

.mk-form label.mk-ck {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
  margin: 0;
}

.mk-form label.mk-ck input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #1a1a2e;
}

.mk-guide-ok {
  margin-top: 6px;
  font-size: 12.5px;
  color: #b45309;
  font-weight: 600;
}

.mk-guide-ok label,
.mk-notify label {
  cursor: pointer;
}

.mk-guide-ok input,
.mk-notify input {
  vertical-align: -2px;
  margin-right: 6px;
}

.mk-notify {
  margin: 4px 0 10px;
  padding: 9px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 13px;
  color: #9a3412;
}

.mk-notify.hidden {
  display: none;
}

.mk-notify label {
  font-weight: 700;
}

.mk-notify div {
  font-size: 12px;
  font-weight: 500;
  margin-top: 3px;
  color: #b45309;
}

.mk-history {
  font-size: 12px;
  color: #6b7280;
  border-top: 1px dashed #e5e7eb;
  margin-top: 10px;
  padding-top: 8px;
}

.mk-history div {
  margin: 2px 0;
}

.mk-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0 6px;
  padding: 8px;
  border-radius: 8px;
  background: #eff6ff;
}

.mk-tools .btn-secondary {
  font-size: 12.5px;
  padding: 6px 10px;
}

.mk-tool-out {
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}

.mk-tool-out .to-h {
  font-size: 12.5px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mk-tool-out .to-h button {
  margin-left: auto;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 6px;
  font-size: 12px;
  padding: 2px 10px;
  cursor: pointer;
}

.mk-tool-out pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.6;
  margin: 0;
  color: #111;
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px;
}

.btn-stop {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #fecaca !important;
}

.btn-stop.arm {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}

.btn-del {
  color: #b91c1c !important;
  border-color: #fecaca !important;
}

.btn-del.arm {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}

/* ===== 상세: 대응 예시 ===== */
.detail-row.detail-guide {
  flex-direction: column;
  gap: var(--spacing-2);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: var(--spacing-3);
  margin-top: var(--spacing-2);
}

.detail-row.detail-guide .detail-label {
  color: #047857;
  font-weight: 600;
}

.detail-row.detail-guide .detail-value {
  text-align: left;
  width: 100%;
}

.detail-row .guide-box {
  display: block;
  background: #ecfdf5;
  border-radius: 8px;
  padding: 8px 10px;
  white-space: pre-line;
  color: #065f46;
}

.detail-row .guide-empty {
  color: #b45309;
  font-weight: 600;
}

.detail-row .guide-stale {
  display: block;
  color: #b45309;
  font-weight: 700;
  font-size: 12.5px;
  margin-bottom: 4px;
}

.detail-row .guide-edit-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.detail-row .guide-input {
  width: 100%;
  white-space: pre-wrap;
}

.detail-row .guide-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.mk-ro .detail-value {
  white-space: pre-line;
}

@media (max-width: 768px) {
  .mk-q {
    width: 100%;
  }
}
