@import './icons.css';
@import './navigation.css';
@import './interaction.css';
@import './workspace.css';

/* stylelint-disable unit-allowed-list -- This standalone runtime CSS has no Sass conversion step. */

/* ESCUDIX application layer. Scoped to the validated runtime brand identity. */
body.beampay-theme[data-brand='escudix'] {
  --esc-surface: #fff;
  --esc-subtle: #e9e8f5;
  --esc-muted: #5c6378;
  --esc-border: #cfd3df;
  --esc-success: #18734b;
  --esc-warning: #875900;
  --esc-error: #b3261e;
  --esc-hover: color-mix(in srgb, var(--brand-primary-color) 88%, black);
  --lui-brand-id: escudix;
  --lui-brand-name: 'ESCUDIX';
  --lui-page-bg-zero: var(--esc-surface);
  --lui-page-bg-light: var(--esc-surface);
  --lui-page-bg-backdrop: rgb(34 38 64 / 55%);
  --lui-text-secondary-dark: var(--esc-muted);
  --lui-text-secondary-mid: var(--esc-muted);
  --lui-text-secondary-light: #767d90;
  --lui-text-success: var(--esc-success);
  --lui-text-warning: var(--esc-warning);
  --lui-text-negative: var(--esc-error);
  --lui-button-height-l: 3rem;
  --lui-button-height-m: 2.75rem;
  --lui-button-height-s: 2.25rem;
  --lui-button-bg-primary-main-dark: var(--esc-hover);
  --lui-button-bg-primary-extra-3-dark: var(--esc-hover);
  --lui-button-bg-secondary: #ececf4;
  --lui-button-bg-secondary-dark: #e1dfef;
  --lui-button-bg-negative: var(--esc-error);
  --lui-button-text-active: var(--brand-primary-color);
  --lui-button-text-active-dark: var(--esc-hover);
  --lui-button-text-extra: var(--esc-muted);
  --lui-button-text-negative: var(--esc-error);
  --lui-button-icon-extra: var(--esc-muted);
  --lui-button-icon-active: var(--brand-primary-color);
  --lui-button-icon-active-dark: var(--esc-hover);
  --lui-button-icon-active-light: var(--esc-subtle);
  --lui-button-icon-negative: var(--esc-error);
  --lui-breadcrumb-main: var(--esc-muted);
  --lui-spinner-bg-main-light: var(--esc-subtle);
  --lui-spinner-bg-white: var(--esc-surface);
  --lui-dropdown-bg-main: var(--esc-surface);
  --lui-dropdown-bg-secondary: #f4f3fb;
  --lui-dropdown-border-color: var(--esc-border);
  --lui-dropdown-text-secondary: var(--esc-muted);
  --lui-dropdown-text-negative: var(--esc-error);
  --lui-tooltip-bg-main: var(--esc-surface);
  --lui-tooltip-text-secondary: var(--esc-muted);
  --lui-segmented-bg-active: var(--esc-surface);
  --lui-segmented-text-secondary: var(--esc-muted);
  --lui-tab-text-light: var(--esc-muted);
  --lui-tab-text-secondary: var(--brand-primary-color);
  --lui-tab-indicator-active-light: var(--esc-subtle);
  --lui-badge-bg-extra-1: var(--brand-primary-color);
  --lui-badge-bg-extra-1-dark: var(--esc-hover);
  --lui-badge-bg-extra-1-pastel: #eeecfb;
  --lui-badge-bg-extra-1-pastel-dark: #e0dcf6;
  --lui-badge-bg-extra-2: var(--esc-error);
  --lui-badge-bg-extra-2-pastel: #fcecea;
  --lui-badge-bg-extra-3: var(--esc-success);
  --lui-badge-bg-extra-3-dark: #105839;
  --lui-badge-bg-extra-3-pastel: #e7f3ed;
  --lui-badge-bg-extra-3-pastel-dark: #cfe8db;
  --lui-badge-bg-extra-4: var(--esc-warning);
  --lui-badge-bg-extra-4-pastel: #fff3d6;
  --lui-badge-text-white: #fff;
  --lui-badge-text-gray: var(--esc-muted);
  --lui-badge-text-extra-1: var(--brand-primary-color);
  --lui-badge-text-extra-2: var(--esc-error);
  --lui-badge-text-extra-3: var(--esc-success);
  --lui-badge-text-extra-4: var(--esc-warning);
  --lui-badge-icon-white: #fff;
  --lui-badge-icon-extra-2: var(--esc-error);
  --lui-badge-icon-extra-3: var(--esc-success);
  --lui-badge-icon-extra-4: var(--esc-warning);
  --lui-separator-light: #eceef4;
  --lui-separator-mid: #e0e3ec;
  --lui-separator-dark: var(--esc-border);
  --lui-ctr-bg-active-light: var(--esc-subtle);
  --lui-ctr-bg-active-light-1: var(--esc-subtle);
  --lui-ctr-bg-active-dark: var(--esc-hover);
  --lui-ctr-bg-active-dark-1: var(--esc-hover);
  --lui-effects-hover-active-input: 0 0 0 0.1875rem rgb(98 80 213 / 18%);
  --lui-input-bg-active: var(--brand-primary-color);
  --lui-input-bg-main: #8d93a7;
  --lui-input-bg-secondary: #f4f5fa;
  --lui-input-bg-white: var(--esc-surface);
  --lui-input-bg-success: var(--esc-success);
  --lui-input-bg-negative: var(--esc-error);
  --lui-input-bg-warning: var(--esc-warning);
  --lui-input-text-secondary-dark: var(--esc-muted);
  --lui-input-text-secondary-mid: var(--esc-muted);
  --lui-input-text-negative: var(--esc-error);
  --lui-input-text-warning: var(--esc-warning);
  --lui-pin-bg-light: var(--esc-surface);
  --lui-pin-bg-success: var(--esc-success);
  --lui-pin-bg-error: var(--esc-error);
  --lui-pin-bg-warning: var(--esc-warning);
  --lui-pin-bg-info-pastel: #eeecfb;
  --lui-pin-bg-success-pastel: #e7f3ed;
  --lui-pin-bg-error-pastel: #fcecea;
  --lui-pin-bg-warning-pastel: #fff3d6;
  --lui-pin-icon-success: var(--esc-success);
  --lui-pin-icon-error: var(--esc-error);
  --lui-pin-icon-warning: var(--esc-warning);
  --lui-pin-text-secondary: var(--esc-muted);
  --lui-pin-text-white: #fff;
  --lui-progress-bg-success: var(--esc-success);
  --lui-progress-bg-negative: var(--esc-error);
  --lui-progress-text-warning: var(--esc-warning);
  --lui-icon-main: var(--esc-muted);
  --lui-calendar-bg-white: var(--esc-surface);
  --lui-calendar-bg-active-light: var(--esc-subtle);
  --lui-calendar-bg-active-dark: var(--esc-hover);
  --lui-calendar-text-secondary-dark: var(--esc-muted);
  --lui-filter-chips-bg-active-light: var(--esc-subtle);
  --lui-filter-chips-bg-active-secondary: var(--brand-primary-color);
  --lui-filter-chips-bg-light: var(--esc-surface);
  --lui-stepper-text-success: var(--esc-success);
  --lui-stepper-bg-success: #e7f3ed;
  --lui-stepper-bg-default: var(--esc-subtle);
  --lui-header-bg-logo: transparent;
  --lui-table-bg-main: var(--esc-surface);
  --lui-table-bg-secondary: #f4f5fa;
  --lui-table-bg-active: #eeecfb;
  --lui-table-bg-secondary-dark: #e9e8f5;
  --lui-table-border-color: #e0e3ec;
  --lui-table-icon-success: var(--esc-success);
  --lui-table-icon-negative: var(--esc-error);
  --lui-table-icon-warning: var(--esc-warning);
  --lui-table-text-secondary: var(--esc-muted);
  --lui-table-text-secondary-dark: var(--esc-muted);
  --lui-duration: 0.15s;

  color: var(--brand-text-color);
  font-synthesis: none;
  font-family: var(--lui-font-family);
}

