:root {
  --ink: #152534;
  --muted: #6c7b89;
  --line: #dbe4eb;
  --soft: #e9eff4;
  --canvas: #f4f7fa;
  --paper: #fff;
  --blue: #087fb6;
  --blue-dark: #075d88;
  --blue-soft: #e8f5fc;
  --navy: #102c42;
  --cyan: #16a9e3;
  --amber: #a86700;
  --amber-soft: #fff5df;
  --red: #b24c3a;
  --red-soft: #fff0eb;
  --shadow: 0 12px 34px rgba(15, 45, 67, 0.08);
  --radius: 17px;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--canvas);
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(8, 127, 182, 0.24);
  outline-offset: 2px;
}
img {
  max-width: 100%;
}
.app-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 236px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}
.sidebar-head {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--soft);
}
.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
}
.brand img {
  display: block;
  width: 126px;
  height: auto;
}
.brand span {
  padding-bottom: 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.brand.large img {
  width: 170px;
}
.brand.large span {
  font-size: 13px;
}
.close-menu {
  display: none;
}
.side-nav {
  display: grid;
  gap: 6px;
  padding: 24px 14px;
}
.side-nav a {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 13px;
  padding: 0 13px;
  border-radius: 12px;
  color: #40555f;
  font-size: 14px;
  font-weight: 650;
  transition: 0.16s ease;
}
.side-nav a:hover {
  background: #edf5fa;
  color: var(--blue-dark);
  transform: translateX(2px);
}
.side-nav a.active {
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #eef4f8;
  color: #416c85;
  font-size: 12px;
  font-weight: 900;
}
.side-nav a.active .nav-icon {
  background: #d7edf8;
  color: var(--blue-dark);
}
.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 18px;
  border-top: 1px solid var(--soft);
}
.sidebar-foot > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}
.sidebar-foot strong,
.sidebar-foot small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-foot strong {
  font-size: 12px;
}
.sidebar-foot small {
  color: var(--muted);
  font-size: 10px;
  text-transform: capitalize;
}
.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.sidebar-foot form {
  margin: 0;
}
.workspace {
  min-width: 0;
  margin-left: 236px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 0 34px;
  border-bottom: 1px solid rgba(220, 229, 235, 0.92);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
}
.global-search {
  display: flex;
  width: min(400px, 35vw);
  height: 43px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  color: var(--muted);
}
.global-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}
.mobile-menu,
.mobile-brand,
.bottom-nav,
.sidebar-scrim {
  display: none;
}
.main-content {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 36px 34px 72px;
}
.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: 0.15s ease;
}
.button:hover:not(:disabled) {
  transform: translateY(-1px);
}
.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
.button-primary {
  background: linear-gradient(135deg, var(--blue), #159ed8);
  color: #fff;
  box-shadow: 0 8px 20px rgba(8, 127, 182, 0.19);
}
.button-primary:hover:not(:disabled) {
  background: var(--blue-dark);
}
.button-secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}
.button-secondary:hover:not(:disabled) {
  border-color: #b6c9d5;
  background: #fbfcfe;
}
.button-ghost {
  border-color: transparent;
  background: transparent;
  color: #53676f;
}
.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  color: #526770;
  font-size: 18px;
}
.icon-button:hover {
  background: #edf3f8;
}
.icon-button.danger {
  color: var(--red);
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 27px;
}
.page-heading h1 {
  margin: 4px 0 7px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.045em;
}
.page-heading > div > p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.text-link {
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
}
.section-block {
  margin-top: 31px;
}
.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}
.section-title-row h2 {
  margin: 3px 0 0;
  font-size: 20px;
  letter-spacing: -0.025em;
}
.alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #cfe2ee;
  border-radius: 13px;
  background: #eef7fc;
  color: #285a75;
  font-size: 13px;
  line-height: 1.5;
}
.alert strong {
  white-space: nowrap;
}
.alert button {
  margin: -7px -8px -7px auto;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 20px;
  cursor: pointer;
}
.alert a {
  margin-left: auto;
  font-weight: 800;
  text-decoration: underline;
}
.alert.success {
  border-color: #bcdcec;
  background: #eaf5fb;
  color: #1c6288;
}
.alert.warning {
  border-color: #efdba8;
  background: var(--amber-soft);
  color: #76500a;
}
.alert.danger {
  border-color: #f0cfc8;
  background: var(--red-soft);
  color: #8b3e30;
}
.action-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 14px;
}
.action-card {
  display: flex;
  min-height: 108px;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: 0.16s ease;
}
.action-card:hover {
  transform: translateY(-2px);
  border-color: #b9cbd8;
  box-shadow: 0 16px 38px rgba(15, 45, 67, 0.11);
}
.action-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 5px;
}
.action-card strong {
  font-size: 14px;
}
.action-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.action-card > b {
  color: #91a2aa;
}
.action-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 18px;
  font-weight: 900;
}
.action-card.primary {
  border-color: var(--blue);
  background: linear-gradient(135deg, #087fb6, #18a7df);
  color: #fff;
  box-shadow: 0 14px 28px rgba(8, 127, 182, 0.22);
}
.action-card.primary small {
  color: rgba(255, 255, 255, 0.8);
}
.action-card.primary .action-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.action-card.primary > b {
  color: #fff;
}
.record-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.record-row {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 14px;
  padding: 12px 17px;
  border-bottom: 1px solid var(--soft);
  transition: 0.14s ease;
}
.record-row:last-child {
  border-bottom: 0;
}
.record-row:hover {
  background: #fafcfe;
}
.record-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 12px;
  background: #eef4f8;
  color: #3b637d;
  font-size: 12px;
  font-weight: 900;
}
.record-main {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}
.record-main strong,
.record-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.record-main strong {
  font-size: 13px;
}
.record-main small {
  color: var(--muted);
  font-size: 11px;
}
.record-row > b {
  color: #91a2aa;
}
.status {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}
.status.success {
  background: #e8f4fa;
  color: #1c678f;
}
.status.warning {
  background: var(--amber-soft);
  color: var(--amber);
}
.status.danger {
  background: var(--red-soft);
  color: var(--red);
}
.status.neutral {
  background: #eef3f5;
  color: #60747b;
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}
.info-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.info-card > a {
  grid-column: 1/-1;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 800;
}
.info-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
}
.metric {
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.info-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.list-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.list-toolbar .search-field {
  max-width: 520px;
  flex: 1;
}
.search-field {
  display: flex;
  height: 46px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
}
.search-field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
}
.data-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.table-head,
.table-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) minmax(
      150px,
      1fr
    ) 130px 110px 50px;
  align-items: center;
  gap: 15px;
  padding: 0 18px;
}
.table-head {
  min-height: 43px;
  background: #f7f9fb;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.table-row {
  min-height: 72px;
  border-top: 1px solid var(--soft);
  font-size: 12px;
}
.table-row:hover {
  background: #fafcfe;
}
.table-row > span,
.row-main-link {
  min-width: 0;
}
.table-row strong,
.table-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.table-row > b {
  color: #91a2aa;
  font-size: 18px;
}
.row-actions {
  display: flex;
}
.row-main-link:hover strong {
  color: var(--blue-dark);
}
.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 38px;
  text-align: center;
}
.empty-state span {
  color: var(--muted);
  font-size: 12px;
}
.empty-state.large {
  min-height: 55vh;
  place-content: center;
}
.filter-pills {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
  overflow: auto;
}
.filter-pills a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #597079;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.filter-pills a.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.form-card,
.panel,
.wizard-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.form-card {
  padding: clamp(20px, 3vw, 32px);
}
.form-card.compact {
  margin-bottom: 18px;
}
.form-grid {
  display: grid;
  gap: 15px;
}
.form-grid.two-columns {
  grid-template-columns: 1fr 1fr;
}
.field {
  display: grid;
  gap: 7px;
}
.field-wide {
  grid-column: 1/-1;
}
.field > span {
  color: #40565f;
  font-size: 10px;
  font-weight: 850;
}
.field input,
.field textarea,
.field select,
.service-adder select,
.inline-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}
.field input,
.field select,
.service-adder select,
.inline-form select {
  height: 44px;
  padding: 0 12px;
}
.field textarea {
  min-height: 92px;
  padding: 11px 12px;
  line-height: 1.5;
  resize: vertical;
}
.field input:focus,
.field textarea:focus,
.field select:focus,
.service-adder select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #40565f;
  font-size: 12px;
  font-weight: 750;
}
.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
.checkbox-field > span {
  display: grid;
  gap: 3px;
}
.checkbox-field small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}
.form-actions,
.sticky-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.service-list {
  display: grid;
  gap: 9px;
}
.service-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 120px 75px 42px;
  align-items: center;
  gap: 15px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.service-card.inactive {
  opacity: 0.62;
}
.service-code {
  display: grid;
  min-height: 35px;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 900;
}
.service-card strong {
  font-size: 12px;
}
.service-card p {
  margin: 4px 0;
  color: #53676f;
  font-size: 10px;
}
.service-card small {
  color: var(--muted);
  font-size: 9px;
}
.service-price {
  text-align: right;
  font-size: 11px;
  font-weight: 800;
}
.document-form {
  display: grid;
  gap: 17px;
}
.wizard-section {
  padding: clamp(20px, 3vw, 30px);
}
.wizard-section > header {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 23px;
}
.wizard-section > header > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
}
.wizard-section h2,
.panel h2 {
  margin: 0 0 5px;
  font-size: 19px;
  letter-spacing: -0.025em;
}
.wizard-section header p,
.panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.service-adder {
  display: flex;
  gap: 9px;
  margin-bottom: 13px;
}
.service-adder select {
  flex: 1;
}
.line-items {
  display: grid;
  gap: 12px;
}
.line-item {
  padding: 15px;
  border: 1px solid var(--soft);
  border-radius: 13px;
  background: #fbfcfe;
}
.line-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.line-item-head strong {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.line-fields {
  display: grid;
  grid-template-columns: 0.7fr 0.8fr 1fr 0.8fr 0.7fr 1fr;
  align-items: end;
  gap: 9px;
  margin-top: 10px;
}
.line-total {
  display: grid;
  height: 44px;
  align-content: center;
  justify-items: end;
}
.line-total span {
  color: var(--muted);
  font-size: 9px;
}
.line-total strong {
  font-size: 12px;
}
.document-totals {
  display: grid;
  justify-content: end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--soft);
}
.document-totals > span {
  display: flex;
  min-width: 260px;
  justify-content: space-between;
  gap: 40px;
  color: var(--muted);
  font-size: 11px;
}
.document-totals strong {
  color: var(--ink);
}
.document-totals .grand-total {
  margin-top: 3px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}
