/* MANIAC — sistema de tablas de datos (listados ERP) */

.maniac-table-module {
  background: #0f172a;
  border: 1px solid rgba(51, 65, 85, 0.45);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  min-width: 0;
  max-width: 100%;
}

html.light .maniac-table-module {
  background: #fff;
  border-color: #e8ecf4;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

@media (max-width: 767px) {
  .maniac-table-module {
    border-radius: 0;
    border-left-width: 0;
    border-right-width: 0;
    box-shadow: none;
  }

  html.light .maniac-table-module {
    box-shadow: none;
  }

  .maniac-table-module--fill .maniac-client-card-grid,
  .maniac-table-module--fill .maniac-table-mobile-list,
  .maniac-table-module--fill .maniac-product-grid {
    flex: 1 1 auto;
    min-height: 0;
  }
}

.maniac-table-toolbar {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
  background: linear-gradient(180deg, rgba(24, 32, 50, 0.82) 0%, rgba(18, 26, 42, 0.72) 100%);
}

html.light .maniac-table-toolbar {
  border-bottom-color: #e2e8f0;
  background: linear-gradient(180deg, #f8f9fd 0%, #f2f5fa 100%);
}

.maniac-table-toolbar-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
}

.maniac-table-footer {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid rgba(51, 65, 85, 0.3);
  background: rgba(8, 12, 20, 0.25);
}

html.light .maniac-table-footer {
  border-top-color: #eef1f7;
  background: #fafbfd;
}

.maniac-table-empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

html.light .maniac-table-empty {
  color: #8b92ab;
}

.maniac-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  max-width: 100%;
}

