html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: 16px;
}

body {
  color: #111827;
  background: #f4f4f5;
  font-family: Inter, sans-serif;
}

.app-shell {
  font-size: 13.5px;
}

.app-main .table {
  font-size: 14px;
}

.app-shell .badge {
  padding: 0.4em 0.65em;
  font-size: 0.8rem;
}

.app-alert-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1080;
  display: flex;
  width: min(26rem, calc(100vw - 2rem));
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.app-alert-stack .alert {
  margin: 0;
  overflow-wrap: anywhere;
  pointer-events: auto;
}

.job-status-form {
  min-width: 10rem;
  margin: 0;
}

.job-status-form .form-select {
  font-weight: 600;
}

.job-status-trigger {
  border: 0;
  cursor: pointer;
}

.job-status-trigger:focus-visible {
  outline: 0.2rem solid rgb(var(--bs-primary-rgb) / 35%);
  outline-offset: 0.15rem;
}

#invoice-tab-pane > *:not(.app-invoice-watermark) {
  position: relative;
  z-index: 1;
}

.app-invoice-watermark {
  position: absolute;
  top: 8rem;
  left: 50%;
  z-index: 0;
  color: rgb(var(--bs-secondary-rgb) / 8%);
  font-size: clamp(5rem, 16vw, 11rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: translateX(-50%) rotate(-18deg);
  pointer-events: none;
}

.app-invoice-parties {
  min-height: 10rem;
}

.app-invoice-meta > div,
.app-invoice-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.app-invoice-meta > div {
  padding-block: 0.2rem;
}

.app-invoice-meta dt {
  color: var(--bs-secondary-color);
  font-weight: 500;
}

.app-invoice-meta dd,
.app-invoice-totals dd {
  margin-bottom: 0;
  text-align: right;
}

.app-invoice-notes {
  padding: 1rem;
  background: var(--bs-tertiary-bg);
  border-radius: var(--bs-border-radius);
}

.app-payment-balance,
.app-payment-change {
  padding: 1rem;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
}

.app-payment-change {
  min-height: 6.25rem;
}

.app-payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.app-payment-method {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-weight: 600;
}

.app-payment-method:last-child {
  width: calc(50% - 0.375rem);
  grid-column: 1 / -1;
  justify-self: center;
}

@media (max-width: 575.98px) {
  .app-payment-methods {
    grid-template-columns: 1fr;
  }

  .app-payment-method:last-child {
    width: 100%;
    grid-column: auto;
  }
}

.app-invoice-totals {
  margin-left: auto;
  max-width: 24rem;
}

.app-invoice-totals > div {
  padding: 0.45rem 0.75rem;
}

.app-invoice-totals dt {
  font-weight: 500;
}

.app-invoice-total,
.app-invoice-balance {
  margin-top: 0.25rem;
  border-top: 1px solid var(--bs-border-color);
  font-size: 1.1rem;
  font-weight: 700;
}

.app-invoice-balance {
  color: var(--bs-primary);
  background: var(--bs-primary-bg-subtle);
  border-radius: var(--bs-border-radius);
}

@media (max-width: 767.98px) {
  .app-invoice-parties {
    min-height: 0;
  }
}
/* Application shell */
.app-header {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);
}

.app-header-menu-icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

/* Application sidebar */
.app-sidebar {
  --bs-offcanvas-width: 230px;
}

.app-sidebar-body {
  display: flex;
  width: 100%;
  flex-direction: column;
}

.app-sidebar-icon path[stroke] {
  fill: none;
}

.app-sidebar-user-toggle.dropdown-toggle::after {
  display: none;
}

@media (min-width: 992px) {
  .app-sidebar {
    position: sticky;
    top: 57px;
    flex: 0 0 230px;
    width: 230px;
    height: calc(100vh - 57px);
    overflow-y: auto;
  }

  .app-sidebar-brand {
    display: none;
  }
}

