:root {
  --bg: #f5f5f4;
  --surface: #ffffff;
  --row-alt: #fafaf7;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --text: #1c1917;
  --text-muted: #78716c;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #b91c1c;
  --warn: #dc2626;

  --status-작업전: #94a3b8;
  --status-작업중: #0ea5e9;
  --status-초안: #a855f7;
  --status-수정: #f59e0b;
  --status-대기보류: #64748b;
  --status-완료: #10b981;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, system-ui, sans-serif;
  font-size: 17px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.muted.small { font-size: 15px; }
.spacer { flex: 1; }

/* ---------- 로그인 ---------- */
.login {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}
.login-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 40px 36px; width: 360px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  text-align: center;
}
.login-box h1 { margin: 0 0 8px; font-size: 25px; font-weight: 700; letter-spacing: -0.02em; }
.login-box p { margin: 0 0 24px; font-size: 16px; }
.login-box .btn { width: 100%; padding: 11px; font-size: 17px; }
.error { color: var(--danger); font-size: 15px; margin-top: 12px !important; }

/* ---------- 상단바 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.logo { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 8px; }
.logo-img { width: 28px; height: 28px; vertical-align: middle; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.link-btns {
  display: flex; gap: 8px; margin-left: 12px;
  flex: 1;
}
.link-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 6px;
  font-size: 15px; font-weight: 600;
  text-decoration: none; color: white;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.link-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.link-home { background: #1e40af; }
.link-kakao { background: #fae100; color: #3c1e1e; }
.link-telegram { background: #229ed9; }
.link-mail { background: #2563eb; }
.link-estimate { background: #7c3aed; }

.daily-quote {
  margin-left: 14px;
  font-family: 'Nanum Myeongjo', 'Noto Serif KR', 'Batang', serif;
  font-size: 16px;
  color: #78716c;
  font-style: italic;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
}
.duty-name {
  margin-left: 4px;
  font-size: 16px;
  font-weight: 500;
  color: #78716c;
}
.duty-name:not(:empty)::before {
  content: "주번: ";
  color: #a8a29e;
  font-weight: 400;
  margin-right: 2px;
}
.user-name { font-size: 16px; color: var(--text-muted); }
.user-name .admin-tag {
  display: inline-block; margin-left: 6px; padding: 2px 6px;
  background: var(--accent); color: white; border-radius: 4px;
  font-size: 13.5px; font-weight: 600;
}

/* ---------- 필터바 ---------- */
.filterbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; background: var(--surface);
  border-bottom: 1px solid var(--border); gap: 16px; flex-wrap: wrap;
}
.tabs { display: flex; gap: 0; background: var(--bg); padding: 3px; border-radius: 8px; }
.tab {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 6px;
  font-size: 16px; font-weight: 500; color: var(--text-muted); cursor: pointer;
  font-family: inherit; position: relative;
}
/* 탭 사이 연한 세로선 */
.tab + .tab::before {
  content: "";
  position: absolute; left: 0; top: 20%; height: 60%;
  width: 1px; background: var(--border-strong);
}
/* 활성탭 앞뒤 세로선 숨김 */
.tab.active::before,
.tab.active + .tab::before { opacity: 0; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

.filters { display: flex; gap: 8px; align-items: center; }
.input, .select {
  height: 32px; padding: 0 10px; border: 1px solid var(--border-strong);
  border-radius: 6px; background: var(--surface); font-size: 16px;
  font-family: inherit; color: var(--text);
}
.input { width: 260px; }
.input:focus, .select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 6px; font-size: 16px;
  font-weight: 500; font-family: inherit; cursor: pointer; border: 1px solid transparent;
  transition: background 0.12s, color 0.12s;
}
.btn.primary { background: var(--accent); color: white; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--border-strong); }
.btn.danger:hover { background: var(--danger); color: white; border-color: var(--danger); }
.btn.icon { width: 32px; padding: 0; background: transparent; border-color: transparent; color: var(--text-muted); }
.btn.icon:hover { background: var(--bg); color: var(--text); }

/* ---------- 내보내기 드롭다운 ---------- */
.export-wrap { position: relative; }
.export-menu {
  position: absolute; top: calc(100% + 4px); right: 0;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  min-width: 140px; z-index: 50; overflow: hidden;
}
.export-menu button {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent; padding: 8px 12px;
  font-size: 16px; font-family: inherit; color: var(--text); cursor: pointer;
}
.export-menu button:hover { background: var(--bg); }