/* One product shell, with dense data kept on an independent horizontal canvas. */
body.beampay-theme[data-brand='escudix'] app-layout {
  padding: 0 2rem;
}

body.beampay-theme[data-brand='escudix'] app-layout .common-layout {
  width: 100%;
  max-width: 100rem;
}

body.beampay-theme[data-brand='escudix'] header[luiHeader] {
  min-height: 5rem;
  height: auto;
  gap: 1rem;
}

body.beampay-theme[data-brand='escudix'] header[luiHeader] .l-header-logo {
  align-items: center;
  flex-shrink: 0;
  background: none;
}

body.beampay-theme[data-brand='escudix'] header[luiHeader] .l-header-image {
  height: 2.5rem;
  max-width: 9.375rem;
  margin: 0;
}

body.beampay-theme[data-brand='escudix'] header[luiHeader] .l-header-title {
  border-left: 1px solid var(--esc-border);
  border-radius: 0;
  padding: 0 0 0 1rem;
  margin-left: 1rem;
  color: var(--esc-muted);
  font: 600 0.8125rem / 1.5 var(--lui-font-family);
}

body.beampay-theme[data-brand='escudix'] app-layout aside {
  box-sizing: border-box;
  flex-shrink: 0;
  border: 1px solid #e0e3ec;
  border-radius: 0.75rem;
  padding: 0.75rem 0;
}

