:root {
  --ink: #162033;
  --ink-strong: #0b1220;
  --muted: #64748b;
  --muted-strong: #475569;
  --paper: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-subtle: #f8fafc;
  --line: #d8e0ea;
  --line-soft: #e8eef5;
  --brand: #0f7ea8;
  --brand-strong: #075b7c;
  --brand-soft: rgba(15, 126, 168, 0.1);
  --accent: #14b8a6;
  --danger: #dc2626;
  --success: #059669;
  --sidebar-width: 208px;
  --control-height: 34px;
  --control-padding-y: 7px;
  --control-padding-x: 10px;
  --control-border: #cbd5e1;
  --control-radius: 10px;
  --control-bg: rgba(255, 255, 255, 0.94);
  --role-pill-width: 260px;
  --workspace-sticky-top: 16px;
  --workspace-max-height: calc(100vh - 48px);
  --workspace-panel-padding: 16px;
  --workspace-table-radius: 14px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --focus: 0 0 0 4px rgba(15, 126, 168, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  line-height: 1.48;
  font-family:
    "HarmonyOS Sans SC",
    "MiSans",
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    sans-serif;
  font-size: 14px;
  background:
    radial-gradient(circle at 25% -10%, rgba(15, 126, 168, 0.15), transparent 36%),
    radial-gradient(circle at 90% 4%, rgba(20, 184, 166, 0.12), transparent 30%),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(100, 116, 139, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 139, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.88), transparent 72%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-strong);
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.2s ease;
}

.shell.sidebar-collapsed {
  grid-template-columns: 68px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior-x: contain;
  padding: 15px 11px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 18% 0%, rgba(94, 234, 212, 0.26), transparent 31%),
    radial-gradient(circle at 82% 24%, rgba(125, 211, 252, 0.22), transparent 34%),
    linear-gradient(180deg, #18537a 0%, #16476e 46%, #12385d 100%);
  border-right: 1px solid rgba(186, 230, 253, 0.28);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.12);
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.sidebar-collapsed .sidebar {
  padding-inline: 10px;
}

.brand {
  --brand-block-width: min(100%, 168px);
  flex: 0 0 auto;
  margin-bottom: 9px;
  padding: 1px 4px 3px;
}

.brand-logo {
  display: flex;
  width: var(--brand-block-width);
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 5px;
  padding: 5px 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.brand-logo img {
  display: block;
  width: 100%;
  max-width: 148px;
  max-height: 28px;
  height: auto;
  object-fit: contain;
}

.brand-home-link {
  display: block;
  width: var(--brand-block-width);
  margin: 0 auto;
  padding: 4px 8px;
  color: #f8fafc;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  letter-spacing: -0.02em;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(226, 245, 255, 0.18);
  border-radius: var(--radius-sm);
}

.brand-home-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-collapsed .brand {
  display: grid;
  justify-items: center;
  margin-bottom: 8px;
  padding-inline: 0;
}

.sidebar-collapsed .brand-logo {
  width: 36px;
  height: 36px;
  min-height: 36px;
  margin-bottom: 0;
  padding: 6px;
  border-radius: 12px;
}

.sidebar-collapsed .brand-logo img {
  width: 142px;
  max-width: none;
  transform: translateX(-1px);
  clip-path: inset(0 76% 0 0);
}

.sidebar-collapsed .brand-home-link,
.sidebar-collapsed .nav-section summary,
.sidebar-collapsed .nav-sub,
.sidebar-collapsed .nav button[type="submit"] {
  display: none;
}

.nav {
  --nav-item-height: 34px;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}

.nav form {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
}

.nav a,
.nav button,
.nav summary {
  display: flex;
  width: 100%;
  min-height: var(--nav-item-height);
  height: var(--nav-item-height);
  align-items: center;
  gap: 8px;
  padding: 2px 10px;
  color: rgba(240, 249, 255, 0.88);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.nav a:hover,
.nav button:hover,
.nav summary:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(224, 242, 254, 0.18);
  transform: translateX(1px);
}

.nav a.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.58), rgba(20, 184, 166, 0.36));
  border-color: rgba(165, 243, 252, 0.34);
  box-shadow: inset 3px 0 0 #67e8f9, 0 10px 26px rgba(8, 47, 73, 0.18);
}

.nav-section {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  border-radius: 12px;
}

.nav-section summary {
  position: relative;
  list-style: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 760;
}

.nav-section summary::-webkit-details-marker {
  display: none;
}

