/* 단체: design-system tokens only (design-system.css), so the screen follows the light/dark choice. */
.og-workspace { max-width: 980px; margin: 0; color: var(--ds-ink); overflow-wrap: anywhere; }
.og-heading { margin-bottom: var(--ds-space-5); }
.og-heading > div { min-width: 0; }
.og-heading p { margin-top: var(--ds-space-1); font-variant-numeric: tabular-nums; }
.og-heading .og-waiting { margin-top: 0; color: var(--ds-warn); font-size: var(--ds-font-sm); }
.og-back { margin: 0 0 var(--ds-space-3) calc(var(--ds-space-2) * -1); padding-inline: var(--ds-space-2); }

.og-card { margin-bottom: var(--ds-space-4); padding: var(--ds-space-4); border: 1px solid var(--ds-line); border-radius: var(--ds-radius-lg); background: var(--ds-surface); box-shadow: var(--ds-shadow-1); }
.og-card h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--ds-space-1) var(--ds-space-3); margin: 0 0 var(--ds-space-3); color: var(--ds-ink); font-size: var(--ds-font-lg); font-weight: var(--ds-weight-bold); letter-spacing: var(--ds-tracking-title); }
.og-card h2 small { color: var(--ds-ink-2); font-size: var(--ds-font-sm); font-weight: var(--ds-weight-medium); letter-spacing: var(--ds-tracking-body); }
.og-card ul { list-style: none; margin: 0; padding: 0; }
.og-read { margin-left: auto; }

.og-search, .og-inline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2); margin-bottom: var(--ds-space-3); }
.og-search input, .og-inline input { flex: 1 1 240px; }
.og-inline label { flex: 1 1 280px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2); color: var(--ds-ink-2); font-size: var(--ds-font-sm); font-weight: var(--ds-weight-medium); }
.og-workspace input { min-height: var(--ds-control-md); min-width: 0; padding: 0 var(--ds-space-3); border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-md); color: var(--ds-ink); background: var(--ds-surface); font: inherit; font-size: var(--ds-font-md); transition: border-color var(--ds-duration) var(--ds-ease), box-shadow var(--ds-duration) var(--ds-ease); }
.og-workspace input::placeholder { color: var(--ds-placeholder); }
.og-workspace input:hover { border-color: var(--ds-ink-3); }
.og-workspace input:focus-visible { outline: none; border-color: var(--ds-accent) !important; box-shadow: 0 0 0 3px var(--ds-accent-soft); }

/* 확인 필요: two organisations side by side */
.og-review { padding: var(--ds-space-3) 0; border-bottom: 1px solid var(--ds-line); }
.og-review:last-child { border-bottom: 0; padding-bottom: 0; }
.og-pair { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2) var(--ds-space-3); }
.og-side { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: var(--ds-space-2) var(--ds-space-3); border-radius: var(--ds-radius-md); background: var(--ds-sunken); color: var(--ds-ink-2); font-size: var(--ds-font-sm); }
.og-side b { color: var(--ds-ink); font-size: var(--ds-font-md); }
.og-codes { font-variant-numeric: tabular-nums; }
.og-versus { color: var(--ds-ink-2); }
.og-reason { margin: var(--ds-space-2) 0; color: var(--ds-ink-2); font-size: var(--ds-font-sm); line-height: var(--ds-leading); }
.og-actions { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); }
.og-actions .ds-button { height: auto; min-height: var(--ds-control-md); padding-block: var(--ds-space-2); white-space: normal; text-align: left; }
.og-actions .ds-button small { margin-left: var(--ds-space-1); color: var(--ds-ink-2); font-weight: var(--ds-weight-medium); }

/* 단체 목록: number, name, then kind · count · last date on the right */
.og-row { width: 100%; min-height: 48px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px var(--ds-space-3); padding: var(--ds-space-3) var(--ds-space-1); border: 0; border-bottom: 1px solid var(--ds-line); color: var(--ds-ink); background: none; font: inherit; font-size: var(--ds-font-md); text-align: left; cursor: pointer; transition: background-color var(--ds-duration-fast) var(--ds-ease); }
.og-row:hover { background: color-mix(in srgb, var(--ds-sunken) 55%, transparent); }
.og-list li:last-child .og-row { border-bottom: 0; }
.og-row:hover .og-name { text-decoration: underline; }
.og-number { flex: none; min-width: 3.2em; color: var(--ds-ink-2); font-variant-numeric: tabular-nums; }
.og-name { flex: 1 1 240px; min-width: 0; font-weight: var(--ds-weight-strong); }
.og-flag { display: inline-flex; align-items: center; gap: 6px; margin-left: var(--ds-space-2); color: var(--ds-warn); font-size: var(--ds-font-sm); font-style: normal; font-weight: var(--ds-weight-medium); white-space: nowrap; }
.og-flag::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; }
.og-kind, .og-count, .og-last { flex: none; color: var(--ds-ink-2); font-size: var(--ds-font-sm); font-variant-numeric: tabular-nums; }