.maniac-table-module--sticky-head .maniac-table-scroll--sticky-head {
  max-height: min(70vh, calc(100dvh - 13rem));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.maniac-table-module--fill {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.maniac-table-module--fill .maniac-table-toolbar,
.maniac-table-module--fill .maniac-table-footer {
  flex-shrink: 0;
}

.maniac-table-module--fill.maniac-table-module--sticky-head .maniac-table-scroll--sticky-head,
.maniac-table-module--fill .maniac-table-scroll--sticky-head {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.maniac-table-module--fill:has(.maniac-table-empty) {
  justify-content: center;
}

.maniac-table-scroll--sticky-head .maniac-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.maniac-table-scroll--compact.maniac-table-scroll--sticky-head {
  max-height: min(50vh, calc(100dvh - 16rem));
}

.maniac-table--compact thead th {
  padding: 0.4rem 0.6rem;
  font-size: 9px;
}

.maniac-table--compact td {
  padding: 0.4rem 0.6rem;
  font-size: 12px;
}

.maniac-table--document-lines {
  border-radius: 0.5rem;
  overflow: hidden;
}

.elev .maniac-table-scroll:has(.maniac-table--document-lines) {
  border-radius: 0.5rem;
}

.maniac-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.35;
}

.maniac-table--clients {
  table-layout: fixed;
}

.maniac-table--clients col.maniac-table-col--client {
  width: 28%;
}

.maniac-table--clients col.maniac-table-col--type {
  width: 14%;
}

.maniac-table--clients col.maniac-table-col--city {
  width: 19%;
}

.maniac-table--clients col.maniac-table-col--phone {
  width: 19%;
}

.maniac-table--clients th.maniac-table-col--client {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.maniac-table--clients td.maniac-table-col--client {
  background: rgba(148, 163, 184, 0.035);
  border-right: 1px solid rgba(51, 65, 85, 0.14);
}

html.light .maniac-table--clients td.maniac-table-col--client {
  background: #fafbfc;
  border-right-color: #eef1f6;
}

.maniac-table--clients tbody tr:hover td.maniac-table-col--client {
  background: rgba(124, 58, 237, 0.07);
}

html.light .maniac-table--clients tbody tr:hover td.maniac-table-col--client {
  background: #f3f4f8;
}

.maniac-table-client-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.maniac-table-client-cell .maniac-client-avatar--sm {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
}

.maniac-table-client-cell .maniac-client-avatar--sm .maniac-client-avatar-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.maniac-table-client-cell-body {
  min-width: 0;
  flex: 1;
}

.maniac-client-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 0.4rem;
  border: 1px solid rgba(71, 85, 105, 0.35);
  background: rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

html.light .maniac-client-avatar {
  border-color: #e2e8f0;
  background: #fff;
}

.maniac-client-avatar--sm {
  width: 1.75rem;
  height: 1.75rem;
}

.maniac-client-avatar--md {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
}

.maniac-client-avatar--lg {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.65rem;
}

.maniac-client-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.maniac-client-avatar-placeholder {
  display: none;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #64748b;
}

.maniac-client-avatar.is-placeholder .maniac-client-avatar-placeholder {
  display: grid;
}

html.light .maniac-client-avatar-placeholder {
  color: #9aa3b8;
}

.maniac-client-avatar--sm .maniac-client-avatar-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.maniac-client-avatar--md .maniac-client-avatar-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.maniac-client-avatar--lg .maniac-client-avatar-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.maniac-table--clients col.maniac-table-col--actions {
  width: 7.75rem;
}

.maniac-table--quotes {
  width: 100%;
}

.maniac-table--quotes th.maniac-table-col--quote-client,
.maniac-table--quotes td.maniac-table-col--quote-client {
  width: 15rem;
  max-width: 15rem;
  overflow: hidden;
}

.maniac-table-cell-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maniac-table--quotes th.maniac-table-col--quote-number,
.maniac-table--quotes td.maniac-table-col--quote-number {
  white-space: nowrap;
}

.maniac-table--quotes th.maniac-table-th--actions,
.maniac-table--quotes td.maniac-table-cell--actions {
  width: 1%;
  min-width: 0;
  padding-left: 0.35rem;
  padding-right: 0.5rem;
}

.maniac-table--quotes th.maniac-table-col--quote-date,
.maniac-table--quotes td.maniac-table-col--quote-date,
.maniac-table--quotes th.maniac-table-col--quote-total,
.maniac-table--quotes td.maniac-table-col--quote-total,
.maniac-table--quotes th.maniac-table-col--quote-status,
.maniac-table--quotes td.maniac-table-col--quote-status {
  white-space: nowrap;
}

.maniac-table--quotes td.maniac-table-col--quote-total,
.maniac-table--invoices td.maniac-table-col--invoice-total {
  font-weight: 600;
}

.maniac-table--invoices th.maniac-table-col--invoice-client,
.maniac-table--invoices td.maniac-table-col--invoice-client {
  width: 15rem;
  max-width: 15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maniac-table--invoices td.maniac-table-col--invoice-client {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

html.light .maniac-table--invoices td.maniac-table-col--invoice-client {
  color: #000;
}

.maniac-table--invoices th.maniac-table-col--invoice-number {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.maniac-table--invoices th.maniac-table-col--invoice-number,
.maniac-table--invoices td.maniac-table-col--invoice-number {
  white-space: nowrap;
}

.maniac-table--invoices td.maniac-table-col--invoice-number {
  background: rgba(148, 163, 184, 0.035);
  border-right: 1px solid rgba(51, 65, 85, 0.14);
}

html.light .maniac-table--invoices td.maniac-table-col--invoice-number {
  background: #fafbfc;
  border-right-color: #eef1f6;
}

.maniac-table--invoices tbody tr:hover td.maniac-table-col--invoice-number {
  background: rgba(124, 58, 237, 0.07);
}

html.light .maniac-table--invoices tbody tr:hover td.maniac-table-col--invoice-number {
  background: #f3f4f8;
}

.maniac-table--invoices th.maniac-table-col--invoice-total,
.maniac-table--invoices td.maniac-table-col--invoice-total {
  white-space: nowrap;
}

.maniac-table--invoices th.maniac-table-th--actions,
.maniac-table--invoices td.maniac-table-cell--actions {
  width: 1%;
  min-width: 0;
  padding-left: 0.35rem;
  padding-right: 0.5rem;
  white-space: nowrap;
}

.maniac-table--invoices td.maniac-table-cell--actions .maniac-table-action-group {
  width: auto;
  margin-left: auto;
}

.maniac-table thead th {
  padding: 0.55rem 0.75rem;
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #f1f5f9;
  background: #25293c;
  border-bottom: 1px solid rgba(124, 58, 237, 0.35);
  white-space: nowrap;
  vertical-align: middle;
}

html.light .maniac-table thead th {
  color: #f8fafc;
  background: #25293c;
  border-bottom-color: rgba(124, 58, 237, 0.28);
}

.maniac-table thead th.maniac-table-th--right {
  text-align: right;
}

.maniac-table tbody tr {
  border-bottom: 1px solid rgba(51, 65, 85, 0.2);
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

html.light .maniac-table tbody tr {
  border-bottom-color: #f0f2f7;
}

.maniac-table tbody tr:last-child {
  border-bottom: none;
}

.maniac-table tbody tr:hover {
  background: linear-gradient(
    90deg,
    rgba(124, 58, 237, 0.11) 0%,
    rgba(6, 182, 212, 0.08) 52%,
    rgba(124, 58, 237, 0.07) 100%
  );
  border-bottom-color: rgba(124, 58, 237, 0.14);
  box-shadow: inset 3px 0 0 rgba(124, 58, 237, 0.55), inset 0 0 0 1px rgba(124, 58, 237, 0.12);
}

html.light .maniac-table tbody tr:hover {
  background: linear-gradient(
    90deg,
    rgba(124, 58, 237, 0.07) 0%,
    rgba(6, 182, 212, 0.06) 58%,
    rgba(124, 58, 237, 0.05) 100%
  );
  border-bottom-color: rgba(124, 58, 237, 0.1);
  box-shadow: inset 3px 0 0 rgba(124, 58, 237, 0.35), inset 0 0 0 1px rgba(124, 58, 237, 0.09);
}

.maniac-table td {
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
  background: transparent;
}

.maniac-table th.maniac-table-th--badge,
.maniac-table td.maniac-table-cell--badge {
  width: 1%;
  white-space: nowrap;
}

.maniac-table th.maniac-table-th--actions,
.maniac-table td.maniac-table-cell--actions {
  width: 1%;
  padding-left: 0.35rem;
  padding-right: 0.65rem;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.maniac-table-cell--primary {
  min-width: 8rem;
}

.maniac-table--clients .maniac-table-cell--primary .maniac-table-primary-link,
.maniac-table--clients .maniac-table-cell--primary .maniac-table-primary-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maniac-table-client-email {
  color: #7b8aa3;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.light .maniac-table-client-email {
  color: #8b92ab;
}

.maniac-table-primary-link {
  font-size: 13px;
  font-weight: 600;
  color: #e8edf5;
  text-decoration: none;
  transition: color 0.14s ease;
}

.maniac-table-primary-link:hover {
  color: #c4b5fd;
}

html.light .maniac-table-primary-link {
  color: #2f3349;
}

html.light .maniac-table-primary-link:hover {
  color: #6d28d9;
}

.maniac-table-primary-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

html.light .maniac-table-primary-name {
  color: #2f3349;
}

.maniac-table-sub {
  margin-top: 0.1rem;
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}

html.light .maniac-table-sub {
  color: #8b92ab;
}

.maniac-table-muted {
  font-size: 12px;
  color: #94a3b8;
}

html.light .maniac-table-muted {
  color: #8b92ab;
}

.badge-maniac.is-table-type {
  padding: 0.05rem 0.4rem;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(51, 65, 85, 0.32);
  border-color: rgba(100, 116, 139, 0.38);
  color: #9aa8bc;
}

html.light .badge-maniac.is-table-type {
  background: #f3f5fa;
  border-color: #dde3ee;
  color: #65708a;
}

.badge-maniac.is-table-role {
  padding: 0.1rem 0.45rem;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  white-space: nowrap;
}

.badge-maniac.is-table-role.is-role-client {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.3);
  color: #7dd3b0;
}

.badge-maniac.is-table-role.is-role-commercial {
  background: rgba(124, 58, 237, 0.14);
  border-color: rgba(124, 58, 237, 0.3);
  color: #c4b5fd;
}

.badge-maniac.is-table-role.is-role-contact {
  background: rgba(71, 85, 105, 0.2);
  border-color: rgba(100, 116, 139, 0.32);
  color: #94a3b8;
}

html.light .badge-maniac.is-table-role.is-role-client {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #047857;
}

html.light .badge-maniac.is-table-role.is-role-commercial {
  background: rgba(124, 58, 237, 0.09);
  border-color: rgba(124, 58, 237, 0.22);
  color: #6d28d9;
}

html.light .badge-maniac.is-table-role.is-role-contact {
  background: #f1f4f9;
  border-color: #dde3ee;
  color: #6d748f;
}

.maniac-table-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 12px;
  font-weight: 500;
  color: #a8b6c8;
  text-decoration: none;
  transition: color 0.14s ease;
}

.maniac-table-phone-ico {
  width: 0.8rem;
  height: 0.8rem;
  color: #64748b;
  flex-shrink: 0;
}

.maniac-table-phone-link:hover {
  color: #c4b5fd;
}

.maniac-table-phone-link:hover .maniac-table-phone-ico {
  color: #a78bfa;
}

html.light .maniac-table-phone-link {
  color: #5d6480;
}

html.light .maniac-table-phone-ico {
  color: #9aa3b8;
}

html.light .maniac-table-phone-link:hover {
  color: #6d28d9;
}

html.light .maniac-table-phone-link:hover .maniac-table-phone-ico {
  color: #7c3aed;
}

.maniac-table-action-group--end {
  width: 100%;
  justify-content: flex-end;
}

.maniac-table-action-group--plain {
  border: none;
  background: transparent;
  padding: 0;
  gap: 0.125rem;
}

.maniac-mobile-list-card {
  position: relative;
}

.maniac-mobile-list-card-link {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
}

.maniac-mobile-list-card-body {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.maniac-mobile-list-card-hit,
.maniac-mobile-list-card-hit a,
.maniac-mobile-list-card-hit button,
.maniac-mobile-list-card-hit form {
  pointer-events: auto;
}

html.light .maniac-table-action-group--plain {
  border: none;
  background: transparent;
}

.maniac-table-action-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.125rem;
  padding: 0.125rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(71, 85, 105, 0.24);
  background: rgba(10, 16, 28, 0.15);
  transition: border-color 0.15s ease, background 0.15s ease;
}

html.light .maniac-table-action-group {
  border-color: #e2e8f0;
  background: rgba(248, 250, 253, 0.65);
}

.maniac-table tbody tr:hover .maniac-table-action-group {
  border-color: rgba(124, 58, 237, 0.22);
  background: rgba(124, 58, 237, 0.05);
}

html.light .maniac-table tbody tr:hover .maniac-table-action-group {
  border-color: rgba(124, 58, 237, 0.16);
  background: rgba(124, 58, 237, 0.04);
}

.maniac-table-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}

.maniac-table tbody tr:hover .maniac-table-icon-btn:not(.is-disabled) {
  color: #a8b8cc;
}

.maniac-table-icon-btn:hover:not(:disabled):not(.is-disabled) {
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.26);
}

html.light .maniac-table-icon-btn {
  color: #5d6480;
}

html.light .maniac-table tbody tr:hover .maniac-table-icon-btn:not(.is-disabled) {
  color: #434a62;
}

html.light .maniac-table-icon-btn:hover:not(:disabled):not(.is-disabled) {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.2);
}

.maniac-table-icon-btn:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
}

.maniac-table-icon-btn.is-disabled,
.maniac-table-icon-btn:disabled {
  opacity: 0.32;
  color: #64748b;
  cursor: not-allowed;
}

html.light .maniac-table-icon-btn.is-disabled,
html.light .maniac-table-icon-btn:disabled {
  color: #b8bfd4;
}

.maniac-table-icon-btn.is-danger-hover:hover:not(:disabled) {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.28);
}

html.light .maniac-table-icon-btn.is-danger-hover:hover:not(:disabled) {
  color: #be123c;
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.22);
}

