/* Teacher / director screens (design D2 v2, Figma "11 선생님·원장 화면 v2 (다힘 스킨)").
   Loaded after dahim-skin.css, which holds the site header and the shared parts. */
.t-main > .t-msg { margin-bottom: 16px; }
.t-view:not([hidden]) { display: flex; flex-direction: column; gap: 20px; }
.t-view > .cd-panel { margin: 0; }
.t-help { font-size: 12.5px; line-height: 1.5; color: var(--cd-ink-3); }
.t-help.error-text, .error-text { color: var(--cd-bad); font-weight: 600; }
.t-caption { font-size: 13.5px; color: var(--cd-ink-3); }
.cd-muted-2 { color: var(--cd-ink-4); }
.t-muted-sm { font-size: 13px; color: var(--cd-ink-4); }
.t-warn-text { color: var(--cd-warn); }
.nowrap { white-space: nowrap; }
.struck { text-decoration: line-through; }
.t-wide-only { display: inline; }
.t-info { align-items: stretch; }

/* Forms (아이 추가, 다힘 학생) */
.cd-panel > h2 + .t-form-grid, .cd-panel > p + .t-form-grid { margin-top: 16px; }
.t-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 20px; align-items: start; }
.t-form-grid .span-3 { grid-column: span 3; }
.t-form-grid .span-all { grid-column: 1 / -1; }
.t-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.t-field label { margin: 0; }
.t-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.t-student-all { margin-top: 8px; }
.t-invite { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 12px; }
.t-invite .t-field { flex: 1 1 280px; }
.t-invite .cd-input { flex: 1 1 280px; }