.document-totals .grand-total strong {
  color: var(--blue-dark);
  font-size: 19px;
}
.sticky-actions {
  position: sticky;
  bottom: 14px;
  z-index: 8;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(219, 228, 235, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(15, 45, 67, 0.12);
  backdrop-filter: blur(12px);
}
.safe-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 17px;
  padding: 13px;
  border: 1px solid #cfe2ee;
  border-radius: 12px;
  background: #eef7fc;
  color: #285a75;
  font-size: 11px;
}
.safe-note > span {
  color: #4d6d7e;
}
.post-save-grid,
.invoice-summary-grid,
.settings-grid,
.migration-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  margin-top: 20px;
}
.panel {
  padding: 22px;
}
.panel .eyebrow {
  margin-bottom: 5px;
}
.inline-form {
  display: flex;
  gap: 9px;
  margin-top: 15px;
}
.inline-form select {
  flex: 1;
}
.small-note {
  margin-top: 12px !important;
}
.send-form,
.payment-form,
.emit-form {
  display: grid;
  gap: 13px;
  margin-top: 16px;
}
.jobs-table .table-head,
.jobs-table .table-row {
  grid-template-columns: minmax(220px, 1.6fr) minmax(
      150px,
      1fr
    ) 120px 110px 30px;
}
.invoice-summary-grid {
  margin-top: 0;
  margin-bottom: 17px;
}
.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.summary-header > strong {
  font-size: 26px;
}
.details-list {
  display: grid;
  gap: 10px;
  margin: 0;
}
.details-list > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.details-list dt {
  color: var(--muted);
  font-size: 10px;
}
.details-list dd {
  margin: 0;
  text-align: right;
  font-size: 11px;
  font-weight: 750;
}
.invoice-line-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid var(--soft);
}
.invoice-line-summary:last-child {
  border-bottom: 0;
}
.invoice-line-summary span {
  min-width: 0;
}
.invoice-line-summary strong,
.invoice-line-summary small {
  display: block;
}
.invoice-line-summary strong {
  font-size: 11px;
}
.invoice-line-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.invoice-line-summary b {
  font-size: 11px;
  white-space: nowrap;
}
.fiscal-panel,
.send-panel {
  margin-top: 17px;
}
.fiscal-panel > p:not(.eyebrow) {
  max-width: 700px;
  margin-bottom: 15px;
}
.checkbox-field.critical {
  padding: 14px;
  border: 1px solid #efdba8;
  border-radius: 12px;
  background: var(--amber-soft);
  color: #6e4c0d;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.metric-grid article {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.metric-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.metric-grid strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}
.metric-grid .alert-metric {
  border-color: #efd5ce;
  background: #fff8f6;
}
.metric-grid .alert-metric strong {
  color: var(--red);
}
.finance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.8fr);
  align-items: start;
  gap: 18px;
}
.finance-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.finance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 80px;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--soft);
}
.finance-row:last-child {
  border-bottom: 0;
}
.finance-row:hover,
.finance-row.selected {
  background: #f5fafd;
}
.finance-row.selected {
  box-shadow: inset 3px 0 0 var(--blue);
}
.finance-row span strong,
.finance-row span small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finance-row span strong {
  font-size: 11px;
}
.finance-row span small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}
.finance-row > span:nth-child(2) {
  text-align: right;
}
.finance-layout aside {
  position: sticky;
  top: 96px;
}
.big-balance {
  display: grid !important;
  margin: 15px 0 !important;
  color: var(--blue-dark) !important;
  font-size: 29px !important;
  font-weight: 900;
}
.big-balance small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}
.empty-aside {
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}
.empty-aside span {
  color: var(--muted);
  font-size: 10px;
}
.settings-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
  align-items: start;
  margin-top: 0;
}
.settings-form .subheading {
  margin-top: 28px;
  margin-bottom: 11px;
}
.settings-aside {
  display: grid;
  gap: 13px;
}
.settings-aside .panel {
  box-shadow: none;
}
.settings-aside p {
  margin-bottom: 15px;
}
.integration-status {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid #efdba8;
  border-radius: 12px;
  background: var(--amber-soft);
  color: #76500a;
}
.integration-status.connected {
  border-color: #c7e1ef;
  background: #edf7fc;
  color: #245f7e;
}
.integration-status > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  font-weight: 900;
}
.integration-status > div {
  display: grid;
  gap: 3px;
}
.integration-status strong {
  font-size: 11px;
}
.integration-status small {
  font-size: 9px;
}
.migration-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: start;
  margin-top: 0;
}
.migration-form .safe-note {
  margin: 0 0 18px;
}
.upload-field {
  display: grid;
  gap: 9px;
  padding: 20px;
  border: 1px dashed #a8c5d5;
  border-radius: 13px;
  background: #f7fbfd;
}
.upload-field > span {
  font-size: 11px;
  font-weight: 800;
}
.upload-field small {
  color: var(--muted);
  font-size: 9px;
}
.import-options {
  display: grid;
  gap: 13px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.import-options legend {
  padding: 0 7px;
  font-size: 10px;
  font-weight: 850;
}
.sync-list {
  display: grid;
}
.sync-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--soft);
}
.sync-list > div:last-child {
  border-bottom: 0;
}
.sync-list span strong,
.sync-list span small {
  display: block;
}
.sync-list span strong {
  font-size: 11px;
}
.sync-list span small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.login-body,
.install-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, #e6f5fb 0, transparent 34%),
    linear-gradient(135deg, #f8fafc, #eef4f8);
}
.login-shell {
  display: grid;
  grid-template-columns: minmax(360px, 500px) minmax(360px, 1fr);
  width: min(1050px, calc(100% - 40px));
  min-height: 620px;
  margin: 7vh auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 45, 67, 0.14);
}
.login-panel {
  display: grid;
  align-content: center;
  padding: clamp(34px, 6vw, 68px);
}
.login-panel > .brand {
  margin-bottom: 50px;
}
.login-panel h1 {
  margin: 5px 0 8px;
  font-size: 39px;
  letter-spacing: -0.05em;
}
.login-panel > p:not(.eyebrow) {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}
.login-form {
  display: grid;
  gap: 14px;
}
.login-form .button {
  margin-top: 5px;
}
.login-aside {
  display: grid;
  align-content: center;
  padding: 65px;
  background: linear-gradient(145deg, #0a688f, #102f46);
  color: #fff;
}
.login-aside > p {
  margin: 0 0 15px;
  color: #9bdaf1;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.login-aside h2 {
  max-width: 470px;
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.login-aside ul {
  display: grid;
  gap: 13px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}
.login-aside li {
  font-size: 12px;
  color: #d4eaf3;
}
.login-aside li:before {
  margin-right: 8px;
  color: #4cc3ec;
  content: "✓";
}
.install-shell {
  width: min(900px, calc(100% - 32px));
  margin: 42px auto 80px;
}
.install-brand {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin-bottom: 22px;
  padding-left: 6px;
}
.install-brand img {
  width: 145px;
}
.install-brand span {
  padding-bottom: 1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.install-card {
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}
.install-card h1 {
  margin: 4px 0 8px;
  font-size: 36px;
  letter-spacing: -0.045em;
}
.install-card .lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 25px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f3f7fa;
  color: #526770;
  font-size: 10px;
  font-weight: 700;
}
.check-item span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #dfedf4;
  color: var(--blue-dark);
  font-weight: 900;
}
.check-item.fail {
  background: var(--red-soft);
  color: var(--red);
}
.check-item.fail span {
  background: #f5d7d0;
}
.install-form {
  display: grid;
  gap: 20px;
}
.install-form fieldset {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.install-form legend {
  padding: 0 8px;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
}
.install-submit {
  justify-self: end;
}
@media (max-width: 1050px) {
  .action-grid {
    grid-template-columns: 1fr 1fr;
  }
  .overview-grid {
    grid-template-columns: 1fr 1fr;
  }
  .line-fields {
    grid-template-columns: repeat(3, 1fr);
  }
  .line-total {
    justify-items: start;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .table-head,
  .table-row {
    grid-template-columns: minmax(210px, 1.4fr) minmax(
        130px,
        1fr
      ) 110px 90px 44px;
  }
  .service-card {
    grid-template-columns: 70px minmax(0, 1fr) 100px 65px 40px;
  }
}
@media (max-width: 820px) {
  .sidebar {
    transform: translateX(-102%);
    box-shadow: 0 15px 45px rgba(15, 45, 67, 0.22);
    transition: transform 0.2s ease;
  }
  .menu-open .sidebar {
    transform: translateX(0);
  }
  .close-menu {
    display: grid;
  }
  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(10, 30, 43, 0.35);
  }
  .menu-open .sidebar-scrim {
    display: block;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    min-height: 65px;
    padding: 0 16px;
  }
  .mobile-menu {
    display: grid;
    margin-right: auto;
  }
  .mobile-brand {
    display: flex;
    margin-right: auto;
  }
  .mobile-brand img {
    width: 102px;
  }
  .global-search {
    display: none;
  }
  .top-action {
    display: none;
  }
  .main-content {
    padding: 25px 17px 100px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .page-heading > .button {
    flex: 0 0 auto;
  }
  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 22;
    display: grid;
    grid-template-columns: 1fr 1fr 64px 1fr 1fr;
    min-height: 68px;
    padding: 7px max(9px, env(safe-area-inset-right))
      calc(6px + env(safe-area-inset-bottom))
      max(9px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 24px rgba(15, 45, 67, 0.08);
    backdrop-filter: blur(14px);
  }
  .bottom-nav a,
  .bottom-nav button {
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #6a7c84;
    font-size: 8px;
    font-weight: 750;
  }
  .bottom-nav a > span,
  .bottom-nav button > span {
    font-size: 15px;
    font-weight: 900;
  }
  .bottom-nav .active {
    color: var(--blue-dark);
  }
  .bottom-nav .bottom-create {
    width: 52px;
    height: 52px;
    align-self: center;
    justify-self: center;
    margin-top: -22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    font-size: 27px;
    box-shadow: 0 8px 20px rgba(8, 127, 182, 0.25);
  }
  .post-save-grid,
  .invoice-summary-grid,
  .settings-grid,
  .migration-grid,
  .finance-layout {
    grid-template-columns: 1fr;
  }
  .finance-layout aside {
    position: static;
  }
  .data-table .table-head {
    display: none;
  }
  .data-table .table-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    min-height: 0;
    padding: 14px 15px;
  }
  .data-table .table-row > span,
  .data-table .table-row > .row-main-link {
    grid-column: 1;
  }
  .data-table .table-row > span[data-label]:before {
    display: inline-block;
    min-width: 70px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 850;
    text-transform: uppercase;
    content: attr(data-label);
  }
  .data-table .table-row > b,
  .data-table .row-actions {
    grid-column: 2;
    grid-row: 1/5;
    align-self: center;
  }
  .proposal-table .table-row {
    display: grid;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .login-shell {
    grid-template-columns: 1fr;
    width: min(520px, calc(100% - 26px));
    min-height: 0;
    margin: 4vh auto;
  }
  .login-aside {
    display: none;
  }
  .login-panel {
    padding: 38px 27px;
  }
  .login-panel > .brand {
    margin-bottom: 36px;
  }
}
@media (max-width: 620px) {
  .page-heading {
    display: grid;
  }
  .page-heading > .button {
    justify-self: start;
  }
  .action-grid {
    grid-template-columns: 1fr;
  }
  .action-card {
    min-height: 90px;
  }
  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }
  .field-wide {
    grid-column: auto;
  }
  .line-fields {
    grid-template-columns: 1fr 1fr;
  }
  .service-adder {
    display: grid;
  }
  .document-totals {
    justify-content: stretch;
  }
  .document-totals > span {
    min-width: 0;
  }
  .sticky-actions {
    bottom: 76px;
  }
  .service-card {
    grid-template-columns: 55px minmax(0, 1fr) 40px;
  }
  .service-price,
  .service-card > .status {
    grid-column: 2;
  }
  .service-card > .icon-button {
    grid-column: 3;
    grid-row: 1/3;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric-grid strong {
    font-size: 20px;
  }
  .finance-row {
    grid-template-columns: minmax(0, 1fr) 105px;
  }
  .finance-row > .status {
    grid-column: 1/-1;
    justify-self: start;
  }
  .check-grid {
    grid-template-columns: 1fr;
  }
  .install-card {
    padding: 25px 18px;
  }
  .install-card h1 {
    font-size: 30px;
  }
  .install-form fieldset {
    padding: 16px;
  }
  .install-submit {
    width: 100%;
  }
  .record-row .status {
    display: none;
  }
}
@media (max-width: 390px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .line-fields {
    grid-template-columns: 1fr;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .main-content {
    padding-right: 13px;
    padding-left: 13px;
  }
  .wizard-section,
  .panel,
  .form-card {
    padding: 18px 15px;
  }
}
@media print {
  .sidebar,
  .topbar,
  .bottom-nav,
  .sticky-actions,
  .page-heading > .button,
  .alert {
    display: none !important;
  }
  .workspace {
    margin: 0;
  }
  .main-content {
    width: 100%;
    padding: 0;
  }
  .panel,
  .wizard-section,
  .form-card {
    box-shadow: none;
  }
}
