@charset "UTF-8";
/* =========================================================
   유지보수센터 공통 스타일
   - 색·간격·모서리는 :root 토큰으로만 쓴다
   ========================================================= */

:root {
  /* 브랜드 */
  /* 브랜드: 네이비 + 코랄(주요 버튼) */
  --primary: #24345c;
  --primary-hover: #1a2747;
  --primary-soft: #e9edf6;
  --primary-softer: #f5f7fb;
  --primary-rgb: 36, 52, 92;
  --primary-line: #dbe1ee;
  --cta: #ff6b4a;
  --cta-hover: #f0532f;
  --cta-rgb: 255, 107, 74;
  /* 로고·로그인 브랜드 영역 */
  --brand-grad: linear-gradient(150deg, #2b3d6b 0%, #1b2746 100%);
  --brand-glow-1: rgba(255, 140, 110, .28);
  --brand-glow-2: rgba(10, 16, 34, .6);
  /* 메인 인사 영역 */
  --hero-grad: linear-gradient(135deg, #f3f5fa 0%, #e8ecf5 100%);
  --hero-glow: rgba(255, 140, 110, .18);

  /* 텍스트 */
  --text: #1a1d24;
  --text-sub: #4b5162;
  --text-muted: #8a90a0;
  --text-disabled: #b6bbc6;

  /* 바탕·선 */
  --bg: #f4f5f8;
  --surface: #ffffff;
  --border: #e3e5eb;
  --border-strong: #cdd1da;

  /* 상태 (MN001) */
  --st-10: #6b7684;   --st-10-bg: #f2f4f6;   /* 접수 */
  --st-20: #6a4dff;   --st-20-bg: #f1eeff;   /* 확인 */
  --st-30: #3b6fd8;   --st-30-bg: #ebf1fd;   /* 진행중 */
  --st-40: #f57800;   --st-40-bg: #fff4e6;   /* 검수요청 */
  --st-50: #12a150;   --st-50-bg: #e9f8ef;   /* 완료 */
  --st-90: #e5484d;   --st-90-bg: #fdeced;   /* 반려 */

  /* 파트 (MN010) */
  --part-01: #d6409f; --part-01-bg: #fdeef7;  /* 디자인 */
  --part-02: #0e8a8a; --part-02-bg: #e6f6f6;  /* 개발 */
  --part-99: #6b7684; --part-99-bg: #f2f4f6;  /* 기타 */

  /* 모양 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .04);
  --shadow: 0 2px 8px rgba(17, 24, 39, .05), 0 1px 2px rgba(17, 24, 39, .04);
  --shadow-lg: 0 12px 32px rgba(17, 24, 39, .08);

  --border-hover: #b8c0c8;
  --header-bg: rgba(255, 255, 255, .92);
  --footer-bg: #eef1f5; --footer-line: #dde2e8; --footer-sep: #c9d0d8;
  --st-40-line: #ffe0bd; --st-40-hover: #e06c00;
  --alert-error-fg: #b4262b; --alert-warn-fg: #a35000;
  --toast-bg: #1f2937; --overlay: rgba(17, 24, 39, .45);
  --shadow-modal: 0 24px 48px rgba(17, 24, 39, .18);
  /* 다크모드에서 쓸 포인트색 (테마별로 바꿈) */
  --primary-dk: #6f86c4; --primary-dk-hover: #8499d1; --primary-dk-rgb: 111, 134, 196;
  color-scheme: light;

  --header-h: 64px;
  --container: 1120px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

/* =========================================================
   다크모드 — 시스템 설정을 따르고, data-mode로 직접 고를 수 있다
   ========================================================= */
:root[data-mode="dark"] {
  color-scheme: dark;
  --primary: var(--primary-dk); --primary-hover: var(--primary-dk-hover); --primary-rgb: var(--primary-dk-rgb);
  --primary-soft: color-mix(in srgb, var(--primary-dk) 20%, #171b1f);
  --primary-softer: color-mix(in srgb, var(--primary-dk) 9%, #171b1f);
  --primary-line: color-mix(in srgb, var(--primary-dk) 32%, #171b1f);
  --text: #eceff2; --text-sub: #b3bcc5; --text-muted: #87919b; --text-disabled: #59626b;
  --bg: #0e1113; --surface: #171b1f; --border: #262c32; --border-strong: #363d44; --border-hover: #4a535c;
  --header-bg: rgba(23, 27, 31, .88);
  --footer-bg: #121518; --footer-line: #23292e; --footer-sep: #3a424a;
  --st-10: #a2acb6; --st-10-bg: rgba(162, 172, 182, .14);
  --st-20: #a594ff; --st-20-bg: rgba(130, 110, 255, .18);
  --st-30: #6fa0ff; --st-30-bg: rgba(80, 130, 255, .18);
  --st-40: #ffa94d; --st-40-bg: rgba(255, 150, 40, .15); --st-40-line: rgba(255, 150, 40, .32); --st-40-hover: #ff9a2e;
  --st-50: #4cc38a; --st-50-bg: rgba(40, 190, 110, .16);
  --st-90: #ff6b70; --st-90-bg: rgba(255, 80, 85, .16);
  --part-01: #f07cc4; --part-01-bg: rgba(230, 80, 170, .16);
  --part-02: #3cc7c0; --part-02-bg: rgba(20, 180, 170, .16);
  --part-99: #a2acb6; --part-99-bg: rgba(162, 172, 182, .14);
  --alert-error-fg: #ff9a9e; --alert-warn-fg: #ffbb70;
  --toast-bg: #2b3239; --overlay: rgba(0, 0, 0, .6);
  --hero-grad: linear-gradient(135deg, color-mix(in srgb, var(--primary-dk) 16%, #171b1f) 0%, color-mix(in srgb, var(--primary-dk) 8%, #171b1f) 100%);
  --hero-glow: rgba(var(--primary-dk-rgb), .22);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);
  --shadow-modal: 0 24px 48px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    color-scheme: dark;
    --primary: var(--primary-dk); --primary-hover: var(--primary-dk-hover); --primary-rgb: var(--primary-dk-rgb);
    --primary-soft: color-mix(in srgb, var(--primary-dk) 20%, #171b1f);
    --primary-softer: color-mix(in srgb, var(--primary-dk) 9%, #171b1f);
    --primary-line: color-mix(in srgb, var(--primary-dk) 32%, #171b1f);
    --text: #eceff2; --text-sub: #b3bcc5; --text-muted: #87919b; --text-disabled: #59626b;
    --bg: #0e1113; --surface: #171b1f; --border: #262c32; --border-strong: #363d44; --border-hover: #4a535c;
    --header-bg: rgba(23, 27, 31, .88);
    --footer-bg: #121518; --footer-line: #23292e; --footer-sep: #3a424a;
    --st-10: #a2acb6; --st-10-bg: rgba(162, 172, 182, .14);
    --st-20: #a594ff; --st-20-bg: rgba(130, 110, 255, .18);
    --st-30: #6fa0ff; --st-30-bg: rgba(80, 130, 255, .18);
    --st-40: #ffa94d; --st-40-bg: rgba(255, 150, 40, .15); --st-40-line: rgba(255, 150, 40, .32); --st-40-hover: #ff9a2e;
    --st-50: #4cc38a; --st-50-bg: rgba(40, 190, 110, .16);
    --st-90: #ff6b70; --st-90-bg: rgba(255, 80, 85, .16);
    --part-01: #f07cc4; --part-01-bg: rgba(230, 80, 170, .16);
    --part-02: #3cc7c0; --part-02-bg: rgba(20, 180, 170, .16);
    --part-99: #a2acb6; --part-99-bg: rgba(162, 172, 182, .14);
    --alert-error-fg: #ff9a9e; --alert-warn-fg: #ffbb70;
    --toast-bg: #2b3239; --overlay: rgba(0, 0, 0, .6);
    --hero-grad: linear-gradient(135deg, color-mix(in srgb, var(--primary-dk) 16%, #171b1f) 0%, color-mix(in srgb, var(--primary-dk) 8%, #171b1f) 100%);
    --hero-glow: rgba(var(--primary-dk-rgb), .22);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 2px 8px rgba(0, 0, 0, .35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);
    --shadow-modal: 0 24px 48px rgba(0, 0, 0, .5);
  }
}

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-y: scroll; }  /* 스크롤바 자리를 항상 같게 두어 화면 전환 때 좌우로 밀리지 않게 */
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  /* 내용이 짧아도 푸터가 화면 맨 아래에 붙도록 */
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.page { padding: 32px 0 0; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- 헤더 ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header .container { height: 100%; display: flex; align-items: center; gap: 40px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--brand-grad);
  color: #fff;
}
.header-panel { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.gnb { display: flex; gap: 4px; }
.gnb a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-weight: 600; color: var(--text-sub);
  transition: background .15s, color .15s;
}
.gnb a:hover { background: var(--bg); color: var(--text); }
.gnb a.is-active { color: var(--primary); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary);
  font-size: 14px; font-weight: 700;
}
.avatar-lg { width: 44px; height: 44px; font-size: 17px; }

/* 사용자 메뉴 (드롭다운) */
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 10px 0 6px; border-radius: 12px;
  text-align: left; transition: background .15s;
}
.user-btn:hover, .user-menu.is-open .user-btn { background: var(--bg); }
.user-text { display: flex; flex-direction: column; min-width: 0; }
.user-text .company { font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.user-text .name { font-size: 14px; font-weight: 700; line-height: 1.35; white-space: nowrap; }
.user-btn .chevron { color: var(--text-muted); transition: transform .2s; }
.user-menu.is-open .chevron { transform: rotate(180deg); }

.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 240px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.user-menu.is-open .user-dropdown { opacity: 1; visibility: visible; transform: none; }
.ud-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.ud-name { font-size: 15px; font-weight: 700; }
.ud-sub { font-size: 12.5px; color: var(--text-muted); }
.ud-item {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 10px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--text-sub);
  transition: background .15s, color .15s;
}
.ud-item svg { color: var(--text-muted); }
.ud-item:hover { background: var(--bg); color: var(--text); }
button.ud-item { width: 100%; text-align: left; }
.ud-item .switch { margin-left: auto; pointer-events: none; }
.ud-item .switch .track { width: 36px; height: 22px; }
.ud-item .switch .track::after { width: 16px; height: 16px; }
.ud-item .switch input:checked + .track::after { transform: translateX(14px); }
.ud-item.is-logout:hover, .ud-item.is-logout:hover svg { color: var(--st-90); }

/* 화면 모드 버튼 (로그인 화면 등) */
.mode-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--text-sub); background: var(--surface); border: 1px solid var(--border);
}
.mode-btn:hover { color: var(--text); border-color: var(--border-strong); }
.mode-btn .ic-sun, [data-mode-now="dark"] .mode-btn .ic-moon { display: none; }
[data-mode-now="dark"] .mode-btn .ic-sun { display: block; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-cta { background: var(--cta); color: #fff; }
.btn-cta:hover { background: var(--cta-hover); }
.btn-line { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-sub); }
.btn-line:hover { background: var(--bg); color: var(--text); }
.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-lg { height: 52px; padding: 0 24px; border-radius: 14px; font-size: 16px; font-weight: 700; }
.btn-sm { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; }

/* ---------- 카드 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 8px; }
.card-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.card-body { padding: 8px 24px 24px; }
.link-more { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.link-more:hover { color: var(--primary); }

/* ---------- 배지 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.st-10 { color: var(--st-10); background: var(--st-10-bg); }
.badge.st-20 { color: var(--st-20); background: var(--st-20-bg); }
.badge.st-30 { color: var(--st-30); background: var(--st-30-bg); }
.badge.st-40 { color: var(--st-40); background: var(--st-40-bg); }
.badge.st-50 { color: var(--st-50); background: var(--st-50-bg); }
.badge.st-90 { color: var(--st-90); background: var(--st-90-bg); }

.chip {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.chip.part-01 { color: var(--part-01); background: var(--part-01-bg); }
.chip.part-02 { color: var(--part-02); background: var(--part-02-bg); }
.chip.part-99 { color: var(--part-99); background: var(--part-99-bg); }

/* ---------- 푸터 ---------- */
.footer {
  margin-top: 72px; padding: 32px 0 40px;
  background: var(--footer-bg); border-top: 1px solid var(--border);
  font-size: 13px; line-height: 1.7; color: var(--text-muted);
}
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--footer-line); }
.footer-logo { font-size: 15px; font-weight: 800; color: var(--text-sub); letter-spacing: -.02em; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-sub); font-weight: 500; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-links a.is-strong { font-weight: 700; color: var(--text); }
.footer-info p { display: flex; flex-wrap: wrap; }
.footer-info p span:not(:last-child)::after { content: ""; display: inline-block; width: 1px; height: 10px; margin: 0 10px; background: var(--footer-sep); vertical-align: middle; }
.footer-info .copyright { margin-top: 10px; color: var(--text-disabled); }

/* =========================================================
   공통 부품 (폼, 모달, 탭, 페이지네이션 등)
   ========================================================= */

/* ---------- 폼 ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field + .field { margin-top: 20px; }
.label { font-size: 14px; font-weight: 600; color: var(--text); }
.label .req { color: var(--st-90); margin-left: 2px; }
.label .opt { margin-left: 4px; font-weight: 400; color: var(--text-muted); font-size: 13px; }
.help { font-size: 13px; color: var(--text-muted); }
.error-msg { display: none; font-size: 13px; color: var(--st-90); }
.field.is-error .error-msg { display: block; }

.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px;
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-disabled); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-hover); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .12); }
.field.is-error .input, .field.is-error .select, .field.is-error .textarea, .field.is-error .editor { border-color: var(--st-90); }
.field.is-error .input:focus { box-shadow: 0 0 0 4px var(--st-90-bg); }
.input:disabled, .input[readonly] { background: var(--bg); color: var(--text-sub); }
.select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b95a1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.input-sm, .select-sm { height: 40px; font-size: 14px; border-radius: 10px; }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.input-icon-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center; color: var(--text-muted);
}
.input-icon-btn:hover { background: var(--bg); color: var(--text); }
.input-search { position: relative; }
.input-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.input-search .input { padding-left: 42px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-2 > .field + .field { margin-top: 0; }

/* ---------- 콤보박스 (select를 꾸민 드롭다운) ----------
   <select class="select">를 JS가 감싸서 만든다. 값은 원래 select에 남는다 */
.cselect { position: relative; }
.cselect > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.cs-btn { display: flex; align-items: center; text-align: left; }
.cs-btn .cs-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-btn.is-placeholder .cs-value { color: var(--text-disabled); }
.cs-btn:disabled { background-color: var(--bg); color: var(--text-muted); cursor: not-allowed; border-color: var(--border); }
.cselect.is-open .cs-btn { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .12); }
.cs-btn { transition: border-color .15s, box-shadow .15s, background-position .2s; }
.cselect.is-open .cs-btn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b95a1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 15l6-6 6 6'/%3E%3C/svg%3E");
}
.cs-panel {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 100%; max-width: 360px;
  padding: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.cselect.is-up .cs-panel { top: auto; bottom: calc(100% + 6px); transform: translateY(4px); }
.cselect.is-open .cs-panel { opacity: 1; visibility: visible; transform: none; }
/* 팝업 안: 닫힌 목록이 내용 높이에 잡혀 쓸데없는 스크롤이 생기지 않게 화면 기준으로 둔다(열 때 JS가 위치 지정) */
.modal-body .cs-panel, .modal-body .cd-panel { position: fixed; }
.cs-sheet-head { display: none; }
.cs-list { max-height: 280px; overflow-y: auto; overscroll-behavior: contain; }
.modal-body, .cs-list { scrollbar-width: thin; scrollbar-color: var(--border-strong, var(--border)) transparent; }
.modal-body::-webkit-scrollbar, .cs-list::-webkit-scrollbar { width: 10px; }
.modal-body::-webkit-scrollbar-thumb, .cs-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; border: 3px solid var(--surface); }
.modal-body::-webkit-scrollbar-track, .cs-list::-webkit-scrollbar-track { background: transparent; }
.cs-opt {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 8px 12px; border-radius: 8px;
  font-size: 14.5px; color: var(--text-sub); cursor: pointer; white-space: nowrap;
}
.cs-opt .cs-check { margin-left: auto; color: var(--primary); opacity: 0; }
.cs-opt.is-active { background: var(--bg); color: var(--text); }
.cs-opt[aria-selected="true"] { color: var(--primary); font-weight: 700; }
.cs-opt[aria-selected="true"] .cs-check { opacity: 1; }
.cs-opt.is-empty { color: var(--text-muted); }
.cs-opt[aria-disabled="true"] { color: var(--text-disabled); cursor: default; }
.select-sm + .cs-btn, .cs-btn.select-sm { font-size: 14px; }
.cselect.is-sm .cs-opt { min-height: 36px; font-size: 14px; }

/* ---------- 달력 (input[type=date]를 꾸민 날짜 선택) ---------- */
.cdate { position: relative; }
.cdate > input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.cd-btn { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.cd-btn .cd-value { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-feature-settings: "tnum"; }
.cd-btn.is-placeholder .cd-value { color: var(--text-disabled); }
.cd-btn svg { color: var(--text-muted); }
.cd-btn:disabled { background: var(--bg); color: var(--text-muted); cursor: not-allowed; }
.cdate.is-open .cd-btn { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .12); }
.cdate.is-open .cd-btn svg { color: var(--primary); }

.cd-panel {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 60;
  width: 308px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.cdate.is-right .cd-panel { left: auto; right: 0; }
.cdate.is-up .cd-panel { top: auto; bottom: calc(100% + 6px); transform: translateY(4px); }
.cdate.is-open .cd-panel { opacity: 1; visibility: visible; transform: none; }
.cd-sheet-head { display: none; }

.cd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cd-title { height: 34px; padding: 0 10px; border-radius: 8px; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.cd-title:hover { background: var(--bg); }
.cd-title svg { color: var(--text-muted); }
.cd-nav { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--text-sub); }
.cd-nav:hover { background: var(--bg); color: var(--text); }
.cd-nav:disabled { color: var(--text-disabled); background: none; cursor: default; }

.cd-week, .cd-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cd-week span { height: 30px; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.cd-week span:first-child { color: var(--st-90); }
.cd-week span:last-child { color: var(--st-30); }
.cd-days { row-gap: 2px; }
.cd-day {
  position: relative; height: 38px; padding: 0; min-width: 0;
  display: grid; place-items: center;
  font-size: 14px; font-feature-settings: "tnum"; color: var(--text);
}
.cd-day span { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; transition: background .12s; }
.cd-day:hover span { background: var(--bg); }
.cd-day.is-sun { color: var(--st-90); }
.cd-day.is-sat { color: var(--st-30); }
.cd-day.is-out { color: var(--text-disabled); }
.cd-day.is-today span { box-shadow: inset 0 0 0 1.5px var(--cta); font-weight: 700; }
.cd-day:focus-visible { outline: none; }
.cd-day:focus-visible span { outline: 2px solid rgba(var(--primary-rgb), .45); outline-offset: 1px; }
.cd-day.in-range { background: var(--primary-soft); }
.cd-day.range-start { background: linear-gradient(90deg, transparent 50%, var(--primary-soft) 50%); }
.cd-day.range-end { background: linear-gradient(90deg, var(--primary-soft) 50%, transparent 50%); }
.cd-day.range-start.range-end { background: none; }
.cd-day.is-selected span { background: var(--primary); color: #fff; font-weight: 700; box-shadow: none; }
.cd-day:disabled { color: var(--text-disabled); cursor: not-allowed; text-decoration: line-through; text-decoration-color: var(--border-strong); }
.cd-day:disabled:hover span { background: none; }

.cd-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 0; }
.cd-month { padding: 0; height: 48px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-sub); }
.cd-month:hover { background: var(--bg); color: var(--text); }
.cd-month.is-selected { background: var(--primary); color: #fff; }
.cd-month.is-now:not(.is-selected) { box-shadow: inset 0 0 0 1.5px var(--cta); color: var(--text); }

.cd-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.cd-foot button { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-sub); }
.cd-foot button:hover { background: var(--bg); color: var(--text); }
.cd-foot .cd-today { color: var(--primary); }

/* 체크박스 */
.check { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--text-sub); user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.check .box svg { opacity: 0; color: #fff; }
.check input:checked + .box { background: var(--primary); border-color: var(--primary); }
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .2); }

/* 토글 스위치 */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text-sub); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--border-strong); transition: background .2s; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .2); }

