:root {
  --bg: #f7f7f5;
  --bg-deep: #ecece8;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(89, 90, 94, 0.12);
  --text: #2a2c31;
  --muted: #72757d;
  --accent: #f26a1b;
  --accent-2: #d94b27;
  --accent-soft: rgba(242, 106, 27, 0.08);
  --accent-deep: #4a4d54;
  --danger: #b44536;
  --shadow: 0 18px 44px rgba(27, 31, 35, 0.08);
  --radius: 20px;
}

.finance-ledger-grid,
.finance-statement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.finance-ledger-panel {
  min-width: 0;
}

.finance-statement-card {
  padding: 16px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.finance-statement-card h4 {
  margin: 3px 0 14px;
  color: var(--text);
  font-size: 20px;
}

.finance-statement-lines {
  display: grid;
  gap: 8px;
}

.finance-statement-lines div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(89, 90, 94, 0.08);
  border-radius: 8px;
  background: rgba(250, 250, 249, 0.74);
}

.finance-statement-lines span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.finance-statement-lines strong {
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
}

.finance-balance-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 260px));
  gap: 14px;
  margin: 14px 0 18px;
  align-items: end;
}

.finance-month-link {
  padding: 6px 10px;
}

.finance-balance-type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.finance-balance-type.income {
  color: #256b43;
  background: rgba(37, 107, 67, 0.1);
}

.finance-balance-type.expense {
  color: #9f3d2e;
  background: rgba(185, 67, 46, 0.1);
}

body[data-theme="sand"] {
  --bg: #f6f1ea;
  --bg-deep: #e8ddd0;
  --panel: rgba(255, 251, 247, 0.92);
  --panel-strong: rgba(255, 252, 249, 0.98);
  --line: rgba(104, 90, 73, 0.12);
  --text: #312c28;
  --muted: #7d7067;
  --accent: #cf6b2d;
  --accent-2: #b8572e;
  --accent-soft: rgba(207, 107, 45, 0.1);
  --accent-deep: #5b4f45;
}

body[data-theme="graphite"] {
  --bg: #f1f2f4;
  --bg-deep: #e4e7eb;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(59, 67, 77, 0.13);
  --text: #20252b;
  --muted: #64707d;
  --accent: #e26d2f;
  --accent-2: #c95732;
  --accent-soft: rgba(226, 109, 47, 0.08);
  --accent-deep: #33404c;
}

body[data-theme="blue"] {
  --bg: #eef4fb;
  --bg-deep: #dfe9f6;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(55, 94, 140, 0.14);
  --text: #1f2b38;
  --muted: #627487;
  --accent: #2f6db8;
  --accent-2: #1f5ca8;
  --accent-soft: rgba(47, 109, 184, 0.1);
  --accent-deep: #284768;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(242, 106, 27, 0.08), transparent 26%),
    radial-gradient(circle at right, rgba(217, 75, 39, 0.08), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

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

.ambient,
.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient-a {
  inset: -10rem auto auto -8rem;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  background: rgba(242, 106, 27, 0.1);
  filter: blur(30px);
}

.ambient-b {
  inset: auto -9rem 6rem auto;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  background: rgba(217, 75, 39, 0.08);
  filter: blur(34px);
}

.ambient-grid {
  background-image:
    linear-gradient(rgba(43, 35, 24, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 35, 24, 0.035) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.55;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.35));
}

#app {
  position: relative;
  z-index: 1;
}

.login-shell,
.shell {
  width: min(1440px, calc(100vw - 30px));
  margin: 0 auto;
  padding: 22px 0 34px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(320px, 760px);
  justify-content: center;
  align-content: center;
  gap: 18px;
}

.login-panel,
.panel,
.topbar-card,
.metric-card,
.record-card,
.attachment-card,
.detail-block,
.highlight-box,
.timeline-item,
.pipeline-row,
.fatal,
.brand-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-panel {
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(250, 250, 249, 0.98) 0%, rgba(245, 245, 243, 0.95) 100%);
  color: var(--text);
  position: relative;
}

.hero-logo {
  display: block;
  width: 90%;
  height: auto;
  margin: 0 auto 14px;
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
}

.hero-panel p {
  color: var(--muted);
  line-height: 1.65;
  max-width: 520px;
}

.form-panel {
  padding: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,249,0.96));
  display: grid;
  justify-items: center;
  text-align: center;
}

.eyebrow,
.card-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.hero-panel .eyebrow {
  color: var(--accent);
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.96;
  margin-bottom: 14px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 4vw, 36px);
}

h3 {
  font-size: 24px;
}

.login-hint {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
  width: 100%;
  max-width: 700px;
}

.form-panel .stack {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.form-panel label {
  width: 100%;
  text-align: left;
}

.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
}

.shell.split-resizable {
  grid-template-columns: minmax(220px, 280px) 12px minmax(720px, 1fr);
  align-items: start;
}

.sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}

.brand-card,
.panel,
.topbar-card {
  padding: 22px;
}

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(249,249,248,0.94));
}

.brand-card h1 {
  font-size: 24px;
  line-height: 1.16;
  margin: 4px 0;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin-bottom: 14px;
}

.brand-card p {
  color: var(--muted);
  line-height: 1.7;
}

.nav-list {
  display: grid;
  gap: 10px;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.subnav-list {
  display: none;
  gap: 6px;
  padding-left: 18px;
}

.nav-group.expanded .subnav-list {
  display: grid;
}

.subnav-btn {
  text-align: left;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  position: relative;
}

.subnav-btn::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(89, 90, 94, 0.3);
}

.subnav-btn.active {
  color: var(--accent-deep);
  background: rgba(242, 106, 27, 0.06);
  border-color: rgba(242, 106, 27, 0.08);
}

.subnav-btn.active::before {
  background: var(--accent);
}

.nav-btn,
button {
  border: none;
  cursor: pointer;
  border-radius: 16px;
  padding: 12px 16px;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(89, 90, 94, 0.14);
  color: var(--text);
  text-decoration: none;
  background: transparent;
  font: inherit;
}

.nav-btn {
  text-align: left;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(89, 90, 94, 0.1);
  color: var(--text);
  font-weight: 600;
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(242, 106, 27, 0.98), rgba(217, 75, 39, 0.94));
  color: #fff;
  box-shadow: 0 14px 26px rgba(242, 106, 27, 0.22);
}

button:hover {
  transform: translateY(-1px);
}

button.primary {
  background: linear-gradient(135deg, #f26a1b, #d94b27);
  color: white;
  box-shadow: 0 12px 24px rgba(242, 106, 27, 0.22);
}

button.secondary {
  background: rgba(242, 106, 27, 0.08);
  color: var(--accent);
}

button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(89, 90, 94, 0.14);
}

.back-arrow-button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  width: 82px;
  min-width: 82px;
  height: 62px;
  padding: 6px 8px;
  border: 1px solid rgba(232, 95, 35, 0.16);
  border-radius: 18px;
  background: rgba(255, 248, 242, 0.9);
  color: var(--accent-deep);
  box-shadow: 0 8px 18px rgba(43, 35, 24, 0.06);
}

.back-arrow-button span {
  font-size: 34px;
  line-height: 0.82;
  font-weight: 700;
}

.back-arrow-button small {
  color: #7c7069;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.back-arrow-button:hover {
  border-color: rgba(232, 95, 35, 0.28);
  background: #fff3ea;
  box-shadow: 0 12px 22px rgba(232, 95, 35, 0.12);
}

button.full {
  width: 100%;
}

.sidebar-foot {
  display: grid;
  gap: 12px;
}

.user-chip {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(89, 90, 94, 0.1);
}

.user-chip span,
.record-meta,
.timeline-item span,
.login-hint,
.detail-block p,
.highlight-box p {
  color: var(--muted);
}

.main-panel {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.topbar-card {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(250,250,249,0.92));
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-accent {
  display: inline-block;
  width: 4px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(242, 106, 27, 0.72), rgba(217, 75, 39, 0.56));
  box-shadow: 0 0 0 1px rgba(242, 106, 27, 0.06);
  flex: 0 0 auto;
}

.page-accent-inline {
  height: 38px;
  margin-bottom: 10px;
}

.page-accent-hero {
  position: absolute;
  left: 34px;
  top: 92px;
  height: 72px;
}

.topbar-logo {
  width: 150px;
  max-width: 28vw;
  height: auto;
  display: block;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(89, 90, 94, 0.1);
}

.lang-switch.compact {
  width: fit-content;
}

.lang-switch button {
  min-width: 52px;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-switch button.active {
  background: linear-gradient(135deg, rgba(242, 106, 27, 0.98), rgba(217, 75, 39, 0.94));
  color: white;
}

.language-settings-panel {
  gap: 18px;
}

.language-settings-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 243, 0.9));
}

.language-settings-head h4 {
  margin: 0 0 8px;
  font-size: 1.06rem;
  letter-spacing: 0.02em;
}

.language-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.language-option-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.language-option-card.active {
  border-color: rgba(242, 106, 27, 0.26);
  background: linear-gradient(180deg, rgba(255, 249, 245, 0.98), rgba(255, 255, 255, 0.92));
}

.language-option-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.language-option-code {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.language-option-card h5 {
  margin: 0;
  font-size: 1.15rem;
}

.language-option-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.language-option-badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(246, 239, 234, 0.95);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.language-settings-note {
  padding: 0 2px;
}

.login-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.topbar-meta {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  min-width: 0;
}

.topbar-meta div,
.topbar-rate-field {
  min-width: 110px;
}

.topbar-user-chip {
  min-width: 132px;
  margin-left: 0;
  margin-right: auto;
}

.topbar-user-chip strong {
  margin-right: 8px;
}

.topbar-meta span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topbar-rate-field {
  display: grid;
  gap: 3px;
  justify-items: end;
  text-align: right;
}

.topbar-rate-field input {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  color: var(--text);
  width: 100%;
  max-width: 140px;
  text-align: right;
}

.topbar-rate-field input:focus {
  outline: none;
  box-shadow: none;
}

.exchange-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  width: 100%;
}

.exchange-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.exchange-card span,
.exchange-card small {
  color: var(--muted);
}

.exchange-card span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.exchange-card input {
  min-width: 0;
}

.content-grid,
.stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.settings-signature {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(218, 219, 223, 0.95);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 247, 244, 0.92));
}

.settings-signature-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #666;
  font-size: 13px;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.metric-grid-wide {
  align-items: stretch;
}

.metric-card {
  padding: 20px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.metric-card p {
  margin: 12px 0 0;
  line-height: 1.7;
}

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

.insight-card {
  padding: 18px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,248,246,0.92));
}

.insight-card.accent {
  background: linear-gradient(135deg, rgba(242, 106, 27, 0.98), rgba(217, 75, 39, 0.94));
  color: white;
  box-shadow: 0 14px 28px rgba(242, 106, 27, 0.18);
}

.insight-card span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.insight-card.accent span,
.insight-card.accent p {
  color: rgba(255,255,255,0.86);
}

.insight-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.insight-card p {
  margin: 10px 0 0;
  line-height: 1.6;
  color: #666;
}

.dashboard-chart {
  padding: 18px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,248,246,0.92));
  margin-bottom: 18px;
}

.dashboard-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.dashboard-bar-col {
  display: grid;
  gap: 8px;
  text-align: center;
}

.dashboard-bar-wrap {
  height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(242,106,27,0.06), rgba(217,75,39,0.1));
  padding: 10px;
}

.dashboard-bar {
  width: 100%;
  border-radius: 12px 12px 6px 6px;
  background: linear-gradient(180deg, rgba(242,106,27,0.92), rgba(217,75,39,0.92));
  min-height: 16px;
}

.dashboard-bar-col strong {
  font-size: 13px;
}

.dashboard-bar-col span {
  font-size: 12px;
  color: var(--muted);
}

.dashboard-kpis {
  display: grid;
  gap: 12px;
}

.panel .dashboard-kpis {
  display: none;
}

.dashboard-kpi-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
}

.dashboard-focus-panel,
.dashboard-stage-panel {
  min-width: 0;
}

.dashboard-data-panel {
  grid-column: 1 / -1;
}

.dashboard-focus-count {
  display: inline-flex;
  min-width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(242, 106, 27, 0.1);
  color: var(--accent);
  font-size: 15px;
  font-weight: 900;
}

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

.dashboard-focus-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-focus-row:last-child {
  border-bottom: 0;
}

.dashboard-focus-row > span {
  display: inline-flex;
  justify-content: center;
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(36, 133, 93, 0.1);
  color: #24855d;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-focus-row strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  overflow-wrap: break-word;
  word-break: normal;
}

.dashboard-focus-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.dashboard-stage-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}

.dashboard-stage-row > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-stage-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(242, 106, 27, 0.08);
}

.dashboard-stage-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(242, 106, 27, 0.9), rgba(217, 75, 39, 0.9));
}

.dashboard-stage-row strong {
  color: var(--accent);
  font-size: 14px;
  text-align: right;
}

.dashboard-people-schedule {
  padding: 20px;
}