/* ---------- 테이블 ---------- */
.table-wrap { padding: 0 24px 40px; overflow-x: clip; }
table.orders {
  width: auto; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
  margin-top: 16px; font-size: 15px;
  table-layout: auto;
}
.orders thead th {
  text-align: center; padding: 6px 6px; font-weight: 600; font-size: 14px;
  color: var(--text-muted); background: #f5f5f1; border-bottom: 1px solid var(--border-strong);
  border-right: 1px solid var(--border-strong);
  letter-spacing: 0.02em; white-space: nowrap;
  position: sticky; top: 0; z-index: 5;
}
.orders thead th:last-child { border-right: 0; }
.orders tbody td {
  padding: 5px 6px; border-bottom: 1px solid var(--border);
  border-right: 1px solid #e2e0de;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.orders tbody td:last-child { border-right: 0; }

/* zebra stripe */
.orders tbody tr:nth-child(even) td { background: var(--row-alt); }
.orders tbody tr { cursor: pointer; transition: background 0.08s; }
.orders tbody tr:hover td { background: #f1f5f4 !important; }
.orders tbody tr:last-child td { border-bottom: 0; }

/* 첫 셀(플래그)에 담당자 컬러바 */
.orders tbody tr td:first-child {
  border-left: 4px solid transparent;
  text-align: center;
  padding: 6px 4px;
  width: 28px;
}
.orders.show-owner-color tbody tr td:first-child {
  border-left-color: var(--owner-color, transparent);
}

.owner-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle; background: var(--owner-color, #d6d3d1);
}

/* 안 읽은 코멘트 빨간 점 */
.unread-flag {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--warn); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.col-flag { width: 16px; min-width: 16px; padding: 0; }
.col-owner { min-width: 50px; max-width: 120px; }
.col-channel { min-width: 36px; max-width: 120px; }
.col-date { min-width: 46px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.col-item { max-width: 120px; }      /* 약 10자 */
.col-qty { min-width: 30px; text-align: right; }
.col-spec { max-width: 120px; }      /* 약 10자 */
.col-content { max-width: 120px; }   /* 약 10자 */
.col-client { min-width: 50px; max-width: 120px; }
.col-contact { min-width: 80px; max-width: 120px; }
.col-vendor { min-width: 50px; max-width: 120px; }
.col-delivery { min-width: 46px; white-space: nowrap; }
.col-payment { max-width: 120px; }   /* 약 10자 */
.col-status { min-width: 54px; white-space: nowrap; }
.col-delivered { min-width: 44px; text-align: center; }
.col-docsaved { min-width: 56px; text-align: center; }
.delivered-check { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
.docsaved-check { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
.col-printorder { min-width: 52px; text-align: center; }
.btn-printorder {
  border: 1px solid var(--accent); background: transparent; color: var(--accent);
  border-radius: 5px; padding: 3px 8px; font-size: 14.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn-printorder:hover { background: var(--accent); color: white; }
.cell-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.cell-num { text-align: right; white-space: nowrap; }

.status-pill {
  display: inline-block; padding: 3px 9px; border-radius: 11px;
  font-size: 14.5px; font-weight: 500; color: white; white-space: nowrap;
}
.status-pill[data-s="작업전"] { background: var(--status-작업전); }
.status-pill[data-s="작업중"] { background: var(--status-작업중); }
.status-pill[data-s="초안"] { background: var(--status-초안); }
.status-pill[data-s="수정"] { background: var(--status-수정); }
.status-pill[data-s="대기,보류"] { background: var(--status-대기보류); }
.status-pill[data-s="완료"] { background: var(--status-완료); }

.empty {
  padding: 60px 20px; text-align: center; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  margin-top: 16px;
}

.footnote { font-size: 14.5px; margin: 12px 4px 0; }

/* 지출 기록 */
.tab-separated { margin-left: 40px !important; border-left: 2px solid var(--border); padding-left: 24px !important; }
.expense-section { margin-top: 16px; padding: 24px; background: #fafaf7; border-radius: 12px; border: 1px solid var(--border); max-width: 900px; }
.expense-header h2 { font-size: 20px; margin-bottom: 16px; color: var(--text); }
.expense-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.expense-form input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; }
.expense-form input[type="date"] { width: 140px; }
.expense-form input#exp_content { flex: 1; min-width: 200px; }
.expense-form input#exp_item { width: 140px; }
.expense-form input#exp_amount { width: 120px; text-align: right; }
.expense-form button { padding: 8px 20px; }
.expense-month-pick { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0 4px; }
.expense-month-pick select,
.expense-month-pick input[type="date"] { padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; margin-left: 6px; }
.expense-total { font-size: 16px; font-weight: 700; color: var(--accent); }
.expense-list-wrap { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.estimate-section .expense-list-wrap { overflow-x: visible; overflow-y: visible; }
.expense-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.expense-table thead th { background: #f5f5f1; padding: 8px 10px; text-align: center; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.expense-table tbody td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.expense-table tbody td:nth-child(1) { white-space: nowrap; }
.expense-table tbody td:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expense-table tbody tr:hover { background: #fafafa; }
.expense-table .amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.expense-table .del-btn { background: none; border: none; color: #dc2626; cursor: pointer; font-size: 14px; padding: 4px 8px; }
.expense-table .del-btn:hover { background: #fee2e2; border-radius: 4px; }

/* 견적 */
.estimate-section { margin-top: 16px; padding: 24px; background: #fafaf7; border-radius: 12px; border: 1px solid var(--border); max-width: 1320px; }
.estimate-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.est-field { display: flex; flex-direction: column; gap: 3px; }
.est-field > span { font-size: 12px; color: #666; font-weight: 500; padding-left: 2px; }
.est-field > input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; width: 100%; box-sizing: border-box; }
.est-form-buttons { display: flex; gap: 6px; align-items: flex-end; }
.estimate-form button { padding: 8px 16px; }
.estimate-table { width: 100%; max-width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.estimate-table thead th { background: #f5f5f1; padding: 8px 7px; text-align: center; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border-strong); white-space: nowrap; font-size: 13px; }
.estimate-table tbody td { padding: 8px 7px; border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.estimate-table tbody tr { cursor: pointer; }
.estimate-table tbody tr:hover { background: #fafafa; }
.estimate-table tbody tr.not-mine { cursor: default; }
.estimate-table .amount { text-align: right; font-variant-numeric: tabular-nums; }
.estimate-table .price-cell { font-weight: 700; color: #111; }
.estimate-table .cost-cell { color: #888; }
.estimate-table .del-btn { background: none; border: none; color: #dc2626; cursor: pointer; font-size: 14px; padding: 4px 6px; }
.estimate-table .del-btn:hover { background: #fee2e2; border-radius: 4px; }
.estimate-table tbody tr.editing { background: #fef3c7; }
/* 견적 표: 전체 폭은 종례 표처럼 100%, 메모칸만 남는 공간 사용 */
#estimateSection .estimate-table th:nth-child(1), #estimateSection .estimate-table td:nth-child(1) { width: 34px !important; text-align: center; }
#estimateSection .estimate-table th:nth-child(2), #estimateSection .estimate-table td:nth-child(2) { width: 82px !important; font-variant-numeric: tabular-nums; }
#estimateSection .estimate-table th:nth-child(3), #estimateSection .estimate-table td:nth-child(3) { width: 70px !important; }
#estimateSection .estimate-table th:nth-child(4), #estimateSection .estimate-table td:nth-child(4) { width: 45px !important; text-align: center; }
#estimateSection .estimate-table th:nth-child(5), #estimateSection .estimate-table td:nth-child(5) { width: 200px !important; }
#estimateSection .estimate-table th:nth-child(6), #estimateSection .estimate-table td:nth-child(6) { width: 120px !important; }
#estimateSection .estimate-table th:nth-child(7), #estimateSection .estimate-table td:nth-child(7) { width: 80px !important; }
#estimateSection .estimate-table th:nth-child(8), #estimateSection .estimate-table td:nth-child(8) { width: 110px !important; }
#estimateSection .estimate-table th:nth-child(9), #estimateSection .estimate-table td:nth-child(9) { width: 76px !important; }
#estimateSection .estimate-table th:nth-child(10), #estimateSection .estimate-table td:nth-child(10) { width: 72px !important; }
#estimateSection .estimate-table th:nth-child(11), #estimateSection .estimate-table td:nth-child(11) { width: 76px !important; }
#estimateSection .estimate-table th:nth-child(12), #estimateSection .estimate-table td:nth-child(12) { width: auto !important; min-width: 260px; }
#estimateSection .estimate-table th:nth-child(13), #estimateSection .estimate-table td:nth-child(13) { width: 70px !important; }
#estimateSection .estimate-table th:nth-child(14), #estimateSection .estimate-table td:nth-child(14) { width: 28px !important; text-align: center; overflow: visible !important; text-overflow: clip !important; padding: 0 2px !important; color: transparent !important; font-size: 0; }
#estimateSection .estimate-table td:nth-child(14) .del-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0 !important; line-height: 1; color: #dc2626 !important; font-size: 15px; }

.est-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.est-dot.red { background: #dc2626; }
.est-dot.skyblue { background: #bae6fd; }
.est-dot.yellow { background: #fbbf24; }
.est-dot.gray { background: #cbd5e1; }

/* ---------- 모달 ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  padding: 20px;
}
.modal-box {
  background: var(--surface); border-radius: 12px; width: 760px; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 19px; font-weight: 700; }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; gap: 8px; align-items: center; padding: 14px 24px;
  border-top: 1px solid var(--border);
}

.locked-notice {
  background: #fef3c7; color: #78350f; border: 1px solid #fcd34d;
  padding: 10px 14px; border-radius: 8px; font-size: 15.5px;
  margin-bottom: 16px;
}
.pending-notice {
  background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5;
  padding: 12px 16px; border-radius: 8px; font-size: 15px;
  margin-bottom: 16px;
}
.pending-notice #pendingNoticeMain { font-weight: 700; font-size: 16px; }
.pending-changes-row { padding: 4px 0; border-top: 1px dashed #fca5a5; display: flex; gap: 8px; }
.pending-changes-row:first-child { border-top: none; }
.pending-changes-row .lbl { min-width: 90px; color: #991b1b; font-weight: 600; }
.pending-changes-row .old { color: #7f1d1d; text-decoration: line-through; opacity: 0.6; }
.pending-changes-row .arr { color: #7f1d1d; }
.pending-changes-row .new { color: #166534; font-weight: 600; }
.row-pending-dot { width: 9px; height: 9px; border-radius: 50%; background: #dc2626; display: inline-block; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* admin-only: 기본 숨김, body.is-admin일 때만 표시 */
.admin-only { display: none !important; }
.is-admin .admin-only { display: flex !important; }
.admin-badge {
  display: inline-block; margin-left: 4px; padding: 1px 5px;
  background: var(--accent); color: white;
  border-radius: 3px; font-size: 12.5px; font-weight: 600;
  vertical-align: middle; letter-spacing: 0;
}

/* 폼 섹션 구분 타이틀 */
.form-section-title {
  font-size: 14px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin: 28px 0 10px; padding-bottom: 8px; padding-top: 16px;
  border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  grid-column: span 2;
}
.form-section-title:first-of-type {
  border-top: none; padding-top: 0; margin-top: 8px;
}
.grid label {
  display: flex; flex-direction: column; gap: 5px; font-size: 15px;
  color: var(--text-muted); font-weight: 500;
}
.grid label.span2 { grid-column: span 2; }
.grid input, .grid select, .grid textarea {
  border: 1px solid var(--border-strong); border-radius: 6px; padding: 8px 10px;
  font-size: 16px; font-family: inherit; color: var(--text); background: var(--surface);
  resize: vertical;
}
.grid input:focus, .grid select:focus, .grid textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.grid input:disabled, .grid select:disabled, .grid textarea:disabled {
  background: #f5f5f4; color: var(--text-muted); cursor: not-allowed;
}

/* ---------- 코멘트 ---------- */
.comments { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.comments-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.comments-head h3 { margin: 0; font-size: 16.5px; font-weight: 700; }
.comments-list {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px;
  max-height: 240px; overflow-y: auto;
}
.comment-item {
  background: var(--bg); border-radius: 8px; padding: 8px 12px;
  border-left: 3px solid transparent;
}
.comment-item.unread {
  border-left-color: var(--warn);
  background: #fef2f2;
}
.comment-head {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 14.5px; margin-bottom: 3px;
}
.comment-head strong { font-weight: 600; }
.comment-head .time { color: var(--text-muted); }
.comment-text { font-size: 16px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.comments-empty { color: var(--text-muted); font-size: 15px; padding: 8px 0; }

.comment-read-btn {
  margin-left: auto;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--warn);
  font-size: 14px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
  cursor: pointer; font-family: inherit;
}
.comment-read-btn:hover { background: var(--warn); color: white; border-color: var(--warn); }

.comment-del-btn {
  margin-left: 4px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 17px; font-weight: 600; line-height: 1;
  width: 20px; height: 20px; border-radius: 4px;
  cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
.comment-del-btn:hover { background: var(--danger); color: white; border-color: var(--danger); }
.comment-read-btn + .comment-del-btn { margin-left: 4px; }
.comment-head:not(:has(.comment-read-btn)) .comment-del-btn { margin-left: auto; }

/* ---------- 그룹 헤더 (담당자별 묶음) ---------- */
.orders tbody tr.group-header td {
  background: #ecf3f2 !important;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  padding: 8px 12px;
  font-weight: 700; font-size: 15.5px;
  color: var(--text);
  border-left: 4px solid var(--owner-color, #d6d3d1) !important;
}
.orders tbody tr.group-header { cursor: default; }
.orders tbody tr.group-header:hover td { background: #ecf3f2 !important; }
.orders tbody tr.group-header .count {
  font-weight: 500; color: var(--text-muted); margin-left: 6px;
}
.group-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--owner-color, #d6d3d1);
  margin-right: 8px; vertical-align: middle;
}

.card-group-header {
  display: flex; align-items: center;
  padding: 6px 4px; margin-top: 10px; margin-bottom: 2px;
  font-weight: 700; font-size: 16px;
  color: var(--text);
  border-left: 4px solid var(--owner-color, #d6d3d1);
  padding-left: 10px;
}
.card-group-header:first-child { margin-top: 0; }
.card-group-header .count { font-weight: 500; color: var(--text-muted); margin-left: 6px; font-size: 15px; }

.comments-input { display: flex; gap: 8px; }
.comments-input input {
  flex: 1; height: 32px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  font-size: 16px; font-family: inherit;
}
.comments-input input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }

/* ---------- 멤버 관리 ---------- */
.section-title { margin: 0 0 6px; font-size: 16.5px; font-weight: 700; }
.member-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.member-row {
  display: grid; grid-template-columns: 1.3fr 1.2fr 100px auto auto;
  gap: 8px; align-items: center;
  padding: 8px 10px; background: var(--bg); border-radius: 8px;
}
.member-row .email { font-size: 15px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row .self-tag {
  display: inline-block; font-size: 13.5px; color: var(--accent); font-weight: 600;
}
.member-row input {
  height: 30px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  font-size: 16px; font-family: inherit; background: var(--surface);
}
.member-row input:disabled { background: #ebebe9; color: var(--text-muted); }
.member-row select {
  height: 30px;
}
.member-row .role-pill {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 13.5px; font-weight: 600;
  background: var(--bg); color: var(--text-muted);
}
.member-row .role-pill.admin {
  background: var(--accent); color: white;
}
.member-row .btn { height: 30px; padding: 0 10px; font-size: 15px; }
.member-add-row {
  display: grid; grid-template-columns: 1fr 110px auto;
  gap: 8px; align-items: center; margin-top: 10px;
}
.member-add-row input {
  height: 32px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  font-size: 16px; font-family: inherit;
}

/* ---------- 토스트 ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1c1917; color: white; padding: 10px 18px; border-radius: 8px;
  font-size: 16px; box-shadow: 0 10px 20px rgba(0,0,0,0.2); z-index: 200;
}

/* ============================================================
   모바일 카드 뷰 (768px 미만)
   ============================================================ */
.mobile-only { display: none !important; }
/* desktop-only는 원래 display 값을 유지 (table은 table, 그 외 block) */

.cards { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--owner-color, #d6d3d1);
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer; transition: background 0.08s;
}
.card:active { background: var(--bg); }
.card-row1 {
  display: flex; align-items: center; gap: 8px;
  font-size: 15.5px; color: var(--text-muted);
}
.card-row1 .unread-flag { margin-right: 2px; }
.card-row1 .owner-name { color: var(--text); font-weight: 600; }
.card-row1 .date { margin-left: auto; }
.card-item { font-size: 18px; font-weight: 600; color: var(--text); word-break: break-word; }
.card-sub {
  font-size: 15.5px; color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: 4px 10px;
}
.card-sub b { color: var(--text); font-weight: 500; }
.card-foot {
  display: flex; align-items: center; gap: 8px; margin-top: 2px;
}
.card-foot .status-pill { font-size: 14px; padding: 2px 8px; }
.card-foot .price { margin-left: auto; font-size: 16px; font-weight: 600; color: var(--text); }

/* Floating action button */
.fab {
  position: fixed; bottom: 20px; right: 20px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: white; border: 0;
  font-size: 31px; font-weight: 300; line-height: 1;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.4);
  cursor: pointer; z-index: 50;
  font-family: inherit;
}
.fab:active { transform: scale(0.96); }

@media (max-width: 767px) {
  body { font-size: 17px; }

  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .fab.mobile-only { display: flex !important; align-items: center; justify-content: center; }
  #ordersCards.mobile-only { display: flex !important; flex-direction: column; }

  .topbar { padding: 12px 14px; }
  .logo { font-size: 19px; }
  .topbar-right { gap: 6px; }
  .link-btns { margin-left: 8px; gap: 4px; }
  .link-btn { padding: 5px 8px; font-size: 14px; }
  .user-name { font-size: 15px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-name .admin-tag { font-size: 13px; padding: 1px 5px; margin-left: 4px; }

  .filterbar {
    padding: 10px 14px; gap: 10px;
    flex-direction: column; align-items: stretch;
  }
  .tabs { overflow-x: auto; }
  .tab { white-space: nowrap; padding: 6px 12px; }
  .filters {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .filters .input {
    grid-column: 1 / -1;
    width: 100%;
  }
  .filters .select { width: auto; }
  /* 새 주문 버튼은 FAB로 빼고 필터바에선 숨김 */
  #newOrderBtn { display: none; }
  .export-wrap { justify-self: end; }

  .table-wrap { padding: 0 12px 80px; }
  .footnote { font-size: 14px; }

  /* 모달: 풀스크린에 가깝게 */
  .modal { padding: 0; align-items: stretch; }
  .modal-box {
    width: 100%; height: 100%; max-height: 100%;
    border-radius: 0;
  }
  .modal-head { padding: 14px 16px; }
  .modal-head h2 { font-size: 18px; }
  .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px; }

  .grid { grid-template-columns: 1fr; gap: 12px; }
  .grid label.span2 { grid-column: span 1; }
  .grid input, .grid select, .grid textarea { font-size: 19px; padding: 10px 12px; } /* iOS 자동 확대 방지: 16px+ */

  .comments-list { max-height: 200px; }
  .comments-input input { font-size: 19px; height: 36px; }
  .comments-input .btn { height: 36px; }

  /* 멤버 관리 */
  .member-row {
    grid-template-columns: 1fr;
    gap: 6px; padding: 10px 12px;
  }
  .member-row .email { font-size: 15px; }
  .member-row input, .member-row select { height: 36px; font-size: 17px; }
  .member-row .btn { height: 32px; }
  .member-add-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .member-add-row input { font-size: 19px; height: 36px; }

  .export-menu { right: 0; min-width: 160px; }
  .toast { bottom: 90px; font-size: 16px; max-width: 90%; text-align: center; }
}

/* 태블릿 (768~1024): 테이블은 보이되 좀 좁게 */
@media (min-width: 768px) and (max-width: 1024px) {
  .table-wrap { padding: 0 12px 40px; overflow-x: auto; }
  table.orders { min-width: 1100px; }
  .filterbar { padding: 12px 14px; }
  .input { width: 200px; }
}

/* ---------- 실수 / 종례 관리자 탭 ---------- */
.mistake-year-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--text-muted);
  font-size: 14px;
}
.mistake-year-filter select {
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
}
/* ---------- 실수 표: 종례 표와 같은 폭, 내용 칸 우선 확장 ---------- */
#mistakeSection .expense-list-wrap {
  width: 100%;
  overflow-x: visible;
}
#mistakeSection .mistake-table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
}
#mistakeSection .mistake-table col.mistake-col-date { width: 126px; }
#mistakeSection .mistake-table col.mistake-col-owner { width: 96px; }
#mistakeSection .mistake-table col.mistake-col-item { width: 120px; }
#mistakeSection .mistake-table col.mistake-col-qty { width: 64px; }
#mistakeSection .mistake-table col.mistake-col-content { width: auto; }
#mistakeSection .mistake-table col.mistake-col-client { width: 190px; }
#mistakeSection .mistake-table col.mistake-col-amount { width: 120px; }
#mistakeSection .mistake-table col.mistake-col-writer { width: 76px; }
#mistakeSection .mistake-table col.mistake-col-action { width: 30px; }

#mistakeSection .mistake-table th,
#mistakeSection .mistake-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#mistakeSection .mistake-table .mistake-date-cell {
  overflow: visible !important;
  text-overflow: clip !important;
  font-variant-numeric: tabular-nums;
}
#mistakeSection .mistake-table .mistake-qty-cell { text-align: center; }
#mistakeSection .mistake-table .amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
#mistakeSection .mistake-table .mistake-truncate {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
#mistakeSection .mistake-table .mistake-action-cell,
#mistakeSection .mistake-table th:last-child {
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  text-align: center;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap;
  padding: 0 2px !important;
  color: transparent !important;
  font-size: 0;
}
#mistakeSection .mistake-table .mistake-action-cell .del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0 !important;
  line-height: 1;
  color: #dc2626 !important;
  font-size: 15px;
}

.closing-form {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}
.closing-form input[type="date"] {
  width: 150px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
}
.closing-form input[type="text"] {
  flex: 1;
  min-width: 420px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
}
.closing-table {
  table-layout: fixed;
  width: 100%;
}
.closing-table tbody tr { cursor: default; }
.closing-table .closing-alert-cell,
.closing-table .closing-done-cell { text-align: center; overflow: visible !important; text-overflow: clip !important; }
.closing-table .closing-alert-cell { width: 34px; }
.closing-table .closing-done-cell { width: 42px; }
.closing-table .closing-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  vertical-align: middle;
}
.closing-table tbody tr.announced .closing-dot {
  background: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.18);
}
.closing-table .closing-check-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 28px;
  height: 28px;
}
.closing-table .closing-check {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.closing-table .closing-check-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: #fff;
  color: transparent;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}
.closing-table .closing-check:checked + .closing-check-mark {
  color: #6b7280;
  background: #f3f4f6;
  border-color: #9ca3af;
}
.closing-table .closing-check-wrap:hover .closing-check-mark { border-color: #6b7280; }
.closing-table tbody tr.announced td {
  color: #9ca3af;
}
.closing-table .closing-memo {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: none;
}
.closing-table .closing-date-cell { width: 76px; }
.closing-table .closing-writer-cell { width: 54px; }

.closing-table .closing-action-cell {
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  text-align: center;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap;
  padding: 0 2px !important;
  color: transparent !important; /* 혹시 남는 말줄임표가 생겨도 화면에 안 보이게 */
  font-size: 0;
}
.closing-table .closing-action-cell .del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0 !important;
  line-height: 1;
  color: #dc2626 !important;
  font-size: 15px;
}

.closing-table .del-btn,
.mistake-table .del-btn {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
}
.closing-table .del-btn:hover,
.mistake-table .del-btn:hover {
  background: #fee2e2;
  border-radius: 4px;
}

/* 실수 연도별 담당자 건수 */
.mistake-year-summary {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: 2px;
}

/* 실수 추가 버튼 높이: 금액 입력칸과 맞춤 */
#mistakeForm .est-form-buttons { align-items: flex-end; }
#mistakeForm .btn { height: 40px; padding: 0 18px; }


/* 표 헤더 가운데 정렬 */
#estimateSection .estimate-table thead th,
#expenseSection .expense-table thead th,
#mistakeSection .mistake-table thead th,
#closingSection .closing-table thead th {
  text-align: center !important;
}

/* 종례 표: 보조 칸은 최소화하고 메모칸 최대 확장 */
#closingSection .closing-table {
  table-layout: fixed;
  width: 100%;
}
#closingSection .closing-table col.closing-col-alert { width: 34px; }
#closingSection .closing-table col.closing-col-date { width: 76px; }
#closingSection .closing-table col.closing-col-memo { width: auto; }
#closingSection .closing-table col.closing-col-writer { width: 54px; }
#closingSection .closing-table col.closing-col-check { width: 42px; }
#closingSection .closing-table col.closing-col-action { width: 28px; }
#closingSection .closing-table .closing-memo {
  width: auto !important;
  max-width: none !important;
}


/* v20: 견적·실수·종례 최대 폭 및 확장 칸 */
#estimateSection, #mistakeSection, #closingSection {
  width: 100%;
  max-width: 1650px;
}
#mistakeSection .mistake-table col.mistake-col-content { width: auto; }
#closingSection .closing-table col.closing-col-memo { width: auto; }

/* 견적 복제 버튼: 회색 */
.estimate-duplicate-btn {
  background: #e5e7eb !important;
  border-color: #d1d5db !important;
  color: #4b5563 !important;
}
.estimate-duplicate-btn:hover { background: #d1d5db !important; }

/* 미공지 종례 행은 클릭 수정 가능 */
#closingSection .closing-table tbody tr:not(.announced) { cursor: pointer; }
#closingSection .closing-table tbody tr.editing { background: #fef3c7; }

/* v21: 견적 수정/취소/복제 버튼 한 줄 유지 + 요청 폭 미세조정 */
#estimateSection .est-form-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: flex-end;
  min-width: max-content;
  grid-column: span 2;
}
#estimateSection .est-form-buttons .btn {
  white-space: nowrap;
  word-break: keep-all;
  min-width: 48px;
  padding-left: 12px;
  padding-right: 12px;
  flex: 0 0 auto;
}

/* 견적 표 세부 폭: 규격 +5px, 내용 +5px, 담당자/연락처 +3px, 메모 -13px */
#estimateSection .estimate-table th:nth-child(5),
#estimateSection .estimate-table td:nth-child(5) { width: 205px !important; }
#estimateSection .estimate-table th:nth-child(6),
#estimateSection .estimate-table td:nth-child(6) { width: 125px !important; }
#estimateSection .estimate-table th:nth-child(8),
#estimateSection .estimate-table td:nth-child(8) { width: 113px !important; }
#estimateSection .estimate-table th:nth-child(12),
#estimateSection .estimate-table td:nth-child(12) { min-width: 247px !important; }


/* v23: 견적 수량 +10px, 메모 -10px, 말줄임은 실제 칸 부족 시에만 */
#estimateSection .estimate-table th:nth-child(4),
#estimateSection .estimate-table td:nth-child(4) { width: 55px !important; }
#estimateSection .estimate-table th:nth-child(12),
#estimateSection .estimate-table td:nth-child(12) { min-width: 237px !important; }
#estimateSection .estimate-table tbody td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* v24: 견적 표 폭 미세조정 — 수량 +15px, 규격 +5px, 담당자/연락처 +5px, 메모 -25px */
#estimateSection .estimate-table th:nth-child(4),
#estimateSection .estimate-table td:nth-child(4) { width: 70px !important; }
#estimateSection .estimate-table th:nth-child(5),
#estimateSection .estimate-table td:nth-child(5) { width: 210px !important; }
#estimateSection .estimate-table th:nth-child(8),
#estimateSection .estimate-table td:nth-child(8) { width: 118px !important; }
#estimateSection .estimate-table th:nth-child(12),
#estimateSection .estimate-table td:nth-child(12) { min-width: 212px !important; }

/* v25: 견적 표 폭 미세조정 — 수량 +10px, 규격 +10px, 담당자/연락처 +10px, 메모 -30px */
#estimateSection .estimate-table th:nth-child(4),
#estimateSection .estimate-table td:nth-child(4) { width: 80px !important; }
#estimateSection .estimate-table th:nth-child(5),
#estimateSection .estimate-table td:nth-child(5) { width: 220px !important; }
#estimateSection .estimate-table th:nth-child(8),
#estimateSection .estimate-table td:nth-child(8) { width: 128px !important; }
#estimateSection .estimate-table th:nth-child(12),
#estimateSection .estimate-table td:nth-child(12) { min-width: 182px !important; }

/* v26: 견적 표 폭 추가 조정 — 수량 +10px, 규격 +10px, 담당자/연락처 +10px, 메모 -30px */
#estimateSection .estimate-table th:nth-child(4),
#estimateSection .estimate-table td:nth-child(4) { width: 90px !important; }
#estimateSection .estimate-table th:nth-child(5),
#estimateSection .estimate-table td:nth-child(5) { width: 230px !important; }
#estimateSection .estimate-table th:nth-child(8),
#estimateSection .estimate-table td:nth-child(8) { width: 138px !important; }
#estimateSection .estimate-table th:nth-child(12),
#estimateSection .estimate-table td:nth-child(12) { min-width: 152px !important; }

/* v28: 데스크톱 고정 레이아웃 — 기존 실수·종례 기능/화면 유지 */
.fab.mobile-only,
#ordersCards.mobile-only {
  display: none !important;
}
.desktop-only {
  display: revert !important;
}
table.desktop-only {
  display: table !important;
}

/* 견적·실수·종례 표는 1650px 고정, 열 자동 축소 금지 */
#estimateSection,
#mistakeSection,
#closingSection {
  width: 1650px !important;
  min-width: 1650px !important;
  max-width: 1650px !important;
  box-sizing: border-box;
}
#estimateSection .expense-list-wrap,
#mistakeSection .expense-list-wrap,
#closingSection .expense-list-wrap {
  width: 100%;
  overflow: hidden;
}
#estimateSection .estimate-table,
#mistakeSection .mistake-table,
#closingSection .closing-table {
  width: 100% !important;
  min-width: 1650px !important;
  max-width: 1650px !important;
  table-layout: fixed !important;
}

/* 주문표 열도 화면 폭에 따라 눌리지 않게 */
table.orders {
  min-width: max-content;
}

/* 모바일·태블릿에서도 데스크톱 표 유지 */
@media (max-width: 1024px) {
  .desktop-only { display: revert !important; }
  table.desktop-only { display: table !important; }
  .mobile-only,
  #ordersCards.mobile-only,
  .fab.mobile-only { display: none !important; }

  .table-wrap {
    padding: 0 24px 40px;
    overflow-x: visible;
  }
  .filterbar {
    padding: 12px 24px;
    flex-direction: row;
    align-items: center;
  }
  .filters { display: flex; }
  .filters .input { width: 260px; }
  #newOrderBtn { display: inline-flex; }
}

/* v29: 1650px 패널 안에서 표가 오른쪽으로 잘리지 않도록 보정 */
#estimateSection,
#mistakeSection,
#closingSection {
  overflow: visible !important;
}

#estimateSection .expense-list-wrap,
#mistakeSection .expense-list-wrap,
#closingSection .expense-list-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

/* 패널의 24px 좌우 안쪽 여백을 제외한 실제 영역에 표를 맞춤 */
#estimateSection .estimate-table,
#mistakeSection .mistake-table,
#closingSection .closing-table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}

/* v31: 견적·택배·실수·종례 탭에서는 주문표 헤더까지 완전히 숨김 */
table.orders.hidden,
table.desktop-only.hidden {
  display: none !important;
}

/* v32: 주문표를 숨긴 전용 탭은 빈 자리 없이 위로 붙임 */
#estimateSection,
#expenseSection,
#mistakeSection,
#closingSection {
  margin-top: 15px !important;
  padding-top: 12px !important;
}

#estimateSection .expense-header h2,
#expenseSection .expense-header h2,
#mistakeSection .expense-header h2,
#closingSection .expense-header h2 {
  margin-top: 0 !important;
}

/* ===== 상황판 (Dashboard) ===== */
#dashboardSection .expense-header h2 { margin-top: 0 !important; }
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0 20px;
}
.dash-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 18px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.dash-card.active {
  border-color: #0ea5e9;
  background: #f0f9ff;
  box-shadow: 0 0 0 2px rgba(14,165,233,0.25);
}
.dash-card.no-click { cursor: default; }
.dash-card.no-click:hover { border-color: #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.04); transform: none; }
.dash-card-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.dash-card-value {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}
.dash-card-value.text { font-size: 18px; line-height: 1.4; }
.dash-card-value .sub {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  display: block;
  margin-top: 4px;
}
.dash-card.in-progress .dash-card-value { color: #2563eb; }
.dash-card.deadline .dash-card-value { color: #dc2626; }
.dash-card.donggu .dash-card-value { color: #059669; }
.dash-card.doc-missing .dash-card-value { color: #d97706; }
.dash-card.undelivered .dash-card-value { color: #7c3aed; }

.dashboard-detail {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 4px;
}
.dashboard-detail h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #0f172a;
}
.dash-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dash-list li {
  padding: 10px 4px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
}
.dash-list li:last-child { border-bottom: none; }
.dash-list li:hover { background: #f8fafc; cursor: pointer; }
.dash-list .dash-date { color: #64748b; font-size: 12px; min-width: 80px; }
.dash-list .dash-item { font-weight: 600; color: #0f172a; min-width: 100px; }
.dash-list .dash-qty { color: #475569; font-size: 13px; min-width: 50px; }
.dash-list .dash-client { color: #475569; min-width: 100px; }
.dash-list .dash-content { color: #334155; flex: 1; }
.dash-list .dash-status {
  color: #475569;
  font-weight: 600;
  font-size: 12px;
  min-width: 60px;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
}
.dash-list .dash-payment {
  color: #1e40af;
  font-weight: 600;
  font-size: 13px;
  min-width: 90px;
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
}
.dash-list .dash-owner { color: #64748b; font-size: 12px; min-width: 50px; }
.dash-empty { padding: 20px; text-align: center; color: #94a3b8; font-size: 14px; }

/* 상황판 — 담당자별 그룹 */
.dash-group {
  margin-bottom: 18px;
}
.dash-group:last-child {
  margin-bottom: 0;
}
.dash-group-header {
  font-size: 15px;
  font-weight: 800;
  color: #334155;
  background: #f1f5f9;
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 4px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.2px;
}
.dash-group-count {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #fff;
  padding: 2px 10px;
  border-radius: 999px;
}
.dash-group .dash-list {
  padding: 0 4px;
}

/* 내 작업 — 마감 임박 배너 (테이블 형태로 아래 표 컬럼과 정렬) */
.mine-deadline-banner {
  background: linear-gradient(to bottom, #fef2f2 0%, #fff7ed 100%);
  border: 1px solid #fecaca;
  border-left: 5px solid #dc2626;
  border-radius: 10px;
  padding: 12px 14px 10px;
  margin: 0 0 18px;
  box-shadow: 0 1px 4px rgba(220,38,38,0.06);
}
.mdb-header {
  font-size: 15px;
  font-weight: 800;
  color: #b91c1c;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mdb-count {
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
}
.mdb-sub {
  font-size: 12px;
  font-weight: 500;
  color: #92400e;
  margin-left: 2px;
}
table.mdb-table {
  background: rgba(255,255,255,0.65);
  border-collapse: collapse;
  border-radius: 6px;
  overflow: hidden;
  font-size: 13px;
  table-layout: fixed;
}
table.mdb-table tbody td {
  padding: 8px;
  border-bottom: 1px dashed rgba(220,38,38,0.18);
  border-right: 1px solid rgba(220,38,38,0.10);
  color: #0f172a;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.mdb-table tbody td:last-child { border-right: none; }
table.mdb-table tbody tr:last-child td { border-bottom: none; }
table.mdb-table tbody tr { cursor: pointer; }
table.mdb-table tbody tr:hover td { background: rgba(255,255,255,0.55); }
table.mdb-table tbody td.col-qty { text-align: right; }
/* 맨 앞 납품일 칸 — 빨간 강조 (아래 표의 알림+밝은담당+소통 영역에 해당하는 폭) */
table.mdb-table tbody td.mdb-deliv-cell {
  color: #b91c1c;
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  background: rgba(220,38,38,0.06);
  min-width: 110px;
  width: 110px;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

/* 상황판 — 주번 카드 색상 + 펼침 콘텐츠 */
.dash-card.duty-card .dash-card-value { color: #0f172a; }

.duty-detail {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.duty-block h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #0f172a;
  letter-spacing: -0.3px;
}
.duty-quote {
  background: #f8fafc;
  border-left: 3px solid #94a3b8;
  padding: 10px 14px;
  margin: 0 0 16px;
  font-size: 13px;
  color: #475569;
  border-radius: 4px;
  font-style: italic;
}

/* 주번 순서 */
.duty-rotation {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.duty-rotation li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}
.duty-rotation li.duty-now {
  background: #fef2f2;
  border-color: #fca5a5;
  border-left: 4px solid #dc2626;
}
.duty-rotation li.duty-next {
  background: #fff7ed;
  border-color: #fed7aa;
  border-left: 4px solid #f59e0b;
}
.duty-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.duty-now .duty-no { background: #dc2626; color: #fff; }
.duty-next .duty-no { background: #f59e0b; color: #fff; }
.duty-name {
  font-weight: 700;
  color: #0f172a;
  flex: 1;
}
.duty-now .duty-name { color: #b91c1c; }
.duty-next .duty-name { color: #b45309; }
.duty-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: -0.2px;
}
.duty-tag.now { background: #dc2626; color: #fff; }
.duty-tag.next { background: #f59e0b; color: #fff; }

/* 체크리스트 섹션 */
.duty-section {
  margin-top: 18px;
}
.duty-section:first-of-type {
  margin-top: 0;
}
.duty-section h4 {
  margin: 0 0 10px;
  font-size: 15px;
  color: #0f172a;
  font-weight: 800;
  padding: 8px 12px;
  background: linear-gradient(to right, #eff6ff, transparent);
  border-left: 4px solid #2563eb;
  border-radius: 4px;
  letter-spacing: -0.3px;
}
.duty-meta {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  margin-left: 6px;
}
.duty-list {
  list-style: none;
  padding: 0 0 0 4px;
  margin: 0;
}
.duty-list > li {
  position: relative;
  padding: 8px 0 8px 18px;
  font-size: 14px;
  color: #0f172a;
  line-height: 1.55;
}
.duty-list > li::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: 8px;
  color: #2563eb;
  font-weight: 800;
}
.duty-list ul {
  list-style: none;
  padding: 0 0 0 14px;
  margin: 6px 0 0;
}
.duty-list ul li {
  position: relative;
  padding: 4px 0 4px 14px;
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
}
.duty-list ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  top: 4px;
  color: #94a3b8;
}
.duty-list strong {
  color: #0f172a;
  font-weight: 700;
}
.duty-list-flat > li {
  padding-left: 18px;
}
.duty-list-flat > li::before {
  content: "•";
}
.duty-list-flat > li.duty-note {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
}
.duty-list-flat > li.duty-note::before {
  content: "";
}

/* ============================================================
   랄라 추가 스타일
   ============================================================ */

/* 다중 항목 입력 (촬영자, 제작비내역) */
.multi-entry-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.multi-entry-row {
  display: grid;
  grid-template-columns: 110px 160px 1fr 32px;
  gap: 8px;
  align-items: center;
}
.multi-entry-row.prodcost-row {
  grid-template-columns: 200px 160px 1fr 32px;
}
.multi-entry-row input,
.multi-entry-row select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: white;
}
.multi-entry-row .remove-btn {
  background: none;
  border: 1px solid var(--border);
  color: #999;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}
.multi-entry-row .remove-btn:hover {
  background: #fee;
  color: #b91c1c;
  border-color: #fca5a5;
}
.btn.small-btn {
  font-size: 13px;
  padding: 5px 12px;
  margin-bottom: 10px;
}

/* readonly 필드 */
.readonly-field input {
  background: #f8fafc;
  color: #64748b;
  font-weight: 500;
}

/* 인라인 체크박스 */
.checkbox-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  cursor: pointer;
}
.checkbox-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.check-by {
  font-size: 12px;
  color: #888;
  font-weight: 400;
  margin-left: 4px;
}

/* 완료 패널 */
.completion-panel {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
}

/* 소통기록 날짜 입력 */
.comm-log-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.comm-log-input .comm-log-date {
  width: 150px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
}
.comm-log-input input[type="text"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
}
.comments-input textarea {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 50px;
}

/* 평가 항목 - 편집담당 평가 강조 */
.eval-item.is-editor {
  background: #eff6ff;
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}
.eval-item .eval-role-badge {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #e0e7ff;
  color: #3730a3;
  margin-left: 6px;
  font-weight: 600;
}
.eval-item.is-editor .eval-role-badge {
  background: var(--accent);
  color: white;
}

/* span4 (결제 정보 체크박스용) */
.grid .span4 {
  grid-column: 1 / -1;
}

/* 완료 표시 마커 (list view) */
.completion-markers {
  display: inline-flex;
  gap: 4px;
  font-size: 11px;
  align-items: center;
}
.completion-markers .marker {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 5px;
  border-radius: 3px;
  background: #f1f5f9;
  color: #64748b;
}
.completion-markers .marker.checked {
  background: #dbeafe;
  color: #1e40af;
}

/* admin-only fix - 섹션 타이틀/그리드는 flex가 아닌 본래 display로 */
.is-admin .form-section-title.admin-only { display: block !important; }
.is-admin .grid.admin-only { display: grid !important; }

/* ============================================================
   2026-06-14 디자인 리뉴얼 + 주문창 정리
   밝은 햇살 이미지를 살린 따뜻하고 전문적인 데스크톱 UI
   ============================================================ */
:root {
  --bg: #f7f4ec;
  --surface: #ffffff;
  --surface-soft: #fffaf0;
  --border: #e9e1d3;
  --border-strong: #d9cebc;
  --text: #27231d;
  --text-muted: #746c61;
  --accent: #e97912;
  --accent-hover: #c96008;
  --accent-soft: #fff0d5;
  --danger: #c43d37;
  --warn: #dc3f39;
}

body {
  background:
    radial-gradient(circle at 8% -10%, rgba(255, 199, 58, 0.20), transparent 28%),
    linear-gradient(180deg, #fbfaf6 0, var(--bg) 260px);
  letter-spacing: -0.015em;
}

/* 상단 브랜드 영역 */
.topbar {
  padding: 16px 28px;
  border-top: 4px solid #f6b91c;
  border-bottom-color: var(--border);
  box-shadow: 0 5px 22px rgba(75, 55, 25, 0.06);
}
.logo {
  gap: 11px;
  font-size: 22px;
  font-weight: 800;
  color: #2d261c;
}
.logo-img {
  width: 38px;
  height: 38px;
  padding: 3px;
  border-radius: 12px;
  background: #fff8df;
  box-shadow: 0 3px 10px rgba(183, 124, 10, 0.16);
}
.daily-quote {
  color: #8b7760;
  font-size: 15px;
}
.user-name {
  padding: 7px 11px;
  border-radius: 999px;
  background: #f6f2ea;
  color: #5f574d;
  font-weight: 600;
}

/* 탭과 검색 영역 */
.filterbar {
  padding: 15px 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--border);
  box-shadow: 0 3px 12px rgba(62, 49, 29, 0.04);
}
.tabs {
  gap: 4px;
  padding: 5px;
  border: 1px solid #ebe4d8;
  border-radius: 12px;
  background: #f7f3eb;
}
.tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 650;
}
.tab + .tab::before { display: none; }
.tab.active {
  color: #8b4300;
  background: #fff;
  box-shadow: 0 3px 10px rgba(88, 61, 23, 0.10), inset 0 -2px 0 #f3a516;
}
.input, .select {
  height: 38px;
  border-radius: 9px;
  border-color: var(--border-strong);
  background: #fff;
}
.input:focus, .select:focus {
  outline: 3px solid rgba(233, 121, 18, 0.16);
  border-color: var(--accent);
}
.input { width: 290px; }

/* 버튼 */
.btn {
  height: 38px;
  border-radius: 9px;
  padding: 0 16px;
  font-weight: 700;
  box-shadow: none;
}
.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #ee8b1d, #db6c08);
  box-shadow: 0 4px 10px rgba(213, 105, 8, 0.22);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #dd770e, #c65b00);
  transform: translateY(-1px);
}
.btn.ghost {
  background: #fff;
  border-color: #ddd2c1;
}
.btn.ghost:hover { background: #fbf7ef; }
.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none !important;
}

/* 주문 목록 */
.table-wrap { padding: 2px 28px 46px; }
table.orders {
  width: 100%;
  min-width: 1120px;
  margin-top: 18px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid #e4dbcd;
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(79, 58, 29, 0.07);
}
.orders thead th {
  padding: 10px 8px;
  color: #665b4d;
  background: linear-gradient(180deg, #fffaf0, #f5efe5);
  border-color: #e1d7c8;
  font-size: 14px;
  font-weight: 750;
}
.orders tbody td {
  height: 42px;
  padding: 8px 9px;
  border-right-color: #eee7dc;
  border-bottom-color: #eee8df;
}
.orders tbody tr:nth-child(even) td { background: #fdfbf7; }
.orders tbody tr:hover td { background: #fff5df !important; }
.orders tbody tr.row-done td { color: #817a70; background: #f8f8f5; }
.orders tbody tr.row-hold td { background: #fff9ed; }
.col-content { max-width: 320px; }
.col-contact { max-width: 190px; }

.owner-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.owner-chip.unassigned {
  color: #6f675d;
  background: #e6e0d6 !important;
}
.flag-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e23d36;
  box-shadow: 0 0 0 4px rgba(226, 61, 54, 0.13);
}
.sub-badge {
  display: inline-flex;
  padding: 2px 7px;
  margin-right: 7px;
  border-radius: 5px;
  background: #f1ebe0;
  color: #675a49;
  font-size: 12px;
  font-weight: 700;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}
.status-작업전 { background: #7c8798; }
.status-촬영중 { background: #1687c8; }
.status-편집중 { background: #3766d6; }
.status-초안 { background: #8c56c9; }
.status-수정 { background: #d98209; }
.status-대기보류 { background: #756d63; }
.status-완료 { background: #21875f; }
.footnote { color: #8a8175; }

/* 모달 */
.modal {
  padding: 24px;
  background: rgba(38, 31, 22, 0.48);
  backdrop-filter: blur(4px);
}
.modal-box {
  width: min(920px, calc(100vw - 48px));
  max-height: 92vh;
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(33, 25, 15, 0.28);
  overflow: hidden;
}
.modal-head {
  padding: 19px 26px;
  background: linear-gradient(135deg, #fffaf0, #fff 56%);
  border-bottom-color: #e9dfd0;
}
.modal-head::before {
  content: "";
  width: 7px;
  height: 26px;
  margin-right: 10px;
  border-radius: 99px;
  background: linear-gradient(#f6ba1d, #ed7b10);
}
.modal-head h2 {
  margin-right: auto;
  font-size: 21px;
  font-weight: 800;
}
.modal-body {
  padding: 22px 27px 30px;
  background: #fff;
}
.modal-foot {
  padding: 15px 26px;
  background: #fbf8f2;
  border-top-color: #e9dfd0;
}
.grid { gap: 15px 18px; }
.grid label {
  gap: 7px;
  color: #6f665b;
  font-size: 14px;
  font-weight: 700;
}
.grid input, .grid select, .grid textarea,
.eval-author-row select {
  min-height: 40px;
  border: 1px solid #dcd1c0;
  border-radius: 9px;
  padding: 9px 11px;
  background: #fff;
  color: #2f2a23;
}
.grid textarea { line-height: 1.55; }
.grid input:focus, .grid select:focus, .grid textarea:focus,
.eval-author-row select:focus {
  outline: 3px solid rgba(233, 121, 18, 0.14);
  border-color: #e97912;
}
.form-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 28px 0 13px;
  padding: 10px 13px;
  border: 0;
  border-left: 5px solid #ef921f;
  border-radius: 8px;
  background: linear-gradient(90deg, #fff4de, rgba(255, 250, 240, 0.35));
  color: #8c4705;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: none;
}
.form-section-title:first-of-type {
  margin-top: 3px;
  padding-top: 10px;
  border-left: 5px solid #ef921f;
}
.section-help {
  color: #8c8173;
  font-size: 12.5px;
  font-weight: 500;
}
.admin-badge {
  color: #fff;
  background: #7a5b34;
}

/* 체크박스: 체크 칸이 문구 앞에 오도록 고정 */
.checkbox-inline {
  flex-direction: row !important;
  justify-content: flex-start;
  width: fit-content;
}
.checkbox-inline input[type="checkbox"] {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: #e97912;
}
.tax-invoice-row {
  padding: 10px 12px;
  border: 1px solid #eadfce;
  border-radius: 10px;
  background: #fffaf1;
}

/* 촬영 회차 */
.multi-entry-wrap {
  gap: 10px;
  margin-bottom: 10px;
}
.multi-entry-row {
  width: 100%;
  min-width: 0;
}
.multi-entry-row.shooter-row {
  grid-template-columns: minmax(105px, .5fr) minmax(330px, 1.55fr) minmax(210px, 1fr) 34px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e6dccd;
  border-radius: 12px;
  background: #fffdf9;
}
.entry-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}
.entry-label {
  color: #766b5e;
  font-size: 12px;
  font-weight: 800;
}
.entry-field input {
  width: 100%;
  min-width: 0;
  height: 39px;
  border-color: #dcd1c0;
}
.shooter-checks {
  display: flex;
  min-height: 39px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.shooter-option {
  position: relative;
  cursor: pointer;
}
.shooter-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.shooter-option span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #ddd3c4;
  border-radius: 999px;
  background: #fff;
  color: #655b50;
  font-size: 13px;
  font-weight: 700;
  transition: .14s ease;
}
.shooter-option span small {
  color: #a36a20;
  font-size: 10px;
}
.shooter-option input:checked + span {
  border-color: #e88416;
  background: #fff0d3;
  color: #874100;
  box-shadow: inset 0 0 0 1px rgba(232, 132, 22, .18);
}
.shooter-option input:focus-visible + span {
  outline: 3px solid rgba(233, 121, 18, .18);
}
.shooter-option input:disabled + span {
  opacity: .48;
  cursor: not-allowed;
}
.multi-entry-empty {
  padding: 14px;
  border: 1px dashed #dacebb;
  border-radius: 10px;
  background: #fcfaf6;
  color: #908678;
  font-size: 13px;
  text-align: center;
}
.multi-entry-row .remove-btn {
  width: 32px;
  height: 39px;
  border-color: #dfd4c4;
  background: #fff;
}

/* 제작비 표 깨짐 방지 */
.is-admin .prod-cost-section.admin-only {
  display: block !important;
  width: 100%;
  min-width: 0;
}
.prod-cost-caption {
  margin: 7px 0 8px;
  color: #6f665b;
  font-size: 13px;
  font-weight: 700;
}
.multi-entry-row.prodcost-row {
  width: 100%;
  grid-template-columns: minmax(145px, 1.05fr) minmax(110px, .65fr) minmax(160px, 1fr) 34px;
  gap: 9px;
  padding: 9px;
  border: 1px solid #e7ded1;
  border-radius: 10px;
  background: #fffdf9;
}
.multi-entry-row.prodcost-row input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border-color: #dcd1c0;
}
.btn.small-btn {
  height: 34px;
  padding: 0 13px;
  margin-bottom: 10px;
  font-size: 13px;
}

/* 소통기록·평가 */
.comments {
  margin-top: 26px;
  padding: 18px;
  border: 1px solid #e8dfd2;
  border-radius: 14px;
  background: #fdfbf7;
}
.comments-head h3 {
  font-size: 17px;
  color: #332d26;
}
.comments-list {
  max-height: 270px;
  gap: 9px;
}
.comment-item {
  padding: 10px 12px;
  border: 1px solid #ebe3d8;
  border-left: 4px solid #d8cfc2;
  border-radius: 9px;
  background: #fff;
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 4px;
  font-size: 14px;
}
.comment-meta .comment-del-btn { margin-left: auto; }
.comment-text { line-height: 1.5; }
.comm-log-input, .comments-input {
  gap: 9px;
  padding: 11px;
  border: 1px solid #e7ded2;
  border-radius: 10px;
  background: #fff;
}
.comm-log-input { border-top: 1px solid #e7ded2; }
.comm-log-input input,
.comments-input textarea {
  border-color: #dcd1c0 !important;
  border-radius: 8px !important;
}
.eval-compose {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.eval-author-row {
  display: grid;
  grid-template-columns: 170px minmax(190px, 1fr);
  gap: 10px;
}
.eval-author-row label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #6f665b;
  font-size: 13px;
  font-weight: 750;
}
.eval-input-row { align-items: stretch; }
.eval-input-row .btn { align-self: stretch; height: auto; min-height: 50px; }
.eval-item.is-editor {
  border-left-color: #e87912;
  background: #fff8e9;
}
.eval-item.is-shooter {
  border-left-color: #2682bb;
  background: #f6fbff;
}
.eval-item .eval-role-badge {
  margin-left: 5px;
}
.eval-role-badge.editor {
  color: #fff;
  background: #e2790f;
}
.eval-role-badge.shooter {
  color: #fff;
  background: #267fae;
}
.empty-record { padding: 12px; text-align: center; }

/* 관리자 요소 display 보정 */
.is-admin .form-section-title.admin-only { display: flex !important; }
.is-admin .grid.admin-only { display: grid !important; }

/* 상황판도 같은 디자인 언어로 정리 */
#dashboardSection {
  border-radius: 16px;
  border-color: #e4dacb;
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 24px rgba(76, 57, 30, .06);
}
.dash-card {
  border-color: #e5dccf;
  border-radius: 13px;
  box-shadow: 0 5px 15px rgba(72, 53, 28, .06);
}
.dash-card:hover {
  border-color: #e6a046;
  box-shadow: 0 9px 20px rgba(113, 76, 24, .11);
}

@media (max-width: 900px) {
  .multi-entry-row.shooter-row,
  .multi-entry-row.prodcost-row {
    grid-template-columns: 1fr;
  }
  .multi-entry-row .remove-btn {
    width: 100%;
  }
  .eval-author-row { grid-template-columns: 1fr 1fr; }
}


/* ==========================================================
   v3 — 완료 체크·담당자 그룹·멤버 관리 정렬·날짜 표시 보정
   ========================================================== */

/* 목록 정렬: 내용·거래처·담당자/연락처만 왼쪽, 나머지는 가운데 */
.orders tbody tr:not(.group-header) td {
  text-align: center;
}
.orders tbody tr:not(.group-header) td.col-content,
.orders tbody tr:not(.group-header) td.col-client,
.orders tbody tr:not(.group-header) td.col-contact {
  text-align: left;
}

/* YYYY/MM/DD가 잘리지 않도록 날짜 열 확보 */
.col-date,
.col-shootdate,
.col-completed {
  min-width: 96px;
  width: 96px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 전체 탭 담당자별 그룹 헤더 */
.orders tbody tr.group-header td {
  height: 48px;
  padding: 10px 14px;
  text-align: center !important;
  background: #edf4f3 !important;
  color: #302a24;
  font-size: 16px;
  font-weight: 800;
  border-left: 5px solid var(--owner-color, #b9b2a8) !important;
  border-top: 1px solid #d9e2df;
  border-bottom: 1px solid #d9e2df;
}
.orders tbody tr.group-header:hover td {
  background: #edf4f3 !important;
}
.orders tbody tr.group-header .group-dot,
.card-group-header .group-dot {
  background: var(--owner-color, #b9b2a8);
}
.orders tbody tr.group-header .count {
  margin-left: 6px;
  color: #777168;
  font-weight: 550;
}

/* 완료 탭의 완료·백업 체크 버튼 */
.marker-cell {
  min-width: 64px;
  width: 64px;
  text-align: center !important;
  overflow: visible !important;
}
.completion-list-check {
  width: 21px;
  height: 21px;
  margin: 0;
  cursor: pointer;
  accent-color: #ef8b00;
  vertical-align: middle;
}
.completion-list-check:hover {
  filter: brightness(0.96);
}

/* 상황판에서는 주문표가 CSS !important와 무관하게 완전히 숨겨짐 */
table.orders.hidden,
table.desktop-only.hidden,
#ordersCards.hidden,
.footnote.hidden {
  display: none !important;
}

/* 멤버 관리: 이메일 / 표시 이름 / 권한 / 삭제 열 정렬 */
.member-modal-box {
  width: 780px;
  max-width: calc(100vw - 40px);
}
.member-list {
  gap: 10px;
}
.member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: end;
  padding: 14px 16px;
  background: #f7f3eb;
  border: 1px solid #eadfce;
  border-radius: 12px;
}
.member-info {
  min-width: 0;
}
.member-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #312b25;
  font-size: 15px;
  font-weight: 650;
}
.member-name-row {
  display: grid;
  grid-template-columns: auto minmax(190px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.member-name-row > span {
  white-space: nowrap;
}
.member-name-row input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border: 1px solid #d9cbb8;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.member-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 0;
}
.member-actions .role-select {
  width: 108px;
  height: 36px;
  padding: 0 9px;
  border: 1px solid #d9cbb8;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.member-row .member-save-btn,
.member-row .member-remove-btn {
  height: 36px;
  white-space: nowrap;
}
.member-add-row {
  grid-template-columns: minmax(0, 1fr) 130px auto;
  align-items: center;
  gap: 10px;
}
.member-add-row input,
.member-add-row select,
.member-add-row .btn {
  height: 40px;
}

@media (max-width: 760px) {
  .member-modal-box {
    width: 100%;
    max-width: none;
  }
  .member-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .member-name-row {
    grid-template-columns: 1fr;
  }
  .member-actions {
    justify-content: flex-end;
  }
  .member-add-row {
    grid-template-columns: 1fr;
  }
}

/* 완료·백업 헤더 폭도 체크칸과 동일하게 고정 */
.col-marker {
  min-width: 64px;
  width: 64px;
  text-align: center;
}

/* ==========================================================
   v4 — 납기요청일 표시 및 납기 임박 강조
   ========================================================== */

/* 납기요청일도 연도를 포함해 잘리지 않도록 고정 폭 확보 */
.col-due {
  min-width: 96px;
  width: 96px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 납기일이 지난 주문과 3일 이내 주문을 목록에서 빠르게 구분 */
.orders tbody tr:not(.group-header) td.col-due.due-overdue {
  color: #b42318;
  background: #fff0ed !important;
  font-weight: 800;
}
.orders tbody tr:not(.group-header) td.col-due.due-soon {
  color: #9a5b00;
  background: #fff7dc !important;
  font-weight: 800;
}

/* 납기 열 추가에 맞춰 데스크톱 표 최소 폭 보정 */
table.orders {
  min-width: 1220px;
}


/* ==========================================================
   v5 상황판 — 4개 핵심 카드
   ========================================================== */
#dashboardSection {
  max-width: none;
  margin-top: 24px !important;
  padding: 30px 36px 34px;
  border: 1px solid #e7dfd3;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(245, 158, 11, .07), transparent 30%),
    linear-gradient(180deg, #fffefa 0%, #fff 100%);
  box-shadow: 0 12px 34px rgba(73, 55, 31, .07);
}
.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
#dashboardSection .dashboard-heading h2 {
  margin: 0 0 8px !important;
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -.04em;
  color: #211d19;
}
.dashboard-heading p {
  margin: 0;
  color: #81776c;
  font-size: 15px;
}
.dashboard-guide {
  padding: 7px 11px;
  border: 1px solid #eee3d4;
  border-radius: 999px;
  background: #fffaf2;
  color: #9a6b2d;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 22px;
}
.dashboard-cards .dash-card {
  appearance: none;
  position: relative;
  min-width: 0;
  min-height: 154px;
  padding: 20px 22px 18px;
  border: 1px solid #e4e8ee;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(31, 41, 55, .06);
  color: #24211e;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dashboard-cards .dash-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 4px;
  border-radius: 0 5px 5px 0;
  background: var(--dash-accent, #2f6cf5);
  opacity: .9;
}
.dashboard-cards .dash-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--dash-accent, #2f6cf5) 40%, #dfe4ea);
  box-shadow: 0 13px 27px rgba(31, 41, 55, .11);
}
.dashboard-cards .dash-card.active {
  border-color: var(--dash-accent, #2f6cf5);
  background: var(--dash-soft, #f5f8ff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dash-accent, #2f6cf5) 14%, transparent), 0 12px 26px rgba(31, 41, 55, .10);
}
.dashboard-cards .dash-card.in-progress { --dash-accent: #2f65e9; --dash-soft: #f4f7ff; }
.dashboard-cards .dash-card.deadline { --dash-accent: #e63838; --dash-soft: #fff5f5; }
.dashboard-cards .dash-card.backup-missing { --dash-accent: #ef8a00; --dash-soft: #fff8ec; }
.dashboard-cards .dash-card.duty-card { --dash-accent: #7950d6; --dash-soft: #f8f5ff; }
.dash-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.dashboard-cards .dash-card-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #666f80;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.dash-card-icon { font-size: 17px; line-height: 1; }
.dash-card-arrow {
  color: #b9bec8;
  font-size: 26px;
  font-weight: 300;
  line-height: .8;
  transition: transform .16s ease, color .16s ease;
}
.dash-card.active .dash-card-arrow {
  color: var(--dash-accent);
  transform: rotate(90deg);
}
.dashboard-cards .dash-card-value {
  display: block;
  margin-top: 13px;
  color: var(--dash-accent);
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.045em;
}
.dashboard-cards .dash-duty-value {
  overflow: hidden;
  color: #171923;
  font-size: 25px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-card-note {
  display: block;
  margin-top: 9px;
  color: #8b919b;
  font-size: 12.5px;
  font-weight: 650;
}
.dashboard-detail {
  margin-top: 2px;
  padding: 22px 24px 24px;
  border: 1px solid #e7e1d7;
  border-radius: 17px;
  background: rgba(255,255,255,.96);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 7px 20px rgba(54, 44, 31, .05);
}
.dashboard-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.dashboard-detail .dashboard-detail-head h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #211d19;
  font-size: 17px;
  font-weight: 850;
}
.dashboard-detail-head h3 em {
  color: #7e7468;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}
.dashboard-detail-note {
  color: #9a9187;
  font-size: 12px;
}
.dashboard-empty {
  padding: 38px 16px;
  border: 1px dashed #ded7cc;
  border-radius: 12px;
  background: #fdfbf8;
  color: #8c8379;
  text-align: center;
}
.dash-table-wrap {
  overflow-x: auto;
  border: 1px solid #ebe5dc;
  border-radius: 12px;
}
table.dash-list {
  width: 100%;
  min-width: 980px;
  margin: 0;
  border-collapse: collapse;
  table-layout: auto;
  background: #fff;
}
table.dash-list thead th {
  padding: 10px 11px;
  border-bottom: 1px solid #e8e2d9;
  background: #faf8f4;
  color: #756c62;
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}
table.dash-list tbody td {
  padding: 10px 11px;
  border-bottom: 1px solid #f0ece6;
  color: #3e3934;
  font-size: 13.5px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
table.dash-list tbody tr:last-child td { border-bottom: 0; }
table.dash-list tbody tr:hover td {
  background: #fffaf2;
  cursor: pointer;
}
table.dash-list .dash-text-left {
  max-width: 300px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
}
.dash-due-cell { font-variant-numeric: tabular-nums; }
.dash-due-cell.urgent { color: #d72d2d; font-weight: 800; }
.dash-dday {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #fff0f0;
  color: #d72d2d;
  font-size: 10.5px;
  font-weight: 850;
}
.dash-check-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}
.dash-check-state.checked { background: #eaf8f0; color: #188454; }
.dash-check-state.missing { background: #fff0ea; color: #d95d24; }

@media (max-width: 1180px) {
  .dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  #dashboardSection { padding: 22px 18px 26px; border-radius: 16px; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-guide { display: none; }
  .dashboard-cards { grid-template-columns: 1fr; gap: 12px; }
  .dashboard-cards .dash-card { min-height: 128px; }
  .dashboard-detail { padding: 16px; }
  .dashboard-detail-head { align-items: flex-start; flex-direction: column; }
}


/* ==========================================================
   v7 — 랄라 하늘색 테마 · 상황판/주번 컴팩트 보정
   ========================================================== */
:root {
  --bg: #f2f8fc;
  --surface: #ffffff;
  --row-alt: #f7fbfe;
  --border: #d7e8f2;
  --border-strong: #bcd6e5;
  --text: #18364a;
  --text-muted: #6d8798;
  --accent: #45a8d5;
  --accent-hover: #318fbb;
  --danger: #c43d50;
  --warn: #e34b5f;
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(119, 203, 238, .13), transparent 28%),
    linear-gradient(180deg, #f7fbfe 0%, #eef7fc 100%);
}
.topbar {
  background: rgba(255,255,255,.96);
  border-bottom-color: #d4e7f2;
  box-shadow: 0 2px 12px rgba(54, 130, 169, .06);
}
.logo { color: #173f58; }
.daily-quote { color: #6f8a9b; }
.duty-name { color: #4d7892; }
.duty-name:not(:empty)::before { color: #9ab2c0; }
.filterbar {
  background: rgba(246, 251, 254, .96);
  border-bottom-color: #d4e7f2;
}
.tabs { background: #e8f3f9; }
.tab { color: #688397; }
.tab:hover { color: #245b78; }
.tab.active {
  background: #fff;
  color: #207ba7;
  box-shadow: 0 2px 7px rgba(49, 143, 187, .13);
}
.tab + .tab::before { background: #c9dfeb; }
.btn.primary {
  background: linear-gradient(180deg, #58b7df 0%, #3b9dca 100%);
  box-shadow: 0 4px 10px rgba(52, 147, 190, .18);
}
.btn.primary:hover { background: linear-gradient(180deg, #47acd6 0%, #2f8db8 100%); }
.btn.ghost { border-color: #c8dde8; color: #315a70; }
.btn.ghost:hover { background: #edf7fc; }
.input, .select,
.grid input, .grid select, .grid textarea {
  border-color: #c7dce8;
}
.input:focus, .select:focus,
.grid input:focus, .grid select:focus, .grid textarea:focus {
  outline-color: #65b9dd;
  border-color: #65b9dd;
}

/* 주문 목록 */
table.orders {
  border-color: #d5e6ef;
  box-shadow: 0 5px 18px rgba(45, 112, 145, .05);
}
.orders thead th {
  color: #507187;
  background: #eaf5fb;
  border-color: #cfe2ec;
}
.orders tbody td { border-color: #deebf2; }
.orders tbody tr:nth-child(even) td { background: #f7fbfe; }
.orders tbody tr:hover td { background: #eaf7fd !important; }
.orders tbody tr.group-header td,
.orders tbody tr.group-header:hover td {
  background: #e3f2f9 !important;
  color: #254e66;
  border-top-color: #c8e0eb;
  border-bottom-color: #c8e0eb;
}
.owner-chip { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.completion-list-check { accent-color: #45a8d5; }

/* 모달·입력 영역 */
.modal { background: rgba(18, 57, 78, .38); }
.modal-box {
  border: 1px solid #d3e6f0;
  box-shadow: 0 24px 60px rgba(30, 91, 121, .23);
}
.modal-head {
  background: linear-gradient(180deg, #fbfeff 0%, #f1f9fd 100%);
  border-bottom-color: #d8e9f2;
}
.form-section-title {
  color: #278bb7;
  border-top-color: #61b8dc;
  border-bottom-color: #d7e8f1;
}
.admin-badge { background: #45a8d5; }
.comments {
  border-color: #d6e8f1;
  background: #f5fbfe;
}
.comments-head h3 { color: #214a62; }
.comment-item,
.comm-log-input,
.comments-input {
  border-color: #d7e8f1;
  background: #fff;
}
.eval-item.is-editor {
  border-left-color: #4e9fd0;
  background: #f2f9fd;
}
.eval-item.is-shooter {
  border-left-color: #60bbd8;
  background: #f1fbfd;
}
.eval-role-badge.editor { background: #4b98c5; }
.eval-role-badge.shooter { background: #55adc8; }
.member-row {
  background: #f1f8fc;
  border-color: #d3e6f0;
}
.member-email { color: #214b64; }
.member-name-row input,
.member-actions .role-select {
  border-color: #c5dce8;
}

/* 상황판: 전체 폭은 유지하되 위아래 공간과 카드 높이를 축소 */
#dashboardSection {
  margin-top: 16px !important;
  padding: 18px 22px 20px;
  border-color: #d3e6f0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(96, 190, 228, .12), transparent 34%),
    linear-gradient(180deg, #fbfeff 0%, #f5fbfe 100%);
  box-shadow: 0 10px 28px rgba(42, 111, 145, .08);
}
.dashboard-heading {
  align-items: center;
  margin-bottom: 13px;
}
#dashboardSection .dashboard-heading h2 {
  margin: 0 0 3px !important;
  color: #173f58;
  font-size: 22px;
}
.dashboard-heading p {
  color: #718c9d;
  font-size: 13px;
}
.dashboard-guide { display: none; }
.dashboard-cards {
  gap: 12px;
  margin-bottom: 14px;
}
.dashboard-cards .dash-card {
  min-height: 96px;
  padding: 14px 17px 13px;
  border-color: #d6e6ef;
  border-radius: 14px;
  box-shadow: 0 5px 14px rgba(43, 105, 136, .07);
}
.dashboard-cards .dash-card::before {
  top: 14px;
  bottom: 14px;
  width: 3px;
}
.dashboard-cards .dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 19px rgba(43, 105, 136, .12);
}
.dashboard-cards .dash-card.in-progress { --dash-accent: #2c88be; --dash-soft: #eef8fd; }
.dashboard-cards .dash-card.deadline { --dash-accent: #33a5cf; --dash-soft: #effaff; }
.dashboard-cards .dash-card.backup-missing { --dash-accent: #4b91c8; --dash-soft: #f1f7fd; }
.dashboard-cards .dash-card.duty-card { --dash-accent: #5c82c6; --dash-soft: #f3f6fd; }
.dashboard-cards .dash-card-label {
  color: #587588;
  font-size: 14px;
}
.dash-card-icon { font-size: 16px; }
.dash-card-arrow { color: #aac0cd; font-size: 22px; }
.dashboard-cards .dash-card-value {
  margin-top: 8px;
  font-size: 29px;
}
.dashboard-cards .dash-duty-value {
  color: #244b66;
  font-size: 21px;
}
.dash-card-note { display: none !important; }
.dashboard-detail {
  padding: 18px 20px 20px;
  border-color: #d5e7f0;
  background: rgba(255,255,255,.97);
  box-shadow: 0 6px 18px rgba(43, 105, 136, .06);
}
.dashboard-detail .dashboard-detail-head h3 { color: #234a62; }
.dashboard-detail-head h3 em { color: #6b8798; }
.dashboard-detail-note { color: #8197a5; }
.dashboard-empty {
  border-color: #cfe4ee;
  background: #f5fbfe;
  color: #738d9c;
}
.dash-table-wrap { border-color: #d7e8f0; }
table.dash-list thead th {
  background: #eaf5fb;
  color: #527287;
  border-bottom-color: #d2e5ef;
}
table.dash-list tbody td { border-bottom-color: #e4eff4; color: #36566a; }
table.dash-list tbody tr:hover td { background: #edf8fd; }

/* 주번 순서: 10명을 한 줄에, 회색 '주번:'은 작게 */
.duty-rotation {
  display: grid !important;
  grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
  gap: 7px !important;
}
.duty-rotation li {
  position: relative;
  min-width: 0;
  min-height: 54px;
  padding: 9px 7px !important;
  gap: 4px !important;
  border-color: #d5e6ef !important;
  border-radius: 11px !important;
  background: #fff !important;
  white-space: nowrap;
  overflow: hidden;
}
.duty-rotation li.duty-now {
  border-color: #5aaed4 !important;
  background: #edf8fd !important;
  box-shadow: inset 4px 0 0 #3e9ec8;
}
.duty-rotation li.duty-next {
  border-color: #89c8e2 !important;
  background: #f4fbfe !important;
  box-shadow: inset 4px 0 0 #79bdd9;
}
.duty-no {
  width: 26px !important;
  height: 26px !important;
  font-size: 12px !important;
  background: #edf4f8 !important;
  color: #5b7b8f !important;
  flex: 0 0 26px;
}
.duty-now .duty-no { background: #3e9ec8 !important; color: #fff !important; }
.duty-next .duty-no { background: #78bdd9 !important; color: #fff !important; }
.duty-prefix {
  flex: 0 0 auto;
  color: #9aabb6;
  font-size: 10.5px;
  font-weight: 500;
}
.duty-person {
  min-width: 0;
  overflow: hidden;
  color: #264b63;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
}
.duty-now .duty-person { color: #267da4; }
.duty-next .duty-person { color: #438ba9; }
.duty-tag {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 4px !important;
  border-radius: 999px;
  font-size: 8px !important;
  line-height: 1.1;
}
.duty-tag.now { background: #3e9ec8 !important; }
.duty-tag.next { background: #78bdd9 !important; }
.duty-block {
  border-color: #d8e9f1;
  background: #f8fcfe;
}
.duty-block h3 { color: #214a62; }
.duty-section { border-top-color: #dbeaf2; }
.duty-section h4 { color: #2b607d; }

/* 작은 화면에서도 기존 반응형 유지 */
@media (max-width: 1180px) {
  .duty-rotation { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}
@media (max-width: 720px) {
  #dashboardSection { padding: 16px 14px 18px; }
  .dashboard-cards .dash-card { min-height: 88px; }
  .duty-rotation { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ==========================================================
   v8 — 모던 모노톤 + 하늘색 포인트
   ========================================================== */
:root {
  --bg: #f4f5f6;
  --surface: #ffffff;
  --row-alt: #fafafa;
  --border: #e3e5e8;
  --border-strong: #d2d6da;
  --text: #25282c;
  --text-muted: #747b83;
  --accent: #58a8cf;
  --accent-hover: #3e91ba;
}

body {
  color: var(--text);
  background: #f4f5f6;
}
.topbar {
  background: #fff;
  border-bottom-color: #e4e6e8;
  box-shadow: 0 1px 8px rgba(24, 31, 38, .04);
}
.logo { color: #20252a; }
.daily-quote,
.duty-name { color: #727980; }
.duty-name:not(:empty)::before { color: #a1a7ad; }

.filterbar {
  background: #fbfbfc;
  border-bottom-color: #e3e5e7;
}
.tabs {
  background: #eff1f3;
  border: 1px solid #e2e5e8;
}
.tab { color: #6f767d; }
.tab:hover { color: #262a2e; }
.tab.active {
  color: #20252a;
  background: #fff;
  box-shadow: 0 1px 4px rgba(24, 31, 38, .08), inset 0 -2px 0 #67afd1;
}
.tab + .tab::before { background: #d9dde0; }

.btn.primary {
  background: #58a8cf;
  box-shadow: none;
}
.btn.primary:hover { background: #3f94bc; }
.btn.ghost {
  color: #343a40;
  border-color: #d2d6da;
  background: #fff;
}
.btn.ghost:hover { background: #f3f4f5; }

.input, .select,
.grid input, .grid select, .grid textarea {
  border-color: #d4d8dc;
  background: #fff;
}
.input:focus, .select:focus,
.grid input:focus, .grid select:focus, .grid textarea:focus {
  border-color: #75b7d5;
  outline-color: rgba(88, 168, 207, .45);
}

/* 주문 목록과 각종 표는 회색 모노톤으로 정리 */
table.orders {
  border-color: #dedfe2;
  box-shadow: 0 3px 12px rgba(20, 27, 34, .04);
}
.orders thead th {
  color: #555d65;
  background: #f0f1f2;
  border-color: #d9dcdf;
}
.orders tbody td {
  color: #30353a;
  border-color: #e6e7e9;
  background: #fff;
}
.orders tbody tr:nth-child(even) td { background: #fafafa; }
.orders tbody tr:hover td { background: #f3f7f9 !important; }
.orders tbody tr.group-header td,
.orders tbody tr.group-header:hover td {
  color: #353b40;
  background: #eceeef !important;
  border-top-color: #d8dadd;
  border-bottom-color: #d8dadd;
  box-shadow: inset 4px 0 0 #79b8d4;
}

.expense-table thead th,
.estimate-table thead th,
table.dash-list thead th {
  color: #596068;
  background: #f0f1f2;
  border-bottom-color: #d8dbde;
}
.expense-table tbody td,
.estimate-table tbody td,
table.dash-list tbody td {
  color: #353a3f;
  border-bottom-color: #e5e7e9;
  background: #fff;
}
.expense-table tbody tr:hover,
.estimate-table tbody tr:hover,
table.dash-list tbody tr:hover td {
  background: #f4f7f8;
}

/* 모달과 섹션도 중성색을 기본으로, 포인트만 하늘색 */
.modal { background: rgba(27, 31, 35, .38); }
.modal-box {
  border-color: #dedfe2;
  box-shadow: 0 24px 60px rgba(20, 27, 34, .20);
}
.modal-head {
  background: #fafafa;
  border-bottom-color: #e3e5e7;
}
.form-section-title {
  color: #3d718b;
  border-top-color: #7db9d3;
  border-bottom-color: #e1e3e5;
}
.comments,
.member-row,
.duty-block {
  background: #f7f8f9;
  border-color: #e0e3e5;
}
.comment-item,
.comm-log-input,
.comments-input {
  background: #fff;
  border-color: #dfe2e4;
}

/* 상황판: 흰색/회색 중심, 선택·상태 표시에만 하늘색 */
#dashboardSection {
  border-color: #e0e2e4;
  background: #fafafa;
  box-shadow: 0 6px 20px rgba(20, 27, 34, .05);
}
#dashboardSection .dashboard-heading h2 { color: #23272b; }
.dashboard-heading p { color: #767d84; }
.dashboard-cards .dash-card {
  background: #fff;
  border-color: #e0e3e5;
  box-shadow: 0 3px 10px rgba(20, 27, 34, .045);
}
.dashboard-cards .dash-card::before { background: #81b9d2; }
.dashboard-cards .dash-card:hover {
  border-color: #cbd5da;
  box-shadow: 0 7px 16px rgba(20, 27, 34, .08);
}
.dashboard-cards .dash-card.active {
  border-color: #83bdd7;
  background: #f8fbfc;
  box-shadow: 0 0 0 2px rgba(88, 168, 207, .14);
}
.dashboard-cards .dash-card.in-progress,
.dashboard-cards .dash-card.deadline,
.dashboard-cards .dash-card.backup-missing,
.dashboard-cards .dash-card.duty-card {
  --dash-accent: #5f9fbd;
  --dash-soft: #f6f8f9;
}
.dashboard-cards .dash-card-label { color: #636a71; }
.dashboard-cards .dash-card-value,
.dashboard-cards .dash-duty-value { color: #22272b; }
.dashboard-detail {
  background: #fff;
  border-color: #dfe2e4;
  box-shadow: 0 4px 14px rgba(20, 27, 34, .04);
}
.dashboard-detail .dashboard-detail-head h3 { color: #2f3439; }
.dashboard-detail-head h3 em,
.dashboard-detail-note { color: #777e85; }
.dashboard-empty {
  color: #747b82;
  background: #f6f7f8;
  border-color: #dfe2e4;
}
.dash-table-wrap { border-color: #dfe2e4; }

/* 주번 순서: '주번:' 삭제, 표 안은 모노톤 */
.duty-rotation {
  grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.duty-rotation li {
  min-height: 50px;
  padding: 8px 8px !important;
  gap: 7px !important;
  color: #2e3338;
  background: #fff !important;
  border-color: #dde0e3 !important;
  border-radius: 10px !important;
  box-shadow: none;
}
.duty-rotation li.duty-now {
  color: #263137;
  background: #f5f8f9 !important;
  border-color: #a9cbd9 !important;
  box-shadow: inset 3px 0 0 #5ea9ca;
}
.duty-rotation li.duty-next {
  color: #343a3f;
  background: #fafafa !important;
  border-color: #d0d8dc !important;
  box-shadow: inset 3px 0 0 #a8c7d5;
}
.duty-no {
  width: 25px !important;
  height: 25px !important;
  flex: 0 0 25px;
  color: #69727a !important;
  background: #eef0f2 !important;
  font-size: 12px !important;
}
.duty-now .duty-no {
  color: #fff !important;
  background: #5ca8ca !important;
}
.duty-next .duty-no {
  color: #4e5b62 !important;
  background: #dce8ed !important;
}
.duty-prefix { display: none !important; }
.duty-person {
  color: #282d31;
  font-size: 14px;
  font-weight: 750;
}
.duty-now .duty-person { color: #2e718e; }
.duty-next .duty-person { color: #44545c; }
.duty-tag {
  top: 4px;
  right: 4px;
  color: #fff;
  background: #727a81 !important;
}
.duty-tag.now { background: #5ca8ca !important; }
.duty-tag.next {
  color: #536068;
  background: #dbe7ec !important;
}
.duty-block h3 { color: #2d3237; }
.duty-section { border-top-color: #e0e3e5; }
.duty-section h4 { color: #3f484f; }
.duty-quote {
  color: #666d74;
  background: #f3f4f5;
  border-left-color: #9cbfce;
}

@media (max-width: 1180px) {
  .duty-rotation { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}
@media (max-width: 720px) {
  .duty-rotation { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ==========================================================
   v9 — 완료 엑셀·평가서·평가체크 / 상황판 담당자 그룹
   ========================================================== */
.done-admin-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #dfe2e4;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 27, 34, .035);
}
.done-admin-tools-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.done-admin-tools-title strong {
  color: #2f3439;
  font-size: 15px;
  white-space: nowrap;
}
.done-admin-tools-title span {
  color: #7a8187;
  font-size: 12.5px;
  white-space: nowrap;
}
.done-export-controls {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.done-export-controls label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #6c7379;
  font-size: 11.5px;
  font-weight: 650;
}
.done-export-controls input[type="date"] {
  width: 142px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #d2d6da;
  border-radius: 7px;
  background: #fff;
  color: #30353a;
  font: inherit;
  font-size: 13px;
}
.done-export-wave {
  padding-bottom: 8px;
  color: #8a9095;
}
.done-export-controls .btn {
  height: 34px;
  white-space: nowrap;
}

.col-evaluation,
.evaluation-marker-cell {
  min-width: 76px;
  width: 76px;
}
.col-report,
.report-cell {
  min-width: 78px;
  width: 78px;
  text-align: center !important;
  overflow: visible !important;
}
.evaluation-report-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #aeb8be;
  border-radius: 6px;
  background: #fff;
  color: #3d464c;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}
.evaluation-report-btn:hover {
  border-color: #69aeca;
  background: #f3f8fa;
  color: #2e718e;
}

/* 완료 탭 열이 늘어난 만큼 표 폭 확보 */
table.orders { min-width: 1380px; }

/* 상황판 진행 중 주문: 전체 탭처럼 편집담당자별 그룹 */
table.dash-list tbody tr.dash-owner-group td,
table.dash-list tbody tr.dash-owner-group:hover td {
  padding: 8px 12px;
  border-top: 1px solid #d8dadd;
  border-bottom: 1px solid #d8dadd;
  border-left: 4px solid var(--owner-color, #aeb4b9);
  background: #eceeef !important;
  color: #343a3f;
  font-size: 13.5px;
  font-weight: 800;
  text-align: center !important;
  cursor: default;
}
table.dash-list tbody tr.dash-owner-group .group-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--owner-color, #aeb4b9);
  vertical-align: 1px;
}
table.dash-list tbody tr.dash-owner-group .count {
  margin-left: 5px;
  color: #737a80;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .done-admin-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .done-admin-tools-title span { white-space: normal; }
  .done-export-controls { flex-wrap: wrap; }
}

/* ==========================================================
   v10 — 데스크톱 전용 고정형 레이아웃 / QHD 표 최대폭 제한
   ========================================================== */
html {
  min-width: 1400px;
  overflow-x: auto;
}
body {
  min-width: 1400px;
  background: #eef0f1;
}
.app {
  width: 100%;
  min-width: 1400px;
  max-width: 1920px;
  min-height: 100vh;
  margin: 0 auto;
  background: #f7f8f8;
  box-shadow: 0 0 0 1px rgba(25, 34, 40, .035);
}

/* 모바일 레이아웃은 사용하지 않고, 좁은 창에서는 가로 스크롤로 유지 */
.mobile-only { display: none !important; }
table.orders.desktop-only:not(.hidden) { display: table !important; }

.topbar,
.filterbar {
  width: 100%;
  max-width: 1920px;
  margin-right: auto;
  margin-left: auto;
  flex-wrap: nowrap !important;
}
.topbar {
  min-height: 60px;
  padding: 12px 24px !important;
}
.logo,
.topbar-right,
.tabs,
.filters {
  flex: 0 0 auto;
  white-space: nowrap;
}
.link-btns {
  min-width: 0;
  overflow: hidden;
}
.daily-quote {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filterbar {
  min-height: 55px;
  padding: 10px 24px !important;
  gap: 14px;
}
.tabs,
.filters { flex-wrap: nowrap !important; }

.table-wrap {
  width: 100%;
  max-width: 1840px;
  margin: 0 auto;
  padding: 2px 40px 46px !important;
  overflow-x: auto !important;
}
table.orders {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 1760px !important;
  margin: 14px auto 0 !important;
  table-layout: fixed !important;
}
.done-admin-tools,
#dashboardSection,
.mine-deadline-banner,
.footnote,
.empty {
  max-width: 1760px;
  margin-right: auto;
  margin-left: auto;
}

/* 표가 QHD 화면 전체로 과도하게 늘어나지 않도록 열 폭 고정 */
.orders .col-flag { width: 42px !important; }
.orders .col-owner { width: 118px !important; }
.orders .col-channel { width: 86px !important; }
.orders .col-date { width: 108px !important; }
.orders .col-shootdate { width: 114px !important; }
.orders .col-due { width: 114px !important; }
.orders .col-content { width: 320px !important; }
.orders .col-client { width: 150px !important; }
.orders .col-contact { width: 220px !important; }
.orders .col-completed { width: 108px !important; }
.orders .col-status { width: 104px !important; }
.orders .col-marker,
.orders .marker-cell,
.orders .col-evaluation,
.orders .evaluation-marker-cell { width: 66px !important; min-width: 66px !important; }
.orders .col-report,
.orders .report-cell { width: 74px !important; min-width: 74px !important; }

.orders thead th,
.orders tbody td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.orders thead th,
.orders tbody td:not(.col-content):not(.col-client):not(.col-contact) {
  text-align: center;
}
.orders tbody td.col-content,
.orders tbody td.col-client,
.orders tbody td.col-contact {
  text-align: left;
}

/* 기존 반응형 규칙을 데스크톱 고정형으로 덮어씀 */
@media (max-width: 1180px), (max-width: 1024px), (max-width: 900px), (max-width: 767px), (max-width: 720px) {
  html,
  body,
  .app { min-width: 1400px !important; }
  .topbar,
  .filterbar {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
  }
  .topbar-right,
  .tabs,
  .filters { flex-wrap: nowrap !important; }
  .table-wrap { padding: 2px 40px 46px !important; }
  table.orders { min-width: 0 !important; }
  .desktop-only:not(.hidden) { display: table !important; }
  .mobile-only { display: none !important; }
}

/* ==========================================================
   v11 — 실행 오류 복구 / 무스크롤 데스크톱 반응형 / 표 최대폭
   ========================================================== */
html,
body {
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}
body { background: #eef0f1; }
.app {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* 상단은 창 너비에 맞춰 자연스럽게 줄어들고, 필요할 때만 두 줄로 정리 */
.topbar,
.filterbar {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-sizing: border-box;
}
.topbar {
  display: grid !important;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center !important;
  gap: 10px 18px !important;
  padding: 11px 22px !important;
}
.logo,
.topbar-right { min-width: 0; }
.link-btns {
  min-width: 0 !important;
  overflow: hidden !important;
}
.daily-quote {
  max-width: 100%;
  margin-left: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filterbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 8px 14px !important;
  padding: 9px 22px !important;
}
.tabs,
.filters {
  min-width: 0 !important;
  flex-wrap: nowrap !important;
}
.tabs { flex: 0 1 auto !important; }
.filters { flex: 0 1 auto !important; }
.tab {
  padding-right: 11px !important;
  padding-left: 11px !important;
}
.input { width: clamp(150px, 18vw, 250px) !important; }

/* 표는 QHD에서도 일정 폭 이상 늘어나지 않고 가운데 정렬 */
.table-wrap {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 2px 18px 46px !important;
  overflow-x: hidden !important;
}
table.orders {
  width: min(100%, 1480px) !important;
  min-width: 0 !important;
  max-width: 1480px !important;
  margin: 14px auto 0 !important;
  table-layout: fixed !important;
}
.done-admin-tools,
#dashboardSection,
.mine-deadline-banner,
.footnote,
.empty {
  width: min(100%, 1480px) !important;
  max-width: 1480px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

/* 기본 목록 열 폭: 완료 탭의 추가 열까지 한 화면에 들어가도록 압축 */
.orders .col-flag { width: 30px !important; min-width: 0 !important; }
.orders .col-owner { width: 94px !important; min-width: 0 !important; }
.orders .col-channel { width: 66px !important; min-width: 0 !important; }
.orders .col-date { width: 82px !important; min-width: 0 !important; }
.orders .col-shootdate { width: 88px !important; min-width: 0 !important; }
.orders .col-due { width: 88px !important; min-width: 0 !important; }
.orders .col-content { width: 260px !important; min-width: 0 !important; }
.orders .col-client { width: 120px !important; min-width: 0 !important; }
.orders .col-contact { width: 176px !important; min-width: 0 !important; }
.orders .col-completed { width: 82px !important; min-width: 0 !important; }
.orders .col-status { width: 80px !important; min-width: 0 !important; }
.orders .col-marker,
.orders .marker-cell,
.orders .col-evaluation,
.orders .evaluation-marker-cell {
  width: 54px !important;
  min-width: 0 !important;
}
.orders .col-report,
.orders .report-cell {
  width: 66px !important;
  min-width: 0 !important;
}
.orders thead th {
  padding: 6px 4px !important;
  font-size: 13px !important;
}
.orders tbody td {
  padding: 5px 5px !important;
  font-size: 13.5px !important;
}
.owner-chip,
.status-pill { max-width: 100%; }
.evaluation-report-btn {
  width: calc(100% - 4px);
  height: 26px;
  padding: 0 4px;
  font-size: 11.5px;
}

/* 완료 다운로드 바가 좁은 창에서도 깨지지 않게 정리 */
.done-admin-tools {
  flex-wrap: wrap;
  gap: 10px 16px;
}
.done-export-controls { flex-wrap: nowrap; }

/* 모바일 카드 전환은 사용하지 않되, 데스크톱 화면 자체는 유연하게 축소 */
.mobile-only { display: none !important; }
table.orders.desktop-only:not(.hidden) { display: table !important; }

@media (max-width: 1320px) {
  .daily-quote { display: none !important; }
  .topbar { grid-template-columns: 1fr auto !important; }
  .link-btns { display: none !important; }
  .tab { padding-right: 9px !important; padding-left: 9px !important; font-size: 14px !important; }
  .filterbar { padding-right: 14px !important; padding-left: 14px !important; }
  .table-wrap { padding-right: 10px !important; padding-left: 10px !important; }
  .orders thead th { font-size: 12px !important; }
  .orders tbody td { padding-right: 3px !important; padding-left: 3px !important; font-size: 12.5px !important; }
}

@media (max-width: 980px) {
  .topbar { padding-right: 12px !important; padding-left: 12px !important; }
  .filterbar {
    align-items: stretch !important;
    flex-direction: column !important;
  }
  .tabs,
  .filters {
    width: 100%;
    justify-content: space-between;
  }
  .tabs .tab { flex: 1 1 0; }
  .filters .input { flex: 1 1 auto; width: auto !important; }
  .done-admin-tools { align-items: stretch; flex-direction: column; }
  .done-export-controls { align-items: flex-end; }
}

/* ==========================================================
   v12 — 주문표 및 관련 패널 왼쪽 정렬
   ========================================================== */
table.orders {
  margin-left: 0 !important;
  margin-right: auto !important;
}

.done-admin-tools,
#dashboardSection,
.mine-deadline-banner,
.footnote,
.empty {
  margin-left: 0 !important;
  margin-right: auto !important;
}


/* v13 — 영상제작기록 PDF 구조·연속 페이지 제목 개선 */


/* ==========================================================
   v16 — 촬영 일정·진행률 / 촬영자 입력 정리
   ========================================================== */

/* 촬영 회차 입력: 첫 줄은 회차·날짜·촬영자·촬영완료, 둘째 줄은 촬영기록 */
.multi-entry-row.shooter-row {
  grid-template-columns: 92px 132px minmax(250px, 1fr) 72px 30px !important;
  grid-template-areas:
    "round date shooter done remove"
    "record record record record remove";
  align-items: end;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafafa;
}
.shooter-row .round-field { grid-area: round; }
.shooter-row .shooting-date-field { grid-area: date; }
.shooter-row .shooter-picker { grid-area: shooter; }
.shooter-row .shooting-done-field { grid-area: done; }
.shooter-row .shoot-record-field { grid-area: record; }
.shooter-row .remove-btn { grid-area: remove; align-self: center; }

.shooting-done-field {
  min-width: 0;
}
.shooting-done-control {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.shooting-done-control input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #64748b;
}
.shooter-row .shoot-record-field input { width: 100%; }
.shooter-row input[type="date"] { min-width: 0; width: 100%; }

/* 주문 목록 촬영 진행률 */
.orders .col-owner { width: 76px !important; min-width: 0 !important; }
.orders .col-shoot-progress { width: 68px !important; min-width: 0 !important; }
.shoot-progress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 48px;
  height: 23px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.shoot-progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.shoot-progress.low {
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
}
.shoot-progress.low .shoot-progress-dot { background: #e5484d; }
.shoot-progress.mid {
  color: #8a5a00;
  background: #fff8e1;
  border: 1px solid #f3d58a;
}
.shoot-progress.mid .shoot-progress-dot { background: #e5a000; }
.shoot-progress.complete {
  color: #5f6368;
  background: #f1f3f4;
  border: 1px solid #d9dde1;
}
.shoot-progress.complete .shoot-progress-dot { background: #92979d; }

/* 상황판 호출 목록도 편집담당 칸을 작게 유지 */
.dash-list th:first-child,
.dash-list td:first-child { width: 86px; }
.dash-list .shoot-progress { transform: scale(.95); }

@media (max-width: 900px) {
  .multi-entry-row.shooter-row {
    grid-template-columns: 86px 124px minmax(210px, 1fr) 68px 30px !important;
  }
}


/* ==========================================================
   v17 — 촬영일 미정 / 촬영 없음 표시
   ========================================================== */
.multi-entry-row.shooter-row {
  grid-template-columns: 92px 188px minmax(230px, 1fr) 72px 30px !important;
}
.shooting-date-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.shooting-date-control > input[type="date"] {
  min-width: 0;
  width: 100%;
}
.shooting-date-control > input[type="date"]:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}
.shoot-date-tbd {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: #5f6368;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.shoot-date-tbd input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #64748b;
}
.shoot-progress.tbd {
  color: #5f6368;
  background: #f6f7f8;
  border: 1px solid #d9dde1;
}
.shoot-progress.tbd .shoot-progress-dot { background: #b4bac1; }
.shoot-progress-none {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 23px;
  color: #9aa0a6;
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================
   v18 — 촬영없음 / 촬영 미완료 상황판
   ========================================================== */
.shooter-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.no-shooting-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  text-transform: none;
}
.no-shooting-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #111827;
}
.shooter-entry-wrap.is-disabled {
  opacity: 1;
}
.shooting-none-note {
  padding: 12px 14px;
  border: 1px dashed #c9cdd2;
  border-radius: 8px;
  background: #f7f7f7;
  color: #555;
  font-size: 14px;
}
#addShooterBtn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.shooting-done-control input[type="checkbox"] {
  accent-color: #64748b;
}
.shoot-progress.none-checked {
  color: #111827;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
}
.shoot-progress.none-checked .shoot-progress-dot {
  background: #111827;
}
.dash-card.shooting-incomplete .dash-card-value {
  color: #b45309;
}
.dash-card.shooting-incomplete.active,
.dash-card.shooting-incomplete:hover {
  border-color: #f59e0b;
}


/* ==========================================================
   v19 — 상황판 카드 5개 한 줄 배치
   ========================================================== */
@media (min-width: 1181px) {
  .dashboard-cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
