:root {
  color-scheme: light;
  --ink: #172338;
  --muted: #66768b;
  --line: #d8e2ee;
  --paper: #ffffff;
  --canvas: #f2f6fb;
  --brand: #2f6fa9;
  --brand-soft: #e8f1fa;
  --accent: #91bde6;
  --danger: #c94d54;
  --shadow: 0 18px 50px rgba(37, 84, 128, 0.10);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 12px; color: #607891; font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: var(--brand); background: var(--accent); font-size: 13px; font-weight: 900; letter-spacing: -0.5px; }
.brand-mark--large { width: 66px; height: 66px; border-radius: 18px; font-size: 20px; }

.login-view { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 1.15fr) minmax(420px, .85fr); background: var(--paper); }
.login-brand { display: flex; flex-direction: column; justify-content: center; padding: 10vw; color: white; background: radial-gradient(circle at 80% 20%, #5f94c4 0, transparent 28%), linear-gradient(145deg, #123a62, #2f6fa9); position: relative; overflow: hidden; }
.login-brand::after { content: ""; position: absolute; right: -90px; bottom: -150px; width: 430px; height: 430px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.login-brand .eyebrow { margin-top: 42px; color: var(--accent); }
.login-brand h1 { margin: 0; max-width: 620px; font-family: Georgia, "STSong", serif; font-size: clamp(34px, 4vw, 60px); font-weight: 600; line-height: 1.25; letter-spacing: -1px; }
.login-intro { max-width: 520px; margin: 28px 0; color: #d8e8f6; font-size: 16px; line-height: 1.8; }
.login-points { display: flex; gap: 12px; position: relative; z-index: 1; }
.login-points span { padding: 8px 13px; border: 1px solid rgba(255,255,255,.22); border-radius: 99px; color: #e7f2fb; font-size: 12px; }
.login-panel-wrap { display: grid; place-items: center; padding: 48px; }
.login-panel { width: min(390px, 100%); }
.login-panel h2 { margin: 0; font-size: 34px; letter-spacing: -1px; }
.login-panel > .muted { margin: 10px 0 34px; }
.login-panel label, .field { display: grid; gap: 8px; margin: 18px 0; color: #30445a; font-size: 13px; font-weight: 700; }
.login-panel input, .field input, .field select, .field textarea { width: 100%; border: 1px solid #d4e0ec; border-radius: 10px; padding: 13px 14px; outline: none; background: #f9fbfd; transition: border .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: #5e95c6 !important; box-shadow: 0 0 0 3px rgba(47,111,169,.13); }
.primary-button { border: 0; border-radius: 10px; padding: 11px 18px; color: white; background: var(--brand); font-weight: 750; box-shadow: 0 8px 20px rgba(34,86,132,.20); }
.primary-button:hover { background: #245a8c; }
.danger-button { border: 0; border-radius: 9px; padding: 10px 16px; color: white; background: var(--danger); font-weight: 750; }
.danger-button:hover { background: #ad3941; }
.login-button { display: flex; width: 100%; justify-content: space-between; margin-top: 28px; padding: 14px 18px; }
.login-help { margin-top: 18px; color: #8192a5; font-size: 11px; text-align: center; }
.form-error { min-height: 18px; margin: 0; color: var(--danger); font-size: 12px; }
.mobile-brand { display: none; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: 238px; flex-direction: column; color: #dceafa; background: #173a5e; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; height: 82px; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand strong { display: block; color: white; font-size: 16px; }
.sidebar-brand small { display: block; margin-top: 3px; color: #a9bed2; font-size: 8px; letter-spacing: 1.5px; }
.navigation { flex: 1; overflow: auto; padding: 10px 12px; }
.nav-label { margin: 11px 12px 5px; color: #a9c2d8; font-size: 13px; font-weight: 850; letter-spacing: .8px; }
.nav-group-toggle { display: flex; width: calc(100% - 24px); align-items: center; justify-content: space-between; border: 0; padding: 0; background: transparent; text-align: left; cursor: pointer; }
.nav-group-toggle:hover { color: white; }
.nav-group-chevron { transition: transform .18s ease; }
.nav-group-toggle[aria-expanded="true"] .nav-group-chevron { transform: rotate(180deg); }
.nav-subitems { display: none; }
.nav-subitems.expanded { display: block; }
.nav-group-toggle + .nav-subitems .nav-item { padding-left: 22px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; margin: 1.5px 0; border: 0; border-radius: 9px; padding: 6px 12px; color: #d3e1ee; background: transparent; text-align: left; font-size: 13px; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: #17324e; background: var(--accent); font-weight: 800; }
.nav-icon { width: 18px; font-size: 16px; text-align: center; }
.nav-badge { margin-left: auto; min-width: 20px; border-radius: 9px; padding: 2px 6px; color: white; background: rgba(255,255,255,.12); font-size: 10px; text-align: center; }
.nav-item.active .nav-badge { color: white; background: var(--brand); }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin: 12px; padding: 13px; border-radius: 10px; background: rgba(255,255,255,.05); }
.environment-dot { width: 8px; height: 8px; border-radius: 50%; background: #77a9d4; box-shadow: 0 0 0 4px rgba(119,169,212,.18); }
.sidebar-footer strong, .sidebar-footer small { display: block; font-size: 10px; }
.sidebar-footer small { margin-top: 3px; color: #a9bed2; }
.main-area { min-height: 100vh; margin-left: 238px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; min-height: 82px; align-items: center; justify-content: space-between; padding: 13px 32px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.93); backdrop-filter: blur(12px); }
.breadcrumb { margin: 0 0 4px; color: #72879c; font-size: 13px; font-weight: 700; letter-spacing: .8px; }
.topbar h1 { margin: 0; font-size: 24px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.today { color: #6f8194; font-size: 14px; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; color: #356995; }
.menu-button { display: none; }
.user-chip { display: flex; align-items: center; gap: 9px; border: 0; border-left: 1px solid var(--line); padding: 0 0 0 14px; background: transparent; text-align: left; }
.user-chip strong, .user-chip small { display: block; font-size: 14px; }
.user-chip small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: white; background: linear-gradient(135deg, #4a86bc, #245682); font-size: 14px; font-weight: 800; }
.logout-button { position: absolute; top: 66px; right: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 16px; color: var(--danger); background: white; box-shadow: var(--shadow); }
.content { padding: 28px 32px 50px; }

.welcome-row, .section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.welcome-row h2, .section-header h2 { margin: 0 0 7px; font-size: 26px; letter-spacing: -.7px; }
.welcome-row p, .section-header p { margin: 0; color: var(--muted); font-size: 15px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; }
.metric-card, .panel, .project-card { border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: 0 3px 16px rgba(37,84,128,.05); }
.metric-card { padding: 19px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 14px; }
.metric-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: var(--brand); background: var(--brand-soft); }
.metric-card strong { display: block; margin-top: 14px; font-family: Georgia, serif; font-size: 31px; font-weight: 500; }
.metric-card.danger strong { color: var(--danger); }
.dashboard-grid { display: grid; grid-template-columns: minmax(270px, .72fr) repeat(2, minmax(320px, 1fr)); gap: 18px; margin-top: 18px; }
.panel { overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-header h3 { margin: 0; font-size: 18px; }
.text-button { border: 0; color: #356995; background: transparent; font-size: 14px; font-weight: 700; }
.project-list { padding: 6px 20px; }
.project-row { display: grid; grid-template-columns: 1fr 110px 50px; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid #e5edf5; }
.project-row:last-child { border: 0; }
.project-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.project-monogram { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #2e608d; background: #e7f0f9; font-size: 11px; font-weight: 900; }
.project-title strong, .project-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-title strong { font-size: 15px; }
.project-title small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.progress-track { height: 6px; overflow: hidden; border-radius: 99px; background: #e7eef6; }
.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2f6fa9, #75a8d4); }
.progress-value { color: #496a89; font-size: 13px; text-align: right; }
.dashboard-projects-panel .project-list { padding-right: 16px; padding-left: 16px; }
.dashboard-projects-panel .project-row { grid-template-columns: minmax(0, 1fr) 42px; gap: 10px; }
.dashboard-projects-panel .progress-track { display: none; }
.dashboard-project-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #eef1ef;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s ease, padding .18s ease;
}
.dashboard-project-row:hover,
.dashboard-project-row:focus-visible {
  padding-right: 8px;
  padding-left: 8px;
  border-radius: 10px;
  outline: 2px solid transparent;
  background: #edf5fc;
}
.dashboard-work-items-panel .panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.dashboard-work-item-count { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 13px; font-weight: 700; }
.dashboard-work-item-list { max-height: 430px; overflow-y: auto; padding: 7px 18px; }
.dashboard-work-item { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px 2px; border: 0; border-bottom: 1px solid var(--line); color: inherit; background: transparent; text-align: left; cursor: pointer; }
.dashboard-work-item:last-child { border-bottom: 0; }
.dashboard-work-item:hover, .dashboard-work-item:focus-visible { padding-right: 8px; padding-left: 8px; border-radius: 10px; background: #edf5fc; outline: none; }
.dashboard-work-item-main, .dashboard-work-item-meta { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.dashboard-work-item-main .code { font-size: 12px; }
.dashboard-work-item-main strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-work-item-main small, .dashboard-work-item-meta small { color: var(--muted); font-size: 12px; }
.dashboard-work-item-meta { align-items: flex-end; }
.dashboard-work-item-meta small { white-space: nowrap; }
.dashboard-work-item-empty { padding: 44px 18px; }

.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.filter-bar select, .filter-bar input { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: white; color: #304b65; font-size: 14px; }
.table-panel { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; background: white; }
.data-table { width: 100%; min-width: 780px; border-collapse: collapse; }
.data-table th { padding: 13px 16px; color: #6a7d90; background: #f3f7fb; font-size: 13px; letter-spacing: .5px; text-align: left; }
.data-table td { padding: 16px; border-top: 1px solid #eef1ef; font-size: 14px; vertical-align: middle; }
.data-table td strong { display: block; font-size: 15px; }
.data-table td small { display: block; margin-top: 3px; color: var(--muted); }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: #edf5fc; }
.clickable-row:focus-visible { outline: 2px solid #4c88bd; outline-offset: -2px; }
.code { color: #496d8f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 5px 9px; background: #e8f1fa; color: #49677f; font-size: 12px; font-weight: 750; white-space: nowrap; }
.badge.high, .badge.urgent { color: #a23d42; background: #fbe9e9; }
.badge.doing, .badge.testing, .badge.developing, .badge.purchasing { color: #245f99; background: #e4effa; }
.badge.done, .badge.released, .badge.closed, .badge.completed, .badge.received { color: #46667f; background: #e8eef4; }
.badge.todo, .badge.planning, .badge.draft, .badge.submitted, .badge.assigned { color: #49677f; background: #edf3f8; }
.badge.cancelled { color: #8b5d61; background: #f3e9ea; }
.purchase-status-legend { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.purchase-status-legend .badge { font-size: 11px; }
.procurement-status-tabs { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); overflow-x: auto; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.procurement-status-tab { display: flex; min-height: 68px; align-items: center; justify-content: center; gap: 12px; border: 0; border-right: 1px solid var(--line); padding: 14px 20px; color: #456782; background: white; font-size: 16px; font-weight: 800; }
.procurement-status-tab:last-child { border-right: 0; }
.procurement-status-tab:hover { color: var(--brand); background: #edf5fc; }
.procurement-status-tab.active { color: white; background: var(--brand); }
.procurement-status-tab b { display: grid; min-width: 28px; height: 28px; place-items: center; border-radius: 14px; color: var(--brand); background: var(--brand-soft); font-size: 13px; }
.procurement-status-tab.active b { color: var(--brand); background: white; }
.purchase-notes-field textarea { min-height: 140px; line-height: 1.7; }
.procurement-notes { max-width: 260px; margin-top: 7px; color: var(--muted); line-height: 1.55; white-space: pre-wrap; }
.purchase-order-notes { margin: 12px 0 0; border-left: 3px solid #afc9e1; padding: 8px 11px; color: #49677f; background: #f3f7fb; line-height: 1.65; white-space: pre-wrap; }
.procurement-order-link { display: grid; gap: 5px; border: 0; padding: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.procurement-order-link:hover strong { color: var(--brand); text-decoration: underline; }
.project-code-only { font-size: 14px; font-weight: 750; }
.purchase-detail-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.purchase-detail-summary > div { display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; }
.purchase-detail-summary span, .purchase-detail-notes > span, .purchase-detail-status-line > span:first-child { color: var(--muted); font-size: 12px; font-weight: 700; }
.purchase-detail-heading { margin: 22px 0 9px; font-size: 17px; }
.purchase-detail-items { display: grid; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; list-style: none; }
.purchase-detail-items li { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #e7e9ea; padding: 12px 2px; }
.purchase-detail-items li:last-child { border-bottom: 0; }
.purchase-detail-items span, .purchase-detail-items strong, .purchase-detail-items small { display: block; }
.purchase-detail-items small { margin-top: 4px; color: var(--muted); }
.purchase-detail-items b { white-space: nowrap; }
.purchase-detail-notes { margin-top: 18px; }
.purchase-detail-notes p { min-height: 76px; margin: 7px 0 0; border-radius: 9px; padding: 13px 14px; color: #49677f; background: #f2f6fa; line-height: 1.7; white-space: pre-wrap; }
.purchase-detail-status-line { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.push-left { margin-right: auto; }
.badge.project-active { color: #245f99; background: #e4effa; }
.badge.project-paused { color: #49677f; background: #edf3f8; }
.badge.project-terminated { color: #a23d42; background: #fbe9e9; }
.badge.project-completed { color: #46667f; background: #e8eef4; }
.inline-select { max-width: 125px; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: white; font-size: 13px; }
.empty-state { padding: 50px 20px; color: var(--muted); text-align: center; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 15px; }
.project-card { padding: 20px; }
.project-card--clickable { cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.project-card--clickable:hover { transform: translateY(-3px); border-color: #a9c7e2; box-shadow: 0 14px 35px rgba(37,84,128,.11); }
.project-card--clickable:focus-visible { outline: 3px solid rgba(75,139,200,.42); outline-offset: 3px; }
.project-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.project-card h3 { margin: 14px 0 7px; font-size: 19px; }
.project-card p { min-height: 44px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.project-meta { display: flex; justify-content: space-between; margin: 18px 0 10px; color: var(--muted); font-size: 13px; }
.project-stats { display: flex; gap: 18px; margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); color: #536f88; font-size: 13px; }
.project-detail-link { margin-left: auto; color: #356995; font-weight: 750; }
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 15px; }
.team-card { padding: 22px; text-align: center; }
.team-card .avatar { width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 14px; }
.team-card h3 { margin: 0; font-size: 17px; }
.team-card p { margin: 5px 0; color: var(--muted); font-size: 13px; }
.permission-note { border-radius: 99px; padding: 7px 11px; color: #2f668f; background: #e6f0fa; font-size: 13px; font-weight: 750; }
.permission-note.readonly { color: #65788b; background: #edf2f7; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 11px; margin-bottom: 14px; }
.role-card { padding: 15px; }
.role-card-head { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: start; gap: 10px; }
.role-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: white; background: linear-gradient(135deg, #4a86bc, #245682); font-size: 10px; font-weight: 800; }
.role-card h3 { margin: 2px 0 5px; font-size: 15px; }
.role-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.role-count, .role-user-total { border-radius: 99px; padding: 5px 9px; color: #466b8b; background: var(--brand-soft); font-size: 12px; font-weight: 750; white-space: nowrap; }
.role-permissions { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0 0; padding: 0; list-style: none; }
.role-permissions li { border: 1px solid #dde7f0; border-radius: 6px; padding: 5px 7px; color: #526d86; background: #f3f7fb; font-size: 11px; }
.role-users-panel { margin-top: 4px; }
.role-user-list { padding: 0 20px; }
.role-user-row { display: grid; grid-template-columns: minmax(260px, 1.4fr) minmax(130px, .7fr) minmax(180px, .8fr); align-items: center; gap: 20px; margin: 0 -10px; border-bottom: 1px solid #edf1ef; border-radius: 10px; padding: 15px 10px; }
.role-user-row.clickable-row { cursor: pointer; }
.role-user-row.clickable-row:hover { background: #edf5fc; }
.role-user-row:last-child { border-bottom: 0; }
.user-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-identity strong, .user-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-identity strong { font-size: 15px; }
.user-identity small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.user-department { color: #62686c; font-size: 13px; }
.role-select-wrap { display: grid; grid-template-columns: auto minmax(120px, 1fr); align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.role-select-wrap select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); background: white; font-size: 13px; font-weight: 700; }
.role-select-wrap select:disabled { opacity: .55; }
.role-badge { justify-self: start; }
.account-settings-panel { max-width: 980px; }
.account-settings-panel .panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.account-settings-body { display: grid; gap: 18px; }
.readonly-account-field input { color: #66788b; background: #f1f5f9; }
.readonly-account-field small { margin-top: 7px; color: var(--muted); font-size: 12px; }
.account-password-section { display: grid; gap: 14px; border-top: 1px solid var(--line); padding-top: 20px; }
.account-password-section h3 { margin: 0; font-size: 18px; }
.account-password-section p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.account-settings-actions { display: flex; justify-content: flex-end; }
.workflow-strip { display: flex; align-items: center; gap: 10px; overflow-x: auto; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; color: #66788b; background: white; font-size: 13px; white-space: nowrap; }
.workflow-strip span { border-radius: 99px; padding: 6px 10px; background: #eff1f2; }
.workflow-strip span.active { color: white; background: var(--brand); }
.workflow-strip b { color: #b2bbb7; }
.demand-table { min-width: 1100px; }
.procurement-table { min-width: 1180px; table-layout: fixed; }
.procurement-table th:nth-child(1), .procurement-table td:nth-child(1) { width: 190px; }
.procurement-table th:nth-child(2), .procurement-table td:nth-child(2) { width: 90px; }
.procurement-table th:nth-child(3), .procurement-table td:nth-child(3) { width: 120px; }
.procurement-table th:nth-child(4), .procurement-table td:nth-child(4) { width: 170px; }
.procurement-table th:nth-child(5), .procurement-table td:nth-child(5) { width: 95px; }
.procurement-table th:nth-child(6), .procurement-table td:nth-child(6) { width: 90px; }
.procurement-table th:nth-child(7), .procurement-table td:nth-child(7) { width: 100px; }
.procurement-table th:nth-child(8), .procurement-table td:nth-child(8) { width: 100px; }
.procurement-table th:nth-child(9), .procurement-table td:nth-child(9) { width: 110px; }
.procurement-table th:nth-child(10), .procurement-table td:nth-child(10) { width: 110px; }
.procurement-column-list, .purchase-material-column { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.procurement-column-list li, .purchase-material-column li { display: flex; min-height: 24px; align-items: center; }
.row-actions { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.approve-action { color: #356995; }
.reject-action, .delete-action { color: var(--danger); }
.muted-text { color: var(--muted); font-size: 13px; }
.project-reference { display: grid; gap: 3px; justify-items: start; padding: 0; text-align: left; }
.demand-title-button { display: grid; width: 100%; gap: 3px; border: 0; padding: 0; color: inherit; background: transparent; text-align: left; }
.demand-title-button:hover strong { color: #2f6fa9; text-decoration: underline; text-underline-offset: 3px; }
.review-note { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge.demand-submitted { color: #49677f; background: #edf3f8; }
.badge.demand-draft { color: #5f7386; background: #eef3f7; }
.badge.demand-assigned { color: #245f99; background: #e4effa; }
.badge.demand-cancelled { color: #a23d42; background: #fbe9e9; }
.form-hint, .form-warning { border-radius: 9px; padding: 11px 13px; font-size: 13px; line-height: 1.6; }
.form-hint { color: #456782; background: var(--brand-soft); }
.form-warning { color: #8a4045; background: #fbecec; }
.part-list { min-width: 220px; margin: 0; padding: 0; list-style: none; }
.part-list li { display: grid; grid-template-columns: 90px 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px dashed #edf0ee; }
.part-list li:last-child { border: 0; }
.part-list strong { font-size: 13px !important; }
.part-list span { color: var(--muted); font-size: 12px; }
.assignment-title { border-radius: 9px; padding: 12px; background: var(--brand-soft); font-size: 15px; }
.part-entry { display: grid; grid-template-columns: 1.1fr 1.5fr 75px 62px; gap: 8px; margin-top: 8px; }
.part-entry input { min-width: 0; border: 1px solid #d8e2ee; border-radius: 8px; padding: 10px; background: #f9fbfd; }
.part-entry-head { margin-top: 10px; color: #878d91; font-size: 12px; font-weight: 600; }
.detail-back-row { margin-bottom: 14px; }
.project-detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-radius: 16px; padding: 26px; color: white; background: radial-gradient(circle at 85% 10%, #6ea3d3 0, transparent 30%), linear-gradient(135deg, #173f6b, #2d6caa); box-shadow: var(--shadow); }
.project-detail-heading { display: flex; align-items: flex-start; gap: 18px; }
.project-monogram--large { width: 54px; height: 54px; color: var(--brand); background: var(--accent); font-size: 15px; }
.detail-code { margin-bottom: 4px; color: #c6dcf0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; letter-spacing: .5px; }
.project-detail-hero h2 { margin: 0 0 8px; font-size: 24px; }
.project-detail-hero p { max-width: 700px; margin: 0; color: #dbeaf7; font-size: 15px; line-height: 1.7; }
.project-detail-hero > .badge { background: rgba(255,255,255,.12); color: white; }
.project-hero-actions { display: flex; align-items: center; gap: 10px; }
.project-hero-actions > .badge { color: white; background: rgba(255,255,255,.12); }
.project-status-control-wrap { position: relative; display: inline-flex; align-items: center; }
.project-status-control { appearance: none; min-width: 92px; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: 8px 30px 8px 14px; color: white; background-color: rgba(255,255,255,.12); background-image: linear-gradient(45deg, transparent 50%, white 50%), linear-gradient(135deg, white 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; font-size: 14px; font-weight: 750; outline: none; cursor: pointer; }
.project-status-control:hover, .project-status-control:focus { border-color: rgba(255,255,255,.55); background-color: rgba(255,255,255,.2); }
.project-status-control option { color: var(--ink); background: white; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.demand-detail-actions { display: flex; align-items: center; gap: 10px; }
.demand-detail-actions > .badge { color: white; background: rgba(255,255,255,.14); }
.light-button { border-color: rgba(255,255,255,.32); color: white; background: rgba(255,255,255,.08); }
.light-button:hover { background: rgba(255,255,255,.15); }
.demand-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.detail-field small { color: var(--muted); font-size: 12px; }
.demand-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.demand-copy-panel p { min-height: 110px; margin: 0; padding: 20px; color: #49677f; font-size: 16px; line-height: 1.8; white-space: pre-wrap; }
.demand-attachments-panel { grid-column: 1 / -1; }
.demand-review-panel { grid-column: 1 / -1; }
.demand-review-content { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 0; padding: 4px 20px 18px; }
.demand-review-content > div { display: grid; gap: 7px; border-bottom: 1px solid #edf1ef; padding: 15px 0; }
.demand-review-content > div:nth-child(odd) { padding-right: 20px; }
.demand-review-content > div:nth-child(even) { padding-left: 20px; }
.demand-review-content span { color: var(--muted); font-size: 12px; font-weight: 700; }
.demand-review-content strong { font-size: 15px; line-height: 1.6; }
.demand-review-opinion-list { display: grid; gap: 10px; border-top: 1px solid var(--line); padding: 18px 20px 22px; }
.demand-review-opinion-heading, .demand-review-opinion-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.demand-review-opinion-heading h4 { margin: 0; font-size: 15px; }
.demand-review-opinion-heading > span { border-radius: 99px; padding: 4px 10px; color: var(--brand); background: var(--brand-soft); font-size: 12px; font-weight: 800; }
.demand-review-opinion-card { border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; background: #f9fbfd; }
.demand-review-opinion-meta strong { font-size: 14px; }
.demand-review-opinion-meta span { color: var(--muted); font-size: 12px; }
.demand-review-opinion-card p { margin: 9px 0 0; color: #49677f; line-height: 1.7; white-space: pre-wrap; }
.demand-review-opinion-empty { padding: 20px 10px; }
.detail-project-link { display: grid; width: fit-content; gap: 3px; justify-items: start; padding: 0; text-align: left; }
.detail-action-bar { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.project-detail-summary { display: grid; grid-template-columns: minmax(210px, 1.3fr) repeat(2, minmax(120px, .65fr)) minmax(210px, 1.2fr); gap: 12px; margin: 16px 0; }
.detail-field, .detail-progress { display: flex; min-height: 78px; flex-direction: column; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: white; }
.detail-field > span, .detail-progress span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .4px; }
.detail-field strong { font-size: 16px; }
.detail-field select, .detail-field input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 6px 0; color: var(--ink); background: white; font-size: 14px; font-weight: 700; outline: none; }
.detail-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.detail-progress strong { font-size: 15px; }
.project-detail-grid { display: grid; gap: 16px; }
.project-description-content { min-height: 100px; padding: 22px; color: #49677f; font-size: 16px; line-height: 1.8; white-space: pre-wrap; }
.project-tabs { display: flex; align-items: stretch; gap: 0; overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 3px 16px rgba(37,84,128,.05); }
.project-tab { display: flex; min-width: 150px; align-items: center; justify-content: center; gap: 9px; border: 0; border-right: 1px solid var(--line); padding: 15px 22px; color: #5b6064; background: white; font-size: 15px; font-weight: 700; white-space: nowrap; }
.project-tab:last-child { border-right: 0; }
.project-tab:hover { color: #2f6fa9; background: #edf5fc; }
.project-tab.active { position: relative; color: white; background: var(--brand); }
.project-tab.active::after { content: ""; position: absolute; right: 22px; bottom: 4px; left: 22px; height: 3px; border-radius: 99px; background: var(--accent); }
.project-tab b { min-width: 24px; border-radius: 99px; padding: 3px 7px; color: #466b8b; background: var(--brand-soft); font-size: 12px; }
.project-tab.active b { color: var(--brand); background: white; }
.project-section-content { min-height: 320px; }
.project-section-panel { min-height: 320px; }
.project-deliverable-list { padding: 10px 22px 24px; }
.project-deliverable-list .deliverable-row { min-height: 72px; }
.panel-header > div p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.upload-button { display: inline-flex; align-items: center; white-space: nowrap; cursor: pointer; }
.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 18px; }
.attachment-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 78px; border: 1px solid var(--line); border-radius: 11px; padding: 9px; color: inherit; background: #f9fbfd; text-decoration: none; transition: border-color .18s, transform .18s; }
.attachment-card:hover { transform: translateY(-2px); border-color: #9dbfe0; }
.attachment-card img, .file-icon { width: 64px; height: 60px; border-radius: 8px; object-fit: cover; }
.file-icon { display: grid; place-items: center; color: #356995; background: var(--brand-soft); font-size: 14px; font-weight: 850; }
.attachment-card strong, .attachment-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-card strong { font-size: 14px; }
.attachment-card small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.attachment-empty { grid-column: 1 / -1; padding: 28px 15px; }
.detail-table { border: 0; border-radius: 0; }
.project-member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; padding: 18px; }
.project-member { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 10px; padding: 11px; background: #f9fbfd; }
.project-member strong, .project-member small { display: block; }
.project-member strong { font-size: 14px; }
.project-member small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.project-deliverables-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.deliverable-list { padding: 4px 18px 12px; }
.deliverable-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 2px; border-bottom: 1px solid #edf1ef; }
.deliverable-row:last-child { border-bottom: 0; }
.deliverable-row strong, .deliverable-row small { display: block; }
.deliverable-row strong { font-size: 14px; }
.deliverable-row small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.material-detail-button { display: inline-block; border: 0; padding: 5px 0; color: inherit; background: transparent; text-align: left; }
.material-detail-button:hover strong { color: #2f6fa9; text-decoration: underline; text-underline-offset: 3px; }
.material-detail-button .code { display: inline-block; margin-bottom: 5px; color: #547696; }
.material-table-wrap { overflow-x: auto; }
.material-table { min-width: 960px; table-layout: fixed; }
.material-table th:nth-child(1), .material-table td:nth-child(1) { width: 72px; }
.material-table th:nth-child(2), .material-table td:nth-child(2) { width: 170px; }
.material-table th:nth-child(3), .material-table td:nth-child(3) { width: 210px; }
.material-table th:nth-child(4), .material-table td:nth-child(4) { width: 220px; }
.material-table th:nth-child(5), .material-table td:nth-child(5) { width: 100px; }
.material-table.has-actions th:last-child, .material-table.has-actions td:last-child { width: 90px; }
.material-table td { vertical-align: middle; }
.sequence-cell, .list-sequence { color: var(--muted); font-weight: 800; }
.material-notes-cell { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.project-list-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 18px; border-top: 1px solid var(--line); padding: 14px 22px 18px; color: var(--muted); font-size: 13px; }
.project-list-pagination label, .project-list-pagination > div { display: flex; align-items: center; gap: 8px; }
.project-list-pagination select { min-width: 78px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; color: var(--ink); background: white; }
.compact-button { min-height: 34px; padding: 7px 12px; font-size: 13px; }
.compact-button:disabled { cursor: not-allowed; opacity: .45; }
.project-purchase-list { display: grid; gap: 12px; padding: 18px 22px 24px; }
.purchase-order-table-wrap { overflow-x: auto; }
.purchase-order-table { min-width: 1220px; table-layout: fixed; }
.purchase-order-table th:nth-child(1), .purchase-order-table td:nth-child(1) { width: 60px; }
.purchase-order-table th:nth-child(2), .purchase-order-table td:nth-child(2) { width: 180px; }
.purchase-order-table th:nth-child(3), .purchase-order-table td:nth-child(3) { width: 120px; }
.purchase-order-table th:nth-child(4), .purchase-order-table td:nth-child(4) { width: 160px; }
.purchase-order-table th:nth-child(5), .purchase-order-table td:nth-child(5) { width: 95px; }
.purchase-order-table th:nth-child(6), .purchase-order-table td:nth-child(6) { width: 90px; }
.purchase-order-table th:nth-child(7), .purchase-order-table td:nth-child(7) { width: 100px; }
.purchase-order-table th:nth-child(8), .purchase-order-table td:nth-child(8) { width: 120px; }
.purchase-order-table th:nth-child(9), .purchase-order-table td:nth-child(9) { width: 105px; }
.purchase-order-table th:nth-child(10), .purchase-order-table td:nth-child(10) { width: 120px; }
.purchase-order-table th:nth-child(11), .purchase-order-table td:nth-child(11) { width: 70px; }
.purchase-actual-summary { color: var(--ink); font-size: 12px; }
.purchase-order-summary { display: grid; grid-template-columns: 42px minmax(220px, 1.6fr) auto minmax(150px, .8fr) minmax(170px, .9fr) auto; align-items: center; gap: 22px; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; color: var(--ink); background: white; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.purchase-order-summary:hover { transform: translateY(-1px); border-color: #a9c7e2; box-shadow: 0 10px 25px rgba(37,84,128,.10); }
.purchase-order-summary > span { display: grid; gap: 5px; }
.purchase-order-summary strong { font-size: 15px; }
.purchase-order-summary small { color: var(--muted); font-size: 12px; }
.purchase-order-summary > b { color: var(--brand); font-size: 13px; white-space: nowrap; }
.purchase-order-card { border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; background: #f9fbfd; }
.purchase-order-head, .purchase-order-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.purchase-order-head > div { display: grid; gap: 5px; }
.purchase-order-head strong { font-size: 15px; }
.purchase-order-card .part-list { margin: 13px 0; border-top: 1px solid #e8eeeb; border-bottom: 1px solid #e8eeeb; padding: 9px 0; }
.purchase-order-meta { justify-content: flex-start; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.purchase-material-list { display: grid; gap: 8px; max-height: 330px; overflow-y: auto; margin-top: 9px; }
.purchase-material-choice { display: grid; grid-template-columns: 22px minmax(0, 1fr) 110px auto; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #f9fbfd; }
.purchase-material-choice > input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--brand); }
.purchase-material-choice strong, .purchase-material-choice small { display: block; }
.purchase-material-choice small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.purchase-material-choice .purchase-material-quantity { width: 110px; }
.purchase-material-choice em { color: var(--muted); font-size: 13px; font-style: normal; }
.modal.purchase-order-detail-modal { width: min(1320px, calc(100vw - 30px)); }
.purchase-title-field { max-width: 680px; }
.purchase-compact-meta-row { display: grid; grid-template-columns: minmax(180px, 260px) 190px 210px; align-items: end; gap: 12px; }
.purchase-compact-meta-row .field { margin-bottom: 12px; }
.purchase-submitted-material-grid { overflow: hidden; margin-top: 10px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.purchase-submitted-material-head, .purchase-submitted-material-row { display: grid; grid-template-columns: 150px minmax(180px, 1.25fr) minmax(150px, 1fr) 120px; align-items: center; gap: 12px; }
.purchase-submitted-material-head { padding: 11px 14px; color: var(--muted); background: #f3f4f5; font-size: 12px; font-weight: 800; }
.purchase-submitted-material-row { border-top: 1px solid var(--line); padding: 13px 14px; }
.purchase-submitted-material-row > span { min-width: 0; }
.purchase-submitted-material-row .mobile-field-label { display: none; }
.procurement-execution-grid { overflow-x: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.procurement-execution-head, .procurement-execution-row { display: grid; grid-template-columns: 145px minmax(150px, 1fr) 135px 92px 125px 125px minmax(240px, 1.7fr); align-items: center; gap: 12px; }
.procurement-execution-head, .procurement-execution-row { min-width: 1140px; }
.research-purchase-execution-grid .procurement-execution-head, .research-purchase-execution-grid .procurement-execution-row { min-width: 860px; grid-template-columns: 140px minmax(170px, 1.2fr) 130px 105px 135px 130px; }
.procurement-execution-head { padding: 11px 14px; color: var(--muted); background: #f3f4f5; font-size: 12px; font-weight: 800; }
.procurement-execution-row { border-top: 1px solid var(--line); padding: 12px 14px; }
.procurement-execution-row:first-of-type { border-top: 0; }
.procurement-execution-row strong { display: block; }
.execution-material-code, .execution-material-name, .execution-material-model { min-width: 0; overflow-wrap: anywhere; }
.execution-material-model { color: #49677f; }
.procurement-execution-row label { margin: 0; }
.procurement-execution-row input { width: 100%; min-width: 0; }
.procurement-execution-row input[readonly] { color: #49677f; background: #f2f6fa; }
.requested-quantity { font-weight: 750; white-space: nowrap; }
.mobile-field-label { display: none; }
.empty-state.compact { padding: 28px 10px; }
.icon-text-button { border: 0; padding: 5px; color: #356995; background: transparent; font-size: 12px; font-weight: 750; }
.danger-text { color: var(--danger); }
.work-item-title { display: grid; width: 100%; gap: 2px; border: 0; padding: 0; color: inherit; background: transparent; text-align: left; }
.work-item-title:hover strong { color: #2f6fa9; text-decoration: underline; text-underline-offset: 3px; }
.work-item-code { font-size: 13px; white-space: nowrap; }
.work-item-code-cell { display: flex; align-items: center; gap: 9px; }
.work-item-expand-button, .work-item-expand-spacer, .subtask-tree-mark { width: 25px; height: 25px; flex: 0 0 25px; }
.work-item-expand-button { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #d5e0ec; border-radius: 7px; padding: 0; color: #356995; background: white; font-size: 22px; line-height: 1; transition: transform .18s, border-color .18s, background .18s; }
.work-item-expand-button:hover { border-color: #8fb6d8; background: var(--brand-soft); }
.work-item-expand-button.expanded { transform: rotate(90deg); }
.subtask-row td { background: #f3f7fb; }
.subtask-row td:first-child { box-shadow: inset 3px 0 0 #a9c8e3; }
.subtask-row .work-item-title { padding-left: 8px; }
.subtask-tree-mark { display: grid; place-items: center; color: #668eb2; font-size: 17px; }
.work-item-detail-card { margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.work-item-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--line); }
.work-item-detail-head h2 { margin: 5px 0 9px; font-size: 23px; }
.work-item-detail-head p { max-width: 850px; margin: 0; color: #526d86; font-size: 15px; line-height: 1.8; white-space: pre-wrap; }
.work-item-detail-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); padding: 7px 24px 20px; }
.work-item-detail-meta > div { display: grid; gap: 7px; padding: 14px 20px 4px 0; }
.work-item-detail-meta span { color: var(--muted); font-size: 12px; font-weight: 700; }
.work-item-detail-meta strong { font-size: 14px; }
.member-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(190px, 1fr)); gap: 9px; max-height: 340px; overflow: auto; }
.member-choice { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: #f9fbfd; cursor: pointer; }
.member-choice input { width: 16px; height: 16px; accent-color: var(--brand); }
.member-choice span, .member-choice small { display: block; }
.member-choice span { font-size: 14px; font-weight: 750; }
.member-choice small { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 500; }

.feedback-panel .panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.feedback-table-wrap { overflow-x: auto; }
.feedback-table { min-width: 760px; }
.feedback-table th:first-child, .feedback-table td:first-child { width: 74px; }
.feedback-table th:nth-last-child(2), .feedback-table td:nth-last-child(2) { width: 180px; }
.feedback-table th:last-child, .feedback-table td:last-child { width: 110px; }
.feedback-title-button { display: grid; gap: 5px; width: 100%; border: 0; padding: 0; color: inherit; background: transparent; text-align: left; }
.feedback-title-button strong { font-size: 15px; }
.feedback-title-button small { color: var(--muted); font-size: 12px; }
.feedback-table td > small { display: block; margin-top: 4px; }
.badge.feedback-submitted { color: #8a5b08; background: #fff0cf; }
.badge.feedback-read { color: #2f668f; background: #e5f0fa; }
.feedback-content-input { min-height: 180px !important; line-height: 1.7; }
.feedback-detail-meta { display: grid; grid-template-columns: 1.2fr 1fr .7fr; gap: 12px; }
.feedback-detail-meta > div { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; background: #f8fbfe; }
.feedback-detail-meta span, .feedback-detail-meta small { color: var(--muted); font-size: 12px; }
.feedback-detail-meta strong { font-size: 14px; }
.feedback-detail-content { margin-top: 18px; }
.feedback-detail-content h3 { margin: 0 0 9px; font-size: 16px; }
.feedback-detail-content p { min-height: 170px; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 16px; color: #415f7c; background: #f9fbfd; font-size: 14px; line-height: 1.8; white-space: pre-wrap; }

.catalog-panel .panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.catalog-filter-bar { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(160px, .7fr) minmax(130px, .55fr) auto auto; align-items: end; gap: 10px; border-top: 1px solid var(--line); padding: 14px 18px; background: #f7fafd; }
.master-data-filter-bar { grid-template-columns: minmax(220px, 1.2fr) minmax(160px, .7fr) auto auto; }
.catalog-filter-bar label { display: grid; gap: 6px; color: #5e7388; font-size: 12px; font-weight: 750; }
.catalog-filter-bar input, .catalog-filter-bar select { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); background: white; }
.catalog-table-wrap { overflow-x: auto; }
.catalog-table { min-width: 1320px; table-layout: fixed; }
.catalog-table th:first-child, .catalog-table td:first-child { width: 68px; }
.catalog-table th:nth-child(2), .catalog-table td:nth-child(2) { width: 145px; }
.catalog-table th:nth-child(3), .catalog-table td:nth-child(3) { width: 190px; }
.catalog-table th:nth-child(4), .catalog-table td:nth-child(4) { width: 180px; }
.catalog-table th:nth-child(5), .catalog-table td:nth-child(5) { width: 80px; }
.catalog-table th:nth-child(6), .catalog-table td:nth-child(6) { width: 150px; }
.catalog-table th:nth-child(7), .catalog-table td:nth-child(7) { width: 170px; }
.catalog-table th:nth-child(8), .catalog-table td:nth-child(8) { width: 140px; }
.catalog-table th:nth-child(9), .catalog-table td:nth-child(9) { width: 95px; }
.catalog-table th:nth-child(10), .catalog-table td:nth-child(10) { width: 150px; }
.catalog-table td { overflow-wrap: anywhere; }
.catalog-row-inactive { color: var(--muted); background: #f7f9fb; }
.badge.catalog-active { color: #176347; background: #e3f3ed; }
.badge.catalog-inactive { color: #6f7480; background: #eceff2; }
.catalog-row-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.text-link-button { border: 0; padding: 8px 7px; color: var(--accent); background: transparent; font-weight: 750; cursor: pointer; }
.text-link-button:hover, .text-danger-button:hover { text-decoration: underline; }
.catalog-category-create-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.catalog-category-create-form .field { margin-bottom: 0; }
.catalog-category-list { display: grid; gap: 9px; margin-top: 18px; }
.catalog-category-edit-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #f8fbfd; }
.catalog-category-edit-form input { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: white; }
.text-danger-button { border: 0; padding: 8px 10px; color: var(--danger); background: transparent; font-weight: 750; }

.inventory-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.inventory-summary-grid article { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: white; box-shadow: var(--shadow); }
.inventory-summary-grid span { color: var(--muted); font-size: 13px; font-weight: 700; }
.inventory-summary-grid strong { color: var(--ink); font-size: 26px; }
.inventory-panel .panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.inventory-table-wrap { overflow-x: auto; }
.inventory-table { min-width: 1450px; table-layout: fixed; }
.inventory-table th:first-child, .inventory-table td:first-child { width: 68px; }
.inventory-table th:nth-child(2), .inventory-table td:nth-child(2) { width: 145px; }
.inventory-table th:nth-child(3), .inventory-table td:nth-child(3) { width: 190px; }
.inventory-table th:nth-child(4), .inventory-table td:nth-child(4) { width: 175px; }
.inventory-table th:nth-child(5), .inventory-table td:nth-child(5) { width: 78px; }
.inventory-table th:nth-child(6), .inventory-table td:nth-child(6) { width: 145px; }
.inventory-table th:nth-child(7), .inventory-table td:nth-child(7) { width: 150px; }
.inventory-table th:nth-child(8), .inventory-table td:nth-child(8) { width: 105px; }
.inventory-table th:nth-child(9), .inventory-table td:nth-child(9) { width: 120px; }
.inventory-table th:nth-child(10), .inventory-table td:nth-child(10) { width: 130px; }
.inventory-table th:nth-child(11), .inventory-table td:nth-child(11) { width: 125px; }
.inventory-table td { overflow-wrap: anywhere; }
.inventory-detail-body { padding-top: 16px; }
.inventory-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.inventory-detail-summary > div { display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #f7fafd; }
.inventory-detail-summary span { color: var(--muted); font-size: 12px; font-weight: 700; }
.inventory-detail-summary strong { font-size: 17px; }
.inventory-ledger-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.inventory-ledger-heading h3 { margin: 0; font-size: 17px; }
.inventory-ledger-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.inventory-ledger-wrap { margin-top: 12px; overflow-x: auto; }
.inventory-ledger-table { min-width: 1080px; }
.badge.inventory-in { color: #176347; background: #e3f3ed; }
.badge.inventory-out { color: #8a5b08; background: #fff0cf; }
.inventory-item-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #f7fafd; }
.inventory-item-banner strong { font-size: 16px; }
.inventory-item-banner span, .muted-text { color: var(--muted); font-size: 13px; }
.modal.wide-modal { width: min(1180px, calc(100vw - 30px)); }

.modal { width: min(720px, calc(100vw - 30px)); border: 0; border-radius: 15px; padding: 0; box-shadow: 0 30px 90px rgba(18,49,79,.34); }
.modal::backdrop { background: rgba(18,44,70,.58); backdrop-filter: blur(3px); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 22px; }
.modal-body { padding: 18px 22px 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { margin: 10px 0; }
.field textarea { min-height: 86px; resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal.work-item-detail-modal { position: relative; width: min(1180px, calc(100vw - 32px)); height: min(900px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); overflow: hidden; }
.work-item-detail-modal #modal-content { height: 100%; min-height: 0; }
.work-item-detail-modal form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; min-height: 0; }
.work-item-modal-header { align-items: flex-start; padding: 20px 24px; }
.work-item-modal-header h2 { margin-top: 5px; font-size: 24px; }
.work-item-modal-heading { min-width: 0; }
.work-item-parent-nav { display: flex; align-items: center; gap: 14px; margin-bottom: 11px; border-radius: 9px; padding: 8px 11px; color: #456782; background: var(--brand-soft); font-size: 13px; }
.work-item-parent-nav span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-item-parent-nav strong { color: var(--ink); }
.work-item-parent-nav .text-button { flex: 0 0 auto; border-left: 1px solid #c6d8e8; padding: 2px 0 2px 14px; }
.work-item-modal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; min-height: 0; overflow: hidden; }
.work-item-modal-main { min-height: 0; overflow-y: scroll; scrollbar-gutter: stable; padding: 18px 24px 40px; }
.work-item-modal-main textarea { min-height: 130px; }
.work-item-modal-aside { min-height: 0; overflow-y: auto; scrollbar-gutter: stable; border-left: 1px solid var(--line); padding: 23px 25px; background: #f3f7fb; }
.work-item-modal-main::-webkit-scrollbar, .work-item-modal-aside::-webkit-scrollbar { width: 10px; }
.work-item-modal-main::-webkit-scrollbar-track, .work-item-modal-aside::-webkit-scrollbar-track { background: #e9f0f7; }
.work-item-modal-main::-webkit-scrollbar-thumb, .work-item-modal-aside::-webkit-scrollbar-thumb { border: 2px solid #e9f0f7; border-radius: 99px; background: #88a8c4; }
.work-item-modal-aside h3 { margin: 0 0 16px; font-size: 17px; }
.work-item-property-fields { display: grid; gap: 11px; margin-bottom: 20px; }
.work-item-side-field, .work-item-side-value { display: grid; gap: 6px; }
.work-item-side-field > span, .work-item-side-value > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.work-item-side-field select, .work-item-side-field input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; color: var(--ink); background: white; font-size: 13px; font-weight: 700; }
.work-item-participant-picker { display: grid; max-height: 174px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: white; }
.work-item-participant-option { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #edf1ef; padding: 9px 10px; cursor: pointer; }
.work-item-participant-option:last-child { border-bottom: 0; }
.work-item-participant-option:hover { background: #edf5fc; }
.work-item-participant-option input { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--brand); }
.work-item-participant-option > span { display: grid; min-width: 0; gap: 1px; }
.work-item-participant-option strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.work-item-participant-option small, .work-item-participant-hint { color: var(--muted); font-size: 11px; font-weight: 400; }
.work-item-participant-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.work-item-participant-chip { border-radius: 999px; padding: 4px 8px; color: #356995; background: #e6f0fa; font-size: 12px; font-weight: 700; }
.work-item-participant-empty { padding: 9px 10px; color: var(--muted); font-size: 12px; }
.work-item-side-value { border-bottom: 1px solid #e5e7e8; padding: 3px 0 11px; }
.work-item-side-value strong { font-size: 14px; }
.work-item-modal-aside dl { margin: 0; }
.work-item-modal-aside dl > div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 12px; border-bottom: 1px solid #e5e7e8; padding: 13px 0; }
.work-item-modal-aside dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.work-item-modal-aside dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 14px; line-height: 1.55; }
.work-item-modal-aside .permission-note { display: block; margin-top: 20px; }
.work-item-subtasks { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 8px; }
.work-item-subtasks .panel-header { padding-right: 0; padding-left: 0; }
.work-item-content-section { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.work-item-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.work-item-section-head h3 { margin: 0; font-size: 17px; }
.work-item-section-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.work-item-attachment-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); padding: 0; }
.work-item-attachment-grid .attachment-card { grid-template-columns: 52px minmax(0, 1fr); min-height: 68px; }
.work-item-attachment-grid .attachment-card img, .work-item-attachment-grid .file-icon { width: 52px; height: 50px; }
.work-log-composer { border: 1px solid var(--line); border-radius: 11px; padding: 12px; background: #f9fbfd; }
.work-log-composer textarea { width: 100%; min-height: 86px; border: 0; padding: 2px; background: transparent; resize: vertical; outline: none; font-size: 14px; line-height: 1.7; }
.work-log-composer > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e5e7e8; padding-top: 10px; }
.work-log-composer span { color: var(--muted); font-size: 12px; }
.work-log-readonly-note { margin: 0; border-radius: 9px; padding: 12px 14px; color: #5f7488; background: #f0f5fa; font-size: 13px; }
.work-log-send-button { min-width: 96px; padding: 10px 24px; font-size: 14px; }
.work-log-list { display: grid; gap: 0; margin-top: 15px; }
.work-log-entry { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; border-bottom: 1px solid #edf1ef; padding: 14px 2px; }
.work-log-entry:last-child { border-bottom: 0; }
.work-log-entry .avatar { width: 38px; height: 38px; font-size: 11px; }
.work-log-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.work-log-meta strong { font-size: 14px; }
.work-log-meta span { color: var(--muted); font-size: 12px; }
.work-log-entry p { margin: 7px 0 0; color: #49677f; font-size: 14px; line-height: 1.75; white-space: pre-wrap; }
.work-item-readonly-description > span, .work-item-readonly-grid span { color: var(--muted); font-size: 12px; font-weight: 700; }
.work-item-readonly-description p { min-height: 140px; margin: 8px 0 20px; border: 1px solid var(--line); border-radius: 10px; padding: 16px; color: #49677f; font-size: 15px; line-height: 1.8; white-space: pre-wrap; }
.work-item-readonly-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.work-item-readonly-grid > div { display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.work-item-modal-actions { margin: 0; border-top: 1px solid var(--line); padding: 14px 24px; background: white; }
.work-item-save-notice { position: relative; z-index: 2; display: inline-flex; max-height: 0; align-items: center; overflow: hidden; border-radius: 8px; padding: 0 14px; color: #2f668f; background: #e5f0fa; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: max-height .2s ease, margin-top .2s ease, padding .2s ease, opacity .2s ease; }
.work-item-save-notice.show { max-height: 40px; margin-top: 10px; padding: 8px 14px; opacity: 1; }
.secondary-button { border: 1px solid var(--line); border-radius: 9px; padding: 10px 16px; color: #456782; background: white; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: 330px; transform: translateY(20px); border-radius: 10px; padding: 12px 17px; color: white; background: #2f6fa9; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transition: .25s; }
.modal > .toast { position: absolute; right: 24px; bottom: 78px; z-index: 20; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: var(--danger); }
.mobile-overlay { display: none; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: minmax(240px, .72fr) repeat(2, minmax(270px, 1fr)); gap: 12px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .role-user-row { grid-template-columns: minmax(240px, 1.4fr) minmax(160px, .8fr); }
  .user-department { display: none; }
  .inventory-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-filter-bar .primary-button, .inventory-filter-bar .secondary-button { width: 100%; }
  .project-detail-summary { grid-template-columns: 1fr 1fr; }
  .project-deliverables-grid { grid-template-columns: 1fr; }
  .purchase-order-summary { grid-template-columns: 42px minmax(200px, 1.5fr) auto 1fr 1fr; }
  .purchase-order-summary > b { display: none; }
}
@media (max-width: 820px) {
  .login-view { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .mobile-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 45px; }
  .login-panel-wrap { min-height: 100vh; padding: 28px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .mobile-overlay.show { position: fixed; inset: 0; z-index: 15; display: block; background: rgba(18,44,70,.46); }
  .main-area { margin-left: 0; }
  .menu-button { display: grid; }
  .topbar { padding: 12px 18px; }
  .topbar > div:first-of-type { margin-right: auto; margin-left: 12px; }
  .today, .topbar-actions > .icon-button { display: none; }
  .content { padding: 22px 18px 40px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid, .team-grid { grid-template-columns: 1fr 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .project-detail-hero { flex-direction: column; }
  .project-detail-summary { grid-template-columns: 1fr 1fr; }
  .demand-detail-summary { grid-template-columns: 1fr 1fr; }
  .project-tab { min-width: 135px; padding: 14px 17px; }
  .work-item-modal-layout { grid-template-columns: 1fr; overflow-y: scroll; scrollbar-gutter: stable; }
  .work-item-modal-main, .work-item-modal-aside { overflow: visible; }
  .work-item-modal-aside { border-top: 1px solid var(--line); border-left: 0; }
  .work-item-section-head, .work-log-composer > div { align-items: stretch; flex-direction: column; }
  .feedback-detail-meta { grid-template-columns: 1fr; }
  .inventory-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .purchase-order-summary { grid-template-columns: 36px 1fr auto; }
  .purchase-order-summary > span:nth-of-type(n+4) { grid-column: 2 / -1; }
  .procurement-execution-head { display: none; }
  .procurement-execution-row { min-width: 0; grid-template-columns: 1fr 1fr; }
  .procurement-execution-row label { display: grid; gap: 5px; }
  .mobile-field-label { display: block; color: var(--muted); font-size: 11px; font-weight: 750; }
}
@media (max-width: 560px) {
  .catalog-filter-bar { grid-template-columns: 1fr; }
  .catalog-filter-bar .primary-button, .catalog-filter-bar .secondary-button { width: 100%; }
  .catalog-category-create-form { grid-template-columns: 1fr; }
  .catalog-category-edit-form { grid-template-columns: 1fr auto auto; }
  .inventory-summary-grid, .inventory-detail-summary { grid-template-columns: 1fr; }
  .inventory-ledger-heading, .inventory-item-banner { align-items: stretch; flex-direction: column; }
  .topbar h1 { font-size: 17px; }
  .user-chip span:nth-child(2), .user-chip span:last-child { display: none; }
  .welcome-row, .section-header { align-items: flex-start; flex-direction: column; }
  .metric-grid, .project-grid, .team-grid { grid-template-columns: 1fr; }
  .role-card-head { grid-template-columns: 42px minmax(0, 1fr); }
  .role-count { grid-column: 2; justify-self: start; }
  .role-user-list { padding: 0 15px; }
  .role-user-row { grid-template-columns: 1fr; gap: 11px; }
  .role-select-wrap { grid-template-columns: 70px minmax(0, 1fr); }
  .metric-card { padding: 16px; }
  .project-row { grid-template-columns: 1fr 90px 42px; gap: 9px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .work-item-parent-nav { align-items: flex-start; flex-direction: column; gap: 7px; }
  .work-item-parent-nav .text-button { border-top: 1px solid #c6d8e8; border-left: 0; padding: 7px 0 0; }
  .part-entry { grid-template-columns: 1fr 1fr; }
  .part-entry-head { display: none; }
  .project-detail-heading { flex-direction: column; }
  .project-detail-summary { grid-template-columns: 1fr; }
  .demand-detail-hero { align-items: stretch; }
  .demand-detail-actions { align-items: stretch; flex-direction: column; }
  .demand-detail-summary, .demand-detail-grid, .demand-review-content { grid-template-columns: 1fr; }
  .demand-review-content > div:nth-child(n) { padding-right: 0; padding-left: 0; }
  .detail-action-bar { align-items: stretch; flex-direction: column; }
  .attachment-grid { grid-template-columns: 1fr; }
  .member-choice-grid { grid-template-columns: 1fr; }
  .purchase-detail-summary { grid-template-columns: 1fr; }
  .purchase-material-choice { grid-template-columns: 22px minmax(0, 1fr); }
  .purchase-material-choice .purchase-material-quantity { grid-column: 2; width: 100%; }
  .purchase-material-choice em { display: none; }
  .purchase-compact-meta-row { grid-template-columns: 1fr; }
  .purchase-submitted-material-head { display: none; }
  .purchase-submitted-material-row { grid-template-columns: 1fr; gap: 9px; }
  .purchase-submitted-material-row > span { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
  .purchase-submitted-material-row .mobile-field-label { display: block; }
  .procurement-execution-row { grid-template-columns: 1fr; }
  .project-list-pagination { align-items: stretch; flex-direction: column; }
  .project-list-pagination > div { justify-content: space-between; }
}