/* 세그먼트 (2~4개 중 하나 고르기) */
.segment { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--bg); }
.segment label { position: relative; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment span {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 18px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.segment input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segment input:checked + span.is-danger { color: var(--st-90); }
.segment input:focus-visible + span { box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .25); }

/* ---------- 알림 박스 ---------- */
.alert { display: flex; gap: 10px; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.55; }
.alert svg { margin-top: 2px; }
.alert-info { background: var(--primary-softer); color: var(--text-sub); border: 1px solid var(--primary-line); }
.alert-info svg { color: var(--primary); }
.alert-error { background: var(--st-90-bg); color: var(--alert-error-fg); }
.alert-warn { background: var(--st-40-bg); color: var(--alert-warn-fg); }

/* ---------- 탭 (상태 필터) ---------- */
.tabs {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 2px; margin: -2px;  /* 포커스 테두리가 잘리지 않게 */
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  --c: var(--text-muted);
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  height: 42px; padding: 0 8px 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--text-sub);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.tab::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.tab.st-all::before { display: none; }
.tab.st-all { padding-left: 16px; }
.tab.st-10 { --c: var(--st-10); }
.tab.st-20 { --c: var(--st-20); }
.tab.st-30 { --c: var(--st-30); }
.tab.st-40 { --c: var(--st-40); }
.tab.st-50 { --c: var(--st-50); }
.tab.st-90 { --c: var(--st-90); }
.tab .cnt {
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px;
  display: inline-grid; place-items: center;
  font-size: 12.5px; font-weight: 700; font-feature-settings: "tnum";
  color: var(--text-sub); background: var(--bg);
  transition: background .15s, color .15s;
}
.tab:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow); }
.tab:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .25); }
/* 확인이 필요한 건(검수요청)은 건수를 강조 */
.tab.has-alert .cnt { color: var(--surface); background: var(--st-40); }
/* 선택된 탭 */
.tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(var(--primary-rgb), .25); transform: none; }
.tab.is-active::before { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.tab.is-active .cnt { color: #fff; background: rgba(255, 255, 255, .18); }
.tab.is-active.has-alert .cnt { background: var(--st-40); }

/* ---------- 페이지네이션 ---------- */
.list-opts { display: flex; align-items: center; gap: 8px; }
.list-opts .cselect { flex: 0 0 auto; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 24px; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; padding: 0 6px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 600; color: var(--text-sub);
}
.pagination a:hover { background: var(--surface); color: var(--text); }
.pagination .is-current { background: var(--primary); color: #fff; }
.pagination .is-disabled { color: var(--text-disabled); pointer-events: none; }

/* ---------- 빈 화면 ---------- */
.empty { padding: 56px 16px; text-align: center; color: var(--text-muted); }
.empty-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: var(--bg); color: var(--text-disabled); }
.empty strong { display: block; font-size: 16px; color: var(--text-sub); margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }

/* ---------- 모달 / 바텀시트 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: var(--overlay);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-box {
  width: 100%; max-width: 480px; max-height: calc(100dvh - 48px);
  display: flex; flex-direction: column; overflow: hidden;  /* 제목·버튼은 고정, 내용만 스크롤 */
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-modal);
  transform: translateY(12px) scale(.98); transition: transform .2s;
}
.modal.is-open .modal-box { transform: none; }
.modal-head { flex-shrink: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 24px 0; }
.modal-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.modal-head p { margin-top: 6px; font-size: 14px; color: var(--text-sub); }
.modal-close { width: 36px; height: 36px; margin: -6px -8px 0 0; border-radius: 10px; display: grid; place-items: center; color: var(--text-muted); }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px; }
.modal-body.is-scroll { border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.modal-foot { flex-shrink: 0; }
.modal-foot { display: flex; gap: 8px; padding: 0 24px 24px; }
.modal-foot .btn { flex: 1; height: 48px; font-size: 15px; }
.modal-sm .modal-box { max-width: 400px; }
.modal-sm .modal-body { padding-top: 8px; }
.modal-sm .modal-head { flex-direction: column; align-items: center; text-align: center; }
.modal-sm .modal-icon { width: 52px; height: 52px; margin: 0 auto 4px; border-radius: 50%; display: grid; place-items: center; background: var(--st-50-bg); color: var(--st-50); }
body.is-modal-open { overflow: hidden; }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 200;
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px; border-radius: 14px;
  background: var(--toast-bg); color: #fff; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: transform .25s, opacity .25s;
}
.toast.is-show { transform: translate(-50%, 0); opacity: 1; }
.toast svg { color: #4ade80; }

/* ---------- 첨부 ---------- */
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.file-ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 10.5px; font-weight: 800; text-transform: uppercase; flex-shrink: 0; }
.file-ic.img { background: var(--part-01-bg); color: var(--part-01); }
.file-ic.doc { background: var(--st-50-bg); color: var(--st-50); }
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 12.5px; color: var(--text-muted); }
.file-act { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--text-muted); flex-shrink: 0; }
.file-act:hover { background: var(--bg); color: var(--text); }
.file-act.is-del:hover { color: var(--st-90); background: var(--st-90-bg); }