.dashboard-people-count {
  display: inline-flex;
  min-width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.dashboard-people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.dashboard-people-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.dashboard-people-card:hover,
.dashboard-people-card:focus-visible {
  border-color: rgba(229, 92, 37, 0.26);
  background: rgba(255, 250, 246, 0.94);
  box-shadow: 0 10px 22px rgba(78, 68, 58, 0.08);
  outline: none;
}

.dashboard-people-card.active {
  border-color: rgba(229, 92, 37, 0.44);
  background: rgba(255, 246, 238, 0.98);
  box-shadow: 0 12px 26px rgba(229, 92, 37, 0.12);
}

.dashboard-people-card strong {
  color: var(--text);
  font-size: 14px;
}

.dashboard-people-card span,
.dashboard-people-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-person-detail {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(229, 92, 37, 0.14);
  border-radius: 14px;
  background: rgba(255, 250, 246, 0.72);
}

.dashboard-person-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dashboard-person-detail-head strong {
  color: var(--text);
  font-size: 15px;
}

.dashboard-person-detail-head span,
.dashboard-person-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(229, 92, 37, 0.1);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-person-timeline {
  display: grid;
  gap: 8px;
}

.dashboard-person-schedule-row {
  display: grid;
  grid-template-columns: minmax(108px, 0.35fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(89, 90, 94, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.dashboard-person-schedule-row strong,
.dashboard-person-schedule-row h4 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.dashboard-person-schedule-row span,
.dashboard-person-schedule-row p {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.two-col,
.split-main,
.detail-grid {
  display: grid;
  gap: 18px;
}

.two-col {
  grid-template-columns: 1.05fr 0.95fr;
}

.split-main {
  grid-template-columns: 1.05fr 0.95fr;
}

.split-resizable {
  grid-template-columns: minmax(320px, 1.05fr) 12px minmax(320px, 0.95fr);
  align-items: start;
}

.split-resizable .panel {
  min-width: 0;
}

.split-resizer {
  width: 12px;
  cursor: col-resize;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(242, 106, 27, 0.08), rgba(217, 75, 39, 0.08));
  position: relative;
}

.shell-resizer::before {
  height: 96px;
}

.split-resizer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 72px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(242, 106, 27, 0.55), rgba(217, 75, 39, 0.55));
}

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

.section-head,
.record-top,
.items-header,
.table-actions,
.totals-box,
.pipeline-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.section-head.compact {
  margin-bottom: 0;
}

.record-list,
.timeline,
.pipeline-list,
.attachment-gallery {
  display: grid;
  gap: 12px;
}

.record-card,
.attachment-card,
.detail-block,
.timeline-item,
.pipeline-row,
.highlight-box {
  padding: 16px 18px;
}

.record-card {
  cursor: pointer;
}

.record-card.active {
  border-color: rgba(242, 106, 27, 0.2);
  background: rgba(255, 248, 244, 0.98);
}

.record-card h4 {
  margin-bottom: 8px;
}

.record-top span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(242, 106, 27, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.record-actions-inline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.record-card-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.record-card-actions {
  display: flex;
  gap: 8px;
}

.project-records-workbench {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  max-width: 100%;
  position: relative;
}

.project-records-workbench.project-records-outer-resizable {
  margin-right: auto;
}

.project-records-workbench[data-resizable-ready="true"] {
  gap: 0;
}

.project-records-resizer {
  align-self: stretch;
  min-height: 520px;
}

.project-records-edge-resizer {
  bottom: 18px;
  cursor: ew-resize;
  position: absolute;
  right: -8px;
  top: 18px;
  width: 16px;
  z-index: 8;
}

.project-records-edge-resizer::before {
  background: linear-gradient(180deg, rgba(226, 95, 40, 0.35), rgba(226, 95, 40, 0.7));
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(226, 95, 40, 0.08);
  content: "";
  height: 96px;
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  transition: background 0.15s ease, box-shadow 0.15s ease;
  width: 4px;
}

.project-records-edge-resizer:hover::before,
.project-records-edge-resizer:active::before {
  background: linear-gradient(180deg, rgba(226, 95, 40, 0.6), rgba(211, 74, 39, 0.95));
  box-shadow: 0 0 0 5px rgba(226, 95, 40, 0.12);
}

.project-records-sidebar,
.project-records-main {
  min-width: 0;
}


.project-flow-combined {
  display: grid;
  gap: 14px;
}

.project-flow-taskbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
}

.project-flow-taskbar h3 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 18px;
}

.project-flow-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.project-flow-tabs button {
  min-height: 34px;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.project-flow-tabs button.active {
  background: rgba(242, 106, 27, 0.12);
  color: var(--accent);
}

.project-record-total {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.project-followup-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.project-followup-filter button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.project-followup-filter button.active {
  background: rgba(242, 106, 27, 0.12);
  color: var(--accent);
}

.project-record-project-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.external-project-form {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed rgba(242, 106, 27, 0.34);
  border-radius: 10px;
  background: rgba(255, 248, 244, 0.58);
}

.external-project-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.external-project-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.external-project-form-actions .convert-action {
  border-color: rgba(36, 133, 93, 0.24);
  color: #24855d;
  background: rgba(36, 133, 93, 0.08);
}

.external-project-form input,
.external-project-form select,
.external-project-form textarea {
  width: 100%;
  min-height: 38px;
  border-radius: 8px;
}

.external-project-form .form-field-label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.external-project-form textarea {
  resize: vertical;
}

.external-project-form button {
  justify-self: start;
}

.project-record-project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
}

.project-record-project-card.active {
  border-color: rgba(242, 106, 27, 0.42);
  background: rgba(255, 248, 244, 0.72);
}

.project-record-project-card.has-unread {
  border-color: rgba(220, 68, 42, 0.42);
  box-shadow: 0 10px 24px rgba(220, 68, 42, 0.08);
}

.project-record-project-card.has-mention-me {
  border-color: rgba(36, 133, 93, 0.42);
}

.project-record-project-card.has-unread.has-mention-me {
  border-color: rgba(220, 68, 42, 0.48);
}

.project-record-project-card.external-project-card .project-card-number {
  color: var(--accent);
}

.project-record-project-card span,
.project-record-project-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-card-main {
  min-width: 0;
}

.project-record-project-card h4,
.project-record-project-card p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.project-record-project-card h4 {
  display: -webkit-box;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-record-project-card p {
  color: var(--muted);
  font-size: 13px;
}

.project-record-project-card .project-card-company {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  margin-top: 4px;
}

.project-record-project-card .project-card-detail {
  display: -webkit-box;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-record-project-card .project-card-presales {
  color: #1f6f67;
  font-size: 12px;
  font-weight: 850;
}

.project-record-project-card .project-card-note {
  display: -webkit-box;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-record-card-side {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 8px;
}

.project-record-unread-badge {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #dc442a;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(220, 68, 42, 0.24);
}

.project-record-mention-me-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(36, 133, 93, 0.22);
  border-radius: 999px;
  background: rgba(36, 133, 93, 0.12);
  color: #24855d !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1;
  white-space: nowrap;
}

.complete-action {
  border-color: rgba(36, 133, 93, 0.22);
  color: #24855d;
  background: rgba(36, 133, 93, 0.08);
}

.project-completed-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(36, 133, 93, 0.22);
  border-radius: 9px;
  background: rgba(36, 133, 93, 0.08);
  color: #24855d;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.project-record-project-card strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(242, 106, 27, 0.1);
  color: var(--accent);
  font-size: 14px;
}

.project-record-project-card small {
  white-space: nowrap;
}

.project-records-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: end;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.project-records-hero.simple-records-hero {
  grid-template-columns: 1fr;
}

.project-records-hero h2 {
  margin: 4px 0;
  font-size: 28px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.project-records-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.project-record-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.project-record-metrics div {
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(250, 250, 249, 0.76);
}

.project-record-metrics span,
.project-record-entry-head span,
.project-record-next strong {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.project-record-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.project-record-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.project-record-timeline-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.project-record-timeline-head .complete-action {
  justify-self: end;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  font-weight: 900;
}

.project-record-timeline-head h3 {
  margin: 4px 0 0;
  font-size: 20px;
}

.project-record-timeline-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.project-record-quick-form {
  grid-template-columns: 1fr;
  align-items: stretch;
  padding: 12px;
  border-radius: 10px;
}

.project-record-note-label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.project-record-note-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.project-record-note-label textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
}

.project-record-mention-tip {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.project-record-mention-menu {
  display: grid;
  gap: 4px;
  max-height: 190px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(45, 130, 120, 0.25);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(31, 47, 70, 0.14);
  z-index: 20;
}

.project-record-mention-menu[hidden] {
  display: none;
}

.project-record-mention-menu button {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.project-record-mention-menu button:hover,
.project-record-mention-menu button.active {
  background: rgba(45, 130, 120, 0.12);
}

.project-record-mention-menu strong {
  font-size: 13px;
  font-weight: 950;
}

.project-record-mention-menu span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.project-record-form-top {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(330px, 1.15fr);
  gap: 16px;
  align-items: start;
}

.project-record-quick-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}

.project-record-quick-actions label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.project-record-quick-actions select {
  width: 100%;
  min-height: 38px;
  border-radius: 9px;
}

.project-record-owner-fixed {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(245, 247, 250, 0.82);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.project-record-quick-actions select[multiple] {
  min-height: 92px;
  padding: 6px;
}

.project-record-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-record-mention-field {
  min-width: 0;
}

.project-record-reminder-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(45, 130, 120, 0.18);
  border-radius: 10px;
  background: rgba(45, 130, 120, 0.06);
}

.project-record-reminder-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.project-record-reminder-head strong {
  color: #1f6f67;
  font-size: 13px;
  font-weight: 950;
}

.project-record-reminder-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.project-record-submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.project-record-quick-actions .project-record-complete-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.68);
  color: #24855d;
}

.project-record-complete-check input {
  width: 16px;
  height: 16px;
}

.project-record-attachment-zone {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 176px;
  overflow: hidden;
  padding: 14px 16px;
  border: 1px dashed rgba(232, 95, 35, 0.35);
  border-radius: 10px;
  background: rgba(255, 248, 242, 0.68);
  outline: none;
}

.project-record-attachment-zone:focus,
.project-record-attachment-zone:focus-within,
.project-record-attachment-zone.pasted {
  border-color: rgba(232, 95, 35, 0.75);
  box-shadow: 0 0 0 3px rgba(232, 95, 35, 0.1);
}

.project-record-attachment-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-record-attachment-zone strong {
  color: #e85f23;
  font-size: 14px;
  font-weight: 900;
}

.project-record-attachment-zone span,
.project-record-attachment-zone small,
.project-record-attachment-zone em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.project-record-file-picker {
  cursor: pointer;
  display: block;
  min-width: 0;
}

.project-record-attachment-zone input[type="file"] {
  display: block;
  max-width: 100%;
  font-size: 12px;
  min-width: 0;
  width: 100%;
}

.staged-upload-files {
  display: grid;
  gap: 6px;
  min-height: 0;
  min-width: 0;
}

.staged-upload-file {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(226, 95, 40, 0.18);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  padding: 6px 7px 6px 9px;
  width: 100%;
}

.staged-upload-file span {
  color: inherit;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staged-upload-file button {
  background: rgba(226, 95, 40, 0.08);
  border: 0;
  border-radius: 6px;
  color: #d24b27;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 6px;
}

.staged-upload-file button:hover {
  background: rgba(226, 95, 40, 0.14);
}

.paste-upload-button {
  align-self: center;
  border-color: rgba(226, 95, 40, 0.28);
  color: #d95525;
  font-size: 12px;
  font-weight: 900;
  min-height: 32px;
  padding: 6px 12px;
  white-space: nowrap;
}

.paste-file-zone,
[data-paste-file-target] {
  cursor: text;
  transition: border-color 0.18s ease, background 0.18s ease, outline-color 0.18s ease, box-shadow 0.18s ease;
}

.paste-file-zone:focus,
.paste-file-zone:focus-within,
.paste-file-zone.pasted,
[data-paste-file-target]:focus,
[data-paste-file-target]:focus-within,
[data-paste-file-target].pasted {
  border-color: rgba(232, 95, 35, 0.72);
  outline: 2px solid rgba(232, 95, 35, 0.18);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(232, 95, 35, 0.08);
}

.document-item-import .paste-upload-button,
.document-attachment-panel .paste-upload-button {
  justify-self: end;
}

[data-generic-paste-file-zone] {
  transition: border-color 0.18s ease, background 0.18s ease, outline-color 0.18s ease;
}

[data-generic-paste-file-zone]:focus,
[data-generic-paste-file-zone]:focus-within,
[data-generic-paste-file-zone].pasted {
  outline: 2px solid rgba(232, 95, 35, 0.18);
  outline-offset: 2px;
}

.project-record-textareas {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-record-timeline {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.project-record-timeline-list {
  display: grid;
  gap: 10px;
}

.project-record-timeline-list::before {
  display: none;
}

.project-record-timeline-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  min-height: 62px;
  padding: 10px 0 12px 10px;
  border-left: 3px solid #2d8278;
}

.project-record-date {
  display: grid;
  gap: 5px;
  padding-top: 2px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}

.project-record-timeline-project {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-record-date-value {
  color: var(--muted);
  white-space: nowrap;
}

.project-record-owner {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.project-record-dot {
  display: none;
}

.project-record-entry {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.project-record-entry-head {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: flex-start;
}

.project-record-entry-head span {
  display: none;
}

.project-record-entry h4 {
  margin: 4px 0 0;
  font-size: 17px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.project-record-entry p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.project-record-entry .record-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.project-record-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.project-record-mentions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}

.project-record-mentions strong,
.project-record-mentions span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.project-record-mentions strong {
  color: #d8551c;
  background: #fff1e9;
}

.project-record-mentions span {
  color: #1f6f67;
  background: rgba(45, 130, 120, 0.12);
}

.project-record-replies {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid rgba(45, 130, 120, 0.2);
}

.project-record-reply-list {
  display: grid;
  gap: 8px;
}

.project-record-reply {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 8px;
  background: rgba(250, 250, 248, 0.86);
}

.project-record-reply-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-record-reply-head strong {
  color: #1f6f67;
  font-size: 13px;
}

.project-record-reply p {
  margin: 0;
  white-space: pre-wrap;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.project-record-reply-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-record-reply-item-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.project-record-reply-open {
  width: max-content;
}

.project-record-reply-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(45, 130, 120, 0.2);
  border-radius: 10px;
  background: rgba(245, 250, 248, 0.92);
}

.project-record-reply-form textarea {
  min-height: 88px;
}

.project-record-reply-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.project-record-reply-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  grid-column: 1 / -1;
}

.project-record-attachment {
  display: inline-grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  max-width: min(240px, 100%);
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  font-family: inherit;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

button.project-record-attachment {
  appearance: none;
}

.project-record-attachment img,
.project-record-attachment .file-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.project-record-attachment img {
  object-fit: cover;
}

.project-record-attachment .file-icon {
  display: grid;
  place-items: center;
  background: #fff1e9;
  color: #d8551c;
  font-size: 9px;
  font-weight: 900;
}

.project-record-attachment span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-image-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(20, 22, 28, 0.68);
  backdrop-filter: blur(7px);
}

.attachment-image-preview {
  width: min(1120px, 96vw);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 10px;
  background: #f7f7f4;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.attachment-image-preview.pdf-preview,
.attachment-image-preview.file-preview {
  height: 92vh;
  width: min(1180px, 96vw);
}

.attachment-image-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.attachment-image-preview-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-image-preview-head > div {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.attachment-image-preview-body {
  min-height: 220px;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #202228;
}

.attachment-image-preview-body img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 96px);
  object-fit: contain;
  border-radius: 4px;
}

.attachment-image-preview-body iframe {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  border: 0;
  border-radius: 4px;
  background: #fff;
}

.attachment-email-preview {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  margin: 0;
  overflow: auto;
  border-radius: 4px;
  background: #fff;
  color: #202228;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.55;
  padding: 18px;
  text-align: left;
  white-space: pre-wrap;
}

.attachment-email-preview.unsupported,
.attachment-email-preview.loading {
  display: grid;
  align-content: center;
  gap: 10px;
  font-family: inherit;
  max-width: 720px;
  min-height: 240px;
  text-align: center;
}

.attachment-email-preview.unsupported p {
  margin: 0;
  color: var(--muted);
}

.attachment-file-preview-message {
  display: grid;
  place-items: center;
  gap: 8px;
  width: min(560px, 100%);
  min-height: 220px;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  color: #202228;
  text-align: center;
}

.attachment-file-preview-message strong {
  color: var(--text);
  font-size: 18px;
}

.attachment-file-preview-message p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.project-record-progress {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
}

.project-record-next {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: rgba(242, 106, 27, 0.06);
}

.project-record-next span {
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.action-grid-balanced {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(72px, max-content));
  justify-content: flex-start;
  align-items: start;
  gap: 8px;
}

.record-card-action {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
}

.maintenance-brand-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 4px 2px;
}

.maintenance-brand-card img {
  width: min(360px, 100%);
  max-width: 100%;
  display: block;
}

.maintenance-brand-card h3 {
  margin-bottom: 8px;
}

.maintenance-brand-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.maintenance-brand-card-compact {
  padding-bottom: 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.maintenance-brand-card-compact img {
  width: min(280px, 100%);
}

.maintenance-query-grid {
  margin-top: 12px;
}

.detail-block p {
  margin-bottom: 10px;
  line-height: 1.7;
}

.bullet-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.purchase-order-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.sales-order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.sales-order-grid .span-2 {
  grid-column: span 2;
}

.sales-order-textareas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.paired-textareas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.paired-textareas .span-2 {
  grid-column: span 2;
}

.sales-order-textareas .span-2 {
  grid-column: span 2;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(89, 90, 94, 0.14);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  padding: 12px 14px;
}

input[type="date"] {
  min-height: 46px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  width: 22px;
  height: 22px;
  padding: 4px;
  margin-right: 2px;
  opacity: 0.82;
  cursor: pointer;
}

textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.7;
}

.sales-order-compact textarea {
  min-height: 58px;
}

.sales-order-compact textarea[name="billingAddress"],
.sales-order-compact textarea[name="shippingAddress"],
.sales-order-compact textarea[name="notes"] {
  min-height: 46px;
}

.project-compact-textareas textarea[name="billingAddress"],
.project-compact-textareas textarea[name="siteAddress"],
.project-compact-textareas textarea[name="notes"] {
  min-height: 46px;
}

.hover-preview-textareas textarea {
  overflow: auto;
  transition: min-height 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.hover-preview-textareas textarea:hover,
.hover-preview-textareas textarea:focus {
  min-height: 110px;
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(43, 35, 24, 0.08);
  position: relative;
  z-index: 4;
}

.sales-order-compact label {
  gap: 6px;
}

.sales-order-compact input,
.sales-order-compact select,
.sales-order-compact textarea {
  padding: 10px 12px;
}

.sales-order-compact .section-head {
  margin-bottom: 6px;
}

.sales-order-compact .items-header {
  margin-top: 4px;
}

.document-item-import {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 360px) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(229, 92, 37, 0.18);
  border-radius: 8px;
  background: rgba(229, 92, 37, 0.045);
}

.document-item-import[data-clipboard-import] {
  cursor: text;
  position: relative;
}

.document-item-import[data-clipboard-import]:focus-within,
.document-item-import[data-clipboard-import]:focus {
  border-color: rgba(229, 92, 37, 0.46);
  box-shadow: 0 0 0 4px rgba(229, 92, 37, 0.09);
  outline: none;
}

.document-item-import[data-clipboard-import]::after {
  content: "点击此处后可 Ctrl+V 粘贴截图";
  position: absolute;
  right: 14px;
  bottom: -22px;
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
}

.document-item-import strong {
  display: block;
  color: var(--text);
}

.document-item-import span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.document-item-import input[type="file"] {
  min-height: 40px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.8);
}

.document-import-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.document-import-actions button {
  white-space: nowrap;
}

.document-attachment-strip {
  padding: 10px 12px 12px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.document-attachment-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.document-attachment-strip-head strong {
  color: var(--text);
  font-size: 13px;
}

.document-attachment-strip-head span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(229, 92, 37, 0.1);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.items-header {
  padding: 2px 0 10px;
}

.items-header .actions-row {
  gap: 10px;
}

.items-header .actions-row .ghost {
  background: rgba(255, 248, 242, 0.86);
  border-color: rgba(232, 95, 35, 0.16);
  color: #4b4f58;
}

.items-header .actions-row .ghost:hover {
  color: #d85220;
  box-shadow: 0 10px 18px rgba(232, 95, 35, 0.1);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(242, 106, 27, 0.35);
  box-shadow: 0 0 0 4px rgba(242, 106, 27, 0.08);
}

.date-picker-wrap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.date-picker-text {
  min-width: 0;
  padding-right: 66px;
  font-variant-numeric: tabular-nums;
}

.date-picker-native {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 54px;
  max-width: 54px;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 0 13px 13px 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  text-indent: -9999px;
  box-shadow: none;
  color-scheme: light;
  overflow: hidden;
}

.date-picker-native::-webkit-datetime-edit,
.date-picker-native::-webkit-datetime-edit-fields-wrapper,
.date-picker-native::-webkit-datetime-edit-text,
.date-picker-native::-webkit-datetime-edit-month-field,
.date-picker-native::-webkit-datetime-edit-day-field,
.date-picker-native::-webkit-datetime-edit-year-field,
.date-picker-native::-webkit-date-and-time-value {
  color: transparent;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  font-size: 0;
  line-height: 0;
  width: 0;
  max-width: 0;
  padding: 0;
}

.date-picker-native::-webkit-calendar-picker-indicator {
  width: 26px;
  height: 26px;
  margin: 0 13px 0 0;
  cursor: pointer;
  opacity: 0.86;
}

.date-picker-native:hover::-webkit-calendar-picker-indicator,
.date-picker-native:focus::-webkit-calendar-picker-indicator {
  opacity: 1;
}

.attachment-panel {
  margin-top: 18px;
}

.project-detail-collapsed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 16px 18px;
  border: 1px dashed rgba(232, 95, 35, 0.24);
  border-radius: 16px;
  background: rgba(255, 248, 242, 0.68);
  color: var(--muted);
}

.project-detail-collapsed strong {
  color: var(--text);
}

.solution-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(232, 95, 35, 0.14);
  border-radius: 18px;
  background: rgba(255, 252, 249, 0.82);
}

.solution-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #d85725;
  background: rgba(232, 95, 35, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.solution-version-list {
  display: grid;
  gap: 10px;
}

.solution-version-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(34, 34, 34, 0.08);
  border-radius: 14px;
  background: #fff;
}

.solution-version-head,
.solution-version-head > div,
.solution-file-list {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.solution-version-head {
  justify-content: space-between;
  color: #727780;
  font-size: 12px;
}

.solution-version-head strong {
  color: #30343a;
  font-size: 14px;
}

.solution-version-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #df5b25;
  background: rgba(232, 95, 35, 0.09);
  font-weight: 900;
}

.solution-version-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.solution-version-body div {
  min-width: 0;
}

.solution-version-body span {
  display: block;
  margin-bottom: 5px;
  color: #7a8089;
  font-size: 12px;
  font-weight: 800;
}

.solution-version-body p {
  margin: 0;
  color: #3b4048;
  line-height: 1.55;
  white-space: pre-wrap;
}

.solution-file-list {
  padding-top: 2px;
}

.solution-file-list a,
.solution-file-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

.solution-form {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(34, 34, 34, 0.08);
}

.solution-form-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.solution-form-title span {
  display: block;
  margin-bottom: 4px;
  color: #df5b25;
  font-size: 12px;
  font-weight: 900;
}

.solution-form-title strong {
  color: #2f333a;
}

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

.solution-reference-prompt,
.solution-reference-active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
}

.solution-reference-prompt {
  border: 1px solid rgba(232, 95, 35, 0.18);
  background: rgba(255, 246, 239, 0.78);
}

.solution-reference-active {
  border: 1px solid rgba(69, 144, 94, 0.18);
  background: rgba(238, 250, 242, 0.8);
}

.solution-reference-prompt strong,
.solution-reference-active strong {
  color: #343840;
}

.solution-reference-prompt p,
.solution-reference-active p {
  margin: 4px 0 0;
  color: #747a83;
  font-size: 13px;
}

.attachment-card a,
.attachment-card button {
  appearance: none;
  width: fit-content;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.document-attachment-panel {
  padding: 12px 14px;
  border: 1px solid rgba(89, 90, 94, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.document-attachment-panel .section-head {
  margin-bottom: 10px;
}

.purchase-attachment-panel {
  display: grid;
  gap: 10px;
  border-color: rgba(229, 92, 37, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 246, 0.82));
}

.purchase-attachment-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.purchase-attachment-head h4 {
  margin: 2px 0 0;
}

.purchase-attachment-head > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.document-attachment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 12px;
}

.purchase-attachment-grid {
  grid-template-columns: minmax(320px, 1.15fr) minmax(280px, 0.85fr);
  align-items: end;
}

.document-attachment-grid input[type="file"] {
  padding: 11px 14px;
  min-height: 46px;
}

.document-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

.document-attachment-list a,
.document-attachment-list .muted {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(89, 90, 94, 0.12);
  border-radius: 13px;
  background: rgba(250, 250, 249, 0.92);
  color: var(--text);
  text-decoration: none;
}

.document-attachment-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.document-attachment-row a,
.document-attachment-preview-button {
  max-width: 320px;
}

.document-attachment-preview-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(89, 90, 94, 0.12);
  border-radius: 13px;
  background: rgba(250, 250, 249, 0.92);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

.document-attachment-row img,
.document-attachment-row .file-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 6px;
  object-fit: cover;
}

.document-attachment-row .file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 101, 46, 0.1);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}

.document-attachment-row a > span,
.document-attachment-preview-button > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.document-attachment-row strong,
.document-attachment-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.document-attachment-list span {
  color: var(--muted);
  font-size: 12px;
}

.items-table {
  --items-grid-columns: 88px minmax(170px, 1.45fr) minmax(190px, 1.55fr) minmax(260px, 2.2fr) 96px 120px 126px 68px;
  --items-table-min-width: 1360px;
  display: grid;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(232, 95, 35, 0.18);
  border-radius: 8px;
  background: #fffdfb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.items-table-head,
.items-row {
  display: grid;
  grid-template-columns: var(--items-grid-columns);
  align-items: stretch;
  min-width: var(--items-table-min-width);
}

.items-table-sales .items-table-head,
.items-row-sales {
  grid-template-columns: var(--items-grid-columns);
}

.items-table-sales {
  --items-grid-columns: 44px 88px minmax(170px, 1.45fr) minmax(190px, 1.55fr) minmax(260px, 2.2fr) 96px 120px 126px 68px;
  --items-table-min-width: 1404px;
}

.items-table-head {
  color: #6f5f55;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff8f2 0%, #fff3ea 100%);
  border-bottom: 1px solid rgba(232, 95, 35, 0.2);
}

.items-table-head > span,
.items-row > input,
.items-row > .line-total,
.items-row > button,
.items-row > .items-part-label {
  min-width: 0;
  width: 100%;
  height: 52px;
  min-height: 52px;
  margin: 0;
  border: 0;
  border-left: 1px solid rgba(203, 171, 145, 0.3);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  line-height: 1.2;
}

.items-table-head > span:first-child,
.items-row > input:first-child,
.items-row > button:first-child,
.items-row > .items-part-label:first-child {
  border-left: 0;
}

.items-table-head > span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  font-weight: 800;
  white-space: nowrap;
}

.items-row {
  border-bottom: 1px solid rgba(203, 171, 145, 0.26);
  background: #fff;
  transition: background 0.16s ease;
}

.items-row:last-child {
  border-bottom: 0;
}

.items-row:hover {
  background: #fffaf6;
}

.items-row > input {
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #333842;
}

.items-row > input:focus {
  background: #fff;
  border-color: rgba(203, 171, 145, 0.3);
  box-shadow: inset 0 0 0 2px rgba(242, 106, 27, 0.18);
}

.line-total {
  padding: 0 12px;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  color: #2f343c;
  font-weight: 700;
  background: rgba(255, 248, 242, 0.64);
}

.items-row > button.ghost {
  min-width: 0;
  padding: 0 10px;
  color: #c84f1e;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: none;
  background: rgba(255, 248, 242, 0.64);
}

.items-row > button.ghost:hover {
  transform: none;
  color: #fff;
  background: #e85f23;
}

.items-add-part-btn {
  color: #df5c23;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  background: #fff7f0;
}

.items-add-part-btn:hover {
  color: #fff;
  background: #e85f23;
}

.items-part-row {
  grid-template-columns: var(--items-grid-columns);
  background: #fff7f0;
}

.items-part-row:hover {
  background: #fff1e5;
}

.items-part-row .items-part-label {
  grid-column: 1 / 9;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #b94619;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #fff1e5 0%, #fffaf6 100%);
}

.items-part-row input.items-part-label {
  border-left: 0;
  border-radius: 0;
  cursor: text;
}

.items-part-row input.items-part-label:focus {
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(242, 106, 27, 0.22);
  outline: none;
}

.items-part-row > button.ghost {
  grid-column: 9;
}

.preview-items-part-row td {
  color: #b94619 !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: #fff1e5 !important;
}

.construction-cost-scroll {
  overflow: auto;
  max-height: min(68vh, 720px);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.construction-cost-table {
  min-width: 2600px;
  table-layout: fixed;
}

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

.construction-cost-table th:nth-child(1),
.construction-cost-table td:nth-child(1) { width: 130px; }
.construction-cost-table th:nth-child(2),
.construction-cost-table td:nth-child(2) { width: 190px; }
.construction-cost-table th:nth-child(3),
.construction-cost-table td:nth-child(3) { width: 190px; }
.construction-cost-table th:nth-child(4),
.construction-cost-table td:nth-child(4) { width: 170px; }
.construction-cost-table th:nth-child(5),
.construction-cost-table td:nth-child(5) { width: 150px; }
.construction-cost-table th:nth-child(6),
.construction-cost-table td:nth-child(6) { width: 190px; }
.construction-cost-table th:nth-child(7),
.construction-cost-table td:nth-child(7) { width: 150px; }
.construction-cost-table th:nth-child(8),
.construction-cost-table td:nth-child(8) { width: 190px; }
.construction-cost-table th:nth-child(11),
.construction-cost-table td:nth-child(11) { width: 240px; }
.construction-cost-table th:nth-child(21),
.construction-cost-table td:nth-child(21) { width: 220px; }

.construction-cost-table input,
.construction-cost-table textarea,
.construction-cost-table select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  border-radius: 0;
  padding: 8px 10px;
  box-shadow: none;
  line-height: 1.35;
  display: block;
}

.construction-cost-table textarea {
  resize: none;
  overflow: auto;
}

.construction-cost-table [data-construction-total] {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  white-space: nowrap;
}

.construction-save-btn {
  min-height: 42px;
  border-radius: 8px;
  padding: 8px 14px;
  white-space: nowrap;
}

.construction-cost-cards {
  display: grid;
  gap: 18px;
}

.construction-cost-card {
  border: 1px solid rgba(232, 95, 35, 0.16);
  border-radius: 10px;
  padding: 18px;
  background: #fff;
}

.construction-cost-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(203, 171, 145, 0.28);
}

