/* ==========================================================================
   Design Flow v3 — EXERCISE area styles (df-ex-*)
   Boards: X1 ข้อมูลของฉัน · X2 ยื่นเบิก · X3 แชร์กิจกรรม · X4 Leaderboard
   + PM approval (L2 visual language) + legacy detail modal refinements.
   Tokens only (light/dark via html[data-theme]).
   ========================================================================== */
.df-ex {
  --x-warn-fg: #9A3B14;
  --x-warn-line: #F4D3C6;
  --x-ink-on-text: #FFFFFF;
  display: flex; flex-direction: column; gap: 20px; color: var(--ds-text); font-family: var(--df-font);
}
html[data-theme="dark"] .df-ex { --x-warn-fg: #F5A585; --x-warn-line: #5A2E1E; --x-ink-on-text: #10111C; }
.df-ex h2 { margin: 0; color: var(--ds-text); }
.df-ex .df-card { padding: 22px; gap: 12px; border-radius: 20px; }
.df-ex .df-h1 { font-size: 30px; }
.df-ex .df-eyebrow a { color: var(--ds-muted); }
.df-ex-mut { color: var(--ds-muted); }
.df-ex-sm { font-size: 13px; }
.df-ex a { color: var(--ds-accent-ink); }

/* exercise icon tiles follow the X boards (solo = blue) */
html .df-ex .ic-solo { --tbg: #E3EEFF; --tfg: #2457B3; }
html .df-ex .ic-run  { --tbg: #ECEBFF; --tfg: #4343B5; }
html .df-ex .ic-eat  { --tbg: #FFF1DC; --tfg: #8A5A0B; }
html[data-theme="dark"] .df-ex .ic-solo { --tbg: #1E2D4D; --tfg: #A9C7FF; }
html[data-theme="dark"] .df-ex .ic-run  { --tbg: #262750; --tfg: #B4B3FF; }
html[data-theme="dark"] .df-ex .ic-eat  { --tbg: #3A2E17; --tfg: #F2C77E; }

/* controls */
.df-ex-lbl { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ds-muted); }
.df-ex-select {
  font-family: inherit; font-size: 14px; min-height: 44px; height: auto; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--ds-line-strong); background-color: var(--ds-surface); color: var(--ds-text); width: auto; max-width: 100%;
}
.df-ex-select.lg { font-size: 15px; min-height: 48px; background-color: var(--ds-surface2); width: 100%; }
.df-ex-cta {
  font-family: inherit; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 12px; border: 0;
  background: var(--ds-accent); color: #FFFFFF; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 18px var(--ds-shadow);
}
.df-ex-cta:hover { background: var(--ds-accent-hover); }
.df-ex-input {
  font-family: inherit; font-size: 15px; font-weight: 400; min-height: 44px; padding: 0 12px; border-radius: 10px; box-sizing: border-box;
  border: 1px solid var(--ds-line-strong); background: var(--ds-surface2); color: var(--ds-text); width: 100%;
}
.df-ex-input.lg { min-height: 48px; padding: 0 14px; border-radius: 12px; }
textarea.df-ex-input { padding: 12px 14px; border-radius: 12px; resize: vertical; min-height: 64px; line-height: 1.5; }
.df-ex-input::placeholder { color: var(--ds-faint); }
.df-ex-input:focus, .df-ex-select:focus { outline: none; border-color: var(--ds-accent); box-shadow: var(--focus-ring); }
.df-ex-ghost {
  font-family: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 18px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--ds-line-strong); background: var(--ds-surface); color: var(--ds-text2);
}
.df-ex-ghost:hover { background: var(--ds-surface2); }
.df-ex-link { font-family: inherit; background: none; border: 0; padding: 0 4px; min-height: 36px; font-size: 14px; font-weight: 600; color: var(--ds-accent-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.df-ex-link.center { align-self: center; min-height: 40px; }
.df-ex-mini { font-family: inherit; font-size: 13px; font-weight: 600; min-height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--ds-line-strong); background: var(--ds-surface); color: var(--ds-text2); cursor: pointer; }
.df-ex-mini.warn { color: var(--ds-warn); border-color: var(--x-warn-line); }
.df-ex-mini:hover { background: var(--ds-surface2); }
.df-ex-bar { height: 8px; border-radius: 4px; background: var(--ds-line2); overflow: hidden; }
.df-ex-bar-fill { height: 100%; border-radius: 4px; background: var(--ds-accent); }
.df-ex-av { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; font-weight: 700; color: #1E1F3B; }
.df-ex-av.out { background: var(--ds-line2); color: var(--ds-text2); }

/* ---------------- X1 ข้อมูลของฉัน ---------------- */
.df-ex-row1, .df-ex-row2 { display: flex; flex-wrap: wrap; gap: 16px; }
.df-ex-money {
  flex: 2 1 420px; min-width: 0; background: var(--ds-tint); border: 1px solid var(--ds-tint-line); border-radius: 20px; padding: 24px;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; box-sizing: border-box;
}
.df-ex-money-main, .df-ex-money-rate { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.df-ex-money-rate { gap: 8px; }
.df-ex-money .df-ex-mut:first-child { font-size: 14px; }
.df-ex-big { font-size: 44px; font-weight: 700; line-height: 1; color: var(--ds-text); }
.df-ex-line { font-size: 14px; color: var(--ds-text); }
.df-ex-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.df-ex-pills span { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: var(--ds-surface); color: var(--ds-text); }
.df-ex-cuts { flex: 1 1 260px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.df-ex-cut { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.df-ex-cut b { font-size: 22px; font-weight: 700; color: var(--ds-text); }
.df-ex-qcard {
  flex: 1 1 300px; min-width: 0; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 20px; padding: 22px;
  display: flex; flex-direction: column; gap: 14px; box-sizing: border-box;
}
.df-ex-qhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.df-ex-qhead h2 { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.df-ex-qrow { display: flex; flex-direction: column; gap: 6px; }
.df-ex-qtop { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--ds-text); }
.df-ex-qtop strong { font-weight: 700; white-space: nowrap; }
.df-ex-qnote { font-size: 13px; font-weight: 600; color: var(--ds-warn); }
.df-ex-qnote.ok { color: var(--ds-ok); }
.df-ex-qnote.mut { color: var(--ds-muted); font-weight: 400; }
.df-ex-bonus { border-color: var(--ds-tint-line); gap: 10px; }
.df-ex-bonus .df-ex-qhead h2 { min-height: 40px; }
.df-ex-badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--ds-hol-bg); color: var(--ds-hol-fg); white-space: nowrap; }
.df-ex-badge.ok { background: var(--ds-leave-bg); color: var(--ds-leave-fg); }
.df-ex-bonus-t { font-size: 15px; color: var(--ds-text); }
.df-ex-hist { gap: 12px; }
.df-ex-hhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.df-ex-hhead .df-ex-select { min-height: 40px; padding: 0 10px; border-radius: 10px; }
.df-ex-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 0; text-align: center; }
.df-ex-empty b { font-size: 16px; font-weight: 600; }
.df-ex-empty span { font-size: 14px; color: var(--ds-muted); }
.df-ex-hlist { display: flex; flex-direction: column; }
.df-ex-hrow {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) 84px 100px 236px; gap: 14px; align-items: center;
  padding: 12px 4px; border-top: 1px solid var(--ds-line2); font-size: 14px;
}
.df-ex-hrow:first-child { border-top: 0; }
.df-ex-datebox { width: 52px; height: 52px; border-radius: 14px; background: var(--ds-tint); color: var(--ds-accent-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.df-ex-datebox b { font-size: 18px; font-weight: 700; }
.df-ex-datebox span { font-size: 11px; }
.df-ex-hrow.rej .df-ex-datebox { background: var(--ds-line2); color: var(--ds-muted); }
.df-ex-hmain { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.df-ex-htitle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.df-ex-htitle .df-tchip { font-size: 12px; padding: 2px 10px 2px 6px; }
.df-ex-hsub { font-size: 13px; color: var(--ds-muted); overflow-wrap: anywhere; }
.df-ex-rej { font-size: 13px; color: var(--ds-warn); background: var(--ds-warn-bg); border-radius: 10px; padding: 6px 10px; }
.df-ex-hmoney { font-size: 16px; font-weight: 700; text-align: right; }
.df-ex-hmoney.strike { color: var(--ds-faint); text-decoration: line-through; }
.df-ex-hstat { display: flex; justify-content: flex-start; }
.df-ex-hact { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }

/* ---------------- X2 ยื่นเบิก ---------------- */
.df-ex-newgrid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.df-ex-form { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.df-ex-form .df-card { padding: 24px; gap: 14px; }
.df-ex-form .df-card + .df-card { gap: 16px; }
.df-ex-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.df-ex-type {
  font-family: inherit; text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; min-height: 96px;
  border-radius: 14px; cursor: pointer; color: var(--ds-text); background: var(--ds-surface); border: 2px solid var(--ds-line);
}
.df-ex-type:hover { border-color: var(--ds-line-strong); }
.df-ex-type.on { background: var(--ds-tint); border-color: var(--ds-accent); }
.df-ex-type .df-tile { margin-bottom: 4px; }
.df-ex-type-n { font-size: 16px; font-weight: 600; }
.df-ex-type-m { font-size: 22px; font-weight: 700; }
.df-ex-type-q { font-size: 13px; color: var(--ds-muted); }
.df-ex-type-q.full { color: var(--ds-warn); font-weight: 600; }
.df-ex-fields { display: flex; flex-wrap: wrap; gap: 14px; }
.df-ex-f { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ds-text); min-width: 0; }
.df-ex-f.grow2 { flex: 2 1 260px; }
.df-ex-f.grow1 { flex: 1 1 180px; }
.df-ex-req { font-weight: 400; color: var(--ds-warn); }
.df-ex-opt { font-weight: 400; color: var(--ds-muted); }
.df-ex-group { display: flex; flex-direction: column; gap: 10px; background: var(--ds-bg); border-radius: 14px; padding: 16px; }
.df-ex-ghead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 15px; font-weight: 600; }
.df-ex-gnote { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--ds-warn-bg); color: var(--x-warn-fg); }
.df-ex-gnote.ok { background: var(--ds-leave-bg); color: var(--ds-leave-fg); }
.df-ex-chosen { display: flex; flex-wrap: wrap; gap: 8px; }
.df-ex-mchip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 4px 4px 6px; border-radius: 999px; box-sizing: border-box;
  background: var(--ds-surface); border: 2px solid var(--ds-accent);
}
.df-ex-mchip.me { padding-right: 14px; }
.df-ex-mchip.out { border-style: dashed; border-color: var(--ds-line-strong); }
.df-ex-mtxt { display: flex; flex-direction: column; line-height: 1.25; }
.df-ex-mtxt b { font-size: 14px; font-weight: 600; }
.df-ex-mtxt small, .df-ex-ptxt small { font-size: 11px; color: var(--ds-muted); }
.df-ex-mx { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--ds-muted); font-size: 18px; cursor: pointer; }
.df-ex-mx:hover { background: var(--ds-line2); color: var(--ds-text); }
.df-ex-pick { display: flex; flex-direction: column; gap: 8px; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 12px; padding: 14px; }
.df-ex-pick.dashed { border: 1px dashed var(--ds-line-strong); }
.df-ex-pick-h { font-size: 14px; font-weight: 600; }
.df-ex-pick-h span { font-weight: 400; color: var(--ds-muted); }
.df-ex-people { display: flex; flex-wrap: wrap; gap: 8px; }
.df-ex-person {
  font-family: inherit; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 6px; border-radius: 999px;
  color: var(--ds-text); background: var(--ds-surface); border: 1px solid var(--ds-line-strong); cursor: pointer;
}
.df-ex-person:hover:not(:disabled) { border-color: var(--ds-accent); }
.df-ex-person:disabled { background: var(--ds-surface2); border-color: var(--ds-line2); opacity: .55; cursor: not-allowed; }
.df-ex-ptxt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.df-ex-extrow { display: flex; flex-wrap: wrap; gap: 8px; }
.df-ex-extrow .df-ex-input { flex: 2 1 160px; width: auto; }
.df-ex-extrow .df-ex-input:first-child { flex-basis: 180px; }
.df-ex-extadd { font-family: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 0; background: var(--ds-text); color: var(--x-ink-on-text); cursor: pointer; }
.df-ex-extadd:disabled { border: 1px solid var(--ds-line-strong); background: var(--ds-bg); color: var(--ds-faint); cursor: not-allowed; }
.df-ex-sum { flex: 1 1 300px; gap: 14px; padding: 24px; position: sticky; top: 20px; }
.df-ex-sumbox { background: var(--ds-tint); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.df-ex-sumbig { font-size: 32px; font-weight: 700; line-height: 1.25; }
.df-ex-sumlist { margin: 0; padding: 0 0 0 18px; font-size: 14px; line-height: 1.8; color: var(--ds-text2); }
.df-ex-alert { border-radius: 12px; padding: 10px 14px; font-size: 14px; line-height: 1.55; }
.df-ex-alert.warn { background: var(--ds-hol-bg); color: var(--ds-hol-fg); }
.df-ex-alert.err { background: var(--ds-warn-bg); color: var(--x-warn-fg); border: 1px solid var(--x-warn-line); }
.df-ex-send { font-family: inherit; font-size: 16px; font-weight: 600; min-height: 52px; border-radius: 14px; border: 0; background: var(--ds-accent); color: #FFFFFF; cursor: pointer; box-shadow: 0 8px 18px var(--ds-shadow); }
.df-ex-send:hover:not(:disabled) { background: var(--ds-accent-hover); }
.df-ex-send:disabled { background: var(--ds-line-strong); color: var(--ds-muted); cursor: not-allowed; box-shadow: none; }
.df-ex-cancel { font-family: inherit; background: none; border: 0; min-height: 44px; font-size: 14px; color: var(--ds-accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* the legacy form stays mounted (hidden) while this page drives it */
#modal-ex-form.df-ex-driven { display: none !important; }

/* ---------------- tabs (X3 + review) ---------------- */
.df-ex-tabrow { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.df-ex-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.df-ex-tab {
  font-family: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; background: var(--ds-surface); color: var(--ds-text2); border: 1px solid var(--ds-line-strong);
}
.df-ex-tab span { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--ds-line2); }
.df-ex-tab.on { background: var(--ds-text); color: var(--x-ink-on-text); border-color: var(--ds-text); }
.df-ex-tab.on span { background: rgba(255, 255, 255, .2); }
html[data-theme="dark"] .df-ex-tab.on span { background: rgba(16, 17, 28, .14); }
.df-ex-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ds-text2); min-height: 44px; cursor: pointer; }
.df-ex-check input { width: 20px; height: 20px; accent-color: var(--ds-accent-ink); margin: 0; }
.df-ex-blank { padding: 48px 24px !important; align-items: center; text-align: center; gap: 10px !important; }
.df-ex-blank h2 { font-size: 20px; font-weight: 600; }
.df-ex-blank p { margin: 0; font-size: 15px; color: var(--ds-muted); }
.df-ex-blank-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--ds-tint); color: var(--ds-accent); display: flex; align-items: center; justify-content: center; }
.df-ex-blank .df-ex-ghost { color: var(--ds-accent); }

/* ---------------- X3 แชร์กิจกรรม ---------------- */
.df-ex-count { font-size: 14px; margin-bottom: -6px; }
.df-ex-sgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.df-ex-scard { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.df-ex-shead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.df-ex-stext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.df-ex-stext h2 { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.df-ex-stext > .df-ex-mut:last-child { font-size: 14px; }
.df-ex-sbadge { font-size: 12px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: var(--ds-leave-bg); color: var(--ds-leave-fg); }
.df-ex-sbadge.full { background: var(--ds-tint); color: var(--ds-accent-ink); }
.df-ex-sbadge.lock { background: var(--ds-line2); color: var(--ds-muted); }
.df-ex-sbadge.no { background: var(--ds-warn-bg); color: var(--x-warn-fg); }
.df-ex-slots { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.df-ex-slots > .df-ex-mut { font-size: 14px; margin-left: 4px; }
.df-ex-slot { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; background: #F8DFD3; color: #1E1F3B; box-sizing: border-box; }
.df-ex-slot.me { background: #DAD8FF; box-shadow: 0 0 0 2px var(--ds-surface), 0 0 0 4px var(--ds-accent); }
.df-ex-slot.out { background: var(--ds-line2); color: var(--ds-text2); }
.df-ex-slot.empty { background: transparent; border: 2px dashed var(--ds-line-strong); color: var(--ds-faint); font-weight: 400; }
.df-ex-snames { font-size: 13px; color: var(--ds-muted); margin-top: -6px; overflow-wrap: anywhere; }
.df-ex-snote { font-size: 13px; color: var(--ds-text2); background: var(--ds-bg); border-radius: 10px; padding: 8px 12px; }
.df-ex-join, .df-ex-leave, .df-ex-off {
  font-family: inherit; font-size: 15px; font-weight: 600; min-height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
}
.df-ex-join { border: 0; background: var(--ds-accent); color: #FFFFFF; cursor: pointer; }
.df-ex-join:hover { background: var(--ds-accent-hover); }
.df-ex-leave { border: 1px solid var(--x-warn-line); background: var(--ds-surface); color: var(--ds-warn); cursor: pointer; }
.df-ex-off { border: 1px solid var(--ds-line); background: var(--ds-surface2); color: var(--ds-faint); }
.df-ex-scard .df-ex-link.center { margin-top: -8px; font-size: 13px; }

/* ---------------- X4 Leaderboard ---------------- */
.df-ex-lbgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.df-ex-lbcard { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.df-ex-lbhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.df-ex-lbhead h2 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.df-ex-lbhead .df-ex-mut { white-space: nowrap; }
.df-ex-lbrows { display: flex; flex-direction: column; max-height: 312px; overflow-y: auto; }
.df-ex-lbrow { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--ds-line2); }
.df-ex-lbrow.me .df-ex-lbname b { color: var(--ds-accent-ink); }
.df-ex-rank { width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--ds-line2); color: var(--ds-muted); }
.df-ex-rank.r1 { background: #E8B84A; color: #1E1F3B; }
.df-ex-rank.r2 { background: #B9C3C8; color: #1E1F3B; }
.df-ex-rank.r3 { background: #D49A6A; color: #1E1F3B; }
.df-ex-lbname { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.df-ex-lbname b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-ex-lbname small { font-size: 12px; color: var(--ds-muted); }
.df-ex-lbmoney { font-size: 15px; font-weight: 700; }
.df-ex-lbempty { padding: 28px 0; text-align: center; font-size: 14px; color: var(--ds-muted); }
.df-ex-lbtable { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 20px; padding: 20px 0 8px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.df-ex-lbthead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 0 20px; }
.df-ex-lbthead h2 { font-size: 18px; font-weight: 600; }
.df-ex-dchips { display: flex; flex-wrap: wrap; gap: 6px; }
.df-ex-dchip {
  font-family: inherit; font-size: 13px; font-weight: 600; min-height: 36px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  background: var(--ds-surface); color: var(--ds-text2); border: 1px solid var(--ds-line-strong); display: inline-flex; align-items: center; gap: 6px;
}
.df-ex-dchip span { font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--ds-line2); }
.df-ex-dchip.on { background: var(--ds-text); color: var(--x-ink-on-text); border-color: var(--ds-text); }
.df-ex-dchip.on span { background: rgba(255, 255, 255, .2); }
.df-ex-tablewrap { overflow-x: auto; }
.df-ex-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; background: transparent; border: 0; }
.df-ex-table thead tr { background: var(--ds-surface2); }
.df-ex-table th { padding: 0; font-size: 13px; font-weight: 600; color: var(--ds-muted); text-align: left; background: transparent; border: 0; }
.df-ex-table th button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 10px 16px; width: 100%; display: inline-flex; align-items: center; gap: 6px; justify-content: inherit; min-height: 40px; }
.df-ex-table th.r { text-align: right; }
.df-ex-table th.r button { justify-content: flex-end; }
.df-ex-table th:first-child button { padding-left: 20px; justify-content: flex-start; }
.df-ex-table th:last-child button { padding-right: 20px; }
.df-ex-sort { font-size: 10px; opacity: .35; }
.df-ex-sort.on { opacity: 1; color: var(--ds-accent-ink); }
.df-ex-table td { padding: 10px 16px; border-top: 1px solid var(--ds-line2); color: var(--ds-text); background: transparent; text-align: left; }
.df-ex-table td.r { text-align: right; white-space: nowrap; }
.df-ex-table td.b { font-weight: 700; }
.df-ex-table td:first-child { padding-left: 20px; }
.df-ex-table td:last-child { padding-right: 20px; }
.df-ex-table tr.me td { background: var(--ds-tint); }
.df-ex-table tbody tr:hover td { background: var(--ds-surface2); }
.df-ex-table tbody tr.me:hover td { background: var(--ds-tint); }
.df-ex-who { display: flex; align-items: center; gap: 10px; }
.df-ex-who > span:last-child { display: flex; flex-direction: column; }
.df-ex-who b { font-weight: 600; }
.df-ex-who small { font-size: 12px; color: var(--ds-muted); }
.df-ex-lbfoot { padding: 4px 20px 8px; font-size: 13px; color: var(--ds-muted); }

/* ---------------- legacy detail modal (#modal-ex-detail) refinements ---------------- */
#modal-ex-detail .modal.exd-modal { border-radius: 20px; border: 1px solid var(--ds-line); background: var(--ds-surface); box-shadow: var(--shadow-lg); font-family: var(--df-font); }
#modal-ex-detail .exd-title { font-size: 22px; font-weight: 700; }
#modal-ex-detail .exd-week { font-size: 11px; font-weight: 600; border-radius: 999px; }
#modal-ex-detail .exd-sect-title { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; }
#modal-ex-detail .exd-reward-a { font-size: 30px; font-weight: 700; }
#modal-ex-detail .exd-btn { font-family: inherit; border-radius: 12px; min-height: 44px; font-weight: 600; }
#modal-ex-detail .exd-btn-ok { background: var(--ds-accent); }
#modal-ex-detail .exd-btn-ok:hover { background: var(--ds-accent-hover); filter: none; }
#modal-ex-detail .exd-btn-reject, #modal-ex-detail .exd-btn-danger { background: var(--ds-surface); border: 1px solid var(--x-warn-line, #F4D3C6); color: var(--ds-warn); }
#modal-ex-detail .exd-btn-edit { background: var(--ds-surface); border: 1px solid var(--ds-line-strong); color: var(--ds-text2); }
#modal-ex-detail .exd-avatar { color: #1E1F3B; }
html[data-theme="dark"] #modal-ex-detail .exd-btn-reject, html[data-theme="dark"] #modal-ex-detail .exd-btn-danger { border-color: #5A2E1E; }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .df-ex-lbgrid { grid-template-columns: minmax(0, 1fr); }
  .df-ex-sum { position: static; }
}
@media (max-width: 760px) {
  .df-ex { gap: 16px; }
  .df-ex .df-h1 { font-size: 24px; }
  .df-ex .df-ph { padding-right: 0; }
  .df-ex .df-ph-actions { width: 100%; }
  .df-ex .df-ph-actions .df-ex-lbl { flex: 1 1 100%; }
  .df-ex .df-ph-actions .df-ex-lbl .df-ex-select { flex: 1; min-width: 0; }
  .df-ex .df-ph-actions .df-ex-cta { flex: 1 1 100%; justify-content: center; }
  .df-ex .df-card, .df-ex-qcard, .df-ex-money, .df-ex-scard, .df-ex-rcard, .df-ex-lbcard { padding: 16px; }
  .df-ex-form .df-card, .df-ex-sum { padding: 16px; }
  .df-ex-money { flex-basis: 100%; gap: 16px; }
  .df-ex-big { font-size: 38px; }
  .df-ex-cuts { flex-basis: 100%; }
  .df-ex-cut { padding: 14px; border-radius: 16px; }
  .df-ex-cut b { font-size: 19px; }
  .df-ex-qcard { flex-basis: 100%; }
  .df-ex-types, .df-ex-sgrid, .df-ex-rboxes { grid-template-columns: minmax(0, 1fr); }
  .df-ex-type { min-height: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 0; align-items: center; }
  .df-ex-type .df-tile { grid-row: span 2; margin: 0; }
  .df-ex-type-m { grid-row: span 2; grid-column: 3; font-size: 20px; }
  .df-ex-type-n { grid-column: 2; grid-row: 1; }
  .df-ex-type-q { grid-column: 2; grid-row: 2; }
  .df-ex-form, .df-ex-sum { flex-basis: 100%; }
  .df-ex-hrow { grid-template-columns: 52px minmax(0, 1fr) auto; row-gap: 6px; column-gap: 12px; padding: 12px 0; }
  .df-ex-hrow .df-ex-datebox { grid-row: span 3; align-self: start; }
  .df-ex-hmain { grid-column: 2 / 4; }
  .df-ex-hmoney { grid-column: 3; grid-row: 2; text-align: right; }
  .df-ex-hstat { grid-column: 2; grid-row: 2; }
  .df-ex-hact { grid-column: 2 / 4; justify-content: flex-start; }
  .df-ex-rright { flex-basis: 100%; }
  .df-ex-rwho .df-tchip { margin-left: 0; }
  .df-ex-tabrow { align-items: stretch; }
  .df-ex-lbtable { padding-top: 16px; }
  .df-ex-lbthead { padding: 0 16px; }
  .df-ex-extrow .df-ex-extadd { flex: 1 1 100%; }
}
#modal-ex-detail .exd-modal * { font-family: var(--df-font); }
#modal-ex-detail .exd-label { letter-spacing: 0; text-transform: none; font-size: 13px; }
#modal-ex-detail .exd-id, #modal-ex-detail .exd-dept, #modal-ex-detail .exd-dept-pill, #modal-ex-detail .exd-role-pill, #modal-ex-detail .exd-week { letter-spacing: 0; }
#modal-ex-detail .exd-add-wrap { min-height: 44px; border-radius: 12px; padding: 0 6px 0 12px; }
#modal-ex-detail input.exd-add-input, #modal-ex-detail .exd-add-wrap input {
  border: 0 !important; background: transparent !important; box-shadow: none !important; min-height: 40px; height: 40px; padding: 0 4px !important; outline: none;
}
#modal-ex-detail .exd-btn-add { border-radius: 10px; min-height: 40px; font-weight: 600; }
#modal-ex-detail .exd-avatar { background: var(--ds-tint) !important; color: var(--ds-accent-ink); }
.df-ex-bonus-t strong { white-space: nowrap; }

/* ---------------- PM approval · board X5B (list + detail) ---------------- */
.df-ex-xstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.df-ex-xstat { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.df-ex-xstat > div { display: flex; flex-direction: column; min-width: 0; }
.df-ex-xstat span:not(.df-ex-xdot) { font-size: 13px; color: var(--ds-muted); }
.df-ex-xstat b { font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--ds-text); }
.df-ex-xdot { width: 40px; height: 40px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.df-ex-xdot.p { background: var(--ds-tint); color: var(--ds-accent-ink); }
.df-ex-xdot.ok { background: var(--ds-leave-bg); color: var(--ds-leave-fg); }
.df-ex-xdot.w { background: var(--ds-warn-bg); color: var(--x-warn-fg); }
.df-ex-xdot.m { background: var(--ds-hol-bg); color: var(--ds-hol-fg); }
.df-ex-xgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
.df-ex-xlist { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.df-ex-xtools { padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--ds-line2); }
.df-ex-xtabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--ds-surface2); border: 1px solid var(--ds-line); }
.df-ex-xtab { flex: 1; font-family: inherit; font-size: 14px; font-weight: 600; min-height: 40px; padding: 0 8px; border-radius: 10px; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; background: transparent; color: var(--ds-muted); }
.df-ex-xtab span { font-size: 12px; padding: 0 7px; border-radius: 999px; background: var(--ds-line2); }
.df-ex-xtab.on { background: var(--ds-surface); color: var(--ds-text); box-shadow: 0 1px 3px rgba(10, 10, 40, .12); }
.df-ex-xtab.on span { background: var(--ds-tint); color: var(--ds-accent-ink); }
html[data-theme="dark"] .df-ex-xtab.on { background: var(--ds-line2); }
.df-ex-xsearch { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--ds-line-strong); background: var(--ds-surface); color: var(--ds-muted); }
.df-ex-xsearch:focus-within { border-color: var(--ds-accent); box-shadow: var(--focus-ring); }
.df-ex-xsearch input { flex: 1; min-width: 0; border: 0 !important; outline: none; background: transparent !important; box-shadow: none !important; font-family: inherit; font-size: 14px; color: var(--ds-text); padding: 0 !important; min-height: 40px; }
.df-ex-xsearch input::placeholder { color: var(--ds-faint); }
.df-ex-xflts { display: flex; flex-wrap: wrap; gap: 6px; }
.df-ex-xflt { font-family: inherit; font-size: 13px; font-weight: 600; min-height: 34px; padding: 0 12px; border-radius: 999px; cursor: pointer; background: var(--ds-surface); color: var(--ds-text2); border: 1px solid var(--ds-line-strong); }
.df-ex-xflt.on { background: var(--ds-tint); color: var(--ds-accent-ink); border-color: var(--ds-tint-line); }
.df-ex-xflt.chk.on { background: var(--ds-warn-bg); color: var(--x-warn-fg); border-color: var(--x-warn-line); }
.df-ex-xbulk { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--ds-surface2); border-bottom: 1px solid var(--ds-line2); font-size: 14px; min-height: 58px; box-sizing: border-box; }
.df-ex-xbulk label { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; min-width: 0; color: var(--ds-text); }
.df-ex-xbulk input, .df-ex-xrow input { width: 18px; height: 18px; flex: none; accent-color: var(--ds-accent); margin: 0; cursor: pointer; }
.df-ex-xrow input:disabled { cursor: not-allowed; opacity: .45; }
.df-ex-xbulkbtn { font-family: inherit; font-size: 14px; font-weight: 600; min-height: 38px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--ds-accent); color: #FFFFFF; cursor: pointer; }
.df-ex-xrows { display: flex; flex-direction: column; }
.df-ex-xrow { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 13px; cursor: pointer; border-top: 1px solid var(--ds-line2); border-left: 3px solid transparent; }
.df-ex-xrows .df-ex-xrow:first-child { border-top: 0; }
.df-ex-xrow:hover { background: var(--ds-surface2); }
.df-ex-xrow.sel { background: var(--ds-tint); border-left-color: var(--ds-accent); }
.df-ex-xmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.df-ex-xname { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ds-text); }
.df-ex-xname span { font-weight: 400; color: var(--ds-muted); }
.df-ex-xact { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ds-text2); min-width: 0; }
.df-ex-xact .df-tile { border-radius: 6px; }
.df-ex-xact > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.df-ex-xside { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.df-ex-xside b { font-size: 15px; font-weight: 700; color: var(--ds-text); }
.df-ex-xflag { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.df-ex-xflag.ok { background: var(--ds-leave-bg); color: var(--ds-leave-fg); }
.df-ex-xflag.no { background: var(--ds-warn-bg); color: var(--x-warn-fg); }
.df-ex-xempty { padding: 40px 20px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.df-ex-xempty strong { font-size: 16px; font-weight: 600; }
.df-ex-xempty span:last-child { font-size: 14px; color: var(--ds-muted); }
.df-ex-xdetail { position: sticky; top: 16px; max-height: calc(100vh - 32px); background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.df-ex-xbody { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; flex: 1; min-height: 0; }
.df-ex-xwho { display: flex; align-items: center; gap: 12px; }
.df-ex-xwho > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.df-ex-xwho b { font-size: 17px; font-weight: 700; }
.df-ex-xwho span { font-size: 13px; color: var(--ds-muted); overflow-wrap: anywhere; }
.df-ex-xwho .df-tchip { align-self: flex-start; margin-top: 6px; }
.df-ex-xtitle { display: flex; flex-direction: column; gap: 2px; }
.df-ex-xtitle > b { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.df-ex-xmeta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--ds-text2); }
.df-ex-xmeta strong { font-weight: 700; color: var(--ds-text); }
.df-ex-xmeta em { font-style: normal; color: var(--ds-muted); }
.df-ex-xnote { font-size: 14px; color: var(--ds-muted); }
.df-ex-xproof { display: flex; flex-direction: column; gap: 8px; }
.df-ex-xclip { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 5.5; border-radius: 16px; background: linear-gradient(135deg, #2B2D52, #4A4C8C); color: #FFFFFF !important; text-decoration: none; overflow: hidden; min-height: 120px; }
.df-ex-xclip:hover .df-ex-xplay { background: rgba(255, 255, 255, .28); }
.df-ex-xclip:focus-visible { outline: 3px solid var(--ds-accent); outline-offset: 2px; }
.df-ex-xplay { width: 60px; height: 60px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; }
.df-ex-xcliplbl { position: absolute; left: 14px; bottom: 12px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .35); }
.df-ex-xdom { position: absolute; right: 14px; top: 12px; font-size: 12px; opacity: .75; }
.df-ex-xclips { display: flex; flex-wrap: wrap; gap: 6px; }
.df-ex-xclips button { font-family: inherit; font-size: 13px; font-weight: 600; min-height: 34px; padding: 0 12px; border-radius: 10px; cursor: pointer; background: var(--ds-surface); color: var(--ds-text2); border: 1px solid var(--ds-line-strong); }
.df-ex-xclips button.on { background: var(--ds-text); color: var(--ds-surface); border-color: var(--ds-text); }
.df-ex-xnoproof { display: flex; align-items: center; justify-content: center; gap: 10px; aspect-ratio: 16 / 5.5; min-height: 100px; border-radius: 16px; border: 2px dashed var(--x-warn-line); background: var(--ds-warn-bg); color: var(--x-warn-fg); font-size: 15px; font-weight: 600; }
.df-ex-xsub { font-size: 13px; font-weight: 600; color: var(--ds-muted); }
.df-ex-xmembers { display: flex; flex-direction: column; gap: 8px; }
.df-ex-xmembers > div { display: flex; flex-wrap: wrap; gap: 6px; }
.df-ex-xmem { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 3px; border-radius: 999px; font-size: 13px; font-weight: 500; border: 1px solid var(--ds-line); background: var(--ds-surface2); color: var(--ds-text2); }
.df-ex-xmem.out { border: 1px dashed var(--ds-hol); background: var(--ds-hol-bg); color: var(--ds-hol-fg); }
.df-ex-xchecks { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--ds-line); border-radius: 14px; padding: 6px 14px; }
.df-ex-xchecks .df-ex-xsub { padding: 6px 0 4px; }
.df-ex-xck { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--ds-line2); font-size: 14px; }
.df-ex-xckdot { width: 22px; height: 22px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--ds-leave-bg); color: var(--ds-leave-fg); }
.df-ex-xckdot.no { background: var(--ds-warn); color: #FFFFFF; }
.df-ex-xcklbl { flex: 1; min-width: 0; }
.df-ex-xckval { font-size: 13px; font-weight: 600; color: var(--ds-muted); text-align: right; }
.df-ex-xckval.no { color: var(--ds-warn); }
.df-ex-xrejbox { font-size: 14px; background: var(--ds-warn-bg); color: var(--x-warn-fg); border-radius: 12px; padding: 10px 12px; }
.df-ex-xprev { font-size: 14px; background: var(--ds-hol-bg); color: var(--ds-hol-fg); border-radius: 12px; padding: 10px 12px; }
.df-ex-xrejbox strong, .df-ex-xprev strong { font-weight: 600; }
.df-ex-xbody > .df-ex-link { align-self: flex-start; font-size: 13px; padding: 0; }
.df-ex-xfoot { padding: 14px 20px; border-top: 1px solid var(--ds-line); background: var(--ds-surface2); display: flex; flex-direction: column; gap: 10px; }
.df-ex-xwarn { font-size: 13px; color: var(--x-warn-fg); }
.df-ex-xwarn.b { font-weight: 600; }
.df-ex-xbtns { display: flex; gap: 10px; }
.df-ex-xbtns button { font-family: inherit; font-size: 15px; font-weight: 600; min-height: 48px; border-radius: 12px; cursor: pointer; }
.df-ex-xrej { flex: 1; border: 1px solid var(--x-warn-line); background: var(--ds-surface); color: var(--ds-warn); }
.df-ex-xrej.strong { border: 0; background: var(--ds-warn); color: #FFFFFF; }
.df-ex-xok { flex: 2; border: 0; background: var(--ds-accent); color: #FFFFFF; }
.df-ex-xok:hover { background: var(--ds-accent-hover); }
.df-ex-xok.soft { border: 1px solid var(--ds-line-strong); background: var(--ds-surface); color: var(--ds-text2); }
.df-ex-xcancel { flex: 1; font-family: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--ds-line-strong); background: var(--ds-surface); color: var(--ds-text2); cursor: pointer; }
.df-ex-xconfirm { flex: 1; border: 0; background: var(--ds-warn); color: #FFFFFF; }
.df-ex-xconfirm:disabled { background: var(--ds-line-strong); color: var(--ds-muted); cursor: not-allowed; }
.df-ex-xquick { display: flex; flex-wrap: wrap; gap: 6px; }
.df-ex-xquick button { font-family: inherit; font-size: 13px; font-weight: 500; min-height: 34px; padding: 0 12px; border-radius: 999px; cursor: pointer; background: var(--ds-surface); color: var(--ds-text2); border: 1px solid var(--ds-line-strong); }
.df-ex-xquick button.on { background: var(--ds-warn-bg); color: var(--x-warn-fg); border-color: var(--x-warn-line); }
.df-ex-xreason { font-family: inherit; font-size: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--x-warn-line); background: var(--ds-surface); color: var(--ds-text); resize: vertical; min-height: 60px; }
.df-ex-xclosed { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.df-ex-xclosed > span { flex: 1; font-size: 14px; font-weight: 600; }
.df-ex-xclosed .ok { color: var(--ds-leave-fg); }
.df-ex-xclosed .no { color: var(--x-warn-fg); }
.df-ex-xclosed .df-ex-xcancel { flex: none; }
@media (max-width: 1100px) { .df-ex-xstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .df-ex-xgrid { grid-template-columns: minmax(0, 1fr); }
  .df-ex-xdetail { position: static; max-height: none; }
}
@media (max-width: 760px) {
  .df-ex-xstats { gap: 10px; }
  .df-ex-xstat { padding: 12px; align-items: flex-start; }
  .df-ex-xstat b { font-size: 20px; }
  .df-ex-xtools { padding: 12px; }
  .df-ex-xrow { padding: 12px 12px 12px 9px; }
  .df-ex-xbody { padding: 16px; }
  .df-ex-xfoot { padding: 12px 16px; }
  .df-ex-xwho { flex-wrap: wrap; }
}
.df-ex .df-ex-xsearch input.df-ex-xq:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.date-part):not(.date-native),
.df-ex .df-ex-xsearch input.df-ex-xq:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.date-part):not(.date-native):hover,
.df-ex .df-ex-xsearch input.df-ex-xq:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.date-part):not(.date-native):focus {
  border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; min-height: 40px !important; outline: none !important; -webkit-appearance: none; appearance: none;
}
.df-ex .df-ex-xbulk label { font-size: 14px; font-weight: 400; margin: 0; text-transform: none; letter-spacing: 0; }
@media (max-width: 760px) {
  .df-ex-xwho > div { flex-basis: calc(100% - 64px); }
  .df-ex-xwho .df-tchip { margin: 0 0 0 64px; }
  .df-ex-xwho span { overflow-wrap: normal; }
}
.df-ex-xallok { background: var(--ds-ok-bg); border-color: transparent; }
.df-ex-xallok .df-ex-xck { border-top: 0; }
.df-ex-xallok .df-ex-xcklbl { color: var(--ds-ok); font-weight: 600; }

/* ---------------- X3B แชร์กิจกรรม · list + side form ---------------- */
.df-ex-sstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 20px; padding: 18px 22px; }
.df-ex-ssq { display: flex; align-items: center; gap: 14px; flex: 1 1 260px; min-width: 0; }
.df-ex-ssq > div { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.df-ex-ssq > div > span, .df-ex-ssk > span { font-size: 14px; color: var(--ds-muted); }
.df-ex-ssbar { display: flex; align-items: center; gap: 10px; }
.df-ex-ssbar > div { display: flex; gap: 4px; flex: 1; max-width: 220px; }
.df-ex-ssbar > div span { flex: 1; height: 10px; border-radius: 999px; background: var(--ds-line2); }
.df-ex-ssbar > div span.on { background: var(--ds-accent); }
.df-ex-ssbar strong { font-size: 16px; font-weight: 700; white-space: nowrap; }
.df-ex-ssk { display: flex; flex-direction: column; gap: 2px; flex: 0 1 auto; }
.df-ex-ssk strong { font-size: 16px; font-weight: 700; color: var(--ds-accent-ink); }
.df-ex-ssk strong.ok { color: var(--ds-leave-fg); }
.df-ex-ssk strong.plain { color: var(--ds-text); }
.df-ex-ssk strong.df-ex-ssmut { color: var(--ds-muted); font-weight: 600; }
.df-ex-sgrid2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.df-ex-slist { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.df-ex-stools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.df-ex-stabs { background: var(--ds-surface); }
.df-ex-stabs .df-ex-xtab { flex: none; padding: 0 14px; }
.df-ex-stabs .df-ex-xtab.on { background: var(--ds-text); color: var(--ds-surface); box-shadow: none; }
.df-ex-stabs .df-ex-xtab.on span { background: rgba(128, 128, 160, .35); color: inherit; }
.df-ex-swks { display: flex; flex-wrap: wrap; gap: 6px; }
.df-ex-swks .df-ex-xflt { border-radius: 10px; min-height: 36px; padding: 0 10px; }
.df-ex-scard2 { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 20px; padding: 16px; display: flex; gap: 16px; min-width: 0; }
.df-ex-scard2.me { border-color: var(--ds-tint-line); box-shadow: inset 3px 0 0 var(--ds-accent); }
.df-ex-scard2.closed { opacity: .85; }
.df-ex-sdate { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; border-radius: 14px; background: var(--ds-surface2); border: 1px solid var(--ds-line2); }
.df-ex-sdate span { font-size: 12px; font-weight: 600; color: var(--ds-muted); }
.df-ex-sdate span:last-child { font-weight: 400; }
.df-ex-sdate b { font-size: 24px; font-weight: 700; line-height: 1.15; }
.df-ex-smain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.df-ex-stop { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
.df-ex-stxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 200px; }
.df-ex-skind { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ds-muted); }
.df-ex-skind .df-tile { border-radius: 6px; }
.df-ex-stxt h2 { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.df-ex-sby { font-size: 13px; color: var(--ds-muted); overflow-wrap: anywhere; }
.df-ex-spill { flex: none; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--ds-tint); color: var(--ds-accent-ink); }
.df-ex-spill.full { background: var(--ds-hol-bg); color: var(--ds-hol-fg); }
.df-ex-spill.done { background: var(--ds-leave-bg); color: var(--ds-leave-fg); }
.df-ex-spill.no { background: var(--ds-warn-bg); color: var(--x-warn-fg); }
.df-ex-sbottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.df-ex-sppl { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 200px; }
.df-ex-sppl > span { font-size: 13px; color: var(--ds-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.df-ex-seats { display: flex; align-items: center; flex: none; }
.df-ex-seat { box-sizing: border-box; border: 2px solid var(--ds-surface); }
.df-ex-seat + .df-ex-seat { margin-left: -8px; }
.df-ex-seat.me { box-shadow: 0 0 0 2px var(--ds-accent); position: relative; z-index: 1; }
.df-ex-seat.out { background: var(--ds-line2) !important; color: var(--ds-text2); }
.df-ex-seat.empty { background: var(--ds-surface2); color: var(--ds-faint); border: 2px dashed var(--ds-line-strong); font-weight: 400; }
.df-ex-sacts { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.df-ex-sacts .df-ex-link { font-size: 13px; }
.df-ex-shint { font-size: 12px; color: var(--x-warn-fg); white-space: nowrap; }
.df-ex-sbtn { font-family: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 18px; border-radius: 12px; cursor: pointer; border: 1px solid var(--ds-line-strong); background: var(--ds-surface); color: var(--ds-text2); }
.df-ex-sbtn.primary { border: 0; background: var(--ds-accent); color: #FFFFFF; }
.df-ex-sbtn.primary:hover:not(:disabled) { background: var(--ds-accent-hover); }
.df-ex-sbtn:disabled { border: 1px solid var(--ds-line); background: var(--ds-line2); color: var(--ds-faint); cursor: not-allowed; }
.df-ex-soff { font-size: 13px; font-weight: 600; color: var(--ds-muted); }
.df-ex-sempty { background: var(--ds-surface); border: 1px dashed var(--ds-line-strong); border-radius: 20px; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.df-ex-sempty strong { font-size: 17px; font-weight: 600; }
.df-ex-sempty span { font-size: 14px; color: var(--ds-muted); }
.df-ex-sside { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.df-ex-sform { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.df-ex-sform h2 { font-size: 18px; font-weight: 600; }
.df-ex-stypes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.df-ex-stype { font-family: inherit; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; border-radius: 14px; cursor: pointer; text-align: left; color: var(--ds-text); background: var(--ds-surface); border: 2px solid var(--ds-line); }
.df-ex-stype.on { background: var(--ds-tint); border-color: var(--ds-accent); }
.df-ex-stype > span:last-child { display: flex; flex-direction: column; align-items: flex-start; }
.df-ex-stype b { font-size: 14px; font-weight: 600; }
.df-ex-stype small { font-size: 12px; color: var(--ds-muted); }
.df-ex-sf { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ds-muted); margin: 0; }
.df-ex-sf .df-ex-input { font-size: 15px; min-height: 44px; background: var(--ds-surface); }
.df-ex-select.sf { width: 100%; background-color: var(--ds-surface); }
.df-ex-sideas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.df-ex-sidea { font-family: inherit; font-size: 13px; min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--ds-line-strong); background: var(--ds-surface2); color: var(--ds-text2); cursor: pointer; }
.df-ex-sidea:hover { border-color: var(--ds-accent); }
.df-ex-sfrs { display: flex; flex-wrap: wrap; gap: 6px; }
.df-ex-sfr { font-family: inherit; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px 0 4px; border-radius: 999px; font-size: 13px; font-weight: 400; cursor: pointer; background: var(--ds-surface); color: var(--ds-text2); border: 1px solid var(--ds-line-strong); }
.df-ex-sfr.on { background: var(--ds-tint); color: var(--ds-accent-ink); border-color: var(--ds-accent); font-weight: 600; }
.df-ex-sfr:disabled { opacity: .5; cursor: not-allowed; background: var(--ds-surface2); }
.df-ex-sfr.out { cursor: default; border-style: dashed; padding: 0 10px; }
.df-ex-sform .df-ex-send { min-height: 48px; font-size: 15px; }
.df-ex-sform .df-ex-link.center { font-size: 13px; margin-top: -6px; }
.df-ex-show { background: var(--ds-tint); border: 1px solid var(--ds-tint-line); border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ds-text); }
.df-ex-show strong { font-weight: 600; color: var(--ds-accent-ink); }
@media (max-width: 1100px) {
  .df-ex-sgrid2 { grid-template-columns: minmax(0, 1fr); }
  .df-ex-sside { position: static; }
}
@media (max-width: 760px) {
  .df-ex-sstrip { padding: 16px; gap: 12px 20px; }
  .df-ex-stabs { width: 100%; box-sizing: border-box; }
  .df-ex-stabs .df-ex-xtab { flex: 1; padding: 0 6px; }
  .df-ex-scard2 { padding: 14px; gap: 12px; }
  .df-ex-sdate { width: 54px; }
  .df-ex-sacts { width: 100%; justify-content: flex-start; }
  .df-ex-sacts .df-ex-sbtn { flex: 1; }
}
html[data-theme="dark"] .df-ex-stabs .df-ex-xtab.on { background: var(--ds-text); color: var(--ds-surface); }

/* ---------------- X2 v2 · numbered steps + cycle calendar ---------------- */
.df-ex-step { display: flex; align-items: center; gap: 10px; }
.df-ex-stepn { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--ds-accent); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.df-ex-step h2 { font-size: 18px; font-weight: 600; }
.df-ex-types2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.df-ex-type2 { font-family: inherit; text-align: left; display: flex; align-items: center; gap: 12px; padding: 8px 12px; min-height: 60px; border-radius: 14px; cursor: pointer; color: var(--ds-text); background: var(--ds-surface); border: 2px solid var(--ds-line); min-width: 0; }
.df-ex-type2:hover { border-color: var(--ds-line-strong); }
.df-ex-type2.on { background: var(--ds-tint); border-color: var(--ds-accent); }
.df-ex-type2-t { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.df-ex-type2-n { font-size: 15px; font-weight: 600; }
.df-ex-type2-n b { font-weight: 700; color: var(--ds-accent-ink); }
.df-ex-type2 .df-ex-type-q { font-size: 12px; }
.df-ex-calhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.df-ex-calhead > div:first-child { display: flex; flex-direction: column; }
.df-ex-calhead b { font-size: 16px; font-weight: 600; }
.df-ex-calhead span { font-size: 13px; color: var(--ds-muted); }
.df-ex-calq, .df-ex-calnav { display: flex; flex-wrap: wrap; gap: 6px; }
.df-ex-calnav { padding-right: 6px; margin-right: 2px; border-right: 1px solid var(--ds-line); }
.df-ex-qd { font-family: inherit; font-size: 13px; font-weight: 600; min-height: 36px; padding: 0 12px; border-radius: 10px; cursor: pointer; background: var(--ds-surface); color: var(--ds-text2); border: 1px solid var(--ds-line-strong); }
.df-ex-qd.on { background: var(--ds-tint); color: var(--ds-accent-ink); border-color: var(--ds-tint-line); }
.df-ex-qd:disabled { color: var(--ds-faint); cursor: not-allowed; background: var(--ds-surface2); }
.df-ex-calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.df-ex-calw { text-align: center; font-size: 13px; color: var(--ds-muted); }
.df-ex-cal {
  font-family: inherit; min-height: 48px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 15px; font-weight: 600; border: 2px solid transparent; background: var(--ds-bg); color: var(--ds-text); cursor: pointer; padding: 2px; min-width: 0;
}
.df-ex-cal small { font-size: 11px; font-weight: 600; line-height: 1.1; min-height: 0; }
.df-ex-cal small:empty { display: none; }
.df-ex-cal:hover:not(:disabled) { border-color: var(--ds-tint-line); }
.df-ex-cal.out { background: transparent; color: var(--ds-line-strong); cursor: default; }
.df-ex-cal.future, .df-ex-cal.locked { background: transparent; color: var(--ds-faint); cursor: not-allowed; }
.df-ex-cal.claimed { background: var(--ds-leave-bg); color: var(--ds-leave-fg); cursor: not-allowed; }
.df-ex-cal.today { border-color: var(--ds-line-strong); }
.df-ex-cal.sel { background: var(--ds-accent); color: #FFFFFF; border-color: var(--ds-accent); cursor: default; }
.df-ex-cal:disabled { opacity: 1; }
.df-ex-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ds-muted); }
.df-ex-legend span { display: flex; align-items: center; gap: 6px; }
.df-ex-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-sizing: border-box; }
.df-ex-legend i.sel { background: var(--ds-accent); }
.df-ex-legend i.claimed { background: var(--ds-leave); }
.df-ex-legend i.today { border: 1.5px solid var(--ds-line-strong); }
.df-ex-wkbox { font-size: 14px; border-radius: 12px; padding: 10px 14px; background: var(--ds-tint); color: var(--ds-accent-ink); }
.df-ex-wkbox.full { background: var(--ds-warn-bg); color: var(--x-warn-fg); }
.df-ex-new .df-ex-sum { position: sticky; top: 16px; align-self: flex-start; }
@media (max-width: 760px) {
  .df-ex-types2 { grid-template-columns: minmax(0, 1fr); }
  .df-ex-calgrid { gap: 3px; }
  .df-ex-cal { min-height: 44px; font-size: 13px; border-radius: 8px; padding: 2px 0; }
  .df-ex-cal small { font-size: 9px; }
  .df-ex-new .df-ex-sum { position: static; }
}

/* ---------- proof upload → Google Drive ---------- */
.df-ex-proof { display: flex; flex-direction: column; gap: 10px; }
.df-ex-prooflbl { font-size: 14px; font-weight: 600; color: var(--ds-text); }
.df-ex-up { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; border-radius: 14px; padding: 14px 16px; font-family: inherit; text-align: left; }
.df-ex-up.drop { cursor: pointer; border: 2px dashed var(--ds-tint-line); background: var(--ds-tint); color: var(--ds-accent-ink); min-height: 72px; }
.df-ex-up.drop:hover, .df-ex-up.drop:focus-visible { border-color: var(--ds-accent); }
.df-ex-up.drop svg { flex: none; }
.df-ex-up.drop span { display: flex; flex-direction: column; gap: 2px; }
.df-ex-up.drop b { font-size: 15px; }
.df-ex-up.drop small { font-size: 12px; font-weight: 400; color: var(--ds-muted); }
.df-ex-up.busy { flex-direction: column; align-items: stretch; gap: 8px; border: 1px solid var(--ds-line); background: var(--ds-surface2, var(--surface)); }
.df-ex-uptop, .df-ex-uprow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.df-ex-uptop b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ds-text); }
.df-ex-uppct { font-weight: 700; color: var(--ds-accent-ink); font-variant-numeric: tabular-nums; }
.df-ex-upbar { height: 8px; border-radius: 4px; background: var(--ds-line); overflow: hidden; }
.df-ex-upbar > i { display: block; height: 100%; background: var(--ds-accent); border-radius: 4px; transition: width .2s; }
.df-ex-up.done { border: 1px solid var(--ds-leave); background: var(--ds-leave-bg); }
.df-ex-upok { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--ds-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.df-ex-upmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.df-ex-upmain b { font-size: 14px; color: var(--ds-leave-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-ex-up.done { flex-wrap: wrap; }
.df-ex-upmain b { white-space: normal; overflow-wrap: anywhere; }
.df-ex-upact { display: flex; gap: 16px; margin-left: 44px; flex-basis: 100%; }
.df-ex-upact .df-ex-link { white-space: nowrap; }

/* ---------- PM: send to report file ---------- */
.df-ex-export { display: inline-flex; align-items: center; gap: 8px; }
.df-ex-alert.ok { background: var(--ds-leave-bg); color: var(--ds-leave-fg); }
.df-ex-alert.ok a { color: inherit; font-weight: 700; }
.df-rep { width: 480px; text-align: left; align-items: stretch; gap: 12px; }
.df-rep h2 { text-align: left; }
.df-rep-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ds-line); border-radius: 14px; background: var(--ds-surface2, var(--surface)); }
.df-rep-file .ic { flex: none; width: 44px; height: 44px; border-radius: 10px; background: #E3F5EA; color: #1D7A45; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.df-rep-file > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.df-rep-file b { font-size: 14px; color: var(--ds-text); overflow-wrap: anywhere; }
.df-rep-file small { font-size: 12px; color: var(--ds-muted); }
.df-rep-rules { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--ds-text2); }
.df-confirm-go { border: 0; background: var(--ds-accent); color: #fff; }
.df-confirm-go:disabled, .df-confirm-no:disabled { opacity: .6; cursor: default; }