/* ---------- 페이지 제목 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.3; }
.page-head p { margin-top: 4px; font-size: 15px; color: var(--text-sub); }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.back-link:hover { color: var(--text); }

@media (max-width: 768px) {
  .input, .select, .textarea { font-size: 16px; }  /* iOS 입력 시 확대 방지 */
  .row-2 { grid-template-columns: 1fr; gap: 0; }
  .row-2 > .field + .field { margin-top: 20px; }
  .page-head { flex-direction: column; align-items: stretch; margin-bottom: 18px; }
  .page-head h1 { font-size: 22px; }
  .page-head p { font-size: 14px; }
  /* 콤보박스 → 바텀시트 */
  .cselect.is-open::before { content: ""; position: fixed; inset: 0; z-index: 99; background: var(--overlay); }
  .cs-panel, .cselect.is-up .cs-panel {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 100;
    max-width: none; padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
    border: 0; border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .cselect.is-open .cs-panel { transform: none; }
  .cs-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 10px; font-size: 17px; font-weight: 700; }
  .cs-sheet-head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--border-strong); }
  .cs-list { max-height: 55dvh; }
  .cs-opt, .cselect.is-sm .cs-opt { min-height: 50px; font-size: 16px; padding: 0 12px; }
  /* 달력 → 바텀시트 */
  .cdate.is-open::before { content: ""; position: fixed; inset: 0; z-index: 99; background: var(--overlay); }
  .cd-panel, .cdate.is-up .cd-panel, .cdate.is-right .cd-panel {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 100;
    width: auto; padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
    border: 0; border-radius: 20px 20px 0 0; transform: translateY(100%);
  }
  .cdate.is-open .cd-panel { transform: none; }
  .cd-sheet-head { display: block; padding: 14px 4px 6px; font-size: 17px; font-weight: 700; }
  .cd-sheet-head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--border-strong); }
  .cd-day { height: 46px; font-size: 16px; }
  .cd-day span { width: 42px; height: 42px; border-radius: 12px; }
  .cd-foot button { height: 40px; font-size: 15px; }
  /* 모달은 아래에서 올라오는 시트로 */
  .modal { align-items: flex-end; padding: 0; }
  .modal-box { max-width: none; max-height: 90dvh; border-radius: 20px 20px 0 0; transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); }
  .modal-sm .modal-box { max-width: none; }
  .modal-head { padding: 22px 20px 0; }
  .modal-body { padding: 18px 20px; }
  .modal-foot { padding: 0 20px 20px; }
  .toast { left: 16px; right: 16px; bottom: 20px; transform: translateY(20px); justify-content: center; }
  .toast.is-show { transform: none; }
}

