:root {
  --ink: #182033;
  --muted: #7b8497;
  --line: #e9edf5;
  --panel: #ffffff;
  --field: #f7f9fd;
  --accent: #5f6df6;
  --accent-dark: #4652d8;
  --aqua: #27c1b8;
  --rose: #ff7b8c;
  --success: #16a085;
  --warning: #f5a524;
  --shadow: 0 26px 70px rgba(32, 42, 78, .16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 14% 18%, rgba(39, 193, 184, .24), transparent 26%),
    radial-gradient(circle at 88% 22%, rgba(255, 123, 140, .24), transparent 24%),
    linear-gradient(135deg, #f5f8ff 0%, #eef3fb 50%, #f8f5ff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(390px, 1fr);
  padding: 42px;
}

.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 84px);
  padding: 52px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(17, 24, 39, .98), rgba(31, 122, 140, .88)),
    linear-gradient(45deg, var(--aqua), var(--accent));
  border-radius: 8px 0 0 8px;
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 10%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .10) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, .10) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle, #000 0%, transparent 68%);
}

.brand-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(4px);
  opacity: .58;
}

.brand-glow-one {
  top: -80px;
  left: -70px;
  background: var(--aqua);
}

.brand-glow-two {
  right: -90px;
  bottom: -80px;
  background: var(--rose);
}

.brand-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
}

.brand-logo {
  width: min(285px, 84%);
  height: auto;
  display: block;
  margin: 0 0 20px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .18));
}

.company-brand-logo {
  max-height: 190px;
  object-fit: contain;
}

.system-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  color: rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .12);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.system-mark img {
  width: 52px;
  height: 38px;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 0;
  max-width: 390px;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.04;
}

.brand-copy p:last-child {
  max-width: 350px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 16px;
  line-height: 1.7;
}

.metric-strip {
  position: absolute;
  left: 52px;
  right: 52px;
  bottom: 44px;
  display: grid;
  grid-template-columns: 1.2fr .75fr .55fr;
  gap: 12px;
}

.metric-strip span {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
}

.metric-strip span:first-child {
  background: #fff;
}

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 84px);
  padding: 42px;
  background: rgba(255, 255, 255, .76);
  border-radius: 0 8px 8px 0;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.form-card {
  width: min(100%, 420px);
}

.mobile-logo {
  display: none;
  margin-bottom: 28px;
}

.mobile-logo img {
  width: 190px;
  height: auto;
}

.auth-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faff;
}

.auth-tabs a {
  min-width: 108px;
  padding: 12px 18px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.auth-tabs a.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(95, 109, 246, .28);
}

.form-heading p {
  margin: 0 0 10px;
  color: var(--aqua);
  font-size: 14px;
  font-weight: 700;
}

.form-heading h2 {
  margin: 0 0 34px;
  font-size: 34px;
  line-height: 1.12;
}

.login-form {
  display: grid;
}

.login-form label {
  margin-bottom: 10px;
  color: #3b4357;
  font-size: 13px;
  font-weight: 700;
}

.input-wrap {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  min-height: 56px;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--field);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.input-wrap:focus-within {
  border-color: rgba(95, 109, 246, .55);
  background: #fff;
  box-shadow: 0 12px 28px rgba(95, 109, 246, .14);
}

.input-wrap span {
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.input-wrap input {
  width: 100%;
  height: 56px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}

.input-wrap input::placeholder {
  color: #a5adbd;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.form-options a {
  color: var(--accent);
  font-weight: 700;
}

.hint {
  color: #8a93a6;
  font-size: 12px;
  line-height: 1.4;
}

.login-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.login-note a {
  color: var(--accent-dark);
  font-weight: 800;
}

.login-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 18px 34px rgba(95, 109, 246, .32);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(95, 109, 246, .38);
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .brand-panel {
    display: none;
  }

  .form-panel {
    min-height: calc(100vh - 44px);
    padding: 34px 24px;
    border-radius: 8px;
  }

  .mobile-logo {
    display: block;
  }

  .auth-tabs {
    margin-bottom: 34px;
  }
}

.app-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background:
    radial-gradient(circle at 85% 12%, rgba(95, 109, 246, .10), transparent 28%),
    radial-gradient(circle at 18% 88%, rgba(39, 193, 184, .12), transparent 28%),
    #f5f7fb;
  transition: grid-template-columns .22s ease;
}

.app-body.sidebar-collapsed {
  grid-template-columns: 88px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 12% 0%, rgba(39, 193, 184, .24), transparent 30%),
    linear-gradient(165deg, #111827 0%, #202958 48%, #3440a2 100%);
  box-shadow: 18px 0 40px rgba(24, 32, 51, .12);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-logo {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
}

.sidebar-logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .18));
}

.sidebar-logo span {
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.sidebar-toggle {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .10);
  cursor: pointer;
}

.sidebar-toggle span {
  width: 16px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  transition: transform .2s ease, opacity .2s ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, .16);
}

.side-nav {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
  align-content: start;
}

.side-nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  font-weight: 800;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.side-nav a.active,
.side-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .14);
}

.side-nav a.active {
  box-shadow: inset 3px 0 0 var(--aqua);
}

.side-subnav {
  display: grid;
  gap: 4px;
  margin: -4px 0 6px 40px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, .18);
}

.side-subnav a {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 7px;
  color: rgba(255, 255, 255, .70);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.side-subnav a.active,
.side-subnav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  box-shadow: none;
}

.app-body.sidebar-collapsed .side-subnav {
  display: none;
}

.side-nav a:hover {
  transform: translateX(2px);
}

.nav-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .13);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.nav-label {
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-foot {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .10);
}

.sidebar-logout {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  font-weight: 800;
}

.sidebar-logout:hover {
  color: #fff;
  background: rgba(255, 255, 255, .14);
}

.user-avatar,
.topbar-avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--aqua), var(--accent));
  font-size: 13px;
  font-weight: 900;
}

.sidebar-foot div {
  min-width: 0;
  display: grid;
  gap: 3px;
  overflow: hidden;
  transition: opacity .18s ease;
}

.sidebar-foot strong,
.sidebar-foot small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-foot strong {
  font-size: 13px;
}

.sidebar-foot small {
  color: rgba(255, 255, 255, .68);
  font-size: 11px;
}

.app-body.sidebar-collapsed .sidebar {
  padding-inline: 14px;
}

.app-body.sidebar-collapsed .sidebar-head {
  justify-content: center;
}

.app-body.sidebar-collapsed .sidebar-logo {
  display: none;
}

.app-body.sidebar-collapsed .sidebar-toggle {
  width: 46px;
}

.app-body.sidebar-collapsed .sidebar-toggle span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.app-body.sidebar-collapsed .sidebar-toggle span:nth-child(2) {
  opacity: 0;
}

.app-body.sidebar-collapsed .sidebar-toggle span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.app-body.sidebar-collapsed .side-nav a {
  justify-content: center;
  padding-inline: 9px;
}

.app-body.sidebar-collapsed .nav-label,
.app-body.sidebar-collapsed .sidebar-foot div,
.app-body.sidebar-collapsed .sidebar-logout .nav-label {
  width: 0;
  opacity: 0;
  pointer-events: none;
}

.app-body.sidebar-collapsed .sidebar-foot {
  justify-content: center;
  padding-inline: 8px;
}

.app-body.sidebar-collapsed .sidebar-foot .user-avatar {
  width: 34px;
  height: 34px;
}

.app-body.sidebar-collapsed .sidebar-logout {
  justify-content: center;
  padding-inline: 9px;
}

@media (min-width: 761px) {
  .app-body.sidebar-collapsed .side-nav a {
    position: relative;
  }

  .app-body.sidebar-collapsed .side-nav a:hover::after {
    content: attr(title);
    position: absolute;
    left: 74px;
    z-index: 10;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 14px 28px rgba(24, 32, 51, .16);
    font-size: 12px;
    white-space: nowrap;
  }
}

.app-main {
  min-width: 0;
  padding: 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid rgba(233, 237, 245, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 45px rgba(32, 42, 78, .08);
  backdrop-filter: blur(14px);
}

.topbar p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbff;
}

.topbar-user span {
  color: #3b4357;
  font-size: 14px;
  font-weight: 700;
}

.topbar-user a,
.actions a,
.actions button {
  border: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 45px rgba(32, 42, 78, .08);
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(95, 109, 246, .12);
}

.stat-card span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong {
  font-size: 34px;
}

.panel {
  margin-bottom: 22px;
  padding: 24px;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-welcome {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 22px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.quick-actions a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.quick-actions .nav-icon {
  color: var(--accent);
  background: rgba(95, 109, 246, .10);
}

.quick-actions a:hover {
  border-color: rgba(95, 109, 246, .35);
  box-shadow: 0 12px 24px rgba(32, 42, 78, .08);
}

.flash {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.flash.success {
  color: #0f766e;
  background: #dff8f4;
}

.flash.error {
  color: #b42318;
  background: #ffe6e6;
}

.crud-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
}

.crud-form.compact {
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto auto;
}

.crud-form label {
  display: grid;
  gap: 8px;
  color: #3b4357;
  font-size: 13px;
  font-weight: 800;
}

.crud-form input,
.crud-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 13px;
  color: var(--ink);
  background: #fbfcff;
  font-size: 14px;
}

.crud-form select[multiple] {
  height: 112px;
  padding: 8px 13px;
}

.crud-form select[multiple] option {
  padding: 5px 0;
}

.crud-form input:focus,
.crud-form select:focus {
  border-color: rgba(95, 109, 246, .55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(95, 109, 246, .10);
}

.checkline {
  display: flex !important;
  align-items: center;
  gap: 8px;
  height: 46px;
}

.checkline input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.primary-btn {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.panel:has(.action-menu) {
  min-height: 360px;
  overflow: visible;
}

.table-wrap:has(.action-menu) {
  overflow: visible;
  padding-bottom: 180px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  background: #fff;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  background: #f8faff;
}

tbody tr:hover td {
  background: #fbfcff;
}

.profile-form {
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto;
}

.permissions-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbff;
}

.permissions-grid legend {
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.permission-card {
  min-height: 58px;
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.permission-card input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.permission-card .nav-icon {
  color: var(--accent);
  background: rgba(95, 109, 246, .10);
}

.permission-card:has(input:checked) {
  border-color: rgba(95, 109, 246, .45);
  background: rgba(95, 109, 246, .06);
}

.settings-form {
  display: grid;
  gap: 22px;
}

.config-submodule-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.config-submodule-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #1f5661;
  background: #f7fbfc;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.config-submodule-nav a:hover,
.config-submodule-nav a:focus,
.config-submodule-nav a.active {
  border-color: rgba(31, 122, 140, .35);
  background: rgba(31, 122, 140, .08);
}

.config-modules-form {
  margin-bottom: 22px;
}

.config-module {
  scroll-margin-top: 16px;
}

.config-module .panel-title-row {
  align-items: flex-start;
  margin-bottom: 14px;
}

.config-module .panel-title-row h2 {
  margin: 0;
}

.config-save-bar {
  display: flex;
  justify-content: flex-end;
  background: #f8fbfb;
}

.settings-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.settings-form legend {
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-form label {
  display: grid;
  gap: 8px;
  color: #3b4357;
  font-size: 13px;
  font-weight: 900;
}

.settings-form input,
.settings-form select,
.settings-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.logo-preview {
  display: grid;
  gap: 8px;
  align-content: start;
  color: #3b4357;
  font-size: 13px;
  font-weight: 900;
}

.logo-preview img {
  width: 150px;
  max-height: 90px;
  object-fit: contain;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.settings-form textarea {
  resize: vertical;
}

.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus {
  border-color: #8fbec6;
  box-shadow: 0 0 0 3px rgba(31, 122, 140, .10);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.database-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px;
}

.database-admin-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.database-admin-card h3,
.backup-list h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.database-admin-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.database-admin-card label {
  display: grid;
  gap: 8px;
  color: #3b4357;
  font-size: 13px;
  font-weight: 900;
}

.database-admin-card input[type="file"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.database-admin-card.danger-card {
  border-color: rgba(190, 58, 58, .28);
  background: #fff8f8;
}

.inline-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 800 !important;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.danger-btn {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: #be3a3a;
  font-weight: 900;
  cursor: pointer;
}

.danger-btn:hover {
  background: #a93131;
}

.backup-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.backup-list table {
  width: 100%;
  border-collapse: collapse;
}

.backup-list th,
.backup-list td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.dte-payload {
  max-height: 520px;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.client-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 18px;
}

.client-filters,
.client-list-panel {
  grid-column: 1 / -1;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px auto auto;
  gap: 14px;
  align-items: end;
}

.client-filter-form {
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 180px)) auto;
}

.filter-form label {
  display: grid;
  gap: 8px;
  color: #3b4357;
  font-size: 13px;
  font-weight: 900;
}

.filter-form input,
.filter-form select,
.client-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-card {
  min-height: 104px;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(23, 32, 42, .05);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--accent-dark);
  background: #e7f5f7;
}

.kpi-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.kpi-card small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kpi-card strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.1;
}

.kpi-card.success .kpi-icon {
  color: #116b5b;
  background: #e8f6f2;
}

.kpi-card.warning .kpi-icon {
  color: #8a5a0a;
  background: #fff4dc;
}

.kpi-card.danger .kpi-icon {
  color: #9f3a3a;
  background: #faeeee;
}

.quote-kpis {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
}

.quote-kpis .kpi-card {
  min-height: 82px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  padding: 12px;
}

.quote-kpis .kpi-icon {
  width: 34px;
  height: 34px;
}

.quote-kpis .kpi-icon svg {
  width: 18px;
  height: 18px;
}

.quote-kpis .kpi-card small {
  margin-bottom: 4px;
  font-size: 10px;
  line-height: 1.15;
}

.quote-kpis .kpi-card strong {
  font-size: 19px;
}

.smart-filter-panel {
  padding-bottom: 18px;
}

.inventory-filter-form,
.quote-filter-form {
  grid-template-columns: minmax(220px, 1.3fr) repeat(4, minmax(150px, .75fr)) auto;
}

.quote-filter-form {
  grid-template-columns: minmax(220px, 1.2fr) repeat(5, minmax(140px, .72fr)) auto;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title-row h2 {
  margin: 0;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border-radius: 7px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
}

.primary-link {
  color: #fff;
  background: var(--accent);
}

.secondary-link {
  color: var(--accent-dark);
  border: 1px solid var(--line);
  background: #fff;
}

.selected-row td {
  background: #f1fafb;
}

.client-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.client-profile-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.section-kicker {
  display: inline-flex;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.history-stack {
  display: grid;
  gap: 12px;
}

.history-stack div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
}

.history-stack strong {
  color: var(--muted);
  font-size: 13px;
}

.history-stack span {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.activity-timeline {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.activity-timeline h3 {
  margin: 0;
  font-size: 16px;
}

.activity-timeline article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.activity-timeline time,
.activity-timeline small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.activity-timeline strong {
  color: var(--ink);
  font-size: 14px;
}

.activity-timeline p {
  margin: 0;
  color: #3b4357;
  font-size: 13px;
}

.client-form {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.optical-flow-panel {
  overflow: hidden;
}

.optical-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  position: relative;
}

.flow-node {
  position: relative;
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.flow-node:hover {
  transform: translateY(-2px);
  border-color: #8fbec6;
  background: #fbfefe;
}

.flow-node span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.flow-node strong {
  font-size: 15px;
}

.flow-node small {
  color: var(--muted);
  font-size: 12px;
}

.flow-node.active {
  border-color: #8fbec6;
  background: #f1fafb;
}

.flow-node::after {
  content: "";
  position: absolute;
  top: 30px;
  right: -15px;
  width: 15px;
  height: 1px;
  background: var(--line);
}

.row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-actions a {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.datatable-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.datatable-toolbar label {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.datatable-toolbar input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  text-transform: none;
}

.datatable-toolbar input:focus {
  border-color: #8fbec6;
  box-shadow: 0 0 0 3px rgba(31, 122, 140, .10);
}

.datatable-toolbar button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--accent-dark);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.datatable-toolbar button:hover {
  border-color: #8fbec6;
  background: #f1fafb;
}

.datatable-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.datatable-pager div {
  display: flex;
  gap: 8px;
}

.datatable-pager button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--accent-dark);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.datatable-pager button:disabled {
  cursor: default;
  opacity: .45;
}

.action-menu {
  position: relative;
  display: inline-flex;
  min-width: 112px;
  text-align: left;
}

.action-menu > button {
  min-width: 104px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 7px 12px;
  color: #1f2937;
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.action-menu > button::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.action-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1050;
  width: 230px;
  max-width: calc(100vw - 20px);
  display: none;
  padding: 7px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .2);
}

.action-menu.open .action-menu-list {
  display: grid;
}

.action-menu.is-floating .action-menu-list {
  position: fixed;
  top: var(--legacy-action-menu-top, 0);
  left: var(--legacy-action-menu-left, 0);
  right: auto;
  z-index: 9999;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
}

.action-menu-list a {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #1f2937;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
}

.action-menu-list a:hover {
  color: #0f766e;
  background: #ecfdf5;
}

.inline-status-form {
  display: inline-grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 270px;
}

.inline-status-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fbfcfd;
  font: inherit;
  font-size: 13px;
}

.inline-status-form .secondary-btn {
  min-height: 38px;
  padding: 0 12px;
}

.client-status-pill,
.order-status-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.client-status-pill::before,
.order-status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.client-status-pill.active {
  color: #067a46;
  background: #ddfaea;
  box-shadow: 0 0 0 1px rgba(6, 122, 70, .12), 0 0 22px rgba(22, 180, 104, .28);
}

.client-status-pill.inactive {
  color: #a33b35;
  background: #faeeee;
  box-shadow: 0 0 0 1px rgba(163, 59, 53, .10);
}

.client-status-pill.big {
  min-height: 34px;
  padding-inline: 13px;
  font-size: 13px;
}

.order-status-pill {
  color: var(--accent-dark);
  background: #eef7f8;
  box-shadow: inset 0 0 0 1px #cfe5e8;
}

.order-status-pill.finished,
.order-status-pill.delivered {
  color: #067a46;
  background: #e4f7ee;
  box-shadow: inset 0 0 0 1px #bee8d0;
}

.order-status-pill.cancelled {
  color: #9f3a3a;
  background: #faeeee;
  box-shadow: inset 0 0 0 1px #f0caca;
}

.order-status-pill.lab,
.order-status-pill.to_lab {
  color: #8a5b0b;
  background: #fff5dd;
  box-shadow: inset 0 0 0 1px #f1d99a;
}

.contact-admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, .75fr) minmax(0, 1.25fr);
  gap: 18px;
}

.contact-admin-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 360px);
  overflow: auto;
}

.contact-admin-list a {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contact-admin-list a.active,
.contact-admin-list a:hover {
  border-color: #b9d6dc;
  background: #f8fcfd;
}

.contact-admin-list strong,
.contact-admin-list small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-admin-list small {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 12px;
}

.contact-admin-list time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.contact-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted);
}

.contact-status-dot.pending,
.contact-status-pill.pending {
  color: #8a5b0b;
  background: #fff5dd;
}

.contact-status-dot.in_progress,
.contact-status-pill.in_progress {
  color: var(--accent-dark);
  background: #eef7f8;
}

.contact-status-dot.answered,
.contact-status-pill.answered {
  color: #067a46;
  background: #e4f7ee;
}

.contact-status-dot.closed,
.contact-status-pill.closed {
  color: #536171;
  background: #eef1f4;
}

.contact-status-dot.pending { background: #d99522; }
.contact-status-dot.in_progress { background: var(--accent); }
.contact-status-dot.answered { background: #16a085; }
.contact-status-dot.closed { background: #7b8497; }

.contact-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.contact-detail-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-response-form {
  display: grid;
  gap: 14px;
}

.contact-response-form label {
  display: grid;
  gap: 8px;
  color: #3b4357;
  font-size: 13px;
  font-weight: 900;
}

.contact-response-form select,
.contact-response-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fbfcfd;
  font: inherit;
}

body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 38px 20px;
  background: rgba(23, 32, 42, .42);
  backdrop-filter: blur(8px);
}

.modal-overlay.is-open {
  display: flex;
}

.modal-card {
  width: min(980px, 100%);
  max-height: calc(100vh - 76px);
  overflow-y: auto;
  background: #fff;
  background-clip: padding-box;
  isolation: isolate;
  animation: modalIn .16s ease;
}

.modal-card.recipe-view-card {
  width: min(1180px, 100%);
}

.modal-card.narrow {
  width: min(620px, 100%);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: -18px -18px 18px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
}

.modal-head::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -28px;
  height: 28px;
  background: inherit;
  pointer-events: none;
}

.modal-head h2 {
  margin: 0;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.print-body {
  background: #f6f8fa;
}

.print-sheet {
  max-width: 860px;
  margin: 28px auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.print-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.print-header img {
  max-width: 160px;
  max-height: 90px;
  object-fit: contain;
}

.print-header h1 {
  margin: 14px 0 6px;
  font-size: 26px;
}

.print-header p {
  margin: 0;
  color: var(--muted);
}

.print-header button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
  cursor: pointer;
}

.print-header-compact {
  margin-bottom: 8px;
  padding-bottom: 0;
  border-bottom: 0;
}

.work-order-sheet {
  color: #1f2933;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

.work-order-sheet h1 {
  margin: 0 0 34px;
  text-align: center;
  font-size: 24px;
  letter-spacing: 0;
}

.work-order-sheet h2,
.work-order-sheet caption {
  padding: 5px;
  color: #1f2933;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.work-order-sheet table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 0;
}

.work-order-sheet th,
.work-order-sheet td {
  min-height: 24px;
  border: 2px solid #2f3437;
  padding: 5px 6px;
  font-size: 13px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.work-order-top {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.work-order-top table th {
  width: 132px;
}

.work-order-company {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  font-size: 12px;
  line-height: 1.25;
}

.work-order-company img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.work-order-company span {
  display: block;
}

.work-order-lines {
  margin-bottom: 8px;
}

.work-order-lines th {
  width: 210px;
  text-align: left;
}

.work-order-mid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(62px, .34fr) minmax(62px, .34fr) minmax(78px, .45fr);
  gap: 6px;
  align-items: start;
  margin: 8px 0;
}

.work-order-rx th,
.work-order-rx td,
.work-order-checks th,
.work-order-checks td {
  padding: 4px 4px;
  font-size: 12px;
}

.work-order-checks caption {
  padding: 4px 2px;
  font-size: 12px;
}

.work-order-rx caption,
.work-order-checks caption,
.work-order-delivery caption {
  border: 2px solid #2f3437;
  border-bottom: 0;
}

.work-order-checks td:first-child {
  width: 16px;
  text-align: center;
  font-weight: 900;
}

.work-order-delivery {
  display: grid;
  grid-template-columns: .9fr 1.55fr;
  gap: 14px;
  margin: 8px 0;
}

.work-order-delivery section {
  min-height: 144px;
  border: 2px solid #2f3437;
}

.work-order-delivery h2 {
  margin: 0;
  border-bottom: 2px solid #2f3437;
}

.work-order-delivery p {
  margin: 10px;
  font-size: 14px;
}

.work-order-delivery ul {
  margin: 8px 12px 12px 24px;
  padding: 0;
  font-size: 12px;
}

.work-order-notes {
  min-height: 150px;
  margin: 8px 0;
  padding: 14px;
  border: 2px solid #2f3437;
  background: repeating-linear-gradient(#fff 0, #fff 25px, #2f3437 26px, #fff 27px);
}

.work-order-notes p {
  margin: 14px 0 0;
  line-height: 1.75;
}

.work-order-totals th {
  text-align: left;
}

.print-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.print-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.print-grid strong {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.print-grid span {
  color: var(--ink);
  line-height: 1.5;
}

.rx-detail-head,
.rx-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.recipes-list-panel {
  min-height: calc(100vh - 210px);
}

.recipes-table-wrap {
  overflow: visible;
}

.recipes-table {
  min-width: 0;
  table-layout: fixed;
}

.recipes-table th,
.recipes-table td {
  padding: 11px 8px;
  font-size: 13px;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.recipes-table th:nth-child(1) {
  width: 17%;
}

.recipes-table th:nth-child(2) {
  width: 11%;
}

.recipes-table th:nth-child(3),
.recipes-table th:nth-child(6),
.recipes-table th:nth-child(7) {
  width: 9%;
}

.recipes-table th:nth-child(4),
.recipes-table th:nth-child(5) {
  width: 13%;
}

.recipes-table th:nth-child(8) {
  width: 12%;
}

.recipes-table th:nth-child(9) {
  width: 92px;
}

.recipes-table td:nth-child(9) {
  overflow: visible;
  white-space: nowrap;
}

.recipes-table td:nth-child(4),
.recipes-table td:nth-child(5) {
  font-weight: 800;
  color: var(--ink);
}

.recipe-view-card .rx-detail-head {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.recipe-view-card .rx-display-table {
  font-size: 16px;
}

.recipe-view-card .rx-display-table th,
.recipe-view-card .rx-display-table td {
  padding: 18px 14px;
}

.recipe-view-card .rx-detail-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.recipe-view-card .rx-detail-grid .span-2 {
  grid-column: span 3;
}

.rx-detail-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  margin-top: 16px;
}

.rx-detail-head div,
.rx-detail-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.rx-detail-head strong,
.rx-detail-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.rx-detail-head span,
.rx-detail-grid span {
  color: var(--ink);
  font-weight: 700;
}

.rx-display-table,
.print-rx-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
}

.rx-display-table th,
.rx-display-table td,
.print-rx-table th,
.print-rx-table td {
  padding: 13px;
  border: 1px solid var(--line);
  text-align: center;
}

.rx-display-table th,
.print-rx-table th {
  background: #f8fafc;
}

.print-section {
  margin-bottom: 24px;
}

.print-section h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.print-grid-compact {
  margin-top: 16px;
}

.print-signature {
  display: grid;
  gap: 18px;
  margin-top: 44px;
}

.print-signature div {
  width: 260px;
  margin-left: auto;
  text-align: center;
}

.print-signature span {
  display: block;
  height: 42px;
  border-bottom: 1px solid var(--ink);
}

.print-signature strong {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  text-transform: uppercase;
}

.print-signature p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.prebill-sheet {
  max-width: 860px;
  margin: 28px auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.prebill-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.prebill-header img {
  max-width: 170px;
  max-height: 90px;
  object-fit: contain;
}

.prebill-header p,
.prebill-header span {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.prebill-header h1 {
  margin: 4px 0 0;
  font-size: 34px;
  text-align: right;
}

.prebill-notice {
  margin: 18px 0;
  padding: 12px;
  border: 1px solid #f4d48d;
  border-radius: 8px;
  color: #7c4a03;
  background: #fff8e6;
  font-size: 13px;
  font-weight: 800;
}

.prebill-grid,
.public-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.prebill-grid div,
.public-detail-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.prebill-grid strong,
.public-detail-grid strong {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.prebill-items {
  margin-top: 20px;
}

.prebill-items h2 {
  margin: 0 0 10px;
}

.prebill-items table {
  min-width: 0;
}

.prebill-totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.prebill-totals div {
  padding: 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent-dark);
}

.prebill-totals span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.prebill-totals strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.prebill-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.prebill-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.prebill-footer button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
  cursor: pointer;
}

.public-status-body {
  min-height: 100vh;
  padding: 24px;
  background: #f5f7fb;
}

.public-status-shell {
  width: min(920px, 100%);
  display: grid;
  gap: 16px;
  margin: 0 auto;
}

.public-status-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(32, 42, 78, .08);
}

.public-status-card > img {
  max-width: 180px;
  max-height: 90px;
  object-fit: contain;
  margin-bottom: 12px;
}

.public-status-card h1,
.public-status-card h2 {
  margin: 4px 0 8px;
}

.public-status-card p {
  color: var(--muted);
}

.public-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.public-search input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}

.public-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.public-status-head > strong {
  padding: 9px 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent-dark);
  font-size: 13px;
}

.status-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.status-steps div {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 88px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.status-steps div.done {
  border-color: rgba(31, 122, 140, .45);
  background: #f1fafb;
}

.status-steps span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.status-steps .done span {
  background: var(--accent-dark);
}

.status-steps strong {
  font-size: 12px;
  line-height: 1.35;
}

.public-items {
  margin-top: 16px;
}

.public-items h3 {
  margin: 0 0 8px;
}

.public-items p {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

@media print {
  .print-body {
    background: #fff;
  }

  .print-sheet {
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .print-header button {
    display: none;
  }

  .print-header-compact {
    display: none;
  }

  .work-order-sheet {
    page-break-inside: avoid;
  }

  .prebill-sheet {
    margin: 0;
    border: 0;
  }

  .prebill-footer button {
    display: none;
  }
}

.flow-node:nth-child(4)::after,
.flow-node:last-child::after {
  display: none;
}

.span-2 {
  grid-column: span 2;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.flow-full,
.pos-products {
  grid-column: 1 / -1;
}

.recipe-grid {
  grid-template-columns: minmax(280px, .95fr) minmax(420px, 1.35fr);
  align-items: start;
}

.recipe-card {
  width: min(1080px, 100%);
}

.recipe-card .panel {
  background: #fcfdff;
}

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

.recipe-card h2 {
  margin-bottom: 12px;
}

.recipe-grid > .panel:last-child {
  grid-column: 1 / -1;
}

.quote-grid,
.order-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.quote-card {
  width: min(1120px, calc(100vw - 28px));
  background: #fff;
}

.quote-modern {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.quote-wizard-steps {
  display: flex;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  padding: 5px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: #f7fafc;
  align-self: stretch;
  min-height: 52px;
  height: auto;
}

.quote-wizard-steps button {
  flex: 1 1 0;
  height: 38px;
  min-height: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.quote-wizard-steps button.active {
  color: #fff;
  background: #0f8a96;
}

.quote-step[hidden],
[data-quote-next][hidden],
[data-quote-submit][hidden] {
  display: none !important;
}

.quote-step.is-active {
  display: block;
  width: 100%;
  min-width: 0;
}

.quote-wizard-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 0 0;
  border-top: 1px solid #dce4ee;
  background: #fff;
}

.quote-modern-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 16px;
}

.quote-modern .panel {
  border: 1px solid #dce4ee;
  box-shadow: none;
}

.quote-modern .panel h2 {
  font-size: 22px;
  letter-spacing: 0;
}

.quote-modern-grid > .flow-full,
.quote-modern-grid > .quote-total-panel {
  grid-column: 1 / -1;
}

.quote-sale-types {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.quote-sale-types label {
  display: grid;
  grid-template-columns: 54px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.quote-sale-types label:has(input:checked) {
  border-color: #0f8a96;
  background: linear-gradient(135deg, #eefafa, #ffffff);
}

.quote-sale-types input {
  display: none;
}

.quote-sale-icon {
  grid-row: 1 / span 2;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #eef7f7;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 34px 34px;
}

.quote-sale-icon-glasses {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 25c2-7 7-10 14-8 4 1 7 4 8 8 1-4 4-7 8-8 7-2 12 1 14 8' fill='none' stroke='%230f6670' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='16' cy='28' r='9' fill='none' stroke='%230f6670' stroke-width='3'/%3E%3Ccircle cx='34' cy='28' r='9' fill='none' stroke='%230f6670' stroke-width='3'/%3E%3Cpath d='M25 28h2' stroke='%230f6670' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}

.quote-sale-icon-lenses {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='19' cy='24' rx='11' ry='14' fill='none' stroke='%230f6670' stroke-width='3'/%3E%3Cellipse cx='29' cy='24' rx='11' ry='14' fill='none' stroke='%230f6670' stroke-width='3' opacity='.65'/%3E%3C/svg%3E");
}

.quote-sale-icon-frame {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 21c8-3 13-3 18 1 5-4 10-4 17-1' fill='none' stroke='%230f6670' stroke-width='3' stroke-linecap='round'/%3E%3Crect x='9' y='21' width='15' height='10' rx='4' fill='none' stroke='%230f6670' stroke-width='3'/%3E%3Crect x='26' y='21' width='15' height='10' rx='4' fill='none' stroke='%230f6670' stroke-width='3'/%3E%3C/svg%3E");
}

.quote-sale-icon-bottles {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='10' y='16' width='11' height='22' rx='3' fill='none' stroke='%230f6670' stroke-width='3'/%3E%3Cpath d='M13 16v-5h5v5' fill='none' stroke='%230f6670' stroke-width='3'/%3E%3Crect x='28' y='20' width='10' height='18' rx='3' fill='none' stroke='%230f6670' stroke-width='3'/%3E%3Cpath d='M30 20v-4h6v4' fill='none' stroke='%230f6670' stroke-width='3'/%3E%3C/svg%3E");
}

.quote-sale-types strong {
  align-self: end;
}

.quote-sale-types span,
.quote-recipe-list {
  color: var(--muted);
  font-size: 13px;
}

.quote-recipe-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.quote-recipe-option,
.quote-chip-list label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.quote-info-box {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #bcd5ff;
  border-radius: 8px;
  color: #36506e;
  background: #eef6ff;
}

.quote-info-box span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #fff;
  background: #4f8ee8;
  font-weight: 900;
}

.quote-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-chip-list input,
.quote-recipe-option input {
  accent-color: #0f8a96;
}

.quote-optical-packages {
  display: grid;
  gap: 14px;
}

.quote-optical-package {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: #fbfdff;
}

.quote-frame-preview {
  width: 100%;
  height: 118px;
  display: block;
  margin: 2px 0 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fd;
}

.flow-fields label.is-required {
  color: #8a5a0a;
}

.flow-fields label.is-required select {
  border-color: #e8b551;
  background: #fffaf0;
}

.quote-package-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8eef5;
}

.quote-package-head strong {
  font-size: 16px;
}

.quote-package-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quote-crystal-fields {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.quote-builder {
  grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.25fr);
}

.quote-items-panel,
.quote-total-panel {
  grid-column: 1 / -1;
}

.quote-items {
  display: grid;
  gap: 10px;
}

.quote-item-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 90px 120px;
  gap: 10px;
  align-items: center;
}

.quote-item-row select,
.quote-item-row input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.searchable-combo {
  position: relative;
  min-width: 0;
}

.searchable-combo input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.searchable-combo-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 70;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(23, 32, 42, .16);
}

.searchable-combo-list button {
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 9px 10px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.searchable-combo-list button:hover {
  background: #f1fafb;
}

.quote-item-row span {
  color: var(--ink);
  font-weight: 900;
  text-align: right;
}

.quote-item-row.stock-warning select,
.quote-item-row.stock-warning input {
  border-color: #d97706;
  background: #fffbeb;
}

.inventory-master-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.inventory-public-toggle {
  display: grid;
  gap: 4px;
  min-width: 132px;
}

.inventory-public-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.inventory-public-toggle input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.product-thumb,
.quote-product-thumb {
  width: 54px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fd;
}

.quote-item-row:has(.quote-product-thumb) {
  grid-template-columns: 54px minmax(320px, 1fr) 80px 110px;
  padding: 8px;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  background: #fff;
}

.quote-line-recipe,
.quote-line-work {
  min-width: 0;
}

.product-modal-card {
  width: min(1120px, calc(100vw - 36px));
}

.product-master-form {
  display: grid;
  gap: 16px;
}

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

.product-step[hidden],
[data-wizard-next][hidden],
[data-wizard-submit][hidden] {
  display: none !important;
}

.product-step.is-active {
  display: grid;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.wizard-steps button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.wizard-steps button.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.product-code-field {
  display: grid;
  gap: 7px;
}

.product-code-field > label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.product-code-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.product-code-control input {
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 750;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.product-code-control .secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.product-code-control svg {
  width: 16px;
  height: 16px;
}

.product-code-field > small {
  color: var(--muted);
  line-height: 1.45;
}

.product-code-state {
  display: inline-flex;
  margin-right: 4px;
  padding: 2px 7px;
  color: #14734c;
  background: #e7f7ef;
  border: 1px solid #bce8d0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.product-code-state.is-manual {
  color: #8a5b12;
  background: #fff7df;
  border-color: #edd99d;
}

@media (max-width: 560px) {
  .product-code-control {
    grid-template-columns: 1fr;
  }
  .product-code-control .secondary-btn {
    justify-content: center;
  }
}

.gallery-selected-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.gallery-primary-toggle {
  width: max-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
}

.gallery-primary-toggle span {
  color: #d99b16;
  font-size: 17px;
  line-height: 1;
  vertical-align: -1px;
}

.gallery-selected-chip.is-primary {
  border-color: rgba(217, 155, 22, .62);
  box-shadow: 0 0 0 3px rgba(217, 155, 22, .12), 0 10px 22px rgba(15, 23, 42, .07);
}

.product-gallery-selection {
  align-items: stretch;
}

.product-gallery-selection .gallery-selected-chip {
  width: min(100%, 300px);
  max-width: 300px;
}

.product-image-preview {
  display: flex;
  align-items: end;
}

.product-image-preview img {
  width: 100%;
  max-width: 160px;
  height: 100px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fd;
}

.product-gallery-field {
  display: grid;
  gap: 10px;
}

.product-gallery-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.product-gallery-options label {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.product-gallery-options img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  border-radius: 6px;
  background: #f7f9fd;
}

.product-gallery-options span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.catalog-editor,
.inventory-catalog-filter {
  margin-top: 14px;
}

.inventory-catalog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.inventory-catalog-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.inventory-catalog-tabs a.active,
.inventory-catalog-tabs a:hover {
  border-color: rgba(31, 122, 140, .38);
  color: #0f5962;
  background: rgba(31, 122, 140, .08);
}

.inventory-catalog-tabs small {
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #667085;
  background: #eef2f6;
  font-size: 11px;
  text-align: center;
}

.inventory-catalog-tabs a.active small {
  color: #0f5962;
  background: rgba(31, 122, 140, .14);
}

.inventory-catalog-modal {
  max-width: 760px;
}

.inventory-catalog-modal .settings-form fieldset {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.print-products-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.print-products-table th,
.print-products-table td {
  padding: 9px;
  border: 1px solid #d7dce8;
  text-align: left;
  vertical-align: middle;
}

.print-products-table img {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
}

.quote-total-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.quote-total-box div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.quote-total-box div:last-child {
  border-color: #c8eeee;
  background: #eefafa;
}

.quote-total-box div:last-child strong {
  color: #087f86;
}

.quote-total-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-total-box strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 24px;
}

.quote-total-box strong.warning {
  color: #b45309;
}

.flow-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 12px;
}

.flow-fields label,
.field-label {
  display: grid;
  gap: 7px;
  color: #3b4357;
  font-size: 13px;
  font-weight: 900;
}

.flow-fields input,
.flow-fields select,
.flow-fields textarea,
.field-label input,
.field-label select,
.order-grid textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.flow-fields input:focus,
.flow-fields select:focus,
.field-label input:focus,
.field-label select:focus,
.order-grid textarea:focus {
  border-color: #8fbec6;
  box-shadow: 0 0 0 3px rgba(31, 122, 140, .10);
}

.client-picker {
  position: relative;
  min-width: 0;
}

.client-picker input[type="search"] {
  width: 100%;
}

.client-picker-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(23, 32, 42, .16);
}

.client-picker-results button {
  width: 100%;
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 7px;
  padding: 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.client-picker-results button:hover {
  background: #f1fafb;
}

.client-picker-results strong {
  font-size: 13px;
}

.client-picker-results span,
.client-picker-empty {
  color: var(--muted);
  font-size: 12px;
}

.client-picker-empty {
  padding: 10px;
}

.rx-table input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px;
}

.rx-table {
  min-width: 0;
  table-layout: fixed;
}

.rx-table th,
.rx-table td {
  padding: 9px 7px;
}

.flow-help {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.flow-help-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.flow-help-box h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
}

.flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.simulator-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.simulator-grid div {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.simulator-grid strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.simulator-grid span {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.secondary-btn {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.secondary-btn:hover {
  border-color: #8fbec6;
}

.system-footer {
  position: fixed;
  left: 286px;
  bottom: 10px;
  z-index: 10;
  color: var(--muted);
  font-size: 11px;
}

.app-body.sidebar-collapsed .system-footer {
  left: 96px;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.actions form {
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge.active {
  color: #0f766e;
  background: #dff8f4;
}

.badge.inactive {
  color: #b42318;
  background: #ffe6e6;
}

.chat-panel {
  min-height: calc(100vh - 126px);
  display: grid;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(32, 42, 78, .08);
}

.chat-contacts {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #f9fbff;
}

.chat-section-title,
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chat-section-title {
  margin-bottom: 14px;
}

.chat-section-title h2,
.chat-header h2 {
  margin: 0;
  font-size: 18px;
}

.chat-section-title span,
.unread-badge {
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.contact-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-radius: 8px;
  color: var(--ink);
}

.contact-item:hover,
.contact-item.active {
  background: #fff;
  box-shadow: 0 12px 24px rgba(32, 42, 78, .08);
}

.contact-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--aqua));
  font-weight: 900;
}

.contact-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.contact-copy strong,
.contact-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-copy strong {
  font-size: 14px;
}

.contact-copy small {
  color: var(--muted);
  font-size: 12px;
}

.chat-window {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.chat-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.chat-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chat-header a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.messages-list {
  min-height: 360px;
  max-height: calc(100vh - 310px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(233, 237, 245, .55) 1px, transparent 1px),
    linear-gradient(0deg, rgba(233, 237, 245, .55) 1px, transparent 1px);
  background-size: 34px 34px;
}

.message-bubble {
  width: fit-content;
  max-width: min(620px, 82%);
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(32, 42, 78, .10);
}

.message-bubble.mine {
  align-self: flex-end;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.message-bubble.theirs {
  align-self: flex-start;
  color: var(--ink);
  background: #fff;
}

.message-bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.message-bubble time {
  display: block;
  margin-top: 7px;
  color: inherit;
  opacity: .68;
  font-size: 11px;
  text-align: right;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 54px;
  max-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--field);
  font: inherit;
}

.chat-form textarea:focus {
  border-color: rgba(95, 109, 246, .55);
  background: #fff;
}

.chat-form button {
  align-self: end;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  padding: 0 22px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
  cursor: pointer;
}

.empty-state,
.chat-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.chat-empty {
  display: grid;
  place-content: center;
  padding: 34px;
  text-align: center;
}

.chat-empty h2 {
  margin: 0 0 8px;
}

.chat-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  font-family: Arial, Helvetica, sans-serif;
}

.chat-launcher {
  position: relative;
  width: 52px;
  min-width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 18px 42px rgba(70, 82, 216, .35);
  font-size: 20px;
  font-weight: 900;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.chat-widget.dragging .chat-launcher { cursor: grabbing; }
.chat-launcher > strong { position:absolute;top:-7px;right:-7px;min-width:21px;height:21px; }

.chat-launcher.pulse {
  animation: chatPulse 1.2s ease infinite;
}

.chat-launcher strong,
.chat-mini-badge {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-dark);
  background: #fff;
  font-size: 12px;
}

.chat-mini-badge {
  color: #fff;
  background: var(--rose);
}

.chat-popover {
  position: fixed;
  right: auto;
  bottom: auto;
  width: min(760px, calc(100vw - 44px));
  height: min(680px, calc(100vh - 110px));
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(24, 32, 51, .24);
}

.chat-widget.open .chat-popover {
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.chat-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 0%, rgba(39, 193, 184, .28), transparent 34%),
    linear-gradient(135deg, #182033, #3440a2);
}

.chat-popover-head h2,
.chat-popover-head p {
  margin: 0;
}

.chat-popover-head h2 {
  font-size: 17px;
}

.chat-popover-head p {
  margin-top: 3px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
}

.chat-popover-head button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  cursor: pointer;
}

.chat-toolbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #f8faff;
}

.chat-toolbar button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.chat-toolbar button.active {
  color: #fff;
  background: var(--accent);
}

.chat-widget-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 265px 1fr;
}

.chat-widget-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #f9fbff;
}

.widget-conversation {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.widget-conversation.active,
.widget-conversation:hover {
  background: #fff;
  box-shadow: 0 12px 24px rgba(32, 42, 78, .08);
}

.widget-conversation span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.widget-conversation strong,
.widget-conversation small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.widget-conversation strong {
  font-size: 13px;
}

.widget-conversation small {
  color: var(--muted);
  font-size: 11px;
}

.chat-widget-room {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.chat-room-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.chat-room-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.chat-room-head button,
.chat-ended {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  color: #fff;
  background: var(--rose);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.chat-ended {
  background: var(--muted);
  cursor: default;
}

.chat-widget-messages {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(233, 237, 245, .55) 1px, transparent 1px),
    linear-gradient(0deg, rgba(233, 237, 245, .55) 1px, transparent 1px);
  background-size: 30px 30px;
}

.chat-widget-messages .message-bubble {
  max-width: 86%;
}

.chat-widget-messages .message-bubble strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.chat-widget-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-widget-form textarea {
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--field);
  font: inherit;
  font-size: 13px;
}

.chat-widget-form textarea:focus {
  border-color: rgba(95, 109, 246, .55);
  background: #fff;
}

.chat-widget-form button,
.chat-create-panel button {
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
  cursor: pointer;
}

.chat-widget-form button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.chat-create-panel {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 112px;
  z-index: 2;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(32, 42, 78, .14);
}

.chat-create-panel form {
  display: grid;
  gap: 12px;
}

.chat-create-panel label {
  display: grid;
  gap: 7px;
  color: #3b4357;
  font-size: 13px;
  font-weight: 900;
}

.chat-create-panel input,
.chat-create-panel select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 11px;
  background: var(--field);
}

.chat-create-panel select[multiple] {
  height: 120px;
  padding: 8px 11px;
}

.chat-create-panel button {
  min-height: 42px;
}

.chat-widget-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@keyframes chatPulse {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .crud-form,
  .crud-form.compact {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .app-body {
    grid-template-columns: 1fr;
  }

  .app-body.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }

  .app-body.sidebar-collapsed .sidebar {
    padding-inline: 18px;
  }

  .app-body.sidebar-collapsed .sidebar-head {
    justify-content: space-between;
  }

  .app-body.sidebar-collapsed .sidebar-logo {
    display: flex;
  }

  .side-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-body.sidebar-collapsed .side-nav a {
    justify-content: flex-start;
    padding-inline: 12px;
  }

  .app-body.sidebar-collapsed .nav-label,
  .app-body.sidebar-collapsed .sidebar-foot div,
  .app-body.sidebar-collapsed .sidebar-logout .nav-label {
    width: auto;
    opacity: 1;
    pointer-events: auto;
  }

  .app-body.sidebar-collapsed .sidebar-foot {
    justify-content: flex-start;
    padding-inline: 12px;
  }

  .app-body.sidebar-collapsed .sidebar-logout {
    justify-content: flex-start;
    padding-inline: 12px;
  }

  .app-main {
    padding: 22px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid,
  .crud-form,
  .crud-form.compact,
  .profile-form,
  .permissions-grid,
  .dashboard-welcome,
  .client-grid,
  .contact-admin-grid,
  .settings-form fieldset {
    grid-template-columns: 1fr;
  }

  .database-admin-grid {
    grid-template-columns: 1fr;
  }

  .filter-form,
  .client-form,
  .flow-grid,
  .recipe-grid,
  .quote-builder,
  .quote-grid,
  .order-grid,
  .flow-fields,
  .simulator-grid {
    grid-template-columns: 1fr;
  }

  .quote-item-row {
    grid-template-columns: 1fr;
  }

  .quote-item-row span {
    text-align: left;
  }

  .prebill-header,
  .prebill-footer,
  .public-status-head {
    flex-direction: column;
  }

  .prebill-grid,
  .prebill-totals,
  .public-detail-grid,
  .status-steps,
  .public-search {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .flow-full,
  .pos-products {
    grid-column: auto;
  }

  .optical-flow {
    grid-template-columns: 1fr;
  }

  .flow-node::after {
    display: none;
  }

  .quick-actions {
    justify-content: flex-start;
  }

  .chat-panel {
    grid-template-columns: 1fr;
  }

  .chat-contacts {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .messages-list {
    max-height: none;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .chat-popover {
    width: calc(100vw - 28px);
    right: -8px;
  }

  .chat-widget-body {
    grid-template-columns: 1fr;
  }

  .chat-widget-list {
    max-height: 190px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Login refinado */
.login-shell .brand-panel {
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 255, 255, .16), transparent 28%),
    linear-gradient(145deg, #111827 0%, #174e59 56%, #1f7a8c 100%);
}

.login-shell .brand-panel::before {
  opacity: .32;
}

.login-shell .brand-card {
  width: min(100%, 460px);
}

.login-shell .eyebrow {
  margin-bottom: 22px;
  color: rgba(255, 255, 255, .74);
}

.login-shell .company-brand-logo {
  width: min(320px, 88%);
  max-height: 200px;
}

.login-shell .system-mark {
  margin-bottom: 44px;
}

.login-shell .system-mark img {
  width: 64px;
  height: 44px;
}

.login-shell .brand-copy h1 {
  max-width: 430px;
  font-size: clamp(36px, 4vw, 52px);
}

.login-shell .brand-copy p:last-child {
  max-width: 390px;
  font-size: 17px;
}

.login-shell .form-panel {
  background: rgba(255, 255, 255, .92);
}

.login-shell .form-card {
  padding: 8px;
}

.login-shell .form-heading h2 {
  font-size: 36px;
}

.login-shell .input-wrap {
  background: #fbfcfd;
}

@media (max-width: 480px) {
  .login-shell {
    padding: 0;
  }

  .form-panel {
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-tabs {
    width: 100%;
  }

  .auth-tabs a {
    min-width: 0;
    padding-inline: 12px;
  }

  .form-heading h2 {
    font-size: 30px;
  }

  .form-options {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Minimalista clinico */
:root {
  --ink: #17202a;
  --muted: #6f7a87;
  --line: #dde4eb;
  --panel: #ffffff;
  --field: #f8fafc;
  --accent: #1f7a8c;
  --accent-dark: #155e6d;
  --aqua: #28a6a0;
  --rose: #d95f5f;
  --success: #16856f;
  --warning: #b7791f;
  --shadow: 0 12px 28px rgba(23, 32, 42, .06);
}

body {
  background: #f6f8fa;
}

.app-body {
  grid-template-columns: 272px 1fr;
  background: #f6f8fa;
}

.app-body.sidebar-collapsed {
  grid-template-columns: 82px 1fr;
}

.sidebar {
  padding: 18px 14px;
  color: var(--ink);
  background: #ffffff;
  border-right: 1px solid var(--line);
  box-shadow: none;
}

.sidebar-logo {
  color: var(--ink);
}

.sidebar-logo img {
  width: 38px;
  height: 38px;
  background: #fff;
  border: 1px solid var(--line);
  filter: none;
}

.sidebar-logo span {
  color: var(--ink);
  font-size: 16px;
}

.sidebar-toggle {
  border-color: var(--line);
  background: #f8fafc;
}

.sidebar-toggle:hover {
  background: #edf3f6;
}

.sidebar-toggle span {
  background: #536171;
}

.side-nav {
  gap: 4px;
}

.side-nav a {
  min-height: 44px;
  color: #536171;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
}

.side-nav a:hover {
  color: var(--ink);
  background: #f8fafc;
  transform: none;
}

.side-nav a.active {
  color: var(--accent-dark);
  background: #eef7f8;
  border-color: #cfe5e8;
  box-shadow: none;
}

.nav-icon {
  width: 30px;
  height: 30px;
  color: #536171;
  background: #f1f5f8;
}

.side-nav a.active .nav-icon,
.quick-actions .nav-icon,
.permission-card .nav-icon {
  color: var(--accent-dark);
  background: #dff1f3;
}

.sidebar-foot {
  border-color: var(--line);
  background: #f8fafc;
}

.sidebar-logout {
  color: #536171;
}

.sidebar-logout:hover {
  color: #9f3a3a;
  background: #faeeee;
  border-color: #f0caca;
}

.sidebar-logout .nav-icon {
  color: #9f3a3a;
  background: #faeeee;
}

.sidebar-foot strong {
  color: var(--ink);
}

.sidebar-foot small {
  color: var(--muted);
}

.user-avatar,
.topbar-avatar,
.contact-avatar {
  color: var(--accent-dark);
  background: #dff1f3;
}

.app-main {
  padding: 26px;
}

.topbar {
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar p {
  color: var(--muted);
  font-size: 12px;
}

.topbar h1 {
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
}

.topbar-user {
  border-color: var(--line);
  background: #fff;
  box-shadow: none;
}

.topbar-user a,
.actions a,
.actions button {
  color: var(--accent-dark);
}

.stat-card,
.panel,
.chat-panel {
  border-color: var(--line);
  background: #fff;
  box-shadow: none;
}

.stat-card {
  padding: 20px;
}

.stat-card::after {
  display: none;
}

.stat-card span {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.stat-card strong {
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
}

.panel {
  padding: 22px;
}

.panel h2 {
  color: var(--ink);
  font-size: 18px;
}

.dashboard-welcome {
  border-left: 4px solid var(--accent);
}

.quick-actions a {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
  box-shadow: none;
}

.quick-actions a:hover {
  border-color: #b9d6dc;
  box-shadow: none;
}

.crud-form input,
.crud-form select,
.chat-form textarea,
.chat-widget-form textarea,
.chat-create-panel input,
.chat-create-panel select {
  border-color: var(--line);
  background: #fbfcfd;
  border-radius: 7px;
}

.crud-form input:focus,
.crud-form select:focus,
.chat-widget-form textarea:focus,
.chat-form textarea:focus {
  border-color: #8fbec6;
  box-shadow: 0 0 0 3px rgba(31, 122, 140, .10);
}

.primary-btn,
.login-button,
.chat-form button,
.chat-widget-form button,
.chat-create-panel button {
  background: var(--accent);
  box-shadow: none;
  border-radius: 7px;
}

.primary-btn:hover,
.login-button:hover {
  transform: none;
  box-shadow: none;
  background: var(--accent-dark);
}

th {
  color: #6f7a87;
  background: #f8fafc;
  letter-spacing: 0;
}

td {
  background: #fff;
}

tbody tr:hover td {
  background: #f9fbfc;
}

.badge.active,
.flash.success {
  color: #116b5b;
  background: #e8f6f2;
}

.badge.inactive,
.flash.error {
  color: #9f3a3a;
  background: #faeeee;
}

.permissions-grid {
  background: #fbfcfd;
}

.permission-card {
  background: #fff;
}

.permission-card:has(input:checked) {
  border-color: #8fbec6;
  background: #f1fafb;
}

.chat-launcher {
  width: 52px;
  min-width: 52px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 26px rgba(23, 32, 42, .12);
}

.chat-popover {
  border-color: var(--line);
  box-shadow: 0 18px 44px rgba(23, 32, 42, .16);
}

.chat-popover-head {
  color: var(--ink);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.chat-popover-head p {
  color: var(--muted);
}

.chat-popover-head button {
  color: var(--ink);
  border-color: var(--line);
  background: #f8fafc;
}

.chat-toolbar {
  background: #fbfcfd;
}

.chat-toolbar button.active {
  color: #fff;
  background: var(--accent);
}

.chat-widget-list,
.chat-contacts {
  background: #fbfcfd;
}

.widget-conversation.active,
.widget-conversation:hover,
.contact-item:hover,
.contact-item.active {
  background: #fff;
  box-shadow: none;
  outline: 1px solid var(--line);
}

.messages-list,
.chat-widget-messages {
  background: #f8fafc;
  background-image: none;
}

.message-bubble {
  box-shadow: none;
}

.message-bubble.mine {
  color: #fff;
  background: var(--accent);
}

.message-bubble.theirs {
  border: 1px solid var(--line);
  background: #fff;
}

.chat-room-head button,
.chat-ended {
  background: var(--rose);
}

.chat-create-panel {
  border-color: var(--line);
  box-shadow: 0 12px 28px rgba(23, 32, 42, .10);
}

.client-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.quick-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.quick-add-btn:hover {
  background: var(--accent-dark);
}

.compact-title-row {
  gap: 12px;
  margin-bottom: 12px;
}

.compact-title-row h2 {
  margin: 0;
}

.quick-form-status {
  padding: 10px 12px;
  border: 1px solid rgba(255, 123, 140, .34);
  border-radius: 8px;
  color: #9b1c31;
  background: rgba(255, 123, 140, .10);
  font-size: .9rem;
}

.quick-recipe-card {
  max-width: 980px;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--rose);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
}

.side-nav a {
  position: relative;
}

.app-body.sidebar-collapsed .nav-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: .68rem;
}

.label-filter-form {
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, .8fr) auto;
}

.label-select-panel .panel-title-row {
  align-items: end;
}

.label-size-field {
  min-width: 170px;
  display: grid;
  gap: 7px;
  color: #3b4357;
  font-size: 13px;
  font-weight: 800;
}

.label-size-field select,
.label-qty-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--field);
  font: inherit;
}

.label-qty-input {
  max-width: 96px;
  padding: 0 10px;
}

.label-products-table td:first-child,
.label-products-table th:first-child {
  width: 56px;
  text-align: center;
}

.label-products-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.label-preview-panel {
  overflow: visible;
}

.label-print-toolbar {
  margin-bottom: 18px;
}

.label-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px dashed #cfd6e6;
  border-radius: 8px;
  background: #fff;
}

.product-label {
  width: 85mm;
  height: 20mm;
  display: grid;
  grid-template-columns: 31mm 23mm 31mm;
  align-items: center;
  overflow: hidden;
  color: #111827;
  background: transparent;
  break-inside: avoid;
}

.label-size-dumbbell-small .product-label {
  width: 70mm;
  height: 18mm;
  grid-template-columns: 26mm 18mm 26mm;
}

.label-size-dumbbell-large .product-label {
  width: 100mm;
  height: 22mm;
  grid-template-columns: 37mm 26mm 37mm;
}

.product-label-half {
  position: relative;
  min-width: 0;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1mm;
  padding: 2mm;
  border: 1px solid #111827;
  background: #fff;
}

.product-label-info {
  border-radius: 9mm 3mm 3mm 9mm;
  border-right-style: dashed;
}

.product-label-qr {
  border-radius: 3mm 9mm 9mm 3mm;
  border-left-style: dashed;
}

.product-label-neck {
  position: relative;
  height: 7mm;
  border-top: 1px dashed #111827;
  border-bottom: 1px dashed #111827;
  background: #fff;
}

.product-label-neck::before,
.product-label-neck::after {
  content: "";
  position: absolute;
  top: -6.5mm;
  bottom: -6.5mm;
  width: 1px;
  border-left: 1px dotted #9ca3af;
}

.product-label-neck::before {
  left: 1.8mm;
}

.product-label-neck::after {
  right: 1.8mm;
}

.product-label-info span {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-label-info small {
  font-size: 11px;
  font-weight: 900;
}

.product-label-qr small {
  max-width: 100%;
  overflow: hidden;
  color: #4b5563;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-label img {
  width: 11mm;
  aspect-ratio: 1;
  object-fit: contain;
}

.label-size-dumbbell-small .product-label img {
  width: 10mm;
}

.label-size-dumbbell-large .product-label img {
  width: 13mm;
}

@media print {
  body.app-body {
    display: block;
    min-height: auto;
    background: #fff;
  }

  .sidebar,
  .topbar,
  .flash,
  .label-builder-panel,
  .label-select-panel,
  .label-print-toolbar,
  .chat-widget,
  .system-footer {
    display: none !important;
  }

  .app-main {
    display: block;
    width: auto;
    min-height: auto;
    padding: 0;
    margin: 0;
  }

  .label-preview-panel {
    display: block;
    padding: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .label-sheet {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .product-label {
    border-color: #d7d7d7;
    border-radius: 0;
    page-break-inside: avoid;
  }
}

@media (max-width: 760px) {
  .app-main {
    padding: 20px;
  }

  .label-filter-form {
    grid-template-columns: 1fr;
  }

  .label-select-panel .panel-title-row {
    align-items: stretch;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .system-footer {
    position: static;
    padding: 0 20px 12px;
  }

  .datatable-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .datatable-pager {
    align-items: stretch;
    flex-direction: column;
  }

  .datatable-pager div {
    justify-content: space-between;
  }
}

@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-body,
  .app-body.sidebar-collapsed {
    display: block;
    min-width: 0;
  }

  .sidebar,
  .app-body.sidebar-collapsed .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    height: auto;
    max-height: 82vh;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    overflow-y: auto;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 14px 34px rgba(24, 32, 51, .20);
  }

  .sidebar-head,
  .app-body.sidebar-collapsed .sidebar-head {
    justify-content: space-between;
  }

  .sidebar-logo,
  .app-body.sidebar-collapsed .sidebar-logo {
    display: flex;
    max-width: calc(100vw - 82px);
  }

  .sidebar-logo img {
    width: 38px;
    height: 38px;
  }

  .sidebar-logo span {
    font-size: 16px;
    text-overflow: ellipsis;
  }

  .side-nav,
  .sidebar-foot,
  .sidebar-logout {
    transition: max-height .2s ease, opacity .16s ease, margin .16s ease, padding .16s ease;
  }

  .app-body.sidebar-collapsed .side-nav,
  .app-body.sidebar-collapsed .sidebar-foot,
  .app-body.sidebar-collapsed .sidebar-logout {
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .app-body:not(.sidebar-collapsed) .side-nav {
    max-height: 62vh;
    overflow-y: auto;
  }

  .app-body.sidebar-collapsed .sidebar-toggle {
    width: 42px;
  }

  .app-body.sidebar-collapsed .nav-label,
  .app-body.sidebar-collapsed .sidebar-foot div,
  .app-body.sidebar-collapsed .sidebar-logout .nav-label {
    width: auto;
    opacity: 1;
    pointer-events: auto;
  }

  .app-body.sidebar-collapsed .side-nav a,
  .app-body.sidebar-collapsed .sidebar-logout {
    justify-content: flex-start;
  }

  .side-subnav,
  .app-body.sidebar-collapsed .side-subnav {
    display: grid;
    margin: -2px 0 4px 38px;
  }

  .nav-badge,
  .app-body.sidebar-collapsed .nav-badge {
    position: static;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    font-size: .78rem;
  }

  .app-main {
    width: 100%;
    min-width: 0;
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
  }

  .topbar h1 {
    font-size: 22px;
    line-height: 1.15;
  }

  .topbar-user {
    flex: 0 0 auto;
    max-width: 100%;
    padding: 6px;
  }

  .topbar-user span:not(.topbar-avatar) {
    display: none;
  }

  .panel,
  .chat-panel {
    padding: 16px;
    border-radius: 8px;
  }

  .panel-title-row,
  .compact-title-row,
  .datatable-toolbar,
  .flow-actions,
  .wizard-actions,
  .quote-wizard-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .panel-title-row h2,
  .panel h2 {
    font-size: 18px;
    line-height: 1.2;
  }

  .filter-form,
  .client-filter-form,
  .inventory-filter-form,
  .quote-filter-form,
  .label-filter-form,
  .flow-fields,
  .settings-form,
  .product-master-form,
  .chat-create-panel form {
    grid-template-columns: 1fr !important;
  }

  .filter-form button,
  .primary-btn,
  .secondary-btn,
  .primary-link,
  .secondary-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .kpi-grid,
  .inventory-kpis,
  .quote-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .kpi-card {
    min-width: 0;
    padding: 12px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .kpi-card strong {
    font-size: 20px;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .kpi-card small {
    font-size: 11px;
    line-height: 1.2;
  }

  .table-wrap,
  .recipes-table-wrap {
    width: calc(100vw - 32px);
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 720px;
  }

  .inventory-master-table {
    min-width: 980px;
  }

  .modal-overlay {
    align-items: flex-start;
    padding: 10px;
    overflow-y: auto;
  }

  .modal-card,
  .modal-card.narrow,
  .modal-card.recipe-view-card,
  .product-modal-card,
  .quick-recipe-card,
  .inventory-catalog-modal {
    width: min(100%, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    padding: 16px;
  }

  .modal-head {
    align-items: flex-start;
    gap: 12px;
    margin: -16px -16px 16px;
    padding: 16px 16px 12px;
    border-radius: 10px 10px 0 0;
  }

  .wizard-steps,
  .quote-wizard-steps,
  .inventory-catalog-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .wizard-steps button,
  .quote-wizard-steps button,
  .inventory-catalog-tabs a {
    flex: 0 0 auto;
    min-width: 130px;
    scroll-snap-align: start;
  }

  .flow-grid,
  .recipe-grid,
  .quote-grid,
  .quote-modern-grid,
  .inventory-grid,
  .quote-builder,
  .quote-items-panel,
  .quote-total-panel,
  .optical-flow-panel {
    grid-template-columns: 1fr !important;
  }

  .quote-sale-types,
  .quote-chip-list,
  .quote-optical-packages {
    grid-template-columns: 1fr !important;
  }

  .quote-item-row {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .quote-item-row span {
    text-align: left;
  }

  .product-gallery-options,
  .label-sheet {
    grid-template-columns: 1fr;
  }

  .product-label {
    max-width: 100%;
    transform-origin: left top;
  }
}

@media (max-width: 520px) {
  .app-main {
    padding: 12px;
  }

  .topbar {
    padding: 12px;
  }

  .topbar p {
    font-size: 11px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .panel,
  .chat-panel {
    padding: 12px;
  }

  .kpi-grid,
  .inventory-kpis,
  .quote-kpis {
    grid-template-columns: 1fr !important;
  }

  .table-wrap,
  .recipes-table-wrap {
    width: calc(100vw - 24px);
  }

  .form-options,
  .topbar {
    flex-direction: column;
  }

  .auth-tabs {
    width: 100%;
  }

  .auth-tabs a {
    min-width: 0;
  }

  .chat-widget {
    right: 12px;
    bottom: 12px;
  }

  .chat-popover {
    right: auto;
    bottom: auto;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
}

.product-category-field {
  display: grid;
  gap: 8px;
}

.product-category-picker {
  max-height: 240px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.product-category-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f8fbff;
}

.product-category-option.level-1 { margin-left: 18px; }
.product-category-option.level-2 { margin-left: 36px; }
.product-category-option.level-3,
.product-category-option.level-4 { margin-left: 54px; }

.product-category-option label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 800;
}

.product-category-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.product-category-option small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.category-tree-preview {
  display: grid;
  gap: 7px;
}

.category-tree-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.category-tree-row.level-1 { margin-left: 22px; }
.category-tree-row.level-2 { margin-left: 44px; }
.category-tree-row.level-3,
.category-tree-row.level-4 { margin-left: 66px; }
.favicon-preview img {
  width: 48px;
  height: 48px;
  max-height: 48px;
  object-fit: contain;
}
.category-admin-panel {
  display: grid;
  gap: 16px;
}

.category-admin-head {
  align-items: flex-start;
}

.category-admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.category-admin-metrics article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.category-admin-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.category-admin-metrics strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.category-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.category-search {
  flex: 1 1 300px;
  max-width: 520px;
}

.category-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.secondary-btn.compact {
  min-height: 38px;
  padding: 8px 12px;
}

.category-tree-manager {
  max-height: 640px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fbff;
}

.category-node {
  margin: 6px 0;
}

.category-node[hidden],
.category-admin-table tr[hidden] {
  display: none;
}

.category-node summary {
  display: grid;
  grid-template-columns: 22px minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  list-style: none;
}

.category-node summary::-webkit-details-marker {
  display: none;
}

.category-node-toggle::before {
  content: '+';
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(31, 122, 140, .1);
  color: #0f5962;
  font-weight: 900;
}

.category-node[open] > summary .category-node-toggle::before {
  content: '-';
}

.category-node-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.category-node-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-node-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.category-node-meta,
.category-node-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.category-children {
  margin-left: 24px;
  padding-left: 12px;
  border-left: 2px solid rgba(31, 122, 140, .16);
}

.category-leaf-hint {
  margin: 6px 0 0 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.category-admin-table td:first-child {
  min-width: 220px;
}

.category-modal-card {
  max-width: 720px;
}

.status-pill.muted {
  color: #667085;
  background: #f2f4f7;
}

.status-pill.neutral {
  color: #344054;
  background: #eef4ff;
}

@media (max-width: 760px) {
  .category-admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .category-search {
    max-width: none;
  }

  .category-node summary {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .category-node-meta,
  .category-node-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .category-children {
    margin-left: 10px;
    padding-left: 8px;
  }

  .category-tree-manager {
    max-height: none;
  }
}
.category-view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  width: fit-content;
}

.category-view-tabs a {
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 900;
  text-decoration: none;
}

.category-view-tabs a.active,
.category-view-tabs a:hover {
  color: #0f5962;
  background: rgba(31, 122, 140, .1);
}

.category-node.level-0 > summary {
  border-left: 5px solid #1f7a8c;
}

.category-node.level-1 > summary {
  border-left: 5px solid #2f80ed;
}

.category-node.level-2 > summary {
  border-left: 5px solid #12b76a;
}

.category-node.level-3 > summary,
.category-node.level-4 > summary,
.category-node.level-5 > summary {
  border-left: 5px solid #f79009;
}

.status-pill.level-pill {
  color: #0f5962;
  background: rgba(31, 122, 140, .1);
}

.category-list-filter,
.brand-filter-form {
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: end;
}

.category-page-summary,
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.pagination-bar {
  margin-top: 14px;
}

.pagination-bar .disabled {
  opacity: .45;
  pointer-events: none;
}

.product-category-picker.tree-picker {
  max-height: 360px;
  gap: 8px;
  padding: 12px;
  background: #f8fbff;
}

.product-category-node {
  margin: 6px 0;
}

.product-category-node summary {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  list-style: none;
  cursor: pointer;
}

.product-category-node summary::-webkit-details-marker {
  display: none;
}

.product-category-caret::before {
  content: '+';
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(31, 122, 140, .1);
  color: #0f5962;
  font-weight: 900;
}

.product-category-node[open] > summary .product-category-caret::before {
  content: '-';
}

.product-category-node label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  font-weight: 900;
}

.product-category-node label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-category-node input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.product-category-node small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.product-category-path {
  margin: 4px 0 0 34px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.product-category-children {
  margin-left: 18px;
  padding-left: 10px;
  border-left: 2px solid rgba(31, 122, 140, .15);
}

.brand-admin-table td:first-child small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 760px) {
  .category-view-tabs {
    display: flex;
    width: 100%;
  }

  .category-view-tabs a {
    flex: 1;
    text-align: center;
  }

  .category-list-filter,
  .brand-filter-form {
    grid-template-columns: 1fr;
  }

  .category-page-summary,
  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .product-category-node summary {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .product-category-node summary small {
    grid-column: 2;
  }
}
/* Modern colored category tree */
.category-tree-manager {
  --tree-surface: #f6f8fb;
  max-height: 720px;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(31, 122, 140, .08), transparent 32%),
    linear-gradient(180deg, #fbfdff 0%, var(--tree-surface) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.category-branch {
  --branch: #1f7a8c;
  --branch-rgb: 31, 122, 140;
  --branch-soft: rgba(var(--branch-rgb), .1);
  margin: 10px 0;
}

.category-branch.branch-color-0 { --branch: #1f7a8c; --branch-rgb: 31, 122, 140; }
.category-branch.branch-color-1 { --branch: #2f80ed; --branch-rgb: 47, 128, 237; }
.category-branch.branch-color-2 { --branch: #12b76a; --branch-rgb: 18, 183, 106; }
.category-branch.branch-color-3 { --branch: #f79009; --branch-rgb: 247, 144, 9; }
.category-branch.branch-color-4 { --branch: #9b51e0; --branch-rgb: 155, 81, 224; }
.category-branch.branch-color-5 { --branch: #e5484d; --branch-rgb: 229, 72, 77; }

.category-branch > summary {
  position: relative;
  grid-template-columns: 28px minmax(220px, 1fr) auto auto;
  gap: 12px;
  min-height: 66px;
  padding: 13px 14px 13px 16px;
  border: 1px solid rgba(var(--branch-rgb), .2);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(var(--branch-rgb), .11), rgba(255, 255, 255, .96) 44%),
    #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}

.category-branch > summary::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 6px;
  border-radius: 0 999px 999px 0;
  background: var(--branch);
}

.category-branch > summary:hover {
  border-color: rgba(var(--branch-rgb), .4);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .09);
  transform: translateY(-1px);
}

.category-branch-line {
  display: none;
}

.category-branch.level-0 {
  margin: 6px 0 18px;
  padding: 14px;
  border: 1px solid rgba(var(--branch-rgb), .22);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(var(--branch-rgb), .11), rgba(255, 255, 255, .78)),
    #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .07);
}

.category-branch.level-0 > summary {
  border-color: rgba(var(--branch-rgb), .28);
  background:
    linear-gradient(90deg, rgba(var(--branch-rgb), .16), #fff 48%),
    #fff;
}

.category-branch.level-0 > summary .category-node-main strong {
  color: #101828;
  font-size: 18px;
}

.category-branch.level-1,
.category-branch.level-2,
.category-branch.level-3,
.category-branch.level-4,
.category-branch.level-5 {
  margin-left: 0;
}

.category-branch.level-1 > summary { margin-left: 6px; }
.category-branch.level-2 > summary { margin-left: 18px; }
.category-branch.level-3 > summary { margin-left: 30px; }
.category-branch.level-4 > summary,
.category-branch.level-5 > summary { margin-left: 42px; }

.category-children {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 12px 0 0 18px;
  padding: 2px 0 2px 24px;
  border-left: 3px solid rgba(var(--branch-rgb), .34);
}

.category-children::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 0;
  width: 3px;
  height: 42px;
  border-radius: 999px;
  background: var(--branch);
}

.category-node-toggle::before {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, .62);
  background: var(--branch);
  color: #fff;
  box-shadow: 0 8px 18px rgba(var(--branch-rgb), .28);
}

.category-node-main strong {
  letter-spacing: 0;
}

.category-node-main small {
  color: #667085;
  white-space: normal;
}

.category-node-meta .status-pill {
  border: 1px solid rgba(15, 23, 42, .07);
  background: #fff;
}

.category-node-meta .level-pill {
  color: var(--branch);
  background: rgba(var(--branch-rgb), .1);
  border-color: rgba(var(--branch-rgb), .18);
}

.category-branch .secondary-link {
  min-height: 32px;
  border-color: rgba(var(--branch-rgb), .24);
  color: var(--branch);
  background: rgba(var(--branch-rgb), .06);
}

.category-branch .secondary-link:hover {
  border-color: rgba(var(--branch-rgb), .42);
  background: rgba(var(--branch-rgb), .1);
}

.category-leaf-hint {
  width: fit-content;
  margin: 9px 0 0 52px;
  padding: 5px 10px;
  border: 1px dashed rgba(var(--branch-rgb), .3);
  border-radius: 999px;
  color: var(--branch);
  background: rgba(var(--branch-rgb), .08);
  font-size: 11px;
  font-weight: 900;
}

@media (max-width: 760px) {
  .category-tree-manager {
    padding: 12px;
  }

  .category-branch.level-0 {
    padding: 10px;
  }

  .category-branch > summary {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: auto;
    padding: 12px;
  }

  .category-node-meta,
  .category-node-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .category-branch.level-1 > summary,
  .category-branch.level-2 > summary,
  .category-branch.level-3 > summary,
  .category-branch.level-4 > summary,
  .category-branch.level-5 > summary {
    margin-left: 0;
  }

  .category-children {
    margin-left: 8px;
    padding-left: 12px;
  }

  .category-leaf-hint {
    margin-left: 36px;
  }
}

/* Category maintainer board */
.category-admin-panel {
  gap: 18px;
  background:
    radial-gradient(circle at top right, rgba(31, 122, 140, .08), transparent 34%),
    #fff;
}

.category-admin-head .empty-state {
  max-width: 760px;
}

.category-admin-metrics {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.category-admin-metrics article {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.category-admin-metrics article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #1f7a8c;
}

.category-admin-metrics article:nth-child(2)::before { background: #2f80ed; }
.category-admin-metrics article:nth-child(3)::before { background: #12b76a; }
.category-admin-metrics article:nth-child(4)::before { background: #e5484d; }

.category-mode-tabs {
  width: 100%;
  max-width: 520px;
  padding: 5px;
  border-radius: 12px;
  background: #eef4f7;
}

.category-mode-tabs a {
  flex: 1;
  text-align: center;
  border-radius: 9px;
}

.category-mode-tabs a.active {
  color: #102a43;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.category-card-filter {
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  background: #f8fbfc;
}

.category-card-summary {
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  background: #fff;
}

.category-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.category-admin-card {
  --branch: #1f7a8c;
  --branch-rgb: 31, 122, 140;
  position: relative;
  min-height: 220px;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 10px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(var(--branch-rgb), .18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(var(--branch-rgb), .08), rgba(255, 255, 255, .94) 42%),
    #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.category-admin-card.branch-color-0 { --branch: #1f7a8c; --branch-rgb: 31, 122, 140; }
.category-admin-card.branch-color-1 { --branch: #2f80ed; --branch-rgb: 47, 128, 237; }
.category-admin-card.branch-color-2 { --branch: #12b76a; --branch-rgb: 18, 183, 106; }
.category-admin-card.branch-color-3 { --branch: #f79009; --branch-rgb: 247, 144, 9; }
.category-admin-card.branch-color-4 { --branch: #9b51e0; --branch-rgb: 155, 81, 224; }
.category-admin-card.branch-color-5 { --branch: #e5484d; --branch-rgb: 229, 72, 77; }

.category-admin-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--branch);
}

.category-admin-card.level-1 { margin-top: 8px; }
.category-admin-card.level-2 { margin-top: 16px; }
.category-admin-card.level-3,
.category-admin-card.level-4,
.category-admin-card.level-5 { margin-top: 24px; }

.category-card-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.category-card-topline > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-card-topline strong {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--branch);
  background: rgba(var(--branch-rgb), .1);
  font-size: 11px;
}

.category-root-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--branch);
  box-shadow: 0 0 0 4px rgba(var(--branch-rgb), .12);
}

.category-admin-card h3 {
  margin: 0;
  color: #101828;
  font-size: 20px;
  line-height: 1.18;
}

.category-admin-card p {
  margin: 0;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.category-card-stats {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.category-card-stats > span:not(.status-pill) {
  padding: 5px 8px;
  border-radius: 999px;
  color: #475467;
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 900;
}

.category-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-self: end;
}

.category-card-actions .primary-link,
.category-card-actions .secondary-link {
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
}

.category-card-actions .primary-link {
  background: var(--branch);
}

.category-card-actions .secondary-link {
  color: var(--branch);
  border-color: rgba(var(--branch-rgb), .24);
  background: rgba(var(--branch-rgb), .06);
}

.category-empty-card {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px dashed rgba(15, 23, 42, .16);
  border-radius: 12px;
  background: #fff;
}

@media (max-width: 1180px) {
  .category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .category-admin-metrics,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .category-admin-card.level-1,
  .category-admin-card.level-2,
  .category-admin-card.level-3,
  .category-admin-card.level-4,
  .category-admin-card.level-5 {
    margin-top: 0;
  }

  .category-card-actions {
    grid-template-columns: 1fr;
  }
}
/* Polished inventory category tree */
.category-tree-manager {
  --tree-surface: #f8fafc;
  display: grid;
  gap: 18px;
  max-height: none;
  padding: 22px;
  overflow-x: auto;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, var(--tree-surface) 100%);
}

.category-tree-manager > .category-branch.level-0 {
  min-width: 760px;
}

.category-branch {
  --branch: #1f7a8c;
  --branch-rgb: 31, 122, 140;
  margin: 0;
}

.category-branch.branch-color-0 { --branch: #1f7a8c; --branch-rgb: 31, 122, 140; }
.category-branch.branch-color-1 { --branch: #2563eb; --branch-rgb: 37, 99, 235; }
.category-branch.branch-color-2 { --branch: #16a34a; --branch-rgb: 22, 163, 74; }
.category-branch.branch-color-3 { --branch: #d97706; --branch-rgb: 217, 119, 6; }
.category-branch.branch-color-4 { --branch: #7c3aed; --branch-rgb: 124, 58, 237; }
.category-branch.branch-color-5 { --branch: #dc2626; --branch-rgb: 220, 38, 38; }

.category-branch > summary {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--branch-rgb), .22);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.category-branch.level-0 {
  padding: 16px;
  border: 2px solid rgba(var(--branch-rgb), .26);
  border-radius: 14px;
  background: rgba(var(--branch-rgb), .055);
  box-shadow: 0 18px 34px rgba(15, 23, 42, .08);
}

.category-branch.level-0 > summary {
  border-color: rgba(var(--branch-rgb), .34);
  background: linear-gradient(90deg, rgba(var(--branch-rgb), .14), #fff 42%);
}

.category-branch.level-0 > summary .category-node-main strong {
  font-size: 18px;
}

.category-branch.level-1,
.category-branch.level-2,
.category-branch.level-3,
.category-branch.level-4,
.category-branch.level-5 {
  position: relative;
  margin: 10px 0 0;
}

.category-branch.level-1 > summary { margin-left: 34px; }
.category-branch.level-2 > summary { margin-left: 68px; }
.category-branch.level-3 > summary { margin-left: 102px; }
.category-branch.level-4 > summary { margin-left: 136px; }
.category-branch.level-5 > summary { margin-left: 170px; }

.category-branch.level-1 > summary::after,
.category-branch.level-2 > summary::after,
.category-branch.level-3 > summary::after,
.category-branch.level-4 > summary::after,
.category-branch.level-5 > summary::after {
  content: "\2192";
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--branch);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(var(--branch-rgb), .24);
}

.category-children {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0 0 0 18px;
  border-left: 2px solid rgba(var(--branch-rgb), .22);
}

.category-children::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 0;
  width: 2px;
  height: 34px;
  border-radius: 999px;
  background: var(--branch);
}

.category-node-toggle::before {
  width: 26px;
  height: 26px;
  border: 0;
  background: var(--branch);
  color: #fff;
  box-shadow: 0 8px 16px rgba(var(--branch-rgb), .24);
}

.category-node-main strong {
  color: #101828;
  font-size: 15px;
  letter-spacing: 0;
}

.category-node-main small {
  color: #667085;
  white-space: normal;
}

.category-node-meta,
.category-node-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.category-node-meta .status-pill {
  border: 1px solid rgba(15, 23, 42, .08);
  background: #fff;
}

.category-node-meta .level-pill {
  color: var(--branch);
  border-color: rgba(var(--branch-rgb), .2);
  background: rgba(var(--branch-rgb), .09);
}

.category-depth-limit,
.category-leaf-hint {
  width: fit-content;
  margin: 9px 0 0 52px;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--branch);
  background: rgba(var(--branch-rgb), .08);
  font-size: 11px;
  font-weight: 900;
}

.category-depth-limit {
  border: 1px solid rgba(var(--branch-rgb), .26);
}

.category-leaf-hint {
  border: 1px dashed rgba(var(--branch-rgb), .32);
}

@media (max-width: 760px) {
  .category-tree-manager {
    padding: 12px;
  }

  .category-tree-manager > .category-branch.level-0 {
    min-width: 0;
  }

  .category-branch.level-0 {
    padding: 10px;
  }

  .category-branch > summary {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
  }

  .category-node-meta,
  .category-node-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .category-branch.level-1 > summary,
  .category-branch.level-2 > summary,
  .category-branch.level-3 > summary,
  .category-branch.level-4 > summary,
  .category-branch.level-5 > summary {
    margin-left: 22px;
  }

  .category-children {
    padding-left: 10px;
  }
}

.product-category-picker-wrap {
  display: grid;
  gap: 10px;
}

.product-category-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.product-category-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  font: inherit;
}

.product-category-search input:focus {
  border-color: #8fbec6;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(31, 122, 140, .1);
}

.product-category-no-results {
  margin: 0;
}

@media (max-width: 640px) {
  .product-category-search {
    grid-template-columns: 1fr;
  }
}

/* Global modal and gallery polish */
.modal-close,
a.modal-close,
button.modal-close,
.public-popup-panel [data-popup-close] {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 999px;
  color: #0f172a;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.modal-close:hover,
a.modal-close:hover,
button.modal-close:hover,
.public-popup-panel [data-popup-close]:hover {
  color: #fff;
  border-color: var(--danger, #dc2626);
  background: var(--danger, #dc2626);
  box-shadow: 0 14px 30px rgba(220, 38, 38, .22);
  transform: translateY(-1px);
}

.modal-close:focus-visible,
a.modal-close:focus-visible,
button.modal-close:focus-visible,
.public-popup-panel [data-popup-close]:focus-visible {
  outline: 3px solid rgba(20, 184, 166, .32);
  outline-offset: 3px;
}
.modal-head .modal-close,
.modal-head a.modal-close,
.modal-head button.modal-close {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}

.app-body.app-template-dark .modal-card {
  background: #0f172a;
}

.app-body.app-template-dark .modal-head {
  background: #0f172a;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
}


.media-field {
  gap: 8px;
}

.media-picker-trigger {
  width: fit-content;
  margin-top: 4px;
}

.media-picker-card-shell {
  width: min(980px, calc(100vw - 28px));
}

.media-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.media-picker-toolbar input {
  flex: 1;
  min-width: 180px;
}

.media-picker-grid,
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.media-picker-card,
.gallery-admin-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.media-picker-card {
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.media-picker-card img,
.gallery-admin-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef4f7;
}

.media-picker-card span {
  display: block;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 800;
}

.media-picker-card:hover,
.media-picker-card:focus-visible {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 18px 34px rgba(19, 166, 160, .18);
  transform: translateY(-1px);
}

.gallery-admin-card {
  padding-bottom: 12px;
}

.gallery-admin-form {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.gallery-admin-form input[readonly] {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
}
/* Operativo fullscreen */
.operative-body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #eef8fb, #ffffff 45%, #f4f8fb);
}

.operative-shell {
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px);
}

.operative-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.operative-header h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
}

.operative-header p {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.operative-actions,
.operative-result .flow-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.operative-grid {
  display: grid;
  grid-template-columns: minmax(320px, .82fr) minmax(520px, 1.18fr);
  gap: 16px;
  align-items: start;
}

.operative-panel {
  min-height: 100%;
}

.operative-rx-table input {
  min-width: 88px;
}

.operative-submit,
.operative-result {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.operative-submit p,
.operative-result p {
  margin: 6px 0 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .operative-header,
  .operative-submit,
  .operative-result {
    display: grid;
  }

  .operative-actions,
  .operative-result .flow-actions {
    justify-content: flex-start;
  }

  .operative-grid {
    grid-template-columns: 1fr;
  }
}
.operative-wizard {
  max-width: 920px;
  margin: 0 auto;
}

.operative-step-nav {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .76);
}

.operative-step-nav button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.operative-step-nav button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 12px 24px rgba(11, 130, 196, .18);
}

.operative-step {
  grid-column: 1 / -1;
}

.operative-step-controls {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.operative-step-controls .secondary-btn {
  min-width: 150px;
}

@media (max-width: 760px) {
  .operative-shell {
    padding: 12px;
  }

  .operative-step-nav {
    position: sticky;
    top: 8px;
    z-index: 5;
  }

  .operative-step-nav button {
    min-height: 42px;
    padding: 6px;
    font-size: 12px;
  }

  .operative-panel .flow-fields,
  .operative-submit {
    grid-template-columns: 1fr;
  }
}
.media-picker-modal.is-open { z-index: 220; }
.media-picker-modal .modal-card { z-index: 221; }

/* Gallery and product media UX */
.gallery-admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, rgba(31, 122, 140, .1), #fff 55%, rgba(11, 130, 196, .08));
}

.gallery-admin-hero h2 {
  margin: 4px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
}

.gallery-admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.gallery-admin-stats article {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(31, 122, 140, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .8);
}

.gallery-admin-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.gallery-admin-stats strong {
  color: var(--accent);
  font-size: 28px;
}

.gallery-admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(360px, 1.18fr);
  gap: 16px;
  margin-bottom: 16px;
}

.gallery-upload-form,
.gallery-filter-form {
  display: grid;
  gap: 12px;
}

.gallery-filter-form {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .7fr) auto auto;
  align-items: end;
}

.gallery-drop-zone {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px dashed rgba(31, 122, 140, .42);
  border-radius: 12px;
  background: rgba(31, 122, 140, .06);
}

.gallery-drop-zone span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.gallery-admin-grid-modern {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  align-items: start;
}

.gallery-admin-card-modern {
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

.gallery-admin-image-wrap {
  position: relative;
  overflow: hidden;
  background: #eef4f7;
}

.gallery-admin-image-wrap img {
  display: block;
  height: 180px;
}

.gallery-usage-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .14);
  font-size: 12px;
  font-weight: 900;
}

.gallery-usage-badge.success { color: #0f766e; }
.gallery-usage-badge.muted { color: var(--muted); }

.gallery-admin-form .danger-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.gallery-pagination {
  margin: 16px 0 0;
}

.media-picker-card-shell {
  width: min(1100px, calc(100vw - 28px));
}

.media-picker-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.media-picker-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.media-picker-help {
  margin: -6px 0 12px;
}

.media-picker-card {
  position: relative;
}

.media-picker-card small {
  display: block;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.media-picker-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 122, 140, .14), 0 18px 34px rgba(19, 166, 160, .18);
}

.media-picker-card.is-selected::after {
  content: "Seleccionada";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.product-gallery-selector {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(31, 122, 140, .18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(31, 122, 140, .08), #fff);
}

.gallery-selection-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.gallery-selected-preview {
  min-height: 82px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.gallery-selected-chip {
  display: grid;
  grid-template-columns: 54px minmax(90px, 1fr) 30px;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .07);
}

.gallery-selected-chip img {
  width: 54px;
  height: 42px;
  object-fit: cover;
  border-radius: 7px;
  background: #eef4f7;
}

.gallery-selected-chip strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-selected-chip > .gallery-selection-remove {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}

.gallery-selected-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.gallery-primary-toggle {
  width: max-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
}

.gallery-primary-toggle span {
  color: #d99b16;
  font-size: 17px;
  line-height: 1;
  vertical-align: -1px;
}

.gallery-selected-chip.is-primary {
  border-color: rgba(217, 155, 22, .62);
  box-shadow: 0 0 0 3px rgba(217, 155, 22, .12), 0 10px 22px rgba(15, 23, 42, .07);
}

.product-gallery-selection {
  align-items: stretch;
}

.product-gallery-selection .gallery-selected-chip {
  width: min(100%, 300px);
  max-width: 300px;
}

.product-image-preview {
  display: grid;
  gap: 6px;
  align-content: start;
}

.product-image-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .gallery-admin-hero,
  .gallery-admin-layout,
  .gallery-filter-form {
    grid-template-columns: 1fr;
  }

  .gallery-admin-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .gallery-admin-stats {
    grid-template-columns: 1fr;
  }

  .media-picker-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .gallery-selected-chip {
    max-width: 100%;
    width: 100%;
  }
}

/* Public web carousel administration */
.public-carousel-admin-field {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(31, 122, 140, .16);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(31, 122, 140, .07), #fff);
}

.public-carousel-admin-field strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.public-carousel-admin-field small {
  color: var(--muted);
  font-weight: 800;
}

.public-carousel-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.public-carousel-preview figure {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .07);
}

.public-carousel-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef4f7;
}

.public-carousel-preview figcaption {
  overflow: hidden;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Internal system visual templates */
.app-body.app-template-clinical,
.login-body.app-template-clinical {
  --accent: #1f7a8c;
  --accent-dark: #155e6d;
  --ink: #17202a;
  --muted: #6f7a87;
  --line: #dde4eb;
  --panel: #ffffff;
  --field: #f8fafc;
}

.app-body.app-template-compact {
  grid-template-columns: 238px 1fr;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --line: #d7dee6;
  background: #f3f6f7;
}
.app-body.app-template-compact.sidebar-collapsed { grid-template-columns: 72px 1fr; }
.app-body.app-template-compact .sidebar { padding: 10px; }
.app-body.app-template-compact .sidebar-logo img { width: 32px; height: 32px; }
.app-body.app-template-compact .side-nav a { min-height: 38px; padding: 6px 8px; border-radius: 8px; font-size: 12px; }
.app-body.app-template-compact .nav-icon { width: 28px; height: 28px; }
.app-body.app-template-compact .app-main { padding: 18px; }
.app-body.app-template-compact .topbar { padding-bottom: 12px; }
.app-body.app-template-compact .topbar h1 { font-size: 23px; }
.app-body.app-template-compact .panel,
.app-body.app-template-compact .stat-card { border-radius: 8px; }
.app-body.app-template-compact table th,
.app-body.app-template-compact table td { padding: 8px 10px; font-size: 12px; }
.login-body.app-template-compact .login-shell { gap: 18px; padding: 18px; }
.login-body.app-template-compact .brand-card,
.login-body.app-template-compact .form-card { border-radius: 14px; }

.app-body.app-template-dark,
.login-body.app-template-dark {
  --ink: #e5edf6;
  --muted: #9fb0c3;
  --line: rgba(255,255,255,.12);
  --panel: #111827;
  --field: #0f172a;
  --accent: #22d3ee;
  --accent-dark: #67e8f9;
  background: radial-gradient(circle at top left, rgba(34,211,238,.14), transparent 34%), #070b14;
  color: #e5edf6;
}
.app-body.app-template-dark .sidebar,
.app-body.app-template-dark .topbar-user,
.app-body.app-template-dark .panel,
.app-body.app-template-dark .stat-card,
.app-body.app-template-dark .chat-panel,
.app-body.app-template-dark .modal-card,
.login-body.app-template-dark .form-card,
.login-body.app-template-dark .brand-card {
  color: #e5edf6;
  border-color: rgba(255,255,255,.12);
  background: rgba(15,23,42,.92);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.app-body.app-template-dark .sidebar { border-right-color: rgba(255,255,255,.12); }
.app-body.app-template-dark .sidebar-logo,
.app-body.app-template-dark .sidebar-logo span,
.app-body.app-template-dark .topbar h1,
.app-body.app-template-dark .panel h2,
.app-body.app-template-dark strong,
.app-body.app-template-dark table th,
.login-body.app-template-dark .form-heading h2,
.login-body.app-template-dark .brand-copy h1 { color: #f8fafc; }
.app-body.app-template-dark .side-nav a { color: #b8c7d9; }
.app-body.app-template-dark .side-nav a:hover,
.app-body.app-template-dark .side-nav a.active { color: #08111f; background: var(--accent); }
.app-body.app-template-dark .nav-icon { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.app-body.app-template-dark .side-nav a.active .nav-icon { color: #08111f; background: rgba(255,255,255,.55); }
.app-body.app-template-dark input,
.app-body.app-template-dark select,
.app-body.app-template-dark textarea,
.login-body.app-template-dark input { color: #e5edf6; border-color: rgba(255,255,255,.14); background: #0b1220; }
.app-body.app-template-dark table td { color: #d8e2ee; border-color: rgba(255,255,255,.08); }
.app-body.app-template-dark tbody tr:hover td { background: rgba(34,211,238,.08); }
.login-body.app-template-dark .brand-panel { background: linear-gradient(135deg, #07111f, #0f172a); }
.login-body.app-template-dark { background: #070b14; }

.app-body.app-template-boutique,
.login-body.app-template-boutique {
  --ink: #261719;
  --muted: #7b6265;
  --line: #ead8d1;
  --panel: #fffaf7;
  --field: #fff5ef;
  --accent: #9f2d4a;
  --accent-dark: #7f1d3a;
  background: linear-gradient(90deg, rgba(159,45,74,.055) 1px, transparent 1px), #fff8f3;
  background-size: 58px 58px;
}
.app-body.app-template-boutique .sidebar,
.app-body.app-template-boutique .panel,
.app-body.app-template-boutique .stat-card,
.app-body.app-template-boutique .topbar-user,
.login-body.app-template-boutique .form-card,
.login-body.app-template-boutique .brand-card {
  border-color: #ead8d1;
  border-radius: 0;
  background: #fffdf9;
  box-shadow: 12px 12px 0 rgba(159,45,74,.08);
}
.app-body.app-template-boutique .topbar h1,
.login-body.app-template-boutique .form-heading h2,
.login-body.app-template-boutique .brand-copy h1 {
  font-family: Georgia, "Times New Roman", serif;
  color: #261719;
}
.app-body.app-template-boutique .side-nav a { border-radius: 0; }
.app-body.app-template-boutique .side-nav a.active { color: #fff; border-color: var(--accent); background: var(--accent); }
.app-body.app-template-boutique .primary-btn,
.app-body.app-template-boutique .primary-link,
.login-body.app-template-boutique .login-button { border-radius: 0; background: var(--accent); }
.login-body.app-template-boutique .brand-panel { background: #fff8f3; }

.app-body.app-template-contrast,
.login-body.app-template-contrast {
  --ink: #020617;
  --muted: #1f2937;
  --line: #111827;
  --panel: #ffffff;
  --field: #ffffff;
  --accent: #000000;
  --accent-dark: #000000;
  background: #ffffff;
  color: #020617;
}
.app-body.app-template-contrast .sidebar,
.app-body.app-template-contrast .panel,
.app-body.app-template-contrast .stat-card,
.app-body.app-template-contrast .topbar-user,
.login-body.app-template-contrast .form-card,
.login-body.app-template-contrast .brand-card {
  border: 2px solid #111827;
  border-radius: 4px;
  box-shadow: none;
}
.app-body.app-template-contrast .side-nav a { color: #020617; border: 2px solid transparent; }
.app-body.app-template-contrast .side-nav a.active,
.app-body.app-template-contrast .side-nav a:hover { color: #fff; background: #000; border-color: #000; }
.app-body.app-template-contrast .primary-btn,
.app-body.app-template-contrast .primary-link,
.login-body.app-template-contrast .login-button { color: #fff; background: #000; box-shadow: none; }
.app-body.app-template-contrast input,
.app-body.app-template-contrast select,
.app-body.app-template-contrast textarea,
.login-body.app-template-contrast input { border: 2px solid #111827; }

@media (max-width: 900px) {
  .app-body.app-template-compact,
  .app-body.app-template-compact.sidebar-collapsed {
    grid-template-columns: 1fr;
  }
}

/* Maintainer shortcuts in general configuration */
.maintainer-quick-panel {
  background: linear-gradient(135deg, rgba(31, 122, 140, .08), #fff 58%, rgba(11, 130, 196, .06));
}

.maintainer-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.maintainer-quick-grid a {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 16px;
  border: 1px solid rgba(31, 122, 140, .16);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, .86);
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .07);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.maintainer-quick-grid a:hover,
.maintainer-quick-grid a:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 16px 34px rgba(31, 122, 140, .14);
  transform: translateY(-2px);
  outline: none;
}

.maintainer-quick-grid strong {
  color: var(--accent-dark);
  font-size: 16px;
}

.maintainer-quick-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.operative-active-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  border-color: rgba(31, 122, 140, .22);
  background: linear-gradient(135deg, rgba(31, 122, 140, .1), #fff 58%, rgba(19, 166, 160, .12));
}

.operative-active-banner h2 {
  margin: 3px 0 5px;
  font-size: clamp(22px, 3vw, 34px);
}

.operative-active-banner p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.operative-active-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 16px 32px rgba(31, 122, 140, .2);
  font-weight: 1000;
  letter-spacing: .08em;
}

@media (max-width: 760px) {
  .operative-active-banner {
    grid-template-columns: 1fr;
  }

  .operative-active-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
}
/* Report builder */
.report-builder-hero,
.report-run-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, rgba(31, 122, 140, .09), #fff 58%, rgba(11, 130, 196, .07));
}

.report-builder-hero h2,
.report-run-hero h2 {
  margin: 4px 0 8px;
  font-size: clamp(26px, 3vw, 38px);
}

.report-source-grid,
.report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.report-source-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.report-source-card .secondary-link {
  grid-column: 1 / -1;
  justify-self: start;
}

.report-source-card strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.report-source-card small {
  color: var(--muted);
  font-weight: 800;
}

.report-builder-modal {
  width: min(1120px, 100%);
}

.report-builder-form {
  display: grid;
  gap: 18px;
}

.report-builder-source {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(31, 122, 140, .16);
  border-radius: 12px;
  background: #f8fbfc;
}

.report-builder-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.report-builder-section-title h3 {
  margin: 0;
}

.report-builder-section-title small {
  color: var(--muted);
  font-weight: 800;
}

.report-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 9px;
}

.report-check-grid label,
.report-sort-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 850;
}

.report-check-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.report-sort-field {
  max-width: 360px;
  display: grid;
  align-items: start;
}

.report-result-table table {
  min-width: 900px;
}

@media (max-width: 760px) {
  .report-builder-hero,
  .report-run-hero,
  .report-builder-section-title {
    display: grid;
  }
}
/* Maintainer hub polish */
.maintainer-quick-panel {
  border-color: rgba(31, 122, 140, .18);
  background: linear-gradient(135deg, rgba(31, 122, 140, .09), #fff 52%, rgba(11, 130, 196, .07));
}

.maintainer-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.maintainer-quick-grid a {
  min-height: 132px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid rgba(31, 122, 140, .16);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.maintainer-quick-grid a:hover,
.maintainer-quick-grid a:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 18px 38px rgba(31, 122, 140, .16);
  transform: translateY(-2px);
  outline: none;
}

.maintainer-quick-icon {
  width: 42px;
  height: 42px;
  grid-row: span 2;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent-dark);
  background: rgba(31, 122, 140, .1);
}

.maintainer-quick-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.maintainer-quick-grid strong {
  align-self: end;
  color: var(--accent-dark);
  font-size: 16px;
  line-height: 1.2;
}

.maintainer-quick-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.maintainer-page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, rgba(31, 122, 140, .09), #fff 58%, rgba(19, 166, 160, .08));
}

.maintainer-page-hero h2 {
  margin: 4px 0 8px;
  font-size: clamp(26px, 3vw, 38px);
}

.maintainer-table-panel {
  box-shadow: 0 18px 42px rgba(15, 23, 42, .07);
}

@media (max-width: 760px) {
  .maintainer-page-hero {
    display: grid;
  }
}
.operative-step-help {
  margin: -4px 0 16px;
  padding: 11px 13px;
  border: 1px solid rgba(31, 122, 140, .16);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(31, 122, 140, .07);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.operative-wizard:not(.is-ready) [data-operative-step]:first-of-type {
  display: block;
}

.operative-wizard.is-ready [data-operative-step][hidden] {
  display: none !important;
}

.operative-rx-table input:required,
.operative-panel input:required,
.operative-panel select:required {
  border-color: rgba(31, 122, 140, .34);
  background: #fbfefe;
}
.operative-commercial-panel {
  margin-bottom: 16px;
  border-color: rgba(31, 122, 140, .18);
  background: linear-gradient(135deg, rgba(31, 122, 140, .08), #fff 58%, rgba(19, 166, 160, .07));
}

.operative-rut-form {
  margin-bottom: 14px;
}

.operative-commercial-result,
.operative-recipe-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.operative-commercial-result strong,
.operative-recipe-list strong {
  display: block;
  color: var(--ink);
}

.operative-commercial-result small,
.operative-recipe-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.operative-recipe-list {
  display: grid;
  gap: 10px;
}

.gallery-admin-modal.is-open {
  z-index: 240;
}

.gallery-admin-iframe-shell {
  width: min(1280px, 100%);
  height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
}

.gallery-admin-iframe-shell iframe {
  width: 100%;
  min-height: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.gallery-embed-body {
  margin: 0;
  min-height: 100vh;
  background: #f6f8fb;
  overflow-x: hidden;
}

.gallery-embed-main {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.gallery-embed-main .gallery-admin-hero {
  margin-top: 0;
}

.gallery-embed-main .gallery-admin-grid-modern {
  padding-bottom: 18px;
}

.gallery-embed-main .flash {
  margin: 0 0 12px;
}
@media (max-width: 760px) {
  .operative-commercial-result,
  .operative-recipe-list article {
    display: grid;
  }
}
.operative-share-url {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(31, 122, 140, .2);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.public-prereg-shell {
  max-width: 860px;
}

.public-prereg-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

[data-operative-autofill-status] {
  min-height: 18px;
  margin: -4px 0 0;
}

@media (max-width: 760px) {
  .public-prereg-form {
    grid-template-columns: 1fr;
  }
}
.db-setup-body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, rgba(31, 122, 140, .12), #f8fafc 42%, rgba(19, 166, 160, .12));
  display: grid;
  place-items: center;
  padding: 28px;
}

.db-setup-shell {
  width: min(980px, 100%);
}

.db-setup-card {
  box-shadow: 0 22px 60px rgba(15, 23, 42, .12);
}

.db-setup-card h1 {
  margin: 2px 0 0;
  font-size: clamp(24px, 3vw, 34px);
}

.db-setup-form {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .db-setup-body {
    padding: 14px;
    place-items: start center;
  }

  .db-setup-form .span-2 {
    grid-column: auto;
  }
}
.maintainer-home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, rgba(31, 122, 140, .1), #fff 56%, rgba(19, 166, 160, .08));
}

.maintainer-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.maintainer-home-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px 14px;
  align-items: center;
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.maintainer-home-card:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 122, 140, .35);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .1);
}

.maintainer-home-card .maintainer-quick-icon {
  grid-row: span 2;
}

.maintainer-home-card strong {
  font-size: 16px;
}

.maintainer-home-card small {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .maintainer-home-hero {
    display: grid;
  }

  .maintainer-home-card {
    grid-template-columns: 42px 1fr;
    min-height: auto;
  }
}
.operative-config-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, rgba(31, 122, 140, .1), #fff 58%, rgba(19, 166, 160, .08));
}

.operative-config-stats {
  grid-template-columns: repeat(4, minmax(110px, 1fr));
}

.operative-admin-panel .panel-title-row {
  align-items: flex-start;
}

.operative-event-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.operative-event-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.operative-event-main {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.operative-event-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.operative-event-title-row h3 {
  margin: 0;
  font-size: 18px;
}

.operative-event-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.operative-event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.operative-event-tags span {
  padding: 6px 10px;
  border: 1px solid rgba(31, 122, 140, .16);
  border-radius: 999px;
  background: rgba(31, 122, 140, .06);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.operative-prereg-box {
  display: grid;
  grid-template-columns: 150px minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(31, 122, 140, .16);
  border-radius: 12px;
  background: #f8fafc;
}

.operative-prereg-count {
  display: grid;
  gap: 4px;
}

.operative-prereg-count span,
.operative-prereg-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.operative-prereg-count strong {
  color: var(--primary);
  font-size: 34px;
  line-height: 1;
}

.operative-prereg-link input {
  margin-top: 6px;
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.operative-prereg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .operative-config-hero,
  .operative-event-main,
  .operative-prereg-box {
    grid-template-columns: 1fr;
    display: grid;
  }

  .operative-config-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operative-event-main .secondary-link,
  .operative-prereg-actions {
    justify-content: flex-start;
  }
}
.operative-client-summary,
.operative-recipe-reuse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(31, 122, 140, .18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(31, 122, 140, .08), #fff);
}

.operative-client-summary[hidden],
.operative-client-fields[hidden],
.operative-recipe-reuse[hidden] {
  display: none !important;
}

.operative-client-summary div,
.operative-recipe-reuse div {
  display: grid;
  gap: 3px;
}

.operative-client-summary span,
.operative-recipe-reuse span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.operative-client-summary strong,
.operative-recipe-reuse strong {
  color: var(--ink);
  font-size: 16px;
}

.operative-client-summary small,
.operative-recipe-reuse small {
  color: var(--muted);
  font-weight: 700;
}

.operative-client-fields {
  padding: 12px;
  border: 1px dashed rgba(31, 122, 140, .24);
  border-radius: 12px;
  background: #f8fafc;
}

@media (max-width: 760px) {
  .operative-client-summary,
  .operative-recipe-reuse {
    display: grid;
  }
}
.operative-config-hero-polished {
  position: relative;
  overflow: hidden;
  align-items: stretch;
  padding: 24px;
  border-color: rgba(31, 122, 140, .18);
  background:
    radial-gradient(circle at 8% 12%, rgba(31, 122, 140, .16), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 52%, rgba(19, 166, 160, .12) 100%);
}

.operative-config-hero-polished::after {
  content: "OP";
  position: absolute;
  right: 24px;
  bottom: -22px;
  color: rgba(31, 122, 140, .07);
  font-size: 116px;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
}

.operative-config-hero-polished > div:first-child {
  max-width: 620px;
  z-index: 1;
}

.operative-config-hero-polished h2 {
  margin: 4px 0 8px;
  font-size: clamp(24px, 3vw, 34px);
}

.operative-config-hero-polished .empty-state {
  max-width: 560px;
  margin: 0;
  line-height: 1.55;
}

.operative-config-stats-polished {
  position: relative;
  z-index: 1;
  min-width: min(520px, 100%);
  align-self: center;
}

.operative-config-stats-polished article {
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(31, 122, 140, .16);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.operative-admin-panel-polished {
  padding: 22px;
}

.operative-admin-panel-polished .panel-title-row {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.operative-event-list-polished {
  gap: 18px;
}

.operative-event-card-polished {
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 23, 42, .09);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 14px 36px rgba(15, 23, 42, .07);
}

.operative-event-card-polished::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.operative-event-card-polished .status-admin-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(31, 122, 140, .18);
}

.operative-event-card-polished .secondary-link,
.operative-event-card-polished .primary-link,
.operative-event-card-polished .secondary-btn {
  white-space: nowrap;
}

.operative-prereg-box-polished {
  border-color: rgba(31, 122, 140, .18);
  background:
    linear-gradient(135deg, rgba(31, 122, 140, .07), rgba(255, 255, 255, .9)),
    #f8fafc;
}

.operative-prereg-box-polished .operative-prereg-count {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
}

.operative-prereg-box-polished .operative-prereg-link input {
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .03);
}

.operative-prereg-box-polished .operative-prereg-actions .primary-link,
.operative-prereg-box-polished .operative-prereg-actions .secondary-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 980px) {
  .operative-config-hero-polished {
    display: grid;
  }

  .operative-config-stats-polished {
    min-width: 0;
  }
}
.operative-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .operative-event-actions {
    justify-content: flex-start;
  }
}
.public-prereg-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.public-prereg-brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}
.operative-filter-form {
  grid-template-columns: minmax(220px, 1fr) minmax(140px, .55fr) minmax(150px, .65fr) minmax(150px, .65fr) auto auto;
  margin: 18px 0 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.operative-recipe-actions {
  display: flex !important;
  grid-template-columns: none !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px !important;
}

.operative-recipe-actions .primary-btn,
.operative-recipe-actions .secondary-btn {
  width: auto;
  min-height: 42px;
}

@media (max-width: 980px) {
  .operative-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .operative-filter-form {
    grid-template-columns: 1fr;
  }

  .operative-recipe-actions {
    justify-content: stretch;
  }

  .operative-recipe-actions .primary-btn,
  .operative-recipe-actions .secondary-btn {
    width: 100%;
  }
}
.template-color-value {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
}

.template-color-value i {
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 8px;
  background: var(--template-swatch);
  box-shadow: 0 0 0 1px var(--line);
}

.template-color-editor {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field, #f8fafc);
}

.template-color-editor input[type="color"] {
  width: 76px;
  height: 42px;
  min-height: 42px;
  padding: 3px;
  cursor: pointer;
}

.template-color-editor output {
  color: var(--ink);
  font-family: Consolas, monospace;
  font-size: 16px;
  font-weight: 900;
}
.quote-section-heading {
  align-items: flex-start;
  margin-bottom: 16px;
}

.quote-section-heading > div:first-child {
  min-width: 0;
}

.quote-qr-toolbar {
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.quote-qr-toolbar input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--field, #fff);
  font: inherit;
}

.quote-qr-toolbar .secondary-btn {
  width: auto;
  min-height: 42px;
  white-space: nowrap;
}

.quote-qr-toolbar small {
  grid-column: 1 / -1;
  min-height: 18px;
  color: var(--muted);
  font-weight: 800;
}

.quote-qr-toolbar small.success { color: #087f5b; }
.quote-qr-toolbar small.error { color: #b42318; }

.quote-qr-icon {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  margin-right: 5px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0;
}

.quote-qr-overlay { z-index: 280; }
.quote-qr-card { width: min(620px, 100%); }

.quote-qr-camera-frame {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #08111f;
}

.quote-qr-camera-frame video {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.quote-qr-camera-guide {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(62%, 250px);
  aspect-ratio: 1;
  border: 3px solid #fff;
  border-radius: 8px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .28);
  pointer-events: none;
}

.quote-qr-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0;
}

.quote-qr-manual label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.quote-qr-manual input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--field, #fff);
  font: inherit;
}

@media (max-width: 760px) {
  .quote-section-heading,
  .quote-qr-toolbar,
  .quote-qr-manual {
    grid-template-columns: 1fr;
  }

  .quote-qr-toolbar { width: 100%; }
  .quote-qr-toolbar .secondary-btn,
  .quote-qr-manual .primary-btn { width: 100%; }
  .quote-qr-camera-frame video { height: 300px; }
}
/* Operativo: interfaz tactil independiente para tablet y telefono */
.operative-field-app {
  min-height: 100dvh;
  background: #edf4f5;
  color: #102a33;
}
.operative-field-app .operative-shell {
  width: min(1180px, 100%);
  padding: clamp(12px, 2vw, 24px);
  padding-bottom: 104px;
}
.operative-field-app .operative-header {
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid #d3e2e5;
  border-radius: 8px;
  background: #fff;
}
.operative-field-app .operative-header h1 {
  margin-top: 2px;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: 0;
}
.operative-field-app .operative-header p {
  max-width: 700px;
  margin-top: 5px;
  font-size: 14px;
}
.operative-field-app .operative-actions > * {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.operative-field-app .operative-wizard {
  max-width: 1040px;
}
.operative-field-app .operative-step-nav {
  position: sticky;
  top: 8px;
  z-index: 20;
  gap: 5px;
  margin: 0 0 12px;
  padding: 5px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 42, 51, .08);
}
.operative-field-app .operative-step-nav button {
  min-height: 42px;
  border-radius: 6px;
  font-size: 13px;
}
.operative-field-app .operative-step-nav button.active {
  background: #087f8c;
  box-shadow: none;
}
.operative-field-app .operative-panel,
.operative-field-app .operative-submit,
.operative-field-app .operative-result {
  border: 1px solid #d3e2e5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 42, 51, .07);
}
.operative-field-app .operative-panel {
  padding: clamp(16px, 2.5vw, 28px);
}
.operative-field-app .operative-panel > h2 {
  margin-top: 0;
  font-size: clamp(21px, 2.5vw, 28px);
}
.operative-field-app .flow-fields {
  gap: 14px;
}
.operative-field-app label {
  gap: 7px;
  font-size: 13px;
}
.operative-field-app input,
.operative-field-app select,
.operative-field-app textarea {
  min-height: 48px;
  font-size: 16px;
}
.operative-field-app textarea {
  min-height: 82px;
}
.operative-field-app [data-operative-rut] {
  min-height: 58px;
  border-width: 2px;
  font-size: 20px;
  font-weight: 900;
}
.operative-field-app .operative-client-summary {
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #9cd5cb;
  border-radius: 8px;
  background: #effaf7;
}
.operative-client-summary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.operative-disclosure {
  border: 1px solid #d8e4e7;
  border-radius: 8px;
  background: #f9fbfc;
  overflow: clip;
}
.operative-disclosure summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  color: #153b44;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}
.operative-disclosure summary::-webkit-details-marker { display: none; }
.operative-disclosure summary::after {
  content: '+';
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #087f8c;
  background: #e3f3f2;
  font-size: 20px;
}
.operative-disclosure[open] summary::after { content: '-'; }
.operative-disclosure summary small {
  margin-left: auto;
  color: #647b82;
  font-size: 12px;
}
.operative-disclosure-content {
  padding: 15px;
  border-top: 1px solid #d8e4e7;
  background: #fff;
}
.operative-recipe-details { margin-top: 14px; }
.operative-field-app .operative-rx-table {
  margin: 16px 0;
}
.operative-field-app .operative-rx-table input {
  width: 100%;
  min-width: 72px;
  min-height: 46px;
}
.operative-field-app .operative-step-controls {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 50;
  width: min(1000px, calc(100% - 24px));
  min-height: 66px;
  align-items: center;
  padding: 9px;
  border: 1px solid #cadcdf;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 40px rgba(16, 42, 51, .18);
  transform: translateX(-50%);
}
.operative-field-app .operative-step-controls button {
  min-width: 132px;
  min-height: 48px;
  font-size: 15px;
}
.operative-field-app .operative-step-controls [data-operative-next] {
  margin-left: auto;
  color: #fff;
  border-color: #087f8c;
  background: #087f8c;
}
.operative-quote-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  grid-template-rows: 62px minmax(0, 1fr);
  background: #fff;
}
.operative-quote-modal.is-open { display: grid; }
.operative-quote-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px clamp(12px, 2vw, 24px);
  border-bottom: 1px solid #d6e2e5;
  background: #fff;
  box-shadow: 0 5px 18px rgba(16, 42, 51, .08);
}
.operative-quote-toolbar strong { display: block; font-size: 18px; }
.operative-quote-toolbar .modal-close {
  position: static;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}
.operative-quote-modal iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #f6f9fa;
}
.operative-modal-open { overflow: hidden; }
.operative-toast {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 520;
  max-width: min(390px, calc(100% - 36px));
  padding: 14px 18px;
  border-radius: 8px;
  color: #fff;
  background: #087f66;
  box-shadow: 0 12px 30px rgba(16, 42, 51, .2);
  font-weight: 850;
}

/* Modulos abiertos dentro de Operativo */
.embedded-module {
  display: block;
  min-height: 100dvh;
  background: #f4f8f9;
}
.embedded-module .sidebar,
.embedded-module .topbar,
.embedded-module .system-footer,
.embedded-module .chat-widget,
.embedded-module .chat-toggle { display: none !important; }
.embedded-module .app-main {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
}
.embedded-module #quoteModal {
  inset: 0;
  padding: 0;
  background: #f4f8f9;
  backdrop-filter: none;
}
.embedded-module #quoteModal > .quote-card {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.embedded-module #quoteModal > .quote-card > .modal-head { display: none; }

@media (min-width: 780px) {
  .operative-field-app .operative-step.is-active .flow-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .operative-field-app .operative-shell {
    padding: 8px;
    padding-bottom: 96px;
  }
  .operative-field-app .operative-header {
    display: grid;
    padding: 12px;
  }
  .operative-field-app .operative-header p { display: none; }
  .operative-field-app .operative-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .operative-field-app .operative-actions > * {
    width: 100%;
    padding-inline: 8px;
  }
  .operative-field-app .operative-step-nav {
    top: 4px;
  }
  .operative-field-app .operative-step-nav button {
    min-height: 40px;
    padding: 5px 3px;
    font-size: 11px;
  }
  .operative-field-app .operative-panel { padding: 14px; }
  .operative-field-app .operative-step-help {
    margin-bottom: 12px;
    padding: 9px 10px;
  }
  .operative-field-app .operative-client-summary,
  .operative-field-app .operative-result,
  .operative-field-app .operative-submit {
    display: grid;
  }
  .operative-client-summary-actions { justify-content: stretch; }
  .operative-client-summary-actions > * { width: 100%; }
  .operative-disclosure summary small { display: none; }
  .operative-field-app .operative-rx-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }
  .operative-field-app .operative-rx-table input { min-width: 64px; }
  .operative-field-app .operative-step-controls {
    bottom: max(6px, env(safe-area-inset-bottom));
    width: calc(100% - 12px);
    min-height: 62px;
    padding: 7px;
  }
  .operative-field-app .operative-step-controls button {
    min-width: 112px;
    min-height: 46px;
  }
  .operative-quote-modal { grid-template-rows: 56px minmax(0, 1fr); }
  .operative-quote-toolbar { padding: 6px 10px; }
  .operative-quote-toolbar .modal-close {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
  .embedded-module .quote-card { padding: 10px; }
}
.operative-field-app .operative-client-summary .operative-client-summary-actions { display: flex; }
@media (max-width: 760px) { .operative-field-app .operative-client-summary .operative-client-summary-actions { display: grid; } }

/* Marco asociado dentro de cada solucion optica */
.quote-solution-frame {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #b9d9dd;
  border-radius: 8px;
  background: #f4fafb;
}
.quote-solution-frame-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quote-solution-frame-head strong,
.quote-solution-frame-head small { display: block; }
.quote-solution-frame-head small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 750;
}
.quote-solution-frame-picker {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}
.quote-solution-frame-picker .quote-frame-preview {
  width: 116px;
  height: 82px;
  margin: 0;
  object-fit: contain;
  background: #fff;
}
.quote-solution-frame-picker label { min-width: 0; }
.quote-solution-qr-toolbar {
  width: 100%;
  padding-top: 11px;
  border-top: 1px solid #d5e6e8;
}
@media (max-width: 620px) {
  .quote-solution-frame-head { align-items: flex-start; }
  .quote-solution-frame-picker { grid-template-columns: 78px minmax(0, 1fr); }
  .quote-solution-frame-picker .quote-frame-preview {
    width: 78px;
    height: 68px;
  }
  .quote-solution-qr-toolbar { grid-template-columns: 1fr; }
  .quote-solution-qr-toolbar .secondary-btn { width: 100%; }
}
.operative-submit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.operative-submit-actions > * { min-height: 48px; }
@media (max-width: 620px) {
  .operative-submit-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .operative-submit-actions > * { width: 100%; }
}
/* Navegacion unificada de mantenedores */
.maintainer-global-nav {
  position: sticky;
  top: 0;
  z-index: 55;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
}
.maintainer-global-nav-label {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  color: var(--ink);
  white-space: nowrap;
}
.maintainer-global-nav-label .nav-icon,
.maintainer-nav-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
}
.maintainer-global-nav-label svg,
.maintainer-nav-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.maintainer-global-nav-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 2px 5px;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}
.config-submodule-nav.maintainer-global-nav a {
  min-height: 40px;
  flex: 0 0 auto;
  gap: 7px;
  padding: 8px 11px;
  white-space: nowrap;
}
.config-submodule-nav.maintainer-global-nav a.active {
  border-color: #167985;
  color: #fff;
  background: #167985;
  box-shadow: 0 7px 16px rgba(22, 121, 133, .2);
}

/* Catalogos generales como botones reales */
.maintainer-layout {
  display: grid;
  grid-template-columns: minmax(245px, 290px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.maintainer-tabs {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 8px;
  max-height: calc(100dvh - 100px);
  padding: 13px;
  overflow-y: auto;
}
.maintainer-tabs h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.maintainer-tabs a {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fbfc;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.maintainer-tabs a strong {
  font-size: 13px;
  line-height: 1.25;
}
.maintainer-tabs a small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.maintainer-tabs a:hover,
.maintainer-tabs a:focus-visible {
  border-color: rgba(22, 121, 133, .45);
  background: #eef8f9;
  box-shadow: 0 7px 16px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}
.maintainer-tabs a.active {
  border-color: #167985;
  color: #0f5962;
  background: #e5f4f5;
  box-shadow: inset 4px 0 #167985;
}
.maintainer-tabs a.active small { color: #35727a; }
.maintainer-board { min-width: 0; }

@media (max-width: 980px) {
  .maintainer-global-nav { grid-template-columns: 1fr; }
  .maintainer-global-nav-label { display: none; }
  .maintainer-layout { grid-template-columns: 1fr; }
  .maintainer-tabs {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
  .maintainer-tabs h2 { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .maintainer-global-nav {
    top: 0;
    margin-bottom: 12px;
    padding: 7px;
  }
  .config-submodule-nav.maintainer-global-nav a {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 12px;
  }
  .maintainer-tabs { grid-template-columns: 1fr; }
}
/* Configuracion fisica de etiquetas */
.label-config-panel { scroll-margin-top: 18px; }
.label-config-form { display: grid; gap: 16px; }
.label-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.label-config-grid fieldset {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 11px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
}
.label-config-grid legend {
  padding: 0 7px;
  color: var(--ink);
  font-weight: 900;
}
.label-config-grid label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}
.label-config-grid input,
.label-config-grid select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
.label-config-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.label-config-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.label-config-checks label {
  min-height: 40px;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.label-config-checks input { width: 18px; min-height: 18px; }
.label-size-badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 7px;
  color: #11616b;
  background: #e8f5f6;
  font-weight: 900;
}
.label-preview-panel .label-sheet {
  grid-template-columns: repeat(var(--label-columns, 1), var(--label-width, 75mm));
  gap: var(--label-gap-y, 0mm) var(--label-gap-x, 0mm);
  justify-content: start;
  overflow: auto;
}
.label-preview-panel .product-label {
  width: var(--label-width, 75mm);
  height: var(--label-height, 30mm);
  grid-template-columns: var(--label-left, 15mm) var(--label-neck, 45mm) var(--label-right, 15mm);
}
.label-preview-panel .product-label-half {
  padding: var(--label-padding, 1mm);
  border-color: var(--label-border, #111827);
}
.label-preview-panel .product-label-neck {
  height: max(5mm, calc(var(--label-height, 30mm) * .25));
  border-color: var(--label-border, #111827);
}
.label-preview-panel .product-label-info span { font-size: var(--label-code-font, 8pt); }
.label-preview-panel .product-label-info small { font-size: var(--label-price-font, 8pt); }
.label-preview-panel .product-label-qr small { font-size: var(--label-qr-font, 5pt); }
.label-preview-panel .product-label img { width: var(--label-qr, 11mm); }

@media print {
  .label-config-panel { display: none !important; }
  .label-preview-panel .label-sheet {
    display: grid;
    grid-template-columns: repeat(var(--label-columns, 1), var(--label-width, 75mm));
    gap: var(--label-gap-y, 0mm) var(--label-gap-x, 0mm);
    width: max-content;
    margin: var(--label-offset-y, 0mm) 0 0 var(--label-offset-x, 0mm);
    overflow: visible;
  }
  .label-preview-panel .product-label {
    width: var(--label-width, 75mm);
    height: var(--label-height, 30mm);
  }
}
@media (max-width: 820px) {
  .label-config-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .label-config-fields { grid-template-columns: 1fr; }
}
/* Columna de acciones del listado de recetas */
.recipes-list-panel { min-width: 0; }
.recipes-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  padding-bottom: 150px;
  scrollbar-gutter: stable;
}
.recipes-table {
  min-width: 1160px;
}
.recipes-table th:nth-child(9) {
  width: 130px;
}
.recipes-table th:nth-child(10) {
  width: 122px;
}
.recipes-table td:nth-child(9) {
  overflow: hidden;
  white-space: normal;
  text-overflow: ellipsis;
}
.recipes-table th:nth-child(10),
.recipes-table td:nth-child(10) {
  position: relative;
  overflow: visible;
  text-align: right;
  white-space: nowrap;
}
.recipes-table td:nth-child(10) .action-menu {
  min-width: 108px;
  justify-content: flex-end;
}
.recipes-actions-heading { text-align: right; }
@media (max-width: 760px) {
  .recipes-table-wrap {
    width: 100%;
    max-width: 100%;
  }
}
.table-wrap.recipes-table-wrap:has(.action-menu) {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  padding-bottom: 150px;
}.recipes-table th:nth-child(10),
.recipes-table td:nth-child(10) {
  position: sticky;
  right: 0;
  z-index: 4;
  background: #fff;
  box-shadow: -8px 0 12px rgba(15, 23, 42, .05);
}
.recipes-table th:nth-child(10) { z-index: 5; }
/* Traspaso y cotizacion de receta en Operativo */
.operative-existing-recipe-select {
  display: grid;
  gap: 6px;
  margin-top: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}
.operative-existing-recipe-select select {
  width: min(100%, 520px);
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
.operative-recipe-commercial {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #8acdc3;
  border-radius: 8px;
  background: #effaf7;
}
.operative-recipe-commercial[hidden] { display: none !important; }
.operative-recipe-commercial strong,
.operative-recipe-commercial small { display: block; }
.operative-recipe-commercial small {
  max-width: 620px;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 750;
}
.operative-recipe-commercial .primary-btn { flex: 0 0 auto; }
@media (max-width: 680px) {
  .operative-recipe-commercial { display: grid; }
  .operative-recipe-commercial .primary-btn { width: 100%; }
}
/* Complete color palette editor */
.template-palette-preview {
  display: inline-grid;
  grid-template-columns: repeat(6, 24px);
  gap: 5px;
  padding: 6px;
  border: 1px solid #dbe4ea;
  border-radius: 8px;
  background: #fff;
}
.template-palette-preview i {
  width: 24px;
  height: 24px;
  display: block;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 6px;
  background: var(--template-swatch);
}
.template-palette-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.template-palette-help {
  margin: -4px 0 4px;
  color: #64748b;
  font-size: 13px;
}
@media (max-width: 620px) {
  .template-palette-fields { grid-template-columns: 1fr; }
}
/* Apply maintained palette to internal system templates */
.app-body[class*="app-template-"],
.login-body[class*="app-template-"] {
  color: var(--ink);
  background-color: var(--bg);
}
.app-body[class*="app-template-"] .panel,
.app-body[class*="app-template-"] .stat-card,
.app-body[class*="app-template-"] .topbar,
.app-body[class*="app-template-"] .topbar-user,
.app-body[class*="app-template-"] .modal-card,
.login-body[class*="app-template-"] .form-card,
.login-body[class*="app-template-"] .brand-card {
  background-color: var(--template-surface, var(--panel));
}
.app-body[class*="app-template-"] .empty-state,
.app-body[class*="app-template-"] .topbar p,
.login-body[class*="app-template-"] .form-heading p {
  color: var(--muted);
}
/* Operative maintainer cards: clear information and action hierarchy */
.operative-event-list-polished {
  display: grid;
  gap: 16px;
}
.operative-event-card.operative-event-card-polished {
  position: relative;
  overflow: hidden;
  gap: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 8px;
  color: var(--ink);
  background: var(--template-surface, var(--panel, #fff));
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}
.operative-event-card.operative-event-card-polished::before {
  inset: 0 0 auto;
  width: auto;
  height: 4px;
  background: var(--accent);
}
.operative-event-card-polished .operative-event-main {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 22px 24px 20px;
}
.operative-event-card-polished .status-admin-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  box-shadow: none;
  font-size: 18px;
}
.operative-event-card-polished .operative-event-title-row {
  gap: 10px;
}
.operative-event-card-polished .operative-event-title-row h3 {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}
.operative-event-card-polished .operative-event-main p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.operative-event-card-polished .operative-event-tags {
  gap: 7px;
  margin-top: 12px;
}
.operative-event-card-polished .operative-event-tags span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 6px;
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 6%, var(--template-surface, #fff));
  line-height: 1.25;
}
.operative-event-card-polished .operative-event-actions {
  min-width: 118px;
  display: grid;
  gap: 8px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.operative-event-card-polished .operative-event-actions .primary-link,
.operative-event-card-polished .operative-event-actions .secondary-link {
  width: 100%;
  min-height: 38px;
  justify-content: center;
}
.operative-event-card-polished .operative-prereg-box.operative-prereg-box-polished {
  display: grid;
  grid-template-columns: 112px minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0;
  padding: 18px 24px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--accent) 4%, var(--bg, #f8fafc));
}
.operative-prereg-box-polished .operative-prereg-count {
  min-height: 62px;
  align-content: center;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.operative-prereg-box-polished .operative-prereg-count span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.operative-prereg-box-polished .operative-prereg-count strong {
  margin-top: 3px;
  color: var(--accent);
  font-size: 30px;
}
.operative-prereg-box-polished .operative-prereg-link {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.operative-prereg-box-polished .operative-prereg-link input {
  min-width: 0;
  min-height: 40px;
  margin: 0;
  border-color: var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--template-surface, #fff);
  box-shadow: none;
  font-family: Consolas, monospace;
  font-size: 12px;
}
.operative-prereg-box-polished .operative-prereg-actions {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px;
  justify-content: end;
}
.operative-prereg-box-polished .operative-prereg-actions .primary-link,
.operative-prereg-box-polished .operative-prereg-actions .secondary-link,
.operative-prereg-box-polished .operative-prereg-actions .secondary-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
@media (max-width: 1180px) {
  .operative-event-card-polished .operative-prereg-box.operative-prereg-box-polished {
    grid-template-columns: 100px minmax(0, 1fr);
  }
  .operative-prereg-box-polished .operative-prereg-actions {
    grid-column: 2;
    justify-content: start;
  }
}
@media (max-width: 760px) {
  .operative-event-card-polished .operative-event-main {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
  }
  .operative-event-card-polished .status-admin-icon {
    width: 44px;
    height: 44px;
  }
  .operative-event-card-polished .operative-event-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .operative-event-card-polished .operative-prereg-box.operative-prereg-box-polished {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 18px 18px;
  }
  .operative-prereg-box-polished .operative-prereg-count {
    min-height: 0;
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .operative-prereg-box-polished .operative-prereg-actions {
    grid-column: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }
}
@media (max-width: 520px) {
  .operative-event-card-polished .operative-event-title-row {
    align-items: flex-start;
  }
  .operative-event-card-polished .operative-event-title-row .status-pill {
    width: fit-content;
  }
  .operative-prereg-box-polished .operative-prereg-actions {
    grid-template-columns: 1fr;
  }
  .operative-prereg-box-polished .operative-prereg-actions .primary-link,
  .operative-prereg-box-polished .operative-prereg-actions .secondary-link,
  .operative-prereg-box-polished .operative-prereg-actions .secondary-btn {
    width: 100%;
  }
}
/* Operative company identity */
.operative-header-branding {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 22px;
}
.operative-company-logo {
  width: clamp(240px, 28vw, 420px);
  height: clamp(120px, 13vw, 170px);
  flex: 0 0 auto;
  object-fit: contain;
  object-position: left center;
}
.operative-company-name {
  max-width: 280px;
  color: var(--accent-dark);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
}
@media (max-width: 980px) {
  .operative-header-branding { align-items: flex-start; }
}
@media (max-width: 760px) {
  .operative-header-branding {
    display: grid;
    gap: 12px;
  }
  .operative-company-logo {
    width: min(320px, 88vw);
    height: 124px;
  }
}
/* Database configuration workspace */
.db-setup-body {
  display: block;
  padding: 0;
  color: var(--ink);
  background: #f3f6f8;
}
.db-setup-shell.db-setup-shell-polished {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 64px;
}
.db-setup-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 8px 4px 26px;
}
.db-setup-hero h1 {
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
}
.db-setup-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}
.db-connection-state {
  min-width: 190px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.db-connection-state > span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d97706;
  box-shadow: 0 0 0 5px rgba(217, 119, 6, .12);
}
.db-connection-state.is-connected > span {
  background: #15803d;
  box-shadow: 0 0 0 5px rgba(21, 128, 61, .12);
}
.db-connection-state small,
.db-connection-state strong {
  display: block;
}
.db-connection-state small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.db-connection-state strong {
  margin-top: 2px;
  font-size: 15px;
}
.db-setup-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  backdrop-filter: blur(12px);
}
.db-setup-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}
.db-setup-nav a:hover,
.db-setup-nav a:focus-visible {
  color: #fff;
  background: var(--accent);
}
.db-setup-flash {
  margin-bottom: 18px;
}
.db-setup-flash a {
  margin-left: 8px;
  font-weight: 900;
}
.db-setup-card {
  margin-bottom: 20px;
  padding: 26px;
  border-color: #dfe5ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
  scroll-margin-top: 76px;
}
.db-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.db-section-head > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.db-section-number {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 950;
}
.db-section-head h2 {
  margin: 3px 0 0;
  font-size: 22px;
}
.db-section-head > p {
  max-width: 420px;
  margin: 3px 0 0;
  color: var(--muted);
  line-height: 1.5;
  text-align: right;
}
.db-setup-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.db-setup-form label,
.db-restore-card label {
  color: #334155;
}
.db-restore-warning {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid #f3cf82;
  border-radius: 8px;
  color: #714b06;
  background: #fff9eb;
  font-size: 13px;
}
.db-restore-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.db-restore-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.db-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
.db-card-heading > span,
.db-card-kicker {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--accent-dark);
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.db-card-heading h3,
.db-restore-card h3 {
  margin: 0;
  font-size: 18px;
}
.db-restore-card > p {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.db-restore-card select,
.db-restore-card input[type="file"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
.db-confirm-check {
  min-height: 44px;
  align-items: flex-start;
  padding: 11px 12px;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  background: #fff;
}
.db-restore-card .danger-btn,
.db-maintenance-grid button {
  width: 100%;
  margin-top: auto;
}
.danger-btn:disabled {
  cursor: not-allowed;
  opacity: .45;
}
.db-maintenance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.db-maintenance-grid .database-admin-card {
  min-height: 235px;
}
.db-backup-table {
  border: 1px solid var(--line);
  border-radius: 8px;
}
.db-backup-table table {
  min-width: 760px;
}
.db-backup-table td strong {
  overflow-wrap: anywhere;
}
.db-empty-backups {
  padding: 28px;
  border: 1px dashed #cbd5df;
  border-radius: 8px;
  text-align: center;
}
@media (max-width: 900px) {
  .db-setup-hero,
  .db-section-head {
    display: grid;
  }
  .db-section-head > p {
    max-width: none;
    text-align: left;
  }
  .db-restore-grid,
  .db-maintenance-grid {
    grid-template-columns: 1fr;
  }
  .db-maintenance-grid .database-admin-card {
    min-height: 0;
  }
}
@media (max-width: 640px) {
  .db-setup-shell.db-setup-shell-polished {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }
  .db-setup-card {
    padding: 16px;
  }
  .db-setup-form {
    grid-template-columns: 1fr;
  }
  .db-setup-form .span-2 {
    grid-column: auto;
  }
  .db-connection-state {
    width: 100%;
  }
  .db-setup-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .db-setup-nav a {
    flex: 0 0 auto;
  }
  .db-restore-warning {
    grid-template-columns: 1fr;
  }
}
/* Manual de uso */
.manual-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,520px);align-items:center;gap:32px;padding:30px;margin-bottom:16px;border:1px solid var(--border);border-radius:8px;background:var(--panel)}
.manual-hero h2{margin:5px 0 8px;font-size:28px}.manual-hero p{margin:0;color:var(--muted)}
.manual-search{display:grid;grid-template-columns:24px minmax(0,1fr) 34px;align-items:center;gap:10px;min-height:54px;padding:0 10px 0 16px;border:1px solid var(--border);border-radius:8px;background:var(--panel);box-shadow:0 10px 30px rgba(15,23,42,.06)}
.manual-search:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 16%,transparent)}
.manual-search .nav-icon{width:22px;height:22px;color:var(--primary)}.manual-search input{width:100%;border:0;outline:0;padding:0;background:transparent;color:var(--text);font:inherit}
.manual-search button{width:32px;height:32px;border:0;border-radius:50%;background:var(--soft,#eef4f5);color:var(--text);font-size:22px;line-height:1;cursor:pointer}.manual-search button:hover{background:color-mix(in srgb,var(--primary) 16%,white)}
.manual-shortcuts{display:flex;gap:8px;overflow-x:auto;padding:2px 0 14px;scrollbar-width:thin}.manual-shortcuts a{flex:0 0 auto;padding:8px 12px;border:1px solid var(--border);border-radius:999px;background:var(--panel);color:var(--muted);font-size:13px;font-weight:700;text-decoration:none}.manual-shortcuts a:hover{border-color:var(--primary);color:var(--primary)}
.manual-layout{display:grid;grid-template-columns:220px minmax(0,1fr);align-items:start;gap:22px}.manual-index{position:sticky;top:88px;display:grid;gap:3px;padding:16px;border-left:2px solid var(--border)}
.manual-index strong{padding:0 9px 10px;font-size:12px;text-transform:uppercase;color:var(--muted)}.manual-index a{display:grid;grid-template-columns:25px 1fr;align-items:center;gap:7px;padding:8px 9px;border-radius:6px;color:var(--text);font-size:13px;font-weight:650;text-decoration:none}.manual-index a span{color:var(--primary);font-size:11px}.manual-index a:hover{background:color-mix(in srgb,var(--primary) 9%,transparent)}
.manual-content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.manual-topic{scroll-margin-top:92px;padding:22px;border:1px solid var(--border);border-radius:8px;background:var(--panel)}.manual-topic[hidden]{display:none}
.manual-topic header{display:flex;align-items:center;gap:13px;margin-bottom:14px}.manual-topic-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:8px;background:color-mix(in srgb,var(--primary) 10%,white);color:var(--primary)}.manual-topic-icon svg{width:23px;height:23px;fill:currentColor}.manual-topic header small{color:var(--primary);font-size:11px;font-weight:800;text-transform:uppercase}.manual-topic h3{margin:2px 0 0;font-size:18px}.manual-topic>p{margin:0 0 15px;color:var(--muted);line-height:1.55}
.manual-topic ol{display:grid;gap:10px;margin:0 0 18px;padding:0;list-style:none;counter-reset:manual-step}.manual-topic li{display:grid;grid-template-columns:24px 1fr;gap:9px;color:var(--text);font-size:14px;line-height:1.45;counter-increment:manual-step}.manual-topic li:before{content:counter(manual-step);display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--soft,#edf3f4);color:var(--primary);font-size:11px;font-weight:800}
.manual-open-module{display:inline-flex;align-items:center;gap:7px;color:var(--primary);font-size:13px;font-weight:800;text-decoration:none}.manual-open-module:hover{text-decoration:underline}.manual-no-results{grid-column:1/-1;padding:38px;border:1px dashed var(--border);border-radius:8px;color:var(--muted);text-align:center}
.manual-faq{grid-column:1/-1;padding:26px;margin-top:8px;border:1px solid var(--border);border-radius:8px;background:var(--panel)}.manual-faq h2{margin:5px 0 18px}.manual-faq details{border-top:1px solid var(--border)}.manual-faq details:last-child{border-bottom:1px solid var(--border)}.manual-faq summary{padding:15px 2px;font-weight:750;cursor:pointer}.manual-faq details p{margin:-4px 0 16px;color:var(--muted);line-height:1.55}
@media(max-width:1050px){.manual-hero{grid-template-columns:1fr}.manual-layout{grid-template-columns:1fr}.manual-index{display:none}}
@media(max-width:720px){.manual-hero{padding:21px;gap:20px}.manual-hero h2{font-size:24px}.manual-search{min-width:0}.manual-content{grid-template-columns:1fr}.manual-topic,.manual-faq{padding:18px}}
/* Cliente en listado de cotizaciones */
.quote-client-cell{display:grid;gap:5px;min-width:170px}.quote-client-cell strong{display:block;color:var(--text);font-size:14px;line-height:1.3}.quote-client-cell small{display:flex;align-items:center;gap:6px;margin:0;color:var(--muted);font-size:12px;line-height:1.3}.quote-client-cell small span{display:inline-flex;padding:2px 5px;border-radius:4px;background:var(--soft,#edf3f4);color:var(--primary);font-size:10px;font-weight:800;text-transform:uppercase}
/* Acciones del historial de respaldos */
.db-backup-history-actions{display:flex;align-items:center;justify-content:flex-end;gap:14px;flex-wrap:wrap}.db-backup-history-actions p{margin:0}.db-backup-history-actions form,.db-backup-row-actions form{margin:0}.db-backup-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:155px}.db-delete-all-btn,.db-delete-backup-btn{border:1px solid #dc8d8d;border-radius:6px;background:#fff;color:#a42121;font:inherit;font-size:12px;font-weight:800;cursor:pointer}.db-delete-all-btn{padding:9px 12px}.db-delete-backup-btn{padding:7px 10px}.db-delete-all-btn:hover,.db-delete-backup-btn:hover{border-color:#b42318;background:#fff1f0;color:#8f1818}.db-delete-all-btn:focus-visible,.db-delete-backup-btn:focus-visible{outline:3px solid rgba(180,35,24,.2);outline-offset:2px}@media(max-width:720px){.db-backup-history-actions{align-items:flex-start;justify-content:flex-start}.db-backup-row-actions{justify-content:flex-start}}
/* Controles de formulario unificados */
:where(.app-body) :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),select,textarea){width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid #d9e1eb;border-radius:8px;outline:0;color:var(--ink);background:#fff;font:inherit;font-size:14px;line-height:1.35;box-shadow:0 1px 2px rgba(15,23,42,.025);transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease}
:where(.app-body) :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),select,textarea):hover:not(:disabled):not(:focus){border-color:#b9c7d8}
:where(.app-body) :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),select,textarea):focus{border-color:#5b9da8;background:#fff;box-shadow:0 0 0 3px rgba(31,122,140,.12)}
:where(.app-body) :where(input,textarea)::placeholder{color:#98a2b3;opacity:1}:where(.app-body) :where(select){padding-right:34px;cursor:pointer}:where(.app-body) :where(textarea){min-height:96px;resize:vertical}:where(.app-body) :where(input[readonly],textarea[readonly]){color:#667085;background:#f7f9fc}:where(.app-body) :where(input:disabled,select:disabled,textarea:disabled){cursor:not-allowed;opacity:.72;background:#f2f4f7}
:where(.app-body) :where(input[type="checkbox"],input[type="radio"]){accent-color:var(--accent);cursor:pointer}:where(.app-body) :where(input[type="file"]){padding:7px;background:#f8fafc;cursor:pointer}:where(.app-body) :where(input[type="file"])::file-selector-button{min-height:30px;margin-right:10px;padding:6px 11px;border:0;border-radius:6px;color:#155e68;background:rgba(31,122,140,.1);font:inherit;font-size:12px;font-weight:800;cursor:pointer}:where(.app-body) :where(input[type="file"])::file-selector-button:hover{background:rgba(31,122,140,.17)}
.gallery-upload-form>label,.gallery-filter-form>label,.gallery-admin-form>label{display:grid;gap:7px;color:#344054;font-size:13px;font-weight:800}.gallery-upload-form .gallery-drop-zone{padding:14px}.gallery-upload-form .gallery-drop-zone input[type="file"]{border:0;background:transparent;box-shadow:none}
/* Dashboard operativo */
.dashboard-command-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:24px;margin-bottom:16px;padding:26px 28px;border:1px solid var(--line);border-radius:8px;background:var(--template-surface,#fff);box-shadow:0 14px 34px rgba(32,42,78,.07)}.dashboard-command-hero h2{margin:4px 0 6px;font-size:28px}.dashboard-command-hero p{margin:0;color:var(--muted);line-height:1.5}.dashboard-command-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap}.dashboard-command-actions a{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:8px 12px;border:1px solid var(--line);border-radius:7px;color:var(--ink);background:#fff;font-size:13px;font-weight:850}.dashboard-command-actions a:first-child{border-color:var(--accent);color:#fff;background:var(--accent)}.dashboard-command-actions .nav-icon{width:26px;height:26px;color:inherit;background:rgba(95,109,246,.09)}.dashboard-command-actions a:first-child .nav-icon{background:rgba(255,255,255,.16)}
.dashboard-primary-kpis{display:grid;grid-template-columns:repeat(4,minmax(190px,1fr));gap:12px;margin-bottom:16px}.dashboard-metric{position:relative;display:grid;grid-template-columns:46px minmax(0,1fr);align-items:center;gap:13px;min-height:112px;padding:18px;border:1px solid var(--line);border-radius:8px;background:var(--template-surface,#fff);box-shadow:0 10px 24px rgba(32,42,78,.055);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.dashboard-metric:hover{transform:translateY(-2px);border-color:#b7c8d7;box-shadow:0 16px 30px rgba(32,42,78,.09)}.dashboard-metric-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:8px}.dashboard-metric-icon svg{width:23px;height:23px;fill:currentColor}.dashboard-metric small,.dashboard-metric em{display:block}.dashboard-metric small{margin-bottom:5px;color:var(--muted);font-size:11px;font-style:normal;font-weight:900;text-transform:uppercase}.dashboard-metric strong{display:block;color:var(--ink);font-size:25px;line-height:1.1;overflow-wrap:anywhere}.dashboard-metric em{margin-top:5px;color:var(--muted);font-size:11px;font-style:normal}.metric-sales .dashboard-metric-icon{color:#067647;background:#e9f8f1}.metric-quotes .dashboard-metric-icon{color:#175cd3;background:#eaf2ff}.metric-orders .dashboard-metric-icon{color:#7a5b00;background:#fff4cf}.metric-stock .dashboard-metric-icon{color:#b42318;background:#ffeded}
.dashboard-main-grid,.dashboard-secondary-grid,.dashboard-bottom-grid{display:grid;gap:16px;align-items:stretch}.dashboard-main-grid{grid-template-columns:minmax(0,.92fr) minmax(420px,1.08fr)}.dashboard-secondary-grid{grid-template-columns:minmax(520px,1.18fr) minmax(320px,.82fr)}.dashboard-bottom-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-main-grid>.panel,.dashboard-secondary-grid>.panel,.dashboard-bottom-grid>.panel{margin-bottom:16px;box-shadow:0 10px 26px rgba(32,42,78,.055)}
.dashboard-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.dashboard-panel-head h2{margin:3px 0 0}.dashboard-panel-head>a{flex:0 0 auto;color:var(--accent);font-size:12px;font-weight:850}.dashboard-panel-head>a:hover{text-decoration:underline}.dashboard-live-dot{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border-radius:999px;color:#067647;background:#e9f8f1;font-size:11px;font-weight:850}.dashboard-live-dot:before{content:"";width:7px;height:7px;border-radius:50%;background:#12b76a}
.dashboard-attention-list{display:grid;gap:8px}.dashboard-attention-list>a{display:grid;grid-template-columns:38px minmax(0,1fr) 22px;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:7px;background:#fff}.dashboard-attention-list>a>strong{display:grid;place-items:center;width:38px;height:38px;border-radius:7px;font-size:17px}.dashboard-attention-list b,.dashboard-attention-list small{display:block}.dashboard-attention-list b{margin-bottom:3px;color:var(--ink);font-size:13px}.dashboard-attention-list small{color:var(--muted);font-size:11px;line-height:1.35}.dashboard-attention-list i{color:var(--muted);font-size:18px;font-style:normal}.dashboard-attention-list .tone-blue>strong{color:#175cd3;background:#eaf2ff}.dashboard-attention-list .tone-amber>strong{color:#8a5a0a;background:#fff4dc}.dashboard-attention-list .tone-green>strong{color:#067647;background:#e9f8f1}.dashboard-attention-list .tone-red>strong{color:#b42318;background:#ffeded}.dashboard-attention-list>a:hover{border-color:#b8c8d7}.dashboard-mini-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}.dashboard-mini-summary div{min-width:0}.dashboard-mini-summary span{display:block;margin-bottom:4px;color:var(--muted);font-size:10px;font-weight:850;text-transform:uppercase}.dashboard-mini-summary strong{display:block;color:var(--ink);font-size:17px;overflow-wrap:anywhere}
.dashboard-sales-total{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:12px}.dashboard-sales-total span{color:var(--muted);font-size:12px;font-weight:800}.dashboard-sales-total strong{font-size:24px}.dashboard-bar-chart{display:grid;grid-template-columns:repeat(7,minmax(36px,1fr));align-items:end;gap:8px;height:218px;padding-top:20px}.dashboard-bar-column{display:grid;grid-template-rows:22px 1fr 18px;gap:5px;height:100%;text-align:center}.dashboard-bar-column>span{overflow:hidden;color:var(--muted);font-size:9px;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.dashboard-bar-column>div{position:relative;display:flex;align-items:flex-end;justify-content:center;min-height:120px;border-bottom:1px solid var(--line);background:repeating-linear-gradient(to top,transparent 0,transparent 39px,rgba(152,162,179,.13) 40px)}.dashboard-bar-column i{display:block;width:min(32px,72%);min-height:4px;border-radius:5px 5px 2px 2px;background:#2f7f8d;transition:height .25s ease}.dashboard-bar-column:hover i{background:var(--accent)}.dashboard-bar-column small{color:var(--muted);font-size:11px;font-weight:850}
.dashboard-quote-list{display:grid}.dashboard-quote-list>a{display:grid;grid-template-columns:42px minmax(150px,1fr) auto auto;align-items:center;gap:11px;padding:11px 4px;border-top:1px solid var(--line)}.dashboard-quote-list>a:first-child{border-top:0}.dashboard-quote-list>a:hover .dashboard-quote-person strong{color:var(--accent)}.dashboard-quote-id{color:var(--muted);font-size:11px;font-weight:850}.dashboard-quote-person strong,.dashboard-quote-person small{display:block}.dashboard-quote-person strong{margin-bottom:3px;font-size:13px}.dashboard-quote-person small{color:var(--muted);font-size:11px}.dashboard-quote-state{padding:5px 7px;border-radius:999px;color:#475467;background:#f2f4f7;font-size:10px;font-weight:850}.dashboard-quote-total{font-size:13px;text-align:right}
.dashboard-order-progress{display:grid;gap:15px}.dashboard-order-progress>div>header{display:flex;justify-content:space-between;gap:12px;margin-bottom:6px}.dashboard-order-progress header strong{font-size:12px}.dashboard-order-progress header span{color:var(--muted);font-size:12px;font-weight:850}.dashboard-progress-track{height:7px;overflow:hidden;border-radius:999px;background:#edf1f5}.dashboard-progress-track i{display:block;height:100%;min-width:0;border-radius:inherit;background:#2f7f8d}.dashboard-order-progress>div:nth-child(2) i{background:#5f6df6}.dashboard-order-progress>div:nth-child(3) i{background:#f5a524}.dashboard-order-progress>div:nth-child(4) i{background:#16a085}.dashboard-order-progress>div:nth-child(5) i{background:#c2413b}.dashboard-order-note{display:flex;align-items:center;gap:11px;margin-top:20px;padding:12px;border:1px solid #d7e8eb;border-radius:7px;background:#f3fafb}.dashboard-order-note .nav-icon{color:#1f7a8c;background:#dff1f3}.dashboard-order-note strong,.dashboard-order-note small{display:block}.dashboard-order-note strong{font-size:13px}.dashboard-order-note small{margin-top:3px;color:var(--muted);font-size:11px}
.dashboard-stock-list,.dashboard-operative-list{display:grid;gap:8px}.dashboard-stock-list>a{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 12px;border:1px solid var(--line);border-radius:7px;background:#fff}.dashboard-stock-list>a:hover{border-color:#b8c8d7}.dashboard-stock-list strong,.dashboard-stock-list small{display:block}.dashboard-stock-list strong{font-size:13px}.dashboard-stock-list small{margin-top:3px;color:var(--muted);font-size:10px}.dashboard-stock-list b{flex:0 0 auto;padding:5px 8px;border-radius:6px;color:#8a5a0a;background:#fff4dc;font-size:11px}.dashboard-stock-list b.out{color:#b42318;background:#ffeded}.dashboard-good-state{padding:18px;border:1px solid #ccebdc;border-radius:7px;color:#067647!important;background:#f0fbf6;text-align:center}
.dashboard-operative-list>article{display:grid;grid-template-columns:auto minmax(120px,1fr) auto;align-items:center;gap:11px;padding:11px 12px;border:1px solid var(--line);border-radius:7px;background:#fff}.dashboard-operative-status{padding:5px 7px;border-radius:999px;color:#667085;background:#f2f4f7;font-size:9px;font-weight:900;text-transform:uppercase}.dashboard-operative-status.current{color:#067647;background:#e9f8f1}.dashboard-operative-list article>div strong,.dashboard-operative-list article>div small{display:block}.dashboard-operative-list article>div strong{font-size:13px}.dashboard-operative-list article>div small{margin-top:3px;color:var(--muted);font-size:11px}.dashboard-operative-list dl{display:flex;gap:10px;margin:0}.dashboard-operative-list dl div{min-width:58px;text-align:center}.dashboard-operative-list dt{color:var(--muted);font-size:9px;font-weight:850;text-transform:uppercase}.dashboard-operative-list dd{margin:3px 0 0;font-size:15px;font-weight:900}
@media(max-width:1220px){.dashboard-primary-kpis{grid-template-columns:repeat(2,minmax(190px,1fr))}.dashboard-main-grid,.dashboard-secondary-grid{grid-template-columns:1fr}.dashboard-bottom-grid{grid-template-columns:1fr 1fr}}
@media(max-width:860px){.dashboard-command-hero{grid-template-columns:1fr}.dashboard-command-actions{justify-content:flex-start}.dashboard-bottom-grid{grid-template-columns:1fr}.dashboard-mini-summary{grid-template-columns:repeat(3,minmax(90px,1fr))}}
@media(max-width:620px){.dashboard-command-hero{padding:20px}.dashboard-command-actions{display:grid;grid-template-columns:1fr 1fr}.dashboard-command-actions a{justify-content:center}.dashboard-primary-kpis{grid-template-columns:1fr}.dashboard-metric{min-height:96px}.dashboard-mini-summary{grid-template-columns:1fr}.dashboard-bar-chart{gap:4px;height:190px}.dashboard-bar-column>span{display:none}.dashboard-bar-column{grid-template-rows:1fr 18px}.dashboard-quote-list>a{grid-template-columns:38px minmax(0,1fr) auto}.dashboard-quote-state{display:none}.dashboard-quote-total{grid-column:3}.dashboard-operative-list>article{grid-template-columns:1fr}.dashboard-operative-list dl{justify-content:flex-start}.dashboard-operative-list dl div{text-align:left}.dashboard-operative-status{justify-self:start}}
/* Importes con separador de miles */
[data-money-input]{font-variant-numeric:tabular-nums;text-align:right;font-weight:750}

/* Controles de configuracion de base de datos */
.db-setup-body .db-setup-form{display:grid;align-items:end}.db-setup-body :where(.db-setup-form,.db-restore-card,.database-admin-card) label:not(.inline-check){display:grid;gap:8px;color:#344054;font-size:13px;font-weight:850}.db-setup-body :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]),select,textarea){width:100%;min-width:0;min-height:46px;padding:10px 13px;border:1px solid #cfd9e4;border-radius:8px;outline:0;color:#182033;background:#fff;font:inherit;font-size:14px;line-height:1.35;box-shadow:0 1px 2px rgba(15,23,42,.035);transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease}.db-setup-body :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),select,textarea):hover:not(:disabled):not(:focus){border-color:#aebdce}.db-setup-body :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),select,textarea):focus{border-color:#4d929e;background:#fff;box-shadow:0 0 0 3px rgba(31,122,140,.13)}.db-setup-body :where(input,textarea)::placeholder{color:#98a2b3;opacity:1}.db-setup-body input[type="password"]{letter-spacing:.08em}.db-setup-body input[type="file"]{padding:7px;background:#f8fafc;cursor:pointer}.db-setup-body input[type="file"]::file-selector-button{min-height:31px;margin-right:10px;padding:6px 12px;border:0;border-radius:6px;color:#155e68;background:#e3f2f4;font:inherit;font-size:12px;font-weight:850;cursor:pointer}.db-setup-body input[type="file"]::file-selector-button:hover{background:#cfe8eb}.db-setup-body :where(input[type="checkbox"],input[type="radio"]){width:18px;height:18px;min-height:18px;padding:0;accent-color:var(--accent);cursor:pointer}.db-setup-body :where(input:disabled,select:disabled,textarea:disabled){cursor:not-allowed;opacity:.65;background:#f2f4f7}.db-setup-body .db-setup-form .settings-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:2px}.db-setup-body .db-setup-form .primary-btn{min-width:230px}.db-setup-body .db-confirm-check input{flex:0 0 auto;margin-top:1px}
@media(max-width:640px){.db-setup-body .db-setup-form .settings-actions{justify-content:stretch}.db-setup-body .db-setup-form .primary-btn{width:100%;min-width:0}}


/* Public page manager. */
.public-pages-admin {
  display: grid;
  gap: 22px;
}
.public-pages-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.public-pages-table {
  min-width: 860px;
  margin: 0;
}
.public-pages-table th,
.public-pages-table td {
  vertical-align: middle;
}
.public-page-tree-title {
  min-width: 230px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: calc(var(--page-depth) * 24px);
}
.public-page-tree-title > div {
  display: grid;
  gap: 3px;
}
.public-page-tree-title small {
  color: var(--muted);
}
.public-page-tree-arrow {
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
}
.public-pages-table .status-pill.active {
  color: #126443;
  background: #def5e9;
}
.public-pages-table .status-pill.inactive {
  color: #68747d;
  background: #edf1f3;
}
.public-pages-table .table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.public-pages-table .table-actions form {
  margin: 0;
}
.danger-link {
  padding: 8px 10px;
  color: #a62b2b;
  background: #fff0f0;
  border: 1px solid #f3cece;
  border-radius: 7px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.public-pages-empty {
  padding: 34px;
  text-align: center;
  background: var(--field);
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.public-pages-empty p {
  max-width: 680px;
  margin: 8px auto 0;
  color: var(--muted);
}
.public-page-modal-card {
  width: min(900px, calc(100% - 28px));
}
.public-page-form {
  display: grid;
  gap: 18px;
  padding: 20px;
}
.public-page-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.public-page-switches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
.public-page-switches .inline-check {
  min-height: 44px;
  padding: 9px 12px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 7px;
}
@media (max-width: 720px) {
  .public-page-form fieldset {
    grid-template-columns: 1fr;
  }
  .public-page-form .span-2 {
    grid-column: auto;
  }
}


/* Public process editor. */
.public-process-editor {
  background: color-mix(in srgb, var(--accent) 4%, var(--panel));
}
.public-process-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.public-process-step-grid article {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 18px;
  background: var(--field);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
}
.public-process-step-grid article h3 {
  margin: 0 0 2px;
  font-size: 17px;
}
.public-process-step-grid article label {
  min-width: 0;
}
@media (max-width: 900px) {
  .public-process-step-grid {
    grid-template-columns: 1fr;
  }
}


.public-page-order-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.public-page-order-controls form {
  margin: 0;
}
.public-page-order-controls button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--accent);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}
.public-page-order-controls button:hover,
.public-page-order-controls button:focus-visible {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  outline: none;
}
.public-page-order-controls > span {
  min-width: 26px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}


/* Public services editor. */
.public-services-editor {
  background: color-mix(in srgb, var(--accent) 4%, var(--panel));
}
.public-services-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.public-services-editor-grid article {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.public-services-editor-grid article > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.public-services-editor-grid article > div > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}
.public-services-editor-grid h3 {
  margin: 0;
  font-size: 17px;
}
.public-services-editor-grid article > small {
  margin-top: -5px;
  color: var(--muted);
}
.public-services-editor-grid .visioncare-only-service {
  border-top: 4px solid var(--accent);
}
@media (max-width: 760px) {
  .public-services-editor-grid {
    grid-template-columns: 1fr;
  }
}


/* Paged media picker */
.media-picker-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.media-picker-pagination[hidden] { display: none; }
.media-picker-pagination span {
  min-width: 210px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.media-picker-grid.is-loading {
  min-height: 220px;
  align-content: center;
}
@media (max-width: 560px) {
  .media-picker-pagination {
    justify-content: space-between;
    gap: 6px;
  }
  .media-picker-pagination span { min-width: 0; }
}

/* QA: keep the inventory master table inside its panel */
.table-wrap:has(.inventory-master-table) {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  padding-bottom: 150px;
}
.inventory-master-table { min-width: 1420px; }


/* Editable work-order delivery */
.order-delivery-panel .panel-title-row { align-items: center; }
.delivery-summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  color: #475467;
  background: #f2f4f7;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}
.delivery-summary-pill.is-shipping {
  color: #075985;
  background: #eaf7fc;
  border-color: #bae6fd;
}
.order-shipping-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.order-shipping-fields[hidden],
.order-shipping-fields [hidden] { display: none !important; }
.delivery-payment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.delivery-payment-options legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}
.delivery-payment-options label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 72px;
  padding: 13px;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.delivery-payment-options label:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent);
}
.delivery-payment-options input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}
.delivery-payment-options strong,
.delivery-payment-options small { display: block; }
.delivery-payment-options small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}
@media (max-width: 680px) {
  .order-shipping-fields,
  .delivery-payment-options { grid-template-columns: 1fr; }
  .order-delivery-panel .panel-title-row { align-items: flex-start; }
}


.work-order-delivery-options {
  display: grid;
  gap: 5px;
  text-align: left;
}
.work-order-delivery-options span {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 5px;
  align-items: start;
  font-size: 10px;
  line-height: 1.25;
}
.work-order-delivery-options b {
  display: inline-grid;
  place-items: center;
  width: 16px;
  min-height: 16px;
  border: 1px solid #2f3437;
  font-size: 10px;
}



/* Work-order status maintainer */
.ot-status-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 28px;
  overflow: hidden;
  border-left: 5px solid var(--accent);
  background: var(--panel);
}
.ot-status-hero-copy { max-width: 720px; }
.ot-status-hero h2 {
  margin: 4px 0 8px;
  font-size: clamp(28px, 3.4vw, 42px);
}
.ot-status-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.ot-status-hero-actions {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 14px;
}
.ot-status-hero-actions .primary-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ot-status-hero-actions .primary-link > span {
  font-size: 20px;
  line-height: 1;
}
.ot-status-metrics {
  display: flex;
  gap: 8px;
}
.ot-status-metrics span {
  min-width: 88px;
  padding: 9px 11px;
  color: var(--muted);
  background: color-mix(in srgb, var(--accent) 6%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.ot-status-metrics strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 19px;
}

.ot-workflow-panel,
.ot-status-list-panel { margin-top: 16px; }
.ot-status-flow {
  display: flex;
  align-items: stretch;
  gap: 28px;
  padding: 12px 2px 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.ot-status-flow article {
  position: relative;
  min-width: 190px;
  flex: 1 0 190px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 5px 12px;
  align-items: center;
  padding: 16px;
  background: color-mix(in srgb, var(--accent) 5%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 8px;
}
.ot-status-flow article:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -29px;
  width: 28px;
  height: 2px;
  background: color-mix(in srgb, var(--accent) 42%, var(--line));
}
.ot-status-flow article:not(:last-child)::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: calc(50% - 4px);
  right: -29px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: rotate(45deg);
}
.ot-flow-order {
  position: absolute;
  top: 7px;
  right: 9px;
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  font-size: 10px;
  font-weight: 900;
}
.ot-status-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  color: #fff;
  background: var(--accent);
  border-radius: 7px;
}
.ot-status-icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}
.ot-status-flow article > div {
  min-width: 0;
}
.ot-status-flow strong,
.ot-status-flow small { display: block; }
.ot-status-flow strong {
  padding-right: 16px;
  color: var(--ink);
  font-size: 14px;
}
.ot-status-flow small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ot-status-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}
.ot-status-row {
  display: grid;
  grid-template-columns: 44px 46px minmax(190px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.ot-status-row:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: 0 9px 24px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}
.ot-status-row.is-inactive {
  background: color-mix(in srgb, var(--muted) 5%, var(--panel));
  opacity: .72;
}
.ot-status-position {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 8%, var(--panel));
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}
.ot-status-row .ot-status-icon {
  width: 40px;
  height: 40px;
}
.ot-status-row-main {
  min-width: 0;
}
.ot-status-row-main strong,
.ot-status-row-main span { display: block; }
.ot-status-row-main strong {
  color: var(--ink);
  font-size: 15px;
}
.ot-status-row-main span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.ot-status-row-main code {
  padding: 2px 5px;
  color: var(--accent-dark);
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  border-radius: 4px;
  font-size: 10px;
}
.ot-status-row > .secondary-link {
  min-width: 76px;
  justify-content: center;
}
.ot-status-empty {
  width: 100%;
  margin: 0;
  padding: 26px;
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 5%, var(--panel));
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

.ot-status-modal { width: min(720px, calc(100vw - 28px)); }
.ot-status-form {
  display: grid;
  gap: 20px;
  padding-top: 4px;
}
.ot-status-form label > small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.ot-status-active-toggle {
  min-height: 68px;
  display: flex !important;
  align-items: center;
  gap: 11px;
  padding: 12px;
  cursor: pointer;
  background: color-mix(in srgb, var(--accent) 5%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 8px;
}
.ot-status-active-toggle input {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  accent-color: var(--accent);
}
.ot-status-active-toggle span,
.ot-status-active-toggle strong,
.ot-status-active-toggle small { display: block; }
.ot-status-active-toggle small { margin-top: 3px !important; }

.ot-icon-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}
.ot-icon-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}
.ot-icon-picker label {
  position: relative;
  min-height: 76px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 11px;
  cursor: pointer;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ot-icon-picker label:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.ot-icon-picker label:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 13%, transparent);
}
.ot-icon-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ot-icon-picker .ot-status-icon {
  width: 36px;
  height: 36px;
}
.ot-icon-picker .ot-status-icon svg {
  width: 18px;
  height: 18px;
}
.ot-icon-picker strong {
  color: var(--ink);
  font-size: 12px;
}
.ot-status-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.ot-status-form-actions > * { min-width: 130px; justify-content: center; }

@media (max-width: 760px) {
  .ot-status-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 20px;
  }
  .ot-status-hero-actions {
    justify-items: stretch;
  }
  .ot-status-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .ot-status-hero-actions .primary-link { justify-content: center; }
  .ot-status-row {
    grid-template-columns: 38px 42px minmax(0, 1fr);
    padding: 12px;
  }
  .ot-status-row > .status-pill {
    grid-column: 2;
    justify-self: start;
  }
  .ot-status-row > .secondary-link {
    grid-column: 3;
    justify-self: end;
  }
  .ot-icon-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .ot-status-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .ot-status-row .ot-status-icon { display: none; }
  .ot-status-row > .status-pill { grid-column: 1; }
  .ot-status-row > .secondary-link { grid-column: 2; }
  .ot-icon-picker { grid-template-columns: 1fr; }
  .ot-status-form-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ot-status-form-actions > * { min-width: 0; }
}

/* Convenios y expediente documental */
.agreement-module {
  padding: 0;
  overflow: hidden;
}
.agreement-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
  border-bottom: 1px solid var(--line);
}
.agreement-hero h2 {
  margin: 5px 0 6px;
  color: var(--ink);
  font-size: 25px;
}
.agreement-hero p,
.agreement-documents-modal .modal-head p {
  margin: 0;
  color: var(--muted);
}
.agreement-hero .primary-link,
.agreement-card-actions a,
.agreement-viewer-actions a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.agreement-hero svg,
.agreement-card-actions svg,
.agreement-viewer-actions svg,
.agreement-card-meta svg {
  width: 17px;
  height: 17px;
}
.agreement-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.agreement-summary > div {
  display: grid;
  gap: 2px;
  padding: 17px 30px;
  border-right: 1px solid var(--line);
}
.agreement-summary > div:last-child { border-right: 0; }
.agreement-summary strong {
  color: var(--ink);
  font-size: 22px;
}
.agreement-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.agreement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 24px 30px 30px;
}
.agreement-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.agreement-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: 0 10px 26px rgba(20, 46, 60, .08);
  transform: translateY(-2px);
}
.agreement-card-head,
.agreement-file-title,
.agreement-document-panel-head,
.agreement-viewer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.agreement-icon,
.agreement-upload-title > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  border-radius: 8px;
}
.agreement-icon svg,
.agreement-upload-title svg { width: 21px; height: 21px; }
.status-badge.is-active {
  color: #14734c;
  background: #e7f7ef;
  border-color: #bce8d0;
}
.status-badge.is-inactive {
  color: #a33b3b;
  background: #fff0f0;
  border-color: #f1caca;
}
.agreement-card h3 {
  margin: 18px 0 8px;
  color: var(--ink);
  font-size: 18px;
}
.agreement-discount {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.agreement-discount strong {
  color: var(--accent);
  font-size: 28px;
}
.agreement-discount span,
.agreement-card-meta { color: var(--muted); font-size: 13px; }
.agreement-card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
}
.agreement-card-actions {
  display: flex;
  gap: 9px;
  margin-top: auto;
  padding-top: 18px;
}
.agreement-card-actions > * {
  flex: 1;
  justify-content: center;
}
.agreement-empty,
.agreement-document-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.agreement-empty svg,
.agreement-document-empty svg {
  width: 34px;
  height: 34px;
  color: var(--accent);
}
.agreement-empty h3,
.agreement-document-empty h4 { margin: 10px 0 3px; color: var(--ink); }
.agreement-empty p,
.agreement-document-empty p { margin: 0; }
.agreement-edit-modal { width: min(680px, calc(100vw - 28px)); }
.agreement-edit-modal .settings-form { padding: 24px; }
.agreement-documents-modal {
  width: min(1180px, calc(100vw - 30px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
}
.agreement-documents-modal > .modal-head,
.agreement-viewer-modal > .modal-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--panel);
}
.agreement-document-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  min-height: 500px;
  max-height: calc(100vh - 145px);
  overflow: hidden;
}
.agreement-upload-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 24px;
  overflow-y: auto;
  background: color-mix(in srgb, var(--accent) 4%, var(--panel));
  border-right: 1px solid var(--line);
}
.agreement-upload-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.agreement-upload-title h3,
.agreement-document-panel-head h3 { margin: 0 0 3px; color: var(--ink); font-size: 17px; }
.agreement-upload-title p,
.agreement-document-panel-head p { margin: 0; color: var(--muted); font-size: 12px; }
.agreement-upload-form .form-grid {
  grid-template-columns: 1fr 1fr;
}
.agreement-upload-form .form-grid label:first-child { grid-column: 1 / -1; }
.agreement-document-panel {
  min-width: 0;
  padding: 24px;
  overflow-y: auto;
}
.agreement-document-panel-head {
  margin-bottom: 16px;
}
.agreement-document-panel-head > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--accent);
  font-weight: 800;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  border-radius: 50%;
}
.agreement-document-list {
  display: grid;
  gap: 10px;
}
.agreement-document-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.agreement-file-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--muted);
  background: var(--soft);
  border-radius: 8px;
}
.agreement-file-icon.is-previewable {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
}
.agreement-file-icon svg { width: 22px; height: 22px; }
.agreement-file-info {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.agreement-file-title strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agreement-file-info > span,
.agreement-file-info small { color: var(--muted); font-size: 12px; }
.agreement-file-info p {
  margin: 3px 0;
  color: var(--ink);
  font-size: 13px;
}
.agreement-file-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.agreement-file-actions form { margin: 0; }
.icon-action.is-danger { color: #b63737; }
.icon-action.is-danger:hover { background: #fff0f0; border-color: #efc3c3; }
.agreement-viewer-overlay { z-index: 180; }
.agreement-viewer-modal {
  width: min(1100px, calc(100vw - 30px));
  height: calc(100vh - 30px);
  overflow: hidden;
}
.agreement-viewer-modal iframe {
  display: block;
  width: 100%;
  height: calc(100% - 78px);
  background: #eef2f4;
  border: 0;
}
.agreement-viewer-actions .modal-close { flex: 0 0 auto; }

@media (max-width: 820px) {
  .agreement-hero { align-items: stretch; flex-direction: column; padding: 22px; }
  .agreement-hero .primary-link { justify-content: center; }
  .agreement-summary > div { padding: 14px 18px; }
  .agreement-grid { grid-template-columns: 1fr; padding: 18px; }
  .agreement-document-layout {
    display: block;
    max-height: calc(100vh - 132px);
    overflow-y: auto;
  }
  .agreement-upload-form,
  .agreement-document-panel { overflow: visible; }
  .agreement-upload-form { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .agreement-summary strong { font-size: 18px; }
  .agreement-summary span { font-size: 10px; }
  .agreement-card-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .agreement-upload-form,
  .agreement-document-panel { padding: 17px; }
  .agreement-upload-form .form-grid { grid-template-columns: 1fr; }
  .agreement-upload-form .form-grid label:first-child { grid-column: auto; }
  .agreement-document-row { grid-template-columns: 38px minmax(0, 1fr); }
  .agreement-file-icon { width: 38px; height: 38px; }
  .agreement-file-actions { grid-column: 2; justify-content: flex-end; }
  .agreement-viewer-actions .secondary-link { display: none; }
}
/* Toma de inventario con QR */
.inventory-count-shell {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
}
.inventory-count-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  color: #fff;
  background: #083f48;
  border-radius: 8px;
}
.inventory-count-hero h2 {
  margin: 5px 0 6px;
  color: #fff;
  font-size: 28px;
}
.inventory-count-hero p {
  max-width: 650px;
  margin: 0;
  color: rgba(255,255,255,.78);
}
.inventory-count-hero .section-kicker { color: #80e1df; }
.inventory-count-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.inventory-count-hero-actions > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.inventory-count-hero-actions .primary-btn {
  color: #06353c;
  background: #fff;
  border-color: #fff;
}
.inventory-count-hero-actions .secondary-link {
  color: #fff;
  background: transparent;
  border-color: rgba(255,255,255,.35);
}
.inventory-count-hero-actions svg { width: 18px; height: 18px; }
.inventory-count-form { display: grid; gap: 16px; }
.inventory-scan-panel {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(18, 50, 62, .06);
}
.inventory-scan-input-wrap {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.inventory-scan-input-wrap > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  border-radius: 8px;
}
.inventory-scan-input-wrap > span svg { width: 24px; height: 24px; }
.inventory-scan-input-wrap label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}
.inventory-scan-input-wrap input {
  height: 48px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 17px;
  font-weight: 750;
  text-transform: uppercase;
}
.inventory-scan-input-wrap .primary-btn { min-height: 48px; }
.inventory-scan-feedback {
  min-height: 22px;
  margin: 10px 0 0 60px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.inventory-scan-feedback.is-success { color: #14734c; }
.inventory-scan-feedback.is-error { color: #b63737; }
.inventory-count-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.inventory-count-metrics article {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.inventory-count-metrics article > span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
  border-radius: 8px;
}
.inventory-count-metrics svg { width: 20px; height: 20px; }
.inventory-count-metrics article > div { display: grid; gap: 2px; }
.inventory-count-metrics small { color: var(--muted); font-size: 11px; font-weight: 750; }
.inventory-count-metrics strong { color: var(--ink); font-size: 23px; }
.inventory-count-list-panel { padding: 20px; }
.inventory-count-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}
.inventory-count-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.inventory-count-empty[hidden] { display: none; }
.inventory-count-empty svg {
  width: 38px;
  height: 38px;
  color: var(--accent);
}
.inventory-count-empty h3 { margin: 10px 0 3px; color: var(--ink); }
.inventory-count-empty p { margin: 0; }
.inventory-count-row {
  display: grid;
  grid-template-columns: 54px minmax(180px, 1fr) 90px 140px 68px 38px;
  gap: 13px;
  align-items: center;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.inventory-count-row > img {
  width: 54px;
  height: 46px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.inventory-count-product,
.inventory-count-expected {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.inventory-count-product strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-count-product small,
.inventory-count-expected small { color: var(--muted); font-size: 11px; }
.inventory-count-expected strong { color: var(--ink); font-size: 18px; }
.inventory-count-quantity {
  display: grid;
  grid-template-columns: 36px 58px 36px;
  gap: 4px;
}
.inventory-count-quantity button,
.inventory-count-quantity input {
  width: 100%;
  height: 38px;
  padding: 0;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.inventory-count-quantity button {
  color: var(--accent);
  background: var(--soft);
  cursor: pointer;
  font-size: 19px;
  font-weight: 850;
}
.inventory-count-quantity input { color: var(--ink); font-weight: 850; }
.inventory-difference {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  padding: 6px 9px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}
.inventory-difference.is-zero { color: #52656d; background: #f1f5f6; border-color: #dce5e8; }
.inventory-difference.is-positive { color: #14734c; background: #e7f7ef; border-color: #bce8d0; }
.inventory-difference.is-negative { color: #b63737; background: #fff0f0; border-color: #efc3c3; }
.inventory-count-complete {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr) auto;
  gap: 18px;
  align-items: end;
  padding: 20px;
}
.inventory-count-complete > label:first-child {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.inventory-count-confirm { align-self: center; line-height: 1.4; }
.inventory-count-complete .primary-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
}
.inventory-count-complete svg { width: 18px; height: 18px; }
.inventory-count-history { margin-bottom: 20px; }
.inventory-count-detail-modal {
  width: min(980px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  overflow: auto;
}
.inventory-count-detail-notes {
  margin: 18px 22px 0;
  padding: 13px 15px;
  color: var(--ink);
  background: var(--soft);
  border-radius: 8px;
}
.inventory-count-detail-modal .table-wrap { margin: 20px; }
.inventory-camera-overlay { z-index: 190; }
.inventory-camera-modal {
  width: min(620px, calc(100vw - 24px));
  overflow: hidden;
}
.inventory-camera-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 18px 20px 10px;
  overflow: hidden;
  background: #07171b;
  border-radius: 8px;
}
.inventory-camera-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.inventory-camera-target {
  position: absolute;
  inset: 16%;
  border: 3px solid #7ee5df;
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(0,0,0,.25);
}
.inventory-camera-status {
  min-height: 22px;
  margin: 0 20px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}
.inventory-camera-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px 20px;
}

@media (max-width: 900px) {
  .inventory-count-row {
    grid-template-columns: 48px minmax(150px, 1fr) 74px 134px;
  }
  .inventory-count-row > img { width: 48px; }
  .inventory-count-row > .inventory-difference { grid-column: 3; justify-self: start; }
  .inventory-count-row > .icon-action { grid-column: 4; justify-self: end; }
  .inventory-count-complete { grid-template-columns: 1fr 1fr; }
  .inventory-count-complete > label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
  .inventory-count-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 22px 18px;
  }
  .inventory-count-hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .inventory-scan-input-wrap {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .inventory-scan-input-wrap > span { width: 42px; height: 48px; }
  .inventory-scan-input-wrap .primary-btn { grid-column: 1 / -1; }
  .inventory-scan-feedback { margin-left: 0; }
  .inventory-count-metrics { grid-template-columns: 1fr; }
  .inventory-count-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 10px;
  }
  .inventory-count-row > img { width: 46px; height: 42px; }
  .inventory-count-row > .inventory-count-expected { grid-column: 2; }
  .inventory-count-row > .inventory-count-quantity { grid-column: 2; }
  .inventory-count-row > .inventory-difference { grid-column: 3; grid-row: 2; }
  .inventory-count-row > .icon-action { grid-column: 3; grid-row: 3; }
  .inventory-count-complete { grid-template-columns: 1fr; }
  .inventory-count-complete > label:first-child { grid-column: auto; }
  .inventory-count-complete .primary-btn { justify-content: center; }
}
@media (max-width: 430px) {
  .inventory-count-hero-actions { grid-template-columns: 1fr; }
  .inventory-count-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .inventory-count-row > .inventory-difference,
  .inventory-count-row > .icon-action { grid-column: 2; grid-row: auto; justify-self: end; }
  .inventory-camera-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
/* Mantenedor central de proveedores */
.supplier-maintainer { padding: 0; overflow: hidden; }
.supplier-maintainer-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 28px 30px;
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
  border-bottom: 1px solid var(--line);
}
.supplier-maintainer-hero h2 {
  margin: 5px 0 6px;
  color: var(--ink);
  font-size: 26px;
}
.supplier-maintainer-hero p { margin: 0; color: var(--muted); }
.supplier-maintainer-hero .primary-link,
.supplier-form .primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.supplier-maintainer-hero svg,
.supplier-form .primary-btn svg { width: 17px; height: 17px; }
.supplier-maintainer-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.supplier-maintainer-metrics > div {
  display: grid;
  gap: 2px;
  padding: 17px 30px;
  border-right: 1px solid var(--line);
}
.supplier-maintainer-metrics > div:last-child { border-right: 0; }
.supplier-maintainer-metrics strong { color: var(--ink); font-size: 22px; }
.supplier-maintainer-metrics span { color: var(--muted); font-size: 12px; font-weight: 750; }
.supplier-filter-form { margin: 20px 24px; }
.supplier-filter-form label:first-child { min-width: min(420px, 100%); }
.supplier-table td > strong,
.supplier-table td > small { display: block; }
.supplier-table td > small { margin-top: 3px; color: var(--muted); }
.supplier-product-count {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  color: var(--accent);
  font-weight: 850;
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
  border-radius: 50%;
}
.supplier-maintainer > .pagination-bar { padding: 16px 24px 22px; }
.supplier-modal {
  width: min(820px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}
.supplier-form { padding: 24px; }
.supplier-code-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 7px;
}
.supplier-code-control input {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 750;
  text-transform: uppercase;
}
.supplier-code-control .icon-action { width: 42px; height: 42px; }
.supplier-code-control svg { width: 17px; height: 17px; }

@media (max-width: 680px) {
  .supplier-maintainer-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 22px 18px;
  }
  .supplier-maintainer-hero .primary-link { justify-content: center; }
  .supplier-maintainer-metrics > div { padding: 14px 16px; }
  .supplier-maintainer-metrics strong { font-size: 18px; }
  .supplier-maintainer-metrics span { font-size: 10px; }
  .supplier-filter-form { margin: 16px; }
  .supplier-form { padding: 18px; }
}
/* Alta rapida de proveedor desde productos */
.quick-supplier-picker {
  display: grid;
  gap: 7px;
}
.quick-supplier-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quick-supplier-picker-head > label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.quick-supplier-picker-head .secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.quick-supplier-picker-head svg { width: 15px; height: 15px; }
.quick-supplier-picker > small { color: var(--muted); }
.quick-supplier-result {
  min-height: 18px;
  color: #14734c;
  font-size: 12px;
  font-weight: 750;
}
.quick-supplier-overlay { z-index: 185; }
.quick-supplier-modal {
  width: min(680px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}
.quick-supplier-modal .modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
}
.quick-supplier-form { padding: 22px; }
.quick-supplier-feedback {
  min-height: 22px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.quick-supplier-feedback.is-error { color: #b63737; }
.quick-supplier-form .settings-actions {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 560px) {
  .quick-supplier-picker-head {
    align-items: stretch;
    flex-direction: column;
  }
  .quick-supplier-picker-head .secondary-btn { justify-content: center; }
  .quick-supplier-form { padding: 17px; }
}
/* Alta rapida de marca desde productos */
.quick-brand-picker {
  display: grid;
  gap: 7px;
}
.quick-brand-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.quick-brand-picker-head > label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.quick-brand-picker-head .secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.quick-brand-picker-head svg { width: 14px; height: 14px; }
.quick-brand-picker > small { color: var(--muted); }
.quick-brand-result {
  min-height: 18px;
  color: #14734c;
  font-size: 12px;
  font-weight: 750;
}
.quick-brand-overlay { z-index: 186; }
.quick-brand-modal {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}
.quick-brand-modal .modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
}
.quick-brand-form {
  display: grid;
  gap: 15px;
  padding: 22px;
}
.quick-brand-form > label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.quick-brand-feedback {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.quick-brand-feedback.is-error { color: #b63737; }
.quick-brand-form .settings-actions {
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

@media (max-width: 560px) {
  .quick-brand-picker-head {
    align-items: stretch;
    flex-direction: column;
  }
  .quick-brand-picker-head .secondary-btn { justify-content: center; }
  .quick-brand-form { padding: 17px; }
}
/* CoreGest AdminLTE shell */
.adminlte-coregest.app-body {
  display: block;
  min-height: 100vh;
  background: #f4f6f9;
}

.adminlte-coregest .wrapper {
  min-height: 100vh;
}

.adminlte-coregest .main-sidebar {
  position: fixed;
  width: 250px;
  padding: 0;
  border-right: 0;
  background: #343a40;
  box-shadow: none;
}

.adminlte-coregest .main-sidebar .sidebar {
  position: static;
  width: auto;
  min-height: auto;
  height: calc(100vh - 57px);
  padding: 0 .5rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow-y: auto;
}

.adminlte-coregest .brand-link {
  display: block;
  border-bottom: 1px solid #4b545c;
}

.adminlte-coregest .brand-link .brand-image {
  width: 34px;
  height: 34px;
  object-fit: cover;
  margin-top: -3px;
}

.adminlte-coregest .coregest-user-initial {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  background: #007bff;
  color: #fff;
  font-weight: 700;
}

.adminlte-coregest .coregest-nav-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.adminlte-coregest .nav-sidebar .nav-link {
  display: flex !important;
  min-height: 40px;
  align-items: center !important;
  gap: .45rem;
  white-space: nowrap;
}

.adminlte-coregest .nav-sidebar .nav-link > .nav-icon {
  flex: 0 0 1.6rem !important;
  width: 1.6rem !important;
  min-width: 1.6rem !important;
  margin: 0 .15rem 0 0 !important;
  text-align: center;
  line-height: 1 !important;
}

.adminlte-coregest .nav-sidebar .nav-link > p {
  display: flex !important;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  margin: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adminlte-coregest .nav-sidebar .nav-link > p > .right {
  position: static !important;
  margin-left: auto !important;
  transform: none !important;
}

.adminlte-coregest .nav-sidebar .nav-treeview .nav-link {
  min-height: 36px;
  padding-left: 1.2rem !important;
  font-size: .94rem;
}

.adminlte-coregest .nav-sidebar .nav-treeview .nav-icon {
  color: rgba(255,255,255,.68);
  font-size: .92rem !important;
}

.adminlte-coregest .nav-sidebar .nav-treeview .nav-link.active .nav-icon {
  color: #fff;
}

.adminlte-coregest .nav-sidebar .coregest-sidebar-processes,
.adminlte-coregest .nav-sidebar .coregest-sidebar-nested {
  margin: .15rem 0 .35rem;
}

.adminlte-coregest .nav-sidebar .coregest-sidebar-processes .nav-link,
.adminlte-coregest .nav-sidebar .coregest-sidebar-nested .nav-link {
  min-height: 34px;
  padding-left: 2.05rem !important;
  padding-right: .55rem !important;
  font-size: .88rem;
}

.adminlte-coregest .nav-sidebar .coregest-sidebar-processes .nav-icon,
.adminlte-coregest .nav-sidebar .coregest-sidebar-nested .nav-icon {
  flex-basis: 1.35rem !important;
  width: 1.35rem !important;
  min-width: 1.35rem !important;
  color: rgba(255,255,255,.72);
}

.adminlte-coregest .nav-sidebar .coregest-sidebar-processes .coregest-nav-svg svg,
.adminlte-coregest .nav-sidebar .coregest-sidebar-nested .coregest-nav-svg svg {
  width: 1rem;
  height: 1rem;
}

.adminlte-coregest .coregest-nav-svg svg,
.adminlte-coregest .info-box-icon svg,
.adminlte-coregest .small-box .icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.adminlte-coregest .small-box .icon svg {
  width: 70px;
  height: 70px;
  opacity: .2;
}

.adminlte-coregest .content-wrapper {
  min-height: 100vh;
  background: #f4f6f9;
}

.adminlte-coregest .content > .container-fluid {
  padding-bottom: 24px;
}

.adminlte-coregest .panel {
  border: 0;
  border-radius: .25rem;
  background: #fff;
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
}

.adminlte-coregest .config-submodule-nav {
  margin-bottom: 1rem;
  border: 1px solid #dee2e6;
  background: #fff;
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.12);
}

.adminlte-coregest .config-submodule-nav a.active {
  background: #007bff;
  color: #fff;
}

.adminlte-coregest .coregest-maintainer-box {
  display: block;
  color: #1f2937;
  border: 1px solid #dee2e6;
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
}

.adminlte-coregest .coregest-maintainer-box:hover {
  color: #1f2937;
  transform: translateY(-1px);
}

.adminlte-coregest .coregest-maintainer-box .inner span {
  display: block;
  min-height: 42px;
  color: #6c757d;
  font-size: 13px;
}

.adminlte-coregest .coregest-maintainer-box .small-box-footer {
  background: rgba(0,0,0,.06);
  color: #495057;
}

.adminlte-coregest .coregest-nav-card {
  position: relative;
  display: grid;
  min-height: 132px;
  margin-bottom: 1rem;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  gap: .75rem .9rem;
  align-items: start;
  overflow: hidden;
  border: 1px solid #dbe4ee;
  border-left: 4px solid #087f8c;
  border-radius: .35rem;
  background: #fff;
  color: #172033;
  box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 18px rgba(16,24,40,.07);
  padding: 1rem;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.adminlte-coregest .coregest-nav-card:hover,
.adminlte-coregest .coregest-nav-card:focus {
  color: #172033;
  border-color: #087f8c;
  box-shadow: 0 3px 8px rgba(16,24,40,.08), 0 14px 28px rgba(16,24,40,.11);
  text-decoration: none;
  transform: translateY(-2px);
}

.adminlte-coregest .coregest-nav-card-icon {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: .35rem;
  background: #eef8f8;
  color: #087f8c;
}

.adminlte-coregest .coregest-nav-card-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: currentColor;
}

.adminlte-coregest .coregest-nav-card-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .25rem;
}

.adminlte-coregest .coregest-nav-card-title {
  color: #111827;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}

.adminlte-coregest .coregest-nav-card-text {
  color: #5b6778;
  font-size: .9rem;
  line-height: 1.35;
}

.adminlte-coregest .coregest-nav-card-meta {
  margin-top: .15rem;
  color: #087f8c;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.adminlte-coregest .coregest-nav-card-count {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 999px;
  background: #f1f5f9;
  color: #172033;
  padding: .35rem .75rem;
  text-align: center;
  line-height: 1;
}

.adminlte-coregest .coregest-nav-card-count strong {
  display: block;
  font-size: .95rem;
  font-weight: 800;
}

.adminlte-coregest .coregest-nav-card-count small {
  display: block;
  max-width: 82px;
  margin-top: .18rem;
  color: #64748b;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  text-transform: uppercase;
}

.adminlte-coregest .coregest-nav-card-action {
  display: inline-flex;
  grid-column: 2 / 4;
  align-items: center;
  gap: .45rem;
  color: #087f8c;
  font-size: .86rem;
  font-weight: 700;
}

.adminlte-coregest .coregest-nav-card-action i {
  font-size: .78rem;
}

@media (max-width: 575.98px) {
  .adminlte-coregest .coregest-nav-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .adminlte-coregest .coregest-nav-card-icon {
    width: 48px;
    height: 48px;
  }

  .adminlte-coregest .coregest-nav-card-count {
    grid-column: 1 / 2;
    grid-row: 2;
    justify-self: start;
  }

  .adminlte-coregest .coregest-nav-card-action {
    grid-column: 2 / 3;
  }
}

/* AdminLTE normalization for legacy OptiGest/CoreGest views */
.adminlte-coregest {
  --accent: #007bff;
  --accent-dark: #0069d9;
  --line: #dee2e6;
  --ink: #212529;
  --muted: #6c757d;
  color: #212529;
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.adminlte-coregest a {
  color: #007bff;
}

.adminlte-coregest .panel,
.adminlte-coregest .modal-card,
.adminlte-coregest .chat-panel,
.adminlte-coregest .config-module,
.adminlte-coregest .db-setup-card,
.adminlte-coregest .database-admin-card,
.adminlte-coregest .agreement-card,
.adminlte-coregest .category-admin-panel,
.adminlte-coregest .maintainer-quick-panel,
.adminlte-coregest .maintainer-table-panel {
  border: 0 !important;
  border-radius: .25rem !important;
  background: #fff !important;
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2) !important;
}

.adminlte-coregest .panel,
.adminlte-coregest .config-module,
.adminlte-coregest .maintainer-table-panel {
  margin-bottom: 1rem;
  padding: 0 !important;
  overflow: hidden;
}

.adminlte-coregest .panel > :not(.panel-title-row):not(.table-wrap):not(form):not(.modal-head),
.adminlte-coregest .config-module > :not(.panel-title-row):not(.table-wrap):not(form),
.adminlte-coregest .maintainer-table-panel > :not(.panel-title-row):not(.table-wrap):not(form) {
  margin-left: 1.25rem;
  margin-right: 1.25rem;
}

.adminlte-coregest .panel-title-row,
.adminlte-coregest .dashboard-panel-head,
.adminlte-coregest .modal-head,
.adminlte-coregest .db-section-head {
  min-height: 48px;
  margin: 0 !important;
  padding: .75rem 1.25rem !important;
  border-bottom: 1px solid rgba(0,0,0,.125) !important;
  background: #fff !important;
}

.adminlte-coregest .panel-title-row h2,
.adminlte-coregest .dashboard-panel-head h2,
.adminlte-coregest .modal-head h2,
.adminlte-coregest .db-section-head h2,
.adminlte-coregest .panel h2 {
  margin: 0;
  color: #212529;
  font-size: 1.1rem !important;
  font-weight: 600;
  line-height: 1.4;
}

.adminlte-coregest .section-kicker {
  color: #6c757d !important;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.adminlte-coregest .crud-form,
.adminlte-coregest .crud-form.compact,
.adminlte-coregest .settings-form,
.adminlte-coregest .profile-form,
.adminlte-coregest .catalog-editor,
.adminlte-coregest .db-setup-form {
  padding: 1.25rem !important;
  gap: 1rem !important;
}

.adminlte-coregest label:not(.inline-check) {
  color: #495057 !important;
  font-size: .875rem !important;
  font-weight: 600 !important;
}

.adminlte-coregest input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.adminlte-coregest select,
.adminlte-coregest textarea {
  display: block;
  width: 100%;
  min-height: calc(2.25rem + 2px) !important;
  padding: .375rem .75rem !important;
  border: 1px solid #ced4da !important;
  border-radius: .25rem !important;
  color: #495057 !important;
  background-color: #fff !important;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 transparent !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.adminlte-coregest textarea {
  min-height: 90px !important;
}

.adminlte-coregest input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
.adminlte-coregest select:focus,
.adminlte-coregest textarea:focus {
  border-color: #80bdff !important;
  outline: 0;
  box-shadow: 0 0 0 .2rem rgba(0,123,255,.25) !important;
}

.adminlte-coregest input[type="file"] {
  min-height: auto !important;
  padding: .375rem .75rem !important;
}

.adminlte-coregest input[type="color"] {
  width: 3rem !important;
  height: calc(2.25rem + 2px) !important;
  padding: .125rem !important;
  border: 1px solid #ced4da !important;
  border-radius: .25rem !important;
  background: #fff !important;
}

.adminlte-coregest .inline-check,
.adminlte-coregest label:has(> input[type="checkbox"]),
.adminlte-coregest label:has(> input[type="radio"]) {
  position: relative;
  display: inline-flex !important;
  min-height: 1.5rem !important;
  align-items: center !important;
  gap: .5rem !important;
  margin: .25rem 0 !important;
  padding: .35rem .65rem .35rem 2.25rem !important;
  border: 1px solid #dee2e6 !important;
  border-radius: .25rem !important;
  color: #495057 !important;
  background: #f8f9fa !important;
  font-size: .875rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  cursor: pointer;
}

.adminlte-coregest input[type="checkbox"],
.adminlte-coregest input[type="radio"] {
  position: absolute;
  left: .7rem;
  width: 1rem !important;
  height: 1rem !important;
  min-height: 1rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #adb5bd;
  accent-color: #007bff;
  cursor: pointer;
}

.adminlte-coregest .permissions-grid label,
.adminlte-coregest .public-page-switches .inline-check {
  width: auto;
}

.adminlte-coregest .primary-btn,
.adminlte-coregest .primary-link,
.adminlte-coregest .secondary-btn,
.adminlte-coregest .secondary-link,
.adminlte-coregest .danger-btn,
.adminlte-coregest .danger-link,
.adminlte-coregest button:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle) {
  display: inline-flex !important;
  min-height: calc(2.25rem + 2px) !important;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: .375rem .75rem !important;
  border-radius: .25rem !important;
  box-shadow: none !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  text-decoration: none !important;
  transform: none !important;
}

.adminlte-coregest .primary-btn,
.adminlte-coregest .primary-link,
.adminlte-coregest button:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle) {
  border: 1px solid #007bff !important;
  color: #fff !important;
  background: #007bff !important;
}

.adminlte-coregest .primary-btn:hover,
.adminlte-coregest .primary-link:hover,
.adminlte-coregest button:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle):hover {
  border-color: #0062cc !important;
  color: #fff !important;
  background: #0069d9 !important;
}

.adminlte-coregest .secondary-btn,
.adminlte-coregest .secondary-link,
.adminlte-coregest .primary-btn.outline,
.adminlte-coregest .primary-link.outline {
  border: 1px solid #6c757d !important;
  color: #6c757d !important;
  background: transparent !important;
}

.adminlte-coregest .secondary-btn:hover,
.adminlte-coregest .secondary-link:hover,
.adminlte-coregest .primary-btn.outline:hover,
.adminlte-coregest .primary-link.outline:hover {
  color: #fff !important;
  background: #6c757d !important;
}

.adminlte-coregest .danger-btn,
.adminlte-coregest .danger-link,
.adminlte-coregest button[style*="--red"],
.adminlte-coregest button[style*="color: var(--red)"] {
  border: 1px solid #dc3545 !important;
  color: #fff !important;
  background: #dc3545 !important;
}

.adminlte-coregest .danger-btn:hover,
.adminlte-coregest .danger-link:hover {
  border-color: #bd2130 !important;
  color: #fff !important;
  background: #c82333 !important;
}

.adminlte-coregest .filter-row,
.adminlte-coregest .datatable-toolbar {
  margin: 0 !important;
  padding: 1rem 1.25rem !important;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
}

.adminlte-coregest .table-wrap,
.adminlte-coregest .recipes-table-wrap,
.adminlte-coregest .public-pages-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  overflow-x: auto;
}

.adminlte-coregest table {
  width: 100%;
  margin-bottom: 0 !important;
  color: #212529;
  border-collapse: collapse !important;
  background: #fff;
}

.adminlte-coregest table th,
.adminlte-coregest table td {
  padding: .75rem !important;
  border-top: 1px solid #dee2e6 !important;
  vertical-align: middle !important;
}

.adminlte-coregest table thead th {
  border-bottom: 2px solid #dee2e6 !important;
  color: #495057 !important;
  background: #f8f9fa !important;
  font-size: .875rem !important;
  font-weight: 700 !important;
}

.adminlte-coregest table tbody tr:hover {
  background-color: rgba(0,0,0,.035);
}

.adminlte-coregest .badge {
  display: inline-block !important;
  padding: .25em .4em !important;
  border-radius: .25rem !important;
  font-size: 75% !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
}

.adminlte-coregest .badge.green,
.adminlte-coregest .badge.active,
.adminlte-coregest .badge-success {
  color: #fff !important;
  background-color: #28a745 !important;
}

.adminlte-coregest .badge.red,
.adminlte-coregest .badge.inactive,
.adminlte-coregest .badge-danger {
  color: #fff !important;
  background-color: #dc3545 !important;
}

.adminlte-coregest .empty-state {
  color: #6c757d !important;
}

.adminlte-coregest .modal-overlay {
  inset: 0 !important;
  z-index: 2050 !important;
  align-items: flex-start !important;
  padding: 86px 18px 24px !important;
  overflow-y: auto !important;
  background: rgba(0,0,0,.5) !important;
}

.adminlte-coregest .modal-card {
  max-width: 800px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 0 !important;
}

.adminlte-coregest .modal-head {
  margin: 0 !important;
  border-radius: 0 !important;
}

.adminlte-coregest .coregest-company-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid #dee2e6;
  border-radius: 7px;
  background: #fff;
}

.adminlte-coregest .coregest-company-switcher i {
  color: #0f766e;
}

.adminlte-coregest .coregest-company-switcher select {
  width: min(190px, 34vw);
  min-height: 30px;
  padding: 3px 6px;
  border: 0;
  color: #343a40;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 640px) {
  .adminlte-coregest .coregest-company-switcher {
    padding: 3px 5px;
  }

  .adminlte-coregest .coregest-company-switcher select {
    width: 120px;
    font-size: 11px;
  }
}

.adminlte-coregest .accounting-entry-modal {
  width: min(1080px, calc(100vw - 32px));
  max-width: 1080px;
  max-height: calc(100vh - 110px);
}

.adminlte-coregest .accounting-entry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 1rem 1.25rem 1.25rem;
}

.adminlte-coregest .accounting-entry-form .span-2 {
  grid-column: 1 / -1;
}

.adminlte-coregest .accounting-entry-form textarea {
  min-height: 112px;
}

.adminlte-coregest .modal-action-row {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 4px -1.25rem -1.25rem;
  padding: 14px 1.25rem;
  border-top: 1px solid #dee2e6;
  background: #fff;
  box-shadow: 0 -12px 24px rgba(15, 23, 42, .08);
}

.adminlte-coregest .modal-action-row .primary-btn {
  min-width: 150px;
  justify-content: center;
}

.adminlte-coregest .account-picker {
  display: grid;
  gap: 8px;
}

.adminlte-coregest .account-picker input[type="search"] {
  min-height: 40px;
}

.adminlte-coregest .account-picker select {
  width: 100%;
  min-height: 168px;
  padding: 6px;
  font-family: Consolas, "Liberation Mono", monospace;
}

.adminlte-coregest .account-picker option {
  padding: 7px 8px;
}

.adminlte-coregest .accounting-table-scroll {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.adminlte-coregest .accounting-table-scroll table {
  width: max-content !important;
  min-width: 1450px;
}

.adminlte-coregest .accounting-table-scroll .datatable-toolbar,
.adminlte-coregest .accounting-table-scroll .datatable-pager,
.adminlte-coregest .accounting-table-scroll .dataTables_wrapper {
  min-width: 1450px;
}

.adminlte-coregest .accounting-distribution-modal {
  width: min(1320px, calc(100vw - 28px));
  max-width: 1320px;
}

.adminlte-coregest .accounting-distribution-form {
  padding: 1rem 1.25rem 1.25rem;
}

.adminlte-coregest .accounting-distribution-lines {
  display: grid;
  gap: 10px;
}

.adminlte-coregest .accounting-distribution-line {
  display: grid;
  grid-template-columns: 120px minmax(320px, 1fr) 150px minmax(220px, .8fr) 44px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #f8f9fa;
}

.adminlte-coregest .accounting-distribution-line label {
  margin: 0;
}

.adminlte-coregest .accounting-distribution-line .account-picker select {
  min-height: 132px;
}

.adminlte-coregest .accounting-add-line-btn {
  margin-top: 12px;
}

.adminlte-coregest .accounting-distribution-totals {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #fff;
}

.adminlte-coregest .accounting-distribution-totals span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-width: 170px;
  justify-content: space-between;
  color: #495057;
  font-weight: 700;
}

.adminlte-coregest .accounting-legacy-account-field {
  display: none !important;
}

.adminlte-coregest .accounting-due-panel {
  overflow: hidden;
}

.adminlte-coregest .accounting-due-summary {
  cursor: pointer;
  list-style: none;
  margin: 0;
  padding: 18px 20px;
}

.adminlte-coregest .accounting-due-summary::-webkit-details-marker {
  display: none;
}

.adminlte-coregest .accounting-due-summary h2 {
  margin: 0;
}

.adminlte-coregest .accounting-due-summary small {
  color: var(--muted);
  display: block;
  font-weight: 600;
  margin-top: 3px;
}

.adminlte-coregest .accounting-due-summary-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.adminlte-coregest .accounting-due-toggle {
  pointer-events: none;
}

.adminlte-coregest .accounting-due-toggle i {
  transition: transform 0.18s ease;
}

.adminlte-coregest .accounting-due-panel[open] .accounting-due-toggle i {
  transform: rotate(180deg);
}

.adminlte-coregest .accounting-due-panel[open] .accounting-due-toggle::after {
  content: " abierto";
  font-size: 0;
}

.adminlte-coregest .accounting-due-body {
  border-top: 1px solid var(--border);
}

.adminlte-coregest .accounting-due-body .inline-action-form {
  margin: 0;
}

.adminlte-coregest .accounting-due-paid-btn {
  min-height: 32px;
  padding: 7px 10px;
  white-space: nowrap;
}

.adminlte-coregest .workflow-history-detail {
  display: grid;
  gap: 8px;
}

.adminlte-coregest .workflow-history-detail h4 {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  margin: 0;
}

.adminlte-coregest .workflow-history-detail ul {
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.adminlte-coregest .workflow-history-detail li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.adminlte-coregest .workflow-history-detail li strong {
  color: var(--text);
  font-weight: 850;
}

.adminlte-coregest .workflow-history-user-note {
  border-left: 3px solid var(--accent);
  color: var(--text);
  display: grid;
  gap: 5px;
  margin-top: 2px;
  padding-left: 10px;
}

.adminlte-coregest .workflow-history-user-note > strong {
  font-size: 12px;
}

.adminlte-coregest .account-auto-usage-panel .panel-title-row {
  border-bottom: 1px solid #dee2e6;
}

.adminlte-coregest .account-auto-usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 1rem 1.25rem;
}

.adminlte-coregest .account-auto-usage-grid article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #f8f9fa;
}

.adminlte-coregest .account-auto-usage-grid strong {
  color: #212529;
  font-size: .95rem;
}

.adminlte-coregest .account-auto-usage-grid span {
  color: #6c757d;
  font-size: .84rem;
  line-height: 1.35;
}

.adminlte-coregest .account-auto-config-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #dee2e6;
}

.adminlte-coregest .account-auto-config-form label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.adminlte-coregest .account-auto-config-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 7px 9px;
  color: #1f2937;
  background: #fff;
}

.adminlte-coregest .account-auto-config-form .primary-btn {
  width: 100%;
  justify-content: center;
}

.adminlte-coregest .account-auto-disable-form {
  margin: 0;
}

.adminlte-coregest .account-auto-disable-form .primary-btn {
  width: 100%;
  justify-content: center;
  border-color: #fecaca !important;
  color: #991b1b !important;
  background: #fff7f7 !important;
}

.adminlte-coregest .account-auto-disable-form .primary-btn:hover {
  color: #fff !important;
  background: #dc3545 !important;
  border-color: #dc3545 !important;
}

.adminlte-coregest .account-auto-pill {
  display: inline-flex;
  width: fit-content;
  max-width: 280px;
  margin: 2px 4px 2px 0;
  padding: 4px 7px;
  border: 1px solid #cfe2ff;
  border-radius: 999px;
  color: #084298;
  background: #e7f1ff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

@media (max-width: 760px) {
  .adminlte-coregest .modal-overlay {
    padding: 72px 10px 16px !important;
  }

  .adminlte-coregest .modal-card,
  .adminlte-coregest .accounting-entry-modal {
    max-height: calc(100vh - 88px);
  }

  .adminlte-coregest .accounting-entry-form {
    grid-template-columns: 1fr;
  }

  .adminlte-coregest .accounting-entry-form .span-2 {
    grid-column: auto;
  }

  .adminlte-coregest .modal-action-row {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .adminlte-coregest .modal-action-row .primary-btn {
    width: 100%;
  }

  .adminlte-coregest .accounting-distribution-line {
    grid-template-columns: 1fr;
  }

  .adminlte-coregest .account-auto-usage-grid {
    grid-template-columns: 1fr;
  }
}

.adminlte-coregest .modal-close {
  color: #6c757d !important;
  background: transparent !important;
  font-size: 1.5rem !important;
}

.adminlte-coregest .workflow-modal {
  width: min(1080px, calc(100vw - 32px));
  max-width: 1080px;
}

.adminlte-coregest .workflow-dashboard-modal {
  width: min(760px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}

.adminlte-coregest .workflow-pending-list,
.adminlte-coregest .workflow-file-list,
.adminlte-coregest .workflow-timeline,
.adminlte-coregest .workflow-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.adminlte-coregest .workflow-pending-list a,
.adminlte-coregest .workflow-file-list a,
.adminlte-coregest .workflow-file-row,
.adminlte-coregest .workflow-timeline article,
.adminlte-coregest .workflow-list li {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 7px;
  color: #343a40;
  background: #fff;
}

.adminlte-coregest .workflow-dashboard-modal .workflow-pending-list a {
  grid-template-columns: minmax(0, 1fr);
  border-left: 4px solid #008a8a;
}

.adminlte-coregest .workflow-file-list a {
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
}

.adminlte-coregest .workflow-file-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.adminlte-coregest .workflow-file-row > a {
  padding: 0;
  border: 0;
  background: transparent;
}

.adminlte-coregest .workflow-file-row form {
  margin: 0;
}

.adminlte-coregest .workflow-file-delete {
  display: inline-flex;
  width: 34px;
  min-width: 34px !important;
  height: 34px;
  min-height: 34px !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border-radius: 7px !important;
}

.adminlte-coregest .workflow-pending-list a:hover,
.adminlte-coregest .workflow-file-list a:hover {
  color: #0f766e;
  border-color: #99f6e4;
  text-decoration: none;
}

.adminlte-coregest .workflow-pending-list span,
.adminlte-coregest .workflow-file-list small,
.adminlte-coregest .workflow-timeline span,
.adminlte-coregest .workflow-list span {
  color: #6c757d;
  font-size: 12px;
}

.adminlte-coregest .workflow-timeline article p {
  margin: 0;
}

.adminlte-coregest .workflow-inline-upload {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 420px;
}

.adminlte-coregest .workflow-inline-upload select,
.adminlte-coregest .workflow-inline-upload input[type="file"] {
  width: 100%;
  min-height: 38px;
}

.adminlte-coregest .coregest-task-alert {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  position: relative;
}

.adminlte-coregest .coregest-task-alert .navbar-badge {
  position: static;
  transform: none;
  margin-left: 4px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 6px 14px rgba(245, 158, 11, .25);
}

.adminlte-coregest .workflow-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.adminlte-coregest .workflow-task-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 35, 60, .07);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.adminlte-coregest .workflow-task-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 138, 138, .35);
  box-shadow: 0 20px 42px rgba(15, 35, 60, .12);
}

.adminlte-coregest .workflow-task-card.is-overdue {
  border-left: 4px solid #dc3545;
}

.adminlte-coregest .workflow-task-card-head,
.adminlte-coregest .workflow-task-card-foot,
.adminlte-coregest .workflow-task-progress-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.adminlte-coregest .workflow-task-card-head h3 {
  margin: 4px 0 0;
  color: #102033;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.25;
}

.adminlte-coregest .workflow-task-priority {
  color: #0f766e;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.adminlte-coregest .workflow-task-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.adminlte-coregest .workflow-task-meta span,
.adminlte-coregest .workflow-task-assigned {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #526173;
  font-size: 12px;
  font-weight: 750;
}

.adminlte-coregest .workflow-task-meta span {
  padding: 8px 9px;
  border-radius: 7px;
  background: #f5f8fb;
}

.adminlte-coregest .workflow-task-meta i,
.adminlte-coregest .workflow-task-assigned i {
  color: #008a8a;
}

.adminlte-coregest .workflow-task-client {
  margin: 0;
  color: #6c757d;
  font-size: 13px;
}

.adminlte-coregest .workflow-task-progress {
  display: grid;
  gap: 7px;
}

.adminlte-coregest .workflow-task-progress-label span {
  color: #6c757d;
  font-size: 12px;
  font-weight: 800;
}

.adminlte-coregest .workflow-task-progress-label strong {
  color: #102033;
  font-size: 13px;
}

.adminlte-coregest .workflow-task-card-foot {
  align-items: center;
  padding-top: 2px;
}

.adminlte-coregest .primary-btn.small {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 7px;
  font-size: 12px;
}

.adminlte-coregest .workflow-task-assigned {
  overflow: hidden;
  text-overflow: ellipsis;
}

.adminlte-coregest .workflow-stage-picker {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe6ef;
  border-radius: 8px;
  background: #f8fbfd;
}

.adminlte-coregest .workflow-stage-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.adminlte-coregest .workflow-stage-picker-head h3 {
  margin: 2px 0 0;
  color: #102033;
  font-size: 16px;
  font-weight: 850;
}

.adminlte-coregest .workflow-stage-picker-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.adminlte-coregest .workflow-stage-group-select {
  display: grid !important;
  gap: 6px;
  margin: 0 !important;
  color: #26384d !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

.adminlte-coregest .workflow-stage-group-select select {
  min-height: 40px;
}

.adminlte-coregest .workflow-stage-picker-grid {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(280px, 1fr);
  gap: 14px;
}

.adminlte-coregest .workflow-stage-checks {
  display: grid;
  gap: 7px;
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  border: 1px solid #e1e9f0;
  border-radius: 8px;
  background: #fff;
}

.adminlte-coregest .workflow-stage-check {
  display: flex !important;
  align-items: center;
  gap: 9px;
  margin: 0 !important;
  padding: 8px 9px;
  border-radius: 7px;
  color: #26384d !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.adminlte-coregest .workflow-stage-check:hover {
  background: #f0fdfa;
}

.adminlte-coregest .workflow-stage-check input {
  flex: 0 0 auto;
}

.adminlte-coregest .workflow-stage-group-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid #dbe6ef;
  border-radius: 8px;
  background: #f8fbfd;
}

.adminlte-coregest .workflow-stage-group-checks legend {
  width: auto;
  margin: 0 0 4px;
  padding: 0 6px;
  color: #526173;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.adminlte-coregest .coregest-action-buttons {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.adminlte-coregest .coregest-action-buttons form {
  margin: 0;
}

.adminlte-coregest .primary-btn.danger,
.adminlte-coregest .primary-btn.outline.danger {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff7f7;
}

.adminlte-coregest .primary-btn.danger:hover,
.adminlte-coregest .primary-btn.outline.danger:hover {
  border-color: #ef4444;
  color: #fff;
  background: #dc2626;
}

.adminlte-coregest .workflow-stage-order-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #526173;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.adminlte-coregest .workflow-stage-order {
  display: grid;
  gap: 8px;
  min-height: 96px;
  margin: 0;
  padding: 10px;
  border: 1px dashed #b9c9d8;
  border-radius: 8px;
  background: #fff;
  list-style: none;
}

.adminlte-coregest .workflow-stage-order:empty::before {
  content: "Selecciona etapas para construir la ruta";
  display: block;
  padding: 22px 10px;
  color: #8a98a8;
  text-align: center;
  font-size: 13px;
  font-weight: 750;
}

.adminlte-coregest .workflow-stage-order li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #dce6ef;
  border-radius: 7px;
  background: #f8fafc;
  cursor: grab;
}

.adminlte-coregest .workflow-stage-order li.is-dragging {
  opacity: .55;
}

.adminlte-coregest .workflow-stage-order li span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #102033;
  font-size: 13px;
  font-weight: 850;
}

.adminlte-coregest .workflow-stage-order li button {
  min-width: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border-color: transparent !important;
  color: #9b1c1c !important;
  background: #fee2e2 !important;
}

.adminlte-coregest .workflow-stage-new {
  display: grid;
  gap: 7px;
  margin: 0 !important;
}

.adminlte-coregest .workflow-stage-new > label {
  margin: 0 !important;
  color: #526173 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  text-transform: uppercase;
}

.adminlte-coregest .workflow-stage-new-row {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto;
  gap: 8px;
  align-items: center;
  justify-content: start;
}

.adminlte-coregest .workflow-stage-new-row input {
  min-height: 36px !important;
  padding: 7px 10px !important;
}

.adminlte-coregest .workflow-stage-route {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.adminlte-coregest .workflow-stage-route li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #dce6ef;
  border-radius: 999px;
  color: #526173;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.adminlte-coregest .workflow-stage-route li.is-current {
  border-color: rgba(0, 138, 138, .35);
  color: #0f766e;
  background: #ecfdf5;
}

.adminlte-coregest .workflow-stage-route li small {
  color: inherit;
  opacity: .72;
}

.adminlte-coregest .workflow-stage-route.compact-route {
  gap: 6px;
}

.adminlte-coregest .workflow-stage-flow {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.adminlte-coregest .workflow-stage-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 7px;
  padding: 0 0 14px;
}

.adminlte-coregest .workflow-stage-flow li::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 0;
  left: 10px;
  width: 2px;
  background: #dce6ef;
}

.adminlte-coregest .workflow-stage-flow li:last-child {
  padding-bottom: 0;
}

.adminlte-coregest .workflow-stage-flow li:last-child::before {
  display: none;
}

.adminlte-coregest .workflow-stage-flow-dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid #dce6ef;
  border-radius: 999px;
  color: transparent;
  background: #fff;
}

.adminlte-coregest .workflow-stage-flow li.is-done .workflow-stage-flow-dot {
  border-color: #16a34a;
  color: #fff;
  background: #16a34a;
}

.adminlte-coregest .workflow-stage-flow li.is-current .workflow-stage-flow-dot {
  border-color: #008a8a;
  color: #008a8a;
  background: #ecfdf5;
  box-shadow: 0 0 0 4px rgba(0, 138, 138, .12);
}

.adminlte-coregest .workflow-stage-flow li.is-done::before {
  background: #86efac;
}

.adminlte-coregest .workflow-stage-flow strong,
.adminlte-coregest .workflow-stage-flow small {
  display: block;
}

.adminlte-coregest .workflow-stage-flow strong {
  color: #102033;
  font-size: 12px;
  font-weight: 850;
}

.adminlte-coregest .workflow-stage-flow small {
  margin: 1px 0 5px;
  color: #6c757d;
  font-size: 11px;
  font-weight: 750;
}

.adminlte-coregest .workflow-stage-flow .progress {
  height: 4px;
  margin: 0;
}

.adminlte-coregest .workflow-task-detail-modal {
  width: min(1680px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 112px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.adminlte-coregest .workflow-task-detail-modal *,
.adminlte-coregest .workflow-task-detail-modal *::before,
.adminlte-coregest .workflow-task-detail-modal *::after {
  box-sizing: border-box;
  min-width: 0;
}

.adminlte-coregest .workflow-task-modal-body {
  display: grid;
  grid-template-columns: minmax(250px, .82fr) minmax(360px, 1.08fr) minmax(340px, .9fr);
  grid-template-areas:
    "summary flow form"
    "history files form";
  gap: 12px;
  padding: 12px;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.adminlte-coregest .workflow-task-detail-modal > .workflow-task-modal-body {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.adminlte-coregest .workflow-task-modal-summary,
.adminlte-coregest .workflow-task-modal-form,
.adminlte-coregest .workflow-task-modal-flow,
.adminlte-coregest .workflow-task-modal-section {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dee7ef;
  border-radius: 8px;
  background: #fff;
}

.adminlte-coregest .workflow-task-modal-form {
  padding: 12px;
}

.adminlte-coregest .workflow-task-modal-summary {
  grid-area: summary;
}

.adminlte-coregest .workflow-task-modal-form {
  grid-area: form;
}

.adminlte-coregest .workflow-task-modal-flow {
  grid-area: flow;
}

.adminlte-coregest .workflow-task-modal-body > .workflow-task-modal-history {
  grid-area: history;
}

.adminlte-coregest .workflow-task-modal-body > .workflow-task-modal-files {
  grid-area: files;
}

.adminlte-coregest .workflow-task-modal-summary {
  display: grid;
  gap: 10px;
}

.adminlte-coregest .workflow-task-modal-summary .workflow-task-meta {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.adminlte-coregest .workflow-task-modal-summary p {
  margin: 0;
  color: #526173;
  line-height: 1.5;
}

.adminlte-coregest .workflow-task-modal-facts {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.adminlte-coregest .workflow-task-modal-facts span:not(.badge) {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #526173;
  font-size: 12px;
  font-weight: 800;
}

.adminlte-coregest .workflow-task-modal-facts i {
  color: #008a8a;
}

.adminlte-coregest .workflow-task-modal-form h3,
.adminlte-coregest .workflow-task-modal-flow h3,
.adminlte-coregest .workflow-task-modal-section h3 {
  margin: 0;
  color: #102033;
  font-size: 14px;
  font-weight: 850;
}

.adminlte-coregest .workflow-task-modal-flow {
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.adminlte-coregest .workflow-task-modal-flow .panel-title-row {
  padding: 0;
  border-bottom: 0;
  margin-bottom: 0;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 6px;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow li {
  min-height: 58px;
  padding: 7px;
  border: 1px solid #dce6ef;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow li::before {
  display: none;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow li.is-current {
  border-color: rgba(0, 138, 138, .42);
  background: #ecfdf5;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow li.is-done {
  border-color: rgba(22, 163, 74, .32);
  background: #f0fdf4;
}

.adminlte-coregest .workflow-task-modal-form {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: none;
  overflow: visible;
}

.adminlte-coregest .workflow-task-modal-form .crud-form.compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 0 !important;
  border: 0;
}

.adminlte-coregest .workflow-task-modal-form label:not(.inline-check) {
  gap: 5px;
  margin: 0 !important;
  font-size: 12px !important;
}

.adminlte-coregest .workflow-task-modal-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.adminlte-coregest .workflow-task-modal-form select,
.adminlte-coregest .workflow-task-modal-form textarea {
  min-height: 34px !important;
  padding: 7px 9px !important;
}

.adminlte-coregest .workflow-task-modal-form textarea {
  min-height: 58px !important;
  resize: vertical;
}

.adminlte-coregest .workflow-stage-progress-control {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 7px 10px !important;
  align-items: center;
}

.adminlte-coregest .workflow-stage-progress-control > input[type="range"] {
  grid-column: 1;
  width: 100%;
  min-height: 28px !important;
  padding: 0 !important;
  accent-color: #008a8a;
}

.adminlte-coregest .workflow-stage-progress-control > input[type="number"] {
  grid-column: 2;
  text-align: center;
}

.adminlte-coregest .workflow-stage-completion-note {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #854d0e;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.adminlte-coregest .workflow-stage-completion-note[hidden] {
  display: none !important;
}

.adminlte-coregest .workflow-task-modal-form .crud-form.compact .span-2,
.adminlte-coregest .workflow-task-modal-form .modal-action-row {
  grid-column: auto !important;
}

.adminlte-coregest .workflow-task-modal-form .modal-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 2px;
}

.adminlte-coregest .workflow-task-modal-form .modal-action-row .primary-btn {
  width: 100%;
  justify-content: center;
}

.adminlte-coregest .workflow-upload-open {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.adminlte-coregest .workflow-modal-reassign {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e3ebf2;
}

.adminlte-coregest .workflow-modal-reassign .crud-form.compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0 !important;
  border: 0;
}

.adminlte-coregest .workflow-maintainer-reassign-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.adminlte-coregest .workflow-maintainer-reassign-form select {
  min-height: 34px;
}

.adminlte-coregest .workflow-section-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.adminlte-coregest .workflow-secondary-modal {
  width: min(900px, calc(100vw - 56px));
  max-width: calc(100vw - 56px);
  max-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.adminlte-coregest .workflow-secondary-body {
  padding: 18px;
  overflow-y: auto;
  overflow-x: hidden;
}

.adminlte-coregest .workflow-timeline.compact,
.adminlte-coregest .workflow-file-list.compact {
  padding: 0;
  margin-top: 8px;
  gap: 6px;
}

.adminlte-coregest .workflow-timeline.compact article,
.adminlte-coregest .workflow-file-list.compact a {
  padding: 7px 9px;
}

.adminlte-coregest .workflow-file-list.compact .workflow-file-row {
  padding: 7px 9px;
}

.adminlte-coregest .workflow-file-list.compact .workflow-file-row > a {
  padding: 0;
  border: 0;
  background: transparent;
}

.adminlte-coregest .workflow-timeline.compact article {
  gap: 2px;
}

.adminlte-coregest .workflow-timeline.compact article strong {
  font-size: 12px;
}

.adminlte-coregest .workflow-timeline.compact article span {
  font-size: 11px;
}

.adminlte-coregest .workflow-timeline.compact article p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #526173;
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 1040px) {
  .adminlte-coregest .workflow-task-modal-body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "summary"
      "flow"
      "form"
      "history"
      "files";
  }

  .adminlte-coregest .workflow-task-modal-form {
    position: static;
    max-height: none;
  }

  .adminlte-coregest .workflow-task-modal-form .modal-action-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.adminlte-coregest .dataTables_wrapper {
  padding: 1rem 1.25rem 1.25rem;
}

.adminlte-coregest .dataTables_wrapper .row:first-child,
.adminlte-coregest .dataTables_wrapper .row:last-child {
  align-items: center;
}

.adminlte-coregest .dataTables_wrapper .dataTables_filter input,
.adminlte-coregest .dataTables_wrapper .dataTables_length select {
  min-height: 36px;
  border-radius: 7px;
}

.adminlte-coregest .coregest-datatable-wrap {
  overflow: visible !important;
}

.adminlte-coregest .project-date-line {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #526173;
  font-size: 12px;
  font-weight: 750;
}

.adminlte-coregest .project-date-line + .project-date-line {
  margin-top: 5px;
}

.adminlte-coregest .project-date-line i {
  color: #008a8a;
}

.adminlte-coregest .project-indicator-row,
.adminlte-coregest .project-action-icons {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.adminlte-coregest .project-icon-pill,
.adminlte-coregest .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 38px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d9e5ee;
  border-radius: 8px;
  color: #0f2742;
  background: #fff;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 6px 14px rgba(15, 35, 60, .05);
}

.adminlte-coregest .project-icon-pill i,
.adminlte-coregest .icon-btn i {
  color: #008a8a;
}

.adminlte-coregest .project-icon-pill.warning i {
  color: #f59e0b;
}

.adminlte-coregest .project-icon-pill.info i {
  color: #2563eb;
}

.adminlte-coregest .project-icon-pill:hover,
.adminlte-coregest .icon-btn:hover {
  border-color: rgba(0, 138, 138, .35);
  color: #0f766e;
  text-decoration: none;
  background: #f0fdfa;
}

.adminlte-coregest .project-progress-cell {
  display: grid;
  gap: 6px;
  min-width: 110px;
}

.adminlte-coregest .project-progress-cell small {
  color: #526173;
  font-weight: 800;
}

.adminlte-coregest .project-detail-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

/* Gestion 360: tablas, controles y acciones con contraste consistente. */
.gestion360-module .content-wrapper :where(
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
  select,
  textarea
) {
  color: #172033 !important;
  background-color: #fff !important;
  border: 1px solid #aebdce !important;
  box-shadow: 0 1px 2px rgba(15, 35, 60, .04) !important;
}

.gestion360-module .content-wrapper :where(input, textarea)::placeholder {
  color: #66758a !important;
  opacity: 1 !important;
}

.gestion360-module .content-wrapper :where(input, select, textarea):focus {
  border-color: #087f8c !important;
  box-shadow: 0 0 0 3px rgba(8, 127, 140, .16) !important;
  outline: 0 !important;
}

.gestion360-module .content-wrapper select option {
  color: #172033 !important;
  background: #fff !important;
}

.gestion360-module .content-wrapper :where(.primary-btn, .primary-link, .btn-primary, .btn-info, .g360-primary, .g360-add-btn) {
  border: 1px solid #087f8c !important;
  color: #fff !important;
  background: #087f8c !important;
  font-weight: 750 !important;
}

.gestion360-module .content-wrapper :where(.primary-btn, .primary-link, .btn-primary, .btn-info, .g360-primary, .g360-add-btn):hover {
  border-color: #075f69 !important;
  color: #fff !important;
  background: #075f69 !important;
}

.gestion360-module .content-wrapper .btn-success {
  border-color: #15803d !important;
  color: #fff !important;
  background: #15803d !important;
}

.gestion360-module .content-wrapper :where(.btn-danger, .danger-btn, .danger-link) {
  border-color: #c6283d !important;
  color: #fff !important;
  background: #c6283d !important;
}

.gestion360-module .content-wrapper :where(.btn-outline-primary, .btn-outline-info) {
  border-color: #087f8c !important;
  color: #075f69 !important;
  background: #fff !important;
}

.gestion360-module .content-wrapper :where(.btn-outline-primary, .btn-outline-info):hover {
  color: #fff !important;
  background: #087f8c !important;
}

.gestion360-module .content-wrapper :where(.btn-outline-secondary, .primary-btn.outline, .primary-link.outline, .g360-secondary) {
  border-color: #64748b !important;
  color: #334155 !important;
  background: #fff !important;
}

.gestion360-module .content-wrapper :where(.btn-outline-secondary, .primary-btn.outline, .primary-link.outline, .g360-secondary):hover {
  color: #fff !important;
  background: #475569 !important;
}

.gestion360-module .content-wrapper .btn-outline-success {
  border-color: #15803d !important;
  color: #166534 !important;
  background: #fff !important;
}

.gestion360-module .content-wrapper .btn-outline-success:hover {
  color: #fff !important;
  background: #15803d !important;
}

.gestion360-module .content-wrapper :where(.btn-outline-danger, .g360-danger, .g360-row-delete, .g360-option-delete) {
  border-color: #c6283d !important;
  color: #b42336 !important;
  background: #fff !important;
}

.gestion360-module .content-wrapper :where(.btn-outline-danger, .g360-danger, .g360-row-delete, .g360-option-delete):hover {
  color: #fff !important;
  background: #c6283d !important;
}

.gestion360-module .content-wrapper :where(button, a) > i {
  color: inherit !important;
}

.gestion360-module .content-wrapper .btn-sm {
  min-width: 36px;
  min-height: 34px !important;
  padding: 5px 9px !important;
}

.gestion360-module .content-wrapper :where(.g360-row-actions, td.actions, .project-action-icons) {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gestion360-module .content-wrapper td.actions > a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #087f8c;
  border-radius: 7px;
  color: #075f69;
  background: #fff;
  font-weight: 750;
  text-decoration: none;
}

.gestion360-module .content-wrapper td.actions > a:hover {
  color: #fff;
  background: #087f8c;
}

.gestion360-module .content-wrapper td.actions {
  min-width: 148px;
}

.gestion360-module .content-wrapper td.actions form button {
  min-height: 34px !important;
  padding: 6px 10px !important;
  border: 1px solid #c6283d !important;
  border-radius: 7px !important;
  color: #b42336 !important;
  background: #fff !important;
  font-weight: 750 !important;
}

.gestion360-module .content-wrapper td.actions form button:hover {
  color: #fff !important;
  background: #c6283d !important;
}

.gestion360-module .content-wrapper .filter-row .primary-btn:not(.outline) {
  border-color: #087f8c !important;
  color: #fff !important;
  background: #087f8c !important;
}

.gestion360-module .g360-customer-results {
  border: 1px solid #8fa8ba !important;
  background: #fff !important;
  box-shadow: 0 18px 38px rgba(15, 35, 60, .2) !important;
}

.gestion360-module .content-wrapper .g360-customer-option {
  display: block !important;
  width: 100% !important;
  min-height: 54px !important;
  justify-content: flex-start !important;
  padding: 11px 13px !important;
  border: 0 !important;
  border-bottom: 1px solid #e5edf3 !important;
  border-radius: 0 !important;
  color: #172033 !important;
  background: #fff !important;
  text-align: left !important;
  font-weight: 650 !important;
}

.gestion360-module .content-wrapper .g360-customer-option:hover,
.gestion360-module .content-wrapper .g360-customer-option:focus {
  color: #064e58 !important;
  background: #e8f7f8 !important;
}

.gestion360-module .g360-customer-option small {
  color: #526173 !important;
}

.gestion360-module .dataTables_wrapper {
  color: #334155;
  background: #fff;
}

.gestion360-module .dataTables_wrapper .dataTables_filter label,
.gestion360-module .dataTables_wrapper .dataTables_length label,
.gestion360-module .dataTables_wrapper .dataTables_info {
  color: #334155 !important;
  font-weight: 700;
}

.gestion360-module .dataTables_wrapper .dataTables_filter input,
.gestion360-module .dataTables_wrapper .dataTables_length select {
  min-height: 38px !important;
  color: #172033 !important;
  background: #fff !important;
  border: 1px solid #aebdce !important;
  border-radius: 7px !important;
}

.gestion360-module .dataTables_wrapper .dataTables_length select {
  min-width: 78px;
  margin: 0 6px;
}

.gestion360-module .dataTables_wrapper .page-item .page-link {
  color: #075f69 !important;
  background: #fff !important;
  border-color: #cbd5e1 !important;
}

.gestion360-module .dataTables_wrapper .page-item.active .page-link {
  color: #fff !important;
  background: #087f8c !important;
  border-color: #087f8c !important;
}

.gestion360-module .dataTables_wrapper table.dataTable thead th {
  color: #334155 !important;
  background: #edf5f7 !important;
  border-bottom: 2px solid #9fb8c4 !important;
  white-space: nowrap;
}

.gestion360-module .dataTables_wrapper table.dataTable tbody tr:hover {
  background: #f2fafb !important;
}

.gestion360-module .g360-pager a,
.gestion360-module .g360-pager .page-current {
  color: #075f69;
  font-weight: 750;
}

.gestion360-module .g360-pager .page-current {
  color: #fff;
}

@media (max-width: 680px) {
  .gestion360-module .content-wrapper :where(.filter-row, .g360-quote-filter, .master-filter, .credit-filter, .g360-filter) > * {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* Mayor especificidad que el estilo heredado de botones AdminLTE. */
body.gestion360-module.adminlte-coregest .content-wrapper button:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle) {
  border-color: #087f8c !important;
  color: #fff !important;
  background: #087f8c !important;
}

body.gestion360-module.adminlte-coregest .content-wrapper button.btn-outline-primary,
body.gestion360-module.adminlte-coregest .content-wrapper button.btn-outline-info,
body.gestion360-module.adminlte-coregest .content-wrapper button.btn-outline-secondary,
body.gestion360-module.adminlte-coregest .content-wrapper button.btn-outline-success {
  color: #075f69 !important;
  background: #fff !important;
}

body.gestion360-module.adminlte-coregest .content-wrapper button.btn-outline-danger,
body.gestion360-module.adminlte-coregest .content-wrapper td.actions form button:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle),
body.gestion360-module.adminlte-coregest .content-wrapper button.g360-danger,
body.gestion360-module.adminlte-coregest .content-wrapper button.g360-row-delete,
body.gestion360-module.adminlte-coregest .content-wrapper button.g360-option-delete {
  border-color: #c6283d !important;
  color: #b42336 !important;
  background: #fff !important;
}

body.gestion360-module.adminlte-coregest .content-wrapper button.btn-danger,
body.gestion360-module.adminlte-coregest .content-wrapper button.btn-outline-danger:hover,
body.gestion360-module.adminlte-coregest .content-wrapper td.actions form button:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle):hover {
  border-color: #c6283d !important;
  color: #fff !important;
  background: #c6283d !important;
}

body.gestion360-module.adminlte-coregest .content-wrapper button.g360-customer-option:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle) {
  display: block !important;
  width: 100% !important;
  justify-content: flex-start !important;
  border: 0 !important;
  border-bottom: 1px solid #e5edf3 !important;
  border-radius: 0 !important;
  color: #172033 !important;
  background: #fff !important;
  text-align: left !important;
}

body.gestion360-module.adminlte-coregest .content-wrapper button.g360-customer-option:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle):hover,
body.gestion360-module.adminlte-coregest .content-wrapper button.g360-customer-option:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle):focus {
  color: #064e58 !important;
  background: #e8f7f8 !important;
}

.adminlte-coregest .project-detail-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid #dee7ef;
  border-radius: 8px;
  background: #fff;
}

.adminlte-coregest .project-detail-list article strong,
.adminlte-coregest .project-detail-list article span {
  display: block;
}

.adminlte-coregest .project-detail-list article span,
.adminlte-coregest .project-detail-list article small {
  color: #6c757d;
  font-size: 12px;
}

.adminlte-coregest .project-detail-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .adminlte-coregest .workflow-inline-upload {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .adminlte-coregest .workflow-task-grid,
  .adminlte-coregest .workflow-task-meta {
    grid-template-columns: 1fr;
  }

  .adminlte-coregest .workflow-task-card-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .adminlte-coregest .workflow-task-modal-body {
    grid-template-columns: 1fr;
  }

  .adminlte-coregest .workflow-task-modal-form {
    grid-row: auto;
    position: static;
  }

  .adminlte-coregest .workflow-stage-picker-head,
  .adminlte-coregest .workflow-stage-picker-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .adminlte-coregest .workflow-stage-picker-head {
    display: grid;
  }

  .adminlte-coregest .workflow-stage-new-row {
    grid-template-columns: 1fr;
  }

  .adminlte-coregest .project-detail-list article {
    grid-template-columns: 1fr;
  }

  .adminlte-coregest .project-detail-side {
    justify-content: flex-start;
  }
}

.coregest-toast-stack {
  position: fixed;
  top: 74px;
  right: 18px;
  z-index: 11000;
  display: grid;
  gap: 10px;
  width: min(390px, calc(100vw - 32px));
  pointer-events: none;
}

.coregest-login-page .coregest-toast-stack {
  top: 18px;
}

.coregest-toast {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 26px;
  align-items: start;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid #d7dee8;
  border-left-width: 4px;
  border-radius: 8px;
  color: #1f2937;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
  opacity: 0;
  transform: translateX(18px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: auto;
}

.coregest-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.coregest-toast.is-hiding {
  opacity: 0;
  transform: translateX(18px);
}

.coregest-toast-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  font-size: 16px;
}

.coregest-toast-message {
  padding-top: 2px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.coregest-toast button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #64748b;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.coregest-toast button:hover {
  color: #111827;
  background: #f1f5f9;
}

.coregest-toast-success {
  border-left-color: #16a34a;
}

.coregest-toast-success .coregest-toast-icon {
  color: #15803d;
  background: #dcfce7;
}

.coregest-toast-error {
  border-left-color: #dc2626;
}

.coregest-toast-error .coregest-toast-icon {
  color: #b91c1c;
  background: #fee2e2;
}

.coregest-toast-warning {
  border-left-color: #d97706;
}

.coregest-toast-warning .coregest-toast-icon {
  color: #b45309;
  background: #fef3c7;
}

.coregest-toast-info {
  border-left-color: #0284c7;
}

.coregest-toast-info .coregest-toast-icon {
  color: #0369a1;
  background: #e0f2fe;
}

@media (max-width: 640px) {
  .coregest-toast-stack {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

.adminlte-coregest .actions {
  white-space: nowrap;
  position: relative;
  min-width: 118px;
  text-align: right;
}

.adminlte-coregest .row-action-menu {
  position: relative;
  display: inline-block;
  text-align: left;
  font-size: 13px;
}

.adminlte-coregest .row-action-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 104px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #1f2937;
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.adminlte-coregest .row-action-menu summary::-webkit-details-marker {
  display: none;
}

.adminlte-coregest .row-action-menu[open] summary {
  border-color: #0f766e;
  color: #0f766e;
  background: #ecfdf5;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

.adminlte-coregest .row-action-menu > div {
  position: absolute;
  right: 0;
  z-index: 1050;
  width: 230px;
  margin-top: 8px;
  padding: 7px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .2);
}

.adminlte-coregest .row-action-menu.is-floating > div {
  position: fixed;
  top: var(--action-menu-top, 0);
  left: var(--action-menu-left, 0);
  right: auto;
  z-index: 9999;
  width: 230px;
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.adminlte-coregest .row-action-menu form {
  margin: 0;
}

.adminlte-coregest .row-action-menu button,
.adminlte-coregest .row-action-menu .row-action-link {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 6px !important;
  color: #1f2937 !important;
  background: transparent !important;
  box-shadow: none !important;
  font: inherit !important;
  font-size: 12.5px !important;
  font-weight: 800;
  line-height: 1.2 !important;
  text-decoration: none;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.adminlte-coregest .row-action-menu button i,
.adminlte-coregest .row-action-menu .row-action-link i {
  width: 18px;
  flex: 0 0 18px;
  color: #64748b;
  text-align: center;
}

.adminlte-coregest .row-action-menu .row-action-link:hover {
  color: #0f766e !important;
  background: #ecfdf5 !important;
}

.adminlte-coregest .row-action-menu button:hover {
  color: #0f766e !important;
  background: #ecfdf5 !important;
}

.adminlte-coregest .row-action-menu button.danger-link {
  color: #b42318 !important;
}

.adminlte-coregest .row-action-menu button.danger-link:hover {
  color: #fff !important;
  background: #dc3545 !important;
}

.adminlte-coregest .row-action-menu button.danger-link:hover i {
  color: #fff;
}

/* Workflow, projects and payments refresh */
.adminlte-coregest .workflow-task-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}

.adminlte-coregest .workflow-task-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid #dde6ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.adminlte-coregest .workflow-task-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #0f766e;
}

.adminlte-coregest .workflow-task-card.is-overdue::before {
  background: #dc3545;
}

.adminlte-coregest .workflow-task-card-head {
  padding: 18px 18px 0 22px;
}

.adminlte-coregest .workflow-task-card .workflow-task-meta,
.adminlte-coregest .workflow-task-card .workflow-stage-route,
.adminlte-coregest .workflow-task-card .workflow-task-progress,
.adminlte-coregest .workflow-task-card .workflow-task-client,
.adminlte-coregest .workflow-task-card-foot {
  margin-left: 22px;
  margin-right: 18px;
}

.adminlte-coregest .workflow-task-card-foot {
  margin-bottom: 18px;
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
}

.adminlte-coregest .workflow-task-meta span {
  min-height: 38px;
  border: 1px solid #edf2f7;
  background: #f8fafc;
}

.adminlte-coregest .workflow-task-detail-modal,
.adminlte-coregest .payment-modal {
  width: min(96vw, 1320px);
  max-height: calc(100vh - 32px);
}

.adminlte-coregest .workflow-task-modal-body {
  grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.15fr) minmax(320px, .95fr);
  gap: 14px;
  padding: 16px;
}

.adminlte-coregest .workflow-task-modal-body > section {
  border: 1px solid #e3eaf1;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.adminlte-coregest .workflow-stage-flow {
  gap: 8px;
}

.adminlte-coregest .workflow-stage-flow li {
  min-height: 54px;
  padding: 8px 0 8px 36px;
}

.adminlte-coregest .workflow-stage-flow-dot {
  width: 22px;
  height: 22px;
  left: 2px;
  font-size: 10px;
}

.adminlte-coregest .workflow-upload-open {
  width: 100%;
  margin-top: 10px;
}

.adminlte-coregest .project-indicator-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.adminlte-coregest .project-icon-pill.neutral {
  border-color: #d9e2ec;
  background: #f8fafc;
  color: #334155;
}

.adminlte-coregest .project-icon-pill.neutral i {
  color: #475569;
}

.adminlte-coregest .project-actions-menu > div {
  width: 245px;
}

.adminlte-coregest .payment-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.adminlte-coregest .payment-kpi {
  padding: 18px;
  border: 1px solid #dfe7ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.adminlte-coregest .payment-kpi span,
.adminlte-coregest .payment-kpi small,
.adminlte-coregest .payment-kpi strong {
  display: block;
}

.adminlte-coregest .payment-kpi span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.adminlte-coregest .payment-kpi strong {
  margin: 5px 0;
  color: #102033;
  font-size: 24px;
  font-weight: 850;
}

.adminlte-coregest .payment-kpi small {
  color: #64748b;
  font-weight: 700;
}

.adminlte-coregest .payment-kpi.success strong { color: #047857; }
.adminlte-coregest .payment-kpi.warning strong { color: #b45309; }
.adminlte-coregest .payment-kpi.danger strong { color: #b42318; }
.adminlte-coregest .payment-kpi.info strong { color: #075985; }

.adminlte-coregest .payment-panel {
  margin-bottom: 16px;
}

.adminlte-coregest .dashboard-command-actions button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #0f766e;
  font-weight: 800;
}

@media (max-width: 1150px) {
  .adminlte-coregest .workflow-task-modal-body,
  .adminlte-coregest .payment-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .adminlte-coregest .workflow-task-grid,
  .adminlte-coregest .workflow-task-modal-body,
  .adminlte-coregest .payment-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* CoreGest polished sidebar */
.adminlte-coregest .main-sidebar {
  width: 300px;
  background:
    linear-gradient(180deg, rgba(0, 138, 138, .14), rgba(7, 59, 99, 0) 210px),
    #071d33 !important;
  box-shadow: 12px 0 34px rgba(15, 23, 42, .14);
}

.adminlte-coregest .main-sidebar::before {
  width: 300px;
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000, transparent 62%);
}

.adminlte-coregest .brand-link {
  position: relative;
  display: flex !important;
  min-height: 72px;
  align-items: center;
  gap: 11px;
  padding: 13px 14px !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  color: #fff !important;
  background: rgba(255,255,255,.03);
}

.adminlte-coregest .brand-link .brand-image {
  float: none !important;
  width: 44px !important;
  height: 44px !important;
  max-height: 44px !important;
  margin: 0 !important;
  padding: 4px;
  border-radius: 8px !important;
  object-fit: contain !important;
  background: #fff;
  box-shadow: 0 12px 24px rgba(0,0,0,.18) !important;
}

.adminlte-coregest .brand-link .brand-text {
  display: block;
  min-width: 0;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 850 !important;
  letter-spacing: 0;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adminlte-coregest .brand-link .brand-text::after {
  content: "ERP Inteligente";
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.58);
  font-size: .68rem;
  font-weight: 750;
  text-transform: uppercase;
}

.adminlte-coregest .main-sidebar .sidebar {
  position: relative;
  height: calc(100vh - 72px) !important;
  padding: 12px 10px 18px !important;
}

.adminlte-coregest .user-panel {
  min-height: 62px;
  align-items: center;
  margin: 0 0 14px !important;
  padding: 10px !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 8px;
  background: rgba(255,255,255,.055);
}

.adminlte-coregest .user-panel .image {
  padding-left: 0 !important;
}

.adminlte-coregest .coregest-user-initial {
  width: 38px !important;
  height: 38px !important;
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  background: linear-gradient(135deg, #008a8a, #073b63) !important;
  box-shadow: none !important;
  font-weight: 850;
}

.adminlte-coregest .user-panel .info {
  min-width: 0;
  padding: 0 0 0 10px !important;
}

.adminlte-coregest .user-panel .info a {
  color: rgba(255,255,255,.92) !important;
  font-size: .9rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adminlte-coregest .sidebar nav.mt-2 {
  margin-top: 0 !important;
}

.adminlte-coregest .nav-sidebar {
  gap: 3px;
}

.adminlte-coregest .nav-sidebar > .nav-item {
  margin-bottom: 3px;
}

.adminlte-coregest .nav-sidebar .nav-link {
  min-height: 42px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  color: rgba(231, 240, 250, .78) !important;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.adminlte-coregest .nav-sidebar .nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.085) !important;
}

.adminlte-coregest .nav-sidebar > .nav-item > .nav-link.active {
  color: #fff !important;
  background: linear-gradient(135deg, #008a8a, #07527f) !important;
  box-shadow: 0 12px 24px rgba(0, 138, 138, .2);
}

.adminlte-coregest .nav-sidebar > .nav-item.menu-open > .nav-link:not(.active) {
  color: #fff !important;
  background: rgba(255,255,255,.1) !important;
}

.adminlte-coregest .nav-sidebar .nav-link > .nav-icon {
  display: inline-flex !important;
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  align-items: center;
  justify-content: center;
  margin-right: 6px !important;
  border-radius: 8px;
  color: inherit;
  background: rgba(255,255,255,.07);
}

.adminlte-coregest .nav-sidebar > .nav-item > .nav-link.active > .nav-icon {
  background: rgba(255,255,255,.18);
}

.adminlte-coregest .nav-sidebar .nav-link > p {
  color: inherit;
  font-size: .9rem;
  font-weight: 760;
}

.adminlte-coregest .nav-sidebar .nav-link .right.fas {
  color: rgba(255,255,255,.48);
  font-size: .78rem;
  transition: transform .18s ease;
}

.adminlte-coregest .nav-sidebar .menu-open > .nav-link .right.fas {
  transform: rotate(-90deg) !important;
}

.adminlte-coregest .nav-sidebar .badge {
  min-width: 22px;
  margin-left: auto;
  border-radius: 999px !important;
  color: #073b63 !important;
  background: #bff5ef !important;
}

.adminlte-coregest .nav-sidebar .nav-treeview {
  margin: 4px 0 8px 15px;
  padding: 4px 0 4px 10px;
  border-left: 1px solid rgba(255,255,255,.12);
}

.adminlte-coregest .nav-sidebar .nav-treeview .nav-link {
  min-height: 36px !important;
  margin: 2px 0;
  padding: 6px 8px !important;
  color: rgba(223, 235, 247, .66) !important;
  background: transparent !important;
  font-size: .84rem;
}

.adminlte-coregest .nav-sidebar .nav-treeview .nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.07) !important;
}

.adminlte-coregest .nav-sidebar .nav-treeview .nav-link.active {
  color: #bff5ef !important;
  background: rgba(0, 138, 138, .18) !important;
  box-shadow: inset 3px 0 0 #00a7a7;
}

.adminlte-coregest .nav-sidebar .nav-treeview .nav-link > .nav-icon {
  width: 26px !important;
  min-width: 26px !important;
  height: 26px !important;
  margin-right: 5px !important;
  background: rgba(255,255,255,.055);
  font-size: .8rem !important;
}

.adminlte-coregest .nav-sidebar .coregest-sidebar-nested {
  margin-left: 18px;
  padding-left: 8px;
}

.adminlte-coregest .nav-sidebar .coregest-sidebar-nested .nav-link {
  min-height: 32px !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

.adminlte-coregest .nav-sidebar .coregest-sidebar-nested .nav-link > p {
  font-size: .78rem;
  font-weight: 700;
}

.adminlte-coregest .nav-sidebar .nav-treeview .nav-link.active > .nav-icon {
  color: #fff !important;
  background: rgba(0, 138, 138, .35);
}

.adminlte-coregest.sidebar-collapse .brand-link .brand-text,
.adminlte-coregest.sidebar-collapse .user-panel .info,
.adminlte-coregest.sidebar-collapse .nav-sidebar .nav-treeview {
  display: none !important;
}

.adminlte-coregest.sidebar-collapse .main-sidebar,
.adminlte-coregest.sidebar-collapse .main-sidebar::before {
  width: 4.6rem !important;
}

@media (min-width: 768px) {
  .adminlte-coregest:not(.sidebar-collapse) .content-wrapper,
  .adminlte-coregest:not(.sidebar-collapse) .main-header,
  .adminlte-coregest:not(.sidebar-collapse) .main-footer {
    margin-left: 300px !important;
  }
}

.coregest-login-page {
  min-height: 100vh;
  background: #e9ecef;
}

.coregest-login-page .login-box {
  width: min(420px, calc(100vw - 28px));
}

.coregest-login-page .login-logo {
  margin-bottom: .75rem;
}

.coregest-login-page .login-logo img {
  display: block;
  max-width: 240px;
  max-height: 180px;
  object-fit: contain;
  margin: 0 auto;
}

.coregest-login-page .card {
  border-radius: .25rem;
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
}

.coregest-login-page .icheck-primary {
  position: relative;
  min-height: 24px;
  padding-left: 1.55rem;
}

.coregest-login-page .icheck-primary input[type="checkbox"] {
  position: absolute;
  left: 0;
  top: .2rem;
  width: 1rem;
  height: 1rem;
  accent-color: #007bff;
}

.coregest-login-page .icheck-primary label {
  margin: 0;
  color: #495057;
  font-weight: 400;
}

/* CoreGest premium login */
.coregest-login-page {
  min-height: 100vh;
  overflow-x: hidden;
  color: #102033;
  background:
    linear-gradient(135deg, rgba(4, 44, 86, .96), rgba(0, 132, 132, .86)),
    url("../img/logo_original.png") center 18% / min(720px, 82vw) no-repeat,
    #eef4f8;
}

.coregest-login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
}

.coregest-login-brand {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: clamp(32px, 5vw, 76px);
  color: #fff;
  isolation: isolate;
}

.coregest-login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.72) 54%, transparent 100%);
}

.coregest-login-brand::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  z-index: -1;
  background: linear-gradient(0deg, rgba(2, 18, 36, .42), transparent);
}

.coregest-login-brand-inner {
  width: min(760px, 100%);
}

.coregest-login-mark {
  display: block;
  width: min(340px, 70vw);
  max-height: 300px;
  object-fit: contain;
  margin: 0 0 26px;
  filter: drop-shadow(0 24px 36px rgba(0,0,0,.25));
}

.coregest-login-copy span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.12);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.coregest-login-copy h1 {
  max-width: 720px;
  margin: 18px 0 16px;
  color: #fff;
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 850;
  line-height: .98;
}

.coregest-login-copy p {
  max-width: 660px;
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.55;
}

.coregest-login-modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.coregest-login-modules article {
  min-height: 126px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  box-shadow: 0 18px 38px rgba(0,0,0,.12);
  backdrop-filter: blur(12px);
}

.coregest-login-modules i {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 8px;
  color: #073b63;
  background: rgba(255,255,255,.92);
}

.coregest-login-modules strong,
.coregest-login-modules small {
  display: block;
}

.coregest-login-modules strong {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.coregest-login-modules small {
  margin-top: 4px;
  color: rgba(255,255,255,.72);
  line-height: 1.35;
}

.coregest-login-access {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(22px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(248,250,252,.98), rgba(233,238,244,.98));
}

.coregest-login-card {
  width: min(100%, 470px);
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(15, 35, 60, .22);
}

.coregest-login-card-head {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e7edf3;
}

.coregest-login-card-head img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 8px;
  background: #f7fafc;
}

.coregest-login-card-head span {
  display: block;
  color: #008a8a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.coregest-login-card-head h2 {
  margin: 3px 0 0;
  color: #0f2742;
  font-size: 28px;
  font-weight: 800;
}

.coregest-login-form label {
  display: block;
  margin: 0 0 7px;
  color: #4b5b6d;
  font-size: 13px;
  font-weight: 800;
}

.coregest-login-input {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  margin-bottom: 16px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #f8fbfd;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.coregest-login-input:focus-within {
  border-color: #008a8a;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 138, 138, .12);
}

.coregest-login-input i {
  color: #008a8a;
  text-align: center;
}

.coregest-login-input input {
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 0;
  outline: 0;
  color: #102033;
  background: transparent;
  font-size: 15px;
}

.coregest-login-input input::placeholder {
  color: #9aa8b6;
}

.coregest-login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 2px 0 20px;
}

.coregest-login-check {
  display: inline-flex !important;
  align-items: center;
  gap: 9px;
  margin: 0 !important;
  color: #526173 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer;
}

.coregest-login-check input {
  width: 18px;
  height: 18px;
  accent-color: #008a8a;
}

.coregest-login-options a {
  color: #007b83;
  font-size: 14px;
  font-weight: 800;
}

.coregest-login-submit {
  display: inline-flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #073b63, #008a8a);
  box-shadow: 0 16px 28px rgba(0, 94, 115, .24);
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}

.coregest-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 32px rgba(0, 94, 115, .3);
}

.coregest-login-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e7edf3;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.coregest-login-foot span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.coregest-login-page .alert {
  border-radius: 8px;
}

@media (max-width: 1020px) {
  .coregest-login-shell {
    grid-template-columns: 1fr;
  }

  .coregest-login-brand {
    min-height: auto;
    padding-bottom: 28px;
  }

  .coregest-login-access {
    min-height: auto;
    padding-top: 24px;
  }
}

@media (max-width: 720px) {
  .coregest-login-brand {
    padding: 24px 18px;
  }

  .coregest-login-mark {
    width: min(250px, 76vw);
    margin-bottom: 18px;
  }

  .coregest-login-copy h1 {
    font-size: 34px;
  }

  .coregest-login-modules {
    grid-template-columns: 1fr;
  }

  .coregest-login-modules article {
    min-height: auto;
  }

  .coregest-login-access {
    padding: 18px;
  }

  .coregest-login-card-head {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .coregest-login-card-head img {
    width: 62px;
    height: 62px;
  }

  .coregest-login-card-head h2 {
    font-size: 23px;
  }

  .coregest-login-options {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* CoreGest clean modern UI refresh */
.adminlte-coregest {
  --cg-bg: #f6f8fb;
  --cg-surface: #ffffff;
  --cg-surface-soft: #f9fbfd;
  --cg-line: #dfe6ee;
  --cg-line-soft: #edf1f6;
  --cg-ink: #172033;
  --cg-muted: #64748b;
  --cg-primary: #087f8c;
  --cg-primary-dark: #07527f;
  --cg-primary-soft: #e6f6f6;
  --cg-accent: #e75a2a;
  --cg-warning: #f6a623;
  --cg-danger: #d92d20;
  --cg-success: #14956f;
  --cg-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --cg-shadow: 0 16px 38px rgba(15, 23, 42, .08);
  --cg-shadow-lg: 0 26px 70px rgba(15, 23, 42, .16);
  color: var(--cg-ink);
  background:
    linear-gradient(180deg, #f9fbfd 0, var(--cg-bg) 260px),
    var(--cg-bg) !important;
}

.adminlte-coregest .wrapper {
  background: transparent;
}

.adminlte-coregest .main-header.navbar {
  min-height: 64px;
  margin-left: 286px;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  background: rgba(255, 255, 255, .92) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
  backdrop-filter: blur(14px);
}

.adminlte-coregest.sidebar-collapse .main-header.navbar {
  margin-left: 4.6rem;
}

.adminlte-coregest .main-header .nav-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 8px;
  color: #42526a !important;
  font-weight: 750;
}

.adminlte-coregest .main-header .nav-link:hover {
  color: var(--cg-primary-dark) !important;
  background: var(--cg-primary-soft);
}

.adminlte-coregest .coregest-task-alert {
  position: relative;
}

.adminlte-coregest .coregest-task-alert .navbar-badge {
  top: 2px;
  right: 1px;
  min-width: 18px;
  padding: 3px 5px !important;
  border: 2px solid #fff;
  border-radius: 999px !important;
  color: #111827 !important;
  background: #ffd166 !important;
}

.adminlte-coregest .coregest-company-switcher {
  min-height: 42px;
  padding: 5px 8px 5px 11px !important;
  border: 1px solid var(--cg-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: var(--cg-shadow-sm);
}

.adminlte-coregest .coregest-company-switcher select {
  width: min(240px, 36vw);
  min-height: 30px !important;
  padding: 2px 26px 2px 6px !important;
  border: 0 !important;
  background-color: transparent !important;
  color: var(--cg-ink) !important;
  font-size: .9rem !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.adminlte-coregest .main-sidebar {
  width: 286px !important;
  background:
    linear-gradient(180deg, rgba(8, 127, 140, .18), rgba(7, 82, 127, 0) 250px),
    #101827 !important;
  box-shadow: 16px 0 36px rgba(15, 23, 42, .13) !important;
}

.adminlte-coregest .main-sidebar::before {
  width: 286px !important;
  opacity: .62;
}

.adminlte-coregest .brand-link {
  min-height: 76px !important;
  padding: 14px 16px !important;
  background: rgba(255, 255, 255, .045) !important;
}

.adminlte-coregest .brand-link .brand-image {
  width: 46px !important;
  height: 46px !important;
  max-height: 46px !important;
  border-radius: 8px !important;
}

.adminlte-coregest .brand-link .brand-text {
  font-size: 1.08rem;
}

.adminlte-coregest .main-sidebar .sidebar {
  height: calc(100vh - 76px) !important;
  padding: 12px 9px 18px !important;
}

.adminlte-coregest .user-panel {
  min-height: 58px;
  margin-bottom: 12px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .06) !important;
}

.adminlte-coregest .nav-sidebar .nav-link {
  min-height: 40px !important;
  margin: 1px 0;
  padding: 7px 9px !important;
  border-radius: 8px !important;
  color: rgba(238, 245, 252, .78) !important;
}

.adminlte-coregest .nav-sidebar .nav-link > .nav-icon {
  width: 29px !important;
  min-width: 29px !important;
  height: 29px !important;
  border-radius: 8px;
  background: rgba(255, 255, 255, .065);
}

.adminlte-coregest .nav-sidebar .nav-link > p {
  font-size: .86rem !important;
  font-weight: 760;
  line-height: 1.12;
}

.adminlte-coregest .nav-sidebar > .nav-item > .nav-link.active {
  background: linear-gradient(135deg, var(--cg-primary), var(--cg-primary-dark)) !important;
  box-shadow: 0 14px 28px rgba(8, 127, 140, .24) !important;
}

.adminlte-coregest .nav-sidebar .nav-treeview {
  margin: 3px 0 8px 14px !important;
  padding: 3px 0 3px 9px !important;
  border-left: 1px solid rgba(255, 255, 255, .13) !important;
}

.adminlte-coregest .nav-sidebar .nav-treeview .nav-link {
  min-height: 34px !important;
  padding: 5px 8px !important;
  color: rgba(230, 238, 247, .68) !important;
}

.adminlte-coregest .nav-sidebar .nav-treeview .nav-link > p {
  font-size: .8rem !important;
  font-weight: 700;
}

.adminlte-coregest .nav-sidebar .coregest-sidebar-nested {
  margin-left: 14px !important;
  padding-left: 7px !important;
}

.adminlte-coregest .nav-sidebar .coregest-sidebar-nested .nav-link {
  min-height: 31px !important;
  padding: 4px 7px !important;
}

.adminlte-coregest .nav-sidebar .coregest-sidebar-nested .nav-link > p {
  font-size: .75rem !important;
  white-space: normal;
}

.adminlte-coregest .content-wrapper {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(246, 248, 251, 0) 270px),
    var(--cg-bg) !important;
}

.adminlte-coregest .content-header {
  padding: 22px 24px 10px;
}

.adminlte-coregest .content-header h1 {
  margin: 0;
  color: var(--cg-ink);
  font-size: clamp(1.42rem, 1.8vw, 2rem);
  font-weight: 850;
  letter-spacing: 0;
}

.adminlte-coregest .breadcrumb {
  min-height: 34px;
  align-items: center;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--cg-line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .74);
}

.adminlte-coregest .content > .container-fluid {
  padding: 0 24px 28px;
}

.adminlte-coregest .panel,
.adminlte-coregest .card,
.adminlte-coregest .modal-card,
.adminlte-coregest .chat-panel,
.adminlte-coregest .config-module,
.adminlte-coregest .db-setup-card,
.adminlte-coregest .database-admin-card,
.adminlte-coregest .agreement-card,
.adminlte-coregest .category-admin-panel,
.adminlte-coregest .maintainer-quick-panel,
.adminlte-coregest .maintainer-table-panel,
.adminlte-coregest .g360-quote-card,
.adminlte-coregest .report-source-card,
.adminlte-coregest .operative-event-card {
  border: 1px solid var(--cg-line-soft) !important;
  border-radius: 8px !important;
  background: var(--cg-surface) !important;
  box-shadow: var(--cg-shadow-sm) !important;
}

.adminlte-coregest .panel:hover,
.adminlte-coregest .card:hover,
.adminlte-coregest .coregest-nav-card:hover {
  box-shadow: var(--cg-shadow) !important;
}

.adminlte-coregest .panel-title-row,
.adminlte-coregest .dashboard-panel-head,
.adminlte-coregest .modal-head,
.adminlte-coregest .card-header,
.adminlte-coregest .db-section-head {
  min-height: 56px !important;
  padding: 14px 18px !important;
  border-bottom: 1px solid var(--cg-line-soft) !important;
  background: linear-gradient(180deg, #fff, #fbfdff) !important;
}

.adminlte-coregest .panel-title-row h2,
.adminlte-coregest .dashboard-panel-head h2,
.adminlte-coregest .modal-head h2,
.adminlte-coregest .db-section-head h2,
.adminlte-coregest .panel h2,
.adminlte-coregest .card-title {
  color: var(--cg-ink) !important;
  font-size: 1.05rem !important;
  font-weight: 850 !important;
  letter-spacing: 0;
}

.adminlte-coregest .section-kicker {
  color: var(--cg-primary) !important;
  font-size: .72rem !important;
  font-weight: 850 !important;
  letter-spacing: 0;
}

.adminlte-coregest .coregest-nav-card {
  min-height: 126px;
  border: 1px solid var(--cg-line-soft) !important;
  border-left: 0 !important;
  border-radius: 8px !important;
  background:
    linear-gradient(135deg, rgba(8, 127, 140, .07), rgba(231, 90, 42, .035) 55%, transparent),
    #fff !important;
  box-shadow: var(--cg-shadow-sm) !important;
}

.adminlte-coregest .coregest-nav-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--cg-primary), var(--cg-accent));
}

.adminlte-coregest .coregest-nav-card-icon {
  border-radius: 8px !important;
  color: var(--cg-primary-dark) !important;
  background: var(--cg-primary-soft) !important;
}

.adminlte-coregest .coregest-nav-card-title {
  font-weight: 850 !important;
}

.adminlte-coregest .coregest-nav-card-text,
.adminlte-coregest .text-muted,
.adminlte-coregest .empty-state {
  color: var(--cg-muted) !important;
}

.adminlte-coregest .coregest-nav-card-action {
  color: var(--cg-primary) !important;
  font-weight: 850 !important;
}

.adminlte-coregest input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.adminlte-coregest select,
.adminlte-coregest textarea,
.adminlte-coregest .select2-container--default .select2-selection--single,
.adminlte-coregest .select2-container--default .select2-selection--multiple {
  min-height: 42px !important;
  border: 1px solid #cad6e3 !important;
  border-radius: 8px !important;
  color: var(--cg-ink) !important;
  background-color: #fff !important;
  box-shadow: 0 1px 1px rgba(15, 23, 42, .03) !important;
  font-size: .93rem !important;
}

.adminlte-coregest textarea {
  min-height: 104px !important;
}

.adminlte-coregest input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
.adminlte-coregest select:focus,
.adminlte-coregest textarea:focus,
.adminlte-coregest .select2-container--default.select2-container--focus .select2-selection--multiple,
.adminlte-coregest .select2-container--default .select2-selection--single:focus {
  border-color: var(--cg-primary) !important;
  box-shadow: 0 0 0 4px rgba(8, 127, 140, .12) !important;
}

.adminlte-coregest label:not(.inline-check) {
  color: #334155 !important;
  font-size: .82rem !important;
  font-weight: 850 !important;
}

.adminlte-coregest .inline-check,
.adminlte-coregest label:has(> input[type="checkbox"]),
.adminlte-coregest label:has(> input[type="radio"]) {
  min-height: 38px !important;
  padding: 7px 11px 7px 36px !important;
  border-color: var(--cg-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #344054 !important;
  box-shadow: var(--cg-shadow-sm);
}

.adminlte-coregest input[type="checkbox"],
.adminlte-coregest input[type="radio"] {
  left: 12px;
  width: 16px !important;
  height: 16px !important;
  accent-color: var(--cg-primary);
}

.adminlte-coregest .primary-btn,
.adminlte-coregest .primary-link,
.adminlte-coregest .btn-primary,
.adminlte-coregest button:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle):not(.btn-outline-secondary):not(.btn-outline-info):not(.btn-outline-success):not(.btn-outline-danger) {
  min-height: 40px !important;
  border: 1px solid var(--cg-primary) !important;
  border-radius: 8px !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--cg-primary), var(--cg-primary-dark)) !important;
  box-shadow: 0 10px 18px rgba(8, 127, 140, .16) !important;
  font-size: .92rem !important;
  font-weight: 850 !important;
}

.adminlte-coregest .primary-btn:hover,
.adminlte-coregest .primary-link:hover,
.adminlte-coregest .btn-primary:hover,
.adminlte-coregest button:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle):not(.btn-outline-secondary):not(.btn-outline-info):not(.btn-outline-success):not(.btn-outline-danger):hover {
  border-color: var(--cg-primary-dark) !important;
  background: linear-gradient(135deg, #0a919c, #063d63) !important;
}

.adminlte-coregest .secondary-btn,
.adminlte-coregest .secondary-link,
.adminlte-coregest .primary-btn.outline,
.adminlte-coregest .primary-link.outline,
.adminlte-coregest .btn-outline-secondary {
  min-height: 40px !important;
  border: 1px solid var(--cg-line) !important;
  border-radius: 8px !important;
  color: #344054 !important;
  background: #fff !important;
  box-shadow: var(--cg-shadow-sm) !important;
  font-weight: 800 !important;
}

.adminlte-coregest .secondary-btn:hover,
.adminlte-coregest .secondary-link:hover,
.adminlte-coregest .primary-btn.outline:hover,
.adminlte-coregest .primary-link.outline:hover,
.adminlte-coregest .btn-outline-secondary:hover {
  color: var(--cg-primary-dark) !important;
  border-color: rgba(8, 127, 140, .35) !important;
  background: var(--cg-primary-soft) !important;
}

.adminlte-coregest .danger-btn,
.adminlte-coregest .danger-link,
.adminlte-coregest .btn-danger {
  border-color: var(--cg-danger) !important;
  border-radius: 8px !important;
  background: var(--cg-danger) !important;
}

.adminlte-coregest .filter-row,
.adminlte-coregest .datatable-toolbar,
.adminlte-coregest .dataTables_wrapper .row:first-child {
  padding: 14px 18px !important;
  border-bottom: 1px solid var(--cg-line-soft) !important;
  background: var(--cg-surface-soft) !important;
}

.adminlte-coregest .table-wrap,
.adminlte-coregest .recipes-table-wrap,
.adminlte-coregest .public-pages-table-wrap,
.adminlte-coregest .dataTables_wrapper {
  border-radius: 0 0 8px 8px !important;
}

.adminlte-coregest table {
  color: var(--cg-ink) !important;
}

.adminlte-coregest table th,
.adminlte-coregest table td {
  padding: 12px 14px !important;
  border-top: 1px solid var(--cg-line-soft) !important;
}

.adminlte-coregest table thead th {
  border-bottom: 1px solid var(--cg-line) !important;
  color: #475467 !important;
  background: #f8fafc !important;
  font-size: .76rem !important;
  font-weight: 900 !important;
  text-transform: uppercase;
}

.adminlte-coregest table tbody tr:hover {
  background: #f9fcfc !important;
}

.adminlte-coregest .dataTables_wrapper .dataTables_filter input,
.adminlte-coregest .dataTables_wrapper .dataTables_length select {
  min-height: 36px !important;
  margin-left: 6px;
}

.adminlte-coregest .page-item.active .page-link {
  border-color: var(--cg-primary) !important;
  background: var(--cg-primary) !important;
}

.adminlte-coregest .page-link {
  color: var(--cg-primary-dark);
}

.adminlte-coregest .badge {
  border-radius: 999px !important;
  padding: .35em .55em !important;
}

.adminlte-coregest .badge.green,
.adminlte-coregest .badge.active,
.adminlte-coregest .badge-success {
  background: var(--cg-success) !important;
}

.adminlte-coregest .badge.red,
.adminlte-coregest .badge.inactive,
.adminlte-coregest .badge-danger {
  background: var(--cg-danger) !important;
}

.adminlte-coregest .modal-overlay {
  padding: 76px 18px 24px !important;
  background: rgba(15, 23, 42, .56) !important;
  backdrop-filter: blur(4px);
}

.adminlte-coregest .modal-card {
  border-radius: 8px !important;
  box-shadow: var(--cg-shadow-lg) !important;
}

.adminlte-coregest .workflow-dashboard-modal {
  max-height: none !important;
  overflow: visible !important;
}

.adminlte-coregest .workflow-dashboard-modal .panel-body {
  max-height: min(58vh, 520px);
  overflow: auto;
}

.adminlte-coregest .modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #475467;
  background: #f2f4f7;
}

.adminlte-coregest .coregest-toast {
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px !important;
  box-shadow: var(--cg-shadow-lg) !important;
}

.adminlte-coregest .row-action-menu,
.adminlte-coregest .dropdown-menu {
  border: 1px solid var(--cg-line-soft) !important;
  border-radius: 8px !important;
  box-shadow: var(--cg-shadow) !important;
}

@media (min-width: 768px) {
  .adminlte-coregest:not(.sidebar-collapse) .content-wrapper,
  .adminlte-coregest:not(.sidebar-collapse) .main-header,
  .adminlte-coregest:not(.sidebar-collapse) .main-footer {
    margin-left: 286px !important;
  }
}

@media (max-width: 991.98px) {
  .adminlte-coregest .main-header.navbar {
    margin-left: 0 !important;
  }

  .adminlte-coregest .content-header,
  .adminlte-coregest .content > .container-fluid {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* CoreGest flat enterprise theme: cleaner, quieter, no gradients */
.adminlte-coregest {
  --cg-bg: #f5f7fa;
  --cg-surface: #ffffff;
  --cg-surface-soft: #f8fafc;
  --cg-line: #d8e0ea;
  --cg-line-soft: #e8edf3;
  --cg-ink: #182230;
  --cg-muted: #667085;
  --cg-primary: #0f766e;
  --cg-primary-dark: #115e59;
  --cg-primary-soft: #e7f5f3;
  --cg-sidebar: #172033;
  --cg-sidebar-hover: #202b3a;
  --cg-danger: #d92d20;
  --cg-success: #14956f;
  --cg-warning: #b7791f;
  --cg-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --cg-shadow: 0 8px 22px rgba(16, 24, 40, .08);
  --cg-shadow-lg: 0 18px 48px rgba(16, 24, 40, .14);
  color: var(--cg-ink);
  background: var(--cg-bg) !important;
}

.adminlte-coregest .wrapper,
.adminlte-coregest .content-wrapper {
  background: var(--cg-bg) !important;
}

.adminlte-coregest .main-header.navbar {
  min-height: 62px;
  border: 0 !important;
  border-bottom: 1px solid var(--cg-line-soft) !important;
  background: #fff !important;
  box-shadow: var(--cg-shadow-sm) !important;
  backdrop-filter: none !important;
}

.adminlte-coregest .main-header .nav-link {
  color: #475467 !important;
  font-weight: 700;
}

.adminlte-coregest .main-header .nav-link:hover {
  color: var(--cg-primary-dark) !important;
  background: var(--cg-primary-soft) !important;
}

.adminlte-coregest .main-sidebar {
  width: 286px !important;
  background: var(--cg-sidebar) !important;
  box-shadow: 8px 0 22px rgba(16, 24, 40, .08) !important;
}

.adminlte-coregest .main-sidebar::before {
  display: none !important;
}

.adminlte-coregest .brand-link {
  min-height: 74px !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
  background: var(--cg-sidebar) !important;
}

.adminlte-coregest .brand-link .brand-image {
  width: 44px !important;
  height: 44px !important;
  max-height: 44px !important;
  border-radius: 8px !important;
  background: #fff !important;
}

.adminlte-coregest .brand-link .brand-text {
  color: #fff !important;
  font-weight: 850 !important;
}

.adminlte-coregest .brand-link .brand-text::after {
  color: rgba(255, 255, 255, .62) !important;
}

.adminlte-coregest .main-sidebar .sidebar {
  height: calc(100vh - 74px) !important;
  padding: 12px 9px 18px !important;
}

.adminlte-coregest .user-panel {
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .04) !important;
}

.adminlte-coregest .coregest-user-initial {
  background: var(--cg-primary) !important;
  box-shadow: none !important;
}

.adminlte-coregest .nav-sidebar .nav-link {
  min-height: 40px !important;
  border-radius: 8px !important;
  color: rgba(238, 245, 252, .76) !important;
  background: transparent !important;
}

.adminlte-coregest .nav-sidebar .nav-link:hover,
.adminlte-coregest .nav-sidebar > .nav-item.menu-open > .nav-link:not(.active) {
  color: #fff !important;
  background: var(--cg-sidebar-hover) !important;
}

.adminlte-coregest .nav-sidebar > .nav-item > .nav-link.active,
.adminlte-coregest .nav-sidebar .nav-treeview .nav-link.active {
  color: #fff !important;
  background: var(--cg-primary) !important;
  box-shadow: none !important;
}

.adminlte-coregest .nav-sidebar .nav-link > .nav-icon {
  background: rgba(255, 255, 255, .06) !important;
}

.adminlte-coregest .nav-sidebar .nav-treeview {
  border-left: 1px solid rgba(255, 255, 255, .12) !important;
}

.adminlte-coregest .content-header {
  padding: 20px 24px 10px;
}

.adminlte-coregest .content-header h1 {
  color: var(--cg-ink) !important;
  font-size: clamp(1.38rem, 1.55vw, 1.8rem);
  font-weight: 850;
}

.adminlte-coregest .breadcrumb {
  border: 1px solid var(--cg-line-soft) !important;
  background: #fff !important;
  box-shadow: var(--cg-shadow-sm);
}

.adminlte-coregest .panel,
.adminlte-coregest .card,
.adminlte-coregest .modal-card,
.adminlte-coregest .chat-panel,
.adminlte-coregest .config-module,
.adminlte-coregest .db-setup-card,
.adminlte-coregest .database-admin-card,
.adminlte-coregest .agreement-card,
.adminlte-coregest .category-admin-panel,
.adminlte-coregest .maintainer-quick-panel,
.adminlte-coregest .maintainer-table-panel,
.adminlte-coregest .g360-quote-card,
.adminlte-coregest .report-source-card,
.adminlte-coregest .operative-event-card {
  border: 1px solid var(--cg-line-soft) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: var(--cg-shadow-sm) !important;
}

.adminlte-coregest .panel:hover,
.adminlte-coregest .card:hover,
.adminlte-coregest .coregest-nav-card:hover {
  box-shadow: var(--cg-shadow-sm) !important;
  transform: none !important;
}

.adminlte-coregest .panel-title-row,
.adminlte-coregest .dashboard-panel-head,
.adminlte-coregest .modal-head,
.adminlte-coregest .card-header,
.adminlte-coregest .db-section-head {
  border-bottom: 1px solid var(--cg-line-soft) !important;
  background: #fff !important;
}

.adminlte-coregest .panel-title-row h2,
.adminlte-coregest .dashboard-panel-head h2,
.adminlte-coregest .modal-head h2,
.adminlte-coregest .db-section-head h2,
.adminlte-coregest .panel h2,
.adminlte-coregest .card-title {
  color: var(--cg-ink) !important;
  font-weight: 850 !important;
}

.adminlte-coregest .section-kicker {
  color: var(--cg-primary) !important;
}

.adminlte-coregest .coregest-nav-card {
  border: 1px solid var(--cg-line-soft) !important;
  border-left: 4px solid var(--cg-primary) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: var(--cg-shadow-sm) !important;
}

.adminlte-coregest .coregest-nav-card::before {
  display: none !important;
}

.adminlte-coregest .coregest-nav-card-icon {
  border-radius: 8px !important;
  color: var(--cg-primary) !important;
  background: var(--cg-primary-soft) !important;
}

.adminlte-coregest .coregest-nav-card-action,
.adminlte-coregest a {
  color: var(--cg-primary) !important;
}

.adminlte-coregest input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.adminlte-coregest select,
.adminlte-coregest textarea,
.adminlte-coregest .select2-container--default .select2-selection--single,
.adminlte-coregest .select2-container--default .select2-selection--multiple {
  min-height: 42px !important;
  border: 1px solid #cad6e3 !important;
  border-radius: 8px !important;
  color: var(--cg-ink) !important;
  background: #fff !important;
  box-shadow: none !important;
}

.adminlte-coregest input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
.adminlte-coregest select:focus,
.adminlte-coregest textarea:focus {
  border-color: var(--cg-primary) !important;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14) !important;
}

.adminlte-coregest .inline-check,
.adminlte-coregest label:has(> input[type="checkbox"]),
.adminlte-coregest label:has(> input[type="radio"]) {
  border: 1px solid var(--cg-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.adminlte-coregest input[type="checkbox"],
.adminlte-coregest input[type="radio"] {
  accent-color: var(--cg-primary) !important;
}

.adminlte-coregest .primary-btn,
.adminlte-coregest .primary-link,
.adminlte-coregest .btn-primary,
.adminlte-coregest button:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle):not(.btn-outline-secondary):not(.btn-outline-info):not(.btn-outline-success):not(.btn-outline-danger) {
  border: 1px solid var(--cg-primary) !important;
  border-radius: 8px !important;
  color: #fff !important;
  background: var(--cg-primary) !important;
  box-shadow: none !important;
  font-weight: 800 !important;
}

.adminlte-coregest .primary-btn:hover,
.adminlte-coregest .primary-link:hover,
.adminlte-coregest .btn-primary:hover,
.adminlte-coregest button:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle):not(.btn-outline-secondary):not(.btn-outline-info):not(.btn-outline-success):not(.btn-outline-danger):hover {
  border-color: var(--cg-primary-dark) !important;
  background: var(--cg-primary-dark) !important;
}

.adminlte-coregest .secondary-btn,
.adminlte-coregest .secondary-link,
.adminlte-coregest .primary-btn.outline,
.adminlte-coregest .primary-link.outline,
.adminlte-coregest .btn-outline-secondary {
  border: 1px solid var(--cg-line) !important;
  border-radius: 8px !important;
  color: #344054 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.adminlte-coregest .secondary-btn:hover,
.adminlte-coregest .secondary-link:hover,
.adminlte-coregest .primary-btn.outline:hover,
.adminlte-coregest .primary-link.outline:hover,
.adminlte-coregest .btn-outline-secondary:hover {
  color: var(--cg-primary-dark) !important;
  border-color: var(--cg-primary) !important;
  background: var(--cg-primary-soft) !important;
}

.adminlte-coregest table thead th {
  background: #f8fafc !important;
  color: #475467 !important;
}

.adminlte-coregest table tbody tr:hover {
  background: #f8fafc !important;
}

.adminlte-coregest .modal-overlay {
  background: rgba(24, 34, 48, .48) !important;
  backdrop-filter: none !important;
}

.adminlte-coregest .modal-card,
.adminlte-coregest .coregest-toast,
.adminlte-coregest .row-action-menu,
.adminlte-coregest .dropdown-menu {
  box-shadow: var(--cg-shadow-lg) !important;
}

.coregest-login-page {
  color: #182230;
  background: #f5f7fa !important;
}

.coregest-login-brand {
  color: #fff;
  background: #172033 !important;
}

.coregest-login-brand::before,
.coregest-login-brand::after {
  display: none !important;
}

.coregest-login-access {
  background: #f5f7fa !important;
}

.coregest-login-card,
.coregest-login-modules article {
  border: 1px solid #e8edf3 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(16, 24, 40, .08) !important;
}

.coregest-login-modules article {
  background: rgba(255, 255, 255, .08) !important;
}

.coregest-login-input,
.coregest-login-card-head img {
  border-radius: 8px !important;
}

.coregest-login-input:focus-within {
  border-color: #0f766e !important;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14) !important;
}

.coregest-login-submit {
  border-radius: 8px !important;
  background: #0f766e !important;
  box-shadow: none !important;
}

.coregest-login-submit:hover {
  background: #115e59 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Gestion 360 dashboard */
.adminlte-coregest .g360-dashboard-shell {
  display: grid;
  gap: 18px;
}

.adminlte-coregest .g360-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--cg-line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--cg-shadow-sm);
}

.adminlte-coregest .g360-dashboard-head h2 {
  margin: 4px 0 6px;
  color: var(--cg-ink);
  font-size: 1.45rem;
  font-weight: 850;
}

.adminlte-coregest .g360-dashboard-head p {
  margin: 0;
  color: var(--cg-muted);
}

.adminlte-coregest .g360-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.adminlte-coregest .g360-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.adminlte-coregest .g360-kpi-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--cg-line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--cg-shadow-sm);
}

.adminlte-coregest .g360-kpi-card > span {
  display: inline-flex;
  width: 44px;
  height: 44px;
  grid-row: 1 / 4;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--cg-primary);
  background: var(--cg-primary-soft);
  font-size: 1.05rem;
}

.adminlte-coregest .g360-kpi-card.is-warning > span {
  color: #92400e;
  background: #fff4df;
}

.adminlte-coregest .g360-kpi-card small {
  color: var(--cg-muted);
  font-size: .76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.adminlte-coregest .g360-kpi-card strong {
  color: var(--cg-ink);
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
}

.adminlte-coregest .g360-kpi-card em {
  color: var(--cg-muted);
  font-style: normal;
  font-size: .86rem;
}

.adminlte-coregest .g360-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr);
  gap: 16px;
  align-items: start;
}

.adminlte-coregest .g360-dashboard-panel {
  min-width: 0;
  overflow: hidden;
}

.adminlte-coregest .g360-dashboard-panel .panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adminlte-coregest .g360-dashboard-panel .secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cg-primary) !important;
  font-size: .85rem;
  font-weight: 850;
}

.adminlte-coregest .g360-pipeline,
.adminlte-coregest .g360-list,
.adminlte-coregest .g360-project-list,
.adminlte-coregest .g360-quick-grid,
.adminlte-coregest .g360-catalog-grid {
  padding: 16px;
}

.adminlte-coregest .g360-pipeline {
  display: grid;
  gap: 13px;
}

.adminlte-coregest .g360-pipeline article {
  display: grid;
  gap: 8px;
}

.adminlte-coregest .g360-pipeline article > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adminlte-coregest .g360-pipeline strong {
  color: var(--cg-ink);
  font-weight: 850;
}

.adminlte-coregest .g360-pipeline span {
  color: var(--cg-muted);
  font-size: .86rem;
}

.adminlte-coregest .g360-progress,
.adminlte-coregest .g360-project-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.adminlte-coregest .g360-progress span,
.adminlte-coregest .g360-project-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cg-primary);
}

.adminlte-coregest .g360-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.adminlte-coregest .g360-quick-grid a,
.adminlte-coregest .g360-catalog-grid a {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--cg-line-soft);
  border-radius: 8px;
  color: var(--cg-ink) !important;
  background: #fff;
  text-decoration: none !important;
}

.adminlte-coregest .g360-quick-grid a:hover,
.adminlte-coregest .g360-catalog-grid a:hover {
  border-color: rgba(15, 118, 110, .35);
  background: var(--cg-primary-soft);
}

.adminlte-coregest .g360-quick-grid i,
.adminlte-coregest .g360-catalog-grid i {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--cg-primary);
  background: var(--cg-primary-soft);
}

.adminlte-coregest .g360-quick-grid span,
.adminlte-coregest .g360-catalog-grid span {
  min-width: 0;
  color: var(--cg-ink);
  font-weight: 850;
}

.adminlte-coregest .g360-list {
  display: grid;
  gap: 8px;
}

.adminlte-coregest .g360-list a,
.adminlte-coregest .g360-project-list a {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--cg-line-soft);
  border-radius: 8px;
  color: inherit !important;
  background: #fff;
  text-decoration: none !important;
}

.adminlte-coregest .g360-list a {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.adminlte-coregest .g360-list a:hover,
.adminlte-coregest .g360-project-list a:hover {
  border-color: rgba(15, 118, 110, .35);
}

.adminlte-coregest .g360-list strong,
.adminlte-coregest .g360-project-list strong {
  display: block;
  color: var(--cg-ink);
  font-weight: 850;
}

.adminlte-coregest .g360-list small,
.adminlte-coregest .g360-project-list small {
  display: block;
  margin-top: 2px;
  color: var(--cg-muted);
}

.adminlte-coregest .g360-list a > span:last-child {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.adminlte-coregest .g360-list em,
.adminlte-coregest .g360-project-list em {
  color: var(--cg-ink);
  font-style: normal;
  font-weight: 850;
}

.adminlte-coregest .g360-list b {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 850;
}

.adminlte-coregest .g360-list b.success {
  color: #067647;
  background: #ecfdf3;
}

.adminlte-coregest .g360-list b.danger {
  color: #b42318;
  background: #fef3f2;
}

.adminlte-coregest .g360-list b.neutral {
  color: #344054;
  background: #f2f4f7;
}

.adminlte-coregest .g360-project-list {
  display: grid;
  gap: 8px;
}

.adminlte-coregest .g360-project-list a {
  grid-template-columns: minmax(0, 1fr) 120px 42px;
  align-items: center;
}

.adminlte-coregest .g360-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.adminlte-coregest .g360-catalog-grid a {
  justify-content: flex-start;
}

.adminlte-coregest .g360-catalog-grid strong {
  margin-left: auto;
  color: var(--cg-muted);
}

.adminlte-coregest .g360-panel-count {
  color: var(--cg-muted);
  font-size: .86rem;
}

@media (max-width: 1190px) {
  .adminlte-coregest .g360-kpi-grid,
  .adminlte-coregest .g360-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .adminlte-coregest .g360-dashboard-head {
    align-items: stretch;
    flex-direction: column;
  }

  .adminlte-coregest .g360-dashboard-actions {
    justify-content: flex-start;
  }

  .adminlte-coregest .g360-kpi-grid,
  .adminlte-coregest .g360-dashboard-grid,
  .adminlte-coregest .g360-quick-grid,
  .adminlte-coregest .g360-catalog-grid {
    grid-template-columns: 1fr;
  }

  .adminlte-coregest .g360-list a,
  .adminlte-coregest .g360-project-list a {
    grid-template-columns: 1fr;
  }

  .adminlte-coregest .g360-list a > span:last-child {
    justify-items: start;
  }
}

/* CoreGest readability pass: lighter sidebar, softer typography, safer button contrast */
.adminlte-coregest {
  --cg-bg: #f6f8fb;
  --cg-sidebar: #eef3f7;
  --cg-sidebar-hover: #e3ebf2;
  --cg-sidebar-text: #334155;
  --cg-sidebar-muted: #667085;
  --cg-primary: #0b6f69;
  --cg-primary-dark: #084f4b;
  --cg-primary-soft: #e7f4f2;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
}

.adminlte-coregest .main-sidebar {
  border-right: 1px solid var(--cg-line) !important;
  background: var(--cg-sidebar) !important;
  box-shadow: 3px 0 14px rgba(16, 24, 40, .06) !important;
}

.adminlte-coregest .brand-link {
  border-bottom: 1px solid var(--cg-line) !important;
  background: #fff !important;
}

.adminlte-coregest .brand-link .brand-text {
  color: var(--cg-ink) !important;
  font-weight: 700 !important;
}

.adminlte-coregest .brand-link .brand-text::after {
  color: var(--cg-muted) !important;
  font-weight: 600;
}

.adminlte-coregest .user-panel {
  border-color: var(--cg-line) !important;
  background: #fff !important;
}

.adminlte-coregest .user-panel .info a {
  color: var(--cg-sidebar-text) !important;
  font-weight: 650 !important;
}

.adminlte-coregest .coregest-user-initial {
  color: #fff !important;
  background: var(--cg-primary) !important;
}

.adminlte-coregest .nav-sidebar .nav-link {
  color: var(--cg-sidebar-text) !important;
}

.adminlte-coregest .nav-sidebar .nav-link:hover,
.adminlte-coregest .nav-sidebar > .nav-item.menu-open > .nav-link:not(.active) {
  color: var(--cg-ink) !important;
  background: var(--cg-sidebar-hover) !important;
}

.adminlte-coregest .nav-sidebar .nav-link > .nav-icon {
  color: var(--cg-sidebar-muted) !important;
  background: #fff !important;
}

.adminlte-coregest .nav-sidebar .nav-link > p {
  font-size: .84rem !important;
  font-weight: 600 !important;
}

.adminlte-coregest .nav-sidebar > .nav-item > .nav-link.active,
.adminlte-coregest .nav-sidebar .nav-treeview .nav-link.active {
  color: #fff !important;
  background: var(--cg-primary) !important;
}

.adminlte-coregest .nav-sidebar > .nav-item > .nav-link.active > .nav-icon,
.adminlte-coregest .nav-sidebar .nav-treeview .nav-link.active > .nav-icon {
  color: #fff !important;
  background: rgba(255, 255, 255, .18) !important;
}

.adminlte-coregest .nav-sidebar .nav-treeview {
  border-left: 1px solid #d6dee7 !important;
}

.adminlte-coregest .nav-sidebar .nav-treeview .nav-link {
  color: #536174 !important;
}

.adminlte-coregest .nav-sidebar .nav-treeview .nav-link > p {
  font-size: .77rem !important;
  font-weight: 560 !important;
}

.adminlte-coregest .content-header h1,
.adminlte-coregest .g360-dashboard-head h2 {
  font-weight: 720 !important;
}

.adminlte-coregest .panel-title-row h2,
.adminlte-coregest .dashboard-panel-head h2,
.adminlte-coregest .modal-head h2,
.adminlte-coregest .db-section-head h2,
.adminlte-coregest .panel h2,
.adminlte-coregest .card-title,
.adminlte-coregest .coregest-nav-card-title,
.adminlte-coregest .g360-kpi-card strong,
.adminlte-coregest .g360-list strong,
.adminlte-coregest .g360-project-list strong {
  font-weight: 680 !important;
}

.adminlte-coregest label:not(.inline-check),
.adminlte-coregest .section-kicker,
.adminlte-coregest .g360-kpi-card small {
  font-weight: 650 !important;
}

.adminlte-coregest .primary-btn,
.adminlte-coregest .primary-link,
.adminlte-coregest .btn-primary,
.adminlte-coregest button:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle):not(.btn-outline-secondary):not(.btn-outline-info):not(.btn-outline-success):not(.btn-outline-danger) {
  color: #fff !important;
  background: var(--cg-primary) !important;
  border-color: var(--cg-primary) !important;
  font-weight: 650 !important;
}

.adminlte-coregest .primary-btn *,
.adminlte-coregest .primary-link *,
.adminlte-coregest .btn-primary *,
.adminlte-coregest button:not(.modal-close):not(.close):not(.navbar-toggler):not([class*="swal"]):not(.sidebar-toggle):not(.btn-outline-secondary):not(.btn-outline-info):not(.btn-outline-success):not(.btn-outline-danger) * {
  color: inherit !important;
}

.adminlte-coregest .secondary-btn,
.adminlte-coregest .secondary-link,
.adminlte-coregest .primary-btn.outline,
.adminlte-coregest .primary-link.outline,
.adminlte-coregest .btn-outline-secondary,
.adminlte-coregest .btn-outline-info,
.adminlte-coregest .btn-outline-success {
  color: #243447 !important;
  background: #fff !important;
  border-color: #cbd5e1 !important;
  font-weight: 620 !important;
}

.adminlte-coregest .secondary-btn *,
.adminlte-coregest .secondary-link *,
.adminlte-coregest .primary-btn.outline *,
.adminlte-coregest .primary-link.outline *,
.adminlte-coregest .btn-outline-secondary *,
.adminlte-coregest .btn-outline-info *,
.adminlte-coregest .btn-outline-success * {
  color: inherit !important;
}

.adminlte-coregest .secondary-btn:hover,
.adminlte-coregest .secondary-link:hover,
.adminlte-coregest .primary-btn.outline:hover,
.adminlte-coregest .primary-link.outline:hover,
.adminlte-coregest .btn-outline-secondary:hover,
.adminlte-coregest .btn-outline-info:hover,
.adminlte-coregest .btn-outline-success:hover {
  color: var(--cg-primary-dark) !important;
  background: var(--cg-primary-soft) !important;
  border-color: var(--cg-primary) !important;
}

.adminlte-coregest .btn-danger,
.adminlte-coregest .danger-btn,
.adminlte-coregest .danger-link,
.adminlte-coregest .btn-outline-danger:hover {
  color: #fff !important;
  background: var(--cg-danger) !important;
  border-color: var(--cg-danger) !important;
}

.adminlte-coregest .btn-danger *,
.adminlte-coregest .danger-btn *,
.adminlte-coregest .danger-link *,
.adminlte-coregest .btn-outline-danger:hover * {
  color: inherit !important;
}

.coregest-login-brand {
  background: #eef3f7 !important;
  color: #182230 !important;
}

.coregest-login-copy h1,
.coregest-login-modules strong {
  color: #182230 !important;
}

.coregest-login-copy p,
.coregest-login-modules small {
  color: #667085 !important;
}

.coregest-login-copy span,
.coregest-login-modules article {
  color: #334155 !important;
  border-color: #d8e0ea !important;
  background: #fff !important;
}

/* Final workflow/payment polish must stay after global button overrides. */
.adminlte-coregest .row-action-menu button,
.adminlte-coregest .row-action-menu .row-action-link {
  color: #1f2937 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  text-align: left !important;
}

.adminlte-coregest .row-action-menu button:hover,
.adminlte-coregest .row-action-menu .row-action-link:hover {
  color: var(--cg-primary-dark) !important;
  background: var(--cg-primary-soft) !important;
}

.adminlte-coregest .row-action-menu button.danger-link {
  color: #b42318 !important;
  background: transparent !important;
}

.adminlte-coregest .row-action-menu button.danger-link:hover {
  color: #fff !important;
  background: var(--cg-danger) !important;
}

.adminlte-coregest .workflow-task-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)) !important;
  gap: 18px !important;
}

.adminlte-coregest .workflow-task-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06) !important;
}

.adminlte-coregest .workflow-task-detail-modal,
.adminlte-coregest .payment-modal {
  width: min(96vw, 1320px) !important;
  max-height: calc(100vh - 32px) !important;
}

.adminlte-coregest .workflow-task-modal-body {
  grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.15fr) minmax(320px, .95fr) !important;
  gap: 14px !important;
  padding: 16px !important;
}

.adminlte-coregest .payment-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.adminlte-coregest .payment-kpi {
  padding: 18px;
  border: 1px solid #dfe7ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.adminlte-coregest .payment-kpi span,
.adminlte-coregest .payment-kpi small,
.adminlte-coregest .payment-kpi strong {
  display: block;
}

.adminlte-coregest .payment-kpi span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.adminlte-coregest .payment-kpi strong {
  margin: 5px 0;
  color: #102033;
  font-size: 24px;
  font-weight: 800;
}

.adminlte-coregest .payment-kpi.success strong { color: #047857; }
.adminlte-coregest .payment-kpi.warning strong { color: #b45309; }
.adminlte-coregest .payment-kpi.danger strong { color: #b42318; }
.adminlte-coregest .payment-kpi.info strong { color: #075985; }

@media (max-width: 1150px) {
  .adminlte-coregest .workflow-task-modal-body,
  .adminlte-coregest .payment-kpi-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 760px) {
  .adminlte-coregest .workflow-task-grid,
  .adminlte-coregest .workflow-task-modal-body,
  .adminlte-coregest .payment-kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Task modal compact summary + stronger work area */
.adminlte-coregest .workflow-task-modal-body {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.25fr) !important;
  align-items: start;
}

.adminlte-coregest .workflow-task-modal-summary {
  grid-column: 1 / 2;
  padding: 12px !important;
  gap: 8px !important;
}

.adminlte-coregest .workflow-task-modal-summary .workflow-task-meta {
  grid-template-columns: 1fr !important;
  gap: 6px !important;
}

.adminlte-coregest .workflow-task-modal-summary .workflow-task-meta span {
  min-height: 32px !important;
  padding: 6px 8px !important;
  font-size: 11.5px !important;
}

.adminlte-coregest .workflow-task-modal-summary p {
  max-height: 72px;
  margin: 0 !important;
  overflow: auto;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.adminlte-coregest .workflow-task-modal-summary .workflow-task-progress {
  gap: 4px !important;
}

.adminlte-coregest .workflow-task-modal-facts {
  gap: 6px !important;
}

.adminlte-coregest .workflow-task-modal-flow {
  grid-column: 2 / 4;
  padding: 12px !important;
}

.adminlte-coregest .workflow-task-modal-flow .panel-title-row {
  margin-bottom: 8px !important;
}

.adminlte-coregest .workflow-stage-flow {
  display: flex !important;
  gap: 0 !important;
  align-items: flex-start;
  overflow-x: auto;
  padding: 4px 4px 8px !important;
}

.adminlte-coregest .workflow-stage-flow li {
  position: relative;
  min-width: 118px;
  min-height: 0 !important;
  padding: 28px 8px 0 !important;
  text-align: center;
  border: 0 !important;
  background: transparent !important;
}

.adminlte-coregest .workflow-stage-flow li::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  height: 2px;
  background: #d7e0ea;
}

.adminlte-coregest .workflow-stage-flow li:first-child::before {
  left: 50%;
}

.adminlte-coregest .workflow-stage-flow li:last-child::before {
  right: 50%;
}

.adminlte-coregest .workflow-stage-flow-dot {
  position: absolute !important;
  top: 4px !important;
  left: 50% !important;
  z-index: 2;
  width: 20px !important;
  height: 20px !important;
  transform: translateX(-50%);
  border: 2px solid #cbd5e1;
  color: transparent;
  background: #fff;
}

.adminlte-coregest .workflow-stage-flow li.is-current .workflow-stage-flow-dot {
  border-color: #0b6f69;
  box-shadow: 0 0 0 4px rgba(11, 111, 105, .12);
}

.adminlte-coregest .workflow-stage-flow li.is-done::before {
  background: #0b6f69;
}

.adminlte-coregest .workflow-stage-flow li.is-done .workflow-stage-flow-dot {
  border-color: #0b6f69;
  color: #fff;
  background: #0b6f69;
}

.adminlte-coregest .workflow-stage-flow strong {
  display: block;
  font-size: 11.5px !important;
  line-height: 1.2;
}

.adminlte-coregest .workflow-stage-flow small {
  color: #667085;
  font-size: 10.5px !important;
}

.adminlte-coregest .workflow-task-modal-form {
  grid-column: 1 / 3;
  padding: 16px !important;
}

.adminlte-coregest .workflow-task-modal-history,
.adminlte-coregest .workflow-task-modal-files {
  padding: 16px !important;
}

.adminlte-coregest .workflow-task-modal-history {
  grid-column: 3 / 4;
}

.adminlte-coregest .workflow-task-modal-files {
  grid-column: 3 / 4;
}

.adminlte-coregest .workflow-rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 7px;
  border: 1px solid #cbd5e1;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
}

.adminlte-coregest .workflow-rich-toolbar button {
  width: 32px !important;
  min-width: 32px !important;
  min-height: 30px !important;
  padding: 0 !important;
  color: #334155 !important;
  background: #fff !important;
  border: 1px solid #d7e0ea !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

.adminlte-coregest .workflow-rich-toolbar button:hover {
  color: #0b6f69 !important;
  background: #e7f4f2 !important;
  border-color: #0b6f69 !important;
}

.adminlte-coregest .workflow-rich-editor {
  min-height: 190px;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 0 0 8px 8px;
  background: #fff;
  color: #182230;
  font-size: 14px;
  line-height: 1.45;
  outline: 0;
}

.adminlte-coregest .workflow-rich-editor:focus {
  border-color: #0b6f69;
  box-shadow: 0 0 0 3px rgba(11, 111, 105, .12);
}

.adminlte-coregest .workflow-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #98a2b3;
}

.adminlte-coregest .workflow-rich-image,
.adminlte-coregest .workflow-observation img {
  display: block;
  max-width: 100%;
  max-height: 260px;
  margin: 8px 0;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
}

.adminlte-coregest .workflow-observation {
  margin-top: 6px;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.adminlte-coregest .workflow-observation p {
  margin: 0 0 8px;
}

.adminlte-coregest .workflow-task-modal-form .crud-form.compact {
  grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr);
}

@media (max-width: 1150px) {
  .adminlte-coregest .workflow-task-modal-summary,
  .adminlte-coregest .workflow-task-modal-flow,
  .adminlte-coregest .workflow-task-modal-form,
  .adminlte-coregest .workflow-task-modal-history,
  .adminlte-coregest .workflow-task-modal-files {
    grid-column: 1 / -1 !important;
  }
}

/* Keep row dropdown actions visually identical, after every generic button rule. */
.adminlte-coregest details.row-action-menu > div :where(a, button, .row-action-link),
.adminlte-coregest details.row-action-menu > div form button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 6px !important;
  color: #1f2937 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  text-decoration: none !important;
  white-space: normal !important;
}

.adminlte-coregest details.row-action-menu > div :where(a, button, .row-action-link):hover,
.adminlte-coregest details.row-action-menu > div form button:hover {
  color: #084f4b !important;
  background: #e7f4f2 !important;
}

.adminlte-coregest details.row-action-menu > div :where(a, button, .row-action-link) i {
  width: 18px !important;
  flex: 0 0 18px !important;
  color: #64748b !important;
  text-align: center !important;
}

.adminlte-coregest details.row-action-menu > div button.danger-link {
  color: #b42318 !important;
}

.adminlte-coregest details.row-action-menu > div button.danger-link:hover {
  color: #fff !important;
  background: #dc3545 !important;
}

.adminlte-coregest details.row-action-menu > div button.danger-link:hover i {
  color: #fff !important;
}

/* Workflow task modal: final layout guard against overlapping sections. */
.adminlte-coregest .workflow-task-detail-modal {
  width: min(1500px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100vh - 28px) !important;
  overflow: hidden !important;
}

.adminlte-coregest .workflow-task-detail-modal .modal-head {
  flex: 0 0 auto;
}

.adminlte-coregest .workflow-task-modal-body {
  display: grid !important;
  grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.15fr) minmax(320px, .9fr) !important;
  grid-template-areas:
    "summary form form"
    "flow form form"
    "history history files" !important;
  grid-auto-rows: min-content !important;
  align-items: start !important;
  gap: 12px !important;
  max-height: calc(100vh - 122px) !important;
  padding: 12px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.adminlte-coregest .workflow-task-modal-summary {
  grid-area: summary !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

.adminlte-coregest .workflow-task-modal-flow {
  grid-area: flow !important;
  grid-column: auto !important;
  grid-row: auto !important;
  padding: 10px !important;
}

.adminlte-coregest .workflow-task-modal-form {
  grid-area: form !important;
  grid-column: auto !important;
  grid-row: auto !important;
  position: static !important;
  align-self: stretch !important;
  padding: 14px !important;
  overflow: visible !important;
}

.adminlte-coregest .workflow-task-modal-history {
  grid-area: history !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

.adminlte-coregest .workflow-task-modal-files {
  grid-area: files !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

.adminlte-coregest .workflow-task-modal-summary,
.adminlte-coregest .workflow-task-modal-form,
.adminlte-coregest .workflow-task-modal-flow,
.adminlte-coregest .workflow-task-modal-section {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.adminlte-coregest .workflow-task-modal-summary p {
  max-height: 112px !important;
  overflow-y: auto !important;
}

.adminlte-coregest .workflow-task-modal-flow .panel-title-row,
.adminlte-coregest .workflow-task-modal-section .panel-title-row {
  display: flex !important;
  min-height: 0 !important;
  gap: 8px !important;
  padding: 0 !important;
  margin: 0 0 8px !important;
  align-items: center !important;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0 !important;
  max-width: 100% !important;
  padding: 2px 4px 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow li {
  flex: 0 0 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  padding: 24px 6px 0 !important;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow strong {
  display: block !important;
  overflow-wrap: anywhere !important;
}

.adminlte-coregest .workflow-task-modal-form .crud-form.compact {
  display: grid !important;
  grid-template-columns: minmax(210px, .52fr) minmax(0, 1fr) !important;
  gap: 10px 12px !important;
  align-items: start !important;
}

.adminlte-coregest .workflow-task-modal-form .crud-form.compact > .span-2,
.adminlte-coregest .workflow-task-modal-form .modal-action-row {
  grid-column: 1 / -1 !important;
}

.adminlte-coregest .workflow-task-modal-form .workflow-rich-editor {
  min-height: 150px !important;
  max-height: 230px !important;
}

.adminlte-coregest .workflow-task-modal-form .modal-action-row {
  position: static !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  margin: 2px 0 0 !important;
  padding: 10px 0 0 !important;
  border-top: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
}

.adminlte-coregest .workflow-task-modal-form .modal-action-row .primary-btn {
  width: auto !important;
  min-width: 150px !important;
}

.adminlte-coregest .workflow-modal-reassign {
  margin-top: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid #e2e8f0 !important;
}

.adminlte-coregest .workflow-timeline.compact {
  max-height: 260px !important;
  overflow-y: auto !important;
}

.adminlte-coregest .workflow-timeline.compact article,
.adminlte-coregest .workflow-file-list.compact article {
  max-width: 100% !important;
}

@media (max-width: 1200px) {
  .adminlte-coregest .workflow-task-modal-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas:
      "summary flow"
      "form form"
      "history files" !important;
  }
}

@media (max-width: 780px) {
  .adminlte-coregest .workflow-task-detail-modal {
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    max-height: calc(100vh - 12px) !important;
  }

  .adminlte-coregest .workflow-task-modal-body {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "summary"
      "flow"
      "form"
      "history"
      "files" !important;
    max-height: calc(100vh - 104px) !important;
    padding: 8px !important;
  }

  .adminlte-coregest .workflow-task-modal-form .crud-form.compact {
    grid-template-columns: 1fr !important;
  }

  .adminlte-coregest .workflow-task-modal-form .modal-action-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .adminlte-coregest .workflow-task-modal-form .modal-action-row .primary-btn {
    width: 100% !important;
  }
}

/* Workflow task modal: daily-use layout polish. */
.adminlte-coregest .workflow-task-detail-modal {
  border-radius: 10px !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24) !important;
}

.adminlte-coregest .workflow-task-detail-modal .modal-head {
  min-height: 70px !important;
  padding: 16px 22px !important;
  border-bottom: 1px solid #dbe5ee !important;
  background: #fff !important;
}

.adminlte-coregest .workflow-task-detail-modal .modal-head h2 {
  margin: 4px 0 0 !important;
  font-size: 19px !important;
  line-height: 1.2 !important;
}

.adminlte-coregest .workflow-task-detail-modal .modal-close {
  position: static !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border: 1px solid #d9e5ee !important;
  border-radius: 9px !important;
  color: #475569 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.adminlte-coregest .workflow-task-modal-body {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 450px) !important;
  grid-template-areas:
    "summary form"
    "flow form"
    "history form"
    "files form" !important;
  gap: 14px !important;
  align-content: start !important;
  background: #f4f7fa !important;
}

.adminlte-coregest .workflow-task-modal-summary,
.adminlte-coregest .workflow-task-modal-form,
.adminlte-coregest .workflow-task-modal-flow,
.adminlte-coregest .workflow-task-modal-section {
  border-color: #dbe5ee !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04) !important;
}

.adminlte-coregest .workflow-task-modal-summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 230px) !important;
  gap: 10px 16px !important;
  padding: 14px 16px !important;
}

.adminlte-coregest .workflow-task-modal-summary .workflow-task-meta {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.adminlte-coregest .workflow-task-modal-summary .workflow-task-meta span {
  width: auto !important;
  max-width: 100% !important;
}

.adminlte-coregest .workflow-task-modal-summary p {
  grid-column: 1 !important;
  max-height: 76px !important;
  padding-right: 8px !important;
  color: #475569 !important;
}

.adminlte-coregest .workflow-task-modal-summary .workflow-task-progress {
  grid-column: 2 !important;
  align-self: center !important;
}

.adminlte-coregest .workflow-task-modal-summary .workflow-task-modal-facts,
.adminlte-coregest .workflow-task-modal-facts {
  grid-column: 1 / -1 !important;
  gap: 8px !important;
}

.adminlte-coregest .workflow-task-modal-flow {
  padding: 12px 16px !important;
}

.adminlte-coregest .workflow-task-modal-flow .panel-title-row h3 {
  font-size: 13px !important;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow {
  height: auto !important;
  min-height: 72px !important;
  padding: 8px 4px 10px !important;
  scrollbar-width: thin;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow li {
  flex: 0 0 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
  padding: 28px 8px 0 !important;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow li div {
  display: grid !important;
  gap: 2px !important;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow strong {
  min-height: 28px !important;
  color: #111827 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

.adminlte-coregest .workflow-task-modal-flow .workflow-stage-flow small {
  font-size: 11px !important;
}

.adminlte-coregest .workflow-task-modal-form {
  position: sticky !important;
  top: 0 !important;
  padding: 16px !important;
  max-height: calc(100vh - 150px) !important;
  overflow-y: auto !important;
}

.adminlte-coregest .workflow-task-modal-form h3 {
  margin-bottom: 10px !important;
  font-size: 15px !important;
}

.adminlte-coregest .workflow-task-modal-form .crud-form.compact {
  grid-template-columns: 1fr !important;
}

.adminlte-coregest .workflow-rich-toolbar {
  gap: 5px !important;
  padding: 7px !important;
}

.adminlte-coregest .workflow-rich-toolbar button {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
}

.adminlte-coregest .workflow-task-modal-form .workflow-rich-editor {
  min-height: 148px !important;
  max-height: 220px !important;
  font-size: 13px !important;
}

.adminlte-coregest .workflow-task-modal-form .modal-action-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.adminlte-coregest .workflow-task-modal-form .modal-action-row .primary-btn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  padding: 9px 12px !important;
}

.adminlte-coregest .workflow-upload-open {
  width: 100% !important;
  justify-content: center !important;
  margin: 10px 0 0 !important;
}

.adminlte-coregest .workflow-modal-reassign {
  display: grid !important;
  gap: 8px !important;
}

.adminlte-coregest .workflow-modal-reassign p {
  margin: 0 !important;
  color: #64748b !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.adminlte-coregest .workflow-open-assign-modal {
  width: 100% !important;
  justify-content: center !important;
}

.adminlte-coregest .workflow-modal-reassign .crud-form.compact {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(160px, .7fr) !important;
  gap: 10px 12px !important;
}

.adminlte-coregest .workflow-modal-reassign .crud-form.compact label {
  margin: 0 !important;
}

.adminlte-coregest .workflow-modal-reassign .crud-form.compact small {
  align-self: start !important;
  margin-top: 24px !important;
  line-height: 1.35 !important;
}

.adminlte-coregest .workflow-modal-reassign .crud-form.compact button {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

.adminlte-coregest .workflow-task-modal-history,
.adminlte-coregest .workflow-task-modal-files {
  padding: 14px 16px !important;
}

.adminlte-coregest .workflow-timeline.compact {
  display: grid !important;
  gap: 8px !important;
  max-height: 210px !important;
}

.adminlte-coregest .workflow-timeline.compact article {
  padding: 10px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  background: #fbfdff !important;
}

.adminlte-coregest .workflow-timeline.compact article span {
  display: block !important;
  margin-top: 2px !important;
  color: #64748b !important;
  font-size: 11px !important;
}

.adminlte-coregest .workflow-file-list.compact {
  display: grid !important;
  gap: 8px !important;
}

.adminlte-coregest .workflow-assign-modal {
  width: min(760px, calc(100vw - 24px)) !important;
}

.adminlte-coregest .workflow-assign-form {
  display: grid;
  gap: 14px;
}

.adminlte-coregest .workflow-assign-search {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.adminlte-coregest .workflow-assign-search input {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 12px;
}

.adminlte-coregest .workflow-assign-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: min(52vh, 420px);
  overflow: auto;
  padding: 6px;
  border: 1px solid #dbe5ee;
  border-radius: 10px;
  background: #f8fafc;
  user-select: none;
}

.adminlte-coregest .workflow-assign-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  color: #1f2937;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.adminlte-coregest .workflow-assign-list label:hover {
  border-color: #0b6f69;
  background: #eefdfa;
}

.adminlte-coregest .workflow-assign-list label.is-selected {
  border-color: #0b6f69;
  color: #07514d;
  background: #e7f4f2;
  box-shadow: inset 0 0 0 1px rgba(11, 111, 105, .18);
}

.adminlte-coregest .workflow-assign-list input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  accent-color: #0b6f69;
}

.adminlte-coregest .workflow-assign-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.adminlte-coregest .workflow-assign-list span i {
  color: #0b6f69;
}

.adminlte-coregest .workflow-assign-form > .text-muted {
  margin: 0;
  font-size: 12px;
}

.adminlte-coregest .workflow-assign-form .modal-action-row {
  position: static !important;
  margin: 0 !important;
  padding: 12px 0 0 !important;
  border-top: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
}

@media (min-width: 1201px) {
  .adminlte-coregest .workflow-task-modal-body {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 440px) !important;
  }
}

@media (max-width: 1100px) {
  .adminlte-coregest .workflow-task-modal-body {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "summary"
      "flow"
      "form"
      "history"
      "files" !important;
  }

  .adminlte-coregest .workflow-task-modal-form {
    position: static !important;
    max-height: none !important;
  }
}

@media (max-width: 680px) {
  .adminlte-coregest .workflow-task-modal-summary {
    grid-template-columns: 1fr !important;
  }

  .adminlte-coregest .workflow-task-modal-summary p,
  .adminlte-coregest .workflow-task-modal-summary .workflow-task-progress {
    grid-column: 1 !important;
  }

  .adminlte-coregest .workflow-task-modal-form .modal-action-row,
  .adminlte-coregest .workflow-modal-reassign .crud-form.compact,
  .adminlte-coregest .workflow-assign-list {
    grid-template-columns: 1fr !important;
  }
}
