a {
  text-decoration: none;
}

.content {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

@media (max-width: 767.98px) {
  .content {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

.sidebar .nav-link,
.sidebar .nav-link .sidebar-text,
.sidebar .nav-link .sidebar-icon,
.sidebar .accordion-button,
.sidebar .accordion-button .sidebar-text,
.sidebar .accordion-button .sidebar-icon {
  color: #ffffff;
}

.sidebar .nav-link.active,
.sidebar .accordion-button:not(.collapsed) {
  color: #ffffff;
}

.sidebar .nav-link:hover {
  color: #111111;
  background: #ffffff;
}

.sidebar .nav-link:hover .sidebar-text,
.sidebar .nav-link:hover .sidebar-icon {
  color: #111111;
}

.sidebar .accordion-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar .accordion-button:hover .sidebar-text,
.sidebar .accordion-button:hover .sidebar-icon {
  color: #ffffff;
}

.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
}

.sidebar .accordion-button:not(.collapsed) {
  background: rgba(255, 255, 255, 0.08);
}

.table-logo {
  max-width: 140px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.brand-logo {
  max-height: 32px;
  width: auto;
  display: inline-block;
}

.brand-logo--sidebar {
  max-height: 24px;
}

.brand-logo--nav {
  max-height: 28px;
}

.table.user-table {
  width: 100%;
}

.service-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.service-line {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  border: 1px solid #eaedf2;
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #ffffff;
  margin-bottom: 0.75rem;
}

.service-line__info {
  flex: 1 1 220px;
}

.service-line__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.service-line__controls .form-block {
  min-width: 140px;
}

.service-item {
  border: 1px dashed #eaedf2;
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #f8fafc;
  margin-bottom: 0.75rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 0;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #262B40;
}

.page-subtitle {
  margin: 0;
  color: #66799e;
}

.page-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.muted {
  color: #66799e;
  font-size: 0.95rem;
}

.card {
  border-color: #eaedf2;
  box-shadow: var(--bs-box-shadow-sm);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.card-subtitle {
  font-size: 0.9rem;
  color: #58677d;
}

.section {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.grid-four {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.card-grid {
  display: grid;
  gap: 1.5rem;
}

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

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

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

.card-grid.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.invoice-items-grid {
  align-items: stretch;
  grid-template-columns: 1fr;
}

.invoice-items-grid .card {
  height: auto;
}

.invoice-modal {
  background: #f8fafc;
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.invoice-modal .dialog__header {
  margin-bottom: 1.5rem;
}

.invoice-modal .dialog__title {
  font-size: 1.2rem;
}

.invoice-form {
  gap: 1.5rem;
}

.invoice-form .card {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: none;
}

.invoice-form .card-body {
  padding: 1.5rem;
}

.invoice-form .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 1rem;
}

.invoice-form .card-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.invoice-form .card-subtitle {
  font-size: 0.9rem;
  color: #64748b;
}

.invoice-form .service-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.invoice-form .service-picker .form-select {
  flex: 1 1 280px;
}

.invoice-form .service-list {
  display: grid;
  gap: 0.9rem;
}

.invoice-form .service-line,
.invoice-form .service-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  background: #ffffff;
  display: grid;
  gap: 0.85rem;
}

.invoice-form .service-line__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.invoice-form .service-line__controls .form-block {
  min-width: 180px;
  margin-bottom: 0;
}

.invoice-form .form-grid.cols-2 {
  grid-template-columns: 1fr;
}

.invoice-form .invoice-divider {
  background: #e5e7eb;
  margin: 1.25rem 0;
}

.invoice-form .invoice-deposit-row {
  grid-template-columns: 1fr;
}

.invoice-form .form-actions {
  display: flex;
  justify-content: flex-end;
}

.invoice-builder {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
}

.invoice-builder__main {
  display: grid;
  gap: 1.5rem;
}

.invoice-builder__summary {
  align-self: start;
}

.invoice-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.invoice-block__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eef2f7;
}

.invoice-block__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.invoice-block__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #64748b;
}

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

.invoice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.invoice-row .form-select {
  flex: 1 1 260px;
}

.invoice-row .btn {
  white-space: nowrap;
}

.invoice-stack {
  display: grid;
  gap: 0.9rem;
}

.invoice-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  display: grid;
  gap: 0.85rem;
}

.invoice-summary__head h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.invoice-summary__head p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #64748b;
}

.invoice-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
}