.construction-cost-card-head span,
.construction-cost-total span {
  color: #e85f23;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.construction-cost-card-head h4 {
  margin: 4px 0;
  font-size: 20px;
  line-height: 1.25;
}

.construction-cost-card-head p {
  margin: 0;
  color: #737b88;
}

.construction-cost-total {
  min-width: 180px;
  text-align: right;
}

.construction-cost-total strong {
  display: block;
  margin-top: 5px;
  color: #d85220;
  font-size: 22px;
}

.construction-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.cost-detail-section {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(190, 197, 208, 0.45);
  border-radius: 8px;
  background: #fffdfb;
}

.cost-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(232, 95, 35, 0.16);
  background: #fff8f2;
}

.cost-section-title h5 {
  margin: 0;
  font-size: 15px;
}

.cost-detail-table {
  overflow-x: auto;
}

.cost-detail-head,
.cost-detail-row {
  display: grid;
  grid-template-columns: var(--cost-columns);
  min-width: 900px;
}

.cost-detail-head span {
  display: flex;
  position: relative;
  min-height: 42px;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid rgba(203, 171, 145, 0.28);
  color: #6f5f55;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.cost-detail-header-cell {
  padding-right: 18px;
}

.cost-column-resizer {
  position: absolute;
  top: 0;
  right: -5px;
  z-index: 3;
  width: 10px;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: col-resize;
  touch-action: none;
}

.cost-column-resizer::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(232, 95, 35, 0.18);
  opacity: 0;
}

.cost-column-resizer:hover::after,
.cost-column-resizer:focus-visible::after,
.is-resizing-cost-column .cost-column-resizer::after {
  opacity: 1;
}

.is-resizing-cost-column {
  cursor: col-resize;
  user-select: none;
}

.cost-detail-row {
  border-top: 1px solid rgba(203, 171, 145, 0.22);
}

.cost-detail-row > input,
.cost-detail-row > span,
.cost-detail-row > button {
  min-height: 44px;
  border: 0;
  border-right: 1px solid rgba(203, 171, 145, 0.24);
  border-radius: 0;
  box-shadow: none;
}

.cost-detail-row > input {
  padding: 0 10px;
  background: #fff;
}

.cost-detail-row > span {
  display: flex;
  align-items: center;
  background: #fff;
}

.cost-detail-row .date-picker-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  width: 100%;
  height: 100%;
}

.cost-detail-row .date-picker-text {
  min-height: 44px;
  padding-right: 8px;
  border: 0;
  border-right: 1px solid rgba(203, 171, 145, 0.2);
  border-radius: 0;
  box-shadow: none;
}

.cost-detail-row .date-picker-native {
  position: static;
  width: 42px;
  max-width: 42px;
  height: 44px;
  border-left: 0;
  border-radius: 0;
}

.cost-detail-row .date-picker-native::-webkit-calendar-picker-indicator {
  margin: 0 10px 0 0;
}

.cost-line-remove {
  color: #c84f1e;
  background: #fff8f2;
}

.construction-total-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.construction-dashboard {
  gap: 16px;
}

.construction-cost-main-panel {
  overflow: hidden;
}

.compact-select-label {
  min-width: 280px;
  max-width: 420px;
}

.compact-select-label select {
  margin-top: 6px;
}

.construction-project-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(232, 95, 35, 0.16);
  border-radius: 8px;
  background: #fff8f2;
}

.construction-project-head span,
.construction-project-row span {
  color: #6f7680;
  font-size: 12px;
  font-weight: 800;
}

.construction-project-head h4 {
  margin: 4px 0;
  font-size: 20px;
}

.construction-project-head p,
.construction-project-row p {
  margin: 0;
  color: #69707b;
}

.construction-project-meta {
  display: grid;
  min-width: 260px;
  gap: 8px;
  align-content: center;
}

.construction-project-meta span {
  padding: 8px 10px;
  border: 1px solid rgba(190, 197, 208, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.cost-total-box {
  border: 1px solid rgba(232, 95, 35, 0.16);
  border-radius: 8px;
  padding: 12px;
  background: #fff8f2;
}

.cost-total-box span {
  display: block;
  color: #737b88;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.cost-total-box strong {
  display: block;
  margin-top: 6px;
  color: #2f343c;
  font-size: 15px;
}

.cost-total-box small {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: #747b86;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-total-box.all strong {
  color: #d85220;
  font-size: 18px;
}

.construction-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.construction-cost-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(190, 197, 208, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.construction-dashboard .split-main {
  margin-top: 16px;
}

.construction-dashboard .split-main > .panel {
  min-width: 0;
}

.construction-dashboard .split-main .construction-cost-section {
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.construction-cost-section h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.construction-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.construction-section-title-row h4 {
  margin: 0;
}

.construction-section-title-row span {
  color: #747b86;
  font-size: 12px;
  font-weight: 800;
}

.construction-category-list {
  display: grid;
  gap: 7px;
}

.construction-category-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto minmax(70px, auto);
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(190, 197, 208, 0.34);
  border-radius: 8px;
  background: #fff;
}

.construction-category-row span {
  min-width: 0;
  overflow: hidden;
  color: #5f6876;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.construction-category-row strong {
  color: #2f343c;
  font-size: 14px;
  white-space: nowrap;
}

.construction-category-row small {
  color: #747b86;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.construction-notes-grid {
  margin-top: 12px;
}

.construction-attachments-section {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.construction-attachments-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.construction-attachments-head h4,
.construction-attachments-head p {
  margin: 0;
}

.construction-attachments-head p {
  color: #747b86;
  font-size: 12px;
  line-height: 1.45;
}

.construction-attachments-head > span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(242, 106, 27, 0.18);
  border-radius: 8px;
  background: rgba(255, 246, 240, 0.86);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.construction-attachment-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(190, 197, 208, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.construction-attachment-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.construction-attachment-group-head strong {
  color: #2f343c;
  font-size: 14px;
}

.construction-attachment-group-head span {
  display: grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: rgba(47, 52, 60, 0.07);
  color: #5f6876;
  font-size: 12px;
  font-weight: 900;
}

.construction-attachment-group > p {
  margin: 0;
  color: #747b86;
  font-size: 12px;
  line-height: 1.45;
}

.construction-attachment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.construction-attachment-item {
  appearance: none;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(190, 197, 208, 0.42);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.construction-attachment-item:hover {
  border-color: rgba(242, 106, 27, 0.38);
  background: rgba(255, 250, 246, 0.96);
}

.construction-attachment-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(242, 106, 27, 0.12);
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
}

.construction-attachment-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.construction-attachment-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.construction-attachment-copy strong,
.construction-attachment-copy em,
.construction-attachment-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.construction-attachment-copy strong {
  color: #2f343c;
  font-size: 13px;
  font-style: normal;
}

.construction-attachment-copy em {
  color: #6b7280;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.construction-attachment-copy small {
  color: #8a9099;
  font-size: 11px;
}

.construction-attachment-date {
  color: #747b86;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.compact-table-scroll {
  max-height: 320px;
}

.construction-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.construction-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.construction-mini-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(190, 197, 208, 0.34);
  border-radius: 8px;
  background: #fff;
}

.construction-mini-grid strong {
  display: block;
  margin-bottom: 6px;
}

.construction-mini-grid p {
  margin: 0;
  color: #69707b;
  line-height: 1.45;
}

.construction-project-list {
  display: grid;
  gap: 10px;
}

.construction-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(190, 197, 208, 0.42);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.construction-project-row.active {
  border-color: rgba(232, 95, 35, 0.45);
  background: #fff8f2;
  box-shadow: inset 3px 0 0 rgba(232, 95, 35, 0.86);
}

.construction-project-row strong {
  display: block;
  margin: 4px 0;
  font-size: 15px;
}

.construction-project-row-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: center;
}

.construction-project-row-stats span {
  padding: 7px 8px;
  border: 1px solid rgba(190, 197, 208, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #59616d;
}

.construction-record-panel {
  overflow: hidden;
}

.construction-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid rgba(232, 95, 35, 0.16);
  border-radius: 8px;
  background: #fff8f2;
}

.construction-record-head span {
  display: block;
  color: #6f7680;
  font-size: 12px;
  font-weight: 800;
}

.construction-record-head strong {
  display: block;
  margin-top: 4px;
  color: #2f343c;
  font-size: 18px;
}

.construction-record-head p {
  margin: 4px 0 0;
  color: #69707b;
}

.construction-record-count {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(242, 106, 27, 0.16);
  border-radius: 999px;
  color: #d45625;
  background: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 800;
}

.construction-record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.construction-record-actions [data-generate-construction-report] {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(232, 95, 35, 0.28);
  background: linear-gradient(135deg, #ff7a22 0%, #e85f23 52%, #d94b27 100%);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(232, 95, 35, 0.24);
}

.construction-record-actions [data-generate-construction-report]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.34), transparent 42%);
  pointer-events: none;
}

.construction-record-actions [data-generate-construction-report]:hover {
  border-color: rgba(232, 95, 35, 0.42);
  box-shadow: 0 16px 28px rgba(232, 95, 35, 0.3);
}

.construction-record-form {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid rgba(190, 197, 208, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.construction-form-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.construction-form-title h4 {
  margin: 2px 0 0;
  font-size: 18px;
}

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

.construction-record-notes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.construction-upload-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  margin-top: 12px;
  align-items: end;
}

.construction-upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 76px;
  justify-content: center;
  border: 1px dashed rgba(232, 95, 35, 0.34);
  border-radius: 8px;
  padding: 12px;
  background: #fff8f2;
  cursor: text;
}

.construction-upload-box:focus,
.construction-upload-box:focus-within,
.construction-upload-box.pasted {
  outline: 2px solid rgba(232, 95, 35, 0.2);
  border-color: rgba(232, 95, 35, 0.72);
  background: #fff3e8;
}

.construction-upload-box span {
  color: #d45625;
  font-weight: 800;
}

.construction-upload-box input[type="file"] {
  width: min(100%, 320px);
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid rgba(106, 116, 128, 0.18);
  border-radius: 8px;
  background: #fff;
}

.construction-upload-box small {
  color: #7a828d;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.construction-record-table table {
  min-width: 1120px;
}

.construction-record-table .mini-action {
  margin-left: 10px;
  white-space: nowrap;
  font-weight: 900;
}

.contractor-info-panel {
  overflow: hidden;
}

.contractor-overview {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid rgba(190, 197, 208, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.contractor-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.contractor-overview-head h4 {
  margin: 2px 0 0;
  color: #2f343c;
  font-size: 20px;
}

.contractor-overview-head > span {
  color: #d45625;
  font-size: 13px;
  font-weight: 900;
}

.contractor-overview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.contractor-overview-actions span {
  color: #d45625;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.compact-action {
  min-height: 38px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.contractor-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.contractor-card {
  display: grid;
  gap: 12px;
  width: 100%;
  min-height: 160px;
  padding: 16px;
  border: 1px solid rgba(190, 197, 208, 0.36);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(48, 41, 32, 0.04);
}

.contractor-card:hover,
.contractor-card.active {
  border-color: rgba(232, 95, 35, 0.48);
  background: #fff8f2;
  box-shadow: inset 3px 0 0 rgba(232, 95, 35, 0.86), 0 12px 26px rgba(232, 95, 35, 0.08);
}

.contractor-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.contractor-card-top strong {
  display: block;
  color: #2f343c;
  font-size: 17px;
}

.contractor-card-top span {
  display: block;
  margin-top: 4px;
  color: #69707b;
  font-size: 12px;
  font-weight: 800;
}

.contractor-card-top em {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.contractor-card-top em.valid {
  color: #23643d;
  background: #eaf8ef;
}

.contractor-card-top em.pending {
  color: #7c5a0d;
  background: #fff8df;
}

.contractor-card-top em.risk {
  color: #9f3412;
  background: #fff1e8;
}

.contractor-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.contractor-card-meta span {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(190, 197, 208, 0.26);
  border-radius: 8px;
  background: rgba(250, 249, 247, 0.92);
  color: #69707b;
  font-size: 12px;
  font-weight: 800;
}

.contractor-card-meta strong {
  display: block;
  margin-top: 3px;
  color: #2f343c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contractor-card p {
  margin: 0;
  color: #69707b;
  font-size: 13px;
  line-height: 1.5;
}

.contractor-overview-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 18px;
  padding: 18px;
  border: 1px dashed rgba(232, 95, 35, 0.28);
  border-radius: 8px;
  background: #fff8f2;
  color: #69707b;
  font-weight: 700;
}

.contractor-overview-empty strong {
  display: block;
  color: #2f343c;
  font-size: 16px;
}

.contractor-overview-empty p {
  margin: 4px 0 0;
  color: #69707b;
  font-weight: 700;
}

.contractor-project-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 14px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid rgba(232, 95, 35, 0.16);
  border-radius: 8px;
  background: #fff8f2;
}

.contractor-project-strip span {
  display: block;
  color: #6f7680;
  font-size: 12px;
  font-weight: 800;
}

.contractor-project-strip strong {
  display: block;
  margin-top: 4px;
  color: #2f343c;
  font-size: 18px;
}

.contractor-project-strip p {
  margin: 4px 0 0;
  color: #69707b;
}

.contractor-form-head,
.contractor-form-collapsed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid rgba(232, 95, 35, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 242, 0.78);
}

.contractor-form-head h4,
.contractor-form-collapsed strong {
  display: block;
  margin: 2px 0 0;
  color: #2f343c;
  font-size: 18px;
}

.contractor-form-collapsed p {
  margin: 4px 0 0;
  color: #69707b;
  font-weight: 700;
}

.contractor-section {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(190, 197, 208, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.contractor-section h4 {
  margin: 0 0 12px;
  color: #2f343c;
  font-size: 16px;
}

.contractor-section .compact-head {
  margin-bottom: 10px;
}

.contractor-section .compact-head p {
  margin: 4px 0 0;
  color: #69707b;
}

.contractor-safety-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.contractor-file-table {
  overflow-x: auto;
  border: 1px solid rgba(190, 197, 208, 0.36);
  border-radius: 8px;
}

.contractor-file-head,
.contractor-file-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(120px, 0.8fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(180px, 1fr);
  min-width: 880px;
}

.contractor-file-head span {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-right: 1px solid rgba(203, 171, 145, 0.28);
  background: #fff8f2;
  color: #6f5f55;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.contractor-file-row {
  border-top: 1px solid rgba(203, 171, 145, 0.22);
}

.contractor-file-row > input,
.contractor-file-row > .date-picker-wrap {
  min-height: 44px;
  border: 0;
  border-right: 1px solid rgba(203, 171, 145, 0.24);
  border-radius: 0;
  box-shadow: none;
}

.contractor-file-row > input {
  padding: 0 10px;
}

.contractor-file-row .date-picker-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  width: 100%;
  height: 100%;
}

.contractor-file-row .date-picker-text,
.contractor-file-row .date-picker-native {
  border-radius: 0;
  box-shadow: none;
}

.contractor-upload-box {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(232, 95, 35, 0.28);
  border-radius: 8px;
  background: #fff8f2;
}

.contractor-upload-box p {
  margin: 0;
  color: #69707b;
  line-height: 1.45;
}

.construction-remarks {
  display: block;
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .construction-summary-grid,
  .construction-total-grid,
  .construction-section-grid,
  .construction-breakdown-grid,
  .construction-mini-grid,
  .construction-attachment-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .construction-cost-card-head {
    flex-direction: column;
  }

  .construction-project-head,
  .construction-project-row,
  .contractor-project-strip {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .contractor-safety-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .construction-cost-total {
    text-align: left;
  }
}

@media (max-width: 780px) {
  .construction-attachment-list,
  .construction-section-grid {
    grid-template-columns: 1fr;
  }

  .construction-attachment-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .construction-attachment-date {
    grid-column: 2;
  }

  .construction-category-row {
    grid-template-columns: 1fr;
  }

  .construction-category-row small {
    text-align: left;
  }
}

.project-operation-scroll {
  overflow: auto;
  max-height: min(68vh, 720px);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.project-operation-table {
  min-width: 1800px;
  table-layout: fixed;
}

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

.project-operation-table th:nth-child(1),
.project-operation-table td:nth-child(1) { width: 130px; }
.project-operation-table th:nth-child(2),
.project-operation-table td:nth-child(2) { width: 210px; }

.project-operation-table input,
.project-operation-table textarea,
.project-operation-table select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  border-radius: 0;
  padding: 8px 10px;
  box-shadow: none;
  line-height: 1.35;
  display: block;
}

.project-operation-table textarea {
  resize: none;
  overflow: auto;
}

.project-operation-table [data-operation-amount] {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  white-space: nowrap;
}

.project-operation-table tr[data-project-card] {
  cursor: pointer;
}

.project-operation-table tr.active-row td {
  background: #fff6ef;
}

.won-projects-table th,
.won-projects-table td {
  white-space: nowrap;
}

.won-record-panel,
.won-detail-panel {
  overflow: hidden;
}

.won-record-list {
  display: grid;
  gap: 0;
  border: 1px solid rgba(190, 197, 208, 0.55);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.won-record-head,
.won-record-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.5fr) minmax(190px, 1.25fr) minmax(150px, 0.9fr) minmax(135px, 0.8fr) minmax(110px, 0.7fr);
  align-items: center;
  column-gap: 18px;
  min-width: 0;
}

.won-record-head {
  min-height: 42px;
  padding: 0 14px;
  background: #f7f8fa;
  color: #737b88;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(190, 197, 208, 0.5);
}

.won-record-row {
  width: 100%;
  min-height: 58px;
  padding: 9px 14px;
  border: 0;
  border-bottom: 1px solid rgba(190, 197, 208, 0.38);
  background: #fff;
  color: #2b3038;
  text-align: left;
  cursor: pointer;
}

.won-record-row:last-child {
  border-bottom: 0;
}

.won-record-row:hover,
.won-record-row.active {
  background: #fff7f0;
}

.won-record-row span,
.won-record-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.won-record-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.won-record-row small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #737b88;
  font-size: 12px;
}

.won-detail-clean {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(190, 197, 208, 0.55);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.won-detail-line {
  min-height: 68px;
  padding: 14px 16px;
  border-right: 1px solid rgba(190, 197, 208, 0.42);
  border-bottom: 1px solid rgba(190, 197, 208, 0.42);
}

.won-detail-line:nth-child(3n) {
  border-right: 0;
}

.won-detail-line span {
  display: block;
  margin-bottom: 8px;
  color: #737b88;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.won-detail-line strong {
  display: block;
  color: #2b3038;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.task-handover-panel {
  overflow: hidden;
}

.task-view-switch {
  display: inline-flex;
  border: 1px solid rgba(190, 197, 208, 0.62);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.task-view-tab {
  border: 0;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 13px;
  color: #5f6672;
  background: transparent;
}

.task-view-tab + .task-view-tab {
  border-left: 1px solid rgba(190, 197, 208, 0.62);
}

.task-view-tab.active {
  background: var(--accent-soft);
  color: #e85f23;
}

.task-view-tab:hover {
  background: rgba(232, 95, 35, 0.08);
}

.task-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.task-create-form .span-2 {
  grid-column: span 2;
}

.task-create-form button {
  align-self: end;
}

.task-board {
  display: grid;
  gap: 14px;
}

.task-card {
  border: 1px solid rgba(190, 197, 208, 0.58);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.task-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.task-number {
  display: inline-flex;
  margin-bottom: 6px;
  color: #e85f23;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.task-stage-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 6px 8px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.task-stage-badge.initiation {
  border: 1px solid rgba(232, 95, 35, 0.2);
  background: rgba(232, 95, 35, 0.08);
  color: #cf5420;
}

.task-stage-badge.confirmed {
  border: 1px solid rgba(39, 103, 177, 0.2);
  background: rgba(39, 103, 177, 0.08);
  color: #2767b1;
}

.task-card h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  color: #2b3038;
}

.task-card p {
  margin: 6px 0 0;
  color: #6f7682;
}

.task-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f3f4f6;
  color: #5f6672;
  font-size: 12px;
  font-weight: 800;
}

.task-status.in-progress {
  background: #eaf4ff;
  color: #2468a6;
}

.task-status.completed {
  background: #eaf8ef;
  color: #237a43;
}

.task-status.passed {
  background: #fff3e9;
  color: #c14d13;
}

.task-ledger-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.task-ledger-dashboard-stacked {
  grid-template-columns: 1fr;
  gap: 12px;
}

.task-ledger-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(27, 31, 35, 0.04);
  overflow: hidden;
}

.task-ledger-section.completed-section {
  grid-column: 1 / -1;
}

.task-calendar-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 30px rgba(27, 31, 35, 0.04);
  overflow: hidden;
}

.task-calendar-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.task-calendar-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.task-calendar-title {
  min-width: 92px;
  margin: 0 8px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.task-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.task-calendar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-weight: 800;
}

.task-calendar-legend-item i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--person-color, var(--accent));
}