.maniac-table-primary-link,
.maniac-table-primary-name {
  font-size: 13px;
  font-weight: 600;
}

.maniac-table .tabular {
  font-variant-numeric: tabular-nums;
}

.maniac-table th.maniac-table-th--right,
.maniac-table td.maniac-table-cell--right {
  text-align: right;
}

.maniac-table th.maniac-table-th--check,
.maniac-table td.maniac-table-cell--check {
  width: 2rem;
  padding-left: 0.5rem;
  padding-right: 0.25rem;
}

/* Menú de acciones por fila (otros listados) */
.maniac-row-menu {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.maniac-row-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.625rem;
  padding: 0 0.35rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(71, 85, 105, 0.22);
  background: rgba(15, 23, 42, 0.15);
  color: #64748b;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.maniac-table tbody tr:hover .maniac-row-menu-trigger {
  border-color: rgba(100, 116, 139, 0.32);
  color: #94a3b8;
}

.maniac-row-menu-trigger:hover,
.maniac-row-menu.is-open .maniac-row-menu-trigger {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.28);
  color: #c4b5fd;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.06);
}

html.light .maniac-row-menu-trigger {
  border-color: rgba(216, 219, 230, 0.9);
  background: transparent;
  color: #9aa3b8;
}

html.light .maniac-table tbody tr:hover .maniac-row-menu-trigger {
  border-color: #d8dbe6;
  color: #6d748f;
}