.invoice-summary__row strong {
  font-weight: 600;
}

.invoice-summary__row--total {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  font-size: 1rem;
}

.invoice-summary__field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.invoice-summary__input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.invoice-summary__input .form-control {
  max-width: 120px;
}

.invoice-summary__unit {
  font-size: 0.9rem;
  color: #64748b;
}

.invoice-summary__divider {
  height: 1px;
  background: #e2e8f0;
}

@media (min-width: 992px) {
  .invoice-builder {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

body.theme-dark .invoice-modal {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.55);
}

body.theme-dark .invoice-form .card {
  background: #111827;
  border-color: rgba(148, 163, 184, 0.2);
}

body.theme-dark .invoice-form .card-head {
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

body.theme-dark .invoice-form .card-subtitle,
body.theme-dark .invoice-form .form-hint {
  color: rgba(255, 255, 255, 0.6);
}

body.theme-dark .invoice-form .service-line,
body.theme-dark .invoice-form .service-item {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.2);
}

body.theme-dark .invoice-block {
  background: #111827;
  border-color: rgba(148, 163, 184, 0.2);
}

body.theme-dark .invoice-block__head {
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

body.theme-dark .invoice-block__subtitle {
  color: rgba(255, 255, 255, 0.6);
}

body.theme-dark .invoice-summary {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.2);
}

body.theme-dark .invoice-summary__head p,
body.theme-dark .invoice-summary__unit {
  color: rgba(255, 255, 255, 0.6);
}

body.theme-dark .invoice-summary__row--total {
  border-top-color: rgba(148, 163, 184, 0.2);
}

body.theme-dark .invoice-summary__divider {
  background: rgba(148, 163, 184, 0.2);
}

.invoice-items-card .invoice-section + .invoice-section {
  margin-top: 1.75rem;
}

.invoice-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 1.5rem 0;
}

.invoice-items-card .card-head {
  margin-bottom: 1rem;
}

.invoice-deposit-row {
  align-items: start;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.invoice-deposit-row .callout {
  height: auto;
  display: block;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-left: calc(-1 * var(--bs-card-spacer-x));
  margin-right: calc(-1 * var(--bs-card-spacer-x));
}

.table-wrap .table {
  margin-bottom: 0;
}

.table-wrap .table th,
.table-wrap .table td {
  padding-left: var(--bs-card-spacer-x);
  padding-right: var(--bs-card-spacer-x);
}

.data-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-grid th,
.data-grid td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eaedf2;
  text-align: left;
}

.data-grid thead th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: #58677d;
}

.data-grid tbody tr:hover {
  background-color: #f5f8fb;
}

.action {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: #262B40;
  --bs-btn-border-color: #262B40;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: rgb(32.3, 36.55, 54.4);
  --bs-btn-hover-border-color: rgb(30.4, 34.4, 51.2);
  --bs-btn-focus-shadow-rgb: 71, 75, 93;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: rgb(30.4, 34.4, 51.2);
  --bs-btn-active-border-color: rgb(28.5, 32.25, 48);
  --bs-btn-active-shadow: inset 0 3px 5px rgba(46, 54, 80, 0.125);
  --bs-btn-disabled-color: #ffffff;
  --bs-btn-disabled-bg: #262B40;
  --bs-btn-disabled-border-color: #262B40;
  --bs-btn-padding-x: 0.75rem;
  --bs-btn-padding-y: 0.55rem;
  --bs-btn-font-size: 1rem;
  --bs-btn-font-weight: 600;
  --bs-btn-line-height: 1.5;
  --bs-btn-border-width: 0.0625rem;
  --bs-btn-border-radius: 0.5rem;
  --bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(46, 54, 80, 0.075);
  display: inline-block;
  padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x);
  font-size: var(--bs-btn-font-size);
  font-weight: var(--bs-btn-font-weight);
  line-height: var(--bs-btn-line-height);
  color: var(--bs-btn-color);
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: var(--bs-btn-border-width) solid var(--bs-btn-border-color);
  border-radius: var(--bs-btn-border-radius);
  background-color: var(--bs-btn-bg);
  box-shadow: var(--bs-btn-box-shadow);
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.action:hover {
  color: var(--bs-btn-hover-color);
  background-color: var(--bs-btn-hover-bg);
  border-color: var(--bs-btn-hover-border-color);
}

