/* ════════════════════════════════════════════════════════════════
   Inbox 컴포넌트 스타일
   ────────────────────────────────────────────────────────────────
   prototype에서 추출. 모든 CSS 변수는 tokens.css에서 정의.
   --navy-* 변수는 tokens.css에서 brand orange로 alias 매핑됨.
   
   적용 범위: <main class="inbox"> ... </main> 내부의 모든 요소
   기존 글로벌 스타일과 충돌 시 .inbox 후손 선택자로 스코프 제한 권장
   ════════════════════════════════════════════════════════════════ */

/* ============================================================
     Design Tokens — Outlook 풍 업무용, 절제된 네이비/그레이
     ============================================================ */
  

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; overflow: hidden; }
  body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--gray-900);
    font-size: 13px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
  input, textarea, select { font-family: inherit; font-size: inherit; }

  /* ============================================================
     상단 글로벌 바
     ============================================================ */
  .topbar {
    height: var(--h-topbar);
    background: var(--navy-900);
    color: white;
    display: flex; align-items: center;
    padding: 0 16px;
    gap: 16px;
    border-bottom: 1px solid #06142e;
    flex-shrink: 0;
  }
  .topbar__brand {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.01em;
  }
  .topbar__brand-mark {
    width: 24px; height: 24px;
    background: linear-gradient(135deg, #b4d4ff, var(--navy-500));
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    color: var(--navy-900);
    font-weight: 800;
  }
  .topbar__brand-sub {
    font-family: var(--font-sans);
    font-size: 11px;
    color: rgba(255,255,255,0.65);
    font-weight: 400;
    margin-left: 4px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.18);
  }
  .topbar__search {
    flex: 1;
    max-width: 480px;
    position: relative;
  }
  .topbar__search input {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: white;
    height: 30px;
    padding: 0 12px 0 32px;
    border-radius: 4px;
    outline: none;
    font-size: 12.5px;
  }
  .topbar__search input::placeholder { color: rgba(255,255,255,0.5); }
  .topbar__search input:focus { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); }
  .topbar__search svg {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    width: 14px; height: 14px; color: rgba(255,255,255,0.5);
  }
  .topbar__right {
    margin-left: auto;
    display: flex; align-items: center; gap: 4px;
  }
  .topbar__btn {
    height: 30px; padding: 0 10px;
    border-radius: 4px;
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    display: inline-flex; align-items: center; gap: 6px;
    transition: background 0.12s;
  }
  .topbar__btn:hover { background: rgba(255,255,255,0.1); color: white; }
  .topbar__user {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 10px 4px 6px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    margin-left: 8px;
  }
  .topbar__avatar {
    width: 24px; height: 24px; border-radius: 50%;
    background: linear-gradient(135deg, #6b8fd6, #2451a0);
    color: white;
    font-size: 10.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
  .topbar__user-name { font-size: 11.5px; }

  /* ============================================================
     앱 레이아웃 — Outlook 3분할
     ============================================================ */
  .app {
    height: calc(100vh - var(--h-topbar));
    display: grid;
    grid-template-columns: var(--w-rail) var(--w-list) 1fr;
  }

  /* ============================================================
     좌측 네비게이션 레일
     ============================================================ */
  .rail {
    background: var(--gray-50);
    border-right: 1px solid var(--gray-200);
    display: flex; flex-direction: column;
    overflow-y: auto;
  }
  .rail__compose {
    margin: 12px;
    height: 36px;
    background: var(--navy-700);
    color: white;
    border-radius: 5px;
    font-weight: 600;
    font-size: 12.5px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: background 0.12s;
  }
  .rail__compose:hover { background: var(--navy-600); }
  .rail__group { padding: 4px 0 8px; }
  .rail__group-title {
    padding: 8px 16px 6px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .rail__item {
    display: flex; align-items: center;
    height: 28px;
    padding: 0 12px 0 16px;
    color: var(--gray-700);
    font-size: 12.5px;
    cursor: pointer;
    border-left: 3px solid transparent;
    gap: 10px;
    user-select: none;
  }
  .rail__item:hover { background: var(--gray-100); }
  .rail__item.is-active {
    background: var(--navy-100);
    color: var(--navy-900);
    font-weight: 600;
    border-left-color: var(--navy-600);
  }
  .rail__icon {
    width: 14px; height: 14px;
    color: currentColor;
    flex-shrink: 0;
    opacity: 0.75;
  }
  .rail__item.is-active .rail__icon { opacity: 1; }
  .rail__count {
    margin-left: auto;
    font-size: 11px;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
  }
  .rail__item.is-active .rail__count { color: var(--navy-700); font-weight: 600; }
  .rail__count.is-alert { color: var(--st-error); font-weight: 600; }

  .rail__divider { height: 1px; background: var(--gray-200); margin: 6px 12px; }

  /* ============================================================
     중앙 메일 리스트
     ============================================================ */
  .list {
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex; flex-direction: column;
    overflow: hidden;
  }
  .list__header {
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--gray-200);
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0;
  }
  .list__title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
  }
  .list__count {
    font-size: 11.5px;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
  }
  .list__sort {
    margin-left: auto;
    font-size: 11.5px;
    color: var(--gray-600);
    display: flex; align-items: center; gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
  }
  .list__sort:hover { background: var(--gray-100); }

  .list__filter-bar {
    padding: 6px 14px 10px;
    display: flex; gap: 4px;
    border-bottom: 1px solid var(--gray-200);
    overflow-x: auto;
    flex-shrink: 0;
  }
  .list__chip {
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    border: 1px solid transparent;
    border-radius: 11px;
    white-space: nowrap;
    transition: all 0.12s;
  }
  .list__chip:hover { background: var(--gray-150); }
  .list__chip.is-active {
    background: var(--navy-100);
    color: var(--navy-700);
    border-color: var(--navy-400);
    font-weight: 600;
  }

  .list__items {
    flex: 1;
    overflow-y: auto;
  }

  /* 메일 카드 */
  .mail {
    padding: 11px 14px 12px;
    border-bottom: 1px solid var(--gray-150);
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.1s;
    position: relative;
  }
  .mail:hover { background: var(--gray-50); }
  .mail.is-selected {
    background: var(--navy-50);
    border-left-color: var(--navy-600);
  }
  .mail.is-unread {
    background: white;
  }
  .mail.is-unread .mail__sender,
  .mail.is-unread .mail__subject {
    font-weight: 700;
    color: var(--gray-900);
  }

  .mail__row1 {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 3px;
  }
  .mail__sender {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-800);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mail__time {
    font-size: 10.5px;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
  }

  .mail__subject {
    font-size: 12.5px;
    color: var(--gray-700);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mail__meta {
    display: flex; align-items: center; gap: 6px;
    font-size: 10.5px;
    color: var(--gray-500);
    margin-bottom: 6px;
  }
  .mail__meta-divider {
    width: 2px; height: 2px; background: var(--gray-400); border-radius: 50%;
  }
  .mail__attach {
    display: inline-flex; align-items: center; gap: 3px;
  }

  .mail__status {
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap;
  }
  .mail__phase {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 7px 2px 5px;
    font-size: 10.5px;
    font-weight: 600;
    border-radius: 3px;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
  }
  .mail__phase-num {
    font-family: var(--font-display);
    font-size: 9.5px;
    font-weight: 700;
    padding: 0 4px;
    border-radius: 2px;
    background: rgba(0,0,0,0.08);
    line-height: 1.5;
  }
  .mail__phase.s-progress  { background: var(--st-progress-bg);  color: var(--st-progress); }
  .mail__phase.s-done      { background: var(--st-done-bg);      color: var(--st-done); }
  .mail__phase.s-attention { background: var(--st-attention-bg); color: var(--st-attention); }
  .mail__phase.s-error     { background: var(--st-error-bg);     color: var(--st-error); }
  .mail__phase.s-wait      { background: var(--st-wait-bg);      color: var(--st-wait); }

  .mail__alert {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 1.5px 7px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 3px;
    line-height: 1.6;
  }
  .mail__alert.is-approval { background: #fff5e0; color: var(--st-attention); border: 1px solid #fad48a; }
  .mail__alert.is-error    { background: var(--st-error-bg); color: var(--st-error); border: 1px solid #f3b8ba; }
  .mail__alert.is-reply    { background: var(--st-progress-bg); color: var(--st-progress); border: 1px solid #b3c6ec; }
  .mail__alert .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

  .mail__assignee {
    margin-left: auto;
    font-size: 10.5px;
    color: var(--gray-600);
    display: inline-flex; align-items: center; gap: 4px;
  }
  .mail__avatar {
    width: 16px; height: 16px; border-radius: 50%;
    background: linear-gradient(135deg, #b4d4ff, var(--navy-500));
    color: white;
    font-size: 9px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }

  /* ============================================================
     우측 상세 영역
     ============================================================ */
  .detail {
    background: var(--bg);
    overflow-y: auto;
    overflow-x: hidden;
  }
  .detail__inner {
    max-width: 1080px;
    padding: 18px 28px 60px;
  }

  /* 메일 헤더 (간결화) */
  .mail-head {
    display: flex; align-items: flex-start; gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 18px;
  }
  .mail-head__main { flex: 1; min-width: 0; }
  .mail-head__subject {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
  }
  .mail-head__meta {
    display: flex; align-items: center; gap: 10px;
    font-size: 12px;
    color: var(--gray-600);
    flex-wrap: wrap;
  }
  .mail-head__from { color: var(--gray-800); font-weight: 500; }
  .mail-head__from strong { color: var(--gray-900); font-weight: 600; }
  .mail-head__time { font-variant-numeric: tabular-nums; }
  .mail-head__plan {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--navy-700);
    background: var(--navy-50);
    padding: 2px 7px;
    border-radius: 3px;
    border: 1px solid var(--navy-100);
  }

  .mail-head__actions {
    display: flex; gap: 4px;
  }
  .icon-btn {
    width: 30px; height: 30px;
    border-radius: 5px;
    color: var(--gray-600);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.12s;
  }
  .icon-btn:hover { background: var(--gray-150); color: var(--gray-900); }
  .icon-btn svg { width: 15px; height: 15px; }

  /* ============================================================
     ① 현재 처리상태 카드 — 가장 중요
     ============================================================ */
  .status-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
  }
  .status-card__top {
    padding: 16px 20px 14px;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: white;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
  }
  .status-card__label {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
  }
  .status-card__title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
  }
  .status-card__title .step-num {
    color: #b4d4ff;
    font-weight: 800;
    margin-right: 6px;
  }
  .status-card__sub {
    font-size: 12.5px;
    color: rgba(255,255,255,0.78);
    margin-top: 5px;
  }

  .status-card__action {
    text-align: right;
    flex-shrink: 0;
  }
  .status-card__action-label {
    font-size: 10.5px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
    font-weight: 500;
    letter-spacing: 0.04em;
  }
  .status-card__action-btn {
    display: inline-flex; align-items: center; gap: 7px;
    height: 38px;
    padding: 0 16px;
    background: white;
    color: var(--navy-900);
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: transform 0.12s, box-shadow 0.12s;
  }
  .status-card__action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  }
  .status-card__action-btn svg { width: 14px; height: 14px; }

  .status-card__bottom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--gray-50);
  }
  .status-fact {
    padding: 12px 16px;
    border-right: 1px solid var(--gray-200);
  }
  .status-fact:last-child { border-right: none; }
  .status-fact__label {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--gray-500);
    margin-bottom: 4px;
    letter-spacing: 0.02em;
  }
  .status-fact__value {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.4;
    display: flex; align-items: center; gap: 6px;
  }
  .status-fact__sub {
    font-size: 11px;
    color: var(--gray-600);
    margin-top: 1px;
    font-weight: 400;
  }
  .status-fact__avatar {
    width: 18px; height: 18px; border-radius: 50%;
    background: linear-gradient(135deg, #b4d4ff, var(--navy-500));
    color: white;
    font-size: 9.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
  .status-fact__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
  }
  .dot-progress  { background: var(--st-progress); box-shadow: 0 0 0 3px var(--st-progress-bg); }
  .dot-done      { background: var(--st-done);      box-shadow: 0 0 0 3px var(--st-done-bg); }
  .dot-attention { background: var(--st-attention); box-shadow: 0 0 0 3px var(--st-attention-bg); animation: pulse 1.6s infinite; }
  .dot-error     { background: var(--st-error);     box-shadow: 0 0 0 3px var(--st-error-bg); animation: pulse 1.6s infinite; }
  .dot-wait      { background: var(--st-wait);      box-shadow: 0 0 0 3px var(--st-wait-bg); }

  @keyframes pulse {
    0%,100% { box-shadow: 0 0 0 3px var(--st-attention-bg); }
    50%     { box-shadow: 0 0 0 6px var(--st-attention-bg); }
  }

  /* ============================================================
     ② Phase 진행바 — 큰 영역, 클릭 가능
     ============================================================ */
  .phases {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
  }
  .phases__header {
    padding: 14px 20px 10px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--gray-150);
  }
  .phases__title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
  }
  .phases__hint {
    font-size: 11.5px;
    color: var(--gray-500);
    margin-left: auto;
    display: flex; align-items: center; gap: 5px;
  }
  .phases__hint svg { width: 12px; height: 12px; }

  .phases__track {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 18px 12px 22px;
    position: relative;
  }
  .phase {
    padding: 0 8px;
    position: relative;
    cursor: pointer;
    transition: transform 0.12s;
  }
  .phase:hover { transform: translateY(-2px); }

  /* 단계 사이의 연결선 */
  .phase:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    right: -8px;
    width: 16px;
    height: 2px;
    background: var(--gray-250);
    z-index: 0;
  }
  .phase.is-done:not(:last-child)::after { background: var(--st-done); }

  .phase__circle {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gray-100);
    border: 2px solid var(--gray-250);
    color: var(--gray-500);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 800;
    position: relative;
    z-index: 1;
    transition: all 0.15s;
  }
  .phase__circle svg { width: 18px; height: 18px; }

  .phase.is-done .phase__circle {
    background: var(--st-done);
    border-color: var(--st-done);
    color: white;
  }
  .phase.is-progress .phase__circle {
    background: white;
    border-color: var(--st-progress);
    color: var(--st-progress);
    box-shadow: 0 0 0 4px var(--st-progress-bg);
  }
  .phase.is-attention .phase__circle {
    background: white;
    border-color: var(--st-attention);
    color: var(--st-attention);
    box-shadow: 0 0 0 4px var(--st-attention-bg);
    animation: ring-pulse 1.6s infinite;
  }
  .phase.is-error .phase__circle {
    background: white;
    border-color: var(--st-error);
    color: var(--st-error);
    box-shadow: 0 0 0 4px var(--st-error-bg);
  }
  @keyframes ring-pulse {
    0%,100% { box-shadow: 0 0 0 4px var(--st-attention-bg); }
    50%     { box-shadow: 0 0 0 8px var(--st-attention-bg); }
  }

  .phase__name {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--gray-800);
    text-align: center;
    line-height: 1.35;
    margin-bottom: 5px;
  }
  .phase.is-wait .phase__name { color: var(--gray-500); font-weight: 500; }
  .phase__status {
    text-align: center;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.3;
  }
  .phase.is-done      .phase__status { color: var(--st-done); }
  .phase.is-progress  .phase__status { color: var(--st-progress); }
  .phase.is-attention .phase__status { color: var(--st-attention); }
  .phase.is-error     .phase__status { color: var(--st-error); }
  .phase.is-wait      .phase__status { color: var(--gray-500); }

  .phase.is-active {
    background: var(--gray-50);
    border-radius: 8px;
  }
  .phase.is-active .phase__circle { transform: scale(1.05); }

  .phase__time {
    text-align: center;
    font-size: 10px;
    color: var(--gray-500);
    margin-top: 3px;
    font-variant-numeric: tabular-nums;
  }

  /* Phase 상세 영역 (펼침) */
  .phase-detail {
    border-top: 1px solid var(--gray-150);
    background: var(--gray-50);
    padding: 16px 20px 20px;
  }
  .phase-detail__head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 12px;
  }
  .phase-detail__num {
    font-family: var(--font-display);
    font-size: 10.5px;
    font-weight: 700;
    background: var(--navy-700);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.06em;
  }
  .phase-detail__title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
  }
  .phase-detail__close {
    margin-left: auto;
    font-size: 11.5px;
    color: var(--gray-500);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-flex; align-items: center; gap: 4px;
  }
  .phase-detail__close:hover { background: var(--gray-150); color: var(--gray-800); }
  .phase-detail__close svg { width: 11px; height: 11px; }

  .phase-detail__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .log-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
  }
  .log-card__head {
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--gray-150);
    display: flex; align-items: center; gap: 8px;
    font-weight: 600;
    font-size: 12px;
    color: var(--gray-800);
    background: var(--gray-50);
  }
  .log-card__head .stat-pill {
    margin-left: auto;
  }
  .log-card__body { padding: 10px 14px 12px; }
  .log-card__row {
    display: flex; gap: 10px; padding: 5px 0;
    font-size: 11.5px;
    border-bottom: 1px dashed var(--gray-150);
  }
  .log-card__row:last-child { border-bottom: none; }
  .log-card__row .label {
    color: var(--gray-600);
    flex-shrink: 0;
    width: 96px;
  }
  .log-card__row .value {
    color: var(--gray-900);
    font-weight: 500;
    flex: 1;
    font-family: var(--font-mono);
    font-size: 11px;
  }
  .log-card__row.is-error .value { color: var(--st-error); }
  .log-card__row.is-ok .value::before {
    content: '✓';
    margin-right: 5px;
    color: var(--st-done);
  }

  .stat-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 1px 7px;
    font-size: 10.5px;
    font-weight: 600;
    border-radius: 3px;
    line-height: 1.7;
  }
  .stat-pill.s-done     { background: var(--st-done-bg);      color: var(--st-done); }
  .stat-pill.s-progress { background: var(--st-progress-bg);  color: var(--st-progress); }
  .stat-pill.s-attention{ background: var(--st-attention-bg); color: var(--st-attention); }
  .stat-pill.s-error    { background: var(--st-error-bg);     color: var(--st-error); }
  .stat-pill.s-wait     { background: var(--st-wait-bg);      color: var(--st-wait); }

  /* ============================================================
     ③ 다음 처리 제안
     ============================================================ */
  .suggestions {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
  }
  .sec-head {
    padding: 14px 20px 12px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--gray-150);
  }
  .sec-head__icon {
    width: 22px; height: 22px;
    border-radius: 5px;
    background: var(--navy-50);
    color: var(--navy-700);
    display: flex; align-items: center; justify-content: center;
  }
  .sec-head__icon svg { width: 13px; height: 13px; }
  .sec-head__title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
  }
  .sec-head__sub {
    font-size: 11.5px;
    color: var(--gray-500);
    margin-left: auto;
  }

  .suggest-list {
    padding: 8px;
  }
  .suggest {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    border-radius: 6px;
    transition: background 0.1s;
  }
  .suggest + .suggest { margin-top: 2px; }
  .suggest:hover { background: var(--gray-50); }
  .suggest__icon {
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
  }
  .suggest__icon svg { width: 14px; height: 14px; }
  .suggest__icon.s-done     { background: var(--st-done-bg);      color: var(--st-done); }
  .suggest__icon.s-progress { background: var(--st-progress-bg);  color: var(--st-progress); }
  .suggest__icon.s-attention{ background: var(--st-attention-bg); color: var(--st-attention); }
  .suggest__icon.s-error    { background: var(--st-error-bg);     color: var(--st-error); }
  .suggest__icon.s-wait     { background: var(--st-wait-bg);      color: var(--st-wait); }

  .suggest__main { min-width: 0; }
  .suggest__title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.4;
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
  }
  .suggest__sub {
    font-size: 11.5px;
    color: var(--gray-600);
    margin-top: 2px;
    line-height: 1.5;
  }
  .suggest__sub.is-error { color: var(--st-error); }

  .suggest__actions { display: flex; gap: 4px; flex-shrink: 0; }
  .btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.12s;
    display: inline-flex; align-items: center; gap: 5px;
  }
  .btn-sm svg { width: 11px; height: 11px; }
  .btn-sm.is-primary { background: var(--navy-700); color: white; }
  .btn-sm.is-primary:hover { background: var(--navy-600); }
  .btn-sm.is-ghost { background: transparent; color: var(--gray-700); border: 1px solid var(--gray-250); }
  .btn-sm.is-ghost:hover { background: var(--gray-100); border-color: var(--gray-400); }
  .btn-sm.is-warn { background: white; color: var(--st-attention); border: 1px solid #f3c87a; }
  .btn-sm.is-warn:hover { background: var(--st-attention-bg); }
  .btn-sm.is-danger { background: white; color: var(--st-error); border: 1px solid #f0a9ab; }
  .btn-sm.is-danger:hover { background: var(--st-error-bg); }

  /* ============================================================
     ④ 승인/반려 영역 — 가장 중요한 액션
     ============================================================ */
  .action-bar {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
  }
  .action-bar__top {
    padding: 14px 20px 12px;
    background: linear-gradient(180deg, #fff8e8 0%, #fef3d8 100%);
    border-bottom: 1px solid #f0c87a;
  }
  .action-bar__label {
    font-family: var(--font-display);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--st-attention);
    text-transform: uppercase;
    margin-bottom: 4px;
    display: inline-flex; align-items: center; gap: 6px;
  }
  .action-bar__label svg { width: 13px; height: 13px; }
  .action-bar__title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.35;
  }
  .action-bar__sub {
    font-size: 12px;
    color: var(--gray-700);
    margin-top: 3px;
  }
  .action-bar__buttons {
    padding: 12px 20px;
    display: flex; gap: 8px; align-items: center;
  }
  .action-bar__buttons .help-text {
    font-size: 11.5px;
    color: var(--gray-500);
    margin-right: auto;
  }
  .btn-lg {
    height: 38px;
    padding: 0 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex; align-items: center; gap: 7px;
    transition: all 0.12s;
  }
  .btn-lg svg { width: 14px; height: 14px; }
  .btn-lg.is-primary {
    background: var(--st-done);
    color: white;
    box-shadow: 0 1px 2px rgba(14,138,79,0.3);
  }
  .btn-lg.is-primary:hover { background: #0a6b3e; }
  .btn-lg.is-danger {
    background: white;
    color: var(--st-error);
    border: 1px solid #f0a9ab;
  }
  .btn-lg.is-danger:hover { background: var(--st-error-bg); }
  .btn-lg.is-ghost {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
  }
  .btn-lg.is-ghost:hover { background: var(--gray-100); }

  /* ============================================================
     ⑤ 상세 정보 접힘 영역
     ============================================================ */
  .collapsibles {
    display: flex; flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
  }
  .coll {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
  }
  .coll__head {
    width: 100%;
    padding: 12px 18px;
    display: flex; align-items: center; gap: 10px;
    background: white;
    text-align: left;
    transition: background 0.1s;
  }
  .coll__head:hover { background: var(--gray-50); }
  .coll__icon {
    width: 14px; height: 14px;
    color: var(--gray-500);
    transition: transform 0.18s;
    flex-shrink: 0;
  }
  .coll.is-open .coll__icon { transform: rotate(90deg); color: var(--navy-700); }
  .coll__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    flex: 1;
  }
  .coll__count {
    font-size: 11.5px;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
  }
  .coll__pill {
    margin-left: 4px;
  }
  .coll__body {
    padding: 0 18px 16px;
    display: none;
    border-top: 1px solid var(--gray-150);
    padding-top: 14px;
  }
  .coll.is-open .coll__body { display: block; }

  /* 원본 메일 미리보기 */
  .orig-mail {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 14px 16px;
    font-size: 12px;
    color: var(--gray-800);
    line-height: 1.7;
  }
  .orig-mail__from { color: var(--gray-600); font-size: 11.5px; margin-bottom: 8px; }
  .orig-mail__from strong { color: var(--gray-900); }
  .orig-mail p { margin-bottom: 8px; }
  .orig-mail p:last-child { margin-bottom: 0; }
  .orig-mail__sig { color: var(--gray-600); font-size: 11.5px; padding-top: 8px; border-top: 1px dashed var(--gray-300); margin-top: 10px; }

  /* 첨부파일 */
  .attach-list { display: flex; flex-direction: column; gap: 8px; }
  .attach {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
  }
  .attach__icon {
    width: 32px; height: 38px; border-radius: 4px;
    background: linear-gradient(135deg, #1d6f42, #0e8a4f);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 800;
    flex-shrink: 0;
  }
  .attach__main { flex: 1; min-width: 0; }
  .attach__name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-900);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .attach__meta {
    font-size: 11px;
    color: var(--gray-600);
    margin-top: 1px;
  }
  .attach__actions { display: flex; gap: 4px; }

  /* 파일 점검 결과 테이블 */
  .check-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
  }
  .check-table th {
    text-align: left;
    padding: 8px 10px;
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 11px;
    border-bottom: 1px solid var(--gray-200);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .check-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--gray-150);
    vertical-align: top;
  }
  .check-table .col-name { font-weight: 600; color: var(--gray-900); }
  .check-table .col-mono { font-family: var(--font-mono); font-size: 11px; color: var(--gray-700); }

  /* MAPIS 조회 결과 */
  .mapis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .mapis-item {
    padding: 10px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
  }
  .mapis-item__label {
    font-size: 10.5px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 3px;
  }
  .mapis-item__value {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
  }
  .mapis-item__value.is-mono { font-family: var(--font-mono); font-size: 12px; }
  .mapis-item__sub {
    font-size: 11px;
    color: var(--gray-600);
    margin-top: 2px;
    font-weight: 400;
  }

  /* 처리 이력 */
  .timeline {
    list-style: none;
    position: relative;
    padding-left: 20px;
  }
  .timeline::before {
    content: '';
    position: absolute;
    top: 4px; bottom: 4px;
    left: 5px;
    width: 2px;
    background: var(--gray-200);
  }
  .timeline li {
    position: relative;
    padding: 4px 0 10px;
    font-size: 12px;
  }
  .timeline li::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 7px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--st-done);
  }
  .timeline li.is-progress::before {
    border-color: var(--st-progress);
    background: var(--st-progress);
  }
  .timeline li.is-wait::before {
    border-color: var(--gray-300);
    background: white;
  }
  .timeline__title { font-weight: 600; color: var(--gray-800); }
  .timeline__meta { font-size: 11px; color: var(--gray-500); margin-top: 1px; }
  .timeline__meta strong { color: var(--gray-700); font-weight: 600; }

  /* ============================================================
     v0.4 — 메일 헤더 빠른 액션 버튼
     ============================================================ */
  .quick-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
  }
  .qa-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-800);
    transition: all .15s ease;
    white-space: nowrap;
  }
  .qa-btn:hover {
    border-color: var(--navy-500);
    background: var(--navy-50);
    color: var(--navy-700);
  }
  .qa-btn svg {
    width: 13px; height: 13px;
    stroke-width: 2;
  }
  .qa-btn .qa-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    background: var(--navy-100);
    color: var(--navy-700);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-display);
    line-height: 1;
    margin-left: 2px;
  }
  .qa-btn .qa-badge.is-error  { background: var(--st-error-bg); color: var(--st-error); }
  .qa-btn .qa-badge.is-attn   { background: var(--st-attention-bg); color: var(--st-attention); }
  .qa-btn .qa-badge.is-done   { background: var(--st-done-bg); color: var(--st-done); }

  /* ============================================================
     v0.4 — 메일 이력 요약 바
     ============================================================ */
  .thread-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin: 0 0 14px 0;
    box-shadow: var(--shadow-sm);
  }
  .thread-bar__icon {
    width: 28px; height: 28px;
    border-radius: 6px;
    background: var(--navy-50);
    color: var(--navy-700);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .thread-bar__icon svg { width: 14px; height: 14px; stroke-width: 2; }
  .thread-bar__title {
    font-size: 11px;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 2px;
  }
  .thread-bar__summary {
    font-size: 12.5px;
    color: var(--gray-800);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .thread-bar__chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--gray-100);
    border-radius: 10px;
    font-size: 11px;
    color: var(--gray-700);
    font-weight: 500;
  }
  .thread-bar__chip.is-recv { background: var(--navy-100); color: var(--navy-700); }
  .thread-bar__chip.is-send { background: var(--st-attention-bg); color: var(--st-attention); }
  .thread-bar__chip.is-internal { background: var(--gray-100); color: var(--gray-600); }
  .thread-bar__chip.is-recv2 { background: var(--st-done-bg); color: var(--st-done); }
  .thread-bar__btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-800);
    flex-shrink: 0;
  }
  .thread-bar__btn:hover { border-color: var(--navy-500); color: var(--navy-700); }
  .thread-bar__btn svg { width: 11px; height: 11px; stroke-width: 2; }

  /* ============================================================
     v0.4 — 필수값 대조 요약 블록
     ============================================================ */
  .field-summary {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
  }
  .field-summary__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  .field-summary__title {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .field-summary__title svg { width: 13px; height: 13px; color: var(--navy-600); stroke-width: 2; }
  .field-summary__btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: var(--navy-700);
    color: white;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 600;
  }
  .field-summary__btn:hover { background: var(--navy-800); }
  .field-summary__btn svg { width: 11px; height: 11px; stroke-width: 2.2; }
  .field-summary__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .field-stat {
    padding: 8px 10px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 3px solid var(--gray-300);
  }
  .field-stat.is-ok    { border-left-color: var(--st-done); background: var(--st-done-bg); }
  .field-stat.is-fix   { border-left-color: var(--st-progress); background: var(--st-progress-bg); }
  .field-stat.is-attn  { border-left-color: var(--st-attention); background: var(--st-attention-bg); }
  .field-stat.is-err   { border-left-color: var(--st-error); background: var(--st-error-bg); }
  .field-stat__num {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: var(--gray-900);
    margin-bottom: 2px;
  }
  .field-stat.is-ok    .field-stat__num { color: var(--st-done); }
  .field-stat.is-fix   .field-stat__num { color: var(--st-progress); }
  .field-stat.is-attn  .field-stat__num { color: var(--st-attention); }
  .field-stat.is-err   .field-stat__num { color: var(--st-error); }
  .field-stat__label {
    font-size: 10.5px;
    color: var(--gray-700);
    font-weight: 500;
  }

  /* ============================================================
     v0.4 — 시나리오 피커 (드롭다운)
     ============================================================ */
  .scenario-bar {
    padding: 10px 14px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .scenario-bar__label {
    font-size: 10.5px;
    color: var(--gray-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .scenario-picker {
    flex: 1;
    position: relative;
  }
  .scenario-picker__btn {
    width: 100%;
    height: 32px;
    padding: 0 12px;
    background: var(--navy-50);
    border: 1px solid var(--navy-100);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--navy-800);
    transition: all .15s;
  }
  .scenario-picker__btn:hover { border-color: var(--navy-500); }
  .scenario-picker__btn svg { width: 12px; height: 12px; stroke-width: 2.2; transition: transform .2s; }
  .scenario-picker.is-open .scenario-picker__btn svg { transform: rotate(180deg); }
  .scenario-picker__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 360px;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
  }
  .scenario-picker.is-open .scenario-picker__menu { display: block; }
  .scenario-item {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-150);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: background .12s;
  }
  .scenario-item:last-child { border-bottom: none; }
  .scenario-item:hover { background: var(--gray-50); }
  .scenario-item.is-active { background: var(--navy-50); }
  .scenario-item__num {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 5px;
    background: var(--navy-700);
    color: white;
    font-family: var(--font-display);
    font-size: 10.5px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
  .scenario-item__content { flex: 1; min-width: 0; }
  .scenario-item__title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
  }
  .scenario-item__sub {
    font-size: 11px;
    color: var(--gray-600);
    line-height: 1.4;
  }
  .scenario-item__phase {
    display: inline-block;
    padding: 1px 6px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-700);
    margin-top: 3px;
  }
  .scenario-item.is-error  .scenario-item__phase { background: var(--st-error-bg);  color: var(--st-error); }
  .scenario-item.is-attn   .scenario-item__phase { background: var(--st-attention-bg); color: var(--st-attention); }
  .scenario-item.is-done   .scenario-item__phase { background: var(--st-done-bg); color: var(--st-done); }
  .scenario-item.is-progress .scenario-item__phase { background: var(--st-progress-bg); color: var(--st-progress); }

  /* ============================================================
     v0.4 — 슬라이드 패널 (우측에서 슬라이드)
     ============================================================ */
  .slide-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 0;
    background: var(--white);
    box-shadow: -8px 0 24px rgba(10, 31, 68, 0.14);
    z-index: 950;
    transition: width .28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .slide-panel.is-open { width: min(880px, 90vw); }
  .slide-panel.is-narrow.is-open { width: min(640px, 80vw); }
  .slide-panel__head {
    height: 52px;
    padding: 0 18px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    background: var(--gray-50);
  }
  .slide-panel__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .slide-panel__title svg { width: 16px; height: 16px; color: var(--navy-700); stroke-width: 2; }
  .slide-panel__sub {
    font-size: 11.5px;
    color: var(--gray-600);
    margin-left: 6px;
    padding-left: 10px;
    border-left: 1px solid var(--gray-300);
  }
  .slide-panel__close {
    margin-left: auto;
    width: 30px; height: 30px;
    border-radius: var(--radius);
    color: var(--gray-700);
    display: flex; align-items: center; justify-content: center;
    transition: background .12s;
  }
  .slide-panel__close:hover { background: var(--gray-150); color: var(--gray-900); }
  .slide-panel__close svg { width: 16px; height: 16px; stroke-width: 2; }
  .slide-panel__body {
    flex: 1;
    overflow-y: auto;
    background: var(--gray-50);
  }
  .slide-panel__foot {
    padding: 12px 18px;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .slide-panel__foot-spacer { flex: 1; }
  .slide-panel__btn {
    height: 34px;
    padding: 0 14px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-800);
    font-size: 12.5px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .slide-panel__btn:hover { border-color: var(--gray-500); }
  .slide-panel__btn svg { width: 12px; height: 12px; stroke-width: 2; }
  .slide-panel__btn.is-primary {
    background: var(--navy-700);
    color: white;
    border-color: var(--navy-700);
  }
  .slide-panel__btn.is-primary:hover { background: var(--navy-800); border-color: var(--navy-800); }

  /* 슬라이드 패널 백드롭 */
  .slide-backdrop {
    position: fixed; inset: 0;
    background: rgba(10, 31, 68, 0.4);
    z-index: 940;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
  }
  .slide-backdrop.is-open { opacity: 1; visibility: visible; }

  /* ============================================================
     v0.4 — 원본 메일 뷰어
     ============================================================ */
  .mail-viewer { padding: 18px 20px; }
  .mail-viewer__head {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 14px;
  }
  .mail-viewer__subject {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 10px;
    line-height: 1.4;
  }
  .mail-viewer__rows {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 4px 10px;
    font-size: 12px;
  }
  .mail-viewer__rows dt {
    color: var(--gray-600);
    font-weight: 500;
  }
  .mail-viewer__rows dd { color: var(--gray-800); }
  .mail-viewer__body {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 18px 20px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--gray-800);
    white-space: pre-line;
  }
  .mail-viewer__attach-list {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-top: 12px;
  }
  .mail-viewer__attach-list-head {
    font-size: 11px;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-bottom: 8px;
  }
  .mail-viewer__attach-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--gray-800);
  }
  .mail-viewer__attach-item + .mail-viewer__attach-item { margin-top: 6px; }
  .mail-viewer__attach-item svg { width: 14px; height: 14px; color: var(--st-done); stroke-width: 2; flex-shrink: 0; }
  .mail-viewer__attach-name { font-weight: 500; }
  .mail-viewer__attach-size { color: var(--gray-500); margin-left: auto; font-size: 11px; }

  /* 본문 내 추출값 하이라이트 */
  .evidence-mark {
    background: linear-gradient(transparent 60%, #fef3d8 60%);
    padding: 0 1px;
    cursor: pointer;
    border-radius: 2px;
    transition: background .15s;
    position: relative;
  }
  .evidence-mark:hover {
    background: linear-gradient(transparent 30%, #fde6a8 30%);
  }
  .evidence-mark.is-target {
    background: var(--st-attention-bg);
    box-shadow: 0 0 0 2px var(--st-attention);
    border-radius: 3px;
    animation: pulse-mark 1.4s ease-out;
  }
  @keyframes pulse-mark {
    0%   { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.6); }
    100% { box-shadow: 0 0 0 8px rgba(217, 119, 6, 0); }
  }

  /* ============================================================
     v0.4 — 메일 이력 타임라인
     ============================================================ */
  .timeline { padding: 18px 20px; }
  .timeline__item {
    display: flex;
    gap: 14px;
    position: relative;
    padding-bottom: 16px;
  }
  .timeline__item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 28px;
    bottom: 0;
    width: 2px;
    background: var(--gray-250);
  }
  .timeline__dot {
    width: 30px; height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--white);
    border: 2px solid var(--gray-300);
    color: var(--gray-600);
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
    position: relative;
  }
  .timeline__dot svg { width: 13px; height: 13px; stroke-width: 2; }
  .timeline__item.is-recv .timeline__dot { background: var(--navy-100); border-color: var(--navy-500); color: var(--navy-700); }
  .timeline__item.is-send .timeline__dot { background: var(--st-attention-bg); border-color: var(--st-attention); color: var(--st-attention); }
  .timeline__item.is-internal .timeline__dot { background: var(--gray-100); border-color: var(--gray-400); color: var(--gray-700); }
  .timeline__item.is-recv2 .timeline__dot { background: var(--st-done-bg); border-color: var(--st-done); color: var(--st-done); }
  .timeline__item.is-error .timeline__dot { background: var(--st-error-bg); border-color: var(--st-error); color: var(--st-error); }
  .timeline__card {
    flex: 1;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .timeline__head {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    cursor: pointer;
    transition: background .12s;
  }
  .timeline__head:hover { background: var(--gray-50); }
  .timeline__type {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 700;
    flex-shrink: 0;
  }
  .timeline__item.is-recv     .timeline__type { background: var(--navy-100); color: var(--navy-700); }
  .timeline__item.is-send     .timeline__type { background: var(--st-attention-bg); color: var(--st-attention); }
  .timeline__item.is-internal .timeline__type { background: var(--gray-150); color: var(--gray-700); }
  .timeline__item.is-recv2    .timeline__type { background: var(--st-done-bg); color: var(--st-done); }
  .timeline__item.is-error    .timeline__type { background: var(--st-error-bg); color: var(--st-error); }
  .timeline__time {
    font-size: 11px;
    color: var(--gray-600);
    font-family: var(--font-mono);
  }
  .timeline__people {
    font-size: 12px;
    color: var(--gray-700);
    font-weight: 500;
  }
  .timeline__phase-tag {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--gray-700);
  }
  .timeline__expand-icon {
    width: 18px; height: 18px;
    color: var(--gray-500);
    transition: transform .2s;
  }
  .timeline__item.is-open .timeline__expand-icon { transform: rotate(180deg); }
  .timeline__body {
    padding: 0 14px 12px;
    border-top: 1px solid var(--gray-150);
    display: none;
  }
  .timeline__item.is-open .timeline__body { display: block; }
  .timeline__subject {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
    padding: 10px 0 6px;
  }
  .timeline__summary {
    font-size: 12px;
    color: var(--gray-700);
    line-height: 1.55;
    margin-bottom: 8px;
  }
  .timeline__attach {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--gray-700);
  }
  .timeline__attach svg { width: 11px; height: 11px; }
  .timeline__actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
  }
  .timeline__action-btn {
    padding: 4px 10px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--gray-700);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .timeline__action-btn:hover { border-color: var(--navy-500); color: var(--navy-700); }
  .timeline__action-btn svg { width: 11px; height: 11px; stroke-width: 2; }

  /* ============================================================
     v0.4 — 필수값 대조 화면 (좌우 2분할)
     ============================================================ */
  .compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    background: var(--gray-100);
    gap: 1px;
  }
  .compare__pane {
    background: var(--white);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  .compare__pane-head {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .compare__pane-head svg { width: 13px; height: 13px; color: var(--navy-700); stroke-width: 2; }

  /* 탭 (메일 본문 / 엑셀) */
  .compare-tabs {
    display: flex;
    gap: 0;
    margin-left: auto;
  }
  .compare-tab {
    padding: 4px 10px;
    background: transparent;
    border: 1px solid var(--gray-300);
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-700);
    text-transform: none;
    letter-spacing: 0;
  }
  .compare-tab + .compare-tab { border-left: none; }
  .compare-tab:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .compare-tab:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
  .compare-tab.is-active {
    background: var(--navy-700);
    color: white;
    border-color: var(--navy-700);
  }

  .compare__pane-body { flex: 1; padding: 16px; overflow-y: auto; }

  /* 메일 본문 표시 영역 */
  .compare__mail-body {
    font-size: 13px;
    line-height: 1.7;
    color: var(--gray-800);
    white-space: pre-line;
  }
  /* 엑셀 미리보기 */
  .compare__xlsx { font-family: var(--font-mono); font-size: 11.5px; }
  .compare__xlsx-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
  }
  .compare__xlsx-table th, .compare__xlsx-table td {
    border: 1px solid var(--gray-300);
    padding: 5px 8px;
    text-align: left;
    vertical-align: middle;
  }
  .compare__xlsx-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-800);
    font-size: 11px;
    position: sticky;
    top: 0;
  }
  .compare__xlsx-table .row-num {
    background: var(--gray-100);
    color: var(--gray-700);
    font-weight: 600;
    text-align: center;
    width: 32px;
  }
  .compare__xlsx-table td.cell-evidence {
    background: #fef3d8;
    box-shadow: inset 0 0 0 2px var(--st-attention);
  }
  .compare__xlsx-table td.cell-error {
    background: var(--st-error-bg);
    box-shadow: inset 0 0 0 2px var(--st-error);
    color: var(--st-error);
  }
  .compare__xlsx-table td.cell-fix {
    background: var(--st-progress-bg);
    box-shadow: inset 0 0 0 2px var(--st-progress);
    color: var(--st-progress);
    font-weight: 600;
  }
  .compare__xlsx-table td.cell-empty {
    background: var(--st-error-bg);
    color: var(--st-error);
    font-style: italic;
    font-weight: 600;
  }

  /* 추출 필드 테이블 */
  .compare__fields {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
  }
  .compare__field-row {
    display: grid;
    grid-template-columns: 110px 1fr 90px 70px;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-150);
    cursor: pointer;
    transition: background .12s;
    align-items: center;
  }
  .compare__field-row:last-child { border-bottom: none; }
  .compare__field-row:hover { background: var(--gray-50); }
  .compare__field-row.is-active {
    background: var(--navy-50);
    box-shadow: inset 3px 0 0 var(--navy-700);
  }
  .compare__field-section-head {
    padding: 8px 12px;
    background: var(--gray-100);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .compare__field-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-800);
  }
  .compare__field-value {
    font-size: 12px;
    color: var(--gray-900);
    font-family: var(--font-mono);
    word-break: break-all;
  }
  .compare__field-value.is-empty {
    color: var(--st-error);
    font-style: italic;
    font-family: var(--font-sans);
  }
  .compare__field-source {
    font-size: 10.5px;
    color: var(--gray-600);
    font-weight: 500;
    text-align: right;
  }
  .compare__field-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 700;
    background: var(--gray-100);
    color: var(--gray-700);
  }
  .compare__field-status.is-ok    { background: var(--st-done-bg);      color: var(--st-done); }
  .compare__field-status.is-fix   { background: var(--st-progress-bg);  color: var(--st-progress); }
  .compare__field-status.is-attn  { background: var(--st-attention-bg); color: var(--st-attention); }
  .compare__field-status.is-err   { background: var(--st-error-bg);     color: var(--st-error); }
  .compare__field-status.is-na    { background: var(--gray-100);        color: var(--gray-500); }

  /* ============================================================
     v0.4 — 다중 업무 탭 (CASE 12)
     ============================================================ */
  .task-tabs {
    display: flex;
    gap: 4px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 14px;
  }
  .task-tab {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border-radius: var(--radius-sm);
    text-align: left;
    transition: all .12s;
  }
  .task-tab:hover { background: var(--gray-50); }
  .task-tab.is-active { background: var(--navy-50); }
  .task-tab__num {
    font-size: 10.5px;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 2px;
  }
  .task-tab.is-active .task-tab__num { color: var(--navy-700); }
  .task-tab__title {
    font-size: 12.5px;
    color: var(--gray-800);
    font-weight: 600;
  }
  .task-tab.is-active .task-tab__title { color: var(--navy-900); }
  .task-tab__phase {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 6px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
  }
  .task-tab.is-active .task-tab__phase { background: var(--white); color: var(--navy-700); }

  /* ============================================================
     v0.4 — 알림 배너 (시나리오 별 강조 메시지)
     ============================================================ */
  .alert-banner {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    border-left: 3px solid;
    align-items: flex-start;
  }
  .alert-banner svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; stroke-width: 2; }
  .alert-banner__content { flex: 1; }
  .alert-banner__title {
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 2px;
  }
  .alert-banner__sub {
    font-size: 11.5px;
    line-height: 1.5;
  }
  .alert-banner.is-error    { background: var(--st-error-bg); border-left-color: var(--st-error); color: var(--st-error); }
  .alert-banner.is-attn     { background: var(--st-attention-bg); border-left-color: var(--st-attention); color: var(--st-attention); }
  .alert-banner.is-progress { background: var(--st-progress-bg); border-left-color: var(--st-progress); color: var(--st-progress-alt, var(--navy-800)); }
  .alert-banner.is-done     { background: var(--st-done-bg); border-left-color: var(--st-done); color: var(--st-done); }

  /* ============================================================
     모달 (승인/반려 확인)
     ============================================================ */
  .modal-overlay {
    position: fixed; inset: 0;
    background: rgba(10,31,68,0.55);
    backdrop-filter: blur(2px);
    z-index: 100;
    display: none;
    align-items: center; justify-content: center;
    padding: 24px;
    animation: fadeIn 0.18s ease;
  }
  .modal-overlay.is-open { display: flex; }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

  .modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 1180px;
    max-height: calc(100vh - 48px);
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.22s ease;
  }
  @keyframes slideUp {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
  }

  .modal__header {
    padding: 18px 24px 14px;
    border-bottom: 1px solid var(--gray-200);
    display: flex; align-items: flex-start; gap: 16px;
  }
  .modal__head-main { flex: 1; }
  .modal__head-label {
    font-family: var(--font-display);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  .modal--confirm .modal__head-label { color: var(--st-done); }
  .modal--reject  .modal__head-label { color: var(--st-error); }
  .modal__head-title {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
  }
  .modal__head-sub {
    font-size: 12.5px;
    color: var(--gray-600);
    margin-top: 4px;
  }
  .modal__close {
    width: 32px; height: 32px;
    border-radius: 6px;
    color: var(--gray-500);
    display: flex; align-items: center; justify-content: center;
  }
  .modal__close:hover { background: var(--gray-100); color: var(--gray-900); }
  .modal__close svg { width: 16px; height: 16px; }

  .modal__warn {
    background: linear-gradient(180deg, var(--st-error-bg), #fce6e7);
    border-bottom: 1px solid #f0b1b3;
    padding: 10px 24px;
    display: flex; align-items: center; gap: 10px;
    font-size: 12.5px;
    color: #7d181c;
  }
  .modal__warn svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--st-error); }
  .modal__warn strong { font-weight: 700; }

  .modal__body {
    flex: 1;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .modal__col {
    display: flex; flex-direction: column;
    overflow-y: auto;
    background: var(--gray-50);
  }
  .modal__col + .modal__col {
    border-left: 1px solid var(--gray-200);
    background: white;
  }

  .modal__col-head {
    padding: 12px 22px 10px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex; align-items: center; gap: 8px;
    position: sticky; top: 0; z-index: 1;
    flex-shrink: 0;
  }
  .modal__col + .modal__col .modal__col-head {
    background: var(--gray-50);
  }
  .modal__col-head .icon {
    width: 18px; height: 18px;
    color: var(--navy-700);
  }
  .modal__col-head .title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .modal__col-body { padding: 16px 22px 24px; }
  .modal__section { margin-bottom: 18px; }
  .modal__section:last-child { margin-bottom: 0; }
  .modal__section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
  }
  .modal__section-title .pill { font-size: 9.5px; padding: 1px 6px; }

  /* 엑셀 미리보기 */
  .xls-preview {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
  }
  .xls-preview__bar {
    background: linear-gradient(180deg, #f1f5f9, #e7ebf1);
    padding: 6px 10px;
    font-size: 10.5px;
    color: var(--gray-700);
    font-weight: 600;
    display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid var(--gray-250);
  }
  .xls-preview__sheet {
    display: inline-flex; align-items: center;
    height: 18px; padding: 0 8px;
    background: white;
    border: 1px solid var(--gray-300);
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    font-size: 10px;
    margin-right: -1px;
    margin-bottom: -7px;
  }
  .xls-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    font-family: var(--font-mono);
  }
  .xls-table th {
    background: #d4dae2;
    padding: 4px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    font-size: 10px;
    width: 36px;
  }
  .xls-table th.col { background: var(--gray-150); text-align: center; color: var(--gray-600); }
  .xls-table td {
    padding: 4px 8px;
    border: 1px solid var(--gray-200);
    color: var(--gray-900);
    font-weight: 400;
  }
  .xls-table td.row-num {
    background: var(--gray-150);
    color: var(--gray-600);
    text-align: center;
    font-weight: 600;
    font-size: 10px;
    width: 30px;
  }
  .xls-table td.is-meta { background: #fef3d8; font-weight: 500; }
  .xls-table td.is-error {
    background: #fde6e7;
    color: var(--st-error);
    font-weight: 500;
    position: relative;
  }
  .xls-table td.is-fixed {
    background: var(--st-done-bg);
    color: var(--st-done);
    font-weight: 500;
  }

  /* 결과 카드 */
  .result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .result-item {
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 5px;
  }
  .result-item__label { font-size: 10.5px; color: var(--gray-600); margin-bottom: 2px; }
  .result-item__value { font-size: 13px; font-weight: 600; color: var(--gray-900); }
  .result-item__value.mono { font-family: var(--font-mono); font-size: 12px; }
  .result-item.is-full { grid-column: 1 / -1; }

  /* 회신 초안 */
  .reply-draft {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
  }
  .reply-draft__head {
    background: var(--gray-50);
    padding: 8px 14px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 11.5px;
    color: var(--gray-700);
    line-height: 1.7;
  }
  .reply-draft__head strong { color: var(--gray-900); font-weight: 600; }
  .reply-draft__subject {
    font-size: 13px; font-weight: 700; color: var(--gray-900);
    padding: 8px 14px 6px;
    border-bottom: 1px dashed var(--gray-200);
  }
  .reply-draft__body {
    padding: 12px 14px;
    font-size: 12px;
    color: var(--gray-800);
    line-height: 1.7;
    white-space: pre-line;
    background: white;
    min-height: 140px;
  }
  .reply-draft__body[contenteditable="true"]:focus {
    outline: 2px solid var(--navy-400);
    outline-offset: -1px;
    background: #fffef7;
  }

  /* 반려 사유 선택 */
  .reject-reasons { display: flex; flex-direction: column; gap: 6px; }
  .reject-reason {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.12s;
  }
  .reject-reason:hover { border-color: var(--gray-400); background: var(--gray-50); }
  .reject-reason input[type="checkbox"] {
    margin-top: 1px;
    accent-color: var(--st-error);
    width: 14px; height: 14px;
    cursor: pointer;
  }
  .reject-reason__main { flex: 1; }
  .reject-reason__title { font-size: 12px; font-weight: 600; color: var(--gray-900); }
  .reject-reason__desc { font-size: 11px; color: var(--gray-600); margin-top: 1px; line-height: 1.5; }
  .reject-reason input[type="checkbox"]:checked + .reject-reason__main .reject-reason__title { color: var(--st-error); }
  .reject-reason:has(input:checked) {
    border-color: var(--st-error);
    background: var(--st-error-bg);
  }

  .modal__footer {
    padding: 14px 24px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    display: flex; gap: 8px; align-items: center;
    flex-shrink: 0;
  }
  .modal__footer-info {
    font-size: 11.5px;
    color: var(--gray-600);
    margin-right: auto;
    display: flex; align-items: center; gap: 8px;
  }
  .modal__footer-info svg { width: 13px; height: 13px; color: var(--st-attention); }

  /* 토스트 */
  .toast {
    position: fixed;
    bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--gray-900);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    display: flex; align-items: center; gap: 8px;
  }
  .toast.is-show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
  .toast svg { width: 16px; height: 16px; color: var(--st-done); }
  .toast.is-error svg { color: var(--st-error); }

  /* Empty state for non-selected mails */
  .detail__empty {
    display: flex; align-items: center; justify-content: center;
    height: 100%;
    color: var(--gray-500);
    flex-direction: column;
    gap: 12px;
  }
  .detail__empty svg { width: 40px; height: 40px; opacity: 0.4; }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
  ::-webkit-scrollbar-thumb:hover { background: var(--gray-400); border: 2px solid transparent; background-clip: padding-box; }

  /* 디자인 가이드 노트 */
  .design-note {
    position: fixed;
    bottom: 16px;
    right: 16px;
    background: rgba(10,31,68,0.92);
    color: white;
    font-size: 10.5px;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 50;
    pointer-events: none;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    max-width: 220px;
    line-height: 1.5;
  }

  /* 반응형 - 좁은 화면 보호 */
  @media (max-width: 1280px) {
    :root { --w-rail: 200px; --w-list: 340px; }
    .detail__inner { padding: 16px 20px 60px; }
    .status-card__bottom { grid-template-columns: repeat(2, 1fr); }
    .status-fact:nth-child(2) { border-right: none; }
    .status-fact:nth-child(1), .status-fact:nth-child(2) { border-bottom: 1px solid var(--gray-200); }
  }

  /* ============================================================
     v0.4 추가 CSS — 렌더 코드용 클래스
     ============================================================ */

  /* suggestions-card / suggestion */
  .suggestions-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
  }
  .suggestions-card__head {
    padding: 12px 16px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--gray-150);
    background: var(--gray-50);
  }
  .suggestions-card__title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
  }
  .suggestions-card__sub {
    font-size: 11px;
    color: var(--gray-500);
    margin-left: auto;
  }
  .suggestions { padding: 6px; }
  .suggestion {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.1s;
  }
  .suggestion + .suggestion { margin-top: 2px; }
  .suggestion:hover { background: var(--gray-50); }
  .suggestion__icon {
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gray-100);
    color: var(--gray-600);
  }
  .suggestion__icon svg { width: 14px; height: 14px; stroke-width: 2; }
  .suggestion.is-attn     .suggestion__icon { background: var(--st-attention-bg); color: var(--st-attention); }
  .suggestion.is-info     .suggestion__icon { background: var(--navy-50);         color: var(--navy-700); }
  .suggestion.is-progress .suggestion__icon { background: var(--st-progress-bg);  color: var(--st-progress); }
  .suggestion.is-done     .suggestion__icon { background: var(--st-done-bg);      color: var(--st-done); }
  .suggestion.is-error    .suggestion__icon { background: var(--st-error-bg);     color: var(--st-error); }
  .suggestion__main { min-width: 0; }
  .suggestion__title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.4;
  }
  .suggestion__desc {
    font-size: 11.5px;
    color: var(--gray-600);
    margin-top: 2px;
    line-height: 1.5;
  }
  .suggestion__status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    background: var(--gray-100);
    color: var(--gray-700);
    flex-shrink: 0;
  }
  .suggestion.is-attn     .suggestion__status { background: var(--st-attention-bg); color: var(--st-attention); }
  .suggestion.is-info     .suggestion__status { background: var(--navy-50);         color: var(--navy-700); }
  .suggestion.is-progress .suggestion__status { background: var(--st-progress-bg);  color: var(--st-progress); }
  .suggestion.is-done     .suggestion__status { background: var(--st-done-bg);      color: var(--st-done); }
  .suggestion.is-error    .suggestion__status { background: var(--st-error-bg);     color: var(--st-error); }

  /* phases-card */
  .phases-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
  }
  .phases-card__head {
    padding: 12px 16px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--gray-150);
    background: var(--gray-50);
  }
  .phases-card__title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
  }
  .phases-card__hint {
    font-size: 11px;
    color: var(--gray-500);
    margin-left: auto;
  }
  .phases {
    display: flex;
    align-items: stretch;
    padding: 18px 20px;
    gap: 4px;
  }
  .phase {
    flex: 1;
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 8px;
    transition: background 0.12s;
    min-width: 0;
  }
  .phase:hover { background: var(--gray-50); }
  .phase__connector {
    flex: 0 0 24px;
    height: 2px;
    background: var(--gray-200);
    margin-top: 22px;
    align-self: flex-start;
  }
  .phase__num {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
  }
  .phase__icon { width: 18px; height: 18px; }
  .phase.is-done .phase__num,
  .phase.is-error .phase__num,
  .phase.is-attention .phase__num { display: none; }
  .phase__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: 8px;
    line-height: 1.3;
  }
  .phase__desc {
    font-size: 10.5px;
    color: var(--gray-500);
    margin-top: 2px;
    line-height: 1.4;
    max-width: 120px;
  }
  .phase.is-wait .phase__label { color: var(--gray-500); font-weight: 500; }
  .phase.is-active { background: var(--navy-50); }

  /* phase-detail (재정의 — 기존 거 위에 약간 보강) */
  /* phase-detail 클래스는 이미 v0.3에 정의되어 있음 */

  /* action-bar v0.4 — 새 구조 */
  .action-bar {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
  }
  .action-bar__head {
    padding: 12px 16px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--gray-150);
    background: var(--gray-50);
  }
  .action-bar__title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
  }
  .action-bar__sub {
    font-size: 11px;
    color: var(--gray-500);
    margin-left: auto;
  }
  .actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--gray-200);
  }
  .action {
    background: white;
    text-align: left;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.12s;
    display: flex; align-items: center; gap: 10px;
    border: none;
    font-family: inherit;
  }
  .action:hover { background: var(--gray-50); }
  .action__main { flex: 1; min-width: 0; }
  .action__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.4;
  }
  .action__desc {
    font-size: 11.5px;
    color: var(--gray-600);
    margin-top: 3px;
    line-height: 1.5;
  }
  .action__arrow { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 2.4; }
  .action.is-primary .action__arrow { color: white; }
  .action.is-secondary .action__arrow { color: var(--st-attention); }
  .action.is-primary {
    background: var(--navy-700);
  }
  .action.is-primary .action__title { color: white; }
  .action.is-primary .action__desc  { color: rgba(255,255,255,0.78); }
  .action.is-primary:hover { background: var(--navy-800); }
  .action.is-secondary { background: white; }
  .action.is-secondary .action__title { color: var(--st-attention); }
  .action.is-tertiary  { background: var(--gray-50); }
  .action.is-tertiary .action__title { color: var(--gray-700); }
  .action.is-disabled {
    background: var(--gray-100);
    cursor: not-allowed;
    opacity: 0.65;
  }
  .action.is-disabled .action__title { color: var(--gray-500); }
  .action.is-disabled .action__desc  { color: var(--gray-500); }

  /* coll-card */
  .coll-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
  }
  .coll-card__head {
    padding: 12px 16px;
    display: flex; align-items: center; gap: 10px;
    cursor: pointer;
    transition: background 0.12s;
    background: white;
  }
  .coll-card__head:hover { background: var(--gray-50); }
  .coll-card__title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
    display: flex; align-items: center; gap: 8px;
  }
  .coll-card__title svg { width: 14px; height: 14px; color: var(--navy-700); stroke-width: 2; }
  .coll-card__hint {
    font-size: 11.5px;
    color: var(--gray-500);
    flex: 1;
  }
  .coll-card__action {
    font-size: 11.5px;
    color: var(--navy-700);
    font-weight: 600;
    background: transparent;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.12s;
  }
  .coll-card__action:hover { background: var(--navy-50); border-color: var(--navy-500); }
  .coll-card__chev {
    width: 14px; height: 14px;
    color: var(--gray-500);
    stroke-width: 2;
    transition: transform 0.18s;
  }
  .coll-card.is-open .coll-card__chev { transform: rotate(180deg); }
  .coll-card__body {
    display: none;
    padding: 14px 16px;
    border-top: 1px solid var(--gray-150);
    background: var(--gray-50);
  }
  .coll-card.is-open .coll-card__body { display: block; }

  /* meta-list */
  .meta-list {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 6px 14px;
    margin: 0;
    font-size: 12.5px;
  }
  .meta-list dt {
    color: var(--gray-600);
    font-weight: 500;
  }
  .meta-list dd {
    margin: 0;
    color: var(--gray-900);
  }

  /* btn (모달 푸터용) */
  .btn {
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-800);
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    transition: all 0.12s;
    font-family: inherit;
  }
  .btn:hover { background: var(--gray-50); border-color: var(--gray-400); }
  .btn svg { width: 14px; height: 14px; stroke-width: 2.2; }
  .btn--primary {
    background: var(--navy-700);
    color: white;
    border-color: var(--navy-700);
  }
  .btn--primary:hover { background: var(--navy-800); border-color: var(--navy-800); }
  .btn--secondary { /* default styles already match */ }

  /* ============================================================
     v0.4.1 — 메일 카드 업무분류 칩 + 필터 카운트 + 단계 상세
     ============================================================ */

  /* 메일 카드: 업무분류 칩 행 */
  .mail__class {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 6px 0 0;
    flex-wrap: wrap;
  }
  .mail__class-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
  }
  .mail__class-chip.is-primary {
    background: var(--navy-50);
    color: var(--navy-700);
    border: 1px solid var(--navy-100);
  }
  .mail__class-chip.is-detail {
    background: var(--gray-100);
    color: var(--gray-700);
    font-weight: 500;
    border: 1px solid var(--gray-200);
  }
  .mail__class-chip.is-secondary {
    background: var(--st-progress-bg);
    color: var(--st-progress);
    border: 1px solid #c7d6f0;
  }
  .mail__class-chip.is-pending {
    background: var(--st-attention-bg);
    color: var(--st-attention);
    border: 1px solid #f3c87a;
  }
  .mail__class-edit {
    width: 18px; height: 18px;
    margin-left: auto;
    border-radius: 4px;
    background: transparent;
    color: var(--gray-400);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border: none;
    transition: all 0.12s;
  }
  .mail__class-edit:hover {
    background: var(--gray-150);
    color: var(--gray-700);
  }
  .mail__class-edit svg { width: 11px; height: 11px; stroke-width: 2; }

  .mail__plan {
    color: var(--gray-500);
    font-size: 10.5px;
    font-family: var(--font-mono);
    margin-left: 6px;
  }

  /* 필터 칩 카운트 */
  .list__chip-count {
    display: inline-block;
    margin-left: 4px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    background: var(--white);
    color: inherit;
    min-width: 14px;
    text-align: center;
    border: 1px solid currentColor;
    line-height: 1.4;
    opacity: 0.7;
  }
  .list__chip.is-active .list__chip-count {
    background: var(--navy-700);
    color: white;
    border-color: var(--navy-700);
    opacity: 1;
  }

  /* ============================================================
     단계 상세 — phase-detail 안의 "pd-*" 블록 (rich content)
     ============================================================ */
  .phase-detail__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
  }
  .phase-detail__num {
    background: var(--navy-700);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
  }
  .phase-detail__title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
  }
  .phase-detail__close {
    margin-left: auto;
    padding: 5px 10px;
    border-radius: 4px;
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
    transition: all 0.12s;
  }
  .phase-detail__close:hover { background: var(--gray-100); }
  .phase-detail__close svg { width: 11px; height: 11px; stroke-width: 2; }
  /* v0.3 grid 레이아웃을 무력화 — pd-grid와 pd-actions가 자연스럽게 세로로 쌓이도록 */
  .phase-detail__body {
    display: block;
    padding: 14px 16px 18px;
  }

  /* pd 그리드 (2-col 카드, 좁으면 1-col로) */
  .pd-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 12px;
    margin-bottom: 14px;
  }
  @media (max-width: 1180px) {
    .pd-grid { grid-template-columns: 1fr; }
  }

  .pd-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    min-width: 0;
  }
  .pd-card__head {
    padding: 9px 12px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-900);
    display: flex; align-items: center;
  }
  .pd-card__body { padding: 12px; }

  .pd-row {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 10px;
    padding: 6px 0;
    align-items: baseline;
    border-bottom: 1px dashed var(--gray-150);
    font-size: 12px;
    line-height: 1.55;
  }
  .pd-row:last-child { border-bottom: none; }
  .pd-row .lab {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 11.5px;
  }
  .pd-row .val {
    color: var(--gray-900);
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .pd-row .val strong { color: var(--navy-800); font-weight: 700; }

  .pd-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .pd-stats:has(.pd-stat:nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); }
  .pd-stat {
    padding: 8px 10px;
    border-radius: 6px;
    border-left: 3px solid var(--gray-300);
    background: var(--gray-50);
    min-width: 0;
  }
  .pd-stat.is-ok   { border-left-color: var(--st-done);      background: var(--st-done-bg); }
  .pd-stat.is-fix  { border-left-color: var(--st-progress);  background: var(--st-progress-bg); }
  .pd-stat.is-attn { border-left-color: var(--st-attention); background: var(--st-attention-bg); }
  .pd-stat.is-err  { border-left-color: var(--st-error);     background: var(--st-error-bg); }
  .pd-stat .num {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    color: var(--gray-700);
  }
  .pd-stat.is-ok   .num { color: var(--st-done); }
  .pd-stat.is-fix  .num { color: var(--st-progress); }
  .pd-stat.is-attn .num { color: var(--st-attention); }
  .pd-stat.is-err  .num { color: var(--st-error); }
  .pd-stat .lbl {
    font-size: 10.5px;
    color: var(--gray-700);
    margin-top: 4px;
    font-weight: 500;
  }

  .pd-list-head {
    margin-top: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-700);
  }
  .pd-list-item {
    padding: 4px 0;
    font-size: 11.5px;
    color: var(--gray-800);
    line-height: 1.5;
  }
  .pd-list-item.is-err { color: var(--st-error); }

  .pd-mail-preview {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 10px 12px;
    font-family: var(--font-sans);
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--gray-800);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-height: 220px;
    overflow-y: auto;
  }

  /* 액션 버튼 — 카드 아래에 좌측 정렬로 깔끔하게 */
  .pd-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
  }
  .pd-btn {
    height: 34px;
    padding: 0 14px;
    border-radius: 5px;
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-800);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
    white-space: nowrap;
  }
  .pd-btn:hover { background: var(--gray-50); border-color: var(--gray-400); }
  .pd-btn--primary {
    background: var(--navy-700);
    color: white;
    border-color: var(--navy-700);
  }
  .pd-btn--primary:hover { background: var(--navy-800); border-color: var(--navy-800); }