.task-calendar-weekdays,
.task-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.task-calendar-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.task-calendar-day {
  min-height: 116px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 12px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.82);
}

.task-calendar-day.has-items {
  border-color: rgba(232, 95, 35, 0.24);
  background: rgba(255, 248, 242, 0.76);
}

.task-calendar-day.has-holiday {
  background: linear-gradient(180deg, rgba(255, 248, 242, 0.88), rgba(255, 255, 255, 0.86));
}

.task-calendar-day.empty-day {
  visibility: hidden;
}

.task-calendar-date-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.task-calendar-date {
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
}

.task-calendar-holidays {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
}

.calendar-holiday-tag {
  max-width: 86px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(232, 95, 35, 0.16);
  background: rgba(232, 95, 35, 0.08);
  color: #c95020;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.35;
}

.calendar-holiday-tag.cn {
  border-color: rgba(89, 90, 94, 0.12);
  background: rgba(89, 90, 94, 0.06);
  color: #646b76;
}

.task-calendar-items {
  display: grid;
  gap: 5px;
  margin-top: 6px;
}

.task-calendar-item {
  display: grid;
  gap: 2px;
  padding: 6px 6px 6px 9px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--person-color, var(--accent)) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--person-color, var(--accent)) 28%, rgba(89, 90, 94, 0.08));
  border-left: 4px solid var(--person-color, var(--accent));
  font-size: 11px;
}

.task-calendar-item.outing {
  background: color-mix(in srgb, var(--person-color, var(--accent)) 14%, #fff);
}

.task-calendar-item.stage-confirmed {
  box-shadow: inset 0 0 0 1px rgba(39, 103, 177, 0.12);
}

.task-calendar-item.stage-initiation {
  box-shadow: inset 0 0 0 1px rgba(232, 95, 35, 0.1);
}

.task-calendar-item.done {
  opacity: 0.62;
}

.task-calendar-item strong {
  color: var(--text);
}

.task-calendar-item span,
.task-calendar-item small {
  color: var(--muted);
  line-height: 1.3;
}

.task-calendar-items em {
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.task-calendar-users {
  display: none;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 14px;
  padding: 12px;
  background: rgba(250, 250, 249, 0.88);
}

.task-calendar-users h5 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 14px;
}

.task-calendar-user-row {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid rgba(89, 90, 94, 0.08);
}

.task-calendar-user-row:first-of-type {
  border-top: 0;
}

.task-calendar-user-row strong {
  color: var(--text);
  font-size: 13px;
}

.task-calendar-user-row span {
  color: var(--muted);
  font-size: 12px;
}

.task-ledger-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 248, 242, 0.96), rgba(250, 250, 249, 0.94));
}

.task-ledger-section-head h4 {
  margin: 0;
  font-size: 17px;
  color: var(--text);
}

.task-ledger-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.task-ledger-section-head > strong {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
}

.task-ledger-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.all-task-card-dashboard {
  display: grid;
  gap: 16px;
}

.all-task-card-section {
  overflow: hidden;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.all-task-card-section.completed {
  border-color: rgba(35, 122, 67, 0.16);
}

.all-task-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 248, 242, 0.96), rgba(250, 250, 249, 0.9));
}

.all-task-card-section.completed .all-task-card-head {
  background: linear-gradient(180deg, rgba(240, 250, 244, 0.96), rgba(250, 250, 249, 0.9));
}

.all-task-card-head h4 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
}

.all-task-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.all-task-card-head > strong {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
}

.all-task-card-section.completed .all-task-card-head > strong {
  background: #237a43;
}

.all-task-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 12px;
  padding: 14px;
}

.all-task-mini-card {
  min-width: 0;
  cursor: pointer;
  border: 1px solid rgba(89, 90, 94, 0.12);
  border-radius: 14px;
  padding: 13px;
  background: #fff;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.all-task-mini-card:hover,
.all-task-mini-card:focus-visible {
  border-color: rgba(232, 95, 35, 0.36);
  box-shadow: 0 12px 24px rgba(32, 34, 38, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.all-task-mini-card.completed {
  border-color: rgba(35, 122, 67, 0.18);
  background: rgba(250, 255, 252, 0.96);
}

.all-task-mini-card.active {
  grid-column: span 2;
  border-color: rgba(232, 95, 35, 0.38);
  background: rgba(255, 250, 246, 0.98);
}

.all-task-mini-card.completed.active {
  border-color: rgba(35, 122, 67, 0.28);
  background: rgba(248, 255, 251, 0.98);
}

.all-task-mini-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.all-task-mini-card h4 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
  word-break: break-word;
}

.all-task-mini-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.all-task-mini-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.all-task-mini-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.all-task-card-hint {
  display: inline-flex;
  margin-top: 11px;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 800;
}

.all-task-mini-detail {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(89, 90, 94, 0.1);
}

.all-task-mini-detail .task-ledger-meta {
  margin-top: 0;
}

@media (max-width: 780px) {
  .all-task-mini-card.active {
    grid-column: span 1;
  }

  .all-task-card-grid,
  .all-task-mini-meta {
    grid-template-columns: 1fr;
  }
}

.task-ledger-card {
  border: 1px solid rgba(89, 90, 94, 0.12);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.task-ledger-card.completed {
  border-color: rgba(35, 122, 67, 0.2);
  background: rgba(250, 255, 252, 0.92);
}

.task-ledger-card .task-number {
  margin-bottom: 4px;
}

.task-completed-notice {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(35, 122, 67, 0.18);
  border-radius: 10px;
  background: #eaf8ef;
  color: #237a43;
  font-size: 13px;
  font-weight: 800;
}

.task-workflow-box {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 95, 35, 0.14);
  border-radius: 10px;
  background: rgba(255, 248, 242, 0.72);
}

.task-workflow-box strong {
  color: var(--accent-deep);
  font-size: 13px;
}

.task-workflow-box span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.task-ledger-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.task-ledger-main h4 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  color: var(--text);
}

.task-ledger-main p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.task-compact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.task-compact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-expanded-desc {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(242, 106, 27, 0.06);
  border-radius: 10px;
  color: var(--text);
}

.task-ledger-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 13px;
}

.task-ledger-meta span {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.task-ledger-meta strong {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.work-log-dashboard {
  display: grid;
  gap: 16px;
}

.work-log-dashboard > .work-log-stats > .work-log-stat:nth-child(1),
.work-log-dashboard > .work-log-stats > .work-log-stat:nth-child(2),
.work-log-dashboard > .task-ledger-section:first-of-type {
  display: none !important;
}

.work-log-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.work-log-stat {
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid rgba(232, 95, 35, 0.16);
  border-radius: 14px;
  background: rgba(255, 250, 247, 0.88);
}

.work-log-stat span {
  display: block;
  color: #717783;
  font-size: 12px;
  font-weight: 800;
}

.work-log-stat strong {
  display: block;
  margin-top: 6px;
  color: #2b3038;
  font-size: 22px;
  line-height: 1.1;
}

.work-log-stat p {
  margin: 6px 0 0;
  color: #7a808a;
  font-size: 12px;
}

.work-log-list {
  display: grid;
  gap: 10px;
}

.work-todo-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(190px, 0.75fr) minmax(180px, 0.75fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.work-todo-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #2f3138;
  font-size: 13px;
  font-weight: 700;
}

.work-todo-form input,
.work-todo-form select {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
}

.work-todo-form select[multiple] {
  min-height: 42px;
  max-height: 42px;
  overflow: auto;
  padding-top: 8px;
  padding-bottom: 8px;
}

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

.work-todo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e8e2de;
  border-radius: 12px;
  background: #fff;
}

.work-todo-row.is-completed {
  opacity: 0.64;
  background: #fafafa;
}

.work-todo-main strong {
  display: block;
  margin-bottom: 4px;
  color: #2f3138;
}

.work-todo-main p,
.work-todo-meta {
  margin: 0;
  color: #727783;
  font-size: 13px;
}

.work-todo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.work-log-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(280px, 1.4fr);
  gap: 14px;
  align-items: center;
  padding: 13px 15px;
  border: 1px solid rgba(89, 90, 94, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.work-log-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(180px, 0.65fr) auto;
  gap: 10px;
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid rgba(89, 90, 94, 0.1);
}

.work-log-form textarea {
  min-height: 74px;
  resize: vertical;
}

.work-log-form select[multiple] {
  min-height: 74px;
  padding: 8px;
}

.work-log-form button {
  min-width: 88px;
  min-height: 40px;
}

.work-log-readonly {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(89, 90, 94, 0.1);
}

.work-log-readonly span {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(246, 247, 249, 0.84);
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
}

.work-log-readonly strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.work-log-row strong {
  display: block;
  color: #2b3038;
}

.work-log-row p {
  margin: 4px 0 0;
  color: #717783;
}

.work-log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.work-log-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(246, 247, 249, 0.95);
  color: #5f6672;
  font-size: 12px;
  font-weight: 700;
}

.task-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(89, 90, 94, 0.1);
}

.site-outing-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
  align-items: start;
}

.site-outing-layout-resizable {
  grid-template-columns: minmax(320px, var(--site-outing-left, 48%)) 12px minmax(360px, 1fr);
  gap: 8px;
}

.site-outing-resizer {
  align-self: stretch;
  min-height: 180px;
  border-radius: 999px;
  cursor: col-resize;
  position: relative;
}

.site-outing-resizer::before {
  content: "";
  position: absolute;
  inset: 12px 4px;
  border-radius: 999px;
  background: rgba(232, 95, 35, 0.16);
  transition: background 0.15s ease, transform 0.15s ease;
}

.site-outing-resizer:hover::before,
.site-outing-resizer.is-dragging::before {
  background: rgba(232, 95, 35, 0.34);
  transform: scaleX(1.3);
}

.site-outing-panel,
.site-outing-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(27, 31, 35, 0.04);
  overflow: hidden;
}

.site-outing-form {
  padding: 16px;
}

.site-outing-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.site-outing-form-grid .span-2 {
  grid-column: 1 / -1;
}

.site-outing-form-grid small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.site-outing-manual-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(223, 92, 35, 0.18);
  border-radius: 14px;
  background: rgba(255, 247, 242, 0.62);
}

.site-outing-manual-project.hidden {
  display: none;
}

.site-outing-associated-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  margin-top: 8px;
  padding: 9px;
  border: 1px dashed rgba(223, 92, 35, 0.24);
  border-radius: 14px;
  background: rgba(255, 247, 242, 0.58);
}

.site-outing-associated-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(223, 92, 35, 0.2);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.site-outing-associated-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-outing-associated-chip button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(223, 92, 35, 0.1);
  color: var(--orange);
  font-size: 16px;
  line-height: 18px;
  cursor: pointer;
}

.site-outing-form .primary {
  width: 100%;
  margin-top: 14px;
}

.site-outing-list {
  display: grid;
  gap: 12px;
  padding: 14px;
  max-height: 680px;
  overflow: auto;
}

.site-outing-card {
  padding: 14px;
  box-shadow: none;
}

.site-outing-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.site-outing-card-head h4 {
  margin: 4px 0 2px;
  font-size: 17px;
  line-height: 1.25;
}

.site-outing-card-head p {
  margin: 0;
  color: var(--muted);
}

.outing-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f4f5f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.outing-status.arrived {
  background: #eef7ff;
  color: #23608f;
}

.outing-status.completed {
  background: #eaf8ef;
  color: #237a43;
}

.outing-status.cancelled {
  background: #f3f4f6;
  color: #777;
}

.site-outing-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 13px;
}

.site-outing-meta span {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.site-outing-meta .span-2 {
  grid-column: 1 / -1;
}

.site-outing-meta strong {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.site-outing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(89, 90, 94, 0.1);
}

.site-outing-shared-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.project-init-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.project-init-stat {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 250, 249, 0.86));
}

.project-init-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.project-init-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--accent-deep);
  font-size: 22px;
  line-height: 1;
}

.project-stats-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.project-stats-summary div {
  padding: 14px 16px;
  border: 1px solid rgba(232, 95, 35, 0.14);
  border-radius: 14px;
  background: rgba(255, 248, 242, 0.76);
}

.project-stats-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-stats-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.project-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.project-stats-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.project-stats-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 248, 242, 0.96), rgba(250, 250, 249, 0.94));
}

.project-stats-head h4 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
}

.project-stats-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.project-stats-head > strong,
.project-stats-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.project-stats-list {
  display: grid;
  gap: 12px;
  padding: 14px;
  max-height: 680px;
  overflow: auto;
}

.project-stats-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) auto minmax(170px, 1fr) minmax(130px, 0.8fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.project-stats-row.staff-row {
  grid-template-columns: minmax(140px, 0.8fr) minmax(240px, 1.6fr) minmax(120px, 0.6fr);
}

.project-stats-row-main span {
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
}

.project-stats-row-main h5 {
  margin: 5px 0;
  color: var(--text);
  font-size: 15px;
}

.project-stats-row-main p,
.project-stats-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.project-stats-detail {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.project-stats-detail.span-2 {
  grid-column: span 1;
}

.project-stats-detail > strong {
  color: var(--text);
  font-size: 12px;
}

.project-stats-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-stats-chips span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(232, 95, 35, 0.1);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 800;
}

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

.project-stats-project-list p {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(250, 250, 249, 0.92);
}

.project-stats-project-list strong {
  color: var(--text);
}

.project-stats-project-list span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.project-init-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.project-init-queue {
  display: grid;
  gap: 12px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.project-init-card {
  border: 1px solid rgba(89, 90, 94, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.project-init-card:hover,
.project-init-card.active {
  border-color: rgba(242, 106, 27, 0.34);
  background: rgba(255, 248, 242, 0.9);
}

.project-init-card.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.project-init-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-init-card-top strong {
  color: var(--accent-deep);
  font-size: 13px;
}

.project-init-card-top h4 {
  margin: 5px 0 0;
  font-size: 17px;
  line-height: 1.25;
}

.project-init-card-top span,
.project-bound-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.project-init-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.project-init-card-actions button {
  min-height: 30px;
  padding: 6px 10px;
}

.project-init-card p {
  margin: 8px 0 0;
  color: var(--text);
}

.project-init-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.project-init-task-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.project-init-task-counts span {
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 10px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.init-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.init-detail-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 26px rgba(27, 31, 35, 0.035);
}

.init-detail-block.span-2 {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.init-detail-block h4 {
  grid-column: 1 / -1;
  margin: 0 0 10px;
  font-size: 15px;
}

.init-detail-block p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 4px;
  width: auto;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
}

.init-detail-block p strong {
  color: var(--text);
  white-space: nowrap;
}

.init-detail-block:nth-child(2) p:first-of-type,
.init-detail-block:nth-child(2) p:nth-of-type(4) {
  grid-column: 1 / -1;
}

.init-detail-block:nth-child(2) p {
  min-width: 0;
}

.init-detail-block.span-2 p {
  width: auto;
}

.init-attachment-block {
  display: block;
  margin-top: 12px;
}

.init-attachment-block p {
  width: auto;
  margin-bottom: 0;
}

.task-project-lock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(242, 106, 27, 0.18);
  border-radius: 14px;
  background: rgba(242, 106, 27, 0.07);
}

.task-project-lock strong {
  color: var(--accent-2);
}

.task-project-lock span {
  color: var(--text);
  font-weight: 700;
  text-align: right;
}

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

.task-meta-grid span {
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(190, 197, 208, 0.45);
  border-radius: 8px;
  color: #2b3038;
}

.task-meta-grid strong {
  display: block;
  margin-bottom: 5px;
  color: #7a808a;
  font-size: 11px;
  text-transform: uppercase;
}

.task-desc {
  margin-top: 12px !important;
  padding: 10px 12px;
  border-left: 3px solid #e85f23;
  background: #fff8f2;
}

.task-actions,
.task-pass-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.task-pass-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(140px, 0.9fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) minmax(110px, 0.7fr) minmax(170px, 1fr) auto;
    align-items: end;
}

.task-history {
  margin-top: 14px;
  border-top: 1px solid rgba(190, 197, 208, 0.5);
  padding-top: 10px;
}

.task-history summary {
  cursor: pointer;
  font-weight: 800;
}

.task-history-line {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8f9fb;
}

.task-history-line span {
  display: block;
  margin-top: 4px;
  color: #858b95;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .won-record-head,
  .won-record-row {
    grid-template-columns: minmax(180px, 1.4fr) minmax(160px, 1fr) minmax(130px, 0.8fr);
  }

  .won-record-head span:nth-child(n+4),
  .won-record-row > span:nth-child(n+4) {
    display: none;
  }

  .won-detail-clean {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .won-detail-line:nth-child(3n) {
    border-right: 1px solid rgba(190, 197, 208, 0.42);
  }

  .won-detail-line:nth-child(2n) {
    border-right: 0;
  }
}

.project-operation-save-btn {
  min-height: 42px;
  border-radius: 8px;
  padding: 8px 14px;
  white-space: nowrap;
}

.project-operation-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  white-space: nowrap;
}

.project-operation-actions button {
  min-height: 42px;
  border-radius: 8px;
  padding: 8px 14px;
}

.project-operation-delete-btn {
  color: var(--danger);
  border-color: rgba(199, 63, 42, 0.28);
  background: rgba(255, 255, 255, 0.96);
}

.project-stats-filter {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1.2fr) minmax(150px, 0.9fr) minmax(150px, 0.9fr) auto;
  gap: 14px;
  align-items: end;
  padding: 14px;
  margin: 0 0 18px;
  border: 1px solid rgba(242, 106, 27, 0.12);
  border-radius: 16px;
  background: rgba(255, 250, 246, 0.74);
}

.project-stats-filter label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.project-stats-filter input {
  min-height: 42px;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
}

.project-stats-filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  white-space: nowrap;
}

.project-stats-filter-actions button {
  min-height: 42px;
  border-radius: 12px;
  padding: 10px 16px;
}

.project-inline-attachment {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(242, 106, 27, 0.12);
  border-radius: 16px;
  background: rgba(255, 250, 246, 0.72);
}

.project-inline-attachment .section-head {
  margin-bottom: 0;
}

.project-inline-attachment label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.project-inline-attachment input[type="file"] {
  min-height: 52px;
  padding: 12px;
}

.project-inline-attachment-note {
  padding: 0;
  text-align: left;
  background: transparent;
}

#projectAttachmentForm,
.attachment-gallery {
  display: none;
}

.init-attachment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-initiation-attachment-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) auto;
  gap: 12px;
  align-items: end;
  margin: 12px 0 14px;
}

.project-initiation-attachment-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.project-initiation-attachment-form input[type="file"] {
  min-height: 46px;
  padding: 10px;
}

.project-initiation-attachment-form button {
  min-height: 46px;
  white-space: nowrap;
}

.project-opportunity-count {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(242, 106, 27, 0.16);
  border-radius: 999px;
  color: #d45625;
  background: rgba(255, 248, 243, 0.86);
  font-size: 13px;
  font-weight: 800;
}

.project-opportunity-stack {
  display: grid;
  gap: 16px;
}

.project-opportunity-form-panel,
.project-opportunity-list-panel {
  width: 100%;
}

.project-opportunity-stack .project-opportunity-grid {
  max-height: none;
  overflow: visible;
  padding: 2px 0;
}