/* Customer workspace */
.customer-workspace {
  display: grid;
  grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.customer-context-nav {
  --customer-nav-text: #2f3840;
  --customer-nav-muted: #65717a;
  --customer-nav-border: #dfe3e6;
  background: transparent;
}

.customer-context-heading {
  padding: 0.875rem 1rem;
  color: var(--customer-nav-text);
  border-bottom: 1px solid var(--customer-nav-border);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-context-links {
  padding: 0.5rem;
}

.customer-context-link {
  background: transparent;
  border: 1px solid transparent;
  color: var(--customer-nav-text);
  text-decoration: none;
}

.customer-context-icon {
  color: var(--customer-nav-muted);
}

.customer-context-link:hover,
.customer-context-link:focus,
.customer-context-link:focus-visible {
  color: #2563eb;
  background: #fafafa;
  border-color: var(--customer-nav-border);
  text-decoration: none;
}

.customer-context-link.active {
  color: #2563eb;
  background: #fff;
  border-color: var(--customer-nav-border);
  font-weight: 600;
  text-decoration: none;
}

.customer-context-link.active .customer-context-icon,
.customer-context-mobile-link.active .customer-context-icon {
  color: #2563eb;
}

.customer-context-count {
  color: var(--customer-nav-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.customer-workspace-content {
  min-width: 0;
}

.panel_s {
  background-color: #fff;
  border: 1px solid rgba(209, 213, 219, 0.6);
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  margin-bottom: 25px;
}

.panel_s > .panel-body {
  position: relative;
  padding: 1.5rem;
  background-color: #fff;
  border-radius: 0.375rem;
}

/* Customer workspace data tables */
.app-data-table-region .app-data-table {
  --bs-table-bg: #fff;
  --bs-table-color: #212529;
  margin-bottom: 0;
}

.app-data-table-region .app-data-table > thead > tr > th {
  padding: 0.65rem 0.75rem;
  color: #111827;
  background-color: #f3f4f6;
  border-bottom: 1px solid #cbd5e1;
  font-weight: 600;
}

.app-data-table-region .app-data-table > thead > tr > th .dt-column-header {
  flex-direction: row;
}

.app-data-table-region .app-data-table > thead > tr > th .dt-column-order {
  right: auto;
  left: auto;
  flex: 0 0 var(--dt-order-arrow-width);
  margin-right: 0;
  margin-left: auto;
}

.app-data-table-region .app-data-table > tbody > tr > td {
  padding: 0.45rem 0.75rem;
  background-color: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.app-data-table-region .app-data-table > tbody > tr:hover > td {
  background-color: #f8fafc;
}

#expenses-table > thead > tr > th:first-child,
#expenses-table > tbody > tr > td:first-child,
#customer-contacts-table > thead > tr > th:first-child,
#customer-contacts-table > tbody > tr > td:first-child,
#invoices-table > thead > tr > th:first-child,
#invoices-table > tbody > tr > td:first-child,
#customer-jobs-table > thead > tr > th:first-child,
#customer-jobs-table > tbody > tr > td:first-child,
#payments-table > thead > tr > th:first-child,
#payments-table > tbody > tr > td:first-child,
#customers-table > thead > tr > th:first-child,
#customers-table > tbody > tr > td:first-child,
#jobs-table > thead > tr > th:first-child,
#jobs-table > tbody > tr > td:first-child {
  text-align: left;
}

.app-data-table-region .dt-container {
  color: #374151;
  font-size: 0.875rem;
}

.app-data-table-region .dt-container .dt-layout-row:first-child {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.app-data-table-region .dt-container .dt-layout-row:last-child {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.app-data-table-region .dt-container .dt-search input {
  width: min(14rem, 100%);
}

.app-data-table-region .dt-container .pagination {
  --bs-pagination-font-size: 0.875rem;
  --bs-pagination-padding-x: 0.55rem;
  --bs-pagination-padding-y: 0.25rem;
  margin-bottom: 0;
}

.customer-context-mobile {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
}

.customer-context-mobile-link {
  background: transparent;
  border: 1px solid transparent;
  color: var(--customer-nav-text);
  text-decoration: none;
}

.customer-context-mobile-link:hover,
.customer-context-mobile-link:focus,
.customer-context-mobile-link:focus-visible {
  color: #2563eb;
  background: #fafafa;
  border-color: var(--customer-nav-border);
  text-decoration: none;
}

.customer-context-mobile-link.active {
  color: #2563eb;
  background: #fff;
  border-color: var(--customer-nav-border);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 991.98px) {
  .customer-workspace {
    display: block;
  }

  .customer-context-nav {
    margin-bottom: 1rem;
  }
}