html.light .maniac-row-menu-trigger:hover,
html.light .maniac-row-menu.is-open .maniac-row-menu-trigger {
  background: rgba(124, 58, 237, 0.07);
  border-color: rgba(124, 58, 237, 0.22);
  color: #6d28d9;
  box-shadow: none;
}

.maniac-row-menu-trigger:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
}

.maniac-row-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  min-width: 9.5rem;
  padding: 0.25rem;
  border-radius: 0.5rem;
  display: none;
}

.maniac-row-menu.is-open .maniac-row-menu-panel {
  display: block;
}

.maniac-row-menu-panel a,
.maniac-row-menu-panel button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.375rem;
  font-size: 12px;
  font-weight: 500;
  color: #e2e8f0;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

html.light .maniac-row-menu-panel a,
html.light .maniac-row-menu-panel button {
  color: #2f3349;
}

.maniac-row-menu-panel a:hover,
.maniac-row-menu-panel button:hover {
  background: rgba(148, 163, 184, 0.12);
}

html.light .maniac-row-menu-panel a:hover,
html.light .maniac-row-menu-panel button:hover {
  background: #f1f4f9;
}

.maniac-row-menu-panel .is-danger {
  color: #fda4af;
}

html.light .maniac-row-menu-panel .is-danger {
  color: #be123c;
}