.nav-section summary::after {
  content: "";
  position: absolute;
  right: 9px;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  opacity: 0.58;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.nav-section:not([open]) summary::after {
  transform: rotate(-45deg);
}

.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-sub a {
  padding: 2px 9px 2px 30px;
  color: rgba(224, 242, 254, 0.86);
  font-size: 12px;
  font-weight: 620;
}

.nav button[type="submit"] {
  justify-content: center;
  margin-top: 0;
  color: #f0f9ff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(224, 242, 254, 0.18);
}

.sidebar-collapsed .nav {
  gap: 6px;
  flex: 0 0 auto;
  justify-content: flex-start;
}

.sidebar-collapsed .nav-section {
  display: block;
  min-height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.sidebar-collapsed .nav-section:has(.is-active) {
  min-height: 34px;
  background: linear-gradient(135deg, rgba(15, 126, 168, 0.58), rgba(20, 184, 166, 0.42));
  box-shadow: inset 3px 0 0 #22d3ee;
}

.main {
  min-width: 0;
  padding: 24px 28px 32px;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: rgba(245, 247, 251, 0.9);
  border: 1px solid rgba(216, 224, 234, 0.86);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--ink-strong);
  font-size: 24px;
  font-weight: 820;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.sidebar-toggle {
  flex: 0 0 auto;
  display: inline-grid;
  width: var(--control-height);
  height: var(--control-height);
  min-height: var(--control-height);
  place-items: center;
  gap: 3px;
  padding: 7px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.sidebar-toggle span {
  display: block;
  width: 14px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.sidebar-toggle.is-collapsed span:nth-child(1) {
  width: 8px;
}

.sidebar-toggle.is-collapsed span:nth-child(3) {
  width: 10px;
}

.user-pill {
  flex: 0 0 var(--role-pill-width);
  display: block;
  width: var(--role-pill-width);
  max-width: min(var(--role-pill-width), 48vw);
  min-height: 30px;
  padding: 6px 11px;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(216, 224, 234, 0.74);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.panel {
  min-width: 0;
  margin-bottom: 16px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid rgba(216, 224, 234, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.compact-control-panel {
  padding: 10px 16px;
}

.compact-control-panel .page-panel-head {
  min-height: var(--control-height);
  margin-bottom: 7px;
}

.compact-control-panel form {
  margin: 0;
}

.compact-control-panel label {
  font-size: 12px;
  font-weight: 760;
}

.compact-control-panel input,
.compact-control-panel select,
.compact-control-panel textarea,
.compact-control-panel button,
.compact-control-panel .button {
  min-height: var(--control-height);
}

.compact-control-panel input,
.compact-control-panel select {
  height: var(--control-height);
}

.compact-control-panel .actions {
  align-self: end;
  justify-content: flex-end;
}

.panel h2,
.panel h3 {
  margin: 0 0 12px;
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.page-panel-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.page-panel-head + .form-success,
.page-panel-head + .form-error,
.page-panel-head + .muted {
  margin-top: -2px;
}

.page-title-group {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.page-head-actions {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.page-panel-head .page-panel-title,
.fill-title-group .page-panel-title {
  margin: 0;
  color: var(--ink-strong);
  font-size: 19px;
  font-weight: 820;
  line-height: 1.2;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.page-title-group .muted {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.page-panel-head .user-pill {
  flex-basis: var(--role-pill-width);
  max-width: min(var(--role-pill-width), 48vw);
  min-height: 28px;
  padding: 5px 10px;
  box-shadow: none;
}

.page-section-head {
  align-items: center;
}

.main-panel-title-stack {
  flex: 1 1 auto;
  min-width: 0;
}

.page-section-head h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-section-head .user-pill {
  max-width: min(var(--role-pill-width), 100%);
}

.info-card-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  align-items: stretch;
  margin: 0 0 12px;
}

.info-card {
  display: grid;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  gap: 2px;
  padding: 6px 9px 7px;
  border: 1px solid rgba(216, 224, 234, 0.78);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
}

.info-card span {
  color: var(--brand-strong);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}

.info-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel > p {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

.empty {
  color: var(--muted);
  text-align: center;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 10px;
  color: var(--muted);
  line-height: 1.45;
}

.empty-state strong {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.empty-state span {
  max-width: 520px;
  font-size: 12px;
}

.empty-state-panel {
  margin: 0;
  padding: 18px 14px;
  border: 1px dashed rgba(148, 163, 184, 0.42);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.68);
}

.form-error,
.form-success {
  margin: 0 0 10px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.35;
  border-radius: 9px;
}

.form-error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.form-success {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.form-grid,
.excel-scope-form,
.excel-template-form,
.excel-import-scope-grid,
.excel-import-file-grid,
.subject-filter-form,
.subject-create-form,
.adjustment-inline-form {
  display: grid;
  gap: 8px;
  align-items: end;
}

.form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid label,
.excel-scope-form label,
.excel-template-form label,
.excel-import-scope-grid label,
.excel-import-file-grid label,
.subject-filter-form label,
.subject-create-form label,
.login-card label,
.adjustment-inline-form label {
  display: grid;
  min-width: 0;
  gap: 3px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-width: 0;
  height: var(--control-height);
  min-height: var(--control-height);
  padding: var(--control-padding-y) var(--control-padding-x);
  color: var(--ink);
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  background: var(--control-bg);
  outline: none;
}

textarea {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: var(--control-padding-y) var(--control-padding-x);
  color: var(--ink);
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  background: var(--control-bg);
  outline: none;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 126, 168, 0.58);
  box-shadow: var(--focus);
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--brand);
}

.actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-actions {
  flex-wrap: wrap;
}

.actions button,
.row-actions button,
td form button,
.button,
.excel-template-actions button {
  display: inline-flex;
  height: var(--control-height);
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  padding: var(--control-padding-y) 12px;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  background: var(--brand);
  cursor: pointer;
}

.actions button:hover,
.row-actions button:hover,
td form button:hover,
.button:hover,
.excel-template-actions button:hover {
  color: #ffffff;
  background: var(--brand-strong);
  transform: translateY(-1px);
}

.button.secondary,
button.secondary,
.secondary {
  color: var(--ink) !important;
  background: #e7f2f5 !important;
  border-color: rgba(15, 126, 168, 0.16) !important;
}

.button.secondary:hover,
button.secondary:hover,
.secondary:hover {
  color: var(--brand-strong) !important;
  background: #dff0f4 !important;
}

.danger {
  color: #ffffff !important;
  background: #b91c1c !important;
}

.danger:hover {
  background: #991b1b !important;
}

.action-submit {
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--brand), var(--accent)) !important;
  border-color: rgba(15, 126, 168, 0.26) !important;
  box-shadow: 0 8px 18px rgba(15, 126, 168, 0.16);
}

.action-save {
  box-shadow: 0 8px 18px rgba(15, 126, 168, 0.12);
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
}

.disabled-hint {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.9);
}

.trace-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 720;
}

.trace-path span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(216, 224, 234, 0.76);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.trace-path span:not(:last-child)::after {
  content: ">";
  margin-left: 8px;
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  border: 1px solid rgba(216, 224, 234, 0.76);
  border-radius: var(--workspace-table-radius);
  background: rgba(255, 255, 255, 0.72);
}

.table-wrap > table {
  border-collapse: separate;
  border-spacing: 0;
}

.table-wrap > table th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px 0 rgba(216, 224, 234, 0.86);
}

.table-wrap > table tr:last-child td {
  border-bottom: 0;
}

.table-wrap > table tbody tr {
  transition: background-color 0.12s ease;
}

.table-wrap > table tbody tr:hover {
  background: rgba(241, 253, 249, 0.42);
}

.dirty-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(8px);
}

.dirty-dialog {
  width: min(430px, 100%);
  padding: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(216, 224, 234, 0.9);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.dirty-dialog h2 {
  margin: 0 0 8px;
  color: var(--ink-strong);
  font-size: 18px;
  line-height: 1.25;
}

.dirty-dialog p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
}

.dirty-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 9px 11px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

th {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 760;
  background: #f3f7fb;
}

td {
  font-size: 13px;
}

td form {
  margin: 0;
}

td .button,
td form button {
  width: max-content;
  max-width: 100%;
}

.table-action-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 6px;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.table-action-group.single {
  grid-template-columns: minmax(0, max-content);
  justify-content: center;
}

.table-action-group form {
  min-width: 0;
}

.table-action-group .button,
.table-action-group button,
.table-action-group .disabled-hint {
  box-sizing: border-box;
  width: 100%;
  height: 30px;
  min-height: 30px;
  justify-content: center;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 12px;
}

.table-action-group .disabled-hint {
  display: inline-flex;
  color: var(--muted-strong);
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-actions-cell {
  min-width: 0;
  text-align: center;
}

.table-center-cell {
  text-align: center;
}

.admin-list-table {
  table-layout: fixed;
}

.admin-list-table th,
.admin-list-table td {
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.admin-list-table td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.admin-list-table .status-cell {
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
}

.projects-list-table .project-col-code {
  width: 11%;
}

.projects-list-table .project-col-name {
  width: 23%;
}

.projects-list-table .project-col-type {
  width: 11%;
}

.projects-list-table .project-col-status {
  width: 8%;
}

.projects-list-table .project-col-desc {
  width: 25%;
}

.projects-list-table .project-col-actions {
  width: 22%;
}

.projects-list-table .table-action-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.users-list-table .user-col-name {
  width: 11%;
}

.users-list-table .user-col-phone {
  width: 12.5%;
}

.users-list-table .user-col-roles {
  width: 20%;
}

.users-list-table .user-col-projects {
  width: 13%;
}

.users-list-table .user-col-status {
  width: 6%;
}

.users-list-table .user-col-auth {
  width: 14%;
}

.users-list-table .user-col-password {
  width: 11.5%;
}

.users-list-table .user-col-actions {
  width: 12%;
}

.users-list-table .table-action-group .button,
.users-list-table .table-action-group button {
  padding-right: 7px;
  padding-left: 7px;
}

.users-list-table .table-action-group.single .button,
.users-list-table .table-action-group.single button {
  width: auto;
  min-width: 0;
  max-width: 100%;
}

.users-list-table .table-actions-cell {
  padding-right: 5px;
  padding-left: 5px;
  text-align: center;
}

.users-list-table td:nth-child(2) {
  white-space: nowrap;
  word-break: keep-all;
}

.login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 68% 24%, rgba(56, 189, 248, 0.22), transparent 25%),
    linear-gradient(135deg, rgba(3, 23, 39, 0.7), rgba(8, 64, 96, 0.34) 50%, rgba(239, 246, 250, 0.2)),
    linear-gradient(90deg, rgba(245, 249, 252, 0.94) 0%, rgba(245, 249, 252, 0.68) 42%, rgba(245, 249, 252, 0.08) 100%),
    url("../images/login-tech-building.jpg") center / cover no-repeat;
}

.login-body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.11) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.75) 48%, rgba(0, 0, 0, 0.35) 100%);
}

.login-card {
  width: min(390px, 100%);
  padding: 28px 30px 30px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.24));
  box-shadow:
    0 30px 78px rgba(8, 35, 50, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(24px) saturate(142%);
  -webkit-backdrop-filter: blur(24px) saturate(142%);
}