body.beampay-theme[data-brand='escudix'] app-layout main {
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 1rem;
}

body.beampay-theme[data-brand='escudix'] .sidebar-item {
  box-sizing: border-box;
  min-height: 2.75rem;
  height: auto;
  align-items: center;
  border-radius: 0.375rem;
  margin: 0 0.375rem;
  padding: 0.625rem;
}

body.beampay-theme[data-brand='escudix'] .sidebar-item._active {
  background: var(--esc-subtle);
  color: var(--brand-primary-color);
  border-right: 0;
  padding-right: 0.625rem;
  font-weight: 600;
}

body.beampay-theme[data-brand='escudix'] .sidebar-item:hover {
  background: #f4f3fb;
}

body.beampay-theme[data-brand='escudix'] .sidebar-item._active:hover {
  background: var(--esc-subtle);
}

body.beampay-theme[data-brand='escudix'] app-layout nav {
  height: auto;
  min-height: 2.75rem;
}

body.beampay-theme[data-brand='escudix'] app-layout .nav-item {
  font-size: 1rem;
  line-height: 1.5;
  padding-top: 0.375rem;
}

body.beampay-theme[data-brand='escudix'] app-layout .nav-item._active {
  color: var(--brand-primary-color);
  font-weight: 600;
}

body.beampay-theme[data-brand='escudix'] :is(button, a, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-primary-color);
  outline-offset: 3px;
}

body.beampay-theme[data-brand='escudix'] :is(table, ._lining-tabular-nums) {
  font-variant-numeric: tabular-nums;
}

/* Authentication: brand story and real product photography, separate from the form. */
body.beampay-theme[data-brand='escudix'] app-auth {
  min-height: 100svh;
  height: auto;
  padding: 2rem;
  box-sizing: border-box;
}

body.beampay-theme[data-brand='escudix'] app-auth .layout {
  max-width: 80rem;
  min-height: 43rem;
  max-height: none;
  height: auto;
  padding: 0;
  border: 1px solid var(--esc-border);
  border-radius: 1rem;
  box-shadow: none;
  background: var(--esc-surface);
}

body.beampay-theme[data-brand='escudix'] app-auth .layout .bg-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 52%;
  max-width: none;
  border-radius: 0;
  background: #222640;
  color: #f4f5fa;
  overflow: hidden;
}

body.beampay-theme[data-brand='escudix'] .brand-story {
  padding: 3rem 3rem 1.5rem;
}

body.beampay-theme[data-brand='escudix'] .product-name {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #c2beff;
  border-bottom: 2px solid #c2beff;
  padding-bottom: 0.5rem;
}

body.beampay-theme[data-brand='escudix'] .brand-story h1 {
  font:
    600 clamp(2rem, 3vw, 2.75rem) / 1.2 Sora,
    sans-serif;
  letter-spacing: -0.045em;
  margin: 1.5rem 0 1rem;
  max-width: 12em;
}

body.beampay-theme[data-brand='escudix'] .brand-story p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #c4c8da;
  max-width: 32em;
  margin: 0;
}

body.beampay-theme[data-brand='escudix'] .brand-photo {
  display: block;
  width: 100%;
  height: 19rem;
  object-fit: cover;
  object-position: center;
}

body.beampay-theme[data-brand='escudix'] .brand-signature {
  margin: 0;
  padding: 1.5rem 3rem;
  font-size: 0.75rem;
  color: #c4c8da;
}

body.beampay-theme[data-brand='escudix'] app-auth .layout .content-container {
  box-sizing: border-box;
  width: 48%;
  margin: 0;
  padding: 3rem;
  align-self: center;
}

body.beampay-theme[data-brand='escudix'] app-auth app-brand-logo img {
  width: 11.25rem !important;
  max-height: 3rem;
}

