@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;800;900&display=swap");

:root {
  color-scheme: light;
  --bg: #edf8ff;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-solid: #ffffff;
  --text: #0c1228;
  --muted: #66738f;
  --line: rgba(37, 99, 255, 0.18);
  --line-strong: rgba(39, 92, 255, 0.32);
  --blue: #2458ff;
  --violet: #795cff;
  --cyan: #00bde7;
  --magenta: #b64dff;
  --green: #18a66a;
  --amber: #c9860a;
  --rose: #e54866;
  --shadow: 0 18px 54px rgba(22, 38, 112, 0.14), 0 0 0 1px rgba(0, 189, 231, 0.04);
  --soft-shadow: 0 12px 28px rgba(22, 38, 112, 0.09);
  --chrome: #070b1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(120deg, rgba(7, 11, 28, 0.08), rgba(255, 255, 255, 0) 26%),
    linear-gradient(135deg, rgba(0, 189, 231, 0.16), rgba(255, 255, 255, 0) 32%),
    linear-gradient(225deg, rgba(182, 77, 255, 0.12), rgba(255, 255, 255, 0) 40%),
    repeating-linear-gradient(135deg, rgba(182, 77, 255, 0.028) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(36, 88, 255, 0.04) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(0, 189, 231, 0.035) 0 1px, transparent 1px 72px),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}

.layout,
.page {
  max-width: 100%;
  overflow-x: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease, opacity 140ms ease;
}

button:not(:disabled):active {
  transform: translateY(1px);
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: inherit;
  text-decoration: none;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-box,
.panel,
.kpi,
.modal,
.table-wrap,
.master-editor {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.login-box::before,
.panel::before,
.kpi::before,
.table-wrap::before,
.master-editor::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet), var(--magenta));
}

.login-box {
  width: min(430px, 100%);
  padding: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--blue);
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #0cc7ff, #2458ff 48%, #b64dff);
  box-shadow: inset 0 1px 10px rgba(255, 255, 255, 0.34), 0 12px 24px rgba(36, 88, 255, 0.28);
}

.login-box h1 {
  margin: 28px 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.login-box p,
.muted {
  color: var(--muted);
}

.login-box p {
  margin: 0 0 22px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field label {
  font-size: 13px;
  font-weight: 800;
  color: #344054;
}

.field input,
.field select,
.field textarea,
.select,
.table-select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  min-height: 42px;
  color: var(--text);
  outline: none;
}

.field input,
.field select,
.field textarea {
  padding: 10px 12px;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.select:focus {
  border-color: rgba(49, 87, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(49, 87, 255, 0.1);
}

.error {
  color: var(--rose);
  min-height: 20px;
  font-size: 13px;
}

.notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 189, 231, 0.24);
  border-radius: 8px;
  color: #0c5d75;
  background: rgba(0, 189, 231, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.login-links {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.password-control {
  position: relative;
}

.password-control input {
  padding-right: 76px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(37, 99, 255, 0.18);
  border-radius: 8px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 900;
}

.passkey-login {
  width: 100%;
  margin-top: 10px;
}

.login-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.primary,
.secondary,
.ghost,
.danger,
.chip {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 40px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 800;
  white-space: nowrap;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue) 48%, var(--violet));
  box-shadow: 0 12px 28px rgba(36, 88, 255, 0.28), 0 0 18px rgba(0, 189, 231, 0.16);
}

.secondary {
  background: rgba(255, 255, 255, 0.88);
  color: #27324f;
  border-color: var(--line-strong);
}

.ghost {
  background: transparent;
  color: #344054;
}

.danger {
  background: #fff1f5;
  color: var(--rose);
  border-color: rgba(229, 72, 102, 0.28);
}

.chip {
  min-height: 34px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.76);
  color: #4f5a78;
  border-color: var(--line);
}

.chip.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 8px 20px rgba(36, 88, 255, 0.18);
}

.layout {
  min-height: 100vh;
  width: 100%;
}

.layout.module-sales {
  min-height: 100dvh;
  color: #e5e7eb;
  background:
    radial-gradient(circle at 80% 0%, rgba(79, 111, 255, 0.16), transparent 34%),
    radial-gradient(circle at 10% 12%, rgba(0, 189, 231, 0.1), transparent 28%),
    #0b0f17;
}

.module-sales .page {
  max-width: none;
  background:
    radial-gradient(circle at 74% 0%, rgba(79, 111, 255, 0.11), transparent 34%),
    #0b0f17;
}

.module-sales .page-header h1,
.module-sales .panel h2,
.module-sales .table-wrap,
.module-sales .kpi strong {
  color: #f8fafc;
}

.module-sales .page-kicker,
.module-sales .kpi span,
.module-sales .kpi small,
.module-sales .muted {
  color: #a7b3c8;
}

.module-sales .panel,
.module-sales .kpi,
.module-sales .table-wrap,
.module-sales .master-editor {
  border-color: rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(30, 36, 54, 0.94), rgba(18, 23, 35, 0.98)),
    #151a27;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.module-sales .panel::before,
.module-sales .kpi::before,
.module-sales .table-wrap::before,
.module-sales .master-editor::before {
  background: linear-gradient(90deg, #00bde7, #4f6fff, #7c3aed);
}

.module-sales .responsive-table th {
  color: #b7c3d8;
  background: rgba(15, 23, 42, 0.68);
}

.module-sales .responsive-table tr {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.58);
}

.module-sales .responsive-table td {
  border-color: rgba(148, 163, 184, 0.1);
  color: #e5e7eb;
}

.module-sales .responsive-table td::before,
.module-sales .dashboard-table-wrap td small,
.module-sales .empty {
  color: #a7b3c8;
}

.module-sales .table-select,
.module-sales .table-input,
.module-sales .select,
.module-sales input,
.module-sales select,
.module-sales textarea {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.22);
  background: #0f172a;
}

.module-sales .field label,
.module-sales .modal .field label,
.module-sales .project-form-grid .field label {
  color: #cbd5e1;
}

.module-sales input::placeholder,
.module-sales textarea::placeholder {
  color: #8b97ad;
}

.module-sales select option {
  color: #e5e7eb;
  background: #0f172a;
}

.module-sales input:focus,
.module-sales select:focus,
.module-sales textarea:focus,
.module-sales .select:focus,
.module-sales .table-input:focus,
.module-sales .table-select:focus {
  border-color: rgba(0, 189, 231, 0.72);
  box-shadow: 0 0 0 4px rgba(0, 189, 231, 0.14);
}

.module-sales .secondary,
.module-sales .ghost {
  color: #dbe4f3;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.86);
}

.module-sales .modal-backdrop {
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(14px);
}

.module-sales .modal {
  color: #e5e7eb;
  border-color: rgba(79, 111, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(24, 30, 46, 0.98), rgba(13, 18, 30, 0.99)),
    #101522;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(79, 111, 255, 0.1);
}

.module-sales .modal-header,
.module-sales .modal-footer {
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(11, 15, 23, 0.7);
}

.module-sales .modal-header h2 {
  color: #f8fafc;
}

.module-sales .modal-note {
  color: #bbf7d0;
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(22, 101, 52, 0.22);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 66px;
  background:
    linear-gradient(90deg, rgba(7, 13, 36, 0.94), rgba(17, 27, 64, 0.88)),
    rgba(7, 13, 36, 0.92);
  border-bottom: 1px solid rgba(0, 189, 231, 0.24);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 14px 36px rgba(7, 13, 36, 0.18);
}

.topbar .brand {
  color: #f7fbff;
}

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

.module-back-button,
.module-menu-button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 7px 12px;
  color: #071124;
  background: #ffffff;
  font-weight: 900;
  white-space: nowrap;
}

.module-back-button {
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.08);
}

.nav {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.nav button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  min-height: 40px;
  padding: 8px 9px;
  color: #cbd7f7;
  font-size: 14px;
  white-space: nowrap;
}

.nav button.active {
  background: rgba(0, 189, 231, 0.13);
  border-color: rgba(0, 189, 231, 0.28);
  color: #ffffff;
  font-weight: 900;
  box-shadow: inset 0 0 18px rgba(0, 189, 231, 0.12);
}

.nav button:not(.active):hover,
.segmented-tabs button:not(.active):hover,
.chip:not(.active):hover {
  border-color: rgba(0, 189, 231, 0.22);
  background: rgba(255, 255, 255, 0.10);
}

.user-area {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #d9e4ff;
  white-space: nowrap;
}

.topbar .ghost {
  color: #eef5ff;
}

.mobile-menu-toggle {
  display: none;
}

.user-pill {
  border: 1px solid rgba(0, 189, 231, 0.24);
  border-radius: 8px;
  min-height: 40px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 0;
  text-align: left;
  line-height: 1.15;
}

.user-pill small {
  color: #9fb4e8;
  font-size: 11px;
  font-weight: 800;
}

.user-pill.static {
  cursor: default;
}

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

.module-home-card {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.module-home-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet));
}

.module-home-card span {
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.module-home-card strong {
  flex: 1;
  font-size: 20px;
  line-height: 1.45;
}

.module-home-card.disabled {
  opacity: 0.64;
}

.module-home-card:not(.disabled):hover {
  transform: translateY(-2px);
  border-color: rgba(36, 88, 255, 0.32);
  box-shadow: 0 22px 52px rgba(22, 38, 112, 0.16);
}

.fab-add-project {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  min-height: 54px;
  padding: 0 22px;
  border: 1px solid rgba(0, 189, 231, 0.34);
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue) 46%, var(--magenta));
  box-shadow: 0 18px 42px rgba(36, 88, 255, 0.32), 0 0 28px rgba(0, 189, 231, 0.28);
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(7, 11, 28, 0.68);
  backdrop-filter: blur(18px);
}

.mobile-menu-panel {
  width: min(520px, 100%);
  border: 1px solid rgba(0, 189, 231, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(241, 248, 255, 0.9)),
    var(--panel-solid);
  box-shadow: 0 24px 72px rgba(7, 11, 28, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(0, 189, 231, 0.08), rgba(182, 77, 255, 0.08));
}

.mobile-menu-header h2 {
  margin: 0;
  font-size: 22px;
}

.mobile-menu-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.mobile-menu-grid button {
  min-height: 82px;
  border: 1px solid rgba(37, 99, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: left;
  padding: 12px;
}

.mobile-menu-grid button span {
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
}

.mobile-menu-grid button strong {
  font-size: 14px;
}

.mobile-menu-grid button.active {
  color: #fff;
  border-color: rgba(0, 189, 231, 0.35);
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 14px 26px rgba(36, 88, 255, 0.24);
}

.mobile-menu-grid button.active span {
  color: #fff;
}

.mobile-menu-actions {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.page {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 28px clamp(14px, 2vw, 30px) 56px;
  animation: page-enter 180ms ease-out both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.page-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.page-kicker {
  margin-top: 6px;
  color: #7884a3;
  font-size: 13px;
  font-weight: 700;
}

.toolbar,
.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.select {
  width: auto;
  min-width: 118px;
  padding: 8px 34px 8px 12px;
}

.table-select {
  min-width: 140px;
  min-height: 36px;
  padding: 6px 30px 6px 10px;
}

.segmented-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--soft-shadow);
}

.segmented-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  color: #52607c;
  background: transparent;
  font-weight: 900;
}

.segmented-tabs button.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 10px 18px rgba(36, 88, 255, 0.2);
}

.recruitment-toolbar {
  margin-bottom: 16px;
}

.recruitment-search-panel {
  position: sticky;
  top: 76px;
  z-index: 15;
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(36, 88, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(22, 38, 112, 0.12);
  backdrop-filter: blur(14px);
}

.search-filter-row,
.search-input-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  align-items: end;
}

.search-input-row {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.search-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.search-field span,
.recruitment-card-controls label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.search-input {
  min-width: 260px;
  padding: 8px 12px;
}

.search-field .search-input {
  width: 100%;
  min-width: 0;
}

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

.import-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  align-items: end;
}

.field-full {
  grid-column: 1 / -1;
}

.import-form .inline-actions {
  grid-column: 1 / -1;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid rgba(12, 18, 40, 0.08);
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(7, 11, 28, 0.98), rgba(18, 38, 90, 0.94)),
    #070b1c;
  box-shadow: 0 22px 46px rgba(7, 11, 28, 0.22);
  animation: page-enter 220ms ease-out both;
}

.dashboard-hero h2 {
  margin: 8px 0;
  font-size: 28px;
  line-height: 1.18;
}

.dashboard-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.65;
}

.eyebrow {
  color: #64d8ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

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

.hero-metric {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-metric span,
.hero-metric small {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.hero-metric strong {
  display: block;
  margin: 6px 0 3px;
  font-size: 21px;
  line-height: 1.15;
}

.data-health {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.data-health span,
.data-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.data-health span {
  color: #1d2b53;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(36, 88, 255, 0.14);
}

.data-state-active {
  color: #0c6a42;
  background: rgba(24, 166, 106, 0.12);
}

.data-state-archived {
  color: #7a4b00;
  background: rgba(201, 134, 10, 0.16);
}

.data-state-deleted {
  color: #566172;
  background: rgba(102, 115, 143, 0.16);
}

.funnel-list {
  display: grid;
  gap: 13px;
}

.funnel-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.funnel-row div:first-child {
  display: grid;
  gap: 2px;
}

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

.funnel-bar {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(102, 115, 143, 0.14);
}

.funnel-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  animation: meter-grow 520ms ease-out both;
}

.funnel-bar.status-base span {
  background: linear-gradient(90deg, var(--blue), var(--violet));
}

.funnel-bar.status-cool span {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.funnel-bar.status-warm span {
  background: linear-gradient(90deg, var(--amber), var(--rose));
}

.funnel-bar.status-strong span {
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.budget-bars {
  display: grid;
  gap: 12px;
}

.budget-row {
  display: grid;
  gap: 7px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(36, 88, 255, 0.1);
}

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

.budget-row div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.budget-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.budget-row span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.budget-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(102, 115, 143, 0.14);
}

.budget-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet));
  animation: meter-grow 520ms ease-out both;
}

.flow-panel {
  margin-bottom: 16px;
}

.flow-panel-head {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.flow-panel-head h2 {
  margin-bottom: 5px;
}

.flow-flag-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.flow-flag-strip div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(36, 88, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.flow-flag-strip span,
.flow-flag-strip strong {
  display: block;
}

.flow-flag-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.flow-flag-strip strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}

.flow-map {
  display: grid;
  gap: 14px;
  padding: 4px 0 10px;
}

.flow-branch {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  animation: row-rise 220ms ease-out both;
}

.flow-branch.depth-0 {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.flow-children {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 13px 0 0 18px;
  border-left: 2px solid rgba(36, 88, 255, 0.2);
}

.flow-children::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 2px;
  background: rgba(36, 88, 255, 0.22);
}

.flow-children > .flow-branch::before {
  display: none;
}

.flow-node {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid rgba(36, 88, 255, 0.16);
  border-left: 6px solid var(--blue);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(22, 38, 112, 0.1);
}

.flow-node span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.flow-node strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.05;
}

.flow-node small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.flow-root {
  width: min(100%, 260px);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  border-left-color: var(--cyan);
  background: linear-gradient(135deg, rgba(7, 11, 28, 0.98), rgba(18, 38, 90, 0.94));
}

.flow-root span,
.flow-root strong,
.flow-root small {
  color: #fff;
}

.flow-cool {
  border-left-color: var(--cyan);
  background: linear-gradient(135deg, rgba(0, 189, 231, 0.15), rgba(255, 255, 255, 0.9));
}

.flow-warm {
  border-left-color: var(--amber);
  background: linear-gradient(135deg, rgba(247, 184, 78, 0.18), rgba(255, 255, 255, 0.9));
}

.flow-strong {
  border-left-color: var(--green);
  background: linear-gradient(135deg, rgba(28, 184, 120, 0.18), rgba(255, 255, 255, 0.9));
}

.flow-muted {
  color: #fff;
  border-color: rgba(15, 23, 42, 0.28);
  border-left-color: #05070d;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(51, 65, 85, 0.9));
}

.flow-muted span,
.flow-muted strong,
.flow-muted small {
  color: #fff;
}

.flow-branch.is-zero .flow-node {
  opacity: 0.58;
}

.report-cost-panel {
  margin-top: 16px;
}

.overall-summary-panel {
  margin-bottom: 16px;
}

.overall-summary-shell {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid rgba(36, 88, 255, 0.18);
  border-radius: 8px;
  background: #a9c7f4;
}

.overall-summary-scroll {
  overflow-x: auto;
  border: 1px solid rgba(18, 52, 118, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.overall-summary-table {
  width: 100%;
  min-width: 1680px;
  border-collapse: collapse;
  font-size: 12px;
}

.overall-summary-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  color: #fff;
  background: #174782;
  text-align: left;
  white-space: nowrap;
}

.overall-summary-table td {
  padding: 6px 8px;
  border: 1px solid rgba(55, 104, 201, 0.35);
  background: rgba(255, 255, 255, 0.94);
  color: #061633;
  text-align: right;
  white-space: nowrap;
}

.overall-summary-table td:nth-child(-n + 5),
.overall-summary-table th:nth-child(-n + 5) {
  text-align: left;
}

.hr-simple-status-order {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #e0f2fe;
  background: rgba(59, 130, 246, 0.18);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.24);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.overall-summary-table tr:nth-child(even) td {
  background: rgba(244, 249, 255, 0.96);
}

.overall-summary-table .overall-total-row td {
  color: #fff;
  background: #374151;
  font-weight: 900;
}

.overall-summary-table .overall-rate-row td {
  color: #06336f;
  background: #fff;
  font-weight: 900;
}

.metric-table-shell {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(36, 88, 255, 0.18);
  border-radius: 8px;
  background: #d6e7ff;
  box-shadow: 0 16px 34px rgba(20, 46, 120, 0.08);
  animation: row-rise 200ms ease-out both;
}

.metric-table-scroll {
  overflow-x: auto;
  border: 1px solid rgba(18, 52, 118, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.metric-summary-table {
  min-width: 760px;
  font-size: 13px;
}

.metric-summary-table th {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  color: #fff;
  background: #174782;
  font-weight: 900;
}

.metric-summary-table td {
  padding: 10px 12px;
  border: 1px solid rgba(55, 104, 201, 0.28);
  background: rgba(255, 255, 255, 0.95);
  color: #061633;
}

.metric-summary-table tr:nth-child(even) td {
  background: rgba(244, 249, 255, 0.98);
}

.metric-summary-table td:not(:first-child) {
  text-align: right;
}

.metric-summary-table td[data-label="ステータス"],
.metric-summary-table td[data-label="対象"],
.metric-summary-table td[data-label="求人名・広告名"],
.metric-summary-table td[data-label="雇用/元ファイル"],
.metric-summary-table td[data-label="未分類理由"] {
  text-align: left;
}

.uncategorized-detail {
  margin-top: 16px;
}

.uncategorized-detail h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 16px;
}

.uncategorized-table-shell {
  background: #eef2f7;
}

.uncategorized-detail-table {
  min-width: 1180px;
}

.uncategorized-detail-table td:nth-child(4),
.uncategorized-detail-table td:nth-child(5),
.uncategorized-detail-table td:nth-child(6),
.uncategorized-detail-table td:nth-child(8) {
  min-width: 150px;
  white-space: normal;
  line-height: 1.45;
}

.calc-pill {
  display: inline-flex;
  min-width: 28px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.calc-pill.is-ok {
  background: #64748b;
}

.calc-pill.is-missing {
  background: #cbd5e1;
  color: #334155;
}

.category-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 14px;
}

.category-flow-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(36, 88, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 40px rgba(22, 38, 112, 0.09);
  animation: row-rise 220ms ease-out both;
}

.category-flow-card.is-empty {
  opacity: 0.62;
}

.category-flow-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(36, 88, 255, 0.12);
}

.category-flow-head span,
.category-flow-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.category-flow-head h3 {
  margin: 3px 0 4px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.category-flow-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(54px, 1fr));
  gap: 6px;
}

.category-flow-metrics div {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(36, 88, 255, 0.1);
  border-radius: 8px;
  background: rgba(245, 248, 255, 0.86);
  text-align: center;
}

.category-flow-metrics strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
}

.category-phase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.category-phase {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(36, 88, 255, 0.12);
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.category-phase-cool {
  border-top-color: var(--cyan);
}

.category-phase-warm {
  border-top-color: var(--amber);
}

.category-phase-strong {
  border-top-color: var(--green);
}

.category-phase h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
}

.category-phase-items {
  display: grid;
  gap: 7px;
}

.category-phase-item {
  display: grid;
  gap: 4px;
}

.category-phase-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.category-phase-item span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.category-phase-item strong {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 12px;
}

.category-mini-meter {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.category-mini-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  animation: meter-grow 360ms ease-out both;
}

.cost-matrix-table th,
.cost-matrix-table td {
  white-space: nowrap;
}

@keyframes meter-grow {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

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

.import-status-grid div {
  padding: 12px;
  border: 1px solid rgba(36, 88, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.import-status-grid span,
.import-status-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.import-status-grid strong {
  display: block;
  margin: 4px 0;
  font-size: 24px;
}

.compact-actions {
  width: auto;
  gap: 7px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.mini-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions .mini-button {
  min-width: 58px;
}

.bulk-action-bar {
  position: sticky;
  top: 74px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(36, 88, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(22, 38, 112, 0.12);
  backdrop-filter: blur(12px);
}

.bulk-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-width: max-content;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.bulk-check input,
.applicant-select-cell input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.bulk-action-bar strong {
  min-width: max-content;
  color: #1d2b53;
  font-size: 13px;
}

.bulk-reason-other.is-hidden,
[data-reason-other-wrap].is-hidden {
  display: none;
}

.list-performance-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(36, 88, 255, 0.12);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
}

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

.recruitment-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left-width: 7px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.84)),
    #fff;
  box-shadow: var(--soft-shadow);
  animation: row-rise 220ms ease-out both;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}

.recruitment-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: translateX(-100%);
  transition: opacity 180ms ease;
}

.recruitment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(22, 38, 112, 0.14);
}

.recruitment-card:hover::after {
  opacity: 1;
  animation: sheen 850ms ease-out;
}

@keyframes row-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sheen {
  to {
    transform: translateX(100%);
  }
}

.recruitment-card-top {
  display: grid;
  grid-template-columns: minmax(168px, 0.85fr) minmax(240px, 1.25fr) minmax(138px, 0.7fr) minmax(196px, 0.9fr);
  gap: 10px;
  align-items: start;
}

.recruitment-card-top.has-select {
  grid-template-columns: 28px minmax(158px, 0.85fr) minmax(230px, 1.25fr) minmax(134px, 0.7fr) minmax(190px, 0.9fr);
}

.applicant-select-cell {
  display: grid;
  place-items: center;
  width: 28px;
  min-height: 52px;
}

.applicant-select-cell span {
  display: none;
}