/* ════════════════════════════════════════════════════════════════
   데이터 출처 뱃지 (메일 카드)
   ────────────────────────────────────────────────────────────────
   source: 'real'      → 뱃지 없음 (실제 메일)
   source: 'prototype' → 보라색 "프로토타입" 뱃지
   source: 'demo'      → 회색 "데모" 뱃지
   
   메일 카드 1행 (발신자/시간) 우측에 작게 표시.
   필터로 숨김/보임 가능.
   ════════════════════════════════════════════════════════════════ */
.mail__source-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  font-size: 9.5px;
  font-weight: 600;
  border-radius: 3px;
  letter-spacing: 0.02em;
  margin-right: 6px;
  flex-shrink: 0;
}
.mail__source-badge.is-prototype {
  background: #f0e8fa;
  color: #532e7d;
  border: 1px solid #d8c4ec;
}
.mail__source-badge.is-demo {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}
.mail__source-badge::before {
  content: '🧪';
  font-size: 9px;
}
.mail__source-badge.is-demo::before {
  content: '◯';
}

/* 프로토타입 카드는 좌측 보더에 미묘한 보라색 strip 추가 (선택적) */
.mail.is-prototype {
  position: relative;
}
.mail.is-prototype::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #6b3fa0;
  opacity: 0.4;
  border-radius: 6px 0 0 6px;
}

/* 필터 칩에서 프로토타입 토글 */
.list__chip.is-prototype-toggle {
  background: #f0e8fa;
  color: #532e7d;
  border-color: #d8c4ec;
}
.list__chip.is-prototype-toggle.is-active {
  background: #6b3fa0;
  color: white;
}