.project-opportunity-grid {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding: 2px 6px 2px 0;
}

.project-opportunity-filter {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr minmax(138px, 0.8fr) minmax(138px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(242, 106, 27, 0.12);
  border-radius: 16px;
  background: rgba(255, 250, 246, 0.68);
}

.project-opportunity-filter label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #5f5a55;
  font-size: 12px;
  font-weight: 800;
}

.project-opportunity-filter input {
  min-height: 40px;
  border-radius: 12px;
}

.project-opportunity-filter-actions {
  display: flex;
  gap: 8px;
}

.project-opportunity-filter-actions button {
  min-height: 40px;
  border-radius: 12px;
  padding: 9px 14px;
  white-space: nowrap;
}

.project-opportunity-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(223, 218, 212, 0.94);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(44, 38, 32, 0.045);
}

.project-opportunity-card.active {
  border-color: rgba(242, 106, 27, 0.28);
  background: rgba(255, 252, 249, 0.98);
}

.project-opportunity-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(320px, 2fr) auto;
  gap: 14px;
  align-items: center;
}

.project-opportunity-number {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-opportunity-card h4 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.project-opportunity-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}

.project-opportunity-quick span,
.project-opportunity-detail span {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-opportunity-quick strong,
.project-opportunity-detail strong {
  color: #5f5a55;
  font-size: 11px;
}

.project-opportunity-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px 14px;
  padding: 12px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(248, 244, 239, 0.78);
  font-size: 13px;
}

.project-opportunity-detail .span-2 {
  grid-column: span 2;
}

.project-opportunity-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.project-opportunity-actions button {
  min-height: 38px;
  border-radius: 12px;
  padding: 8px 12px;
  white-space: nowrap;
}

.confirmed-project-workbench {
  display: grid;
  gap: 16px;
}

.confirmed-project-hero {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(520px, 1.8fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px 26px;
  border: 1px solid rgba(226, 220, 214, 0.88);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(44, 38, 32, 0.08);
}

.confirmed-project-hero h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.12;
}

.confirmed-project-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.confirmed-project-metric {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 13px 14px;
  border: 1px solid rgba(232, 95, 35, 0.13);
  border-radius: 14px;
  background: rgba(255, 250, 246, 0.76);
}

.confirmed-project-metric span,
.confirmed-project-key span,
.confirmed-project-card-grid strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.confirmed-project-metric strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.confirmed-project-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.confirmed-project-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  padding: 2px 6px 2px 0;
}

.confirmed-project-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(223, 218, 212, 0.94);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.confirmed-project-card:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 95, 35, 0.22);
}

.confirmed-project-card.active {
  border-color: rgba(232, 95, 35, 0.38);
  background: rgba(255, 251, 247, 0.98);
  box-shadow: inset 4px 0 0 rgba(232, 95, 35, 0.88);
}

.confirmed-project-card-top,
.confirmed-project-focus-head,
.confirmed-project-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.confirmed-project-card-top span {
  color: #d85725;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.confirmed-project-card-top strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #d85725;
  background: rgba(232, 95, 35, 0.08);
  font-size: 12px;
}

.confirmed-project-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.confirmed-project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.confirmed-project-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.confirmed-project-card-grid span,
.confirmed-project-key,
.confirmed-project-info-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.confirmed-project-focus {
  display: grid;
  gap: 16px;
}

.confirmed-project-focus-head {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(226, 220, 214, 0.72);
}

.confirmed-project-focus-head span {
  color: #d85725;
  font-size: 13px;
  font-weight: 900;
}

.confirmed-project-focus-head h3 {
  margin: 5px 0 4px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.18;
}

.confirmed-project-focus-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.confirmed-project-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.confirmed-project-key-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.confirmed-project-key {
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(232, 95, 35, 0.14);
  border-radius: 14px;
  background: rgba(255, 250, 246, 0.72);
}

.confirmed-project-key strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.confirmed-project-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.confirmed-project-info-grid > div {
  padding: 15px;
  border: 1px solid rgba(226, 220, 214, 0.78);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.confirmed-project-info-grid h4 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 15px;
}

.confirmed-project-info-grid p {
  margin: 3px 0;
  color: var(--muted);
  line-height: 1.5;
}
.confirmed-project-focus-panel,
.confirmed-project-focus,
.confirmed-project-key-grid,
.confirmed-project-info-grid {
  width: 100%;
  min-width: 0;
}

.confirmed-project-focus-panel {
  justify-self: stretch;
  align-self: stretch;
}

.confirmed-project-focus-head > div {
  min-width: 0;
}

.confirmed-project-key strong,
.confirmed-project-info-grid p {
  overflow-wrap: break-word;
  word-break: normal;
}

.confirmed-project-key strong {
  white-space: normal;
}

.confirmed-project-form-panel {
  border-color: rgba(232, 95, 35, 0.18);
}

.confirmed-project-form {
  display: grid;
  gap: 14px;
}

.confirmed-project-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.confirmed-project-form-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.confirmed-project-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.confirmed-project-form input,
.confirmed-project-form textarea {
  border-radius: 14px;
}

.confirmed-project-lower-panel .solution-panel {
  margin-top: 0;
}

.project-execution-panel.collapsed {
  padding-bottom: 18px;
}

.project-execution-toggle-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}

.project-execution-toggle-head h3 {
  margin: 2px 0 0;
}

.project-execution-toggle-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.project-execution-content {
  margin-top: 16px;
}

.confirmed-project-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  color: var(--muted);
  font-weight: 800;
}

.project-delivery-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-delivery-summary span,
.project-delivery-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(232, 95, 35, 0.14);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 248, 242, 0.86);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.project-delivery-list {
  display: grid;
  gap: 10px;
}

.project-delivery-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(232, 95, 35, 0.12);
  border-radius: 14px;
  background: rgba(255, 248, 242, 0.58);
}

.project-delivery-search input {
  width: 100%;
}

.document-register-search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  margin: 6px 0 18px;
  padding: 12px;
  border: 1px solid rgba(232, 95, 35, 0.12);
  border-radius: 16px;
  background: rgba(255, 248, 242, 0.58);
}

.document-register-search-main {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.document-register-date-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.document-register-date-row label {
  display: grid;
  gap: 5px;
  min-width: 164px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.document-register-search input,
.document-register-date-row input {
  width: 100%;
  min-height: 46px;
}

.document-register-date-row .date-picker-native {
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
  min-height: 0;
}

.document-register-export-btn {
  color: var(--accent-strong);
  background: rgba(232, 95, 35, 0.08);
  border-color: rgba(232, 95, 35, 0.12);
}

.document-register-search span {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.project-delivery-card {
  padding: 14px 16px;
  border: 1px solid rgba(223, 218, 212, 0.94);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(44, 38, 32, 0.035);
}

.project-delivery-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(89, 90, 94, 0.1);
}

.project-delivery-number {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-delivery-main h4 {
  margin: 4px 0 3px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.project-delivery-owner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 6px;
  padding: 5px 10px;
  border: 1px solid rgba(232, 95, 35, 0.18);
  border-radius: 999px;
  background: rgba(255, 248, 242, 0.94);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.project-delivery-owner-badge strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.project-delivery-return {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.project-delivery-main p {
  margin: 0;
  color: var(--muted);
}

.project-delivery-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 220px;
}

.project-delivery-directory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 14px;
  align-items: start;
  margin-top: 10px;
}

.project-delivery-directory-grid span {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-delivery-directory-grid strong {
  display: block;
  margin-bottom: 2px;
  color: #5f5a55;
  font-size: 11px;
  font-weight: 800;
}

.project-delivery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px 18px;
  margin-top: 14px;
}

.project-delivery-grid span {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.project-delivery-grid strong {
  display: block;
  margin-bottom: 3px;
  color: #5f5a55;
  font-size: 11px;
  font-weight: 800;
}

.project-delivery-grid .span-2 {
  grid-column: span 2;
}

.project-delivery-edit-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(232, 95, 35, 0.12);
  border-radius: 12px;
  background: rgba(255, 248, 242, 0.48);
}

.project-delivery-edit-form label {
  min-width: 0;
}

.project-delivery-edit-form .span-2 {
  grid-column: span 2;
}

.project-delivery-edit-form button {
  align-self: end;
  min-height: 42px;
}

.project-delivery-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.project-delivery-file {
  appearance: none;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(223, 218, 212, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

.project-delivery-file img,
.project-delivery-file .file-chip {
  width: 54px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(232, 95, 35, 0.1);
}

.project-delivery-file .file-chip {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.project-delivery-file strong,
.project-delivery-file small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-delivery-file small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 980px) {
  .project-delivery-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-delivery-edit-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-delivery-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-delivery-side {
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 620px) {
  .document-register-search,
  .document-register-search-main,
  .project-delivery-search,
  .project-delivery-directory-grid,
  .project-delivery-edit-form,
  .project-initiation-attachment-form {
    grid-template-columns: 1fr;
  }

  .document-register-date-row {
    align-items: stretch;
    flex-direction: column;
  }

  .document-register-date-row span {
    margin-left: 0;
  }

  .project-delivery-edit-form .span-2 {
    grid-column: auto;
  }

  .dashboard-person-detail-head,
  .dashboard-person-schedule-row {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .dashboard-person-status {
    width: fit-content;
  }
}

.totals-box {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,248,243,0.95), rgba(255,252,249,0.98));
  border: 1px solid rgba(242, 106, 27, 0.12);
}

.totals-box > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.totals-box span {
  color: var(--muted);
  margin-right: 8px;
}

.totals-box-deposit {
  gap: 14px;
}

.deposit-percent-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 10px;
}

.deposit-percent-input input {
  width: 90px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(89, 90, 94, 0.14);
  background: rgba(255, 255, 255, 0.96);
  text-align: right;
  font: inherit;
}

.deposit-percent-input em {
  font-style: normal;
  color: var(--muted);
  font-weight: 700;
}

.table-scroll {
  overflow: auto;
  max-height: min(68vh, 720px);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.table-scroll thead th,
.construction-cost-scroll thead th,
.project-operation-scroll thead th,
.receipt-table-scroll thead th,
.customer-ledger-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--panel-strong);
  box-shadow: 0 1px 0 rgba(89, 90, 94, 0.1);
}

.report-center-panel {
  gap: 18px;
}

.report-table-scroll {
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
}

.report-summary-table {
  min-width: 1320px;
}

.report-summary-table th {
  white-space: nowrap;
}

.report-summary-table td {
  vertical-align: top;
}

.report-summary-table td:nth-child(4),
.report-summary-table td:nth-child(5) {
  white-space: nowrap;
  font-weight: 800;
}

.project-report-dashboard {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) repeat(2, minmax(240px, 1fr));
  gap: 16px;
}

.summary-report-dashboard {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) repeat(2, minmax(240px, 1fr));
  gap: 16px;
}

.project-report-card,
.project-report-project {
  border: 1px solid rgba(89, 90, 94, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(48, 41, 32, 0.06);
}

.project-report-card {
  padding: 18px;
}

.project-report-focus {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 239, 0.94));
}

.project-report-card-head,
.project-report-project-head,
.project-report-progress-line > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-report-card-head span,
.project-report-progress-line span,
.project-report-detail span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-report-card-head strong {
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.report-progress {
  width: 100%;
  height: 10px;
  margin: 14px 0 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(89, 90, 94, 0.11);
}

.report-progress span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #e85f23, #d94b27);
}

.project-report-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.project-report-stats span,
.project-report-mini-grid span {
  padding: 10px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 8px;
  background: rgba(250, 249, 247, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.report-distribution {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.report-distribution-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 13px;
}

.report-distribution-row .report-progress {
  height: 8px;
  margin-top: 8px;
}

.project-report-watch {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.project-report-watch > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(89, 90, 94, 0.1);
}

.project-report-watch > div:last-child {
  border-bottom: 0;
}

.project-report-watch span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.project-report-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 16px;
}

.summary-report-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
}

.project-report-project {
  padding: 18px;
}

.project-report-project h4 {
  margin: 6px 0;
  font-size: 20px;
  line-height: 1.35;
}

.project-report-project p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.project-report-project-head > div > span {
  color: #d94b27;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.project-health {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(89, 90, 94, 0.12);
}

.project-health.risk {
  color: #9f3412;
  background: #fff1e8;
  border-color: #ffd5bf;
}

.project-health.active {
  color: #7c5a0d;
  background: #fff8df;
  border-color: #f4dda2;
}

.project-health.done {
  color: #23643d;
  background: #eaf8ef;
  border-color: #c6ebd2;
}

.project-health.normal {
  color: #53606d;
  background: #f4f6f7;
}

.project-report-progress-line {
  margin-top: 16px;
}

.project-report-progress-line strong {
  font-size: 18px;
}

.project-report-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.project-report-mini-grid strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.project-report-detail {
  display: grid;
  gap: 6px;
}

.project-report-detail p + span {
  margin-top: 8px;
}

.summary-report-project {
  display: grid;
  gap: 14px;
}

.summary-money-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.summary-money-grid span {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 8px;
  background: rgba(250, 249, 247, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-money-grid strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  white-space: nowrap;
}

.summary-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.summary-doc-grid span {
  min-width: 0;
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(232, 95, 35, 0.12);
  border-radius: 8px;
  background: #fff8f2;
  color: #69707b;
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
}

.summary-doc-grid strong {
  display: block;
  color: #d94b27;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.report-center-panel {
  display: grid;
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto;
}

.report-center-panel > .section-head {
  margin-bottom: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(89, 90, 94, 0.08);
}

.project-report-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.project-report-metrics .metric-card {
  min-height: 116px;
  padding: 18px 20px;
  border-radius: 8px;
}

.project-report-metrics .metric-card strong {
  margin-top: 12px;
  font-size: 30px;
}

.project-report-metrics .metric-card p {
  min-height: 22px;
  margin-top: 12px;
  line-height: 1.45;
}

.report-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2px;
  padding: 2px 2px 0;
}

.report-section-title.compact {
  margin-top: 4px;
}

.report-section-title span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.report-section-title strong {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.project-report-dashboard {
  grid-template-columns: minmax(320px, 1.15fr) minmax(280px, 0.9fr) minmax(300px, 1fr);
  align-items: stretch;
  gap: 14px;
}

.project-report-card {
  min-height: 190px;
  padding: 18px;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(48, 41, 32, 0.045);
}

.project-report-focus {
  border-color: rgba(232, 95, 35, 0.18);
}

.project-report-card-head strong {
  font-size: 32px;
}

.project-report-card-head span,
.project-report-progress-line span,
.project-report-detail span {
  letter-spacing: 0.06em;
}

.project-report-stats span,
.project-report-mini-grid span {
  min-width: 0;
  border-radius: 8px;
}

.project-report-watch {
  max-height: 128px;
  overflow: auto;
  padding-right: 4px;
}

.project-report-watch > div {
  min-height: 42px;
  padding: 8px 0;
}

.project-report-watch strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-report-board {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: stretch;
  gap: 14px;
}

.project-report-project {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 14px;
  min-height: 360px;
  padding: 18px;
  border-radius: 8px;
}

.project-report-project-head {
  min-height: 98px;
}

.project-report-project-head > div {
  min-width: 0;
}

.project-report-project h4 {
  display: -webkit-box;
  min-height: 54px;
  margin: 6px 0 4px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 19px;
  line-height: 1.35;
}

.project-report-project p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-report-mini-grid {
  margin: 0;
}

.project-report-mini-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-report-detail {
  align-self: start;
  padding-top: 2px;
}

.project-report-detail p {
  color: var(--text);
  font-size: 13px;
}

.table-scroll table.resizable-table {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}

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

th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(79, 63, 41, 0.1);
  text-align: left;
  vertical-align: top;
  min-width: 0;
}

.table-cell-two-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  width: fit-content;
  max-width: 28ch;
  max-height: 2.8em;
  line-height: 1.4;
  overflow: hidden;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.staff-display-cell {
  display: inline-grid;
  gap: 2px;
  max-width: 12ch;
  min-width: 0;
  line-height: 1.35;
  vertical-align: top;
}

.staff-display-cell span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th {
  position: relative;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.column-resize-handle {
  position: absolute;
  top: 8px;
  right: -3px;
  width: 7px;
  height: calc(100% - 16px);
  cursor: col-resize;
  z-index: 5;
  border-right: 2px solid transparent;
  touch-action: none;
}

.column-resize-handle:hover,
.column-resize-handle.is-dragging {
  border-right-color: rgba(226, 94, 39, 0.78);
}

body.is-resizing-columns {
  cursor: col-resize;
  user-select: none;
}

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

.maintenance-order-import {
  align-items: end;
  justify-content: flex-start;
  margin-top: -4px;
}

.maintenance-order-import label {
  flex: 1 1 360px;
  max-width: 560px;
}

.maintenance-order-import select {
  width: 100%;
}

.table-scroll td .table-actions {
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    overflow: visible;
    padding-bottom: 2px;
    width: max-content;
    min-width: 0;
}

.table-scroll td .table-actions button {
  flex: 0 0 auto;
  min-width: 68px;
  min-height: 34px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.1;
    white-space: nowrap;
}

.table-scroll td .table-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
}

.document-status-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.document-lock-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(226, 94, 39, 0.24);
  border-radius: 999px;
  background: rgba(226, 94, 39, 0.08);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.document-lock-action {
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(242, 106, 27, 0.12);
  background: rgba(242, 106, 27, 0.08);
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.document-lock-action:hover {
  background: rgba(242, 106, 27, 0.12);
  box-shadow: 0 8px 18px rgba(242, 106, 27, 0.12);
}

.document-lock-readonly {
  border-style: dashed;
  border-color: rgba(106, 116, 128, 0.24);
  background: rgba(106, 116, 128, 0.08);
  color: #5f6873;
}

.payment-status-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  white-space: nowrap;
}

.payment-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 64px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(106, 116, 128, 0.22);
  background: rgba(106, 116, 128, 0.08);
  color: #5f6873;
  font-size: 12px;
  font-weight: 900;
}

button.payment-status-badge {
  cursor: pointer;
  font-family: inherit;
}

button.payment-status-badge:hover {
  box-shadow: 0 8px 18px rgba(242, 106, 27, 0.12);
  transform: translateY(-1px);
}

.payment-status-badge.paid {
  border-color: rgba(48, 130, 76, 0.24);
  background: rgba(48, 130, 76, 0.1);
  color: #267146;
}

.payment-status-badge.unpaid {
  border-color: rgba(226, 94, 39, 0.22);
  background: rgba(226, 94, 39, 0.08);
  color: var(--accent-strong);
}

.payment-status-badge.partial {
  border-color: rgba(183, 124, 20, 0.26);
  background: rgba(245, 166, 35, 0.12);
  color: #9a640f;
}

.payment-status-badge.pending_review {
  border-color: rgba(92, 112, 146, 0.28);
  background: rgba(92, 112, 146, 0.1);
  color: #4d617f;
}