.login-brand {
  display: grid;
  gap: 11px;
  justify-items: center;
  margin-bottom: 24px;
  text-align: center;
}

.login-brand-logo {
  display: flex;
  width: min(230px, 100%);
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 8px 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 18px;
  box-shadow:
    0 14px 30px rgba(8, 35, 50, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
}

.login-brand-logo img {
  display: block;
  width: 100%;
  max-height: 32px;
  object-fit: contain;
}

.login-system-name {
  margin: 0;
  color: var(--brand);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.12em;
}

.login-card form {
  display: grid;
  gap: 13px;
}

.login-card label {
  gap: 5px;
  font-size: 13px;
  color: var(--ink-strong);
}

.login-card input {
  height: 38px;
  min-height: 38px;
  border-color: rgba(116, 142, 166, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 1px 0 rgba(255, 255, 255, 0.24);
}

.login-card button {
  min-height: 42px;
  margin-top: 3px;
  color: white;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  cursor: pointer;
}

.users-create-grid {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
}

.project-create-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
}

.password-form-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
}

.permission-form-grid {
  grid-template-columns: minmax(240px, 1.2fr) minmax(240px, 1.4fr) auto;
}

.permission-form-grid > label input,
.permission-form-grid .check-row,
.permission-form-grid .check-row label,
.permission-form-grid .actions,
.permission-form-grid .actions button {
  height: var(--control-height);
  min-height: var(--control-height);
}

.permission-form-grid .check-row {
  align-self: end;
}

.permission-form-grid .check-row label {
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
}

.permission-form-grid .actions {
  align-self: end;
}

.permission-form-grid .actions button {
  padding-top: 0;
  padding-bottom: 0;
}

.budget-scope-grid {
  grid-template-columns: minmax(260px, 1.6fr) minmax(160px, 0.8fr) auto;
}

.detail-subject-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.detail-header-filter-grid {
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
}

.summary-filter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-filter-grid-company {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.adjustments-filter-grid {
  grid-template-columns: minmax(0, 1fr) auto;
}

.subject-filter-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subject-create-form {
  grid-template-columns:
    minmax(124px, 1.08fr)
    minmax(112px, 0.95fr)
    minmax(64px, 0.52fr)
    minmax(108px, 0.95fr)
    minmax(108px, 0.95fr)
    minmax(150px, 1.08fr)
    minmax(78px, auto);
  margin-top: 12px;
}

.subject-create-form .actions {
  justify-content: flex-start;
  min-width: 78px;
}

.subject-module-field input[readonly],
.subject-create-form input[readonly] {
  color: var(--brand-strong);
  font-weight: 760;
  background: rgba(15, 126, 168, 0.08);
}

.subject-advanced-field {
  display: contents;
  min-width: 0;
}

.subject-advanced-label {
  display: inline-flex;
  height: var(--control-height);
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.92);
}

.subject-visibility-field {
  min-width: 0;
}

.subject-visibility-options {
  display: flex;
  height: var(--control-height);
  min-height: var(--control-height);
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 7px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
}

.subject-visibility-check,
.subject-visibility-options label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.subject-visibility-options.compact {
  min-height: 0;
  padding: 4px 6px;
  gap: 10px;
  border-color: #dbe7e6;
}