.action:focus-visible {
  box-shadow: var(--bs-btn-box-shadow), 0 0 0 0.2rem rgba(var(--bs-btn-focus-shadow-rgb), 0.5);
}

.action:disabled,
.action[disabled] {
  opacity: 0.65;
  pointer-events: none;
  box-shadow: none;
}

.action--outline {
  --bs-btn-color: #262B40;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: #262B40;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #262B40;
  --bs-btn-hover-border-color: #262B40;
  --bs-btn-focus-shadow-rgb: 38, 43, 64;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #262B40;
  --bs-btn-active-border-color: #262B40;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(46, 54, 80, 0.125);
  --bs-btn-disabled-color: #262B40;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #262B40;
}

.action--ghost {
  --bs-btn-color: #66799e;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: #262B40;
  --bs-btn-hover-bg: transparent;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-box-shadow: none;
}

.action--danger {
  --bs-btn-bg: #FA5252;
  --bs-btn-border-color: #FA5252;
  --bs-btn-hover-bg: rgb(250.2, 88.92, 88.92);
  --bs-btn-hover-border-color: rgb(250.2, 88.92, 88.92);
  --bs-btn-focus-shadow-rgb: 250, 82, 82;
}

.action--small {
  --bs-btn-padding-y: 0.25rem;
  --bs-btn-padding-x: 0.5rem;
  --bs-btn-font-size: 0.875rem;
}