.candidate-block,
.job-block,
.airwork-block,
.status-summary {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.card-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.candidate-block strong,
.job-block strong,
.status-summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.candidate-meta,
.candidate-contact,
.job-block div,
.job-block small,
.airwork-block small,
.status-summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.status-summary {
  padding: 9px;
  border: 1px solid rgba(36, 88, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.status-action {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 1px 8px rgba(255, 255, 255, 0.22);
}

.status-action-base {
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.status-action-cool {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.status-action-warm {
  background: linear-gradient(135deg, var(--amber), #e54866);
}

.status-action-strong {
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.status-action-muted {
  color: #ffffff;
  background: linear-gradient(135deg, #05070d, #334155);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.status-card-base {
  border-left-color: var(--blue);
  border-color: rgba(59, 91, 253, 0.32);
  background:
    linear-gradient(135deg, rgba(59, 91, 253, 0.18), rgba(123, 92, 255, 0.07)),
    #ffffff;
}

.status-card-cool {
  border-left-color: var(--cyan);
  border-color: rgba(0, 189, 231, 0.34);
  background:
    linear-gradient(135deg, rgba(0, 189, 231, 0.2), rgba(59, 91, 253, 0.07)),
    #ffffff;
}

.status-card-warm {
  border-left-color: var(--amber);
  border-color: rgba(247, 184, 78, 0.42);
  background:
    linear-gradient(135deg, rgba(247, 184, 78, 0.24), rgba(229, 72, 102, 0.07)),
    #ffffff;
}

.status-card-strong {
  border-left-color: var(--green);
  border-color: rgba(28, 184, 120, 0.36);
  background:
    linear-gradient(135deg, rgba(28, 184, 120, 0.22), rgba(0, 189, 231, 0.07)),
    #ffffff;
}

.status-card-muted {
  color: #f8fafc;
  border-color: rgba(15, 23, 42, 0.82);
  border-left-color: #05070d;
  background:
    linear-gradient(135deg, rgba(8, 12, 22, 0.96), rgba(39, 45, 58, 0.94)),
    #111827;
  box-shadow: 0 18px 42px rgba(8, 12, 22, 0.28);
}

.status-card-muted .card-kicker,
.status-card-muted .candidate-meta,
.status-card-muted .candidate-contact,
.status-card-muted .job-block small,
.status-card-muted .airwork-block small,
.status-card-muted .status-summary small,
.status-card-muted .recruitment-card-footer .muted,
.status-card-muted .autosave-state,
.status-card-muted .recruitment-card-controls label span,
.status-card-muted .recruitment-card-notes label span {
  color: rgba(248, 250, 252, 0.72);
}

.status-card-muted .status-summary {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.status-card-muted .table-select,
.status-card-muted .table-input,
.status-card-muted .table-textarea {
  color: #111827;
  background: rgba(255, 255, 255, 0.94);
}

.recruitment-card.is-selected {
  outline: 3px solid rgba(36, 88, 255, 0.28);
  transform: translateY(-1px);
}

.recruitment-card-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.recruitment-card-controls label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

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

.recruitment-card-notes.smart-notes {
  grid-template-columns: minmax(150px, 0.8fr) minmax(160px, 0.9fr) minmax(220px, 1.4fr);
}

.recruitment-card-notes label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.recruitment-card-notes label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.recruitment-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.autosave-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.autosave-state::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #98a2b3;
}

.autosave-state[data-save-state="waiting"]::before {
  background: var(--amber);
  animation: pulse-dot 900ms ease-in-out infinite;
}

.autosave-state[data-save-state="saving"]::before {
  background: var(--blue);
  animation: pulse-dot 650ms ease-in-out infinite;
}

.autosave-state[data-save-state="saved"]::before {
  background: var(--green);
}

.autosave-state[data-save-state="error"] {
  color: #b42318;
}

.autosave-state[data-save-state="error"]::before {
  background: #e54866;
}

.recruitment-card.has-save-error {
  outline: 3px solid rgba(229, 72, 102, 0.22);
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.68;
  }
  50% {
    transform: scale(1.45);
    opacity: 1;
  }
}

.recruitment-list.compact .recruitment-card {
  padding: 14px;
}

.recruitment-list.compact .recruitment-card-notes,
.recruitment-list.compact .recruitment-card-footer .muted {
  display: none;
}

.recruitment-card.is-inactive {
  border-left-color: #05070d;
}

.recruitment-card.is-aged-inactive {
  opacity: 0.82;
}

.recruitment-card .table-select:focus,
.recruitment-card .table-input:focus,
.recruitment-card .table-textarea:focus,
.recruitment-search-panel .select:focus {
  border-color: rgba(0, 189, 231, 0.66);
  box-shadow: 0 0 0 3px rgba(0, 189, 231, 0.12);
}

.hr-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.hr-kpi-card,
.hr-phase-tile {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(36, 88, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 248, 255, 0.76)),
    #fff;
  box-shadow: var(--soft-shadow);
  animation: row-rise 220ms ease-out both;
}

.hr-kpi-card::before,
.hr-phase-tile::before,
.hr-import-panel::before,
.hr-applicants-panel::before {
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--green));
}

.hr-kpi-card span,
.hr-phase-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.hr-kpi-card strong,
.hr-phase-tile strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.15;
}

.hr-kpi-card small {
  color: var(--muted);
  font-weight: 800;
}

.hr-kpi-card.dark {
  color: #f8fafc;
  border-color: rgba(15, 23, 42, 0.78);
  background: linear-gradient(135deg, rgba(5, 7, 13, 0.96), rgba(30, 41, 59, 0.92));
}

.hr-kpi-card.dark span,
.hr-kpi-card.dark small {
  color: rgba(248, 250, 252, 0.72);
}

.hr-phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.hr-phase-tile {
  min-height: 132px;
  border-top: 4px solid var(--blue);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.hr-phase-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(22, 38, 112, 0.14);
}

.hr-phase-cool {
  border-top-color: var(--cyan);
}

.hr-phase-warm {
  border-top-color: var(--amber);
}

.hr-phase-strong {
  border-top-color: var(--green);
}

.hr-phase-muted {
  border-top-color: #05070d;
}

.hr-phase-mini-list {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.hr-phase-mini-list small {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.hr-card-top {
  grid-template-columns: 28px minmax(174px, 0.8fr) minmax(230px, 1.08fr) minmax(300px, 1.18fr);
}

.hr-applicant-card {
  gap: 9px;
  padding: 12px;
}

.hr-status-summary {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(239, 248, 255, 0.5)),
    rgba(255, 255, 255, 0.72);
}

.hr-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hr-attempt-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.hr-attempt-dots i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(102, 115, 143, 0.22);
}

.hr-attempt-dots i.active {
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 189, 231, 0.1);
}

.hr-attempt-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.hr-phase-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin-top: 9px;
}

.hr-phase-rail span {
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  padding: 3px 4px;
  color: rgba(102, 115, 143, 0.82);
  background: rgba(102, 115, 143, 0.12);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-phase-rail span.done {
  color: #fff;
  background: rgba(24, 166, 106, 0.88);
}

.hr-phase-rail span.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 8px 16px rgba(36, 88, 255, 0.2);
}

.hr-status-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.hr-status-rail span {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(36, 88, 255, 0.13);
  border-radius: 999px;
  padding: 3px 7px 3px 4px;
  color: rgba(102, 115, 143, 0.82);
  background: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}

.hr-status-rail b {
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 999px;
  color: #5c6680;
  background: rgba(102, 115, 143, 0.14);
  font-size: 9px;
}

.hr-status-rail span.done {
  color: #0f5d3d;
  border-color: rgba(24, 166, 106, 0.22);
  background: rgba(24, 166, 106, 0.12);
}

.hr-status-rail span.done b {
  color: #fff;
  background: rgba(24, 166, 106, 0.9);
}

.hr-status-rail span.active {
  color: #0b1635;
  border-color: rgba(36, 88, 255, 0.32);
  background: linear-gradient(135deg, rgba(36, 88, 255, 0.14), rgba(0, 189, 231, 0.16));
  box-shadow: 0 8px 18px rgba(36, 88, 255, 0.12);
}

.hr-status-rail span.active b {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.hr-card-controls {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.hr-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(36, 88, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.hr-context-panel {
  display: grid;
  gap: 9px;
}

.hr-status-inputs {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(36, 88, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.applicant-operation-log {
  overflow: hidden;
  border: 1px solid rgba(36, 88, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.applicant-operation-log summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.applicant-operation-log summary::-webkit-details-marker {
  display: none;
}

.applicant-operation-log summary b {
  padding: 2px 7px;
  border-radius: 999px;
  color: #2458ff;
  background: rgba(36, 88, 255, 0.1);
  font-size: 11px;
}

.operation-log-list {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.operation-log-list article {
  display: grid;
  gap: 6px;
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.74);
}

.operation-log-list article > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.operation-log-list strong {
  color: var(--text);
}

.operation-log-list em {
  color: #2458ff;
  font-style: normal;
}

.operation-log-list p {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.operation-log-list p span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(102, 115, 143, 0.14);
  border-radius: 999px;
  padding: 4px 7px;
  color: #4a5875;
  background: rgba(245, 248, 255, 0.88);
  font-size: 11px;
  font-weight: 800;
}

.operation-log-list p b {
  color: #0f172a;
}

.hr-context-title,
.hr-context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hr-context-title strong,
.hr-context-head strong {
  display: block;
  font-size: 14px;
}

.hr-context-title small,
.hr-context-head small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.hr-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.hr-field-grid label,
.hr-project-entry label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.hr-context-section {
  display: grid;
  gap: 9px;
  padding: 9px;
  border: 1px solid rgba(0, 189, 231, 0.16);
  border-radius: 8px;
  background: rgba(237, 248, 255, 0.62);
}

.hr-project-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px;
}

.hr-project-entry {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(36, 88, 255, 0.16);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 22px rgba(22, 38, 112, 0.08);
}

.hr-project-entry.project-cool {
  border-left-color: var(--cyan);
}

.hr-project-entry.project-strong {
  border-left-color: var(--green);
}

.hr-project-entry.project-muted {
  color: #f8fafc;
  border-color: rgba(15, 23, 42, 0.76);
  border-left-color: #05070d;
  background: linear-gradient(135deg, rgba(8, 12, 22, 0.95), rgba(39, 45, 58, 0.92));
}

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

.hr-project-entry-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.hr-project-entry.project-muted .hr-project-entry-head span,
.hr-project-entry.project-muted label span {
  color: rgba(248, 250, 252, 0.72);
}

.hr-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.hr-saved-summary {
  display: grid;
  gap: 6px;
  padding-top: 2px;
}

.hr-saved-summary > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.hr-saved-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hr-saved-summary small {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(36, 88, 255, 0.14);
  border-radius: 999px;
  color: #42526f;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
}

.compact-empty {
  min-height: auto;
  padding: 10px;
}

.hr-detail-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.hr-detail-grid label span,
.hr-field-grid label span,
.hr-project-entry label span,
.hr-notes label span,
.hr-import-panel .field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.hr-notes {
  grid-template-columns: minmax(150px, 0.7fr) minmax(150px, 0.8fr) minmax(210px, 1.1fr) minmax(240px, 1.4fr);
}

.hr-import-panel {
  max-width: 780px;
}

.hr-import-panel .import-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.status-card-muted .hr-detail-grid {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
}

.status-card-muted .hr-status-inputs,
.status-card-muted .hr-context-section {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
}

.status-card-muted .hr-detail-grid label span,
.status-card-muted .hr-field-grid label span,
.status-card-muted .hr-context-title small,
.status-card-muted .hr-context-head small,
.status-card-muted .hr-attempt-label,
.status-card-muted .hr-notes label span {
  color: rgba(248, 250, 252, 0.72);
}

.status-card-muted .hr-saved-summary small {
  color: rgba(248, 250, 252, 0.86);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
}

.status-card-muted .hr-phase-rail span {
  color: rgba(248, 250, 252, 0.72);
  background: rgba(255, 255, 255, 0.12);
}

.status-card-muted .hr-status-rail span,
.status-card-muted .applicant-operation-log {
  color: rgba(248, 250, 252, 0.78);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.status-card-muted .hr-status-rail span.active {
  color: #fff;
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(96, 165, 250, 0.18);
}

.status-card-muted .applicant-operation-log summary,
.module-hr .applicant-operation-log summary {
  color: rgba(248, 250, 252, 0.94);
}

.status-card-muted .operation-log-list article,
.module-hr .operation-log-list article {
  background: rgba(255, 255, 255, 0.08);
}

.status-card-muted .operation-log-list strong,
.status-card-muted .operation-log-list p b,
.module-hr .operation-log-list strong,
.module-hr .operation-log-list p b {
  color: #fff;
}

.status-card-muted .operation-log-list p span,
.module-hr .operation-log-list p span {
  color: rgba(248, 250, 252, 0.82);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.hr-pdf-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.2fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 248, 255, 0.82)),
    #fff;
}

.hr-pdf-hero-copy {
  display: grid;
  align-content: center;
  gap: 8px;
}

.hr-pdf-hero-copy span,
.hr-pdf-panel-head span,
.hr-pdf-route-label,
.hr-pdf-section-title small,
.hr-pdf-saved-strip > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.hr-pdf-hero-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.24;
}

.hr-pdf-hero-copy p,
.hr-pdf-panel-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.6;
}

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

.hr-pdf-chrono-step,
.hr-pdf-phase-tabs button,
.hr-pdf-node,
.hr-pdf-contact-grid button {
  min-width: 0;
  border: 1px solid rgba(36, 88, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(22, 38, 112, 0.08);
}

.hr-pdf-chrono-step {
  display: grid;
  gap: 4px;
  min-height: 114px;
  padding: 12px;
  text-align: left;
}

.hr-pdf-chrono-step span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.hr-pdf-chrono-step strong {
  color: var(--ink);
  line-height: 1.28;
}

.hr-pdf-chrono-step small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.hr-pdf-chrono-step.active,
.hr-pdf-phase-tabs button.active,
.hr-pdf-node.active {
  border-color: rgba(0, 189, 231, 0.62);
  box-shadow: 0 18px 34px rgba(0, 189, 231, 0.18);
  transform: translateY(-1px);
}

.hr-pdf-console {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.hr-pdf-flow-panel,
.hr-pdf-editor-panel {
  min-width: 0;
}

.hr-pdf-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.hr-pdf-panel-head.compact {
  margin-bottom: 10px;
}

.hr-pdf-panel-head h2 {
  margin: 4px 0 5px;
  color: var(--ink);
  font-size: 22px;
}

.hr-pdf-phase-badge {
  min-width: 76px;
  padding: 10px;
  border-radius: 8px;
  color: #fff;
  text-align: center;
  box-shadow: 0 12px 28px rgba(22, 38, 112, 0.12);
}

.hr-pdf-phase-badge span,
.hr-pdf-phase-badge strong {
  display: block;
  color: #fff;
}

.hr-pdf-phase-badge span {
  font-size: 22px;
  font-weight: 900;
}

.hr-pdf-phase-badge strong {
  font-size: 12px;
}

.hr-pdf-phase-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.hr-pdf-phase-tabs button {
  display: grid;
  gap: 3px;
  min-height: 68px;
  padding: 9px;
  text-align: left;
}

.hr-pdf-phase-tabs span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.hr-pdf-phase-tabs strong {
  color: var(--ink);
  font-size: 13px;
}

.hr-pdf-phase-tabs small {
  width: fit-content;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  font-size: 10px;
  font-weight: 900;
}

.hr-pdf-route-shell {
  display: grid;
  gap: 14px;
}

.hr-pdf-route-main,
.hr-pdf-route-branch {
  display: grid;
  gap: 8px;
}

.hr-pdf-route {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 9px;
}

.hr-pdf-branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
  gap: 9px;
}

.hr-pdf-node {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 5px;
  min-height: 86px;
  padding: 11px;
  border-left: 6px solid var(--blue);
  text-align: left;
}

.hr-pdf-node::after {
  content: "";
  position: absolute;
  inset: auto 10px 10px 10px;
  height: 3px;
  border-radius: 999px;
  background: rgba(102, 115, 143, 0.16);
}

.hr-pdf-node span,
.hr-pdf-project-card label span,
.hr-pdf-basic-grid label span,
.hr-pdf-current-grid label span,
.hr-pdf-field span,
.hr-pdf-orientation > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.hr-pdf-node strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.hr-pdf-node small {
  min-height: 17px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.hr-pdf-node:hover,
.hr-pdf-chrono-step:hover,
.hr-pdf-phase-tabs button:hover,
.hr-pdf-contact-grid button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(22, 38, 112, 0.14);
}

.tone-entry {
  border-left-color: var(--blue);
}

.tone-interview,
.tone-cool {
  border-left-color: var(--cyan);
}

.tone-offer,
.tone-warm,
.tone-alert {
  border-left-color: var(--amber);
}

.tone-project {
  border-left-color: var(--violet);
}

.tone-contract {
  border-left-color: #64748b;
}

.tone-onboarding,
.tone-win,
.tone-strong {
  border-left-color: var(--green);
}

.tone-lost,
.tone-muted {
  color: #f8fafc;
  border-color: rgba(15, 23, 42, 0.3);
  border-left-color: #05070d;
  background: linear-gradient(135deg, rgba(8, 12, 22, 0.96), rgba(39, 45, 58, 0.92));
}

.tone-lost span,
.tone-lost strong,
.tone-lost small,
.tone-muted span,
.tone-muted strong,
.tone-muted small {
  color: #f8fafc;
}

.hr-pdf-phase-badge.tone-entry {
  background: linear-gradient(135deg, var(--blue), #4387ff);
}

.hr-pdf-phase-badge.tone-interview {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.hr-pdf-phase-badge.tone-offer {
  background: linear-gradient(135deg, var(--amber), var(--rose));
}

.hr-pdf-phase-badge.tone-project {
  background: linear-gradient(135deg, var(--violet), var(--magenta));
}

.hr-pdf-phase-badge.tone-contract {
  background: linear-gradient(135deg, #334155, #64748b);
}

.hr-pdf-phase-badge.tone-onboarding {
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.hr-pdf-editor-panel {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 10px;
}

.hr-pdf-editor-section {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(36, 88, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.hr-pdf-section-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.hr-pdf-section-title strong {
  color: var(--ink);
}

.hr-pdf-basic-grid,
.hr-pdf-current-grid,
.hr-pdf-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hr-pdf-basic-grid label,
.hr-pdf-current-grid label,
.hr-pdf-field,
.hr-pdf-project-card label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.hr-pdf-field.wide,
.hr-pdf-project-card label.wide,
.hr-pdf-orientation {
  grid-column: 1 / -1;
}

.hr-pdf-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(140px, 1.3fr);
  gap: 8px;
}

.hr-pdf-contact-grid button {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 8px;
  text-align: center;
}

.hr-pdf-contact-grid button span {
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
}

.hr-pdf-contact-grid button strong {
  color: var(--muted);
  font-size: 11px;
}

.hr-pdf-contact-grid button.active {
  color: #fff;
  border-color: rgba(0, 189, 231, 0.7);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.hr-pdf-contact-grid button.active span,
.hr-pdf-contact-grid button.active strong {
  color: #fff;
}

.hr-pdf-orientation {
  display: grid;
  gap: 8px;
}

.hr-pdf-project-board {
  background: linear-gradient(135deg, rgba(121, 92, 255, 0.08), rgba(255, 255, 255, 0.7));
}

.hr-pdf-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 9px;
}

.hr-pdf-project-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(36, 88, 255, 0.14);
  border-left: 5px solid var(--violet);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 24px rgba(22, 38, 112, 0.08);
  animation: row-rise 180ms ease-out both;
}

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

.hr-pdf-project-head strong {
  color: var(--ink);
}

.hr-pdf-project-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.hr-pdf-saved-strip {
  display: grid;
  gap: 7px;
}

.hr-pdf-saved-strip div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hr-pdf-saved-strip small {
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(36, 88, 255, 0.14);
  border-radius: 999px;
  color: #42526f;
  background: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 800;
}

.hr-pdf-saved-strip b {
  margin-right: 5px;
  color: var(--ink);
}

.hr-common-data-panel,
.hr-work-board,
.hr-candidate-panel,
.hr-security-panel {
  margin-bottom: 16px;
}

.hr-common-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.hr-common-kpis div,
.hr-security-grid div,
.hr-team-metrics div {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(36, 88, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.hr-common-kpis span,
.hr-team-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.hr-common-kpis strong,
.hr-team-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.hr-common-kpis small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

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

.hr-team-card {
  display: grid;
  gap: 11px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(36, 88, 255, 0.15);
  border-left: 6px solid var(--blue);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
  animation: row-rise 200ms ease-out both;
}

.hr-team-card-head {
  display: grid;
  gap: 4px;
}

.hr-team-card-head span {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 11px;
  font-weight: 900;
}

.hr-team-card-head strong {
  color: var(--ink);
  font-size: 18px;
}

.hr-team-card-head small,
.hr-security-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.hr-team-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.hr-team-metrics div {
  padding: 8px;
}

.hr-team-metrics strong {
  font-size: 18px;
}

.hr-team-next-list {
  display: grid;
  gap: 7px;
}

.hr-team-next-list button {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 4px 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(36, 88, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
}

.hr-team-next-list b,
.hr-team-next-list span,
.hr-team-next-list small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-team-next-list b {
  color: var(--ink);
}

.hr-team-next-list span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.hr-team-next-list small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.hr-candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.hr-candidate-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(36, 88, 255, 0.14);
  border-left: 6px solid var(--blue);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(22, 38, 112, 0.08);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.hr-candidate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(22, 38, 112, 0.14);
}

.hr-candidate-card.is-inactive {
  color: #f8fafc;
  border-color: rgba(15, 23, 42, 0.32);
  border-left-color: #05070d;
  background: linear-gradient(135deg, rgba(8, 12, 22, 0.95), rgba(39, 45, 58, 0.92));
}

.hr-candidate-main,
.hr-candidate-job,
.hr-candidate-status {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.hr-candidate-main span,
.hr-candidate-main small,
.hr-candidate-job small,
.hr-candidate-status span,
.hr-candidate-status small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.hr-candidate-main strong,
.hr-candidate-job b,
.hr-candidate-status strong {
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.hr-candidate-card.is-inactive .hr-candidate-main span,
.hr-candidate-card.is-inactive .hr-candidate-main small,
.hr-candidate-card.is-inactive .hr-candidate-job small,
.hr-candidate-card.is-inactive .hr-candidate-status span,
.hr-candidate-card.is-inactive .hr-candidate-status small,
.hr-candidate-card.is-inactive .hr-candidate-main strong,
.hr-candidate-card.is-inactive .hr-candidate-job b,
.hr-candidate-card.is-inactive .hr-candidate-status strong {
  color: rgba(248, 250, 252, 0.9);
}

.hr-candidate-actions {
  display: flex;
  justify-content: flex-end;
}

.hr-pdf-attachment-board {
  background: linear-gradient(135deg, rgba(24, 166, 106, 0.08), rgba(255, 255, 255, 0.72));
}

.hr-pdf-attachment-grid {
  display: grid;
  gap: 8px;
}

.hr-pdf-attachment-card {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(160px, 1.2fr);
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(24, 166, 106, 0.18);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.hr-pdf-attachment-card label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.hr-pdf-attachment-card label.wide {
  grid-column: 1 / -1;
}

.hr-pdf-attachment-card label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

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

.hr-security-grid div {
  display: grid;
  gap: 6px;
  border-left: 5px solid var(--green);
}

.hr-security-grid strong {
  color: var(--ink);
}

.hr-pdf-basic-grid label.wide {
  grid-column: 1 / -1;
}

.hr-wire-shell {
  display: grid;
  gap: 16px;
}

.hr-wire-search {
  position: sticky;
  top: 74px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(260px, 1.3fr) minmax(280px, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-left: 4px solid #0891b2;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.92)),
    #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(16px);
}

.hr-wire-search-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.hr-wire-search-head span,
.hr-wire-board-head span,
.hr-wire-floating-head span {
  color: #0891b2;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hr-wire-search-head strong {
  display: block;
  color: #0f172a;
  font-size: 20px;
  font-weight: 950;
}

.hr-wire-search-head small,
.hr-wire-board-head small,
.hr-wire-floating-head small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.hr-wire-search-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.hr-wire-search-main input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: 15px;
  font-weight: 850;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.hr-wire-search-main input:focus,
.hr-wire-search-detail input:focus,
.hr-wire-search-detail select:focus,
.hr-wire-floating-panel input:focus,
.hr-wire-floating-panel select:focus {
  border-color: rgba(8, 145, 178, 0.7);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.14);
  background: #fff;
}

.hr-wire-search-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.hr-wire-search-kpis span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.9);
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.hr-wire-search-kpis b {
  color: #0f172a;
  font-size: 18px;
  line-height: 1;
}

.hr-wire-search-detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 0.8fr repeat(4, minmax(120px, 0.7fr)) repeat(2, minmax(90px, 0.45fr));
  gap: 8px;
}

.hr-wire-search-detail input,
.hr-wire-search-detail select {
  min-width: 0;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-weight: 800;
  outline: none;
}

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

.hr-wire-board-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.hr-wire-board-head strong {
  display: block;
  color: #0f172a;
  font-size: 20px;
  font-weight: 950;
}

.hr-wire-board-stats {
  display: grid;
  grid-template-columns: auto auto auto auto;
  gap: 6px 10px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #f8fafc;
}

.hr-wire-board-stats b {
  color: #0f172a;
  font-size: 18px;
}

.hr-wire-board-stats small {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.hr-wire-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.42fr);
  gap: 14px;
  align-items: start;
}

.hr-wire-row-stack {
  display: grid;
  gap: 10px;
}

.hr-wire-row {
  --tone: #2563eb;
  --tone-soft: rgba(37, 99, 235, 0.1);
  --tone-line: rgba(37, 99, 235, 0.28);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--tone-line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--tone-soft), rgba(255, 255, 255, 0) 36%),
    rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.hr-wire-row:hover,
.hr-wire-row.active {
  transform: translateY(-2px);
  border-color: var(--tone);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.hr-wire-row.tone-entry { --tone: #2563eb; --tone-soft: rgba(37, 99, 235, 0.1); --tone-line: rgba(37, 99, 235, 0.24); }
.hr-wire-row.tone-interview { --tone: #0891b2; --tone-soft: rgba(8, 145, 178, 0.11); --tone-line: rgba(8, 145, 178, 0.26); }
.hr-wire-row.tone-offer { --tone: #d97706; --tone-soft: rgba(217, 119, 6, 0.12); --tone-line: rgba(217, 119, 6, 0.28); }
.hr-wire-row.tone-project { --tone: #7c3aed; --tone-soft: rgba(124, 58, 237, 0.1); --tone-line: rgba(124, 58, 237, 0.25); }
.hr-wire-row.tone-contract { --tone: #16a34a; --tone-soft: rgba(22, 163, 74, 0.1); --tone-line: rgba(22, 163, 74, 0.24); }
.hr-wire-row.tone-onboarding,
.hr-wire-row.tone-win { --tone: #0f9f6e; --tone-soft: rgba(15, 159, 110, 0.12); --tone-line: rgba(15, 159, 110, 0.28); }
.hr-wire-row.tone-alert { --tone: #ea580c; --tone-soft: rgba(234, 88, 12, 0.13); --tone-line: rgba(234, 88, 12, 0.3); }
.hr-wire-row.tone-lost { --tone: #334155; --tone-soft: rgba(15, 23, 42, 0.12); --tone-line: rgba(15, 23, 42, 0.28); }

.hr-wire-row.is-inactive {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(51, 65, 85, 0.82)),
    #1f2937;
  border-color: rgba(15, 23, 42, 0.46);
}

.hr-wire-left {
  display: grid;
  grid-template-columns: 5px minmax(190px, 0.62fr) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.hr-wire-accent {
  width: 5px;
  border-radius: 999px;
  background: var(--tone);
}

.hr-wire-person {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.hr-wire-tag {
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--tone);
  background: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-wire-person strong {
  color: #0f172a;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hr-wire-person small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.hr-wire-mini-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: center;
}

.hr-wire-mini-fields span {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  color: #334155;
  background: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.hr-wire-job-focus {
  grid-column: 3 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.hr-wire-job-focus div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.hr-wire-job-focus span,
.hr-post-interview-panel > span {
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
}

.hr-wire-job-focus strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.hr-wire-source-line {
  grid-column: 3 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: center;
}

.hr-wire-source-line span {
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  color: #334155;
  background: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.hr-post-interview-panel {
  grid-column: 3 / -1;
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 8px;
  background: rgba(240, 253, 250, 0.76);
}

.hr-post-interview-panel div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.hr-post-interview-panel small {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: #0f172a;
  font-size: 11px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.hr-post-interview-panel b {
  color: #0891b2;
  font-size: 10px;
}

.hr-wire-right {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.hr-wire-status-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.hr-wire-status-band span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--tone);
  font-size: 11px;
  font-weight: 950;
}

.hr-wire-status-band strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.hr-wire-status-band b {
  color: #0f172a;
  font-size: 20px;
  font-weight: 950;
}

.hr-wire-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.hr-wire-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tone);
  transition: width 180ms ease;
}

.hr-wire-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.hr-wire-actions small {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.hr-wire-actions button {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--tone-line);
  border-radius: 8px;
  background: #fff;
  color: var(--tone);
  font-size: 12px;
  font-weight: 950;
}

.hr-wire-row.is-inactive .hr-wire-person strong,
.hr-wire-row.is-inactive .hr-wire-person small,
.hr-wire-row.is-inactive .hr-wire-status-band strong,
.hr-wire-row.is-inactive .hr-wire-status-band b,
.hr-wire-row.is-inactive .hr-wire-actions small {
  color: #f8fafc;
}

.hr-wire-row.is-inactive .hr-wire-mini-fields span,
.hr-wire-row.is-inactive .hr-wire-job-focus div,
.hr-wire-row.is-inactive .hr-wire-source-line span,
.hr-wire-row.is-inactive .hr-post-interview-panel,
.hr-wire-row.is-inactive .hr-wire-tag,
.hr-wire-row.is-inactive .hr-wire-actions button {
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.hr-wire-command-panel {
  position: sticky;
  top: 186px;
  display: grid;
  gap: 12px;
  max-height: calc(100dvh - 200px);
  overflow: auto;
}

.hr-wire-floating-panel,
.hr-wire-status-menu {
  display: grid;
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
    #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.hr-wire-floating-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.hr-wire-floating-head strong {
  display: block;
  color: #0f172a;
  font-size: 20px;
  font-weight: 950;
}

.hr-wire-floating-head b {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: #0f172a;
  font-size: 11px;
  font-weight: 950;
}

.hr-wire-basic-grid,
.hr-wire-current-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hr-wire-floating-panel label,
.hr-wire-input-section label {
  display: grid;
  gap: 5px;
}

.hr-wire-floating-panel label span,
.hr-wire-input-section label span {
  color: #475569;
  font-size: 11px;
  font-weight: 950;
}

.hr-wire-floating-panel input,
.hr-wire-floating-panel select,
.hr-wire-floating-panel textarea {
  min-width: 0;
  min-height: 38px;
  border-radius: 8px;
}

.hr-wire-section-title,
.hr-pdf-section-title {
  display: grid;
  gap: 2px;
}

.hr-wire-section-title strong,
.hr-pdf-section-title strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
}

.hr-wire-section-title small,
.hr-pdf-section-title small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.hr-wire-input-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(8, 145, 178, 0.14);
  border-radius: 8px;
  background: rgba(236, 254, 255, 0.42);
}

.hr-wire-facts {
  display: grid;
  gap: 8px;
  padding: 11px;
  border-radius: 8px;
  background: #f8fafc;
}

.hr-wire-facts > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
}

.hr-wire-facts div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hr-wire-facts small {
  display: inline-flex;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 11px;
  font-weight: 850;
}

.hr-wire-facts b {
  color: #0f172a;
}

.hr-wire-menu-columns {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 10px;
}

.hr-wire-phase-column,
.hr-wire-status-column {
  display: grid;
  align-content: start;
  gap: 6px;
}

.hr-wire-menu-columns button {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  transition: transform 130ms ease, border-color 130ms ease, background 130ms ease, color 130ms ease;
}

.hr-wire-menu-columns button:hover {
  transform: translateY(-1px);
  border-color: rgba(8, 145, 178, 0.28);
}

.hr-wire-menu-columns button.active {
  color: #fff;
  border-color: #0f172a;
  background: #0f172a;
}

.hr-wire-menu-columns button.branch {
  border-color: rgba(234, 88, 12, 0.18);
  background: rgba(255, 247, 237, 0.85);
}

.hr-wire-menu-columns button span,
.hr-wire-menu-columns button small {
  min-width: 22px;
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.12);
  color: #0891b2;
  font-size: 11px;
}

.hr-wire-menu-columns button.active span,
.hr-wire-menu-columns button.active small {
  color: #0f172a;
  background: #fff;
}

.hr-wire-menu-columns hr {
  width: 100%;
  margin: 4px 0;
  border: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.hr-wire-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
}

.layout.module-hr {
  min-height: 100dvh;
  background: #0b0f17;
  color: #e5e7eb;
}

.module-hr .topbar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  width: 190px;
  min-height: 100dvh;
  align-items: stretch;
  flex-direction: column;
  gap: 14px;
  padding: 16px 12px;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  background: #090d14;
  box-shadow: none;
}

.module-hr .brand {
  width: 100%;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.module-hr .brand span:last-child {
  color: #f8fafc;
  white-space: normal;
}

.module-hr .brand-mark {
  background: linear-gradient(135deg, #4f6fff, #7c3aed);
  box-shadow: 0 10px 22px rgba(79, 111, 255, 0.28);
}

.module-hr .module-navigation-actions,
.module-hr .mobile-menu-toggle {
  display: none;
}

.module-hr .nav {
  width: 100%;
  display: grid;
  gap: 8px;
  margin: 0;
  flex: 0 0 auto;
  align-content: start;
  overflow: visible;
}

.module-hr .nav button {
  width: 100%;
  flex: 0 0 auto;
  min-height: 38px;
  justify-content: flex-start;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #cbd5e1;
  background: transparent;
  font-size: 13px;
}

.module-hr .nav button.active,
.module-hr .nav button:hover {
  color: #fff;
  border-color: rgba(99, 102, 241, 0.26);
  background: rgba(99, 102, 241, 0.18);
}

.module-hr .user-area {
  width: 100%;
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
}

.module-hr .user-pill {
  display: none;
}

.module-hr .module-menu-button,
.module-hr .topbar .ghost {
  width: 100%;
  min-height: 36px;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.9);
}

.module-hr .page {
  min-height: 100dvh;
  margin-left: 190px;
  width: auto;
  max-width: none;
  padding: 20px 22px 64px;
  background:
    radial-gradient(circle at 70% 0%, rgba(79, 111, 255, 0.12), transparent 34%),
    #0b0f17;
}

.hr-sidebar-stats {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.hr-sidebar-stats small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.hr-sidebar-stats span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 900;
}

.hr-sidebar-stats span strong {
  color: #f8fafc;
}

.hr-sidebar-stats .phase-entry b { color: #4f6fff; }
.hr-sidebar-stats .phase-interview b { color: #8b5cf6; }
.hr-sidebar-stats .phase-offer b,
.hr-sidebar-stats .phase-contract b { color: #f59e0b; }
.hr-sidebar-stats .phase-project b,
.hr-sidebar-stats .phase-onboarding b,
.hr-sidebar-stats .phase-win b { color: #34d399; }

.hr-hub-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  max-width: none;
  margin: 0 0 16px;
}

.hr-hub-page-head h1 {
  color: #fff;
  font-size: 28px;
  line-height: 1.2;
}

.hr-hub-page-head p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.hr-hub-filter-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.hr-hub-filter-chips button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(99, 102, 241, 0.26);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.8);
  font-size: 12px;
  font-weight: 900;
}

.hr-hub-filter-chips button.active,
.hr-hub-filter-chips button:hover {
  color: #fff;
  border-color: #4f6fff;
  background: rgba(79, 111, 255, 0.28);
}

.hr-hub-filter-chips .phase-interview.active,
.hr-hub-filter-chips .phase-interview:hover { border-color: #8b5cf6; background: rgba(139, 92, 246, 0.3); }
.hr-hub-filter-chips .phase-offer.active,
.hr-hub-filter-chips .phase-contract.active,
.hr-hub-filter-chips .phase-offer:hover,
.hr-hub-filter-chips .phase-contract:hover { border-color: #f59e0b; background: rgba(245, 158, 11, 0.26); }
.hr-hub-filter-chips .phase-project.active,
.hr-hub-filter-chips .phase-onboarding.active,
.hr-hub-filter-chips .phase-project:hover,
.hr-hub-filter-chips .phase-onboarding:hover { border-color: #34d399; background: rgba(52, 211, 153, 0.22); }

.module-hr .hr-wire-shell {
  max-width: none;
  width: 100%;
  margin: 0;
  gap: 14px;
}

.module-hr .hr-wire-search {
  position: static;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.module-hr .hr-wire-search-head {
  display: none;
}

.module-hr .hr-wire-search-main {
  grid-template-columns: minmax(220px, 320px) auto minmax(0, 1fr);
  justify-content: start;
}

.module-hr .hr-wire-search-main input,
.module-hr .hr-wire-search-detail input,
.module-hr .hr-wire-search-detail select {
  border-color: rgba(148, 163, 184, 0.18);
  color: #e5e7eb;
  background: #1a2030;
}

.module-hr .hr-wire-search-main input::placeholder,
.module-hr .hr-wire-search-detail input::placeholder {
  color: #8b97ad;
}

.module-hr .hr-wire-search-kpis {
  display: none;
}

.module-hr .hr-wire-search-detail {
  grid-template-columns: minmax(160px, 0.65fr) minmax(180px, 0.75fr) minmax(110px, 0.45fr) repeat(4, minmax(110px, 0.38fr)) repeat(2, minmax(80px, 0.3fr));
  align-items: center;
}

.module-hr .hr-wire-board {
  gap: 12px;
}

.module-hr .hr-wire-board-head {
  padding: 4px 0 10px;
  border: 0;
  background: transparent;
}

.module-hr .hr-wire-board-head span,
.module-hr .hr-wire-board-head small {
  color: #7784a1;
}

.module-hr .hr-wire-board-head strong {
  color: #f8fafc;
}

.module-hr .hr-wire-board-stats {
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.65);
}

.module-hr .hr-wire-board-stats b {
  color: #fff;
}

.module-hr .hr-wire-layout {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.34fr);
  gap: 14px;
}

.module-hr .hr-wire-list-layout {
  grid-template-columns: minmax(0, 1fr);
}

.module-hr .hr-wire-row {
  --tone: #4f6fff;
  --tone-soft: rgba(79, 111, 255, 0.13);
  --tone-line: rgba(79, 111, 255, 0.34);
  display: block;
  min-height: 0;
  grid-template-columns: none;
  padding: 0;
  overflow: visible;
  border-color: var(--tone-line);
  background:
    linear-gradient(180deg, var(--tone-soft), rgba(22, 27, 40, 0.98) 38%),
    #151a27;
  box-shadow: none;
}

.module-hr .hr-wire-row:hover,
.module-hr .hr-wire-row.active {
  border-color: var(--tone);
  background:
    linear-gradient(180deg, var(--tone-soft), rgba(22, 27, 40, 1) 42%),
    #151a27;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tone), transparent 50%), 0 18px 40px rgba(0, 0, 0, 0.28);
}

.module-hr .hr-wire-row.tone-entry { --tone: #4f6fff; --tone-soft: rgba(79, 111, 255, 0.16); --tone-line: rgba(79, 111, 255, 0.4); }
.module-hr .hr-wire-row.tone-interview { --tone: #8b5cf6; --tone-soft: rgba(139, 92, 246, 0.16); --tone-line: rgba(139, 92, 246, 0.42); }
.module-hr .hr-wire-row.tone-offer,
.module-hr .hr-wire-row.tone-contract { --tone: #f59e0b; --tone-soft: rgba(245, 158, 11, 0.16); --tone-line: rgba(245, 158, 11, 0.42); }
.module-hr .hr-wire-row.tone-project,
.module-hr .hr-wire-row.tone-onboarding,
.module-hr .hr-wire-row.tone-win { --tone: #34d399; --tone-soft: rgba(52, 211, 153, 0.15); --tone-line: rgba(52, 211, 153, 0.42); }
.module-hr .hr-wire-row.tone-alert { --tone: #fb7185; --tone-soft: rgba(251, 113, 133, 0.18); --tone-line: rgba(251, 113, 133, 0.44); }
.module-hr .hr-wire-row.tone-lost { --tone: #64748b; --tone-soft: rgba(100, 116, 139, 0.18); --tone-line: rgba(100, 116, 139, 0.38); }

.module-hr .hr-wire-row-strip {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 8px 8px 0 0;
  background: color-mix(in srgb, var(--tone), #111827 88%);
}

.module-hr .hr-wire-row-strip span {
  color: #93a0bb;
  font-size: 11px;
  font-weight: 850;
}

.module-hr .hr-wire-row-strip b {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 7px;
  color: #fff;
  background: color-mix(in srgb, var(--tone), transparent 62%);
  font-size: 11px;
  font-weight: 950;
}

.module-hr .hr-wire-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
}

.module-hr .hr-wire-left {
  grid-template-columns: 46px minmax(190px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  align-content: start;
  padding: 22px 16px;
}

.module-hr .hr-wire-accent {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  align-self: start;
  border-radius: 999px;
  color: #fff;
  background: var(--tone);
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--tone), transparent 84%);
}

.module-hr .hr-wire-person strong,
.module-hr .hr-wire-status-band strong {
  color: #fff;
}

.module-hr .hr-wire-person small,
.module-hr .hr-wire-actions small {
  color: #93a0bb;
}

.module-hr .hr-wire-person em {
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.module-hr .hr-wire-tag {
  color: var(--tone);
  background: rgba(15, 23, 42, 0.8);
}

.module-hr .hr-wire-mini-fields span {
  border-color: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.64);
}

.module-hr .hr-wire-job-focus div {
  border-color: color-mix(in srgb, var(--tone), transparent 74%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone), transparent 88%), rgba(15, 23, 42, 0.72));
}

.module-hr .hr-wire-job-focus span,
.module-hr .hr-post-interview-panel > span {
  color: #93a0bb;
}

.module-hr .hr-wire-job-focus strong {
  color: #fff;
  font-size: 15px;
}

.module-hr .hr-wire-source-line span {
  border-color: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.58);
}

.module-hr .hr-post-interview-panel {
  border-color: rgba(52, 211, 153, 0.24);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.66));
}

.module-hr .hr-post-interview-panel small {
  color: #e5e7eb;
}

.module-hr .hr-post-interview-panel b {
  color: #34d399;
}

.module-hr .hr-wire-note {
  grid-column: 2 / -1;
  margin-top: 7px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: #8fa0bf;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-hr .hr-wire-right {
  padding: 18px 16px;
  border-left: 1px solid rgba(148, 163, 184, 0.1);
  position: relative;
}

.module-hr .hr-wire-status-band {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.module-hr .hr-wire-status-band i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--tone);
  font-style: normal;
  font-weight: 950;
}

.module-hr .hr-wire-status-band span {
  color: #cbd5e1;
  background: transparent;
  padding: 0;
}

.module-hr .hr-wire-status-band b {
  color: var(--tone);
}

.module-hr .hr-wire-meter {
  background: #222838;
}

.module-hr .hr-wire-actions button {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
}

.module-hr .hr-wire-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  position: relative;
}

.module-hr .hr-wire-status-button,
.module-hr .hr-wire-detail-button {
  min-width: 92px;
}

.module-hr .hr-wire-detail-button {
  min-width: 62px;
}

.module-hr .hr-wire-status-popup {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  bottom: auto;
  z-index: 40;
  width: min(280px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: #111827;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.module-hr .hr-wire-status-popup-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.module-hr .hr-wire-status-popup-head span {
  color: #93a0bb;
  font-size: 11px;
  font-weight: 900;
}

.module-hr .hr-wire-status-popup-head strong {
  color: #fff;
  font-size: 12px;
}

.module-hr .hr-wire-status-popup-list {
  max-height: 280px;
  overflow: auto;
  padding: 6px;
}

.module-hr .hr-wire-status-popup-list button {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  color: #dbeafe;
  background: transparent;
  text-align: left;
}

.module-hr .hr-wire-status-popup-list button:hover,
.module-hr .hr-wire-status-popup-list button.active {
  background: rgba(79, 111, 255, 0.18);
}

.module-hr .hr-wire-status-popup-list button.kind-lost,
.module-hr .hr-wire-status-popup-list button.kind-alert {
  color: #fecdd3;
}

.module-hr .hr-wire-status-popup-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.module-hr .hr-wire-status-popup-list small {
  flex: 0 0 auto;
  color: #8b9ab8;
  font-size: 10px;
}

.module-hr .hr-wire-status-popup {
  width: min(1080px, calc(100vw - 240px));
  max-width: 1080px;
}

.hr-status-flow-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
}

.hr-status-flow-board.mode-detail {
  grid-auto-columns: minmax(210px, 1fr);
  padding: 0;
}

.hr-status-flow-board.mode-list {
  grid-auto-columns: minmax(166px, 1fr);
}

.hr-status-flow-lane {
  --flow-tone: #4f6fff;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: #121a2a;
}

.hr-status-flow-lane.active {
  border-color: color-mix(in srgb, var(--flow-tone), transparent 45%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--flow-tone), #121a2a 84%), #121a2a);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--flow-tone), transparent 78%);
}

.hr-status-flow-lane.phase-entry { --flow-tone: #4f6fff; }
.hr-status-flow-lane.phase-interview { --flow-tone: #8b5cf6; }
.hr-status-flow-lane.phase-offer,
.hr-status-flow-lane.phase-contract { --flow-tone: #f59e0b; }
.hr-status-flow-lane.phase-project,
.hr-status-flow-lane.phase-onboarding { --flow-tone: #34d399; }

.hr-status-flow-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--flow-tone), transparent 62%);
  border-radius: 8px;
  color: #fff;
  background: color-mix(in srgb, var(--flow-tone), transparent 80%);
  font-size: 12px;
  font-weight: 950;
}

.hr-status-flow-head i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--flow-tone);
  font-style: normal;
}

.hr-status-flow-rail {
  position: relative;
  display: grid;
  gap: 6px;
}

.hr-status-flow-rail::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 9px;
  width: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--flow-tone), transparent 70%);
}

.hr-status-flow-node {
  position: relative;
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 22px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 8px;
  color: #cbd5e1;
  background: #0d1422;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
}

.hr-status-flow-node::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid var(--flow-tone);
  border-radius: 999px;
  background: #111723;
  transform: translateY(-50%);
}

.hr-status-flow-node:hover,
.hr-status-flow-node.active {
  color: #fff;
  border-color: color-mix(in srgb, var(--flow-tone), transparent 48%);
  background: color-mix(in srgb, var(--flow-tone), transparent 78%);
  transform: translateX(2px);
}

.hr-status-flow-node.active::before {
  background: var(--flow-tone);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--flow-tone), transparent 82%);
}

.hr-status-flow-node.kind-lost,
.hr-status-flow-node.kind-alert {
  color: #fecdd3;
}

.hr-status-flow-node.kind-lost {
  border-color: rgba(100, 116, 139, 0.28);
  background: rgba(3, 7, 18, 0.74);
}

.hr-status-flow-node span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hr-status-flow-node small {
  color: #93a0bb;
  font-size: 10px;
}

.hr-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: start center;
  padding: 26px;
  overflow: auto;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(12px);
}

.module-hr .hr-detail-drawer {
  --tone: #4f6fff;
  width: min(1180px, 100%);
  min-height: min(760px, calc(100dvh - 52px));
  border: 1px solid color-mix(in srgb, var(--tone), transparent 52%);
  border-radius: 12px;
  background:
    radial-gradient(circle at 78% 0%, color-mix(in srgb, var(--tone), transparent 80%), transparent 34%),
    #111723;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

.module-hr .hr-detail-drawer.tone-interview { --tone: #8b5cf6; }
.module-hr .hr-detail-drawer.tone-offer,
.module-hr .hr-detail-drawer.tone-contract { --tone: #f59e0b; }
.module-hr .hr-detail-drawer.tone-project,
.module-hr .hr-detail-drawer.tone-onboarding,
.module-hr .hr-detail-drawer.tone-win { --tone: #34d399; }
.module-hr .hr-detail-drawer.tone-alert { --tone: #fb7185; }
.module-hr .hr-detail-drawer.tone-lost { --tone: #64748b; }

.module-hr .hr-detail-head {
  min-height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.76);
}

.module-hr .hr-detail-head span {
  color: #8390aa;
  font-size: 12px;
  font-weight: 900;
}

.module-hr .hr-detail-head .ghost {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.84);
}

.module-hr .hr-detail-head .ghost:hover {
  color: #fff;
  border-color: var(--tone);
}

.module-hr .hr-detail-hero {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 16px;
  align-items: start;
  padding: 22px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.module-hr .hr-detail-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--tone);
  font-weight: 950;
  box-shadow: 0 0 0 12px color-mix(in srgb, var(--tone), transparent 84%);
}

.module-hr .hr-detail-main,
.module-hr .hr-detail-progress {
  min-width: 0;
}

.module-hr .hr-detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.module-hr .hr-detail-title-row strong {
  display: block;
  color: #fff;
  font-size: 20px;
  line-height: 1.25;
}

.module-hr .hr-detail-title-row small {
  display: block;
  margin-top: 3px;
  color: #91a0bd;
  font-size: 12px;
  font-weight: 800;
}

.module-hr .hr-detail-title-row span {
  height: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--tone), transparent 45%);
  font-size: 12px;
  font-weight: 950;
}

.module-hr .hr-detail-contact-line,
.module-hr .hr-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.module-hr .hr-detail-contact-line span,
.module-hr .hr-detail-tags b {
  padding: 5px 8px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.module-hr .hr-detail-tags b {
  color: #dbeafe;
}

.module-hr .hr-detail-progress {
  display: grid;
  gap: 8px;
}

.module-hr .hr-detail-progress > span {
  color: #91a0bd;
  font-size: 12px;
  font-weight: 900;
}

.module-hr .hr-detail-progress > strong {
  color: var(--tone);
  font-size: 28px;
  line-height: 1;
}

.module-hr .hr-detail-phase-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.module-hr .hr-detail-phase-tabs button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 950;
}

.module-hr .hr-detail-phase-tabs button span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: #4f6fff;
}

.module-hr .hr-detail-phase-tabs button.active {
  color: #fff;
  border-color: var(--tone);
  background: color-mix(in srgb, var(--tone), #111827 76%);
}

.module-hr .hr-detail-status-editor {
  margin: 14px 18px 0;
  border-color: color-mix(in srgb, var(--tone), transparent 58%);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--tone), transparent 88%), rgba(17, 23, 35, 0.98)),
    #111723;
}

.hr-simple-phase-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.hr-simple-phase-tabs button {
  --phase-tab-tone: #4f6fff;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.66);
  font-size: 12px;
  font-weight: 950;
}

.hr-simple-phase-tabs button.phase-entry { --phase-tab-tone: #4f6fff; }
.hr-simple-phase-tabs button.phase-interview { --phase-tab-tone: #8b5cf6; }
.hr-simple-phase-tabs button.phase-offer,
.hr-simple-phase-tabs button.phase-contract { --phase-tab-tone: #f59e0b; }
.hr-simple-phase-tabs button.phase-project,
.hr-simple-phase-tabs button.phase-onboarding { --phase-tab-tone: #34d399; }

.hr-simple-phase-tabs button span {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--phase-tab-tone);
}

.hr-simple-phase-tabs button b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-simple-phase-tabs button.active {
  color: #fff;
  border-color: color-mix(in srgb, var(--phase-tab-tone), transparent 44%);
  background: color-mix(in srgb, var(--phase-tab-tone), #111827 76%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--phase-tab-tone), transparent 76%);
}

.hr-simple-phase-tabs button.locked,
.hr-pdf-phase-tabs button.locked,
.hr-pdf-chrono-step.locked,
.hr-pdf-node.locked {
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.16);
  background: rgba(15, 23, 42, 0.34);
  box-shadow: none;
}

.hr-simple-phase-tabs button.locked span,
.hr-pdf-chrono-step.locked span {
  filter: grayscale(1);
  opacity: 0.62;
}

.hr-simple-phase-tabs button small {
  margin-left: auto;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
}

.hr-simple-status-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.hr-simple-current {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.66);
}

.hr-simple-current span,
.hr-simple-status-area > span {
  color: #93a0bb;
  font-size: 11px;
  font-weight: 950;
}

.hr-simple-current strong {
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.35;
}

.hr-simple-current small {
  color: var(--tone);
  font-size: 12px;
  font-weight: 950;
}

.hr-status-map-shell {
  display: grid;
  gap: 12px;
}

.hr-status-map-current {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.66);
}

.hr-status-map-current > span {
  color: #93a0bb;
  font-size: 11px;
  font-weight: 950;
}

.hr-status-map-current > strong {
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.35;
}

.hr-status-map-current > small {
  color: var(--tone);
  font-size: 12px;
  font-weight: 950;
}

.hr-status-map {
  --map-line: rgba(100, 116, 139, 0.48);
  --map-active: color-mix(in srgb, var(--tone), #67e8f9 18%);
  display: block;
  min-width: 0;
  padding: 14px 8px 8px;
  overflow-x: auto;
  position: relative;
}

.hr-status-map-ladder {
  display: grid;
  gap: 18px;
  min-width: 690px;
  position: relative;
}

.hr-status-map-ladder::before {
  content: "";
  position: absolute;
  left: 99px;
  top: 38px;
  bottom: 38px;
  border-left: 6px solid var(--map-line);
  border-radius: 999px;
}

.hr-status-map-step {
  display: grid;
  grid-template-columns: 198px 220px;
  column-gap: 72px;
  align-items: start;
  min-width: 0;
  min-height: 76px;
  padding-left: 0;
  position: relative;
}

.hr-status-map-step.has-branch {
  min-height: 76px;
}

.hr-status-map-step::before {
  content: "";
  position: absolute;
  left: 99px;
  top: -28px;
  height: calc(50% + 28px);
  border-left: 6px solid transparent;
  border-radius: 999px;
  z-index: 0;
}

.hr-status-map-step.active-route::before {
  border-left-color: var(--map-active);
  box-shadow: 0 0 14px color-mix(in srgb, var(--map-active), transparent 42%);
}

.hr-status-map-step:first-child::before {
  top: 50%;
  height: 0;
}

.hr-status-map-step.has-branch::after {
  content: "";
  position: absolute;
  left: 99px;
  top: -12px;
  width: 281px;
  height: 26px;
  border-top: 6px solid var(--map-line);
  border-right: 6px solid var(--map-line);
  border-radius: 0 10px 0 0;
  z-index: 0;
}

.hr-status-map-step.has-branch.branch-active::after {
  border-color: var(--map-active);
  box-shadow: 8px -8px 18px -10px color-mix(in srgb, var(--map-active), transparent 22%);
}

.hr-status-map-step-line {
  display: block;
  min-width: 0;
  margin-left: 0;
  position: relative;
  z-index: 1;
}

.hr-status-map-step.has-branch .hr-status-map-step-line::after {
  content: none;
}

.hr-status-map-node {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 76px;
  width: 198px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.74);
  font-size: 13px;
  font-weight: 950;
  text-align: center;
  position: relative;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.hr-status-map-node.lane-main {
  box-shadow: 0 0 0 6px #111827;
}

.hr-status-map-node:hover,
.hr-status-map-node.active {
  color: #fff;
  border-color: var(--tone);
  background: color-mix(in srgb, var(--tone), #111827 78%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
  transform: translateY(-1px);
}

.hr-status-map-node.kind-lost,
.hr-status-map-node.kind-alert {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.22);
  background: rgba(3, 7, 18, 0.72);
}

.hr-status-map-node.kind-lost.active,
.hr-status-map-node.kind-alert.active {
  border-color: #fb7185;
  background: rgba(127, 29, 29, 0.48);
  box-shadow: 0 12px 30px rgba(127, 29, 29, 0.28);
}

.hr-status-map-node.kind-project {
  border-color: rgba(52, 211, 153, 0.22);
}

.hr-status-map-node.kind-win,
.hr-status-map-node.kind-project.active {
  border-color: #34d399;
}

.hr-status-map-node span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hr-status-node-text {
  display: grid;
  gap: 2px;
  justify-items: center;
  line-height: 1.2;
}

.hr-status-node-text b {
  font-size: 13px;
  font-weight: 950;
}

.hr-status-node-text small {
  color: inherit;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.18;
  opacity: 0.92;
}

.hr-status-map-node > .hr-status-node-meta {
  flex: 0 0 auto;
  margin-left: auto;
  color: #93a0bb;
  font-size: 10px;
}

.hr-status-map-branches {
  display: grid;
  width: 220px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  position: relative;
  z-index: 1;
}

.hr-status-map-branches.single {
  width: 220px;
  padding: 0;
  border: 0;
  background: transparent;
}

.hr-status-map-select-wrap {
  display: grid;
  position: relative;
}

.hr-status-map-select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #cbd5e1;
  border-bottom: 2px solid #cbd5e1;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  z-index: 3;
}

.hr-status-map-select-caption {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 76px;
  padding: 9px 38px 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 9px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.9);
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 0 0 6px #111827;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.hr-status-map-select-caption em {
  color: #fff;
  font-style: normal;
  font-weight: 950;
  margin-left: 4px;
}

.hr-status-map-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  appearance: none;
  outline: none;
  cursor: pointer;
  z-index: 4;
}

.hr-status-map-select-wrap.active .hr-status-map-select-caption,
.hr-status-map-select-wrap:focus-within .hr-status-map-select-caption {
  color: #fff;
  border-color: var(--map-active);
  background: color-mix(in srgb, var(--tone), #111827 78%);
  box-shadow: 0 0 0 6px #111827, 0 0 20px color-mix(in srgb, var(--map-active), transparent 45%);
}

.hr-status-map-select option {
  color: #0f172a;
  background: #fff;
}

.hr-status-map-branch {
  display: grid;
  place-items: center;
  min-height: 76px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 0 0 6px #111827;
  font-size: 13px;
  font-weight: 950;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.hr-status-map-branch.kind-lost,
.hr-status-map-branch.kind-alert {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.2);
}

.hr-status-map-branch:hover,
.hr-status-map-branch.active {
  color: #fff;
  border-color: #fb7185;
  background: rgba(127, 29, 29, 0.5);
  transform: translateY(-1px);
}

.hr-status-tree-canvas {
  --tree-line: rgba(100, 116, 139, 0.64);
  --tree-line-soft: rgba(100, 116, 139, 0.2);
  --tree-active: #67e8f9;
  --tree-active-soft: rgba(103, 232, 249, 0.42);
  --tree-border: rgba(148, 163, 184, 0.34);
  --tree-bg: rgba(15, 23, 42, 0.84);
  width: min(100%, 544px);
  position: relative;
  margin: 4px 0 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.78)),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(148, 163, 184, 0.035) 35px 36px),
    repeating-linear-gradient(90deg, transparent 0 35px, rgba(148, 163, 184, 0.035) 35px 36px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hr-status-tree-node,
.hr-status-tree-branch {
  position: absolute;
  z-index: 2;
}

.hr-status-tree-branch {
  z-index: 3;
}

.hr-status-tree-node .hr-status-map-node,
.hr-status-tree-branch .hr-status-map-branch,
.hr-status-tree-branch .hr-status-map-select-caption {
  width: 100%;
  min-height: 76px;
  box-shadow:
    0 0 0 5px rgba(17, 24, 39, 0.95),
    0 14px 30px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hr-status-tree-branch .hr-status-map-branches,
.hr-status-tree-branch .hr-status-map-branches.single {
  width: 100%;
}

.hr-status-tree-branch .hr-status-map-select-wrap {
  width: 100%;
}

.hr-status-tree-branch .hr-status-map-select-caption {
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
}

.hr-status-tree-branch .hr-status-map-select-wrap.active .hr-status-map-select-caption,
.hr-status-tree-branch .hr-status-map-select-wrap:focus-within .hr-status-map-select-caption {
  box-shadow:
    0 0 0 5px rgba(17, 24, 39, 0.95),
    0 0 26px var(--tree-active-soft);
}

.hr-app-tree-canvas {
  --tree-line: rgba(100, 116, 139, 0.64);
  --tree-line-soft: rgba(100, 116, 139, 0.2);
  --tree-active: #67e8f9;
  --tree-active-soft: rgba(103, 232, 249, 0.42);
  --tree-border: rgba(148, 163, 184, 0.34);
  --tree-bg: rgba(15, 23, 42, 0.84);
  width: min(100%, 430px);
  height: 330px;
  position: relative;
  margin: 4px 0 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.78)),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(148, 163, 184, 0.035) 35px 36px),
    repeating-linear-gradient(90deg, transparent 0 35px, rgba(148, 163, 184, 0.035) 35px 36px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hr-app-tree-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

.hr-app-tree-path {
  fill: none;
  stroke: transparent;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.hr-app-tree-path.base {
  stroke: var(--tree-line);
  opacity: 0.72;
  filter: drop-shadow(0 0 4px var(--tree-line-soft));
}

.hr-app-tree-path.active-route {
  stroke: var(--tree-active);
  opacity: 1;
  filter:
    drop-shadow(0 0 5px rgba(103, 232, 249, 0.46))
    drop-shadow(0 0 14px rgba(59, 130, 246, 0.24));
}

.hr-app-tree-node {
  display: grid;
  place-items: center;
  width: 150px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--tree-border);
  border-radius: 11px;
  color: #e5efff;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.94));
  box-shadow:
    0 0 0 5px rgba(17, 24, 39, 0.95),
    0 14px 30px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 13px;
  font-weight: 950;
  text-align: center;
  position: absolute;
  z-index: 2;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.hr-app-tree-node.apply {
  left: 20px;
  top: 0;
  border-color: var(--tree-border);
}

.hr-app-tree-node.check {
  left: 20px;
  top: 104px;
  border-color: var(--tree-border);
}

.hr-app-tree-node.valid {
  left: 20px;
  top: 224px;
  border-color: var(--tree-border);
}

.hr-app-tree-node.early-withdraw {
  left: 210px;
  top: 104px;
  color: #fecdd3;
  border-color: var(--tree-border);
}

.hr-app-tree-select-box {
  position: absolute;
  left: 210px;
  top: 224px;
  width: 150px;
  z-index: 3;
}

.hr-app-tree-select {
  appearance: auto;
  width: 100%;
  min-height: 58px;
  padding: 10px 30px 10px 12px;
  border: 1px solid var(--tree-border);
  border-radius: 11px;
  color: #e5efff;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow:
    0 0 0 5px rgba(17, 24, 39, 0.95),
    0 14px 30px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
  text-align: center;
  text-align-last: center;
  outline: none;
  cursor: pointer;
}

.hr-app-tree-node:hover,
.hr-app-tree-node.active {
  color: #fff;
  border-color: var(--tree-active);
  background:
    linear-gradient(180deg, rgba(30, 64, 175, 0.78), rgba(8, 47, 73, 0.94));
  box-shadow:
    0 0 0 5px rgba(17, 24, 39, 0.95),
    0 0 26px var(--tree-active-soft);
  transform: translateY(-1px);
}

.hr-app-tree-select-box.active .hr-app-tree-select {
  color: #fff;
  border-color: var(--tree-active);
  background:
    linear-gradient(180deg, rgba(30, 64, 175, 0.78), rgba(8, 47, 73, 0.94));
  box-shadow:
    0 0 0 5px rgba(17, 24, 39, 0.95),
    0 0 26px var(--tree-active-soft);
}

.hr-app-tree-select:focus {
  color: #fff;
  border-color: var(--tree-active);
  background:
    linear-gradient(180deg, rgba(71, 85, 105, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow:
    0 0 0 4px rgba(17, 24, 39, 0.95),
    0 0 0 6px rgba(103, 232, 249, 0.16),
    0 12px 28px rgba(2, 6, 23, 0.32);
}

.hr-app-tree-select option {
  color: #0f172a;
  background: #fff;
}

.hr-app-tree-node.kind-lost {
  color: #fecdd3;
  border-color: var(--tree-border);
}

.hr-app-tree-node.kind-lost.active {
  border-color: var(--tree-active);
  background:
    linear-gradient(180deg, rgba(30, 64, 175, 0.78), rgba(8, 47, 73, 0.94));
}

.hr-inline-attempt {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.hr-inline-attempt > div:first-child {
  display: grid;
  gap: 2px;
}

.hr-inline-attempt strong {
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.hr-inline-attempt small {
  color: #93a0bb;
  font-size: 11px;
}

.hr-inline-attempt .hr-pdf-contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hr-inline-attempt .hr-pdf-contact-grid select {
  grid-column: 1 / -1;
}

.hr-inline-attempt .hr-pdf-contact-grid button {
  min-height: 46px;
  padding: 6px;
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: none;
}

.hr-inline-attempt .hr-pdf-contact-grid button span {
  color: #93c5fd;
  font-size: 20px;
}

.hr-inline-attempt .hr-pdf-contact-grid button strong {
  color: #93a0bb;
  font-size: 10px;
}

.hr-inline-attempt .hr-pdf-contact-grid button.active {
  border-color: var(--tone);
  background: color-mix(in srgb, var(--tone), #111827 68%);
}

.hr-simple-status-area {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.hr-simple-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.hr-simple-status-grid.branch {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.hr-simple-status-node {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 9px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.74);
  font-size: 12px;
  font-weight: 950;
  text-align: left;
}

.hr-simple-status-node:hover,
.hr-simple-status-node.active {
  color: #fff;
  border-color: var(--tone);
  background: color-mix(in srgb, var(--tone), #111827 78%);
  transform: translateY(-1px);
}

.hr-simple-status-node.active .hr-simple-status-order {
  color: #020617;
  background: #fff;
}

.hr-simple-status-node.kind-lost,
.hr-simple-status-node.kind-alert {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.2);
  background: rgba(3, 7, 18, 0.7);
}

.hr-simple-status-node.kind-lost.active,
.hr-simple-status-node.kind-alert.active {
  border-color: #fb7185;
  background: rgba(127, 29, 29, 0.46);
}

.hr-simple-status-node span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hr-simple-status-node small {
  flex: 0 0 auto;
  margin-left: auto;
  color: #93a0bb;
  font-size: 10px;
}

.module-hr .applicant-operation-log {
  border-color: rgba(148, 163, 184, 0.14);
  background: #151a27;
}

.module-hr .applicant-operation-log summary b {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.22);
}

.module-hr .operation-log-list {
  padding: 0 10px 10px;
}

.module-hr .operation-log-list article {
  border-color: rgba(148, 163, 184, 0.12);
}

.module-hr .hr-detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.52fr);
  gap: 14px;
  padding: 16px 18px 20px;
}

.module-hr .hr-detail-editor,
.module-hr .hr-detail-side {
  min-width: 0;
}

.module-hr .hr-detail-editor .hr-wire-floating-panel,
.module-hr .hr-detail-side .hr-wire-status-menu {
  position: static;
}

.module-hr .hr-detail-side {
  display: grid;
  align-content: start;
  gap: 12px;
}

.module-hr .hr-detail-history {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: #151a27;
}

.module-hr .hr-detail-history div:last-child {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.module-hr .hr-detail-history span {
  display: grid;
  gap: 3px;
  padding-left: 12px;
  border-left: 2px solid var(--tone);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
}

.module-hr .hr-detail-history b {
  color: #fff;
}

.module-hr .hr-wire-command-panel {
  top: 20px;
  max-height: calc(100dvh - 40px);
}

.module-hr .hr-wire-floating-panel,
.module-hr .hr-wire-status-menu {
  border-color: rgba(148, 163, 184, 0.14);
  background: #151a27;
  box-shadow: none;
}

.module-hr .table-input,
.module-hr .table-select,
.module-hr .table-textarea,
.module-hr .select {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.22);
  background: #0f172a;
}

.module-hr .table-input::placeholder,
.module-hr .table-textarea::placeholder {
  color: #6f7c96;
}

.module-hr .hr-pdf-editor-section,
.module-hr .hr-pdf-contact-grid,
.module-hr .hr-check-grid {
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.66);
}

.module-hr .hr-wire-floating-head {
  border-bottom-color: rgba(148, 163, 184, 0.1);
}

.module-hr .hr-wire-floating-head strong,
.module-hr .hr-wire-section-title strong,
.module-hr .hr-pdf-section-title strong {
  color: #fff;
}

.module-hr .hr-wire-floating-head b {
  background: var(--blue);
}

.module-hr .hr-wire-input-section {
  border-color: rgba(8, 145, 178, 0.22);
  background: rgba(8, 145, 178, 0.08);
}

.module-hr .hr-wire-facts {
  background: rgba(15, 23, 42, 0.72);
}

.module-hr .hr-wire-facts small {
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.92);
}

.module-hr .hr-wire-facts b {
  color: #f8fafc;
}

.module-hr .hr-wire-menu-columns button {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.82);
}

.module-hr .hr-wire-menu-columns button.active {
  color: #fff;
  border-color: #4f6fff;
  background: rgba(79, 111, 255, 0.3);
}

.module-hr .hr-wire-menu-columns button.branch {
  border-color: rgba(251, 113, 133, 0.22);
  background: rgba(251, 113, 133, 0.08);
}

.module-hr .hr-wire-support-grid {
  display: none;
}

.hr-hub-dashboard {
  display: grid;
  gap: 14px;
}

.hr-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hr-dashboard-kpi,
.hr-dashboard-panel {
  --panel-tone: #4f6fff;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel-tone), transparent 88%), rgba(20, 25, 38, 0.98) 44%),
    #141923;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.hr-dashboard-kpi {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 18px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.hr-dashboard-kpi:hover,
.hr-dashboard-panel:hover {
  border-color: color-mix(in srgb, var(--panel-tone), white 8%);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
}

.hr-dashboard-kpi span,
.hr-dashboard-panel-head span {
  color: var(--panel-tone);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hr-dashboard-kpi strong {
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.hr-dashboard-kpi small,
.hr-dashboard-panel-head small {
  color: #93a0bb;
  font-size: 12px;
  font-weight: 800;
}

.hr-dashboard-kpi.tone-interview,
.hr-dashboard-panel .tone-interview,
.hr-dashboard-team.tone-interview { --panel-tone: #8b5cf6; }
.hr-dashboard-kpi.tone-offer,
.hr-dashboard-kpi.tone-contract,
.hr-dashboard-team.tone-contract { --panel-tone: #f59e0b; }
.hr-dashboard-kpi.tone-project,
.hr-dashboard-kpi.tone-onboarding,
.hr-dashboard-team.tone-project { --panel-tone: #34d399; }

.hr-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.hr-dashboard-panel {
  padding: 16px;
  min-width: 0;
}

.hr-dashboard-flow-panel,
.hr-dashboard-recent-panel {
  grid-column: 1 / -1;
}

.hr-dashboard-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.hr-dashboard-panel-head strong {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-size: 18px;
}

.hr-dashboard-phase-list,
.hr-dashboard-team-list,
.hr-dashboard-source-list,
.hr-dashboard-recent-list {
  display: grid;
  gap: 9px;
}

.hr-dashboard-phase-row,
.hr-dashboard-recent-row {
  width: 100%;
  display: grid;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.64);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.hr-dashboard-phase-row {
  --phase-tone: #4f6fff;
  grid-template-columns: 44px minmax(120px, 0.32fr) minmax(160px, 1fr) 72px;
  min-height: 48px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #dbeafe;
}

.hr-dashboard-phase-row:hover,
.hr-dashboard-phase-row.active,
.hr-dashboard-recent-row:hover {
  transform: translateY(-1px);
  border-color: var(--phase-tone, #4f6fff);
  background: color-mix(in srgb, var(--phase-tone, #4f6fff), #111827 82%);
}

.hr-dashboard-phase-row span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--phase-tone);
  font-size: 12px;
  font-weight: 950;
}

.hr-dashboard-phase-row b,
.hr-dashboard-phase-row strong {
  color: #fff;
  font-size: 13px;
}

.hr-dashboard-phase-row i,
.hr-dashboard-source-row i,
.hr-dashboard-recent-row i,
.hr-dashboard-mini-meter,
.hr-hub-phase-bar i {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.95);
}

.hr-dashboard-phase-row em,
.hr-dashboard-source-row em,
.hr-dashboard-recent-row em,
.hr-dashboard-mini-meter i,
.hr-hub-phase-bar i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--phase-tone, var(--panel-tone, #4f6fff)), color-mix(in srgb, var(--phase-tone, var(--panel-tone, #4f6fff)), white 30%));
}

.hr-dashboard-phase-row.phase-entry { --phase-tone: #4f6fff; }
.hr-dashboard-phase-row.phase-interview { --phase-tone: #8b5cf6; }
.hr-dashboard-phase-row.phase-offer,
.hr-dashboard-phase-row.phase-contract { --phase-tone: #f59e0b; }
.hr-dashboard-phase-row.phase-project,
.hr-dashboard-phase-row.phase-onboarding { --phase-tone: #34d399; }

.hr-dashboard-team {
  --panel-tone: #4f6fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--panel-tone), transparent 68%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-tone), #111827 88%);
}

.hr-dashboard-team span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 4px;
  padding: 3px 7px;
  border-radius: 7px;
  color: #fff;
  background: var(--panel-tone);
  font-size: 11px;
  font-weight: 950;
}

.hr-dashboard-team strong,
.hr-dashboard-team b {
  color: #fff;
}

.hr-dashboard-team b {
  font-size: 28px;
  line-height: 1;
}

.hr-dashboard-team small {
  color: #b6c0d5;
  font-size: 12px;
  font-weight: 800;
}

.hr-dashboard-mini-meter {
  grid-column: 1 / -1;
}

.hr-dashboard-source-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(140px, 1fr) 52px;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 900;
}

.hr-dashboard-source-row strong {
  color: #fff;
  text-align: right;
}

.hr-dashboard-recent-row {
  --phase-tone: #4f6fff;
  grid-template-columns: 82px minmax(130px, 0.45fr) minmax(180px, 1fr) minmax(180px, 0.75fr) minmax(140px, 0.7fr);
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: left;
}

.hr-dashboard-recent-row.tone-interview { --phase-tone: #8b5cf6; }
.hr-dashboard-recent-row.tone-offer,
.hr-dashboard-recent-row.tone-contract { --phase-tone: #f59e0b; }
.hr-dashboard-recent-row.tone-project,
.hr-dashboard-recent-row.tone-onboarding,
.hr-dashboard-recent-row.tone-win { --phase-tone: #34d399; }
.hr-dashboard-recent-row.tone-alert { --phase-tone: #fb7185; }
.hr-dashboard-recent-row.tone-lost { --phase-tone: #64748b; }

.hr-dashboard-recent-row span {
  color: var(--phase-tone);
  font-size: 12px;
  font-weight: 950;
}

.hr-dashboard-recent-row strong {
  color: #fff;
}

.hr-dashboard-recent-row small,
.hr-dashboard-recent-row b {
  color: #aeb8cf;
  font-size: 12px;
  font-weight: 850;
}

.hr-hub-phase-bars {
  display: grid;
  gap: 7px;
}

.hr-hub-phase-bars.compact {
  margin-top: 10px;
  gap: 6px;
}

.hr-hub-phase-bar {
  --phase-tone: #4f6fff;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  opacity: 0.45;
}

.hr-hub-phase-bar.active {
  opacity: 1;
}

.hr-hub-phase-bar span,
.hr-hub-phase-bar strong {
  color: #91a0bd;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.hr-hub-phase-bar.active span,
.hr-hub-phase-bar.active strong {
  color: var(--phase-tone);
}

.hr-hub-phase-bar.phase-entry { --phase-tone: #4f6fff; }
.hr-hub-phase-bar.phase-interview { --phase-tone: #8b5cf6; }
.hr-hub-phase-bar.phase-offer,
.hr-hub-phase-bar.phase-contract { --phase-tone: #f59e0b; }
.hr-hub-phase-bar.phase-project,
.hr-hub-phase-bar.phase-onboarding { --phase-tone: #34d399; }

.hr-hub-phase-bars.is-parallel {
  display: grid;
  gap: 6px;
}

.hr-hub-phase-bars.is-parallel.compact {
  gap: 5px;
}

.hr-hub-phase-group {
  display: grid;
  gap: 5px;
}

.hr-hub-phase-group.pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hr-hub-phase-item {
  --phase-tone: #4f6fff;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.38);
  opacity: 0.7;
}

.hr-hub-phase-item.active {
  border-color: color-mix(in srgb, var(--phase-tone), transparent 64%);
  opacity: 1;
}

.hr-hub-phase-item span,
.hr-hub-phase-item strong {
  color: #91a0bd;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}

.hr-hub-phase-item.active span,
.hr-hub-phase-item.active strong {
  color: var(--phase-tone);
}

.hr-hub-phase-item i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.hr-hub-phase-item i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--phase-tone);
  box-shadow: 0 0 12px color-mix(in srgb, var(--phase-tone), transparent 48%);
}

.hr-hub-phase-item.phase-entry { --phase-tone: #4f6fff; }
.hr-hub-phase-item.phase-interview { --phase-tone: #8b5cf6; }
.hr-hub-phase-item.phase-offer,
.hr-hub-phase-item.phase-contract { --phase-tone: #f59e0b; }
.hr-hub-phase-item.phase-project,
.hr-hub-phase-item.phase-onboarding { --phase-tone: #34d399; }

.recruitment-table {
  min-width: 0;
  display: block;
}

.recruitment-table thead {
  display: none;
}

.recruitment-table tbody {
  display: grid;
  gap: 12px;
}

.recruitment-table tr {
  display: grid;
  grid-template-columns:
    minmax(120px, 0.62fr)
    minmax(210px, 1.05fr)
    minmax(240px, 1.25fr)
    minmax(150px, 0.78fr)
    minmax(135px, 0.7fr)
    minmax(160px, 0.82fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.recruitment-table td {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 0;
  border: 0;
  white-space: normal;
}

.recruitment-table td::before {
  content: attr(data-label);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.recruitment-table td[data-label="NGメモ"],
.recruitment-table td[data-label="Meet/案件メモ"] {
  grid-column: span 3;
}

.recruitment-table td[data-label="保存"] {
  align-self: end;
}

.recruitment-table .table-select,
.recruitment-table .table-input,
.recruitment-table .table-textarea {
  min-width: 0;
}

.table-input,
.table-textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  outline: none;
}

.table-input {
  min-width: 150px;
  min-height: 36px;
  padding: 7px 9px;
}

.table-textarea {
  display: block;
  min-width: 210px;
  min-height: 62px;
  margin-top: 7px;
  padding: 8px 9px;
  resize: vertical;
}

.status-meter {
  width: 100%;
  height: 9px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(102, 115, 143, 0.16);
}

.status-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2458ff, #795cff);
  transition: width 220ms ease, background 180ms ease;
}

.status-meter.status-cool span {
  background: linear-gradient(90deg, #00bde7, #2458ff);
}

.status-meter.status-warm span {
  background: linear-gradient(90deg, #c9860a, #18a66a);
}

.status-meter.status-strong span {
  background: linear-gradient(90deg, #18a66a, #00bde7);
}

.status-meter.status-muted span {
  background: linear-gradient(90deg, #020617, #475569);
}

.recruitment-table tr.is-inactive {
  background: rgba(102, 115, 143, 0.055);
}

.recruitment-table tr.is-aged-inactive {
  opacity: 0.68;
}

.compact-table {
  min-width: 620px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.kpi {
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--cyan));
}

.kpi span {
  color: #5e6b8a;
  font-size: 13px;
  font-weight: 700;
}

.kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  line-height: 1.18;
}

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

.panel:hover,
.kpi:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 189, 231, 0.28);
  box-shadow: 0 20px 42px rgba(22, 38, 112, 0.13);
}

.dashboard-table-wrap td strong,
.dashboard-table-wrap td small {
  display: block;
}

.responsive-table td,
.responsive-table th {
  overflow-wrap: anywhere;
}

.dashboard-table-wrap td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
}

.panel {
  padding: 18px;
  min-width: 0;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.3;
}

.chart {
  width: 100%;
  height: 260px;
  display: block;
}

.table-wrap {
  overflow: auto;
  max-width: 100%;
  scrollbar-gutter: stable;
  overscroll-behavior-inline: contain;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  font-size: 12px;
  color: #586682;
  background: rgba(244, 247, 255, 0.78);
}

tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(49, 87, 255, 0.1);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.badge-secure {
  background: rgba(0, 189, 231, 0.12);
  color: #086f87;
}

.badge-muted {
  background: rgba(102, 115, 143, 0.12);
  color: #66738f;
}

.badge-warn {
  background: rgba(201, 134, 10, 0.13);
  color: #8a5a04;
}

.profile-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.profile-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}

.profile-card h2 {
  margin: 0 0 4px;
}

.profile-card p {
  margin: 0 0 10px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--magenta));
  box-shadow: inset 0 1px 16px rgba(255, 255, 255, 0.26), 0 16px 30px rgba(36, 88, 255, 0.18);
}

.profile-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.profile-grid .wide {
  grid-column: span 2;
}

.profile-actions {
  margin-top: 4px;
}

.passkey-panel {
  grid-column: 2;
}

.passkey-panel p {
  margin: 0 0 14px;
}

.auth-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.auth-status-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(245, 247, 255, 0.72);
}

.auth-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.auth-status-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

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

.staff-card {
  border: 1px solid rgba(37, 99, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(242, 248, 255, 0.86)),
    var(--panel-solid);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.staff-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(0, 189, 231, 0.08), rgba(182, 77, 255, 0.08));
}

.staff-card-head h2 {
  margin: 0;
  font-size: 18px;
}

.staff-card-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.staff-metric {
  border: 1px solid rgba(37, 99, 255, 0.14);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.staff-metric.accent {
  border-color: rgba(0, 189, 231, 0.26);
  background: rgba(0, 189, 231, 0.06);
}

.staff-metric.wide {
  grid-column: 1 / -1;
}

.staff-metric span {
  display: block;
  color: #5e6b8a;
  font-size: 12px;
  font-weight: 900;
}

.staff-metric strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
  line-height: 1.2;
}

.staff-metric small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.staff-detail-table {
  margin-top: 16px;
}

.status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 6px;
}

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

.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tabs .chip {
  flex: 0 0 auto;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.master-editor {
  padding: 18px;
  position: sticky;
  top: 86px;
}

.master-editor h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-block;
  border: 1px solid rgba(16, 23, 47, 0.12);
  vertical-align: middle;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.switch-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex: 0 0 auto;
  accent-color: var(--blue);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 23, 47, 0.34);
}

.modal {
  width: min(980px, 100%);
  max-height: min(94vh, 920px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.94);
}

.modal-sm {
  width: min(760px, 100%);
}

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

.modal-sm .modal-body > .error,
.modal-sm .modal-body > .notice,
.modal-sm .modal-body > .inline-actions,
.modal-sm .field.wide {
  grid-column: 1 / -1;
}

.modal-sm .field {
  margin-bottom: 0;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.96);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-body {
  padding: 20px;
}

.modal-note {
  margin: 16px 20px 0;
  padding: 10px 12px;
  border: 1px solid rgba(24, 166, 106, 0.22);
  border-radius: 8px;
  color: #087a4b;
  background: rgba(24, 166, 106, 0.08);
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 14px;
  padding: 16px 20px 12px;
}

.project-form-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px 10px;
  padding: 14px 18px 10px;
  align-items: end;
}

.modal .field {
  margin-bottom: 8px;
}

.project-form-grid .field {
  margin-bottom: 0;
}

.project-form-grid .field label {
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0;
}

.project-form-grid input,
.project-form-grid select {
  min-height: 38px;
  height: 38px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.project-form-grid textarea {
  min-height: 56px;
}

.project-field-xs {
  grid-column: span 2;
}

.project-field-sm {
  grid-column: span 3;
}

.project-field-md {
  grid-column: span 4;
}

.project-field-lg {
  grid-column: span 5;
}

.form-grid .wide {
  grid-column: span 3;
}

.project-form-grid .wide {
  grid-column: 1 / -1;
}

.project-legacy-amount-field {
  display: none;
}

.project-invoice-grid {
  display: grid;
  gap: 14px;
  padding: 2px 20px 14px;
}

.project-invoice-section {
  border: 1px solid rgba(91, 112, 255, 0.18);
  border-radius: 10px;
  background: rgba(248, 250, 255, 0.92);
  overflow: hidden;
}

.project-invoice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(91, 112, 255, 0.16);
  background: linear-gradient(90deg, rgba(0, 194, 255, 0.08), rgba(91, 87, 255, 0.08));
}

.project-invoice-head h3 {
  margin: 0;
  font-size: 15px;
}

.project-invoice-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.project-detail-pair-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.project-detail-pair {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(91, 112, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.project-detail-pair-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.project-detail-pair-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.project-detail-pair-actions .mini-button {
  min-width: 34px;
  padding-inline: 8px;
}

.project-pair-description {
  display: grid;
  gap: 4px;
}

.project-pair-description span,
.project-detail-lane label span,
.project-detail-subtotal > span {
  color: #52637f;
  font-size: 11px;
  font-weight: 900;
}

.project-detail-lanes {
  display: grid;
  gap: 8px;
}

.project-detail-lane {
  display: grid;
  grid-template-columns: 58px minmax(120px, 1fr) 82px 18px minmax(120px, 1fr) minmax(110px, 0.9fr);
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(91, 112, 255, 0.14);
  border-radius: 9px;
  background: rgba(246, 248, 255, 0.86);
}

.project-detail-lane.cost {
  background: rgba(255, 248, 235, 0.78);
  border-color: rgba(201, 134, 10, 0.18);
}

.project-detail-lane-label {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 7px;
  color: #1d4ed8;
  background: rgba(49, 87, 255, 0.1);
  font-size: 13px;
  font-weight: 950;
}

.project-detail-lane.cost .project-detail-lane-label {
  color: #92400e;
  background: rgba(201, 134, 10, 0.12);
}

.project-detail-lane label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-detail-lane .table-input,
.project-detail-lane .table-select {
  min-height: 32px;
  height: 32px;
  padding-block: 4px;
  font-size: 13px;
}

.project-money-control,
.project-quantity-control {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-money-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 13px;
}

.project-money-head b {
  color: #52637f;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.project-money-head .table-select {
  width: 66px;
  min-width: 66px;
  min-height: 18px;
  height: 18px;
  padding: 0 17px 0 6px;
  font-size: 10px;
  line-height: 1;
}

.project-detail-lane .quantity-input {
  min-width: 0;
  padding-inline: 6px;
  text-align: center;
}

.project-detail-plus {
  display: grid;
  place-items: center;
  height: 32px;
  color: #64748b;
  font-size: 15px;
  font-weight: 950;
}

.project-invoice-table-wrap {
  overflow-x: visible;
}

.project-invoice-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.project-invoice-table th,
.project-invoice-table td {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(91, 112, 255, 0.14);
  text-align: left;
  vertical-align: middle;
}

.project-invoice-table th {
  color: #52637f;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.project-invoice-table td:first-child,
.project-invoice-table th:first-child {
  width: 46px;
  text-align: center;
}

.project-invoice-table td:nth-child(2) {
  min-width: 190px;
}

.project-invoice-table .money-input {
  min-width: 112px;
}

.project-invoice-table .quantity-input {
  min-width: 82px;
}

.project-detail-row-number {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(49, 87, 255, 0.1);
  font-size: 12px;
  font-weight: 950;
}

.project-detail-subtotal {
  min-width: 0;
  color: #111827;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid rgba(91, 112, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.project-detail-subtotal small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.project-form-compact {
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 6px 8px;
  padding: 10px 14px 8px;
}

.project-form-compact .field label {
  margin-bottom: 2px;
  font-size: 10px;
}

.project-form-compact input,
.project-form-compact select {
  min-height: 32px;
  height: 32px;
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 13px;
}

.project-form-compact textarea {
  min-height: 42px;
}

.project-form-compact .project-field-xs {
  grid-column: span 2;
}

.project-form-compact .project-field-sm {
  grid-column: span 3;
}

.project-form-compact .project-field-md {
  grid-column: span 4;
}

.project-form-compact .project-field-lg {
  grid-column: span 5;
}

.project-evaluation-section {
  border-color: rgba(20, 184, 166, 0.24);
}

.project-evaluation-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.project-pair-evaluation {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding: 10px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 10px;
  background: rgba(240, 253, 250, 0.52);
}

.project-pair-evaluation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-pair-evaluation-head div {
  display: grid;
  gap: 2px;
}

.project-pair-evaluation-head strong {
  color: #0f766e;
  font-size: 12px;
}

.project-pair-evaluation-head span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.project-evaluation-list.compact {
  gap: 7px;
  padding: 0;
}

.project-evaluation-list.compact .project-evaluation-row {
  grid-template-columns: 26px minmax(150px, 1fr) minmax(96px, 0.6fr) minmax(190px, 1fr) auto;
  padding: 8px;
}

.project-evaluation-list.compact .project-evaluation-preview {
  min-height: 30px;
  padding-block: 5px;
}

.project-pair-evaluation .project-evaluation-total {
  margin: 0;
}

.project-evaluation-row {
  display: grid;
  grid-template-columns: 30px minmax(170px, 1.2fr) minmax(120px, 0.7fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  padding: 11px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 10px;
  background: rgba(240, 253, 250, 0.76);
}

.project-evaluation-row label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-evaluation-row label span {
  color: #52637f;
  font-size: 11px;
  font-weight: 900;
}

.project-evaluation-rate {
  position: relative;
}

.project-evaluation-rate input {
  padding-right: 28px;
}

.project-evaluation-rate b {
  position: absolute;
  right: 9px;
  bottom: 9px;
  color: #64748b;
  font-size: 12px;
}

.project-evaluation-preview {
  min-height: 34px;
  display: grid;
  align-content: center;
  padding: 7px 10px;
  border: 1px solid rgba(20, 184, 166, 0.16);
  border-radius: 8px;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.project-evaluation-total {
  margin: 0 14px 14px;
  padding: 9px 12px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 8px;
  color: #0f766e;
  background: rgba(240, 253, 250, 0.72);
  font-size: 12px;
  font-weight: 950;
}

.project-evaluation-total.is-warning {
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 251, 235, 0.8);
}

.mini-button.danger,
.ghost.danger {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.24);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 20px 14px;
}

.summary-strip div {
  background: rgba(245, 247, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.summary-strip.project-invoice-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.project-invoice-summary div {
  min-width: 0;
}

.module-sales .project-invoice-section {
  border-color: rgba(79, 111, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(23, 30, 48, 0.96), rgba(16, 22, 36, 0.98)),
    #111827;
}

.module-sales .project-invoice-head {
  border-color: rgba(148, 163, 184, 0.12);
  background: linear-gradient(90deg, rgba(0, 189, 231, 0.12), rgba(124, 58, 237, 0.14));
}

.module-sales .project-invoice-head h3,
.module-sales .project-detail-subtotal {
  color: #f8fafc;
}

.module-sales .project-invoice-head p,
.module-sales .project-pair-description span,
.module-sales .project-detail-lane label span,
.module-sales .project-money-head b,
.module-sales .project-detail-subtotal small,
.module-sales .summary-strip span {
  color: #a7b3c8;
}

.module-sales .project-detail-pair {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.module-sales .project-detail-row-number,
.module-sales .project-detail-lane-label {
  color: #dbeafe;
  background: rgba(79, 111, 255, 0.18);
}

.module-sales .project-detail-lane {
  border-color: rgba(79, 111, 255, 0.18);
  background: rgba(17, 24, 39, 0.78);
}

.module-sales .project-detail-lane.cost {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(34, 27, 13, 0.62);
}

.module-sales .project-detail-lane.cost .project-detail-lane-label {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
}

.module-sales .project-detail-subtotal,
.module-sales .summary-strip div {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.82);
}

.module-sales .project-evaluation-row {
  border-color: rgba(20, 184, 166, 0.24);
  background: rgba(12, 32, 35, 0.74);
}

.project-detail-sections,
.project-detail-section,
.project-detail-line-list {
  display: grid;
  gap: 8px;
}

.project-detail-section {
  padding: 8px;
  border: 1px solid rgba(91, 112, 255, 0.12);
  border-radius: 10px;
  background: rgba(248, 250, 255, 0.6);
}

.project-detail-section.cost {
  border-color: rgba(245, 158, 11, 0.14);
  background: rgba(255, 250, 235, 0.54);
}

.project-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-detail-section-head strong {
  font-size: 13px;
  font-weight: 950;
}

.project-detail-lane {
  grid-template-columns: 52px minmax(120px, 1.2fr) minmax(108px, 0.95fr) 64px 18px minmax(108px, 0.95fr) minmax(106px, 0.85fr) auto;
}

.project-line-description {
  min-width: 0;
}

.project-detail-line-remove {
  align-self: center;
  min-width: 52px;
}

.project-detail-line-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.project-detail-line-actions .mini-button {
  min-width: 32px;
  padding-inline: 7px;
}

.project-detail-line-remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.master-order-actions {
  flex-wrap: nowrap;
  gap: 4px;
}

.master-order-actions .mini-button {
  min-width: 34px;
  padding-inline: 8px;
}

.dashboard-department-panel {
  border-top: 3px solid #14b8a6;
}

.module-sales .project-detail-section {
  border-color: rgba(79, 111, 255, 0.18);
  background: rgba(15, 23, 42, 0.5);
}

.module-sales .project-detail-section.cost {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(34, 27, 13, 0.48);
}

.module-sales .project-detail-section-head strong {
  color: #f8fafc;
}

/* Stable invoice-detail layout: keep fields from colliding in the project modal. */
.project-detail-lane {
  grid-template-columns: 54px minmax(150px, 1.35fr) minmax(126px, 1fr) minmax(72px, 0.45fr) minmax(126px, 1fr) minmax(118px, 0.85fr);
  grid-template-areas:
    "kind desc unit qty transport subtotal"
    "kind actions actions actions actions actions";
  align-items: stretch;
}

.project-detail-lane-label {
  grid-area: kind;
}

.project-line-description {
  grid-area: desc;
}

.project-detail-lane .project-money-control:nth-of-type(2) {
  grid-area: unit;
}

.project-quantity-control {
  grid-area: qty;
}

.project-detail-lane .project-money-control:nth-of-type(4) {
  grid-area: transport;
}

.project-detail-subtotal {
  grid-area: subtotal;
}

.project-detail-line-actions {
  grid-area: actions;
  min-width: 0;
}

.project-detail-plus {
  display: none;
}

.module-sales .project-pair-evaluation {
  border-color: rgba(20, 184, 166, 0.24);
  background: rgba(8, 27, 31, 0.66);
}

.module-sales .project-pair-evaluation-head strong {
  color: #99f6e4;
}

.module-sales .project-pair-evaluation-head span {
  color: #a7b3c8;
}

.module-sales .project-evaluation-row label span,
.module-sales .project-evaluation-rate b {
  color: #a7b3c8;
}

.module-sales .project-evaluation-preview,
.module-sales .project-evaluation-total {
  color: #99f6e4;
  border-color: rgba(20, 184, 166, 0.24);
  background: rgba(15, 23, 42, 0.82);
}

.module-sales .project-evaluation-total.is-warning {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(42, 31, 12, 0.82);
}

.module-sales .summary-strip strong {
  color: #f8fafc;
}

.invoice-workbench {
  display: grid;
  gap: 18px;
}

.invoice-editor-card,
.invoice-print-sheet {
  border-top: 3px solid #14b8a6;
}

.invoice-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.invoice-toolbar label {
  display: grid;
  gap: 6px;
  min-width: min(440px, 100%);
}

.invoice-toolbar label span,
.invoice-editor-grid label span,
.invoice-lines-head p,
.invoice-line label span,
.invoice-line-subtotal small {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.invoice-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.invoice-editor-grid label {
  display: grid;
  gap: 6px;
}

.invoice-editor-grid .wide {
  grid-column: span 2;
}

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

.invoice-lines-head h2 {
  margin: 0;
  font-size: 18px;
}

.invoice-lines-head p {
  margin: 3px 0 0;
}

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

.invoice-line {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1.4fr) minmax(120px, 0.9fr) minmax(72px, 0.45fr) minmax(120px, 0.9fr) minmax(124px, 0.8fr) 64px;
  gap: 8px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid rgba(79, 111, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.invoice-line-number {
  display: grid;
  place-items: center;
  width: 30px;
  min-height: 58px;
  border-radius: 10px;
  background: linear-gradient(135deg, #14b8a6, #3b5bfd);
  color: #fff;
  font-weight: 950;
}

.invoice-line label,
.invoice-money-control,
.invoice-quantity-control {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.invoice-money-control > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.invoice-money-control select {
  width: 66px;
  min-width: 66px;
  min-height: 20px;
  height: 20px;
  padding: 0 17px 0 6px;
  font-size: 10px;
}

.invoice-line .table-input,
.invoice-line .table-select {
  min-width: 0;
  height: 34px;
}

.invoice-line-subtotal {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(79, 111, 255, 0.16);
  border-radius: 9px;
  background: rgba(248, 250, 252, 0.9);
  color: #101828;
  font-weight: 950;
  white-space: nowrap;
}

.summary-strip.invoice-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.invoice-print-sheet {
  padding: 28px;
  border: 1px solid rgba(79, 111, 255, 0.14);
  border-radius: 12px;
  background: #fff;
  color: #101828;
  box-shadow: 0 18px 44px rgba(31, 41, 55, 0.08);
}

.invoice-print-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 2px solid #101828;
  padding-bottom: 18px;
}

.invoice-print-head p {
  margin: 0 0 12px;
  color: #3b5bfd;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0;
}

.invoice-print-head h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.invoice-print-head dl {
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px 12px;
  margin: 0;
  min-width: 240px;
  font-size: 13px;
}

.invoice-print-head dt {
  color: #667085;
  font-weight: 800;
}

.invoice-print-head dd {
  margin: 0;
  text-align: right;
}

.invoice-total-box {
  display: grid;
  gap: 4px;
  margin: 22px 0;
  padding: 16px 18px;
  border-radius: 10px;
  background: #eef4ff;
}

.invoice-total-box span,
.invoice-total-box small {
  color: #52637f;
  font-weight: 800;
}

.invoice-total-box strong {
  font-size: 34px;
}

.invoice-print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.invoice-print-table th,
.invoice-print-table td {
  border-bottom: 1px solid #d0d5dd;
  padding: 10px;
  text-align: right;
}

.invoice-print-table th:first-child,
.invoice-print-table td:first-child {
  text-align: left;
}

.invoice-print-table thead th {
  background: #f2f4f7;
  color: #344054;
}

.invoice-print-table tfoot th,
.invoice-print-table tfoot td {
  font-weight: 950;
}

.invoice-print-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}

.invoice-print-notes div {
  min-height: 82px;
  padding: 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
}

.invoice-print-notes strong {
  display: block;
  margin-bottom: 6px;
}

.invoice-print-notes p {
  margin: 0;
  color: #344054;
  line-height: 1.7;
}

.module-sales .invoice-editor-card,
.module-sales .invoice-print-sheet {
  border-color: rgba(20, 184, 166, 0.34);
  background: rgba(15, 23, 42, 0.58);
}

.module-sales .invoice-line {
  border-color: rgba(79, 111, 255, 0.24);
  background: rgba(15, 23, 42, 0.7);
}

.module-sales .invoice-line-subtotal {
  border-color: rgba(79, 111, 255, 0.2);
  background: rgba(17, 24, 39, 0.86);
  color: #f8fafc;
}

.module-sales .invoice-print-sheet {
  background: #fff;
  color: #101828;
}

.module-sales .invoice-toolbar label span,
.module-sales .invoice-editor-grid label span,
.module-sales .invoice-lines-head p,
.module-sales .invoice-line label span,
.module-sales .invoice-line-subtotal small {
  color: #a7b3c8;
}

.module-sales .staff-card {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(30, 36, 54, 0.92), rgba(17, 24, 39, 0.96)),
    #151a27;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.module-sales .staff-card-head {
  border-color: rgba(148, 163, 184, 0.12);
  background: linear-gradient(90deg, rgba(0, 189, 231, 0.1), rgba(124, 58, 237, 0.12));
}

.module-sales .staff-card-head h2,
.module-sales .staff-metric strong {
  color: #f8fafc;
}

.module-sales .staff-card-head p,
.module-sales .staff-metric span,
.module-sales .staff-metric small {
  color: #a7b3c8;
}

.module-sales .staff-metric {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.72);
}

.module-sales .staff-metric.accent {
  border-color: rgba(0, 189, 231, 0.26);
  background: rgba(0, 189, 231, 0.09);
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.sales-import-panel {
  margin-bottom: 16px;
}

.panel-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sales-import-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  margin-top: 14px;
}

.file-drop {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px dashed rgba(59, 91, 253, 0.45);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
}

.module-sales .file-drop {
  border-color: rgba(0, 189, 231, 0.34);
  background: rgba(15, 23, 42, 0.68);
}

.file-drop input {
  width: 100%;
}

.file-drop span {
  font-weight: 800;
  color: var(--text);
}

.file-drop small {
  color: var(--muted);
}

@media print {
  body {
    background: #fff !important;
  }

  .topbar,
  .fab-add-project,
  .invoice-editor-card,
  .page-header,
  .filters,
  .mobile-menu-backdrop {
    display: none !important;
  }

  .layout,
  .layout.module-sales,
  .page {
    display: block !important;
    min-height: auto !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .invoice-workbench {
    display: block !important;
  }

  .invoice-print-sheet {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #101828 !important;
  }
}

/* Final sales UI fixes. Keep these at the end so older layout rules cannot win. */
.module-sales .filter-toolbar,
.module-sales .invoice-filter-panel,
.module-sales .sales-filter-sidebar {
  overflow: visible;
  z-index: 20;
}

.module-sales .filter-popover-wrap.open {
  z-index: 10000;
}

.filter-button-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-sales .filter-button {
  min-width: 0;
}

.module-sales .filter-button b {
  flex: 0 0 auto;
  max-width: 98px;
  overflow: hidden;
  padding: 3px 7px;
  border: 1px solid rgba(0, 189, 231, 0.22);
  border-radius: 999px;
  color: #9bdcff;
  background: rgba(0, 189, 231, 0.14);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-sales .filter-popover {
  overflow: visible;
}

.module-sales .filter-check-list {
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.module-sales .filter-check-item {
  min-height: 36px;
}

.module-sales .filter-check-item span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.module-sales .project-detail-plus {
  display: none !important;
}

.module-sales .project-detail-lane.cost {
  grid-template-columns: 54px minmax(150px, 1.2fr) minmax(116px, 0.78fr) minmax(116px, 0.78fr) minmax(126px, 0.9fr) minmax(112px, 0.72fr) !important;
  grid-template-areas:
    "kind meta meta meta meta meta"
    "kind desc unit qty transport subtotal"
    "kind actions actions actions actions actions" !important;
  align-items: end;
}

.module-sales .project-detail-lane-label {
  grid-area: kind;
}

.module-sales .project-line-description {
  grid-area: desc;
}

.module-sales .project-cost-meta-row {
  grid-area: meta;
  display: grid;
  grid-template-columns: minmax(140px, 0.6fr) minmax(220px, 1fr);
  gap: 8px;
  align-items: end;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(201, 134, 10, 0.18);
  border-radius: 9px;
  background: rgba(201, 134, 10, 0.08);
}

.module-sales .project-quantity-control {
  grid-area: qty;
}

.module-sales .project-detail-subtotal {
  grid-area: subtotal;
}

.module-sales .project-detail-line-actions {
  grid-area: actions;
}

.module-sales .project-cost-category-control,
.module-sales .project-cost-payee-control,
.module-sales .project-money-control,
.module-sales .project-quantity-control {
  min-width: 0;
}

.module-sales .project-cost-category-control,
.module-sales .project-cost-payee-control {
  display: grid;
  gap: 4px;
  grid-area: auto;
}

.module-sales .project-cost-category-control .table-select,
.module-sales .project-cost-payee-control .table-select {
  height: 34px;
}

.module-sales .project-money-head {
  min-width: 0;
}

.module-sales .project-money-head b {
  flex: 0 0 auto;
}

.module-sales .project-money-head .table-select {
  flex: 0 0 66px;
}

.module-sales .project-detail-lane.cost .project-detail-line-actions {
  justify-content: flex-end;
}

@media (max-width: 1120px) {
  .module-sales .project-detail-lane.cost {
    grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas:
      "kind desc desc"
      "kind meta meta"
      "kind unit qty"
      "kind transport subtotal"
      "kind actions actions" !important;
  }

  .module-sales .project-cost-meta-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .module-sales .project-detail-lane.cost {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "kind"
      "meta"
      "desc"
      "unit"
      "qty"
      "transport"
      "subtotal"
      "actions" !important;
  }

  .module-sales .project-cost-meta-row {
    grid-template-columns: 1fr;
  }
}

.module-sales .project-paid-field {
  grid-column: span 3;
}

/* Sales input repair: keep filters readable and make cost rows calm. */
.module-sales .filter-toolbar,
.module-sales .invoice-filter-panel,
.module-sales .sales-filter-sidebar {
  overflow: visible;
  z-index: 20;
}

.module-sales .filter-popover-wrap.open {
  z-index: 10000;
}

.module-sales .filter-button {
  min-width: 0;
}

.module-sales .filter-button b {
  color: #9bdcff;
  background: rgba(0, 189, 231, 0.14);
  border: 1px solid rgba(0, 189, 231, 0.22);
}

.module-sales .filter-check-list {
  padding-right: 4px;
}

.module-sales .filter-check-item {
  min-height: 36px;
}

.module-sales .filter-check-item span {
  line-height: 1.35;
}

.module-sales .project-detail-plus {
  display: none;
}

.module-sales .project-detail-lane.cost {
  grid-template-columns: 54px minmax(150px, 1.2fr) minmax(116px, 0.72fr) minmax(150px, 1fr) minmax(116px, 0.8fr);
  grid-template-areas:
    "kind desc desc category payee"
    "kind unit qty transport subtotal"
    "kind actions actions actions actions";
  align-items: end;
}

.module-sales .project-detail-lane-label {
  grid-area: kind;
}

.module-sales .project-line-description {
  grid-area: desc;
}

.module-sales .project-quantity-control {
  grid-area: qty;
}

.module-sales .project-detail-subtotal {
  grid-area: subtotal;
}

.module-sales .project-detail-line-actions {
  grid-area: actions;
}

.module-sales .project-cost-category-control,
.module-sales .project-cost-payee-control,
.module-sales .project-money-control,
.module-sales .project-quantity-control {
  min-width: 0;
}

.module-sales .project-cost-category-control .table-select,
.module-sales .project-cost-payee-control .table-select {
  height: 34px;
}

.module-sales .project-money-head {
  min-width: 0;
}

.module-sales .project-money-head b {
  flex: 0 0 auto;
}

.module-sales .project-money-head .table-select {
  flex: 0 0 66px;
}

.module-sales .project-detail-lane.cost .project-detail-line-actions {
  justify-content: flex-end;
}

@media (max-width: 1120px) {
  .module-sales .project-detail-lane.cost {
    grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "kind desc desc"
      "kind category payee"
      "kind unit qty"
      "kind transport subtotal"
      "kind actions actions";
  }
}

@media (max-width: 720px) {
  .module-sales .project-detail-lane.cost {
    grid-template-columns: 1fr;
    grid-template-areas:
      "kind"
      "desc"
      "category"
      "payee"
      "unit"
      "qty"
      "transport"
      "subtotal"
      "actions";
  }
}

@media (max-width: 1180px) {
  .search-input-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-input-row .secondary,
  .search-input-row .ghost {
    width: 100%;
  }

  .recruitment-card-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  }

  .recruitment-table tr {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .recruitment-table td[data-label="NGメモ"],
  .recruitment-table td[data-label="Meet/案件メモ"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1080px) {
  .invoice-toolbar,
  .invoice-print-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .invoice-line {
    grid-template-columns: 34px minmax(0, 1.3fr) minmax(112px, 0.9fr) minmax(70px, 0.5fr);
    grid-template-areas:
      "no desc desc desc"
      "no unit qty subtotal"
      "no transport actions actions";
  }

  .invoice-line-number {
    grid-area: no;
  }

  .invoice-line-description {
    grid-area: desc;
  }

  .invoice-line .invoice-money-control:nth-of-type(2) {
    grid-area: unit;
  }

  .invoice-quantity-control {
    grid-area: qty;
  }

  .invoice-line .invoice-money-control:nth-of-type(4) {
    grid-area: transport;
  }

  .invoice-line-subtotal {
    grid-area: subtotal;
  }

  .invoice-line [data-invoice-line-remove] {
    grid-area: actions;
  }

  .kpi-grid,
  .grid-2,
  .dashboard-hero,
  .settings-layout,
  .profile-layout,
  .staff-card-list,
  .summary-strip,
  .hr-dashboard-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .master-editor {
    position: static;
  }
}

@media (max-width: 760px) {
  .invoice-editor-grid,
  .summary-strip.invoice-summary,
  .invoice-print-notes {
    grid-template-columns: 1fr;
  }

  .invoice-editor-grid .wide {
    grid-column: auto;
  }

  .invoice-line {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas:
      "no desc"
      "no unit"
      "no qty"
      "no transport"
      "no subtotal"
      "no actions";
  }

  .invoice-line-number {
    min-height: 100%;
  }

  .invoice-print-sheet {
    padding: 18px;
  }

  .invoice-total-box strong {
    font-size: 26px;
  }

  .invoice-print-table {
    font-size: 12px;
  }

  body {
    background:
      linear-gradient(180deg, rgba(7, 11, 28, 0.14), rgba(255, 255, 255, 0) 220px),
      repeating-linear-gradient(90deg, rgba(0, 189, 231, 0.055) 0 1px, transparent 1px 42px),
      repeating-linear-gradient(0deg, rgba(36, 88, 255, 0.045) 0 1px, transparent 1px 42px),
      var(--bg);
  }

  .topbar {
    align-items: center;
    min-height: auto;
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .topbar .brand {
    min-width: 0;
    flex: 1;
  }

  .topbar .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
  }

  .module-navigation-actions {
    gap: 6px;
  }

  .module-back-button,
  .module-menu-button {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 13px;
  }

  .nav {
    display: none;
  }

  .mobile-menu-toggle {
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid rgba(0, 189, 231, 0.28);
    border-radius: 8px;
    color: #fff;
    background: rgba(0, 189, 231, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
  }

  .user-area {
    width: auto;
    gap: 6px;
    justify-content: flex-end;
  }

  .user-pill {
    display: none;
  }

  .topbar .ghost {
    display: none;
  }

  .page {
    padding: 18px 12px 92px;
  }

  .module-home-grid {
    grid-template-columns: 1fr;
  }

  .module-home-card {
    min-height: 160px;
  }

  .fab-add-project {
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    min-height: 58px;
    padding: 0 18px;
    font-size: 15px;
  }

  .mobile-menu-backdrop {
    align-items: end;
    padding: 0;
  }

  .mobile-menu-panel {
    width: 100%;
    max-height: 92dvh;
    border-radius: 8px 8px 0 0;
  }

  .mobile-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 56dvh;
    overflow: auto;
  }

  .mobile-menu-grid button {
    min-height: 78px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
  }

  .category-flow-head {
    grid-template-columns: 1fr;
  }

  .category-flow-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .hr-pdf-hero,
  .hr-pdf-console,
  .hr-pdf-panel-head,
  .hr-team-grid,
  .hr-security-grid,
  .hr-wire-search,
  .hr-wire-search-main,
  .hr-wire-search-labels,
  .hr-wire-search-detail,
  .hr-wire-search-head,
  .hr-wire-search-kpis,
  .hr-wire-board-head,
  .hr-wire-layout,
  .hr-wire-row,
  .hr-wire-left,
  .hr-wire-main-fields,
  .hr-wire-job-focus,
  .hr-post-interview-panel div,
  .hr-simple-status-layout,
  .hr-simple-status-grid,
  .hr-simple-status-grid.branch,
  .hr-wire-status-band,
  .hr-wire-actions,
  .hr-wire-basic-grid,
  .hr-wire-current-grid,
  .hr-wire-menu-columns,
  .hr-wire-support-grid,
  .hr-dashboard-kpis,
  .hr-dashboard-phase-row,
  .hr-dashboard-recent-row,
  .hr-dashboard-source-row,
  .hr-hub-page-head {
    grid-template-columns: 1fr;
  }

  .hr-status-map {
    padding-inline: 4px;
  }

  .hr-status-map-ladder {
    min-width: 620px;
  }

  .hr-status-map-step {
    grid-template-columns: 176px 206px;
    column-gap: 58px;
  }

  .hr-status-map-step.has-branch {
    min-height: 76px;
  }

  .hr-status-map-node {
    width: 176px;
  }

  .hr-status-map-branches {
    width: 206px;
    margin-top: 0;
  }

  .hr-status-map-branches.single {
    width: 206px;
  }

  .hr-status-map-ladder::before {
    left: 88px;
  }

  .hr-status-map-step::before {
    left: 88px;
  }

  .hr-status-map-step.has-branch::after {
    left: 88px;
    top: -12px;
    width: 261px;
    height: 26px;
  }

  .hr-status-map-step.has-branch .hr-status-map-step-line::after {
    content: none;
  }

  .hr-hub-page-head {
    align-items: start;
  }

  .hr-hub-filter-chips {
    justify-content: flex-start;
  }

  .hr-dashboard-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hr-dashboard-phase-row,
  .hr-dashboard-recent-row {
    align-items: stretch;
  }

  .hr-dashboard-phase-row span {
    width: fit-content;
    min-width: 30px;
  }

  .module-hr .topbar {
    position: sticky;
    top: 0;
    inset: auto;
    width: 100%;
    min-height: auto;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  }

  .module-hr .brand {
    width: auto;
    flex: 1 1 170px;
    padding: 0;
    border-bottom: 0;
  }

  .module-hr .brand span:last-child {
    white-space: nowrap;
  }

  .module-hr .nav {
    width: 100%;
    display: flex;
    gap: 6px;
    order: 3;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .module-hr .nav button {
    width: auto;
    min-height: 34px;
    flex: 0 0 auto;
    padding: 6px 10px;
  }

  .module-hr .user-area {
    width: auto;
    flex-direction: row;
    margin-left: auto;
  }

  .module-hr .module-menu-button,
  .module-hr .topbar .ghost {
    width: auto;
    min-height: 34px;
    display: inline-flex;
    padding: 6px 10px;
  }

  .module-hr .hr-sidebar-stats {
    display: none;
  }

  .module-hr .page {
    margin-left: 0;
    padding: 16px 12px 80px;
  }

  .module-hr .hr-wire-search-main {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .module-hr .hr-wire-search-detail {
    grid-template-columns: 1fr;
  }

  .module-hr .hr-wire-search-main input,
  .module-hr .hr-wire-search-detail input,
  .module-hr .hr-wire-search-detail select {
    width: 100%;
    min-width: 0;
  }

  .module-hr .hr-wire-card-body {
    grid-template-columns: 1fr;
  }

  .module-hr .hr-wire-left {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 16px 14px;
  }

  .module-hr .hr-wire-mini-fields,
  .module-hr .hr-wire-job-focus,
  .module-hr .hr-wire-source-line,
  .module-hr .hr-post-interview-panel,
  .module-hr .hr-wire-note {
    grid-column: 2 / -1;
  }

  .module-hr .hr-wire-right {
    border-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
  }

  .module-hr .hr-wire-actions {
    grid-template-columns: 1fr;
  }

  .module-hr .hr-wire-status-popup {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 76dvh;
    overflow: auto;
  }

  .hr-status-flow-board {
    grid-auto-columns: minmax(220px, 82vw);
  }

  .module-hr .hr-wire-status-button,
  .module-hr .hr-wire-detail-button {
    width: 100%;
    min-width: 0;
  }

  .hr-detail-backdrop {
    padding: 0;
  }

  .module-hr .hr-detail-drawer {
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .module-hr .hr-detail-hero,
  .module-hr .hr-detail-content {
    grid-template-columns: 1fr;
  }

  .module-hr .hr-detail-status-editor {
    margin: 12px;
  }

  .hr-simple-phase-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-hr .hr-detail-avatar {
    width: 42px;
    height: 42px;
  }

  .module-hr .hr-detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-hr .hr-detail-content {
    padding: 14px 12px 28px;
  }

  .hr-pdf-editor-panel {
    position: static;
  }

  .hr-wire-search {
    position: static;
    padding: 0;
  }

  .hr-wire-search-main {
    min-height: auto;
    padding: 12px;
  }

  .hr-wire-search-labels {
    padding: 0;
    gap: 6px;
  }

  .hr-wire-search-labels span:last-child {
    text-align: left;
  }

  .hr-wire-board {
    min-height: auto;
    padding: 10px 0 20px;
  }

  .hr-wire-command-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .hr-wire-board-head {
    align-items: start;
  }

  .hr-wire-row {
    min-height: auto;
    padding: 12px;
    border-radius: 8px;
  }

  .hr-wire-left {
    gap: 9px;
  }

  .hr-wire-status-band {
    gap: 7px;
    padding: 8px;
  }

  .hr-wire-status-band i {
    min-height: 8px;
    border-radius: 999px;
  }

  .hr-wire-floating-panel,
  .hr-wire-status-menu {
    position: static;
    width: 100%;
  }

  .hr-wire-floating-panel {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .hr-wire-floating-panel label {
    display: grid;
    gap: 6px;
  }

  .hr-wire-floating-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hr-pdf-chrono,
  .hr-pdf-phase-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .page-header h1 {
    font-size: 24px;
  }

  .toolbar,
  .inline-actions {
    width: 100%;
    gap: 8px;
  }

  .toolbar .select,
  .inline-actions > .primary,
  .inline-actions > .secondary,
  .inline-actions > .danger,
  .page-header .primary,
  .page-header .secondary {
    width: 100%;
  }

  .segmented-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .segmented-tabs button {
    flex: 1 0 auto;
  }

  .search-input {
    min-width: 0;
    width: 100%;
  }

  .recruitment-search-panel,
  .search-filter-row,
  .search-input-row,
  .bulk-action-bar,
  .flow-panel-head,
  .recruitment-card-top,
  .recruitment-card-top.has-select,
  .recruitment-card-controls,
  .recruitment-card-notes,
  .recruitment-card-notes.smart-notes,
  .hr-field-grid,
  .hr-project-entry-grid,
  .hr-check-grid,
  .hr-context-title,
  .hr-context-head,
  .hr-pdf-basic-grid,
  .hr-pdf-current-grid,
  .hr-pdf-field-grid,
  .hr-pdf-contact-grid,
  .hr-pdf-project-grid,
  .hr-pdf-attachment-card,
  .hr-common-kpis,
  .hr-team-metrics,
  .hero-metrics,
  .funnel-row,
  .import-status-grid {
    grid-template-columns: 1fr;
  }

  .hr-context-title,
  .hr-context-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .bulk-action-bar {
    position: static;
  }

  .applicant-select-cell {
    width: 100%;
    min-height: 32px;
    place-items: start;
  }

  .flow-map {
    margin: 0 -14px;
    padding: 4px 14px 12px;
  }

  .flow-node {
    width: 172px;
  }

  .dashboard-hero {
    padding: 16px;
  }

  .dashboard-hero h2 {
    font-size: 23px;
  }

  .budget-row div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .budget-row span {
    white-space: normal;
  }

  .recruitment-card {
    padding: 13px;
  }

  .recruitment-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .import-form {
    grid-template-columns: 1fr;
  }

  .select,
  .field input,
  .field select,
  .field textarea {
    min-height: 48px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .kpi {
    padding: 12px;
  }

  .kpi strong {
    font-size: 19px;
  }

  .panel {
    padding: 14px;
  }

  .chart {
    height: 210px;
  }

  .table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .table-wrap::before {
    display: none;
  }

  .responsive-table {
    min-width: 0;
    display: block;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody {
    display: grid;
    gap: 10px;
  }

  .responsive-table tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(37, 99, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--soft-shadow);
  }

  .responsive-table.master-table tr,
  .responsive-table.analysis-table tr {
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 255, 0.88)),
      #fff;
    border-color: rgba(0, 189, 231, 0.24);
  }

  .responsive-table td {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
  }

  .responsive-table.master-table td:first-child,
  .responsive-table.analysis-table td:first-child {
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
    color: var(--blue);
    font-weight: 900;
  }

  .responsive-table .inline-actions {
    justify-content: stretch;
  }

  .responsive-table button,
  .responsive-table .table-select {
    width: 100%;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 94dvh;
    border-radius: 8px 8px 0 0;
  }

  .modal-sm,
  .modal-sm .modal-body,
  .form-grid,
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .summary-strip.project-invoice-summary {
    grid-template-columns: 1fr;
  }

  .project-invoice-grid {
    padding-inline: 14px;
  }

  .project-invoice-head,
  .project-detail-pair-head {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .project-invoice-head {
    flex-direction: column;
  }

  .project-detail-pair-head {
    gap: 8px;
  }

  .project-detail-pair-head .project-detail-row-number {
    justify-self: start;
  }

  .project-detail-lane {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .project-detail-lane-label {
    grid-row: span 4;
  }

  .project-detail-plus {
    display: none;
  }

  .project-money-control,
  .project-quantity-control,
  .project-detail-subtotal,
  .project-line-description,
  .project-detail-line-actions {
    grid-column: 2 / -1;
  }

  .project-detail-line-actions,
  .project-detail-pair-actions {
    justify-content: stretch;
  }

  .project-detail-line-actions .mini-button,
  .project-detail-pair-actions .mini-button {
    flex: 1;
  }

  .project-detail-lane {
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-areas:
      "kind desc"
      "kind unit"
      "kind qty"
      "kind transport"
      "kind subtotal"
      "kind actions";
  }

  .project-detail-lane-label {
    grid-area: kind;
    grid-row: auto;
  }

  .project-line-description {
    grid-area: desc;
  }

  .project-detail-lane .project-money-control:nth-of-type(2) {
    grid-area: unit;
  }

  .project-quantity-control {
    grid-area: qty;
  }

  .project-detail-lane .project-money-control:nth-of-type(4) {
    grid-area: transport;
  }

  .project-detail-subtotal {
    grid-area: subtotal;
  }

  .project-detail-line-actions {
    grid-area: actions;
  }

  .project-form-compact {
    grid-template-columns: 1fr;
  }

  .project-pair-evaluation-head {
    align-items: stretch;
    flex-direction: column;
  }

  .project-evaluation-list.compact .project-evaluation-row,
  .project-evaluation-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .project-evaluation-row label,
  .project-evaluation-preview,
  .project-evaluation-row .mini-button {
    grid-column: 2 / -1;
  }

  .modal-sm .modal-body > .error,
  .modal-sm .modal-body > .notice,
  .modal-sm .modal-body > .inline-actions,
  .modal-sm .field.wide,
  .form-grid .wide,
  .profile-grid .wide {
    grid-column: span 1;
  }

  .modal-header,
  .modal-footer,
  .modal-body {
    padding: 14px;
  }

  .modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-footer .inline-actions,
  .modal .inline-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .project-form-grid {
    padding: 14px;
  }

  .project-field-xs,
  .project-field-sm,
  .project-field-md,
  .project-field-lg {
    grid-column: 1 / -1;
  }

  .form-grid .wide {
    grid-column: span 1;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-grid .wide {
    grid-column: span 1;
  }

  .passkey-panel {
    grid-column: auto;
  }

  .auth-status-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    grid-template-columns: 58px 1fr;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
    font-size: 24px;
  }

  .staff-card-list {
    gap: 10px;
  }

  .staff-card-head {
    padding: 12px;
  }

  .staff-card-head h2 {
    font-size: 17px;
  }

  .staff-metrics {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .staff-metric {
    padding: 11px;
  }

  .staff-metric.wide {
    grid-column: span 1;
  }

  .staff-metric strong {
    font-size: 21px;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .tabs .chip {
    min-height: 44px;
    white-space: normal;
    text-align: center;
  }

  .sales-import-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .responsive-table td {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}

.filter-toolbar {
  align-items: stretch;
  flex-wrap: wrap;
}

.multi-filter {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.multi-filter span,
.invoice-filter-grid label span,
.invoice-project-picker h3 {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.multi-filter-select {
  min-height: 84px;
  padding: 7px;
}

.filter-popover-wrap {
  position: relative;
  min-width: 148px;
  overflow: visible;
}

.filter-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(79, 111, 255, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #101828;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.filter-button-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-button span,
.filter-button strong,
.filter-button b {
  min-width: 0;
  white-space: nowrap;
}

.filter-button:hover,
.filter-popover-wrap.open .filter-button {
  border-color: rgba(0, 188, 212, 0.75);
  box-shadow: 0 10px 28px rgba(0, 188, 212, 0.16);
  transform: translateY(-1px);
}

.filter-button b {
  flex: 0 0 auto;
  max-width: 96px;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(59, 91, 253, 0.12);
  color: #3b5bfd;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.filter-popover {
  position: absolute;
  z-index: 9990;
  top: calc(100% + 8px);
  left: 0;
  width: min(360px, calc(100vw - 36px));
  max-height: min(72vh, 480px);
  padding: 12px;
  border: 1px solid rgba(79, 111, 255, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.18);
  overflow: visible;
}

.filter-popover-wrap:nth-last-child(-n+2) .filter-popover {
  right: 0;
  left: auto;
}

.filter-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.filter-popover-head strong {
  font-size: 14px;
}

.filter-check-list {
  display: grid;
  gap: 6px;
  max-height: min(54vh, 340px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.filter-check-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(79, 111, 255, 0.12);
  border-radius: 9px;
  background: rgba(248, 250, 252, 0.9);
  color: #101828;
  font-weight: 850;
  cursor: pointer;
}

.filter-check-item:hover {
  border-color: rgba(0, 188, 212, 0.35);
  background: rgba(236, 254, 255, 0.88);
}

.filter-check-item input {
  width: 16px;
  height: 16px;
  accent-color: #3b5bfd;
}

.filter-check-item span {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.filter-clear-button {
  width: 100%;
  margin-top: 9px;
  padding: 8px;
  border: 1px solid rgba(239, 68, 68, 0.24);
  border-radius: 9px;
  background: rgba(254, 242, 242, 0.9);
  color: #b42318;
  font-weight: 900;
  cursor: pointer;
}

.invoice-filter-panel {
  margin-bottom: 14px;
  border-top: 3px solid #00bcd4;
}

.invoice-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.invoice-filter-grid-popovers {
  align-items: start;
}

.invoice-keyword-filter {
  min-width: 0;
}

.invoice-filter-grid label {
  display: grid;
  gap: 6px;
}

.invoice-filter-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.invoice-page-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.invoice-list-panel {
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 92px);
  overflow: auto;
}

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

.section-title-row h2,
.section-title-row h3 {
  margin: 0;
}

.invoice-client-group {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid rgba(79, 111, 255, 0.14);
}

.invoice-client-title {
  color: #101828;
  font-size: 13px;
  font-weight: 950;
}

.invoice-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px;
  border: 1px solid rgba(79, 111, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: #101828;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.invoice-card:hover,
.invoice-card.active {
  border-color: rgba(0, 188, 212, 0.7);
  box-shadow: 0 12px 30px rgba(0, 188, 212, 0.16);
  transform: translateY(-1px);
}

.invoice-card span {
  color: #3b5bfd;
  font-size: 12px;
  font-weight: 900;
}

.invoice-card strong {
  font-size: 14px;
}

.invoice-card small {
  color: #667085;
  font-weight: 800;
}

.invoice-company-editor {
  min-width: 0;
}

.invoice-toolbar h2,
.invoice-toolbar p {
  margin: 0;
}

.invoice-toolbar p {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.compact-invoice-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.compact-invoice-grid label {
  min-width: 0;
}

.compact-invoice-grid .wide {
  grid-column: span 3;
}

.invoice-project-picker {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
  padding: 12px;
  border: 1px solid rgba(79, 111, 255, 0.14);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.82);
}

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

.project-check-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(79, 111, 255, 0.13);
  border-radius: 10px;
  background: #fff;
}

.project-check-item span {
  display: grid;
  gap: 3px;
}

.project-check-item b {
  overflow-wrap: anywhere;
}

.project-check-item small {
  color: #667085;
  font-weight: 800;
}

.invoice-company-editor .invoice-line {
  grid-template-columns: 32px minmax(180px, 1.4fr) minmax(130px, 0.9fr) minmax(108px, 0.75fr) minmax(70px, 0.45fr) minmax(108px, 0.75fr) minmax(112px, 0.75fr) 58px;
}

.invoice-line-project {
  min-width: 0;
}

.invoice-line-project .table-select {
  width: 100%;
}

@media (max-width: 1180px) {
  .invoice-page-layout {
    grid-template-columns: 1fr;
  }

  .invoice-list-panel {
    position: static;
    max-height: none;
  }

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

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

  .invoice-company-editor .invoice-line {
    grid-template-columns: 32px minmax(180px, 1fr) minmax(140px, 0.8fr) minmax(110px, 0.7fr);
  }

  .invoice-company-editor .invoice-line-subtotal,
  .invoice-company-editor .invoice-line [data-invoice-line-remove] {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .invoice-filter-grid,
  .project-check-grid,
  .compact-invoice-grid {
    grid-template-columns: 1fr;
  }

  .compact-invoice-grid .wide {
    grid-column: span 1;
  }

  .invoice-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-company-editor .invoice-line {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .invoice-company-editor .invoice-line > * {
    grid-column: span 2;
  }

  .invoice-company-editor .invoice-line-number {
    grid-column: span 1;
  }
}

/* Sales usability pass: wider canvas, left filters, and compact money lines. */
.layout.module-sales .page {
  width: min(100%, 1920px);
  padding-inline: clamp(14px, 1.45vw, 28px);
}

.sales-workspace {
  display: grid;
  grid-template-columns: minmax(238px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.sales-workspace-main {
  min-width: 0;
}

.sales-filter-sidebar {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 12px;
  max-height: calc(100dvh - 96px);
  overflow: auto;
}

.sales-filter-sidebar .filter-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.sales-filter-sidebar .filter-popover-wrap,
.sales-filter-sidebar .field,
.sales-filter-sidebar .select,
.sales-filter-sidebar input {
  width: 100%;
  min-width: 0;
}

.sales-filter-sidebar .filter-button {
  justify-content: space-between;
  min-height: 40px;
}

.module-sales .filter-button {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.9);
}

.module-sales .filter-popover {
  color: #e5e7eb;
  border-color: rgba(79, 111, 255, 0.34);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.module-sales .filter-check-item {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(30, 41, 59, 0.9);
}

.module-sales .filter-check-item:hover {
  border-color: rgba(0, 189, 231, 0.48);
  background: rgba(8, 47, 73, 0.82);
}

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

.sales-breakdown-card {
  min-width: 0;
}

.compact-table-wrap {
  overflow: auto;
}

.compact-table-wrap .responsive-table {
  min-width: 780px;
}

.compact-table-wrap .responsive-table th,
.compact-table-wrap .responsive-table td {
  white-space: nowrap;
}

.sales-result-actions {
  justify-content: flex-end;
  margin: -4px 0 12px;
}

.module-sales .kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.module-sales .project-detail-lane {
  grid-template-columns: 54px minmax(150px, 1.35fr) minmax(116px, 0.9fr) minmax(72px, 0.48fr) minmax(116px, 0.9fr) minmax(110px, 0.76fr);
  grid-template-areas:
    "kind desc unit qty transport subtotal"
    "kind actions actions actions actions actions";
}

.module-sales .project-detail-lane.cost {
  grid-template-columns: 54px minmax(140px, 1.15fr) minmax(106px, 0.75fr) minmax(130px, 1fr) minmax(112px, 0.85fr) minmax(68px, 0.45fr);
  grid-template-areas:
    "kind desc category payee unit qty"
    "kind transport transport subtotal actions actions";
}

.project-cost-category-control {
  grid-area: category;
  min-width: 0;
}

.project-cost-payee-control {
  grid-area: payee;
  min-width: 0;
}

.project-detail-lane .unit-price-control {
  grid-area: unit;
}

.project-detail-lane .transportation-control {
  grid-area: transport;
}

.module-sales .project-detail-lane .table-input,
.module-sales .project-detail-lane .table-select {
  width: 100%;
}

.module-sales .project-detail-line-actions {
  align-self: end;
  flex-wrap: wrap;
}

.invoice-page-layout {
  grid-template-columns: minmax(292px, 340px) minmax(0, 1fr);
}

.invoice-side-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.invoice-side-stack .invoice-filter-panel,
.invoice-side-stack .invoice-list-panel {
  position: sticky;
}

.invoice-side-stack .invoice-filter-panel {
  top: 82px;
}

.invoice-side-stack .invoice-list-panel {
  top: 330px;
  max-height: calc(100dvh - 348px);
}

.invoice-side-stack .invoice-filter-grid {
  grid-template-columns: 1fr;
}

.invoice-side-stack .filter-popover-wrap,
.invoice-side-stack .invoice-keyword-filter,
.invoice-side-stack .invoice-keyword-filter input,
.invoice-side-stack select {
  width: 100%;
  min-width: 0;
}

.module-sales .invoice-client-title,
.module-sales .invoice-card,
.module-sales .invoice-card small,
.module-sales .invoice-toolbar p,
.module-sales .multi-filter span,
.module-sales .invoice-filter-grid label span,
.module-sales .invoice-project-picker h3,
.module-sales .project-check-item small {
  color: #a7b3c8;
}

.module-sales .invoice-card,
.module-sales .project-check-item,
.module-sales .invoice-project-picker {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.78);
}

.module-sales .invoice-card strong,
.module-sales .section-title-row h2,
.module-sales .section-title-row h3 {
  color: #f8fafc;
}

@media (max-width: 1320px) {
  .dashboard-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .compact-table-wrap .responsive-table {
    min-width: 0;
  }
}

@media (max-width: 1120px) {
  .sales-workspace,
  .invoice-page-layout {
    grid-template-columns: 1fr;
  }

  .sales-filter-sidebar,
  .invoice-side-stack .invoice-filter-panel,
  .invoice-side-stack .invoice-list-panel {
    position: static;
    max-height: none;
  }

  .module-sales .project-detail-lane,
  .module-sales .project-detail-lane.cost {
    grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "kind desc desc"
      "kind category payee"
      "kind unit qty"
      "kind transport subtotal"
      "kind actions actions";
  }
}

@media (max-width: 720px) {
  .module-sales .project-detail-lane,
  .module-sales .project-detail-lane.cost {
    grid-template-columns: 1fr;
    grid-template-areas:
      "kind"
      "desc"
      "category"
      "payee"
      "unit"
      "qty"
      "transport"
      "subtotal"
      "actions";
  }

  .project-detail-lane-label {
    min-height: 32px;
  }
}

/* Sales filter reset: keep search values at the top and avoid horizontal scrolling. */
.module-sales .sales-workspace {
  grid-template-columns: 1fr;
}

.module-sales .sales-filter-sidebar {
  position: static;
  max-height: none;
  overflow: visible;
  margin-bottom: 14px;
}

.module-sales .sales-filter-sidebar .filter-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.module-sales .sales-filter-sidebar .filter-popover-wrap,
.module-sales .sales-filter-sidebar .select,
.module-sales .sales-filter-sidebar input {
  min-width: 0;
}

.module-sales .filter-popover {
  width: min(320px, calc(100vw - 40px));
}

.module-sales .table-wrap,
.module-sales .compact-table-wrap {
  max-width: 100%;
  overflow-x: visible;
}

.module-sales .responsive-table {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
}

.module-sales .responsive-table th,
.module-sales .responsive-table td,
.module-sales .compact-table-wrap .responsive-table th,
.module-sales .compact-table-wrap .responsive-table td {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

.module-sales .responsive-table th,
.module-sales .responsive-table td {
  padding-inline: 10px;
}

.module-sales .responsive-table .money {
  font-variant-numeric: tabular-nums;
}

.module-sales .responsive-table .inline-actions,
.module-sales .table-actions {
  flex-wrap: wrap;
}

.module-sales .dashboard-breakdown-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.module-sales .invoice-page-layout {
  grid-template-columns: 1fr;
}

.module-sales .invoice-side-stack {
  grid-template-columns: 1fr;
}

.module-sales .invoice-side-stack .invoice-filter-panel,
.module-sales .invoice-side-stack .invoice-list-panel {
  position: static;
  max-height: none;
}

.module-sales .invoice-side-stack .invoice-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.module-sales .invoice-side-stack .invoice-keyword-filter {
  grid-column: span 2;
}

.module-sales .invoice-list-panel {
  overflow: visible;
}

.module-sales .invoice-client-group {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
}

.module-sales .invoice-client-title {
  grid-column: 1 / -1;
}

.module-sales .invoice-company-editor .invoice-line {
  grid-template-columns: 28px minmax(120px, 1.2fr) minmax(130px, 1.1fr) minmax(90px, 0.7fr) minmax(64px, 0.45fr) minmax(90px, 0.7fr) minmax(98px, 0.7fr) 48px;
  gap: 8px;
}

.module-sales .invoice-company-editor .invoice-line input,
.module-sales .invoice-company-editor .invoice-line select {
  min-width: 0;
}

.module-sales .project-invoice-table-wrap {
  max-width: 100%;
  overflow-x: visible;
}

@media (max-width: 980px) {
  .module-sales .invoice-side-stack .invoice-keyword-filter {
    grid-column: span 1;
  }

  .module-sales .invoice-company-editor .invoice-line {
    grid-template-columns: 28px repeat(2, minmax(0, 1fr));
  }

  .module-sales .invoice-company-editor .invoice-line > * {
    grid-column: span 2;
  }

  .module-sales .invoice-company-editor .invoice-line-number {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  .module-sales .dashboard-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .module-sales .sales-filter-sidebar .filter-toolbar {
    grid-template-columns: 1fr;
  }
}

/* Invoice polish: editable qualified-invoice layout with FFU identity. */
.module-sales input,
.module-sales textarea,
.module-sales select,
.module-sales button {
  position: relative;
  z-index: 1;
}

.invoice-rule-note {
  align-self: end;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 189, 231, 0.24);
  border-radius: 10px;
  background: rgba(0, 189, 231, 0.08);
  color: #0f5f74;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.module-sales .invoice-rule-note {
  color: #a7f3d0;
  background: rgba(20, 184, 166, 0.1);
  border-color: rgba(20, 184, 166, 0.28);
}

.ffu-invoice-document {
  display: grid;
  gap: 18px;
  color: #101828;
}

.invoice-brand-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(0, 189, 231, 0.95), rgba(79, 111, 255, 0.98) 48%, rgba(124, 58, 237, 0.92)),
    #3157ff;
}

.invoice-brand-logo {
  width: clamp(132px, 18vw, 190px);
  height: 46px;
  object-fit: contain;
  object-position: left center;
  padding: 4px 8px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.44), 0 10px 24px rgba(0, 0, 0, 0.08);
}

.invoice-brand-band strong {
  margin-left: auto;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.ffu-invoice-head {
  border-bottom-color: #172033;
}

.ffu-invoice-head p {
  color: #3157ff;
}

.invoice-issuer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  gap: 12px;
}

.invoice-issuer-card > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #f8fafc;
}

.invoice-issuer-card span {
  display: block;
  margin-bottom: 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.invoice-issuer-card strong {
  display: block;
  margin-bottom: 4px;
  color: #101828;
  font-size: 17px;
  font-weight: 950;
  white-space: nowrap;
}

.invoice-issuer-card p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.7;
}

.invoice-registration-warning {
  color: #b42318 !important;
  font-weight: 800;
}

.ffu-invoice-total {
  border: 1px solid rgba(49, 87, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(49, 87, 255, 0.12), rgba(0, 189, 231, 0.1)),
    #eef4ff;
}

.invoice-tax-summary {
  width: min(420px, 100%);
  margin-left: auto;
  border-collapse: collapse;
  font-size: 13px;
}

.invoice-tax-summary th,
.invoice-tax-summary td {
  padding: 10px 12px;
  border-bottom: 1px solid #d0d5dd;
  text-align: right;
}

.invoice-tax-summary th {
  color: #344054;
  background: #f8fafc;
  font-weight: 900;
}

.invoice-tax-summary td {
  color: #101828;
  font-weight: 950;
}

.invoice-print-table {
  table-layout: fixed;
}

.invoice-print-table th,
.invoice-print-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-print-table th:first-child,
.invoice-print-table td:first-child {
  width: 36%;
}

@media (max-width: 760px) {
  .invoice-issuer-card,
  .invoice-print-notes {
    grid-template-columns: 1fr;
  }

  .invoice-brand-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-brand-band strong {
    margin-left: 0;
    text-align: left;
  }

  .invoice-tax-summary {
    margin-left: 0;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  body {
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .invoice-page-layout {
    display: block !important;
  }

  .invoice-side-stack,
  .invoice-editor-card > :not(.invoice-print-sheet),
  .topbar,
  .fab-add-project,
  .page-header,
  .filters,
  .mobile-menu-backdrop {
    display: none !important;
  }

  .invoice-editor-card {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .invoice-print-sheet {
    display: block !important;
    width: 190mm !important;
    max-width: 190mm !important;
    margin: 0 auto !important;
    padding: 7mm !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #101828 !important;
  }

  .ffu-invoice-document {
    gap: 10px !important;
    font-size: 10px !important;
  }

  .invoice-brand-band {
    min-height: 48px !important;
    padding: 9px 12px !important;
    border-radius: 10px !important;
    break-inside: avoid;
  }

  .invoice-brand-logo {
    width: 142px !important;
    height: 36px !important;
  }

  .invoice-brand-band strong {
    font-size: 10px !important;
  }

  .invoice-print-head {
    gap: 14px !important;
    padding-bottom: 10px !important;
    break-inside: avoid;
  }

  .invoice-print-head p {
    margin-bottom: 6px !important;
    font-size: 16px !important;
  }

  .invoice-print-head h1 {
    margin-bottom: 4px !important;
    font-size: 18px !important;
    white-space: nowrap;
  }

  .invoice-print-head dl {
    font-size: 10px !important;
    min-width: 210px !important;
  }

  .invoice-issuer-card {
    grid-template-columns: 1fr 0.5fr !important;
    gap: 8px !important;
    break-inside: avoid;
  }

  .invoice-issuer-card > div,
  .invoice-print-notes div {
    padding: 8px !important;
    border-radius: 8px !important;
  }

  .invoice-total-box {
    margin: 8px 0 !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    break-inside: avoid;
  }

  .invoice-total-box strong {
    font-size: 24px !important;
  }

  .invoice-print-table {
    font-size: 9px !important;
    page-break-inside: auto;
  }

  .invoice-print-table th,
  .invoice-print-table td,
  .invoice-tax-summary th,
  .invoice-tax-summary td {
    padding: 6px 7px !important;
    white-space: nowrap !important;
  }

  .invoice-tax-summary {
    width: 66mm !important;
    font-size: 9px !important;
    break-inside: avoid;
  }

  .invoice-print-notes {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-top: 10px !important;
    font-size: 9px !important;
    break-inside: avoid;
  }
}

/* Final sales UI fixes. Must stay last. */
.module-sales .filter-toolbar,
.module-sales .invoice-filter-panel,
.module-sales .sales-filter-sidebar {
  overflow: visible;
  z-index: 20;
}

.module-sales .filter-popover-wrap.open {
  z-index: 10000;
}

.filter-button-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-sales .filter-button {
  min-width: 0;
}

.module-sales .filter-button b {
  flex: 0 0 auto;
  max-width: 98px;
  overflow: hidden;
  padding: 3px 7px;
  border: 1px solid rgba(0, 189, 231, 0.22);
  border-radius: 999px;
  color: #9bdcff;
  background: rgba(0, 189, 231, 0.14);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-sales .filter-popover {
  overflow: visible;
}

.module-sales .filter-check-list {
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.module-sales .filter-check-item {
  min-height: 36px;
}

.module-sales .filter-check-item span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.module-sales .project-detail-plus {
  display: none !important;
}

.module-sales .project-detail-lane.cost {
  grid-template-columns: 54px minmax(150px, 1.2fr) minmax(116px, 0.72fr) minmax(150px, 1fr) minmax(116px, 0.8fr) !important;
  grid-template-areas:
    "kind desc desc category payee"
    "kind unit qty transport subtotal"
    "kind actions actions actions actions" !important;
  align-items: end;
}

.module-sales .project-detail-lane-label {
  grid-area: kind;
}

.module-sales .project-line-description {
  grid-area: desc;
}

.module-sales .project-quantity-control {
  grid-area: qty;
}

.module-sales .project-detail-subtotal {
  grid-area: subtotal;
}

.module-sales .project-detail-line-actions {
  grid-area: actions;
}

.module-sales .project-cost-category-control,
.module-sales .project-cost-payee-control,
.module-sales .project-money-control,
.module-sales .project-quantity-control {
  min-width: 0;
}

.module-sales .project-cost-category-control .table-select,
.module-sales .project-cost-payee-control .table-select {
  height: 34px;
}

.module-sales .project-money-head {
  min-width: 0;
}

.module-sales .project-money-head b {
  flex: 0 0 auto;
}

.module-sales .project-money-head .table-select {
  flex: 0 0 66px;
}

.module-sales .project-detail-lane.cost .project-detail-line-actions {
  justify-content: flex-end;
}

@media (max-width: 1120px) {
  .module-sales .project-detail-lane.cost {
    grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas:
      "kind desc desc"
      "kind category payee"
      "kind unit qty"
      "kind transport subtotal"
      "kind actions actions" !important;
  }
}

@media (max-width: 720px) {
  .module-sales .project-detail-lane.cost {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "kind"
      "desc"
      "category"
      "payee"
      "unit"
      "qty"
      "transport"
      "subtotal"
      "actions" !important;
  }
}

/* Final project copy/cost input polish. Must stay after older overrides. */
.module-sales .project-detail-lane.cost {
  grid-template-columns:
    54px
    minmax(168px, 1.35fr)
    minmax(118px, 0.82fr)
    minmax(78px, 0.48fr)
    minmax(118px, 0.82fr)
    minmax(128px, 0.82fr) !important;
  grid-template-areas:
    "kind meta meta meta meta meta"
    "kind desc unit qty transport subtotal"
    "kind actions actions actions actions actions" !important;
  gap: 8px 10px !important;
  align-items: end !important;
}

.module-sales .project-cost-meta-row {
  grid-area: meta !important;
  display: grid !important;
  grid-template-columns: minmax(132px, 176px) minmax(180px, 1fr) !important;
  gap: 8px !important;
  min-width: 0 !important;
  padding: 9px 10px !important;
  border: 1px solid rgba(245, 158, 11, 0.24) !important;
  border-radius: 10px !important;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.06)),
    rgba(255, 255, 255, 0.72) !important;
}

.module-sales .project-cost-category-control,
.module-sales .project-cost-payee-control {
  grid-area: auto !important;
  display: grid !important;
  gap: 4px !important;
}

.module-sales .project-cost-category-control span,
.module-sales .project-cost-payee-control span,
.module-sales .project-detail-lane.cost label span {
  white-space: nowrap !important;
}

.module-sales .project-cost-category-control .table-select,
.module-sales .project-cost-payee-control .table-select {
  height: 36px !important;
}

.module-sales .project-detail-lane.cost .project-line-description {
  grid-area: desc !important;
}

.module-sales .project-detail-lane.cost .unit-price-control {
  grid-area: unit !important;
}

.module-sales .project-detail-lane.cost .project-quantity-control {
  grid-area: qty !important;
}

.module-sales .project-detail-lane.cost .transportation-control {
  grid-area: transport !important;
}

.module-sales .project-detail-lane.cost .project-detail-subtotal {
  grid-area: subtotal !important;
}

.module-sales .project-detail-lane.cost .project-detail-line-actions {
  grid-area: actions !important;
  justify-content: flex-end !important;
}

.module-sales .table-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

@media (max-width: 1180px) {
  .module-sales .project-detail-lane.cost {
    grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas:
      "kind meta meta"
      "kind desc desc"
      "kind unit qty"
      "kind transport subtotal"
      "kind actions actions" !important;
  }

  .module-sales .project-cost-meta-row {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr) !important;
  }
}

@media (max-width: 720px) {
  .module-sales .project-detail-lane.cost {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "kind"
      "meta"
      "desc"
      "unit"
      "qty"
      "transport"
      "subtotal"
      "actions" !important;
  }

  .module-sales .project-cost-meta-row {
    grid-template-columns: 1fr !important;
  }
}

/* Final 20260704 sales dashboard/filter/invoice print fixes. Keep last. */
.module-sales .dashboard-breakdown-grid {
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}

.module-sales .sales-breakdown-card {
  width: 100%;
}

.module-sales .compact-table-wrap {
  overflow-x: visible !important;
}

.module-sales .compact-table-wrap .responsive-table {
  min-width: 0 !important;
  table-layout: fixed;
}

.module-sales .filter-button {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.module-sales .filter-selected-text {
  min-width: 0;
  overflow: hidden;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-sales .filter-button b {
  max-width: 82px !important;
}

.module-sales .sales-filter-sidebar .filter-button {
  grid-template-columns: minmax(54px, auto) minmax(0, 1fr);
}

.module-sales .sales-filter-sidebar .filter-button b {
  grid-column: 2;
  justify-self: end;
}

.module-sales .sales-filter-sidebar .filter-selected-text {
  grid-column: 1 / -1;
  width: 100%;
  padding-top: 2px;
  text-align: left;
}

.invoice-print-sheet {
  display: grid !important;
  gap: 18px;
  justify-items: center;
  background: #edf2f7 !important;
}

.ffu-invoice-document {
  display: grid;
  gap: 18px;
  width: 100%;
  color: #101828;
}

.invoice-print-page {
  width: min(100%, 210mm);
  min-height: 297mm;
  padding: 14mm;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.12);
}

.invoice-main-page {
  display: grid;
  align-content: start;
  gap: 12px;
}

.invoice-detail-page {
  display: grid;
  align-content: start;
  gap: 12px;
}

.invoice-detail-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #00a9d6;
}

.invoice-detail-logo {
  width: 118px;
  max-height: 36px;
  object-fit: contain;
}

.invoice-detail-page-head div {
  display: grid;
  gap: 2px;
  margin-left: auto;
  text-align: right;
}

.invoice-detail-page-head span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.invoice-detail-page-head strong {
  color: #101828;
  font-size: 18px;
}

.invoice-detail-page-head small {
  color: #667085;
  font-weight: 800;
}

.invoice-detail-notice td {
  padding: 18px 14px !important;
  color: #344054;
  background: #f8fafc;
  font-weight: 900;
  text-align: center;
  white-space: normal !important;
}

.invoice-detail-table {
  margin-top: 0;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  .invoice-print-sheet {
    display: block !important;
    width: 190mm !important;
    max-width: 190mm !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .ffu-invoice-document {
    display: block !important;
    width: 190mm !important;
    gap: 0 !important;
  }

  .invoice-print-page {
    width: 190mm !important;
    min-height: 277mm !important;
    margin: 0 !important;
    padding: 7mm !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    break-after: page;
    page-break-after: always;
    box-sizing: border-box !important;
  }

  .invoice-print-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .invoice-main-page,
  .invoice-detail-page {
    gap: 9px !important;
  }

  .invoice-print-table {
    width: 100% !important;
    font-size: 8.7px !important;
    table-layout: fixed !important;
  }

  .invoice-print-table th,
  .invoice-print-table td {
    padding: 5.5px 6px !important;
    white-space: nowrap !important;
  }

  .invoice-print-table th:first-child,
  .invoice-print-table td:first-child {
    width: 38% !important;
    white-space: normal !important;
  }

  .invoice-detail-page-head {
    padding-bottom: 8px !important;
    break-inside: avoid;
  }

  .invoice-detail-logo {
    width: 104px !important;
    max-height: 32px !important;
  }

  .invoice-detail-page-head strong {
    font-size: 15px !important;
  }

  .invoice-detail-page-head span,
  .invoice-detail-page-head small {
    font-size: 9px !important;
  }
}

/* Final 20260704 invoice negative values and A4 portrait stability. Keep last. */
.module-sales .invoice-print-sheet {
  overflow-x: hidden !important;
}

.module-sales .invoice-print-page {
  box-sizing: border-box !important;
  width: min(100%, 210mm) !important;
  padding: clamp(18px, 3.6vw, 42px) !important;
}

.module-sales .invoice-print-head,
.module-sales .invoice-issuer-card,
.module-sales .invoice-print-notes {
  min-width: 0 !important;
}

.module-sales .invoice-print-head h1,
.module-sales .invoice-print-head span,
.module-sales .invoice-print-head dd,
.module-sales .invoice-issuer-card strong,
.module-sales .invoice-issuer-card p {
  overflow-wrap: anywhere;
}

.module-sales .invoice-print-table th,
.module-sales .invoice-print-table td,
.module-sales .invoice-tax-summary th,
.module-sales .invoice-tax-summary td {
  font-variant-numeric: tabular-nums;
}

.module-sales .invoice-print-table th:first-child,
.module-sales .invoice-print-table td:first-child {
  width: 34% !important;
  white-space: normal !important;
}

.module-sales .invoice-total-box {
  margin: 14px 0 !important;
}

.module-sales .invoice-total-box strong {
  line-height: 1.05;
}

@media (max-width: 900px) {
  .module-sales .invoice-print-sheet {
    padding: 14px !important;
  }

  .module-sales .invoice-print-page {
    min-height: auto !important;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  .module-sales .invoice-print-sheet {
    width: 194mm !important;
    max-width: 194mm !important;
    overflow: visible !important;
  }

  .module-sales .invoice-print-page {
    width: 194mm !important;
    min-height: 281mm !important;
    padding: 7mm !important;
    border: 0 !important;
    box-sizing: border-box !important;
  }

  .module-sales .invoice-brand-band {
    min-height: 40px !important;
    padding: 7px 10px !important;
  }

  .module-sales .invoice-brand-logo {
    width: 112px !important;
    height: 34px !important;
  }

  .module-sales .invoice-brand-band strong {
    font-size: 10px !important;
  }

  .module-sales .invoice-print-head {
    gap: 12px !important;
    padding-bottom: 9px !important;
  }

  .module-sales .invoice-print-head p {
    margin-bottom: 5px !important;
    font-size: 17px !important;
  }

  .module-sales .invoice-print-head h1 {
    margin-bottom: 4px !important;
    font-size: 20px !important;
  }

  .module-sales .invoice-print-head dl {
    min-width: 185px !important;
    gap: 4px 9px !important;
    font-size: 9.5px !important;
  }

  .module-sales .invoice-issuer-card {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.42fr) !important;
    gap: 8px !important;
  }

  .module-sales .invoice-issuer-card > div {
    padding: 8px !important;
    border-radius: 7px !important;
  }

  .module-sales .invoice-issuer-card strong {
    font-size: 12px !important;
  }

  .module-sales .invoice-issuer-card p,
  .module-sales .invoice-registration-warning {
    font-size: 8.5px !important;
    line-height: 1.45 !important;
  }

  .module-sales .invoice-total-box {
    margin: 7px 0 !important;
    padding: 9px 11px !important;
  }

  .module-sales .invoice-total-box strong {
    font-size: 24px !important;
  }

  .module-sales .invoice-print-notes {
    gap: 8px !important;
    margin-top: 8px !important;
  }

  .module-sales .invoice-print-notes div {
    min-height: 48px !important;
    padding: 8px !important;
  }

  .module-sales .invoice-print-notes p {
    font-size: 8.5px !important;
    line-height: 1.45 !important;
  }
}

/* Final 20260704 v53: invoice preview is an exact A4 portrait sheet. Keep last. */
.module-sales .invoice-print-sheet {
  display: grid !important;
  justify-items: center !important;
  overflow-x: hidden !important;
}

.module-sales .invoice-print-page {
  box-sizing: border-box !important;
  width: min(100%, 210mm) !important;
  min-height: 0 !important;
  height: var(--invoice-screen-height, 297mm) !important;
  max-height: var(--invoice-screen-height, 297mm) !important;
  overflow: hidden !important;
  aspect-ratio: 210 / 297 !important;
  padding: clamp(18px, 4.6vw, 42px) !important;
}

.module-sales .invoice-main-page,
.module-sales .invoice-detail-page {
  align-content: start !important;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html,
  body {
    width: 210mm !important;
    min-width: 210mm !important;
    background: #fff !important;
  }

  .module-sales .invoice-print-sheet {
    width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .module-sales .ffu-invoice-document {
    width: 210mm !important;
    max-width: 210mm !important;
  }

  .module-sales .invoice-print-page {
    width: 210mm !important;
    min-width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    margin: 0 !important;
    padding: 10mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    break-after: page !important;
    page-break-after: always !important;
    overflow: hidden !important;
  }

  .module-sales .invoice-print-page:last-child {
    break-after: auto !important;
    page-break-after: auto !important;
  }
}

/* Final 20260704 v54: keep invoice contents inside the A4 sheet instead of clipping. Keep last. */
.module-sales .invoice-print-page {
  padding: clamp(14px, 3vw, 28px) !important;
  overflow: hidden !important;
}

.module-sales .invoice-main-page,
.module-sales .invoice-detail-page {
  display: block !important;
}

.module-sales .invoice-page-content {
  display: grid !important;
  gap: 8px !important;
  width: 100% !important;
  transform: scale(var(--invoice-content-scale, 1)) !important;
  transform-origin: top left !important;
}

.module-sales .invoice-page-content > * {
  min-width: 0 !important;
  max-width: 100% !important;
}

.module-sales .invoice-brand-band {
  min-height: 0 !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
}

.module-sales .invoice-brand-logo {
  width: clamp(112px, 16vw, 150px) !important;
  height: 32px !important;
  padding: 3px 7px !important;
  border-radius: 9px !important;
}

.module-sales .invoice-brand-band strong {
  font-size: 10px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

.module-sales .invoice-print-head {
  gap: 10px !important;
  padding-bottom: 7px !important;
}

.module-sales .invoice-print-head p {
  margin-bottom: 3px !important;
  font-size: 17px !important;
}

.module-sales .invoice-print-head h1 {
  margin-bottom: 2px !important;
  font-size: 20px !important;
  line-height: 1.16 !important;
}

.module-sales .invoice-print-head span {
  font-size: 11px !important;
  line-height: 1.35 !important;
}

.module-sales .invoice-print-head dl {
  min-width: 165px !important;
  gap: 3px 8px !important;
  font-size: 9px !important;
  line-height: 1.25 !important;
}

.module-sales .invoice-issuer-card {
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.38fr) !important;
  gap: 7px !important;
}

.module-sales .invoice-issuer-card > div {
  padding: 7px 8px !important;
  border-radius: 7px !important;
}

.module-sales .invoice-issuer-card span {
  margin-bottom: 3px !important;
  font-size: 9px !important;
}

.module-sales .invoice-issuer-card strong {
  margin-bottom: 2px !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

.module-sales .invoice-issuer-card p,
.module-sales .invoice-registration-warning {
  font-size: 8px !important;
  line-height: 1.34 !important;
}

.module-sales .invoice-total-box {
  margin: 4px 0 !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
}

.module-sales .invoice-total-box span,
.module-sales .invoice-total-box small {
  font-size: 9px !important;
  line-height: 1.25 !important;
}

.module-sales .invoice-total-box strong {
  font-size: 22px !important;
}

.module-sales .invoice-print-table {
  font-size: 8.5px !important;
  line-height: 1.24 !important;
}

.module-sales .invoice-print-table th,
.module-sales .invoice-print-table td {
  padding: 4px 5px !important;
}

.module-sales .invoice-detail-notice td {
  padding: 8px !important;
  white-space: normal !important;
}

.module-sales .invoice-tax-summary {
  width: min(320px, 100%) !important;
  font-size: 8.5px !important;
}

.module-sales .invoice-tax-summary th,
.module-sales .invoice-tax-summary td {
  padding: 4px 7px !important;
}

.module-sales .invoice-print-notes {
  gap: 7px !important;
  margin-top: 4px !important;
}

.module-sales .invoice-print-notes div {
  min-height: 0 !important;
  padding: 7px !important;
  border-radius: 7px !important;
}

.module-sales .invoice-print-notes strong {
  margin-bottom: 3px !important;
  font-size: 9px !important;
}

.module-sales .invoice-print-notes p {
  font-size: 8px !important;
  line-height: 1.35 !important;
}

.module-sales .invoice-detail-page-head {
  padding-bottom: 7px !important;
}

.module-sales .invoice-detail-logo {
  width: 96px !important;
  max-height: 28px !important;
}

.module-sales .invoice-detail-page-head span,
.module-sales .invoice-detail-page-head small {
  font-size: 8px !important;
}

.module-sales .invoice-detail-page-head strong {
  font-size: 13px !important;
  line-height: 1.2 !important;
}

@media print {
  .module-sales .invoice-print-page {
    padding: 7mm !important;
  }

  .module-sales .invoice-page-content {
    gap: 6px !important;
  }
}

/* Final 20260706 invoice master address, auto number, logo-only A4 invoice. */
.module-sales .invoice-company-profile-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.module-sales .invoice-company-profile-panel .section-title-row p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.module-sales .invoice-company-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.module-sales .invoice-company-profile-grid label,
.module-sales .invoice-bank-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.module-sales .invoice-company-profile-grid .wide,
.module-sales .invoice-bank-details {
  grid-column: 1 / -1;
}

.module-sales .invoice-company-profile-grid span,
.module-sales .invoice-bank-row label span {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.module-sales .invoice-bank-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.module-sales .invoice-bank-list {
  display: grid;
  gap: 10px;
}

.module-sales .invoice-bank-row {
  display: grid;
  grid-template-columns: 74px minmax(120px, 0.8fr) minmax(240px, 1.6fr) 56px;
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(91, 112, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.module-sales .invoice-bank-default {
  align-self: center;
  display: flex !important;
  grid-column: auto !important;
  align-items: center;
  gap: 6px !important;
  white-space: nowrap;
}

.module-sales .invoice-bank-row input,
.module-sales .invoice-bank-row textarea,
.module-sales .invoice-company-profile-grid input,
.module-sales .invoice-company-profile-grid textarea {
  width: 100%;
  min-width: 0;
}

.module-sales .invoice-company-editor .invoice-line {
  grid-template-columns: 28px minmax(170px, 1.45fr) minmax(128px, 0.95fr) minmax(104px, 0.76fr) minmax(76px, 0.48fr) minmax(112px, 0.72fr) 48px !important;
}

.module-sales .invoice-logo-only {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  min-height: 30px;
  text-align: right;
}

.module-sales .invoice-logo-only .invoice-brand-logo {
  display: block !important;
  width: 118px !important;
  height: 34px !important;
  margin-left: auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain;
}

.module-sales .invoice-print-title {
  color: #101828;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0;
  text-align: center;
}

.module-sales .ffu-invoice-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.42fr);
  align-items: start;
  gap: 28px !important;
}

.module-sales .invoice-client-block,
.module-sales .invoice-issuer-plain {
  min-width: 0;
}

.module-sales .ffu-invoice-head p {
  color: #111827 !important;
}

.module-sales .invoice-meta-row {
  display: flex;
  justify-content: flex-end;
}

.module-sales .invoice-meta-row dl {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr);
  gap: 4px 10px;
  width: 285px;
  max-width: 100%;
  margin: 0;
  color: #344054;
  font-size: 11px;
  transform: translateX(10px);
}

.module-sales .invoice-meta-row dt {
  font-weight: 900;
}

.module-sales .invoice-meta-row dd {
  margin: 0;
  color: #101828;
  font-weight: 800;
  text-align: right;
}

.module-sales .invoice-client-block h1 {
  margin-bottom: 5px !important;
}

.module-sales .invoice-client-address {
  margin: 0 0 8px;
  color: #111827;
  font-size: 11px;
  font-style: normal;
  line-height: 1.5;
}

.module-sales .invoice-issuer-plain {
  align-self: start;
  justify-self: end;
  width: 285px;
  min-width: 285px;
  color: #111827;
  font-size: 11px;
  line-height: 1.55;
  text-align: left;
  transform: translateX(10px);
}

.module-sales .invoice-issuer-plain strong {
  display: block;
  margin-bottom: 8px;
  color: #000;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 950;
}

.module-sales .invoice-issuer-plain p {
  margin: 0;
  color: #111827;
  font-size: 11px !important;
  line-height: 1.55 !important;
  font-weight: 800;
}

.module-sales .invoice-issuer-with-seal {
  position: relative;
  display: block;
  width: 285px;
  max-width: 100%;
  margin-left: auto;
  padding-right: 0;
}

.module-sales .invoice-issuer-text {
  min-width: 0;
}

.module-sales .invoice-company-seal {
  position: absolute;
  top: 26px;
  right: 72px;
  width: 62px;
  height: 62px;
  object-fit: contain;
  opacity: 0.9;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.module-sales .invoice-trade-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  color: #475467;
  font-size: 10px;
  font-weight: 800;
}

.module-sales .invoice-trade-summary span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.module-sales .invoice-print-table {
  width: 100% !important;
  table-layout: fixed !important;
  font-size: 10px !important;
}

.module-sales .invoice-print-table th,
.module-sales .invoice-print-table td {
  padding: 6px 7px !important;
  border-color: #d0d5dd !important;
  white-space: normal !important;
  vertical-align: top;
}

.module-sales .invoice-print-table th:nth-child(1),
.module-sales .invoice-print-table td:nth-child(1) {
  width: 51% !important;
  text-align: left;
}

.module-sales .invoice-print-table th:nth-child(2),
.module-sales .invoice-print-table td:nth-child(2) {
  width: 18% !important;
  text-align: right;
}

.module-sales .invoice-print-table th:nth-child(3),
.module-sales .invoice-print-table td:nth-child(3) {
  width: 12% !important;
  text-align: center;
}

.module-sales .invoice-print-table th:nth-child(4),
.module-sales .invoice-print-table td:nth-child(4) {
  width: 19% !important;
  text-align: right;
}

@media (max-width: 980px) {
  .module-sales .invoice-company-editor .invoice-line {
    grid-template-columns: 28px repeat(2, minmax(0, 1fr)) !important;
  }

  .module-sales .invoice-company-editor .invoice-line > * {
    grid-column: span 2;
  }

  .module-sales .invoice-company-editor .invoice-line-number {
    grid-column: span 1;
  }

  .module-sales .invoice-company-profile-grid,
  .module-sales .invoice-bank-row {
    grid-template-columns: 1fr;
  }

  .module-sales .invoice-bank-default {
    justify-content: flex-start;
  }

  .module-sales .invoice-trade-summary {
    grid-template-columns: 1fr;
  }
}

@media print {
  .module-sales .invoice-print-page {
    width: 194mm !important;
    min-height: 281mm !important;
    padding: 8mm !important;
  }

  .module-sales .ffu-invoice-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 66mm !important;
    align-items: start !important;
    gap: 10mm !important;
  }

  .module-sales .invoice-client-block,
  .module-sales .invoice-issuer-plain {
    min-width: 0 !important;
  }

  .module-sales .invoice-meta-row dl {
    width: 66mm !important;
    min-width: 66mm !important;
    transform: translateX(4mm) !important;
  }

  .module-sales .invoice-logo-only .invoice-brand-logo {
    width: 100px !important;
    height: 28px !important;
    margin-left: auto !important;
  }

  .module-sales .invoice-issuer-plain {
    width: 66mm !important;
    min-width: 66mm !important;
    color: #111827 !important;
    justify-self: end !important;
    text-align: left !important;
    transform: translateX(4mm) !important;
  }

  .module-sales .invoice-issuer-plain strong,
  .module-sales .invoice-issuer-plain p,
  .module-sales .invoice-client-address {
    color: #000 !important;
  }

  .module-sales .invoice-issuer-plain strong {
    margin-bottom: 6px !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
  }

  .module-sales .invoice-issuer-plain p {
    font-size: 8.5px !important;
    line-height: 1.55 !important;
    font-weight: 800 !important;
  }

  .module-sales .invoice-issuer-with-seal {
    width: 66mm !important;
    padding-right: 0 !important;
  }

  .module-sales .invoice-company-seal {
    top: 14px !important;
    right: 24mm !important;
    width: 16mm !important;
    height: 16mm !important;
  }

  .module-sales .invoice-print-title {
    font-size: 18px !important;
  }

  .module-sales .invoice-meta-row dl,
  .module-sales .invoice-client-address,
  .module-sales .invoice-issuer-plain,
  .module-sales .invoice-trade-summary,
  .module-sales .invoice-print-table,
  .module-sales .invoice-tax-summary,
  .module-sales .invoice-print-notes {
    font-size: 8.5px !important;
  }

  .module-sales .invoice-print-table th,
  .module-sales .invoice-print-table td {
    padding: 4px 5px !important;
  }
}

/* Final 20260707 contrast pass: keep dark screens readable without changing invoice paper output. */
.module-sales {
  --sales-surface: #101827;
  --sales-surface-2: #142033;
  --sales-text: #f8fafc;
  --sales-muted: #d4deef;
  --sales-line: rgba(148, 163, 184, 0.34);
  --sales-input-bg: #f8fbff;
  --sales-input-text: #08111f;
  --sales-input-muted: #64748b;
}

.module-sales .page-header h1,
.module-sales .panel h2,
.module-sales .panel h3,
.module-sales .section-title-row h2,
.module-sales .section-title-row h3,
.module-sales .kpi strong,
.module-sales .responsive-table td,
.module-sales .responsive-table th,
.module-sales .invoice-card strong {
  color: var(--sales-text) !important;
}

.module-sales .page-kicker,
.module-sales .muted,
.module-sales .empty,
.module-sales small,
.module-sales .kpi span,
.module-sales .kpi small,
.module-sales .dashboard-table-wrap td small,
.module-sales .invoice-toolbar p,
.module-sales .invoice-lines-head p,
.module-sales .invoice-client-title,
.module-sales .invoice-card small,
.module-sales .project-check-item small {
  color: var(--sales-muted) !important;
}

.module-sales .panel,
.module-sales .kpi,
.module-sales .table-wrap,
.module-sales .master-editor,
.module-sales .invoice-editor-card,
.module-sales .invoice-card,
.module-sales .project-check-item,
.module-sales .invoice-project-picker,
.module-sales .staff-card {
  border-color: var(--sales-line) !important;
  background:
    linear-gradient(180deg, rgba(20, 31, 49, 0.98), rgba(12, 19, 32, 0.99)),
    var(--sales-surface) !important;
}

.module-sales .responsive-table th {
  color: #e7eefb !important;
  background: #1d2b45 !important;
}

.module-sales .responsive-table tr {
  background: #101a2c !important;
}

.module-sales .table-select,
.module-sales .table-input,
.module-sales .select,
.module-sales input,
.module-sales select,
.module-sales textarea,
.module-sales .invoice-line .table-input,
.module-sales .invoice-line .table-select,
.module-sales .project-detail-lane .table-input,
.module-sales .project-detail-lane .table-select {
  color: var(--sales-input-text) !important;
  background: var(--sales-input-bg) !important;
  border-color: #8fb0e8 !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 255, 0.08);
}

.module-sales input::placeholder,
.module-sales textarea::placeholder {
  color: var(--sales-input-muted) !important;
  opacity: 1 !important;
}

.module-sales select option {
  color: #08111f !important;
  background: #ffffff !important;
}

.module-sales .field label,
.module-sales .modal .field label,
.module-sales .project-form-grid .field label,
.module-sales .invoice-toolbar label span,
.module-sales .invoice-editor-grid label span,
.module-sales .invoice-line label span,
.module-sales .multi-filter span,
.module-sales .invoice-filter-grid label span,
.module-sales .invoice-project-picker h3 {
  color: #f1f5ff !important;
}

.module-sales .invoice-line,
.module-sales .project-detail-lane {
  border-color: rgba(125, 211, 252, 0.34) !important;
  background: rgba(15, 27, 46, 0.96) !important;
}

.module-sales .invoice-line-subtotal,
.module-sales .project-detail-subtotal {
  color: #ffffff !important;
  border-color: rgba(125, 211, 252, 0.3) !important;
  background: #1b2a44 !important;
}

.module-sales .invoice-line-subtotal small,
.module-sales .project-detail-subtotal small {
  color: #d4deef !important;
}

.module-sales .filter-button,
.module-sales .secondary,
.module-sales .ghost {
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.42) !important;
  background: #17243a !important;
}

.module-sales .filter-button b {
  color: #ffffff !important;
  background: #0369a1 !important;
}

.module-sales .filter-popover {
  color: #f8fafc !important;
  border-color: rgba(125, 211, 252, 0.42) !important;
  background: #0f1a2d !important;
}

.module-sales .filter-check-item {
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: #182741 !important;
}

.module-sales .filter-check-item:hover {
  color: #ffffff !important;
  border-color: rgba(34, 211, 238, 0.65) !important;
  background: #0e7490 !important;
}

.module-sales .badge,
.module-sales .chip:not(.active),
.module-sales .status-pill,
.module-sales .tag {
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
  background: #1b2a44 !important;
}

/* Keep printable invoice paper black-on-white. */
.module-sales .invoice-print-sheet {
  background: #ffffff !important;
  color: #101828 !important;
}

.module-sales .invoice-print-sheet .invoice-print-title,
.module-sales .invoice-print-sheet .invoice-client-block h1,
.module-sales .invoice-print-sheet .invoice-issuer-plain strong,
.module-sales .invoice-print-sheet .invoice-issuer-plain p,
.module-sales .invoice-print-sheet .invoice-print-table th,
.module-sales .invoice-print-sheet .invoice-print-table td,
.module-sales .invoice-print-sheet .invoice-tax-summary th,
.module-sales .invoice-print-sheet .invoice-tax-summary td,
.module-sales .invoice-print-sheet .invoice-print-notes strong,
.module-sales .invoice-print-sheet .invoice-print-notes p {
  color: #101828 !important;
}

.invoice-print-sheet .invoice-total-box small,
.module-sales .invoice-print-sheet .invoice-total-box small,
.module-sales .invoice-print-sheet .ffu-invoice-total small {
  color: #1e2f4d !important;
  opacity: 1 !important;
  font-weight: 900 !important;
}