/* 시작하기 (no children yet) */
.t-start { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; padding: 32px; }
.t-start-kicker { font-size: 13px; font-weight: 700; color: var(--cd-acc); }
.t-start-title { margin-top: 6px; font-size: 20px; line-height: 28px; font-weight: 800; color: var(--cd-ink); }
.t-steps { list-style: none; margin: 24px 0 0; padding: 0; }
.t-steps li { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--cd-line-soft); }
.t-steps li:first-child { border-top: 0; padding-top: 8px; }
.t-step-no { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 1px solid var(--cd-line); border-radius: 50%; background: #fff; color: var(--cd-ink-3); font-size: 13px; font-weight: 700; }
.is-now .t-step-no { background: var(--cd-acc); border-color: var(--cd-acc); color: #fff; }
.t-step-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: var(--cd-ink); }
.t-step-text { margin-top: 6px; font-size: 13.5px; color: var(--cd-ink-3); }
.t-steps .cd-btn { margin-top: 12px; }
.t-start-side { align-self: start; padding: 22px; border-radius: 12px; background: #f8fafc; }
.t-start-side h3 { margin: 0 0 14px; font-size: 14px; font-weight: 800; }
.t-what { margin: 0; }
.t-what dt { font-size: 13.5px; font-weight: 600; color: var(--cd-ink); }
.t-what dd { margin: 2px 0 14px; font-size: 13.5px; color: var(--cd-ink-3); }
.t-what-note { display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid var(--cd-line); font-size: 13.5px; line-height: 1.65; color: var(--cd-ink-2); }
.t-what-note .dh-ico { flex: none; margin-top: 3px; color: var(--cd-ink-3); }

/* Summary tiles */
.t-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.t-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 20px 22px 22px; }
.t-tile + .t-tile { border-left: 1px solid var(--cd-line); }
.t-tile-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--cd-ink-3); }
.t-tile-value { display: flex; align-items: baseline; gap: 4px; margin-top: 2px; color: var(--cd-ink); }
.t-tile-value b { font-size: 28px; line-height: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.t-tile-value span { font-size: 13px; color: var(--cd-ink-3); }
.t-tile-cap { font-size: 13px; color: var(--cd-ink-3); }
.t-tile.is-warn .t-tile-label, .t-tile.is-warn .t-tile-value b { color: var(--cd-warn); }
.t-tile-link { align-self: flex-start; min-height: 40px; margin: 6px 0 -10px -8px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--cd-acc); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.t-tile-link:hover { background: var(--cd-acc-soft); }
.t-tile-link[aria-pressed="true"] { background: var(--cd-acc-soft); }

/* Search, group chips, consent filter */
.t-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.t-search { position: relative; flex: 0 1 260px; }
.t-search .dh-ico { position: absolute; left: 13px; top: 12px; color: var(--cd-ink-4); }
.t-search .cd-input { padding-left: 36px; }
.t-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }
.t-missing { margin-left: auto; }
.t-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--cd-line); border-radius: 999px; background: #fff;
  color: var(--cd-ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.t-chip:hover { border-color: #d5dae3; background: #f8fafc; }
.t-chip .chip-count { font-weight: 500; color: var(--cd-ink-4); }
.t-chip.on { border: 1.5px solid var(--cd-acc); padding: 0 13.5px; background: var(--cd-acc-soft); color: var(--cd-acc); font-weight: 800; }
.t-chip.on .chip-count { color: var(--cd-acc); }
.t-stale-note { align-items: center; }
.t-stale-note .cd-btn { margin-left: auto; }

/* Child table */
.child-table tbody tr > * { height: 78px; }
.child-table .cell-code { white-space: nowrap; }
.t-inline-initials, .t-inline-group, .col-narrow-label { display: none; }
.cell-consent .dh-status-chip { vertical-align: middle; }
.cell-consent .cd-btn { display: flex; margin-top: 8px; }
.cell-recent { min-width: 260px; }
.t-recent-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.t-recent-line + .t-recent-line { margin-top: 4px; }
.t-recent-date { font-weight: 600; color: var(--cd-ink); }
.t-ago { color: var(--cd-ink-4); }
.cell-actions { display: flex; align-items: center; gap: 8px; }
.child-table tr.row-warn > * { background: var(--cd-note-soft); }
.child-table tr.row-warn:hover > * { background: #fff7d6; }
.cd-table tr.row-dim > * { color: var(--cd-ink-4); }
.t-empty { padding: 40px 24px; text-align: center; color: var(--cd-ink-3); }
.t-table-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.t-pager { display: flex; gap: 8px; }

/* Director tabs */
.t-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-table .t-account { font-weight: 800; color: var(--cd-ink); white-space: nowrap; }
.cd-table .row-dim .t-account { color: var(--cd-ink-4); }
.t-audit-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.t-audit-filters .t-field { flex: 0 1 200px; }
.t-audit-filters .t-date-field { flex-basis: 150px; }

/* Child detail */
.t-back { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; min-height: 40px; margin: 4px 0 -8px -6px; padding: 0 6px; border-radius: 8px;
  color: var(--cd-acc); font-size: 14px; font-weight: 700; text-decoration: none; }
.t-back:hover { background: var(--cd-acc-soft); }
.t-detail-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.t-child-title { display: flex; align-items: baseline; gap: 12px; font-size: 24px; line-height: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--cd-ink); }
.t-child-initials { font-size: 20px; font-weight: 700; color: var(--cd-ink-3); letter-spacing: .1em; }
.t-detail-head .dh-ph-sub { margin-top: 6px; }
.t-banner { margin: 0; }
.t-info { display: grid; grid-template-columns: 140px minmax(200px, 1fr) minmax(320px, 1.7fr) minmax(280px, 1.7fr); padding: 0; overflow: hidden; }
.t-info-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 18px 22px; }
.t-info-item + .t-info-item { border-left: 1px solid var(--cd-line); }
.t-info-label { font-size: 12.5px; font-weight: 600; color: var(--cd-ink-3); }
.t-info-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.t-info-text { font-size: 14px; color: var(--cd-ink); }
.t-info-edit .t-info-text { flex: 0 1 auto; min-width: 0; }
.t-info-edit .cd-input { width: auto; flex: 1 1 140px; }
.t-info-edit .t-date { flex: 0 1 160px; }
.t-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 384px; gap: 24px; align-items: start; }
.t-detail-main, .t-detail-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.t-detail-main > .cd-panel, .t-detail-side > .cd-panel { margin: 0; }
.t-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.t-panel-head h2 { font-size: 16px; line-height: 22px; font-weight: 800; }
.t-trend-sum { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--cd-ink-2); }
.t-chart-box { margin-top: 12px; }
.t-chart { display: block; width: 100%; height: auto; overflow: visible; }
.t-grid { stroke: #eef1f5; stroke-width: 1; stroke-dasharray: 4 4; }
.t-base { stroke: #94a3b8; stroke-width: 1.2; stroke-dasharray: 4 4; }
.t-axis { fill: var(--cd-ink-4); font-size: 12px; font-family: var(--dh-font); }
.t-axis-strong { fill: var(--cd-ink-2); font-weight: 600; }
.t-ref-col { stroke: #e5e8ee; stroke-width: 1; }
.t-ref-label { fill: var(--cd-warn); font-size: 12px; font-weight: 700; font-family: var(--dh-font); }
.t-line { fill: none; stroke: var(--cd-acc); stroke-width: 2; stroke-linejoin: round; }
.t-dot { fill: #fff; stroke: var(--cd-acc); stroke-width: 1.6; }
.t-dot.last { fill: var(--cd-acc); }
.t-val { fill: var(--cd-ink); font-size: 12px; font-weight: 700; font-family: var(--dh-font); }
.t-trend-foot { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--cd-ink-3); }
.t-trend-foot .dh-ico { flex: none; margin-top: 3px; }

.t-records .t-panel-head { padding-bottom: 14px; border-bottom: 1px solid var(--cd-line-soft); }
.t-record { display: flex; flex-direction: column; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--cd-line-soft); }
.t-record:last-of-type { border-bottom: 0; }
.t-record-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.t-record-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.t-record-time { font-size: 15px; font-weight: 800; color: var(--cd-ink); }
.t-record-passage { font-size: 13.5px; color: var(--cd-ink-3); }
.t-record-tags { display: inline-flex; gap: 6px; }
.t-record-actions { display: flex; gap: 8px; }
.t-stat-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.t-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.t-stat-label { font-size: 12.5px; color: var(--cd-ink-3); }
.t-stat-value { font-size: 20px; line-height: 28px; font-weight: 800; color: var(--cd-ink); white-space: nowrap; }
.t-stat-unit { margin-left: 4px; font-size: 12.5px; font-weight: 500; color: var(--cd-ink-3); }
.t-legacy { font-size: 14px; color: var(--cd-ink-2); }
.t-note-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13.5px; }
.t-note-label { font-size: 12.5px; color: var(--cd-ink-4); }
.t-note-text { flex: 1 1 200px; color: var(--cd-ink-2); }
.t-note-row .cd-input { flex: 1 1 240px; width: auto; }
.t-records-empty { padding: 24px 0 8px; text-align: center; }
.t-more-row { display: flex; justify-content: center; padding-top: 16px; border-top: 1px solid var(--cd-line-soft); }
.analyzing { display: flex; flex-direction: column; gap: 8px; }

.t-share h2 { margin-bottom: 16px; font-size: 16px; font-weight: 800; }
.t-share-label { margin-bottom: 6px; }
.t-share-none { font-size: 13.5px; color: var(--cd-ink-3); }
.t-links { display: flex; flex-direction: column; margin-top: 16px; border: 1px solid var(--cd-line); border-radius: 12px; overflow: hidden; }
.t-links > .t-share-none, .t-links > .skeleton-line { margin: 14px; }
.t-link { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.t-link + .t-link { border-top: 1px solid var(--cd-line-soft); }
.t-link.is-off { background: #f8fafc; }
.t-link-head { display: flex; align-items: center; gap: 8px; }
.t-link-when { font-size: 13px; color: var(--cd-ink-3); }
.t-link-url { font-size: 13.5px; color: var(--cd-ink-2); word-break: break-all; }
.t-link.is-off .t-link-url { color: var(--cd-ink-4); }
.t-link-actions { display: flex; gap: 8px; }
.t-share-new { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--cd-line-soft); }
.t-share-new .cd-label { margin: 0; }
.t-days { display: flex; gap: 8px; }
.t-radio { position: relative; }
.t-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.t-radio .dh-ico { display: none; }
.t-radio:has(input:checked) { border: 1.5px solid var(--cd-acc); padding: 0 13.5px; background: var(--cd-acc-soft); color: var(--cd-acc); font-weight: 800; }
.t-radio:has(input:checked) .dh-ico { display: inline; }
.t-radio:has(input:focus-visible) { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.t-create { width: 100%; }

/* Dialog (site modal: 78px from the top, #0f172a at 45%) */
.t-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 96px); margin: 78px auto auto; padding: 24px; border: 0; border-radius: var(--cd-r);
  background: #fff; color: var(--cd-ink); box-shadow: var(--dh-pop-shadow); font-family: var(--dh-font); }
.t-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.t-dialog-head { display: flex; align-items: center; gap: 12px; }
.t-dialog-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--cd-bad-soft); color: var(--cd-bad); }
.t-dialog h2 { font-size: 20px; line-height: 28px; font-weight: 800; }
.t-dialog > p { margin-top: 14px; font-size: 14px; line-height: 1.6; color: var(--cd-ink-2); }
.t-dialog-list { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #f8fafc; }
.t-dialog-list-label { font-size: 12.5px; font-weight: 600; color: var(--cd-ink-3); }
#confirm-items { margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--cd-ink); }
.t-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 48px); padding: 12px 16px;
  border: 1px solid var(--cd-line); border-radius: 12px; background: #fff; box-shadow: var(--dh-pop-shadow); font-size: 14px; }
