/* Gaachi-Allinone 포털 — 상단 캘린더 띠 · 1단계 '협회일정' 칸 (calendar.js). 포털 app.css 의 색(남색 포인트)을 따른다. */
/* 범주 색: --cc 진한 색(점·글자) / --cb 옅은 바탕 */
.c-dl { --cc: #c62828; --cb: #fdecec; }   /* 업무 Deadline */
.c-gs { --cc: #a35f00; --cb: #fdf1dc; }   /* 공시업무 */
.c-ed { --cc: #2e7d32; --cb: #e8f4e9; }   /* 교육 */
.c-os { --cc: #7b3fa6; --cb: #f3ebf9; }   /* 해외세미나 */
.c-sm { --cc: #00788a; --cb: #e2f3f5; }   /* 국내세미나 */
.c-as { --cc: #1f3a68; --cb: #e6edf8; }   /* 협회일정 */
.c-et { --cc: #6b7385; --cb: #eef0f4; }   /* 기타 */

.calstrip { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 10px 12px; display: grid; gap: 8px; margin-bottom: 16px; min-width: 0; }
.calstrip.folded { padding: 7px 12px; }
.cal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.cal-title { font-size: 15px; color: var(--navy); white-space: nowrap; }
.cal-title b { font-weight: 600; color: var(--ink2); margin-left: 6px; font-size: 14px; }
.cal-nav { display: inline-flex; gap: 2px; }
.cal-nav .btn { min-width: 30px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 3px 12px; cursor: pointer; font-size: 13px; color: var(--ink2); }
.seg button + button { border-left: 1px solid var(--line2); }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.cal-sum { white-space: nowrap; }
.calstrip.folded .cal-sum { display: inline !important; }

.cal-filters { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line2); background: #fff; border-radius: 99px; padding: 2px 10px; font-size: 12.5px; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--cc, var(--navy2)); }
.chip .n { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="false"] { opacity: .5; background: var(--bg2); }
.chip[aria-pressed="false"] .cdot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--cc); }
.chip.ghost { border-color: transparent; color: var(--navy2); }
.chip.cand[aria-pressed="false"] .cdot.cand { opacity: .6; }
.cdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; background: var(--cc, var(--line2)); }
.cdot.cand { background: transparent; border: 1.5px dashed var(--ink2); width: 10px; height: 10px; }

.cal-note { margin: 0; font-size: 12.5px; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; color: var(--ink2); }
.cal-note.bad { border-color: #f1b8b2; background: var(--bad-bg); color: var(--bad); }
.cal-note a { font-weight: 600; }

/* 주간(가로 7일) */
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cday { border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); min-height: 92px; display: flex; flex-direction: column; min-width: 0; }
.cday.today { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: var(--navy-bg); }
.cday-h { display: flex; align-items: baseline; gap: 5px; padding: 3px 7px; border-bottom: 1px solid var(--line); background: #fff; border-radius: 6px 6px 0 0; font-size: 12.5px; }
.cday.today .cday-h { background: var(--navy-bg); }
.cday-h .dw { color: var(--muted); }
.cday.sun .dw, .mcell.sun .mnum { color: #c62828; }
.cday.sat .dw, .mcell.sat .mnum { color: #1f5fbf; }
.tbadge { margin-left: auto; font-size: 11px; background: var(--navy); color: #fff; border-radius: 99px; padding: 0 7px; font-weight: 600; }
.cday-l { padding: 4px; display: grid; gap: 3px; align-content: start; min-width: 0; }
.none { color: var(--line2); font-size: 12px; padding: 2px 4px; }

/* 일정 한 줄 */
.ci { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; text-align: left; border: 1px solid transparent; background: var(--cb); color: var(--ink);
  border-radius: 4px; padding: 2px 5px; font-size: 12px; cursor: pointer; line-height: 1.35; }
.ci:hover, .ci:focus-visible { border-color: var(--cc); outline: none; }
.ci .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.ci .tm { font-weight: 700; color: var(--cc); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.ci.cand { background: #fff; border: 1px dashed var(--cc); }
.ci .cb { font-size: 10.5px; color: var(--ink2); border: 1px dashed var(--line2); border-radius: 3px; padding: 0 3px; flex: 0 0 auto; }
.ci.done .tt { text-decoration: line-through; color: var(--muted); }
.ci.brd { background: #fff; border: 1px solid var(--cb); }
/* 주간은 제목 두 줄까지 */
.cal-week .ci { align-items: flex-start; }
.cal-week .ci .cdot { margin-top: 5px; }
.cal-week .ci .tt { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.more { border: 0; background: none; color: var(--navy2); font-size: 12px; cursor: pointer; text-align: left; padding: 1px 4px; font-weight: 600; }

/* 월간 격자 */
.cal-month .mh, .cal-month .mg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-month .mh { font-size: 12px; color: var(--muted); text-align: center; padding: 2px 0 4px; }
.cal-month .mh span:nth-child(6) { color: #1f5fbf; } .cal-month .mh span:nth-child(7) { color: #c62828; }
.cal-month .mg { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.mcell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 84px; padding: 2px 3px 4px; display: grid; gap: 2px; align-content: start; min-width: 0; }
.mcell.out { background: var(--bg2); }
.mcell.out .mnum { color: var(--muted); font-weight: 500; }
.mcell.today { background: var(--navy-bg); }
.mnum { border: 0; background: none; font-size: 12px; font-weight: 600; justify-self: start; padding: 0 6px; cursor: pointer; border-radius: 99px; color: var(--ink); line-height: 1.6; }
.mnum:hover { background: var(--bg2); }
.mcell.today .mnum { background: var(--navy); color: #fff; }

/* 1단계 '협회일정' 칸 — 업무보드 4칸 펼침 카드와 같은 모양 */
.assoc-col { min-height: 0; }
.assoc-col .list.assoc-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); max-height: 560px; }
.acard { border-left: 3px solid var(--cc); display: flex; flex-direction: column; }
.acard .tc-act { margin-top: auto; }
.acard.cand { border-style: dashed; border-left: 3px dashed var(--cc); background: #fffef8; }
.tcard.acard .tc-open .m { display: flex; }
.acard .t .cdot { margin-right: 6px; vertical-align: 1px; }
.assoc-col.folded .tc-body, .assoc-col.folded .tc-act { display: none; }
.badge[class*="c-"] { background: var(--cb); color: var(--cc); display: inline-flex; align-items: center; gap: 4px; }
.badge.cand { background: #fff; border: 1px dashed var(--line2); color: var(--ink2); }

/* 대화상자 */
.cal-detail { display: grid; gap: 10px; }
.cal-detail p { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cal-detail .kv { border-collapse: collapse; font-size: 13.5px; }
.cal-detail .kv th { text-align: left; color: var(--muted); font-weight: 500; padding: 3px 14px 3px 0; vertical-align: top; white-space: nowrap; }
.cal-detail .kv td { padding: 3px 0; overflow-wrap: anywhere; }
.cal-form .chk { display: flex; align-items: center; gap: 6px; align-self: end; padding-bottom: 6px; }
.cal-form .chk input { width: auto; margin: 0; }
.cal-form .span3 { grid-column: 1 / -1; }
.cal-form .w2 { grid-column: span 2; }
.cal-form .pair input[type="time"] { max-width: 120px; }
.cal-daylist { display: grid; gap: 4px; }
.cal-help { padding-left: 20px; margin: 0; }
.cal-help li { margin-bottom: 6px; }
.cal-help code, .cal-detail code { background: var(--bg2); border-radius: 4px; padding: 0 4px; font-size: 12px; }

@media (max-width: 1180px) {
  .cal-sum { display: none; }
}
@media (max-width: 600px) {
  .calstrip { padding: 8px; }
  .cal-week { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cday { min-height: 0; flex-direction: row; }
  .cday-h { flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 54px; flex: 0 0 54px; border-bottom: 0; border-right: 1px solid var(--line); border-radius: 6px 0 0 6px; }
  .cday-h .tbadge { margin: 2px 0 0; }
  .cday-l { flex: 1 1 auto; }
  .mcell { min-height: 54px; padding: 1px; }
  .mcell .ci { padding: 1px 3px; justify-content: center; }
  .mcell .ci .tt, .mcell .ci .tm { display: none; }
  .cal-form { grid-template-columns: minmax(0, 1fr) !important; }
  .cal-form .w2 { grid-column: auto; }
  .assoc-col .list.assoc-list { grid-template-columns: minmax(0, 1fr); }
}