/* Organisation links and the names read as the same organisation: wrap inside the card, never overflow */
.og-chips { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); }
.og-chips li { min-width: 0; max-width: 100%; }
.og-chip { max-width: 100%; min-height: var(--ds-touch); display: inline-flex; align-items: center; padding: var(--ds-space-2) var(--ds-space-3); border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-md); color: var(--ds-ink); background: var(--ds-surface); font: inherit; font-size: var(--ds-font-sm); font-weight: var(--ds-weight-strong); line-height: var(--ds-leading-tight); text-align: left; overflow-wrap: anywhere; cursor: pointer; transition: background-color var(--ds-duration) var(--ds-ease); }
button.og-chip:hover { background: var(--ds-sunken); }
.og-chip.plain { min-height: 32px; padding: var(--ds-space-1) var(--ds-space-3); border-color: transparent; color: var(--ds-ink); background: var(--ds-sunken); font-weight: var(--ds-weight-medium); cursor: default; }

/* 주문 (detail) */
.og-order { display: flex; align-items: center; flex-wrap: wrap; gap: var(--ds-space-1) var(--ds-space-3); padding: var(--ds-space-2) 0; border-bottom: 1px solid var(--ds-line); }
.og-order:last-child { border-bottom: 0; }
.og-order-open { flex: 1 1 260px; min-width: 0; min-height: var(--ds-touch); display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px var(--ds-space-3); border: 0; color: var(--ds-ink); background: none; font: inherit; font-size: var(--ds-font-md); text-align: left; cursor: pointer; }
.og-order-open b { min-width: 3.6em; font-variant-numeric: tabular-nums; }
.og-order-open span { color: var(--ds-ink-2); font-size: var(--ds-font-sm); }
.og-order-open:hover b { text-decoration: underline; }
.og-written { flex: 1 1 220px; min-width: 0; font-size: var(--ds-font-sm); }
.og-written small { color: var(--ds-ink-2); font-size: var(--ds-font-xs); }
.og-move { flex: 1 1 280px; display: flex; gap: var(--ds-space-2); min-width: 0; }
.og-move input { flex: 1 1 auto; }
.og-bundle { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--ds-space-1) var(--ds-space-3); margin: var(--ds-space-3) 0 2px; padding: var(--ds-space-2) var(--ds-space-3); border-radius: var(--ds-radius-md); background: var(--ds-sunken); font-size: var(--ds-font-md); }
.og-bundle:first-of-type { margin-top: 0; }
.og-bundle span { color: var(--ds-ink-2); font-size: var(--ds-font-sm); font-weight: var(--ds-weight-medium); }
.og-placement { flex: 1 1 100%; display: flex; align-items: center; flex-wrap: wrap; gap: var(--ds-space-2) var(--ds-space-3); color: var(--ds-ink-2); font-size: var(--ds-font-xs); }
.og-bundle-order { margin: 0 0 var(--ds-space-2); font-size: var(--ds-font-md); }

/* 주문 단계인 상담 / 상담방 */
.og-form { display: flex; align-items: center; flex-wrap: wrap; gap: var(--ds-space-1) var(--ds-space-3); padding: var(--ds-space-2) 0; border-bottom: 1px solid var(--ds-line); font-size: var(--ds-font-sm); }
.og-form:last-child { border-bottom: 0; }
.og-room { flex: 1 1 220px; min-width: 0; min-height: var(--ds-touch); display: flex; flex-direction: column; justify-content: center; border: 0; color: var(--ds-ink); background: none; font: inherit; font-size: var(--ds-font-md); text-align: left; cursor: pointer; }
.og-room span { color: var(--ds-ink-2); font-size: var(--ds-font-xs); font-variant-numeric: tabular-nums; }
.og-room:hover b { text-decoration: underline; }
.og-form-title { flex: 1 1 240px; min-width: 0; color: var(--ds-ink-2); }
.og-form .og-chip { min-height: 36px; }
.og-new { flex: 1 1 200px; min-width: 0; color: var(--ds-ink-2); }
.og-near { flex: 1 1 320px; min-width: 0; color: var(--ds-warn); }
.og-merges li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--ds-space-2); padding: var(--ds-space-2) 0; font-size: var(--ds-font-md); }
.og-empty { margin: 0; padding: var(--ds-space-6) var(--ds-space-4); border: 1px dashed var(--ds-line-strong); border-radius: var(--ds-radius-lg); color: var(--ds-ink-2); text-align: center; line-height: var(--ds-leading); }
.og-foot { margin: var(--ds-space-1) 2px 0; color: var(--ds-ink-2); font-size: var(--ds-font-xs); line-height: var(--ds-leading-loose); }

.og-row:focus-visible, .og-chip:focus-visible, .og-order-open:focus-visible, .og-room:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }
@media (max-width: 900px), (pointer: coarse) {
  .og-workspace input { min-height: var(--ds-touch); }
}
@media (max-width: 640px) {
  .og-card { padding: var(--ds-space-3); }
  .og-search .ds-button, .og-inline .ds-button { flex: 1 1 auto; }
  .og-move { flex-basis: 100%; }
}