.payment-status-action {
  display: none !important;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(242, 106, 27, 0.14);
  background: rgba(242, 106, 27, 0.08);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.payment-status-action:hover {
  background: rgba(242, 106, 27, 0.14);
}

.invoice-register-money-cell {
  display: grid;
  gap: 3px;
  min-width: 120px;
  line-height: 1.25;
  white-space: nowrap;
}

.invoice-register-money-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.invoice-register-money-cell strong {
  color: var(--text);
  font-size: 13px;
}

.table-scroll th:last-child,
.table-scroll td:last-child {
    min-width: 220px;
}

.doc-actions-inline {
  justify-content: flex-start;
  align-items: start;
}

.doc-actions-inline button {
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

.sales-order-action-groups {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  width: 390px;
  min-width: 390px;
}

.table-scroll td .sales-order-action-groups.action-grid-balanced {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  width: 390px;
  min-width: 390px;
}

.sales-order-action-groups .action-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.sales-order-action-groups .action-group-generate {
  flex-wrap: nowrap;
}

.sales-order-action-groups .action-group button {
  flex: 0 0 auto;
  justify-content: center;
}

.sales-order-action-groups .action-group-plain button {
  min-width: 72px;
}

.sales-order-action-groups .action-group-generate button {
  min-width: 82px;
  color: #e85f23;
  background: rgba(242, 106, 27, 0.09);
  border-color: rgba(242, 106, 27, 0.12);
}

.table-scroll td:has(.sales-order-action-groups) {
  min-width: 420px;
}

.user-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(89, 90, 94, 0.12);
  border-radius: 18px;
  background: rgba(250, 250, 249, 0.92);
  position: relative;
  overflow: hidden;
}

.account-user-layout {
  display: grid;
  gap: 16px;
}

.user-new-editor {
  display: grid;
}

.user-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 12px;
  align-items: stretch;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.user-wall .user-row {
  grid-column: 1 / -1;
}

.user-name-card {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 5px;
  position: relative;
  padding: 12px 16px;
  border: 1px solid rgba(89, 90, 94, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(55, 43, 35, 0.04);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.user-name-card:hover,
.user-name-card:focus-visible {
  border-color: rgba(232, 95, 35, 0.36);
  box-shadow: 0 14px 30px rgba(55, 43, 35, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.user-name-card-no {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
}

.user-name-card strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
  text-shadow: none;
}

.user-name-card-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.user-puzzle-empty {
  display: none;
}

.new-user-row {
  background: rgba(255, 248, 242, 0.76);
}

.user-collapse-btn {
  min-height: 28px;
  padding: 4px 12px;
  font-size: 12px;
}

.user-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(242, 106, 27, 0.85), rgba(217, 75, 39, 0.75));
}

.user-row:nth-child(even) {
  background: rgba(250, 250, 249, 0.92);
}

.user-row:nth-child(odd) {
  background: rgba(250, 250, 249, 0.92);
}

.user-row-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 2px 2px 8px 6px;
  border-bottom: 1px solid rgba(89, 90, 94, 0.08);
}

.user-row-title {
  display: grid;
  gap: 2px;
}

.user-row-index {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.user-row-title strong {
  font-size: 16px;
}

.user-row-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.user-row-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(89, 90, 94, 0.08);
}

.user-row-badge.role,
.user-row-badge.status {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.user-field {
  padding: 10px 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(89, 90, 94, 0.08);
}

.user-field.identity,
.user-field.security,
.user-field.control,
.user-field.permission {
  background: rgba(255, 255, 255, 0.9);
}

.user-field input,
.user-field select,
.user-field textarea,
.user-field .permission-dropdown {
  margin-top: 8px;
}

.user-password-field small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.password-edit-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.user-field .password-edit-control input {
  margin-top: 0;
}

.password-toggle-btn {
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

.permission-block {
  grid-column: auto;
  padding: 0;
}

.permission-title {
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.permission-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.permission-dropdown {
  border: 1px solid rgba(89, 90, 94, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  overflow: hidden;
}

.permission-dropdown summary {
  list-style: none;
  cursor: pointer;
  min-height: 46px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  color: var(--text);
}

.permission-dropdown summary span {
  font-size: 0.92rem;
}

.permission-dropdown summary::-webkit-details-marker {
  display: none;
}

.permission-dropdown summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
  flex: 0 0 auto;
  margin-left: auto;
}

.permission-dropdown[open] summary::after {
  transform: rotate(-135deg) translateY(-1px);
}

.permission-dropdown .permission-grid {
  padding: 0;
  border-top: 1px solid rgba(89, 90, 94, 0.12);
}

.permission-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(89, 90, 94, 0.1);
  background: #fff;
  cursor: pointer;
}

.permission-grid .permission-chip:last-child {
  border-bottom: 0;
}

.permission-chip input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.permission-chip span {
  font-size: 0.92rem;
  color: var(--text);
}

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

.fatal {
  margin: 24px auto;
  width: min(840px, calc(100vw - 30px));
  padding: 28px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  color: white;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.toast-action {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
  color: white;
  box-shadow: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33, 35, 40, 0.36);
  display: flex;
  justify-content: flex-end;
  z-index: 40;
  backdrop-filter: blur(6px);
}

.preview-drawer {
  width: min(980px, 94vw);
  height: 100vh;
  background: #f3f3f1;
  padding: 20px;
  overflow: auto;
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.12);
}

.preview-drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.table-link-cell {
  display: inline-block;
  max-width: 280px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  text-align: left;
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
  cursor: pointer;
}

.table-link-cell:hover {
  color: var(--accent);
  text-decoration: underline;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  background: rgba(33, 35, 40, 0.32);
  backdrop-filter: blur(6px);
}

.detail-drawer {
  width: min(780px, 94vw);
  height: 100vh;
  overflow: auto;
  padding: 22px;
  background: var(--bg);
  box-shadow: -20px 0 42px rgba(0, 0, 0, 0.14);
}

.detail-drawer-head,
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-only {
  width: 44px;
  min-width: 44px;
  padding-inline: 0;
}

.detail-drawer-head {
  margin-bottom: 16px;
}

.detail-drawer-head h3 {
  margin: 4px 0 0;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.finance-receivable-detail-form {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
}

.receipt-drawer {
  width: min(1220px, 96vw);
  background: #f6f8fb;
}

.receipt-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  margin: 0 0 12px;
  padding: 0 18px;
  border-radius: 999px;
  background: #244fdd;
  color: #fff;
  font-weight: 800;
}

.receipt-head-card {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(260px, 1fr);
  gap: 12px 36px;
  padding: 16px;
  border: 1px solid #d9e0eb;
  border-radius: 10px;
  background: #fff;
}

.receipt-head-card .wide {
  grid-column: 1 / -1;
}

.receipt-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.receipt-tools .ghost.active {
  border-color: #244fdd;
  background: #edf2ff;
  color: #1f45bd;
  font-weight: 900;
}

.receipt-info-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe1ea;
  border-radius: 10px;
  background: #fff;
}

.receipt-info-panel div,
.receipt-info-panel label {
  min-width: 0;
}

.receipt-info-panel span {
  display: block;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.receipt-info-panel strong {
  display: block;
  margin-top: 4px;
  color: #1f2937;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.receipt-agent-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-group-detail {
  display: grid;
  gap: 10px;
}

.finance-receipt-history {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.finance-receipt-history div {
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid #dbe1ea;
  border-radius: 10px;
  background: #fff;
}

.finance-receipt-history .wide {
  grid-column: span 3;
}

.finance-receipt-history span {
  display: block;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.finance-receipt-history strong {
  display: block;
  margin-top: 4px;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.finance-group-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe1ea;
  border-radius: 10px;
  background: #fff;
}

.finance-group-summary div {
  min-width: 0;
}

.finance-group-summary span {
  display: block;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.finance-group-summary strong {
  display: block;
  margin-top: 4px;
  color: #1f2937;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.finance-group-title {
  margin: 2px 0 0;
}

.finance-group-table-scroll {
  max-height: 260px;
  border: 1px solid #dbe1ea;
  border-radius: 10px;
  background: #fff;
}

.finance-group-table {
  min-width: 820px;
}

.finance-group-table th,
.finance-group-table td {
  white-space: nowrap;
}

.finance-group-total-row td {
  background: #f7f8fa;
  font-weight: 900;
}

.finance-group-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.receipt-table-scroll {
  overflow: auto;
  max-height: min(68vh, 720px);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid #d5dce7;
  background: #fff;
}

.receipt-table {
  min-width: 1120px;
  border-collapse: collapse;
}

.receipt-table th,
.receipt-table td {
  border: 1px solid #dbe1ea;
  padding: 0;
  text-align: center;
  vertical-align: middle;
}

.receipt-table th {
  height: 48px;
  background: #f4f6f9;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.receipt-table td {
  height: 54px;
  background: #fff;
}

.receipt-table input {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.receipt-table input:focus {
  background: #fffaf7;
  outline: 2px solid rgba(230, 94, 35, 0.22);
  outline-offset: -2px;
}

.receipt-row-no {
  width: 34px;
  color: var(--muted);
  font-weight: 800;
}

.receipt-total-row td {
  height: 44px;
  background: #f7f8fa;
  font-weight: 900;
}

.detail-actions {
  margin-top: 4px;
}

.preview-sheet-wrap {
  background: white;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
}

.preview-page {
  background: white;
  break-inside: avoid-page;
  page-break-inside: avoid;
}

.preview-doc-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.preview-doc-title h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #878d99;
  text-transform: uppercase;
}

.preview-doc-brand {
  display: flex;
  gap: 18px;
  align-items: center;
}

.preview-doc-brand img {
  width: 260px;
  max-width: 100%;
  height: auto;
}

.preview-doc-title p,
.preview-doc-brand p,
.preview-box p {
  margin-top: 8px;
}

.preview-box {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.preview-table th,
.preview-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

.preview-table th {
  background: #f5f5f5;
  text-align: center;
}

.preview-totals {
  margin-top: 16px;
  width: 320px;
  margin-left: auto;
}

.preview-totals div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid #111;
}

.preview-totals span {
  min-width: 110px;
  text-align: right;
}

.preview-totals strong {
  min-width: 140px;
  text-align: right;
}

.preview-totals-final {
  font-weight: 700;
}

.preview-totals-deposit strong {
  color: #d94827;
}

.preview-page-so {
  font-size: 12px;
  color: #222;
}

.preview-so-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.preview-so-header-compact {
  margin-bottom: 6px;
}

.preview-so-header-compact .preview-so-docmeta {
  margin-top: 0;
}

.preview-so-brand img {
  width: min(84mm, 100%);
  max-width: 100%;
  height: auto;
  display: block;
}

.preview-so-docmeta {
  min-width: 148px;
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
  margin-top: 38px;
}

.preview-so-next-note {
  color: #777;
  font-size: 10px;
  margin-bottom: 2px;
}

.preview-so-doclabel {
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  font-size: 31px;
  line-height: 1.05;
  color: #b3b8c2;
  text-transform: uppercase;
}

.preview-do-doclabel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  line-height: 1.08;
}

.preview-po-doclabel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  line-height: 1.08;
}

.preview-so-page-mark {
  color: #666;
  font-size: 12px;
}

.preview-so-company-block {
  margin-bottom: 10px;
  line-height: 1.45;
}

.preview-so-company-name {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
}

.preview-page-po {
  font-size: 12px;
  color: #222;
}

.preview-page-do {
  font-size: 12px;
  color: #222;
}

.preview-po-order-table,
.preview-po-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  table-layout: fixed;
}

.preview-po-order-table th,
.preview-po-order-table td,
.preview-po-items-table th,
.preview-po-items-table td {
  border: 1px solid #d5d5d5;
  padding: 6px 8px;
  vertical-align: top;
}

.preview-po-order-table th,
.preview-po-items-table th {
  background: #f3f4f6;
  font-weight: 700;
  text-align: left;
  color: #7d6b50;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

.preview-po-items-table th {
  text-align: center;
  vertical-align: middle;
}

.preview-po-order-table th {
  width: 18%;
  font-size: 11px;
}

.preview-po-order-table td {
  font-size: 11px;
  line-height: 1.28;
}

.preview-po-order-table td:nth-child(2) {
  width: 40%;
}

.preview-po-order-table td:nth-child(4) {
  width: 24%;
}

.preview-po-items-table th:nth-child(1),
.preview-po-items-table td:nth-child(1) {
  width: 7%;
  text-align: center;
}

.preview-po-items-table th:nth-child(2),
.preview-po-items-table td:nth-child(2) {
  width: 18%;
}

.preview-po-items-table th:nth-child(3),
.preview-po-items-table td:nth-child(3) {
  width: 20%;
}

.preview-po-items-table th:nth-child(4),
.preview-po-items-table td:nth-child(4) {
  width: 26%;
}

.preview-po-items-table th:nth-child(5),
.preview-po-items-table td:nth-child(5) {
  width: 6%;
  text-align: center;
}

.preview-po-items-table th:nth-child(6) {
  width: 11%;
  text-align: center;
}

.preview-po-items-table td:nth-child(6) {
  width: 11%;
  text-align: right;
}

.preview-po-items-table th:nth-child(7) {
  width: 12%;
  text-align: center;
}

.preview-po-items-table td:nth-child(7) {
  width: 12%;
  text-align: right;
}

.preview-po-items-table thead {
  display: table-header-group;
}

.preview-po-remarks-title {
  margin: 14px 0 8px;
  font-weight: 800;
  color: #222;
}

.preview-do-order-table,
.preview-do-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  table-layout: fixed;
}

.preview-do-order-table th,
.preview-do-order-table td,
.preview-do-items-table th,
.preview-do-items-table td {
  border: 1px solid #d5d5d5;
  padding: 6px 8px;
  vertical-align: top;
}

.preview-do-order-table th,
.preview-do-items-table th {
  background: #f3f4f6;
  font-weight: 700;
  text-align: left;
  color: #7d6b50;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

.preview-do-items-table th {
  text-align: center;
  vertical-align: middle;
}

.preview-do-order-table th {
  width: 18%;
  font-size: 11px;
}

.preview-do-order-table td {
  font-size: 11px;
  line-height: 1.28;
}

.preview-do-order-table td:nth-child(2) {
  width: 40%;
}

.preview-do-order-table td:nth-child(4) {
  width: 24%;
}

.preview-do-items-table th:nth-child(1),
.preview-do-items-table td:nth-child(1) {
  width: 7%;
  text-align: center;
}

.preview-do-items-table th:nth-child(2),
.preview-do-items-table td:nth-child(2) {
  width: 22%;
}

.preview-do-items-table th:nth-child(3),
.preview-do-items-table td:nth-child(3) {
  width: 23%;
}

.preview-do-items-table th:nth-child(4),
.preview-do-items-table td:nth-child(4) {
  width: 36%;
}

.preview-do-items-table th:nth-child(5),
.preview-do-items-table td:nth-child(5) {
  width: 12%;
  text-align: center;
}

.preview-do-items-table thead {
  display: table-header-group;
}

.preview-do-remarks-title {
  margin: 28px 0 12px;
  font-weight: 800;
  color: #f26a1b;
}

.preview-do-terms {
  line-height: 1.5;
}

.preview-do-term-row {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.preview-so-order-table,
.preview-so-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  table-layout: fixed;
}

.preview-so-order-table th,
.preview-so-order-table td,
.preview-so-items-table th,
.preview-so-items-table td {
  border: 1px solid #d5d5d5;
  padding: 6px 7px;
  vertical-align: top;
}

.preview-so-order-table th,
.preview-so-items-table th {
  background: #f3f4f6;
  font-weight: 700;
  text-align: left;
  vertical-align: middle;
}

.preview-so-items-table th {
  text-align: center;
  vertical-align: middle;
}

.preview-so-order-table th {
  font-size: 11px;
  line-height: 1.15;
  letter-spacing: 0.07em;
}

.preview-so-order-table td {
  font-size: 11px;
  line-height: 1.2;
}

.preview-so-order-table th:nth-child(1) {
  width: 14%;
}

.preview-so-order-table td:nth-child(2) {
  width: 44%;
}

.preview-so-order-table th:nth-child(3) {
  width: 18%;
}

.preview-so-order-table td:nth-child(4) {
  width: 24%;
}

.preview-so-items-table th:nth-child(1),
.preview-so-items-table td:nth-child(1) {
  width: 7%;
}

.preview-so-items-table th:nth-child(2),
.preview-so-items-table td:nth-child(2) {
  width: 17%;
}

.preview-so-items-table th:nth-child(3),
.preview-so-items-table td:nth-child(3) {
  width: 36%;
}

.preview-so-items-table th:nth-child(4),
.preview-so-items-table td:nth-child(4) {
  width: 7%;
}

.preview-so-items-table th:nth-child(5),
.preview-so-items-table td:nth-child(5) {
  width: 14%;
}

.preview-so-items-table th:nth-child(6),
.preview-so-items-table td:nth-child(6) {
  width: 19%;
}

.preview-so-items-table td:nth-child(1),
.preview-so-items-table td:nth-child(4) {
  text-align: center;
}

.preview-so-items-table td:nth-child(5),
.preview-so-items-table td:nth-child(6) {
  text-align: right;
}

.preview-so-totals {
  margin-left: auto;
  width: min(72mm, 100%);
  margin-bottom: 14px;
}

.preview-so-totals div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 3px 0;
  border-bottom: 1px solid #111;
}

.preview-so-totals span {
  min-width: 26mm;
  text-align: right;
}

.preview-so-totals strong {
  min-width: 34mm;
  text-align: right;
}

.preview-so-total-row {
  font-weight: 700;
}

.preview-so-deposit-row strong {
  color: #d94827;
}

.preview-so-section-title {
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 6px;
}

.preview-so-terms,
.preview-so-confirmation,
.preview-so-payment {
  margin-bottom: 12px;
}

.preview-so-terms {
  line-height: 1.45;
}

.preview-so-payment-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #d5d5d5;
}

.preview-so-payment-table th,
.preview-so-payment-table td {
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.35;
  vertical-align: top;
  text-align: left;
  border: 1px solid #d5d5d5;
}

.preview-so-payment-table th {
  width: 160px;
  font-weight: 400;
  background: #f3f4f6;
}

.preview-so-payment-table td {
  background: #ffffff;
}

.preview-so-acknowledge-grid {
  display: grid;
  grid-template-columns: 58mm 1fr 58mm;
  gap: 24px;
  align-items: end;
  margin-top: 22px;
}

.preview-so-acknowledge-col {
  width: 58mm;
  min-height: 45mm;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.preview-so-acknowledge-col-sign {
  grid-column: 3;
  align-items: flex-end;
}

.preview-so-acknowledge-col-sign .preview-so-ack-signature,
.preview-so-acknowledge-col-sign .preview-so-ack-line,
.preview-so-acknowledge-col-sign .preview-so-ack-company,
.preview-so-acknowledge-col-sign .preview-so-ack-title {
  width: 100%;
  margin-left: auto;
}

.preview-so-ack-line {
  border-top: 1px solid #999;
  height: 0;
  margin-bottom: 6px;
}

.preview-so-ack-title {
  font-weight: 700;
  color: #222;
}

.preview-so-ack-subtitle {
  margin-top: 2px;
  font-weight: 700;
  color: #222;
}

.preview-so-ack-company {
  margin-top: 4px;
  color: #222;
}

.preview-so-ack-signature {
  min-height: 32mm;
  height: 32mm;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.preview-so-ack-signature-empty {
  visibility: hidden;
}

.preview-so-ack-signature .preview-so-sign-image {
  margin-bottom: 2px;
}

.preview-so-note {
  margin: 2px 0 10px;
  font-size: 11px;
  color: #444;
}

.preview-so-signature {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-top: 22px;
  break-inside: avoid-page;
  page-break-inside: avoid;
}

.preview-so-company {
  color: #666;
  font-weight: 600;
  text-align: center;
}

.preview-so-company-left {
  flex: 1 1 auto;
  text-align: left;
  padding-bottom: 2px;
}

.preview-so-signbox {
  flex: 0 0 auto;
  width: 80mm;
  max-width: 80mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.preview-so-signbox-right {
  margin-left: auto;
}

.preview-so-sign-image {
  display: block;
  max-width: 60mm;
  max-height: 24mm;
  object-fit: contain;
  margin: 0 auto;
}

.preview-so-signline {
  width: 100%;
  border-top: 1px solid #999;
  padding-top: 2px;
  margin-top: -2px;
  color: #555;
  font-weight: 700;
  text-align: center;
}

.preview-generic-signature {
  margin-top: 18px;
}

.preview-so-continued {
  margin-top: 10px;
  text-align: right;
  color: #666;
  font-size: 11px;
}

.toast-info {
  background: #46637b;
}

.toast-success {
  background: #1f745d;
}

.toast-error {
  background: var(--danger);
}

.contact-ledger-layout {
  grid-template-columns: minmax(0, 1fr);
}

.customer-ledger-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.customer-stat-card {
  min-height: 70px;
  padding: 15px 16px;
  border: 1px solid rgba(89, 90, 94, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 250, 249, 0.88));
  box-shadow: 0 10px 26px rgba(27, 31, 35, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.customer-stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.customer-stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.customer-stat-card strong {
  color: var(--accent-deep);
  font-size: 24px;
  line-height: 1;
}

.customer-ledger-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.customer-ledger-scroll {
  width: 100%;
  overflow: auto;
  max-height: min(68vh, 720px);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(27, 31, 35, 0.04);
}

.customer-ledger-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.customer-ledger-table th,
.customer-ledger-table td {
  min-width: 120px;
  max-width: 260px;
  padding: 13px 12px;
  border-right: 1px solid rgba(89, 90, 94, 0.1);
  border-bottom: 1px solid rgba(89, 90, 94, 0.1);
  vertical-align: top;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.customer-ledger-table th {
  background:
    linear-gradient(180deg, rgba(255, 248, 242, 0.96), rgba(250, 250, 249, 0.96));
  color: var(--accent-deep);
  font-weight: 800;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.customer-ledger-table tbody tr {
  cursor: pointer;
}

.customer-ledger-table tbody tr:nth-child(even) {
  background: rgba(89, 90, 94, 0.025);
}

.customer-ledger-table tbody tr:hover,
.customer-ledger-table tbody tr.active {
  background: var(--accent-soft);
}

.customer-ledger-table th:first-child,
.customer-ledger-table td:first-child {
  min-width: 48px;
  width: 48px;
  text-align: center;
}

.customer-ledger-table .company-cell {
  min-width: 220px;
  color: var(--text);
  font-weight: 700;
}

.customer-ledger-table .contact-info-cell {
  min-width: 190px;
  color: var(--muted);
}

.customer-ledger-table .contact-info-cell span {
  display: block;
  line-height: 1.45;
}

.customer-ledger-table .contact-info-cell span:first-child {
  color: var(--text);
  font-weight: 700;
}

.customer-ledger-table .code-cell {
  min-width: 150px;
  color: var(--accent-deep);
  font-weight: 700;
}

.customer-ledger-table .wide-cell {
  min-width: 250px;
}

.customer-ledger-table .customer-level-cell {
  color: var(--accent-2);
  font-weight: 900;
}

.product-wide-panel {
  grid-column: 1 / -1;
}

.content-grid:has(#productForm),
.content-grid:has(.product-wide-panel) {
  min-width: 0;
  overflow-x: hidden;
}

.content-grid:has(#productForm) > .panel,
.content-grid:has(.product-wide-panel) > .panel {
  min-width: 0;
  overflow: hidden;
}

.compact-product-form {
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.product-form-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 0.8fr);
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.product-form-grid label {
  gap: 7px;
  min-width: 0;
}

.product-form-grid input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
}

.embedded-product-query {
  margin-top: 2px;
  padding: 12px 14px 14px;
  border: 1px solid rgba(190, 197, 208, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  min-width: 0;
  overflow: hidden;
}

.embedded-product-query .section-head {
  margin-bottom: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.embedded-product-query .table-scroll {
  max-height: 360px;
  overflow-x: hidden;
  overflow-y: auto;
}

.product-import-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.customer-import-box {
  padding: 14px 16px;
  border: 1px solid rgba(232, 95, 35, 0.16);
  border-radius: 16px;
  background: rgba(255, 248, 242, 0.7);
}

.customer-import-box p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.inline-import-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-import-actions input[type="file"] {
  flex: 1 1 260px;
}

.product-search-actions {
  align-items: center;
  flex: 1 1 360px;
  justify-content: flex-end;
  min-width: 0;
  flex-wrap: wrap;
}

.product-search-actions input {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 440px;
}

.product-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(232, 95, 35, 0.14);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 248, 242, 0.82);
  font-weight: 900;
}

.product-analysis-sections {
  display: grid;
  gap: 16px;
}

.product-analysis-block {
  border: 1px solid rgba(232, 95, 35, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.product-analysis-block .section-head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(89, 90, 94, 0.1);
  background: linear-gradient(180deg, rgba(255, 248, 242, 0.9), rgba(250, 250, 249, 0.86));
}

.product-analysis-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.product-analysis-item {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(89, 90, 94, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.product-analysis-item div {
  min-width: 0;
}

.product-analysis-item strong {
  display: block;
  color: var(--text);
}

.product-analysis-item span {
  display: inline-block;
  margin: 3px 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.product-analysis-table {
  width: 100%;
  border-collapse: collapse;
}

.product-analysis-table th {
  text-align: center;
  vertical-align: middle;
}

.product-analysis-table td {
  vertical-align: middle;
}

.product-analysis-table td:nth-child(3),
.product-analysis-table td:nth-child(4),
.product-analysis-table td:nth-child(5),
.product-analysis-table td:nth-child(6) {
  text-align: right;
}

.product-table th {
  text-align: center;
  vertical-align: middle;
}

.product-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.product-table th,
.product-table td {
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  line-height: 1.35;
}

.product-table th:nth-child(1),
.product-table td:nth-child(1) {
  width: 14%;
}

.product-table th:nth-child(2),
.product-table td:nth-child(2) {
  width: 28%;
}

.product-table th:nth-child(3),
.product-table td:nth-child(3) {
  width: 34%;
}

.product-table th:nth-child(4),
.product-table td:nth-child(4) {
  width: 11%;
}

.product-table th:nth-child(5),
.product-table td:nth-child(5) {
  width: 9%;
}

.product-table th:nth-child(6),
.product-table td:nth-child(6) {
  width: 4%;
}

.table-scroll .product-table th,
.table-scroll .product-table td {
  min-width: 0;
}

.table-scroll .product-table th:last-child,
.table-scroll .product-table td:last-child {
  min-width: 0;
}

.product-table td:nth-child(4) {
  text-align: right;
  white-space: nowrap;
}

.product-table td:nth-child(5) {
  font-size: 12px;
}

.product-table td:nth-child(6) .ghost {
  min-width: 0;
  padding-inline: 8px;
}

.product-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.product-stat-card {
  padding: 16px;
  border: 1px solid rgba(232, 95, 35, 0.12);
  border-radius: 16px;
  background: rgba(255, 252, 249, 0.88);
}

.product-stat-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-stat-card strong {
  color: var(--accent-deep);
  font-size: 20px;
}

.row-index {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(89, 90, 94, 0.18);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
}

.mini-action {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: none;
}

.danger-action {
  color: var(--danger);
}

.collapsed-customer-detail {
  min-height: 140px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 22px;
  border: 1px dashed rgba(89, 90, 94, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.collapsed-customer-detail strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.collapsed-customer-detail span,
.collapsed-customer-detail p {
  color: var(--muted);
}

.collapsed-customer-detail p {
  margin: 0;
}

@media (max-width: 1200px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-record-form-top {
    grid-template-columns: 1fr;
  }

  .project-record-attachment-zone {
    min-height: 150px;
  }

  .split-main,
  .split-main.split-resizable,
  .two-col,
  .shell,
  .shell.split-resizable,
  .login-shell,
  .detail-grid {
    grid-template-columns: 1fr !important;
  }

  .split-resizer {
    display: none;
  }

  .shell.split-resizable,
  .split-main.split-resizable {
    gap: 18px;
  }
}

@media (max-width: 860px) {
  .project-report-dashboard,
  .summary-report-dashboard,
  .summary-report-board,
  .project-report-board {
    grid-template-columns: 1fr;
  }

  .project-report-mini-grid,
  .project-report-stats,
  .summary-money-grid,
  .summary-doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-report-card-head,
  .project-report-project-head,
  .project-report-progress-line > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .contractor-overview-head,
  .contractor-card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .contractor-card-meta {
    grid-template-columns: 1fr;
  }

  .detail-drawer {
    width: 100vw;
    padding: 16px;
  }

  .detail-summary-grid {
    grid-template-columns: 1fr;
  }

  .detail-drawer-head,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .receipt-head-card {
    grid-template-columns: 1fr;
  }

  .receipt-info-panel,
  .receipt-agent-panel,
  .finance-group-summary {
    grid-template-columns: 1fr;
  }

  .receipt-tools,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .shell,
  .login-shell {
    width: min(calc(100vw - 18px), 1440px);
    padding-top: 12px;
  }

  .brand-card,
  .panel,
  .topbar-card {
    padding: 16px;
    border-radius: 16px;
  }

  .brand-card {
    gap: 10px;
    display: flex;
    align-items: center;
  }

  .brand-logo {
    width: min(132px, 44vw);
    max-width: 132px;
    margin-bottom: 0;
    flex: 0 0 auto;
  }

  .brand-card h1 {
    font-size: 20px;
    margin: 0;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-group {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    align-items: stretch;
    scroll-snap-align: start;
  }

  .nav-group.expanded .subnav-list {
    display: flex;
  }

  .subnav-list {
    padding-left: 0;
    gap: 6px;
  }

  .subnav-btn::before {
    display: none;
  }

  .nav-btn,
  .subnav-btn {
    white-space: nowrap;
  }

  .nav-btn,
  button,
  .button-link {
    border-radius: 12px;
    padding: 10px 12px;
  }

  .sidebar-foot {
    gap: 8px;
  }

  .user-chip {
    padding: 10px 12px;
    border-radius: 14px;
  }

  .topbar-card,
  .section-head,
  .items-header,
  .totals-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid,
  .user-row,
  .items-table-head,
  .items-row {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .sales-order-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-order-grid .span-2 {
    grid-column: span 2;
  }

  .sales-order-textareas {
    grid-template-columns: 1fr;
  }

  .sales-order-textareas .span-2 {
    grid-column: span 1;
  }

  .dashboard-insight-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-focus-row,
  .dashboard-stage-row {
    grid-template-columns: 1fr;
  }

  .dashboard-stage-row strong {
    text-align: left;
  }

  .project-stats-filter {
    grid-template-columns: 1fr;
  }

  .customer-ledger-stats,
  .customer-ledger-filter {
    grid-template-columns: 1fr;
  }

  .task-ledger-dashboard,
  .task-ledger-meta,
  .project-init-stats,
  .project-init-task-counts,
  .project-init-search {
    grid-template-columns: 1fr;
  }

  .task-ledger-main,
  .task-row-actions,
  .task-compact-actions,
  .task-project-lock,
  .contractor-overview-head,
  .contractor-overview-actions,
  .contractor-form-head,
  .contractor-form-collapsed,
  .contractor-overview-empty,
  .project-execution-toggle-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-project-lock span {
    text-align: left;
  }

  .project-stats-filter-actions {
    width: 100%;
  }

  .project-stats-filter-actions button {
    flex: 1;
  }

  .project-opportunity-grid {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .project-opportunity-filter,
  .project-opportunity-row,
  .project-opportunity-quick,
  .project-opportunity-detail {
    grid-template-columns: 1fr;
  }

  .project-opportunity-filter-actions {
    width: 100%;
  }

  .project-opportunity-filter-actions button,
  .project-opportunity-actions button {
    flex: 1;
  }

  .product-stats-grid {
    grid-template-columns: 1fr;
  }

  .product-search-actions,
  .product-search-actions input {
    width: 100%;
  }

  .project-opportunity-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .project-opportunity-detail .span-2 {
    grid-column: span 1;
  }

  .confirmed-project-hero,
  .confirmed-project-board,
  .confirmed-project-metrics,
  .confirmed-project-key-grid,
  .confirmed-project-info-grid,
  .confirmed-project-form-grid,
  .confirmed-project-form-notes {
    grid-template-columns: 1fr;
  }

  .confirmed-project-hero {
    padding: 18px;
  }

  .confirmed-project-hero h2 {
    font-size: 24px;
  }

  .confirmed-project-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .confirmed-project-focus-head,
  .confirmed-project-form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .confirmed-project-actions,
  .confirmed-project-actions button,
  .confirmed-project-form-actions,
  .confirmed-project-form-actions button {
    width: 100%;
  }

  .solution-version-body,
  .solution-form-grid {
    grid-template-columns: 1fr;
  }

  .solution-reference-prompt,
  .solution-reference-active,
  .solution-form-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-records-workbench,
  .project-records-hero,
  .project-record-metrics,
  .project-record-textareas,
  .project-record-quick-form,
  .project-record-form-top,
  .project-record-action-grid {
    grid-template-columns: 1fr;
  }

  .project-flow-taskbar {
    align-items: stretch;
    flex-direction: column;
  }

  .project-flow-tabs {
    width: 100%;
  }

  .project-flow-tabs button {
    flex: 1;
  }

  .project-records-workbench[data-resizable-ready="true"] {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .project-records-workbench.project-records-outer-resizable {
    width: auto !important;
  }

  .project-records-edge-resizer,
  .project-records-resizer {
    display: none;
  }

  .project-record-submit-row {
    justify-content: stretch;
  }

  .project-record-submit-row button {
    flex: 1 1 160px;
  }

  .project-record-timeline-list::before {
    display: none;
  }

  .project-record-timeline-item {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
  }

  .project-record-date {
    grid-column: auto;
    padding-top: 0;
    text-align: left;
  }

  .project-record-dot {
    display: none;
  }

  .project-record-entry {
    grid-column: auto;
  }

  .project-record-entry-head {
    align-items: flex-end;
    flex-direction: row;
  }

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

  .exchange-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .topbar-rate-field {
    justify-items: start;
    text-align: left;
  }

  .topbar-rate-field input {
    max-width: none;
    text-align: left;
    font-size: 20px;
  }

  .login-shell {
    min-height: 100svh;
    padding: 12px 0 22px;
    align-content: start;
    align-items: stretch;
    justify-content: stretch;
    gap: 10px;
  }

  .login-panel {
    border-radius: 16px;
  }

  .hero-panel {
    padding: 14px 16px;
  }

  .login-topbar {
    justify-content: flex-end;
    margin-bottom: 6px;
  }

  .hero-logo {
    width: min(260px, 78vw);
    margin-bottom: 0;
  }

  .form-panel {
    padding: 18px 16px;
  }

  .form-panel h2 {
    font-size: 24px;
    line-height: 1.18;
    margin: 4px 0 14px;
  }

  .form-panel .stack {
    gap: 12px;
    max-width: none;
  }

  .form-panel input {
    min-height: 46px;
  }

  .form-panel button.primary {
    width: 100%;
    min-height: 46px;
  }

  .login-hint {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.45;
  }

  .preview-doc-head,
  .preview-doc-brand,
  .preview-drawer-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-outing-layout,
  .site-outing-layout-resizable {
    grid-template-columns: 1fr !important;
  }

  .sales-order-compact,
  .sales-order-compact form,
  .document-item-import,
  .sales-order-grid,
  .sales-order-textareas,
  .items-header,
  .totals-box {
    min-width: 0;
    max-width: 100%;
  }

  .document-item-import {
    grid-template-columns: 1fr;
  }

  .purchase-attachment-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .purchase-attachment-head > span {
    text-align: left;
  }

  .purchase-attachment-grid {
    grid-template-columns: 1fr;
  }

  .sales-order-compact .items-table {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .sales-order-compact .items-table-head {
    display: none;
  }

  .sales-order-compact .items-row {
    display: grid;
    grid-template-columns: 42px 52px minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas:
      "add serial part model"
      "feature feature feature feature"
      "qty qty price total"
      "delete delete delete delete";
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(232, 95, 35, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 18px rgba(43, 35, 24, 0.04);
  }

  .sales-order-compact .items-row > input,
  .sales-order-compact .items-row > .line-total,
  .sales-order-compact .items-row > button,
  .sales-order-compact .items-row > .items-part-label {
    width: 100%;
    height: 42px;
    min-height: 42px;
    margin: 0;
    border: 1px solid rgba(89, 90, 94, 0.12);
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    font-size: 14px;
    line-height: 1.2;
    box-shadow: none;
  }

  .sales-order-compact .items-row > .items-add-part-btn {
    grid-area: add;
    padding: 0;
    font-size: 20px;
    justify-content: center;
  }

  .sales-order-compact .items-row > input[name^="item-serialNo-"] {
    grid-area: serial;
    text-align: center;
    font-weight: 800;
  }

  .sales-order-compact .items-row > input[name^="item-partNumber-"] {
    grid-area: part;
  }

  .sales-order-compact .items-row > input[name^="item-model-"] {
    grid-area: model;
  }

  .sales-order-compact .items-row > input[name^="item-feature-"] {
    grid-area: feature;
  }

  .sales-order-compact .items-row > input[name^="item-quantity-"] {
    grid-area: qty;
  }

  .sales-order-compact .items-row > input[name^="item-unitPrice-"] {
    grid-area: price;
  }

  .sales-order-compact .items-row > .line-total {
    grid-area: total;
    align-items: center;
    justify-content: flex-end;
    color: #2f343c;
    font-weight: 800;
    background: #fff8f2;
  }

  .sales-order-compact .items-row > button[data-remove-item] {
    grid-area: delete;
    justify-self: end;
    width: auto;
    min-width: 88px;
    color: #c84f1e;
    background: rgba(255, 248, 242, 0.86);
  }

  .sales-order-compact .items-part-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas: "part-label delete";
    gap: 8px;
  }

  .sales-order-compact .items-part-row > .items-part-label {
    grid-area: part-label;
    grid-column: auto;
    height: 42px;
    min-height: 42px;
    padding: 8px 12px;
  }

  .sales-order-compact .items-part-row > button[data-remove-item] {
    grid-area: delete;
    grid-column: auto;
    min-width: 76px;
  }

  .site-outing-resizer,
  .column-resize-handle {
    display: none;
  }

  .page-accent-hero {
    left: 24px;
    top: 88px;
    height: 58px;
  }
}

@media (max-width: 430px) {
  .login-shell {
    width: calc(100vw - 12px);
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .hero-panel {
    padding: 12px;
  }

  .form-panel {
    padding: 16px 14px;
  }

  .hero-logo {
    width: min(220px, 72vw);
  }

  .lang-switch {
    width: 100%;
    justify-content: stretch;
  }

  .lang-switch button {
    flex: 1;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
  }

  .exchange-grid,
  .sales-order-grid,
  .finance-ledger-grid,
  .finance-statement-grid,
  .site-outing-form-grid {
    grid-template-columns: 1fr;
  }

  .sales-order-grid .span-2 {
    grid-column: span 1;
  }

  .table-scroll td .table-actions {
    flex-wrap: wrap;
    width: min(100%, 320px);
  }

  .sales-order-action-groups,
  .table-scroll td .sales-order-action-groups.action-grid-balanced {
    width: min(320px, calc(100vw - 64px));
    min-width: 0;
  }

  .sales-order-action-groups .action-group,
  .sales-order-action-groups .action-group-generate {
    flex-wrap: wrap;
  }
}
.hr-outing-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hr-outing-head {
  align-items: flex-start;
  gap: 12px;
}

.hr-outing-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.hr-outing-metric {
  border: 1px solid rgba(218, 98, 45, 0.18);
  border-radius: 8px;
  background: rgba(255, 250, 246, 0.86);
  padding: 16px;
  min-height: 104px;
}

.hr-outing-metric span {
  display: block;
  color: #6e7785;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.hr-outing-metric strong {
  display: block;
  color: #2f343c;
  font-size: 26px;
  line-height: 1.15;
}

.hr-outing-metric p {
  margin: 8px 0 0;
  color: #7b8490;
  font-size: 12px;
}

.hr-outing-filter {
  margin: 0;
}

.hr-outing-filter .document-register-search-main {
  align-items: end;
}

.hr-outing-filter label {
  display: grid;
  gap: 7px;
  min-width: 180px;
  color: #606875;
  font-size: 12px;
  font-weight: 700;
}

.hr-staff-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.hr-staff-card {
  border: 1px solid rgba(27, 32, 41, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #2f343c;
  cursor: pointer;
  min-height: 72px;
  padding: 13px 14px;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.hr-staff-card:hover,
.hr-staff-card.active {
  border-color: rgba(218, 90, 44, 0.78);
  box-shadow: 0 10px 24px rgba(218, 90, 44, 0.1);
}

.hr-staff-card strong,
.hr-staff-card span {
  display: block;
}

.hr-staff-card strong {
  color: #2f343c;
  font-size: 14px;
  margin-bottom: 8px;
}

.hr-staff-card span {
  color: #737c88;
  font-size: 12px;
}

.hr-outing-table-wrap {
  max-height: 58vh;
}

.hr-outing-table td,
.hr-outing-table th {
  min-width: 118px;
  vertical-align: top;
}

.hr-outing-table td:nth-child(2),
.hr-outing-table td:nth-child(6),
.hr-outing-table td:nth-child(7) {
  min-width: 220px;
}

.hr-outing-table td span {
  color: #7a8390;
  font-size: 12px;
}

@media (max-width: 760px) {
  .hr-outing-filter .document-register-search-main {
    align-items: stretch;
  }

  .hr-outing-filter label {
    min-width: 0;
  }

  .hr-staff-strip {
    grid-template-columns: 1fr;
  }
}

/* VECTEN brand system: isolated through body[data-tenant="vecten"]. */
body[data-tenant="vecten"] {
  --bg: #edf4ff;
  --bg-deep: #dce9fb;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(21, 74, 157, 0.14);
  --text: #12254a;
  --muted: #60708a;
  --accent: #1676d2;
  --accent-2: #0c3eaa;
  --accent-soft: rgba(22, 118, 210, 0.1);
  --accent-deep: #082b74;
  --danger: #bd3d4c;
  --shadow: 0 22px 52px rgba(11, 47, 110, 0.12);
  --radius: 18px;
  background:
    radial-gradient(circle at 6% 0%, rgba(103, 191, 255, 0.34), transparent 27%),
    radial-gradient(circle at 100% 100%, rgba(18, 65, 173, 0.16), transparent 30%),
    linear-gradient(150deg, #f8fbff 0%, #e7f0fd 52%, #d9e8fa 100%);
}

body[data-tenant="vecten"] .ambient-a { background: rgba(37, 132, 231, 0.16); }
body[data-tenant="vecten"] .ambient-b { background: rgba(8, 58, 168, 0.13); }
body[data-tenant="vecten"] .ambient-grid {
  background-image: linear-gradient(rgba(13, 74, 160, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(13, 74, 160, 0.055) 1px, transparent 1px);
}

body[data-tenant="vecten"] .vecten-login-shell {
  width: min(1260px, calc(100vw - 44px));
  grid-template-columns: minmax(560px, 1.42fr) minmax(360px, 0.8fr);
  gap: 20px;
}

body[data-tenant="vecten"] .vecten-login-hero,
body[data-tenant="vecten"] .vecten-form-panel {
  min-height: 650px;
  border: 1px solid rgba(51, 122, 215, 0.16);
  overflow: hidden;
}

body[data-tenant="vecten"] .vecten-login-hero {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 28px 34px 34px;
  position: relative;
  background:
    linear-gradient(126deg, rgba(255, 255, 255, 0.98), rgba(233, 244, 255, 0.96) 56%, rgba(194, 222, 255, 0.86)),
    #e7f2ff;
}

body[data-tenant="vecten"] .vecten-hero-orbit {
  position: absolute;
  border: 1px solid rgba(26, 110, 211, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

body[data-tenant="vecten"] .vecten-hero-orbit-a { width: 480px; height: 480px; right: -210px; bottom: -270px; }
body[data-tenant="vecten"] .vecten-hero-orbit-b { width: 340px; height: 340px; right: -126px; bottom: -194px; border-color: rgba(11, 57, 164, 0.2); }

body[data-tenant="vecten"] .login-topbar { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; }
body[data-tenant="vecten"] .vecten-identity-mini,
body[data-tenant="vecten"] .vecten-overline,
body[data-tenant="vecten"] .brand-caption {
  color: #0b4aa8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

body[data-tenant="vecten"] .vecten-login-brand {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: start;
  max-width: 650px;
  padding: 36px 4.5% 12px;
}

body[data-tenant="vecten"] .vecten-hero-logo {
  width: min(460px, 80%);
  max-height: 275px;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 38px;
}

body[data-tenant="vecten"] .vecten-login-copy { max-width: 540px; }
body[data-tenant="vecten"] .vecten-overline { margin: 0 0 14px; }
body[data-tenant="vecten"] .vecten-login-copy h1 {
  max-width: 520px;
  color: #092d77;
  font-size: clamp(40px, 4.2vw, 66px);
  letter-spacing: -0.055em;
  line-height: 0.96;
  margin-bottom: 18px;
}
body[data-tenant="vecten"] .vecten-login-copy > p:last-child { max-width: 450px; color: #536987; font-size: 16px; line-height: 1.75; }

body[data-tenant="vecten"] .vecten-form-panel {
  align-content: center;
  justify-items: stretch;
  text-align: left;
  padding: 54px 46px;
  background: linear-gradient(156deg, #0a2a75 0%, #08215e 52%, #061945 100%);
  box-shadow: 0 30px 60px rgba(6, 37, 98, 0.25);
}
body[data-tenant="vecten"] .vecten-form-head { display: flex; align-items: flex-start; gap: 16px; }
body[data-tenant="vecten"] .vecten-form-mark { width: 5px; height: 52px; border-radius: 9px; background: linear-gradient(#72c8ff, #176ed4); box-shadow: 0 0 24px rgba(98, 193, 255, 0.52); }
body[data-tenant="vecten"] .vecten-form-panel .card-label { color: #83ccff; }
body[data-tenant="vecten"] .vecten-form-panel h2 { color: #fff; font-size: 32px; margin-top: 8px; }
body[data-tenant="vecten"] .vecten-form-intro { margin: 30px 0 28px; color: #a7bfec; font-size: 14px; font-weight: 650; }
body[data-tenant="vecten"] .vecten-login-form { max-width: none; gap: 18px; }
body[data-tenant="vecten"] .vecten-login-form label { color: #d3e1fb; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; }
body[data-tenant="vecten"] .vecten-login-form input {
  min-height: 52px;
  margin-top: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(186, 216, 255, 0.22);
  box-shadow: none;
}
body[data-tenant="vecten"] .vecten-login-form input:focus { border-color: #75c5ff; box-shadow: 0 0 0 4px rgba(67, 165, 242, 0.16); }
body[data-tenant="vecten"] .vecten-login-submit { display: flex; justify-content: space-between; align-items: center; min-height: 54px; margin-top: 14px; background: linear-gradient(135deg, #45a8f5, #1763d5); box-shadow: 0 16px 30px rgba(0, 7, 66, 0.3); }
body[data-tenant="vecten"] .vecten-login-submit span { font-size: 23px; line-height: 0; }
body[data-tenant="vecten"] .vecten-form-panel .lang-switch { background: rgba(255, 255, 255, 0.1); border-color: rgba(255,255,255,0.14); }

body[data-tenant="vecten"] .vecten-shell { width: min(1580px, calc(100vw - 34px)); display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) !important; gap: 20px; }
body[data-tenant="vecten"] .vecten-sidebar { position: sticky; top: 22px; max-height: calc(100vh - 44px); overflow: auto; padding: 14px; border: 1px solid rgba(88, 158, 255, 0.16); border-radius: 22px; background: linear-gradient(165deg, #092862, #061944 62%, #051432); box-shadow: 0 22px 46px rgba(5, 34, 87, 0.22); }
body[data-tenant="vecten"] .vecten-sidebar::-webkit-scrollbar { width: 6px; }
body[data-tenant="vecten"] .vecten-sidebar::-webkit-scrollbar-thumb { background: rgba(141, 199, 255, 0.32); border-radius: 999px; }
body[data-tenant="vecten"] .vecten-brand-card { position: relative; overflow: hidden; padding: 18px; border-color: rgba(255,255,255,0.64); background: linear-gradient(145deg, #ffffff, #dcecff); box-shadow: none; }
body[data-tenant="vecten"] .vecten-brand-card::after { content: ""; position: absolute; right: -35px; bottom: -50px; width: 145px; height: 145px; border: 22px solid rgba(21, 100, 206, 0.1); border-radius: 50%; }
body[data-tenant="vecten"] .vecten-brand-card .brand-logo { position: relative; z-index: 1; width: 176px; max-height: 110px; object-fit: contain; object-position: left center; margin: 0; }
body[data-tenant="vecten"] .vecten-brand-card .brand-caption { position: relative; z-index: 1; margin-top: 12px; font-size: 9px; }
body[data-tenant="vecten"] .vecten-brand-card h1 { display: none; }
body[data-tenant="vecten"] .vecten-sidebar .nav-list { gap: 7px; }
body[data-tenant="vecten"] .vecten-sidebar .nav-btn { color: #dbe8ff; background: transparent; border-color: transparent; border-radius: 12px; }
body[data-tenant="vecten"] .vecten-sidebar .nav-btn:hover { background: rgba(134, 196, 255, 0.1); }
body[data-tenant="vecten"] .vecten-sidebar .nav-btn.active { background: linear-gradient(102deg, #1975dc, #1b55c5); border-color: rgba(132, 206, 255, 0.34); box-shadow: 0 12px 24px rgba(0,0,0,0.2); }
body[data-tenant="vecten"] .vecten-sidebar .subnav-btn { color: #98b4e2; }
body[data-tenant="vecten"] .vecten-sidebar .subnav-btn.active { color: #fff; background: rgba(81, 162, 242, 0.16); border-color: rgba(112, 189, 255, 0.14); }
body[data-tenant="vecten"] .vecten-sidebar .subnav-btn::before { background: rgba(158, 202, 255, 0.43); }
body[data-tenant="vecten"] .vecten-sidebar .subnav-btn.active::before { background: #7bcbff; }
body[data-tenant="vecten"] .vecten-sidebar .user-chip { color: #eaf2ff; background: rgba(255,255,255,0.08); border-color: rgba(187, 219, 255, 0.12); }
body[data-tenant="vecten"] .vecten-sidebar .user-chip span { color: #9db6dc; }
body[data-tenant="vecten"] .vecten-sidebar .ghost { color: #d8e7ff; border-color: rgba(184, 216, 255, 0.22); }
body[data-tenant="vecten"] .vecten-sidebar .lang-switch { background: rgba(255,255,255,0.08); border-color: rgba(184, 216, 255, 0.13); }
body[data-tenant="vecten"] .vecten-sidebar .lang-switch button { color: #a9c1e7; }
body[data-tenant="vecten"] .vecten-sidebar .lang-switch button.active { background: #247ad6; color: #fff; }

body[data-tenant="vecten"] .panel,
body[data-tenant="vecten"] .topbar-card,
body[data-tenant="vecten"] .metric-card,
body[data-tenant="vecten"] .record-card,
body[data-tenant="vecten"] .detail-block,
body[data-tenant="vecten"] .highlight-box { border-color: rgba(27, 95, 183, 0.13); background: linear-gradient(145deg, rgba(255,255,255,0.97), rgba(242,248,255,0.92)); }
body[data-tenant="vecten"] .topbar-card { min-height: 84px; border-radius: 18px; }
body[data-tenant="vecten"] .topbar-brand h2 { color: #0a347f; font-size: clamp(23px, 2.5vw, 32px); letter-spacing: -0.035em; }
body[data-tenant="vecten"] button.primary { background: linear-gradient(135deg, #228ae5, #124ab9); box-shadow: 0 12px 26px rgba(20, 91, 193, 0.22); }
body[data-tenant="vecten"] button.secondary { color: #0d60bf; background: rgba(27, 113, 209, 0.1); }
body[data-tenant="vecten"] .page-accent { background: linear-gradient(180deg, #5cc0ff, #0d46af); box-shadow: 0 0 0 1px rgba(27, 118, 216, 0.12); }
body[data-tenant="vecten"] input:focus, body[data-tenant="vecten"] textarea:focus, body[data-tenant="vecten"] select:focus { border-color: #318de5; box-shadow: 0 0 0 4px rgba(49, 141, 229, 0.12); }
body[data-tenant="vecten"] .table-scroll thead th { background: #0b3c91; }
body[data-tenant="vecten"] .table-scroll tbody tr:hover { background: #eef6ff; }

@media (max-width: 920px) {
  body[data-tenant="vecten"] .vecten-login-shell { grid-template-columns: 1fr; width: min(680px, calc(100vw - 28px)); }
  body[data-tenant="vecten"] .vecten-login-hero, body[data-tenant="vecten"] .vecten-form-panel { min-height: auto; }
  body[data-tenant="vecten"] .vecten-login-hero { min-height: 470px; }
  body[data-tenant="vecten"] .vecten-shell { grid-template-columns: 1fr; }
  body[data-tenant="vecten"] .vecten-sidebar { position: static; max-height: none; }
}

@media (max-width: 560px) {
  body[data-tenant="vecten"] .vecten-login-shell { width: calc(100vw - 16px); gap: 10px; }
  body[data-tenant="vecten"] .vecten-login-hero { padding: 20px; min-height: 430px; }
  body[data-tenant="vecten"] .vecten-login-brand { padding: 22px 0 0; }
  body[data-tenant="vecten"] .vecten-hero-logo { width: min(330px, 92%); margin-bottom: 26px; }
  body[data-tenant="vecten"] .vecten-login-copy h1 { font-size: 40px; }
  body[data-tenant="vecten"] .vecten-form-panel { padding: 34px 24px; }
  body[data-tenant="vecten"] .vecten-shell { width: calc(100vw - 16px); }
}
/* VECTEN responsive application shell. This overrides the shared legacy shell at tablet widths. */
@media (max-width: 1200px) {
  body[data-tenant="vecten"] .vecten-shell {
    width: min(920px, calc(100vw - 24px));
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
  }

  body[data-tenant="vecten"] .vecten-sidebar {
    position: static;
    top: auto;
    max-height: none;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    padding: 14px;
  }

  body[data-tenant="vecten"] .vecten-brand-card {
    grid-row: span 2;
    min-height: 100%;
  }

  body[data-tenant="vecten"] .vecten-brand-card .brand-logo {
    width: min(172px, 100%);
  }

  body[data-tenant="vecten"] .vecten-sidebar .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 6px 10px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
  }

  body[data-tenant="vecten"] .vecten-sidebar .nav-group {
    min-width: 0;
  }

  body[data-tenant="vecten"] .vecten-sidebar .nav-btn {
    min-height: 42px;
    padding: 10px 12px;
  }

  body[data-tenant="vecten"] .vecten-sidebar .subnav-list {
    padding-left: 10px;
  }

  body[data-tenant="vecten"] .vecten-sidebar .sidebar-foot {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  body[data-tenant="vecten"] .vecten-sidebar .sidebar-foot .lang-switch,
  body[data-tenant="vecten"] .vecten-sidebar .sidebar-foot .user-chip,
  body[data-tenant="vecten"] .vecten-sidebar .sidebar-foot .ghost {
    margin: 0;
  }

  body[data-tenant="vecten"] .vecten-sidebar .sidebar-foot .user-chip {
    flex: 1;
    min-width: 0;
  }

  body[data-tenant="vecten"] .vecten-sidebar .sidebar-foot .ghost {
    width: auto;
    white-space: nowrap;
  }

  body[data-tenant="vecten"] .vecten-shell .main-panel {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 680px) {
  body[data-tenant="vecten"] .vecten-shell {
    width: calc(100vw - 16px);
  }

  body[data-tenant="vecten"] .vecten-sidebar {
    grid-template-columns: 1fr;
  }

  body[data-tenant="vecten"] .vecten-brand-card {
    grid-row: auto;
  }

  body[data-tenant="vecten"] .vecten-sidebar .nav-list {
    grid-template-columns: 1fr;
    max-height: 260px;
  }

  body[data-tenant="vecten"] .vecten-sidebar .sidebar-foot {
    grid-column: auto;
    flex-wrap: wrap;
  }

  body[data-tenant="vecten"] .vecten-sidebar .sidebar-foot .user-chip {
    min-width: min(100%, 220px);
  }
}
/* VECTEN design tokens and component skins.
   Tenant scope is mandatory: shared components retain their own INNOLUX theme. */
body[data-tenant="vecten"] {
  --vecten-navy: #081f59;
  --vecten-blue-900: #0b3c91;
  --vecten-blue-700: #146dc9;
  --vecten-blue-500: #3f9eed;
  --vecten-blue-200: #cfe7ff;
  --vecten-blue-100: #eaf5ff;
  --vecten-surface: #ffffff;
  --vecten-surface-soft: #f5f9ff;
  --vecten-surface-muted: #edf5ff;
  --vecten-border: rgba(20, 86, 178, 0.14);
  --vecten-border-strong: rgba(26, 111, 205, 0.28);
  --vecten-shadow: 0 14px 32px rgba(9, 48, 116, 0.10);
  --vecten-shadow-hover: 0 20px 38px rgba(9, 48, 116, 0.16);
  --accent: var(--vecten-blue-700);
  --accent-2: var(--vecten-blue-900);
  --accent-soft: rgba(20, 109, 201, 0.10);
  --accent-deep: var(--vecten-navy);
  --line: var(--vecten-border);
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --text: #142850;
  --muted: #5e7090;
  --shadow: var(--vecten-shadow);
}

/* Shared card primitives */
body[data-tenant="vecten"] .panel,
body[data-tenant="vecten"] .topbar-card,
body[data-tenant="vecten"] .metric-card,
body[data-tenant="vecten"] .record-card,
body[data-tenant="vecten"] .attachment-card,
body[data-tenant="vecten"] .detail-block,
body[data-tenant="vecten"] .highlight-box,
body[data-tenant="vecten"] .timeline-item,
body[data-tenant="vecten"] .pipeline-row,
body[data-tenant="vecten"] .insight-card,
body[data-tenant="vecten"] .dashboard-chart,
body[data-tenant="vecten"] .dashboard-kpi-row,
body[data-tenant="vecten"] .contractor-overview-empty,
body[data-tenant="vecten"] .staged-upload-file {
  border-color: var(--vecten-border);
  background: linear-gradient(145deg, var(--vecten-surface) 0%, var(--vecten-surface-soft) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), var(--vecten-shadow);
}

body[data-tenant="vecten"] .panel:hover,
body[data-tenant="vecten"] .metric-card:hover,
body[data-tenant="vecten"] .record-card:hover,
body[data-tenant="vecten"] .insight-card:hover {
  border-color: var(--vecten-border-strong);
  box-shadow: inset 0 1px 0 #fff, var(--vecten-shadow-hover);
}

body[data-tenant="vecten"] .metric-card {
  position: relative;
  overflow: hidden;
}

body[data-tenant="vecten"] .metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--vecten-blue-500), var(--vecten-blue-900));
}

body[data-tenant="vecten"] .metric-card span,
body[data-tenant="vecten"] .insight-card span,
body[data-tenant="vecten"] .card-label,
body[data-tenant="vecten"] .dashboard-chart-head span {
  color: #356aa9;
}

body[data-tenant="vecten"] .metric-card strong,
body[data-tenant="vecten"] .insight-card strong,
body[data-tenant="vecten"] .dashboard-chart-head strong,
body[data-tenant="vecten"] .dashboard-kpi-row strong {
  color: var(--vecten-navy);
}

/* Dashboard: all data cards, highlights, bars, and empty states */
body[data-tenant="vecten"] .insight-card.accent {
  border-color: rgba(61, 151, 233, 0.44);
  background: linear-gradient(135deg, #1978d9 0%, #0c429c 100%);
  box-shadow: 0 16px 30px rgba(11, 64, 156, 0.24);
}

body[data-tenant="vecten"] .insight-card.accent span,
body[data-tenant="vecten"] .insight-card.accent strong,
body[data-tenant="vecten"] .insight-card.accent p {
  color: #fff;
}

body[data-tenant="vecten"] .insight-card.accent span,
body[data-tenant="vecten"] .insight-card.accent p {
  color: rgba(235, 246, 255, 0.88);
}

body[data-tenant="vecten"] .dashboard-focus-count,
body[data-tenant="vecten"] .dashboard-focus-row > span,
body[data-tenant="vecten"] .status-chip,
body[data-tenant="vecten"] .record-tag,
body[data-tenant="vecten"] .task-stage-badge {
  color: #0c5cb6;
  border-color: rgba(32, 121, 211, 0.18);
  background: rgba(48, 142, 229, 0.11);
}

body[data-tenant="vecten"] .dashboard-stage-bar {
  background: rgba(28, 119, 213, 0.12);
}

body[data-tenant="vecten"] .dashboard-stage-bar i,
body[data-tenant="vecten"] .dashboard-bar {
  background: linear-gradient(90deg, #42a7f2, #0b459e);
}

body[data-tenant="vecten"] .dashboard-bar-wrap {
  border: 1px solid rgba(35, 121, 210, 0.09);
  background: linear-gradient(180deg, rgba(216, 238, 255, 0.72), rgba(240, 248, 255, 0.92));
}

body[data-tenant="vecten"] .dashboard-chart,
body[data-tenant="vecten"] .dashboard-data-panel {
  background: linear-gradient(145deg, #ffffff 0%, #f1f7ff 100%);
}

body[data-tenant="vecten"] .dashboard-focus-panel,
body[data-tenant="vecten"] .dashboard-stage-panel {
  border-color: var(--vecten-border);
  background: linear-gradient(145deg, #ffffff, #f2f8ff);
}

body[data-tenant="vecten"] .empty,
body[data-tenant="vecten"] .confirmed-project-empty,
body[data-tenant="vecten"] .contractor-overview-empty {
  color: #587092;
  border-color: rgba(28, 112, 203, 0.14);
  background: linear-gradient(145deg, #f7fbff, #edf6ff);
}

/* Interaction components that previously used INNOLUX orange */
body[data-tenant="vecten"] button.primary,
body[data-tenant="vecten"] .nav-btn.active,
body[data-tenant="vecten"] .lang-switch button.active {
  background: linear-gradient(135deg, #319cf0, #0d479f);
  box-shadow: 0 12px 24px rgba(10, 71, 159, 0.22);
}

body[data-tenant="vecten"] button.secondary,
body[data-tenant="vecten"] .subnav-btn.active,
body[data-tenant="vecten"] .project-flow-tabs button.active,
body[data-tenant="vecten"] .project-followup-filter button.active,
body[data-tenant="vecten"] .record-card.active,
body[data-tenant="vecten"] .project-record-project-card.active {
  color: #0b59b4;
  border-color: rgba(27, 111, 204, 0.22);
  background: rgba(48, 143, 230, 0.10);
}

body[data-tenant="vecten"] .page-accent,
body[data-tenant="vecten"] .split-resizer::before {
  background: linear-gradient(180deg, #62bcff, #0a3d91);
}

body[data-tenant="vecten"] .split-resizer,
body[data-tenant="vecten"] .project-record-attachment-zone,
body[data-tenant="vecten"] [data-paste-file-target],
body[data-tenant="vecten"] [data-generic-paste-file-zone] {
  border-color: rgba(28, 112, 203, 0.24);
  background: rgba(242, 249, 255, 0.86);
}

body[data-tenant="vecten"] .project-record-attachment-zone:focus-within,
body[data-tenant="vecten"] .project-record-attachment-zone.pasted,
body[data-tenant="vecten"] [data-paste-file-target]:focus-within,
body[data-tenant="vecten"] [data-paste-file-target].pasted,
body[data-tenant="vecten"] [data-generic-paste-file-zone]:focus-within,
body[data-tenant="vecten"] [data-generic-paste-file-zone].pasted {
  border-color: #2a8ee6;
  outline-color: rgba(42, 142, 230, 0.20);
  box-shadow: 0 0 0 4px rgba(42, 142, 230, 0.10);
}

body[data-tenant="vecten"] .project-record-attachment-zone strong,
body[data-tenant="vecten"] .staged-upload-file button {
  color: #0a5eb9;
}

body[data-tenant="vecten"] .staged-upload-file button {
  background: rgba(42, 142, 230, 0.09);
}

body[data-tenant="vecten"] .staged-upload-file button:hover {
  background: rgba(42, 142, 230, 0.16);
}

body[data-tenant="vecten"] .table-scroll thead th,
body[data-tenant="vecten"] .document-register-table thead th {
  background: linear-gradient(135deg, #0f4ea8, #082d79);
}

body[data-tenant="vecten"] .table-scroll tbody tr:hover {
  background: #eef7ff;
}

body[data-tenant="vecten"] input:focus,
body[data-tenant="vecten"] textarea:focus,
body[data-tenant="vecten"] select:focus {
  border-color: #318ee6;
  box-shadow: 0 0 0 4px rgba(49, 142, 230, 0.12);
}