/* ---------- 모바일 (헤더·카드) ---------- */
.menu-toggle .ic-close, .header.is-open .menu-toggle .ic-open { display: none; }
.header.is-open .menu-toggle .ic-close { display: block; }
.menu-toggle { display: none; width: 40px; height: 40px; border-radius: 10px; place-items: center; color: var(--text-sub); }

@media (max-width: 768px) {
  body { font-size: 14px; }
  .page { padding-top: 20px; }
  .container { padding: 0 16px; }
  .header .container { gap: 12px; }
  .menu-toggle { display: grid; margin-left: auto; }
  .header-panel {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column-reverse; align-items: stretch; gap: 0;
    padding: 12px 16px 16px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .header.is-open .header-panel { display: flex; }
  .gnb { flex-direction: column; gap: 2px; padding-top: 8px; }
  .gnb a { padding: 12px; font-size: 16px; }
  /* 모바일에서는 드롭다운을 펼친 상태로 패널 안에 둔다 */
  .user-btn { display: none; }
  .user-dropdown {
    position: static; width: auto; padding: 0;
    border: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
    display: flex; flex-wrap: wrap; gap: 8px;
    padding-bottom: 12px; border-radius: 0; border-bottom: 1px solid var(--border);
  }
  .ud-head { flex-basis: 100%; margin: 0; padding: 4px 4px 8px; border: 0; }
  .ud-item { flex: 1; justify-content: center; background: var(--bg); }
  .ud-item[data-mode-toggle] { order: 2; flex-basis: 100%; justify-content: flex-start; }
  .ud-item.is-logout { order: 1; }
  .card-head { padding: 18px 18px 6px; }
  .card-body { padding: 6px 18px 18px; }
  .footer { margin-top: 48px; padding: 24px 0 32px; font-size: 12.5px; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-info p { flex-direction: column; }
  .footer-info p span:not(:last-child)::after { display: none; }
}