.toast-icon { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--cd-ok); color: #fff; font-weight: 700; }
.toast.danger .toast-icon { background: var(--cd-bad); }

/* Front page (index.html) */
.t-notice { max-width: 560px; margin: 64px auto; padding: 32px; }
.t-notice h1 { font-size: 20px; line-height: 28px; font-weight: 800; }
.t-notice p { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--cd-ink-2); }
.t-notice ul { margin: 14px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.8; color: var(--cd-ink-2); }
.t-notice .cd-btn { margin-top: 22px; }

/* 1024 tablet and narrower: merged table columns, side panel under the main column */
@media (max-width: 1200px) {
  .col-wide { display: none; }
  .col-wide-label { display: none; }
  .col-narrow-label { display: inline; }
  .t-inline-initials { display: inline; margin-left: 8px; font-size: 13px; color: var(--cd-ink-3); letter-spacing: .1em; }
  .t-inline-group { display: block; margin-top: 2px; color: var(--cd-ink-3); }
  .t-wide-only { display: none; }
  .t-search { flex: 1 1 320px; }
  .t-missing { margin-left: 0; }
  .t-chips { order: 3; flex-basis: 100%; }
  .t-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .t-info { grid-template-columns: 1fr 1fr; }
  .t-info-item:nth-child(3) { border-left: 0; }
  .t-info-item:nth-child(n+3) { border-top: 1px solid var(--cd-line); }
  .t-stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .t-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-form-grid .span-3 { grid-column: 1 / -1; }
  .t-start { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .t-tiles { grid-template-columns: 1fr 1fr; }
  .t-tile:nth-child(3) { border-left: 0; }
  .t-tile:nth-child(n+3) { border-top: 1px solid var(--cd-line); }
  .t-info, .t-form-grid { grid-template-columns: 1fr; }
  .t-info-item + .t-info-item { border-left: 0; border-top: 1px solid var(--cd-line); }
  .t-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-start { padding: 20px; }
}