.subject-visibility-form {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.subject-list-panel,
.summary-table-panel,
.fill-data-panel {
  position: sticky;
  top: var(--workspace-sticky-top);
  display: flex;
  max-height: var(--workspace-max-height);
  flex-direction: column;
  padding: var(--workspace-panel-padding);
  overflow: hidden;
}

.subject-list-panel .page-section-head,
.summary-table-panel .page-section-head {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

.subject-list-wrap,
.summary-table-wrap,
.fill-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain auto;
}

.subject-list-wrap,
.fill-table-wrap {
  overflow-x: hidden;
  overflow-y: auto;
}

.subject-list-table {
  table-layout: fixed;
}

.subject-list-table .subject-col-scope {
  width: 5.5%;
}

.subject-list-table .subject-col-code {
  width: 11.5%;
}

.subject-list-table .subject-col-name {
  width: 14.2%;
}

.subject-list-table .subject-col-parent {
  width: 13.2%;
}

.subject-list-table .subject-col-type {
  width: 5.2%;
}

.subject-list-table .subject-col-entry {
  width: 5.8%;
}

.subject-list-table .subject-col-module {
  width: 6.8%;
}

.subject-list-table .subject-col-visible {
  width: 9.8%;
}

.subject-list-table .subject-col-status {
  width: 5.2%;
}

.subject-list-table .subject-col-actions {
  width: 23.1%;
}

.subject-list-table th,
.subject-list-table td {
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.subject-list-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  padding-right: 8px;
  padding-left: 8px;
  line-height: 1.35;
  vertical-align: middle;
  background: #f3f7fb;
}

.subject-list-table td {
  padding: 9px 8px;
  vertical-align: middle;
}

.subject-list-table .subject-code-cell,
.subject-list-table .subject-name-cell,
.subject-list-table .subject-parent-cell,
.subject-list-table .subject-entry-cell,
.subject-list-table .subject-status-cell {
  min-width: 0;
  overflow: hidden;
  line-height: 1.38;
  white-space: normal;
  word-break: break-word;
}

.subject-list-table .subject-code-cell {
  overflow-wrap: normal;
  word-break: normal;
}

.subject-list-table .subject-name-indent {
  display: inline-block;
  max-width: 100%;
  padding-left: 0 !important;
  vertical-align: bottom;
}

.subject-list-table .subject-code-cell,
.subject-list-table .subject-scope-cell,
.subject-list-table .subject-type-cell {
  line-height: 1.3;
}

.subject-list-table .subject-scope-cell,
.subject-list-table .subject-type-cell {
  word-break: keep-all;
}

.subject-list-table .subject-status-cell {
  line-height: 1.25;
  text-align: center;
  word-break: keep-all;
}

.subject-list-table .subject-module-cell,
.subject-list-table .subject-visible-cell,
.subject-list-table .subject-entry-cell {
  line-height: 1.36;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.subject-list-table .subject-module-cell {
  overflow-wrap: anywhere;
  word-break: normal;
}

.subject-list-table .subject-entry-cell,
.subject-list-table .subject-module-cell {
  text-align: center;
}

.subject-list-table .subject-actions-cell {
  container-type: inline-size;
  overflow: hidden;
  white-space: normal;
}

.subject-list-table .subject-visibility-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.subject-list-table .disabled-row {
  color: #73808a;
  background: #f7faf9;
}

.subject-list-table .subject-visibility-options.compact {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.subject-list-table .subject-visibility-options.compact label {
  gap: 2px;
  min-height: 17px;
  font-size: 10.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.subject-list-table .subject-visibility-options.compact input[type="checkbox"] {
  width: 13px;
  min-width: 13px;
  height: 13px;
  min-height: 13px;
}

.subject-list-table .subject-visibility-form .small-button {
  width: 100%;
  min-width: 0;
}

.small-button {
  min-height: 28px;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.subject-maintenance-stack {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-width: 0;
  gap: 4px;
}

.subject-lifecycle-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.subject-lifecycle-actions form {
  min-width: 0;
}

.subject-list-table .subject-actions-cell .small-button,
.subject-list-table .subject-actions-cell .disabled-hint {
  width: 100%;
}

.subject-list-table .subject-actions-cell .disabled-hint {
  color: var(--muted-strong);
}

.subject-lifecycle-actions .status-chip {
  line-height: 1;
  white-space: nowrap;
}

.subject-status-cell .status-chip {
  min-height: 26px;
  min-width: 0;
  padding: 3px 7px;
  line-height: 1.15;
  white-space: normal;
}

@container (max-width: 150px) {
  .subject-maintenance-stack {
    grid-template-columns: 1fr;
  }

  .subject-list-table .subject-visibility-options.compact {
    grid-template-columns: 1fr;
  }

  .subject-list-table .subject-visibility-form,
  .subject-lifecycle-actions {
    grid-template-columns: 1fr;
  }
}

.subject-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.subject-steps span {
  min-height: 34px;
  padding: 8px 10px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 760;
  border: 1px solid rgba(15, 126, 168, 0.18);
  border-radius: 10px;
  background: rgba(240, 249, 252, 0.82);
}

.subject-overview-hero,
.subject-overview-panel {
  display: grid;
  gap: 14px;
}

.subject-overview-summary,
.subject-rule-grid,
.subject-sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.subject-overview-card,
.subject-rule-card,
.decision-item,
.summary-count-card,
.module-count-grid > div,
.subject-sample-card,
.flow-node {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(248, 250, 252, 0.9);
}

.subject-overview-card,
.subject-rule-card,
.decision-item,
.summary-count-card,
.module-count-grid > div,
.subject-sample-card {
  padding: 12px;
}

.subject-overview-card span,
.summary-count-card span,
.flow-node span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.subject-overview-card strong,
.summary-count-card strong,
.flow-node strong {
  display: block;
  margin-top: 3px;
  color: var(--ink-strong);
  font-size: 22px;
  line-height: 1.1;
}

.subject-overview-card p,
.flow-node p,
.subject-rule-card p,
.decision-item p {
  margin: 7px 0 0;
}

.subject-flow {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr) auto minmax(180px, 1fr);
  gap: 10px;
  align-items: stretch;
}

.secondary-flow {
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr) minmax(180px, 1fr);
}

.flow-node {
  display: grid;
  align-content: center;
  min-height: 86px;
  padding: 12px;
}

.source-node {
  background: rgba(236, 249, 252, 0.9);
}

.summary-node {
  background: rgba(241, 253, 249, 0.9);
}

.final-node {
  background: rgba(255, 251, 235, 0.86);
}

.flow-arrow {
  display: grid;
  place-items: center;
  color: var(--brand-strong);
  font-size: 22px;
  font-weight: 800;
}

.subject-rule-card h3,
.subject-sample-card h3,
.module-count-grid h3 {
  margin: 0 0 8px;
  color: var(--ink-strong);
  font-size: 14px;
}

.rule-flow {
  color: var(--brand-strong);
  font-weight: 760;
}

.decision-list {
  display: grid;
  gap: 8px;
}

.decision-item {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.decision-item strong {
  color: var(--ink-strong);
}

.summary-card-strip,
.module-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.module-count-grid p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 7px 0 0;
  color: var(--muted);
}

.module-count-grid strong {
  color: var(--brand-strong);
}

.auth-head,
.budget-head,
.main-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.auth-head h2,
.budget-head h2,
.main-panel-head h2 {
  margin-bottom: 4px;
}

.fill-data-title {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.fill-data-title h2 {
  flex: 0 0 auto;
}

.fill-data-title .user-pill {
  margin-left: auto;
  max-width: min(var(--role-pill-width), 46vw);
  box-shadow: none;
}

.auth-head p,
.budget-head p {
  margin: 0;
}

.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.auth-tabs a {
  min-height: var(--control-height);
  padding: 8px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.auth-tabs a.is-active {
  color: white;
  background: var(--brand);
  border-color: var(--brand);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.checkbox-grid label,
.check-row label {
  display: flex;
  min-height: var(--control-height);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #dbe7e6;
  border-radius: 10px;
  background: white;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.check-row legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.check-row label {
  flex: 1 1 0;
  justify-content: center;
}

.workflow-panel {
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid rgba(15, 126, 168, 0.14);
  border-radius: 14px;
  background: rgba(240, 249, 252, 0.72);
}

.workflow-panel h3 {
  margin: 0 0 9px;
  color: var(--brand-strong);
  font-size: 14px;
}

.workflow-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(110px, 0.6fr) minmax(260px, 1.6fr);
  gap: 8px;
}

.workflow-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(15, 126, 168, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.workflow-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workflow-card strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.status-chip {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  padding: 7px 10px;
  color: #92400e;
  border-radius: 999px;
  background: #fef3c7;
}

.status-chip-ok {
  color: #166534;
  background: #dcfce7;
}

.status-chip-muted {
  color: #475569;
  background: #e2e8f0;
}

.budget-table input {
  min-width: 120px;
  padding: 7px 9px;
}

.adjustments-data-table {
  width: 100%;
  table-layout: fixed;
}

.adjustments-data-table th,
.adjustments-data-table td {
  padding: 8px 7px;
  overflow-wrap: anywhere;
  word-break: normal;
}

.adjustment-col-project {
  width: 9.5%;
}

.adjustment-col-period {
  width: 8.5%;
}

.adjustment-col-layer,
.adjustment-col-type,
.adjustment-col-status {
  width: 5.2%;
}

.adjustment-col-module {
  width: 6.3%;
}

.adjustment-col-subject {
  width: 18.6%;
}

.adjustment-col-amount {
  width: 8%;
}

.adjustment-col-actions {
  width: 33.5%;
}

.adjustments-data-table .amount-cell {
  white-space: nowrap;
}

.adjustment-subject-cell {
  line-height: 1.42;
}

.detail-page-panel h2 {
  margin: 4px 0 10px;
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 760;
}

.detail-page-panel .page-panel-head {
  margin-bottom: 0;
}

.detail-entry-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.detail-entry-panel > form {
  min-width: 0;
  max-width: 100%;
}

.detail-entry-head {
  align-items: center;
  margin-bottom: 0;
}

.detail-entry-title {
  max-width: min(68vw, 980px);
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-reuse-button {
  min-height: var(--context-control-height);
  padding-top: 0;
  padding-bottom: 0;
}

.detail-header-filter-grid {
  padding-top: 12px;
  border-top: 1px solid rgba(216, 224, 234, 0.68);
}

.detail-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.detail-table {
  min-width: 1120px;
  table-layout: fixed;
}

.detail-table th,
.detail-table td {
  vertical-align: middle;
}

.detail-sequence-cell {
  width: 52px;
  min-width: 52px;
  text-align: center;
  color: var(--muted-strong);
  font-weight: 760;
  white-space: nowrap;
}

.detail-action-cell {
  width: 88px;
  min-width: 88px;
  text-align: center;
  white-space: nowrap;
}

.detail-field-cell {
  min-width: 0;
  overflow: hidden;
}

.detail-field-occurred-date {
  width: 112px;
  min-width: 112px;
}

.detail-field-description {
  width: auto;
  min-width: 220px;
}

.detail-field-position-name {
  width: 120px;
  min-width: 120px;
}

.detail-field-person-name {
  width: 96px;
  min-width: 96px;
}

.detail-field-unit {
  width: 88px;
  min-width: 88px;
}

.detail-field-quantity,
.detail-field-unit-price,
.detail-field-amount,
.detail-field-salary-standard-amount,
.detail-field-salary-amount,
.detail-field-social-security-amount,
.detail-field-housing-fund-amount,
.detail-field-outsourcing-service-amount {
  width: 108px;
  min-width: 108px;
}

.detail-field-remark {
  width: 160px;
  min-width: 160px;
}

.detail-table .detail-field-cell input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
}

.detail-table .detail-field-occurred-date input,
.detail-table .detail-field-position-name input,
.detail-table .detail-field-person-name input,
.detail-table .detail-field-unit input,
.detail-table .detail-field-quantity input,
.detail-table .detail-field-unit-price input,
.detail-table .detail-field-amount input,
.detail-table .detail-field-salary-standard-amount input,
.detail-table .detail-field-salary-amount input,
.detail-table .detail-field-social-security-amount input,
.detail-table .detail-field-housing-fund-amount input,
.detail-table .detail-field-outsourcing-service-amount input,
.detail-table .detail-field-remark input {
  min-width: 0;
}

.budget-table .amount-input,
.amount-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.detail-paste-hint {
  margin: 0 0 12px;
  font-size: 13px;
}

.detail-table .computed-input {
  color: var(--muted-strong);
  background: #f8fafc;
}

.detail-row-remove {
  min-height: var(--control-height);
  padding: 7px 10px;
}

.budget-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.review-detail-table-wrap {
  max-height: min(54vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
}

.review-detail-table {
  table-layout: fixed;
}

.review-detail-table col.code-cell {
  width: 28%;
}

.review-detail-table col.subject-cell {
  width: 34%;
}

.review-detail-table col.amount-cell {
  width: 14%;
}

.review-detail-table col.remark-cell {
  width: 24%;
}

.review-detail-table .code-cell {
  font-variant-numeric: tabular-nums;
}

.review-detail-table .subject-cell {
  text-align: left;
}

.review-detail-table .amount-cell {
  text-align: right;
}

.review-detail-table th,
.review-detail-table td {
  height: 42px;
  vertical-align: middle;
}

.review-detail-table .review-subject-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-detail-table .review-subject-level-2 {
  padding-left: 14px;
}

.review-detail-table .review-subject-level-3 {
  padding-left: 28px;
}

.review-detail-table .review-subject-level-4,
.review-detail-table .review-subject-level-5 {
  padding-left: 42px;
}

.review-detail-table .review-summary-row {
  font-weight: 760;
  background: rgba(241, 253, 249, 0.52);
}

.inline-action-row {
  flex-wrap: wrap;
  align-items: center;
}

.inline-action-form {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.inline-action-form-fluid {
  flex: 1 1 360px;
}

.inline-action-form-fluid input:not([type="hidden"]) {
  flex: 1 1 260px;
  max-width: 420px;
  height: var(--control-height);
  min-height: var(--control-height);
}

.summary-table-wrap {
  overflow: auto;
  border: 1px solid rgba(216, 224, 234, 0.86);
  border-radius: var(--workspace-table-radius);
  background: rgba(255, 255, 255, 0.76);
}

.summary-table {
  width: 100%;
  min-width: max(100%, calc(260px + (var(--summary-amount-column-count, 3) * 96px)));
  table-layout: fixed;
}

.summary-table th,
.summary-table td {
  height: 42px;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f3f7fb;
}

.summary-table th:first-child,
.summary-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 260px;
  min-width: 260px;
  text-align: left;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 8px 0 14px rgba(15, 23, 42, 0.06);
}

.summary-table th:first-child {
  z-index: 6;
  background: #f3f7fb;
}

.summary-table th:not(:first-child),
.summary-table td:not(:first-child) {
  width: 96px;
  min-width: 96px;
  text-align: right;
}

.summary-trace-link {
  color: var(--brand);
  font-weight: 700;
}

.summary-trace-link:hover {
  text-decoration: underline;
}

.summary-trace-focus-cell {
  box-shadow: inset 0 0 0 2px rgba(20, 184, 166, 0.56);
}

.adjustments-filter-panel {
  overflow-x: auto;
}

.compact-control-panel.users-create-panel,
.compact-control-panel.project-create-panel,
.compact-control-panel.password-change-panel,
.compact-control-panel.adjustments-filter-panel {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px 12px;
  align-items: end;
}

.compact-control-panel.adjustments-filter-panel {
  grid-template-columns: max-content minmax(0, 1fr);
}

.compact-control-panel.users-create-panel .page-panel-head,
.compact-control-panel.project-create-panel .page-panel-head,
.compact-control-panel.password-change-panel .page-panel-head,
.compact-control-panel.adjustments-filter-panel .page-panel-head {
  display: contents;
}

.compact-control-panel.users-create-panel .page-title-group,
.compact-control-panel.project-create-panel .page-title-group,
.compact-control-panel.password-change-panel .page-title-group,
.compact-control-panel.adjustments-filter-panel .page-title-group {
  grid-column: 1;
  align-self: end;
}

.compact-control-panel.users-create-panel .user-pill,
.compact-control-panel.project-create-panel .user-pill,
.compact-control-panel.password-change-panel .user-pill,
.compact-control-panel.adjustments-filter-panel .user-pill {
  grid-column: 3;
  align-self: start;
  justify-self: end;
  max-width: 100%;
  min-width: 0;
}

.compact-control-panel.users-create-panel .form-success,
.compact-control-panel.users-create-panel .form-error,
.compact-control-panel.project-create-panel .form-success,
.compact-control-panel.project-create-panel .form-error,
.compact-control-panel.password-change-panel .form-success,
.compact-control-panel.password-change-panel .form-error,
.compact-control-panel.adjustments-filter-panel .form-success,
.compact-control-panel.adjustments-filter-panel .form-error {
  grid-column: 1 / -1;
  margin: 0;
}

.compact-control-panel.users-create-panel form,
.compact-control-panel.project-create-panel form,
.compact-control-panel.password-change-panel form,
.compact-control-panel.adjustments-filter-panel form {
  grid-column: 2;
}

.compact-control-panel.users-create-panel form,
.compact-control-panel.project-create-panel form,
.compact-control-panel.password-change-panel form {
  width: 100%;
}

.compact-control-panel.users-create-panel .actions,
.compact-control-panel.project-create-panel .actions,
.compact-control-panel.password-change-panel .actions {
  justify-content: flex-end;
}

.adjustments-filter-grid .actions {
  justify-content: flex-end;
}

.confirmations-filter-form {
  width: 100%;
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto;
}

.confirmations-filter-form .actions {
  justify-content: flex-end;
}

.confirmations-filter-form button {
  min-width: 74px;
}

.adjustments-filter-fields {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.adjustments-table-panel .page-section-head {
  align-items: center;
}

.adjustments-head-filters {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.adjustments-head-filters label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.adjustments-head-filters input {
  width: 170px;
}

.adjustments-head-filters select {
  width: 112px;
}

[data-scope-collapsible-content] {
  transition:
    max-height 0.18s ease,
    opacity 0.16s ease,
    padding 0.16s ease,
    margin 0.16s ease,
    border-color 0.16s ease;
}

[data-collapsible-scope].is-scope-collapsed [data-scope-collapsible-content] {
  max-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  opacity: 0;
  border-color: transparent;
  pointer-events: none;
}

[data-collapsible-scope].is-scope-collapsed .fill-workflow-area {
  max-height: 1px;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 1;
  border-top-color: rgba(216, 224, 234, 0.72);
}

[data-collapsible-scope].is-scope-collapsed .fill-workflow-area > * {
  visibility: hidden;
}

.scope-collapse-toggle {
  width: 72px;
}

.adjustment-inline-form {
  grid-template-columns: minmax(56px, 0.66fr) minmax(72px, 1fr) minmax(64px, auto);
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.adjustment-inline-form input,
.adjustment-inline-form button {
  min-width: 0;
}

.adjustment-inline-form input {
  padding-inline: 7px;
}

.adjustment-inline-form button {
  padding-inline: 8px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

.adjustments-table-head {
  align-items: center;
}

.table-subject-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.excel-scope-form {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.excel-template-sections {
  display: grid;
  gap: 14px;
}

.excel-template-group {
  display: grid;
  gap: 9px;
  padding-top: 10px;
  border-top: 1px solid rgba(216, 224, 234, 0.72);
}

.excel-template-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.excel-template-group h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 820;
  line-height: 1.2;
}

.excel-project-scope-form {
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.1fr) minmax(220px, 1.1fr);
}

.excel-company-scope-form {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.excel-template-form {
  padding-top: 0;
}

.excel-import-form {
  display: grid;
  gap: 8px;
}

.excel-import-scope-grid {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.excel-import-file-grid {
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.7fr) auto;
  padding-top: 8px;
  border-top: 1px solid rgba(216, 224, 234, 0.72);
}

.excel-template-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.excel-template-actions button {
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  background: #e7f2f5;
  border-color: rgba(15, 126, 168, 0.16);
  border-bottom-color: rgba(15, 126, 168, 0.36);
  border-bottom-width: 2px;
}

.excel-file-label {
  grid-column: auto;
}

.excel-import-actions {
  min-height: var(--control-height);
  align-items: stretch;
  align-self: stretch;
}

.excel-import-actions button {
  height: var(--control-height);
  min-height: var(--control-height);
  width: 100%;
}

.excel-error-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.focus-row {
  outline: 2px solid rgba(20, 184, 166, 0.42);
  outline-offset: -2px;
  background: rgba(20, 184, 166, 0.08);
}

.focus-row-active {
  animation: focusRowPulse 0.9s ease-in-out 2;
}

.fill-context-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(178px, 0.2fr) minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 10px 12px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 252, 0.9)),
    var(--panel);
}

.fill-context-head,
.fill-title-group {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.fill-context-head {
  display: contents;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--control-height);
}

.fill-title-group {
  grid-column: 1;
  grid-row: 1;
  flex: 0 0 auto;
  align-self: end;
  min-height: var(--control-height);
}

.fill-context-grid {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  gap: 7px;
  align-items: end;
  margin-bottom: 0;
}

.project-fill-scope-form,
.single-fill-scope-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-fill-scope-form label:nth-of-type(1),
.single-fill-scope-form label:nth-of-type(1),
.summary-filter-grid label:nth-of-type(1) {
  grid-column: 1;
  grid-row: 1;
}

.project-fill-scope-form label:nth-of-type(2),
.single-fill-scope-form label:nth-of-type(2),
.summary-filter-grid label:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1;
}

.project-fill-scope-form label:nth-of-type(3),
.summary-filter-grid label:nth-of-type(3) {
  grid-column: 3;
  grid-row: 1;
}

.project-fill-scope-form .actions,
.single-fill-scope-form .actions {
  grid-row: 1;
  grid-column: -2 / -1;
  justify-self: end;
}

.project-fill-scope-form label:nth-of-type(3) {
  padding-right: 80px;
}

.fill-context-grid label {
  display: grid;
  min-width: 0;
  gap: 3px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.fill-workflow-area {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(216, 224, 234, 0.72);
}

.fill-workflow-area {
  display: grid;
  grid-template-columns: minmax(178px, 0.2fr) minmax(0, 1fr);
  gap: 10px;
  grid-column: 1 / -1;
}

.fill-workflow-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.fill-batch-card {
  grid-column: 1;
  margin: 0;
  align-self: stretch;
}

.fill-workflow-area .info-card {
  min-height: 43px;
  height: 100%;
}

.fill-description-card {
  background: rgba(248, 250, 252, 0.66);
}

.fill-context-panel .form-success,
.fill-context-panel .form-error {
  grid-column: 1 / -1;
  margin: 0;
}

.fill-data-panel > form {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.fill-table-wrap {
  border: 1px solid rgba(216, 224, 234, 0.86);
  border-radius: var(--workspace-table-radius);
  background: rgba(255, 255, 255, 0.76);
}

.fill-table {
  width: 100%;
  min-width: var(--fill-table-min-width, 0);
  table-layout: fixed;
}

.fill-table th,
.fill-table td {
  height: 44px;
  padding: 8px 10px;
}

.fill-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f3f7fb;
}

.fill-table .level-cell {
  width: 56px;
  color: var(--muted-strong);
  font-weight: 720;
}

.fill-table .code-cell {
  width: 126px;
  font-variant-numeric: tabular-nums;
}

.fill-table .subject-cell {
  width: auto;
  min-width: 0;
  color: var(--ink);
}

.fill-table .amount-cell {
  width: 142px;
}

.fill-table .remark-cell {
  width: 260px;
}

.fill-table.project-actual-fill-table .remark-cell {
  width: 190px;
}

.fill-table.project-actual-fill-table .detail-cell {
  width: 118px;
}

.fill-table.virtual-fill-table .code-cell {
  width: 96px;
}

.fill-table.virtual-fill-table .remark-cell {
  width: 196px;
}

@media (max-width: 1040px) {
  .fill-table .level-cell {
    width: 52px;
  }

  .fill-table .code-cell {
    width: 112px;
  }

  .fill-table .amount-cell {
    width: 124px;
  }

  .fill-table .remark-cell {
    width: 190px;
  }

  .fill-table.project-actual-fill-table .remark-cell {
    width: 140px;
  }

  .fill-table.project-actual-fill-table .detail-cell,
  .fill-table .detail-cell {
    width: 100px;
  }

  .fill-table.virtual-fill-table .code-cell {
    width: 88px;
  }

  .fill-table.virtual-fill-table .amount-cell {
    width: 118px;
  }

  .fill-table.virtual-fill-table .remark-cell {
    width: 150px;
  }
}

.fill-table input {
  height: 32px;
  min-height: 32px;
}

.fill-table .amount-input {
  width: 100%;
  min-width: 0;
  color: var(--brand-strong);
  font-weight: 760;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fill-table .readonly-amount {
  background: #eaf7fb;
  border-color: #c9eaf3;
  cursor: default;
}

.fill-table .plain-amount {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.fill-table .detail-cell {
  width: 118px;
  min-width: 0;
  text-align: center;
}

.detail-source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-right: 8px;
  padding: 0 9px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
  background: #eaf7fb;
  border: 1px solid #c9eaf3;
  border-radius: 999px;
}

.fill-table tr.row-level-1,
.fill-table tr.row-level-2 {
  background: rgba(236, 249, 252, 0.68);
}

.fill-table tr.row-level-2 {
  background: rgba(241, 253, 249, 0.58);
}

.subject-name {
  display: inline-block;
}

.subject-name.level-2 {
  padding-left: 18px;
}

.subject-name.level-3 {
  padding-left: 36px;
}

.subject-name.level-4,
.subject-name.level-5 {
  padding-left: 54px;
}

.fill-action-bar {
  justify-content: flex-end;
  margin-top: 12px;
}

.dashboard-hero-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 12%, rgba(20, 184, 166, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(235, 248, 252, 0.9));
}

.dashboard-period {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  padding: 0 12px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 780;
  background: rgba(15, 126, 168, 0.1);
  border: 1px solid rgba(15, 126, 168, 0.16);
  border-radius: 999px;
}

.dashboard-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: end;
  margin-top: 16px;
}

.dashboard-kicker {
  margin: 0 0 5px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.08em;
}

.dashboard-hero-grid h3 {
  margin: 0 0 8px;
  color: var(--ink-strong);
  font-size: 24px;
  line-height: 1.2;
}

.dashboard-hero-grid p {
  max-width: 720px;
  margin: 0;
  color: var(--muted-strong);
}

.dashboard-role-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.dashboard-role-card-grid article {
  min-width: 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 126, 168, 0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.dashboard-role-card-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 820;
}

.dashboard-role-card-grid p {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.55;
}

.dashboard-quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.dashboard-quick-links a {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 760;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(15, 126, 168, 0.14);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.dashboard-quick-links a:hover {
  color: #ffffff;
  background: var(--brand);
  transform: translateY(-1px);
}

.dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-metric-card {
  min-width: 0;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.dashboard-metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.dashboard-metric-card strong {
  display: block;
  margin: 8px 0 5px;
  color: var(--ink-strong);
  font-size: 28px;
  line-height: 1;
}

.dashboard-metric-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 18px;
}

.dashboard-progress-list,
.dashboard-focus-list,
.dashboard-activity-list {
  display: grid;
  gap: 10px;
}

.dashboard-progress-item {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--panel-subtle);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}

.dashboard-progress-item strong,
.dashboard-progress-item span {
  display: block;
}

.dashboard-progress-item strong {
  color: var(--ink-strong);
  font-size: 14px;
}

.dashboard-progress-item span {
  margin-top: 3px;
  color: var(--muted-strong);
  font-size: 12px;
}

.dashboard-progress-item em {
  color: var(--brand-strong);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-progress-bar {
  height: 9px;
  overflow: hidden;
  background: #dbeaf0;
  border-radius: 999px;
}

.dashboard-progress-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: inherit;
}

.dashboard-focus-list article,
.dashboard-activity-list article {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: var(--panel-subtle);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}

.dashboard-focus-list span {
  width: fit-content;
  padding: 3px 8px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 780;
  background: var(--brand-soft);
  border-radius: 999px;
}

.dashboard-focus-list p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.dashboard-activity-list article {
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
}

.dashboard-activity-list time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.dashboard-activity-list span {
  color: var(--ink);
  font-size: 13px;
}

@keyframes focusRowPulse {
  0%,
  100% {
    background: rgba(20, 184, 166, 0.08);
  }

  50% {
    background: rgba(20, 184, 166, 0.2);
  }
}

@media (max-width: 1080px) {
  .compact-control-panel.users-create-panel,
  .compact-control-panel.project-create-panel,
  .compact-control-panel.password-change-panel,
  .compact-control-panel.adjustments-filter-panel,
  .fill-context-panel {
    grid-template-columns: 1fr;
  }

  .compact-control-panel.users-create-panel form,
  .compact-control-panel.project-create-panel form,
  .compact-control-panel.password-change-panel form,
  .compact-control-panel.adjustments-filter-panel form,
  .fill-context-grid {
    grid-column: 1;
  }

  .compact-control-panel.users-create-panel .page-panel-head,
  .compact-control-panel.project-create-panel .page-panel-head,
  .compact-control-panel.password-change-panel .page-panel-head,
  .compact-control-panel.adjustments-filter-panel .page-panel-head,
  .fill-context-head {
    display: flex;
    margin-bottom: 7px;
  }

  .compact-control-panel.users-create-panel .page-title-group,
  .compact-control-panel.project-create-panel .page-title-group,
  .compact-control-panel.password-change-panel .page-title-group,
  .compact-control-panel.adjustments-filter-panel .page-title-group,
  .compact-control-panel.users-create-panel .user-pill,
  .compact-control-panel.project-create-panel .user-pill,
  .compact-control-panel.password-change-panel .user-pill,
  .compact-control-panel.adjustments-filter-panel .user-pill,
  .fill-title-group {
    grid-column: auto;
  }

  .form-grid,
  .excel-scope-form,
  .excel-template-form,
  .excel-import-scope-grid,
  .excel-import-file-grid,
  .summary-filter-grid,
  .adjustments-filter-grid,
  .confirmations-filter-form,
  .subject-filter-form,
  .subject-create-form,
  .password-form-grid,
  .permission-form-grid,
  .budget-scope-grid,
  .detail-subject-filter-grid,
  .project-fill-scope-form,
  .single-fill-scope-form,
  .summary-filter-grid,
  .confirmations-filter-form,
  .info-card-strip,
  .fill-workflow-strip,
  .dashboard-role-card-grid,
  .dashboard-metric-grid,
  .dashboard-hero-grid,
  .dashboard-main-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .dashboard-progress-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .subject-create-form {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .subject-create-form .actions {
    justify-content: flex-start;
  }

  .adjustments-table-panel .page-section-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .adjustments-table-panel .main-panel-title-stack {
    flex: 0 0 auto;
    min-width: max-content;
  }

  .adjustments-table-panel .page-section-head h2 {
    overflow: visible;
    text-overflow: clip;
  }

  .adjustments-table-panel .page-head-actions {
    flex: 1 1 420px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .adjustments-head-filters {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .adjustments-data-table th,
  .adjustments-data-table td {
    padding: 7px 5px;
    font-size: 12px;
    line-height: 1.36;
  }

  .adjustments-data-table .amount-cell {
    font-size: 12px;
  }

  .adjustment-inline-form {
    grid-template-columns: minmax(46px, 0.58fr) minmax(54px, 1fr) minmax(52px, auto);
    width: 100%;
  }

}

@media (max-width: 1320px) {
  .detail-table {
    width: 100%;
    min-width: 0;
  }

  .detail-table th,
  .detail-table td {
    padding: 6px 4px;
    font-size: 11px;
  }

  .detail-sequence-cell {
    width: 4.5%;
    min-width: 0;
  }

  .detail-action-cell {
    width: 7%;
    min-width: 0;
  }

  .detail-field-occurred-date {
    width: 12%;
    min-width: 0;
  }

  .detail-field-description {
    width: auto;
    min-width: 0;
  }

  .detail-field-position-name {
    width: 10%;
    min-width: 0;
  }

  .detail-field-person-name {
    width: 8%;
    min-width: 0;
  }

  .detail-field-unit {
    width: 6%;
    min-width: 0;
  }

  .detail-field-quantity,
  .detail-field-unit-price,
  .detail-field-amount,
  .detail-field-salary-standard-amount,
  .detail-field-salary-amount,
  .detail-field-social-security-amount,
  .detail-field-housing-fund-amount,
  .detail-field-outsourcing-service-amount {
    width: 8%;
    min-width: 0;
  }

  .detail-field-remark {
    width: 12%;
    min-width: 0;
  }

  .detail-table .detail-field-cell input {
    height: 28px;
    min-height: 28px;
    padding: 4px 5px;
    font-size: 11px;
  }

  .detail-row-remove {
    height: 28px;
    min-height: 28px;
    padding: 0 5px;
    font-size: 11px;
  }
}

@media (max-width: 980px) {
  .detail-table {
    min-width: 0;
  }

  .detail-table th,
  .detail-table td {
    padding: 5px 3px;
    font-size: 10px;
  }

  .detail-sequence-cell {
    width: 4%;
    min-width: 0;
  }

  .detail-action-cell {
    width: 6%;
    min-width: 0;
  }

  .detail-field-occurred-date {
    width: 11%;
    min-width: 0;
  }

  .detail-field-description {
    width: auto;
    min-width: 0;
  }

  .detail-field-position-name {
    width: 9%;
    min-width: 0;
  }

  .detail-field-person-name {
    width: 7%;
    min-width: 0;
  }

  .detail-field-unit {
    width: 5.5%;
    min-width: 0;
  }

  .detail-field-quantity,
  .detail-field-unit-price,
  .detail-field-amount,
  .detail-field-salary-standard-amount,
  .detail-field-salary-amount,
  .detail-field-social-security-amount,
  .detail-field-housing-fund-amount,
  .detail-field-outsourcing-service-amount {
    width: 7.5%;
    min-width: 0;
  }

  .detail-field-remark {
    width: 10%;
    min-width: 0;
  }

  .detail-table .detail-field-cell input {
    height: 26px;
    min-height: 26px;
    padding: 3px 4px;
    font-size: 10px;
  }

  .detail-row-remove {
    height: 26px;
    min-height: 26px;
    padding: 0 4px;
    font-size: 10px;
  }
}

@media (max-width: 760px) {
  .detail-table {
    min-width: 0;
  }

  .detail-table th,
  .detail-table td {
    padding: 4px 2px;
    font-size: 9px;
  }

  .detail-sequence-cell {
    width: 3.8%;
    min-width: 0;
  }

  .detail-action-cell {
    width: 5.8%;
    min-width: 0;
  }

  .detail-field-occurred-date {
    width: 10.5%;
    min-width: 0;
  }

  .detail-field-description {
    width: auto;
    min-width: 0;
  }

  .detail-field-position-name {
    width: 8.5%;
    min-width: 0;
  }

  .detail-field-person-name {
    width: 6.8%;
    min-width: 0;
  }

  .detail-field-unit {
    width: 5%;
    min-width: 0;
  }

  .detail-field-quantity,
  .detail-field-unit-price,
  .detail-field-amount,
  .detail-field-salary-standard-amount,
  .detail-field-salary-amount,
  .detail-field-social-security-amount,
  .detail-field-housing-fund-amount,
  .detail-field-outsourcing-service-amount {
    width: 7%;
    min-width: 0;
  }

  .detail-field-remark {
    width: 9%;
    min-width: 0;
  }

  .detail-table .detail-field-cell input {
    height: 24px;
    min-height: 24px;
    padding: 3px 4px;
    font-size: 9px;
  }

  .detail-row-remove {
    height: 24px;
    min-height: 24px;
    padding: 0 3px;
    font-size: 9px;
  }
}

@media (max-width: 820px) {
  .shell,
  .shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar-collapsed .brand-home-link,
  .sidebar-collapsed .nav-section summary,
  .sidebar-collapsed .nav-sub,
  .sidebar-collapsed .nav button[type="submit"] {
    display: flex;
  }

  .main {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar h1 {
    font-size: 21px;
  }

  .user-pill {
    width: 100%;
    flex-basis: 100%;
    max-width: 100%;
  }

  .form-grid,
  .excel-scope-form,
  .excel-template-form,
  .excel-import-scope-grid,
  .excel-import-file-grid,
  .subject-filter-form,
  .subject-create-form,
  .workflow-grid,
  .project-fill-scope-form,
  .single-fill-scope-form,
  .summary-filter-grid,
  .info-card-strip,
  .fill-workflow-strip,
  .dashboard-metric-grid,
  .dashboard-hero-grid,
  .dashboard-role-card-grid,
  .dashboard-main-grid,
  .dashboard-quick-links,
  .dashboard-activity-list article {
    grid-template-columns: 1fr;
  }

  .fill-context-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .excel-file-label {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .adjustment-inline-form {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  }

  .adjustment-inline-form button {
    grid-column: 1 / -1;
    width: 100%;
  }
}