.notice {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.notice--success {
  background: var(--bs-success-bg-subtle);
  border-color: var(--bs-success-border-subtle);
  color: var(--bs-success-text-emphasis);
}

.notice--danger {
  background: var(--bs-danger-bg-subtle);
  border-color: var(--bs-danger-border-subtle);
  color: var(--bs-danger-text-emphasis);
}

.notice--warning {
  background: var(--bs-warning-bg-subtle);
  border-color: var(--bs-warning-border-subtle);
  color: var(--bs-warning-text-emphasis);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge--ok {
  background: #113628;
  color: #b9f7d8;
}

.badge--warn {
  background: #3f2f0b;
  color: #f9e29a;
}

.badge--danger {
  background: #3b1111;
  color: #f6baba;
}

.badge--info {
  background: #0b2c3a;
  color: #a9e3ff;
}

.badge--muted {
  background: #2b2f39;
  color: #cfd6e6;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

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

.form-grid.three-col,
.form-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.form-block label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-block input,
.form-block select,
.form-block textarea,
.form-block .form-control,
.form-block .form-select {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #66799e;
  background-color: #ffffff;
  background-clip: padding-box;
  border: 0.0625rem solid #d1d7e0;
  border-radius: 0.5rem;
  box-shadow: inset 0 1px 2px rgba(46, 54, 80, 0.075);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-block textarea {
  resize: vertical;
  min-height: 120px;
  max-height: 240px;
  overflow: auto;
}

.form-block .input-group-text {
  background-color: #ffffff;
  border: 0.0625rem solid #d1d7e0;
  border-radius: 0.5rem;
  color: #66799e;
}

.form-block input:focus,
.form-block select:focus,
.form-block textarea:focus,
.form-block .form-control:focus,
.form-block .form-select:focus {
  color: #66799e;
  background-color: #ffffff;
  border-color: rgb(85.5, 96.75, 144);
  outline: 0;
  box-shadow: inset 0 1px 2px rgba(46, 54, 80, 0.075), 0 0 0 0.2rem rgba(38, 43, 64, 0.25);
}

.form-block input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  margin-right: 0.6rem;
  box-shadow: none;
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.form-check-input {
  appearance: auto;
  -webkit-appearance: checkbox;
  -moz-appearance: checkbox;
  background-image: none;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
  width: 18px;
  height: 18px;
  margin: 0;
  float: none;
  accent-color: #262b40;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.form-actions--center {
  justify-content: center;
}

.inline-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.inline-actions form {
  margin: 0;
}

.permission-search {
  margin-bottom: 1rem;
}

.permission-search input {
  width: 100%;
}

.permissions-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.permissions-toolbar__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.permission-card {
  padding: 1rem;
}

.permission-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.permission-card h4 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.permission-card__head h4 {
  margin-bottom: 0;
}

.permission-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5f6d85;
}

body.theme-dark .permission-select-all {
  color: rgba(255, 255, 255, 0.6);
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
}

.permission-item:hover {
  background: #f5f8fb;
}

body.theme-dark .permission-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dialog__panel--wide {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.permissions-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow: hidden;
  padding-bottom: 0;
}

.permissions-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-bottom: 1.5rem;
  display: grid;
  gap: 1rem;
}

.permissions-save-bar {
  flex: 0 0 auto;
  background: #ffffff;
  padding: 0.75rem 0;
  border-top: 1px solid #eaedf2;
  display: flex;
  justify-content: flex-end;
}

body.theme-dark .permissions-save-bar {
  background: #111827;
  border-top-color: rgba(255, 255, 255, 0.1);
}

.role-table-wrap {
  padding-bottom: 0.4rem;
}

.role-table {
  min-width: 720px;
  table-layout: fixed;
}

.role-table th {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5f6d85;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.role-table td {
  vertical-align: middle;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.role-table th:nth-child(1),
.role-table td:nth-child(1) {
  width: 26%;
  font-weight: 600;
}

.role-table th:nth-child(2),
.role-table td:nth-child(2) {
  width: 44%;
}

.role-table th:nth-child(3),
.role-table td:nth-child(3) {
  width: 12%;
}

.role-table th:nth-child(4),
.role-table td:nth-child(4) {
  width: 18%;
  text-align: right;
}

.role-table .inline-actions {
  gap: 0.5rem;
  justify-content: flex-end;
}

.role-table .action {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.role-table tbody tr:hover {
  background-color: #f7f9fc;
}

body.theme-dark .role-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

body.theme-dark .role-table th {
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 900px) {
  .role-table {
    min-width: 640px;
  }
}

.form-hint {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #66799e;
}

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

.stat-card {
  border: 0.0625rem solid #eaedf2;
  border-radius: 0.5rem;
  padding: 1rem;
  background: #ffffff;
  box-shadow: var(--bs-box-shadow-sm);
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #58677d;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 0.35rem;
  color: #262B40;
}

.filters {
  padding: 1rem;
  border-radius: 0.5rem;
  border: 0.0625rem solid #eaedf2;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.filters-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

.filters-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filters-panel {
  display: none;
}

.filters-panel.is-open {
  display: block;
}

.filters-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 0.0625rem solid #eaedf2;
  background: #f5f8fb;
  font-size: 0.8rem;
}

.callout {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 0.0625rem solid #eaedf2;
  background: #f5f8fb;
  color: #58677d;
}

.callout.warn {
  border-color: var(--bs-warning-border-subtle);
  background: var(--bs-warning-bg-subtle);
  color: var(--bs-warning-text-emphasis);
}

.subnav,
.tabs {
  display: inline-flex;
  gap: 0.5rem;
  background: #f5f8fb;
  padding: 0.35rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.subnav-link,
.tabs a {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #66799e;
}

.subnav-link.is-active,
.tabs a.is-active {
  background: #262B40;
  color: #ffffff;
}

.dialog {
  position: fixed;
  inset: 0;
  background: rgba(38, 43, 64, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1055;
}

.dialog.is-open {
  display: flex;
}

.dialog__panel {
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: var(--bs-box-shadow-sm);
  width: min(720px, 95vw);
  padding: 1.5rem;
  max-height: 90vh;
  overflow-y: auto;
}

.dialog__panel--wide {
  width: min(980px, 95vw);
}

.dialog__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dialog__title {
  font-size: 1rem;
  font-weight: 600;
}

.dialog__close {
  border: none;
  background: #f5f8fb;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  color: #58677d;
}


.service-switch {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid #eaedf2;
  background: #f8fafc;
}

.service-switch .form-check-input {
  width: 2.6rem;
  height: 1.35rem;
  margin: 0;
}

.ticket-detail textarea {
  width: 100%;
  min-height: 140px;
  max-height: 260px;
  resize: vertical;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d7e0;
  color: #66799e;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(46, 54, 80, 0.075);
}

.ticket-detail textarea:focus {
  border-color: rgb(85.5, 96.75, 144);
  outline: 0;
  box-shadow: inset 0 1px 2px rgba(46, 54, 80, 0.075), 0 0 0 0.2rem rgba(38, 43, 64, 0.25);
}

.availability-bulk {
  border: 1px solid #eaedf2;
  border-radius: 0.75rem;
  padding: 1rem;
  background: #f8fafc;
  margin-bottom: 1.25rem;
}

.availability-days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.availability-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #eaedf2;
  background: #ffffff;
  font-size: 0.85rem;
  color: #262B40;
}

.availability-chip input {
  margin: 0;
  width: 18px;
  height: 18px;
}

.availability-bulk-toggle {
  display: flex;
  align-items: center;
  height: 100%;
  padding-top: 1.6rem;
}

.availability-table .form-control-sm {
  min-width: 110px;
}

.invoice-metric {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.invoice-metric__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.invoice-metric__status--green {
  color: #b9f7d8;
  background: #113628;
}

.invoice-metric__status--yellow {
  color: #f9e29a;
  background: #3f2f0b;
}

.invoice-metric__value {
  font-weight: 600;
  color: #262B40;
}

.invoice-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #123628;
  color: #b9f7d8;
}

.invoice-status-pill--yellow {
  background: #3f2f0b;
  color: #f9e29a;
}

.invoice-row--paid {
  background: #f1fbf6;
}

body.theme-dark .invoice-row--paid {
  background: rgba(25, 116, 66, 0.2);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.theme-dark {
  background: #0f1116;
  color: #e9edf5;
}

body.theme-dark .card,
body.theme-dark .dialog__panel,
body.theme-dark .dropdown-menu {
  background: #171a21;
  color: #e9edf5;
  border-color: #2b2f39;
}

body.theme-dark .table {
  color: #e9edf5;
}

body.theme-dark .table thead th {
  color: #aeb5c3;
}

body.theme-dark .form-block input,
body.theme-dark .form-block select,
body.theme-dark .form-block textarea,
body.theme-dark .form-block .form-control,
body.theme-dark .form-block .form-select,
body.theme-dark .input-group-text {
  background-color: #0f131a;
  border-color: #2b2f39;
  color: #e9edf5;
}

body.theme-dark .form-block input::placeholder,
body.theme-dark .form-block textarea::placeholder,
body.theme-dark .form-block .form-control::placeholder {
  color: #8d97aa;
}

body.theme-dark .form-check-input {
  background-color: #0f131a;
  border-color: #2b2f39;
}

body.theme-dark .form-check-input:checked {
  background-color: #3b6ff5;
  border-color: #3b6ff5;
}

body.theme-dark .service-switch {
  background: #1c212b;
  border-color: #2b2f39;
}

body.theme-dark .ticket-detail textarea {
  background: #0f131a;
  border-color: #2b2f39;
  color: #e9edf5;
}

body.theme-dark .text-gray-500,
body.theme-dark .text-gray-600 {
  color: #aeb5c3 !important;
}

body.theme-dark .text-gray-700,
body.theme-dark .text-dark {
  color: #e9edf5 !important;
}

body.theme-dark .text-gray,
body.theme-dark .text-gray-800,
body.theme-dark .text-gray-900,
body.theme-dark .text-black {
  color: #e9edf5 !important;
}

body.theme-dark .navbar,
body.theme-dark .navbar .nav-link,
body.theme-dark .navbar .media-body,
body.theme-dark .navbar .fas,
body.theme-dark .navbar .icon {
  color: #e9edf5;
}

body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6,
body.theme-dark .h1,
body.theme-dark .h2,
body.theme-dark .h3,
body.theme-dark .h4,
body.theme-dark .h5,
body.theme-dark .h6,
body.theme-dark p,
body.theme-dark small,
body.theme-dark label {
  color: #e9edf5;
}

body.theme-dark .card-header,
body.theme-dark .card-body,
body.theme-dark .list-group-item {
  color: #e9edf5;
}

body.theme-dark .bg-secondary-alt {
  background-color: #171a21 !important;
}

body.theme-dark .ct-label {
  color: #aeb5c3 !important;
}

body.theme-dark .ct-grid {
  stroke: rgba(174, 181, 195, 0.2) !important;
}

body.theme-dark .dropdown-item {
  color: #e9edf5;
}

body.theme-dark .dropdown-item:hover,
body.theme-dark .dropdown-item:focus {
  background: #232a33;
  color: #e9edf5;
}

body.theme-dark .breadcrumb-item,
body.theme-dark .breadcrumb-item a {
  color: #b9c1d3;
}

body.theme-dark .availability-bulk {
  background: #1c212b;
  border-color: #2b2f39;
}

body.theme-dark .availability-chip {
  background: #171a21;
  border-color: #2b2f39;
  color: #e9edf5;
}

body.theme-dark .invoice-metric__value {
  color: #e9edf5;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .input-group-text {
  background: #12151c;
  border-color: #2b3140;
  color: #e7ebf3;
}

body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus {
  border-color: #4c5670;
  box-shadow: 0 0 0 0.2rem rgba(71, 87, 120, 0.35);
}

body.theme-dark .page-title {
  color: #f2f5fa;
}

body.theme-dark .page-subtitle,
body.theme-dark .muted {
  color: #9aa6bb;
}

body.theme-dark .dropdown-item {
  color: #e7ebf3;
}

body.theme-dark .dropdown-item:hover {
  background: #222733;
  color: #ffffff;
}


body.modal-open {
  overflow: hidden;
}

.brand-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.brand-stack--sidebar {
  color: #ffffff;
}

.brand-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.7);
}

.invoice-bulk-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 12px 0 16px;
}

.invoice-bulk-actions__select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #4b5563;
}

.invoice-bulk-actions .muted {
  font-size: 0.85rem;
  color: #6b7280;
}

@media (max-width: 900px) {
  .grid-two,
  .grid-three,
  .grid-four,
  .card-grid.cols-2,
  .card-grid.cols-3,
  .card-grid.cols-4,
  .card-grid.cols-5,
  .form-grid.two-col,
  .form-grid.three-col,
  .form-grid.cols-2,
  .form-grid.cols-3,
  .form-grid.cols-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .navbar-nav .dropdown-menu.dropdown-menu-lg,
  .navbar-nav .dropdown-menu.dropdown-menu-center {
    width: calc(100vw - 1.5rem);
    max-width: none;
    left: 0.75rem !important;
    right: 0.75rem !important;
    transform: none !important;
  }

  .table.user-table thead {
    display: none;
  }

  .table.user-table,
  .table.user-table tbody,
  .table.user-table tr,
  .table.user-table td {
    display: block;
    width: 100%;
  }

  .table.user-table tr {
    margin-bottom: 1rem;
    border: 1px solid #eaedf2;
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: #ffffff;
  }

  body.theme-dark .table.user-table tr {
    background: #171a21;
    border-color: #2b2f39;
  }

  .table.user-table td {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border: none;
  }

  .table.user-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #4b5563;
    flex: 0 0 45%;
  }

  .table.user-table td[colspan]::before {
    content: '';
  }

  body.theme-dark .table.user-table td::before {
    color: #9ca3af;
  }

  .table.user-table td > * {
    margin-left: auto;
    text-align: right;
  }

  .table.user-table td:last-child {
    padding-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

.jm-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1099;
}

.jm-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.jm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.jm-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(520px, 92vw);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.jm-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.jm-modal__header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.jm-modal__close {
  border: none;
  background: #e2e8f0;
  color: #0f172a;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.jm-modal__body {
  padding: 18px 20px 12px;
  color: #1f2937;
}

.jm-modal__body p {
  margin: 0 0 12px;
  font-size: 14px;
}

.jm-modal__input,
.jm-modal__copy {
  margin-top: 12px;
}

.jm-modal__input label,
.jm-modal__copy label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.jm-modal__input input,
.jm-modal__copy input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #d1d9e6;
  padding: 10px 12px;
  font-size: 14px;
}

.jm-modal__copy-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.jm-modal__copy-row input {
  flex: 1;
}

.jm-modal__hint {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

.jm-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

body.modal-open {
  overflow: hidden;
}
