/*
  GestPro R281 visual productization candidate.
  Approved background: #D8CDD1.
  Purpose: darker, more neutral page/module canvas inspired by the
  "Lotes vencidos" visual family without reusing its alert semantics.
  R280 security behavior is not modified.
*/
:root {
  --gestpro-page-background: #D8CDD1;
  --gestpro-surface: #FFFFFF;
  --gestpro-text: #1F2937;
  --gestpro-primary: #4F46E5;
  --gestpro-soft-border: #C9BDC1;
}

html,
body {
  background-color: var(--gestpro-page-background) !important;
  color: var(--gestpro-text);
}

/* Page/module canvas only. Content surfaces remain white below. */
main,
.main,
.main-content,
.content,
.content-area,
.page-content,
.dashboard-content,
.app-content,
.workspace,
.page-wrapper {
  background-color: transparent !important;
}

/* Keep operational content visually separated from the darker canvas. */
.card,
.panel,
.section-card,
.module-card,
.form-card,
.table-card,
.table-container,
.modal-content {
  background-color: var(--gestpro-surface);
}

/* Preserve a restrained horizontal GP + GestPro brand treatment. */
.brand,
.navbar-brand,
.gestpro-sidebar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand::before,
.navbar-brand::before,
.gestpro-sidebar__brand::before {
  content: "GP";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--gestpro-primary);
  color: #FFFFFF;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(31, 41, 55, 0.16);
}

/*
  Semantic alert/status colors are intentionally untouched.
  Existing "Lotes vencidos", "Por vencer", stock, warning and danger
  classes retain their current source-defined colors.
*/
/* GESTPRO_R281_PREMIUM_SHIELD_BEGIN
   Premium GestPro sidebar identity.
   User-approved order:
   GP shield > GestPro > authenticated user > role/branch > menu groups.
   Security/authorization behavior is intentionally untouched.
*/
.gestpro-sidebar__header--premium {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-top: 18px;
  padding-bottom: 16px;
  margin-bottom: 14px;
}

.gestpro-sidebar__brand--premium {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 10px;
  color: #FFFFFF !important;
  text-decoration: none !important;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gestpro-sidebar__brand--premium,
.gestpro-sidebar__brand--premium * {
  color: #FFFFFF !important;
}

.gestpro-sidebar__brand--premium::before {
  content: "GP" !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 68px !important;
  min-width: 68px !important;
  height: 74px !important;
  margin: 0 0 2px;
  padding: 0;
  border: 0;
  border-radius: 20px 20px 26px 26px;
  background: #3730A3 !important;
  color: #FFFFFF !important;
  clip-path: polygon(50% 0%, 94% 18%, 88% 70%, 50% 100%, 12% 70%, 6% 18%);
  font-size: 22px !important;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.88),
    0 8px 18px rgba(17, 24, 39, 0.22);
  filter: none;
}

.gestpro-sidebar__header--premium > *:not(.gestpro-sidebar__brand--premium) {
  max-width: 100%;
}

/* GESTPRO_R281_PREMIUM_IDENTITY_STACK_REPAIR */
.gestpro-sidebar__header--premium .gestpro-sidebar__user {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 4px;
  align-items: start;
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: 1.3;
  white-space: normal !important;
}

.gestpro-sidebar__header--premium .gestpro-sidebar__user > * {
  display: block !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  white-space: normal !important;
}

.gestpro-sidebar__header--premium .gestpro-sidebar__user strong,
.gestpro-sidebar__header--premium .gestpro-sidebar__user b {
  color: #FFFFFF !important;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
}

.gestpro-sidebar__header--premium .gestpro-sidebar__user span {
  color: rgba(255, 255, 255, 0.90) !important;
  font-size: 12px;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .gestpro-sidebar__header--premium {
    padding-top: 14px;
    padding-bottom: 12px;
    margin-bottom: 10px;
  }

  .gestpro-sidebar__brand--premium {
    gap: 6px;
    margin-bottom: 8px;
    font-size: 16px;
  }

  .gestpro-sidebar__brand--premium::before {
    width: 56px !important;
    min-width: 56px !important;
    height: 62px !important;
    border-radius: 17px 17px 22px 22px;
    font-size: 18px !important;
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.84),
      0 6px 14px rgba(17, 24, 39, 0.20);
  }
}
/* GESTPRO_R281_PREMIUM_SHIELD_END */