@media (width <= 61.9375rem) {
  body.beampay-theme[data-brand='escudix'] app-auth {
    padding: 1.5rem;
  }

  body.beampay-theme[data-brand='escudix'] app-auth .layout {
    min-height: 38rem;
    max-width: 34rem;
  }

  body.beampay-theme[data-brand='escudix'] app-auth .layout .bg-container {
    display: none;
  }

  body.beampay-theme[data-brand='escudix'] app-auth .layout .content-container {
    width: 100%;
    max-width: none;
    padding: 2rem;
  }

  body.beampay-theme[data-brand='escudix'] app-layout {
    padding: 0 1rem;
  }
}

@media (width <= 40rem) {
  body.beampay-theme[data-brand='escudix'] app-auth {
    padding: 0;
    background: #fff;
  }

  body.beampay-theme[data-brand='escudix'] app-auth .layout {
    border: 0;
    border-radius: 0;
    min-height: 100svh;
  }

  body.beampay-theme[data-brand='escudix'] app-auth .layout .content-container {
    padding: 2rem 1.5rem;
  }

  body.beampay-theme[data-brand='escudix'] header[luiHeader] {
    flex-wrap: wrap;
    padding: 1rem 0;
  }

  body.beampay-theme[data-brand='escudix'] header[luiHeader] > ._flex {
    flex-wrap: wrap;
  }

  body.beampay-theme[data-brand='escudix'] app-layout .common-layout > ._flex {
    flex-direction: column;
  }

  body.beampay-theme[data-brand='escudix'] app-layout aside {
    width: 100% !important;
    display: flex;
    flex-flow: row wrap;
    gap: 0.25rem;
  }

  body.beampay-theme[data-brand='escudix'] app-layout aside > button {
    display: none;
  }

  body.beampay-theme[data-brand='escudix'] .sidebar-item span,
  body.beampay-theme[data-brand='escudix'] .sidebar-item span.collapsed {
    width: auto;
    opacity: 1;
  }

  body.beampay-theme[data-brand='escudix'] .sidebar-item {
    font-size: 0.8125rem;
    margin: 0 0.25rem;
  }

  body.beampay-theme[data-brand='escudix'] app-layout main {
    width: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.beampay-theme[data-brand='escudix'] {
    --lui-duration: 0s;
  }

}

/* Keep controls readable while data tables retain their own horizontal scroll. */
@media (width <= 40rem) {
  body.beampay-theme[data-brand='escudix'] app-layout main > router-outlet + * > ._flex:first-child {
    flex-wrap: wrap;
  }

  body.beampay-theme[data-brand='escudix'] app-layout main > router-outlet + * > ._flex:first-child > lui-input {
    flex-basis: 100%;
    order: 2;
  }

  body.beampay-theme[data-brand='escudix'] .filter-panel {
    grid-template-columns: minmax(0, 1fr);
    width: calc(100vw - 4rem);
    max-height: 65svh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 1rem;
  }

  body.beampay-theme[data-brand='escudix'] lui-dialog {
    min-width: 0 !important;
    max-width: calc(100vw - 2rem);
    box-sizing: border-box;
  }
}

/* Operational status labels should never be truncated by the row action column. */
body.beampay-theme[data-brand='escudix'] app-terminals-list table[luiTable] ._date-td {
  min-width: 8rem;
}

body.beampay-theme[data-brand='escudix'] {
  --graph-bg-01: #6250d5;
  --graph-grad-01: linear-gradient(180deg, #6250d5, var(--esc-surface));
  --graph-bg-02: #2f7b89;
  --graph-grad-02: linear-gradient(180deg, #2f7b89, var(--esc-surface));
  --graph-bg-03: #9a6d22;
  --graph-grad-03: linear-gradient(180deg, #9a6d22, var(--esc-surface));
  --graph-bg-04: #9573ac;
  --graph-grad-04: linear-gradient(180deg, #9573ac, var(--esc-surface));
  --graph-bg-05: #b34b62;
  --graph-grad-05: linear-gradient(180deg, #b34b62, var(--esc-surface));
  --graph-bg-06: #557448;
  --graph-grad-06: linear-gradient(180deg, #557448, var(--esc-surface));
  --graph-bg-07: #757fad;
  --graph-grad-07: linear-gradient(180deg, #757fad, var(--esc-surface));
  --graph-bg-08: #aa6544;
  --graph-grad-08: linear-gradient(180deg, #aa6544, var(--esc-surface));
  --graph-bg-09: #43778a;
  --graph-grad-09: linear-gradient(180deg, #43778a, var(--esc-surface));
  --graph-bg-10: #847f95;
  --graph-grad-10: linear-gradient(180deg, #847f95, var(--esc-surface));
}