/* Responsive — columnas progresivas */
@media (max-width: 1023px) {
  .maniac-table .maniac-table-col--city {
    display: none;
  }
}


/* Listado móvil */
.maniac-table-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.maniac-table-mobile-card {
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #0f172a;
  border: 1px solid rgba(51, 65, 85, 0.45);
}

html.light .maniac-table-mobile-card {
  background: #fff;
  border-color: #e8ecf4;
}

.maniac-table-mobile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.maniac-table-mobile-card-head .maniac-client-avatar--sm {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
}

.maniac-table-mobile-card-head .maniac-client-avatar--sm .maniac-client-avatar-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.maniac-table-mobile-meta {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.maniac-table-mobile-city {
  color: #64748b;
  font-size: 11px;
}

html.light .maniac-table-mobile-meta {
  color: #8b92ab;
}

.maniac-table-mobile-footer {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.maniac-client-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: 0.625rem;
  align-content: start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.maniac-client-card-grid > .maniac-client-card {
  min-width: 0;
  max-width: 100%;
}

.maniac-client-card {
  container-type: inline-size;
  container-name: client-card;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

.maniac-client-card > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.maniac-client-card-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
}

.maniac-client-card-head-main {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  min-width: 0;
}

@container client-card (min-width: 20rem) {
  .maniac-client-card-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .maniac-client-card-head-main {
    flex: 1 1 auto;
  }
}

.maniac-client-card-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.35;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maniac-client-card-name:hover {
  color: #22d3ee;
}

html.light .maniac-client-card-name {
  color: #0f172a;
}

html.light .maniac-client-card-name:hover {
  color: #0e7490;
}

.maniac-client-card-sub {
  margin-top: 0.125rem;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.maniac-client-card-pay {
  flex-shrink: 0;
  align-self: flex-start;
  max-width: 100%;
  text-align: center;
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
}

.maniac-client-card-pay-short {
  display: none;
}

@container client-card (max-width: 19.5rem) {
  .maniac-client-card-pay-long {
    display: none;
  }

  .maniac-client-card-pay-short {
    display: inline;
  }
}

.badge-maniac.maniac-client-card-pay.is-emerald {
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.25);
}

.badge-maniac.maniac-client-card-pay.is-amber {
  background: rgba(251, 191, 36, 0.1);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.28);
}

html.light .badge-maniac.maniac-client-card-pay.is-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

html.light .badge-maniac.maniac-client-card-pay.is-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.maniac-client-card-contact {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
}

.maniac-client-card-quick {
  margin-top: 0.125rem;
  padding-top: 0.5rem;
  min-width: 0;
  border-top: 1px solid rgba(30, 41, 59, 0.8);
}

html.light .maniac-client-card-quick {
  border-top-color: #e2e8f0;
}

.maniac-client-card-quick-label {
  margin-bottom: 0.35rem;
}

.maniac-client-card-quick .lead-card-ico {
  border: none;
  background: transparent;
  color: #94a3b8;
}

.maniac-client-card-quick .lead-card-ico.is-muted {
  opacity: 0.55;
}

.maniac-client-card-quick .lead-card-ico.is-muted:hover {
  opacity: 1;
}

button.lead-card-ico {
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.maniac-client-card-quick .lead-card-ico:hover {
  color: #22d3ee;
  background: rgba(148, 163, 184, 0.12);
}

html.light .maniac-client-card-quick .lead-card-ico {
  background: transparent;
  border: none;
  color: #64748b;
}

html.light .maniac-client-card-quick .lead-card-ico:hover {
  color: #0e7490;
  background: rgba(15, 23, 42, 0.05);
}

html.light .maniac-client-card-contact {
  color: #64748b;
}

.maniac-client-card-tags {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.35;
  color: #94a3b8;
}

html.light .maniac-client-card-tags {
  color: #6b7280;
}

.maniac-client-card-meta {
  min-width: 0;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maniac-client-card-meta:first-child {
  flex: 1 1 auto;
}

.maniac-client-card-tags .maniac-client-card-meta:last-child {
  flex-shrink: 0;
}

.maniac-client-card-meta-sep {
  flex-shrink: 0;
  opacity: 0.45;
  user-select: none;
}

.maniac-client-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(30, 41, 59, 0.8);
  font-size: 11px;
  width: 100%;
  box-sizing: border-box;
}

@container client-card (max-width: 21rem) {
  .maniac-client-card-metrics {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .maniac-client-card-metric {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .maniac-client-card-metric .label-k {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .maniac-client-card-metric-value {
    text-align: right;
    flex: 1 1 auto;
    min-width: 0;
  }
}

.maniac-client-card-metric {
  min-width: 0;
  overflow: hidden;
}

.maniac-client-card-metric .label-k {
  display: block;
  font-size: 9px;
  letter-spacing: 0.06em;
  margin-bottom: 0.125rem;
}

.maniac-client-card-metric-value {
  display: block;
  font-size: 10px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .maniac-client-card-metric .label-k {
    font-size: 10px;
  }

  .maniac-client-card-metric-value {
    font-size: 11px;
  }
}

.maniac-client-card-actions .btn-primary-maniac,
.maniac-client-card-actions .btn-ghost-maniac {
  min-width: 0;
}

@container client-card (max-width: 19.5rem) {
  .maniac-client-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .maniac-client-card-actions .btn-primary-maniac,
  .maniac-client-card-actions form {
    width: 100%;
  }

  .maniac-client-card-actions form button {
    width: 100%;
  }
}

html.light .maniac-client-card-metrics {
  border-top-color: #e2e8f0;
}

.maniac-product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  .maniac-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .maniac-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.maniac-product-list-icon {
  border: 1px solid rgba(255, 255, 255, 0.12);
}

html.light .maniac-product-list-icon {
  border-color: rgba(15, 23, 42, 0.08);
}
