/* Plataforma Control Facility V11.38 · identidad visual TRESA */
:root {
  --tresa-turquoise: #08a9c9;
  --tresa-sky: #19b9e8;
  --tresa-canvas: #d9f3f8;
  --tresa-canvas-light: #eefbfd;
  --tresa-deep: #07536d;
}

html,
body {
  min-height: 100%;
}

body {
  background:
    radial-gradient(
      circle at 88% 6%,
      rgba(25, 185, 232, 0.24) 0,
      rgba(25, 185, 232, 0) 30%
    ),
    linear-gradient(
        145deg,
        #c9edf4 0%,
        var(--tresa-canvas-light) 48%,
        var(--tresa-canvas) 100%
      )
      fixed !important;
}

.app-shell,
.main {
  background: transparent !important;
}

.sidebar {
  border-right-color: rgba(255, 255, 255, 0.34) !important;
  background: linear-gradient(
    180deg,
    #0797b8 0%,
    #087b9c 48%,
    #07536d 100%
  ) !important;
  box-shadow: 8px 0 28px rgba(6, 83, 109, 0.2) !important;
}

.cf-tresa-brandmark {
  display: grid !important;
  overflow: hidden !important;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.86) !important;
  background: #ffffff !important;
}

.cf-tresa-brandmark img {
  display: block;
  width: 86% !important;
  height: 86% !important;
  object-fit: contain;
}

.top-strip {
  border-color: #a4dce8 !important;
  background: rgba(255, 255, 255, 0.86) !important;
  backdrop-filter: blur(10px);
}

main:not(.cf-dashboard-view) > header,
main.cf-dashboard-view > header {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 118px !important;
  align-items: center !important;
  gap: 18px !important;
  border: 1px solid #91d8e8 !important;
  border-left: 6px solid var(--tresa-sky) !important;
  background:
    radial-gradient(
      circle at 94% 10%,
      rgba(8, 169, 201, 0.16) 0,
      rgba(8, 169, 201, 0) 30%
    ),
    rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 14px 36px rgba(7, 83, 109, 0.13) !important;
  backdrop-filter: blur(12px);
}

.cf-view-tresa-logo {
  display: grid;
  width: 90px;
  min-height: 78px;
  place-items: center;
  gap: 2px;
  padding: 6px 8px 5px;
  border: 1px solid #a7deea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(7, 83, 109, 0.09);
}

.cf-view-tresa-logo img {
  display: block;
  width: 62px;
  height: 52px;
  object-fit: contain;
}

.cf-view-tresa-logo span {
  color: var(--tresa-deep);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1;
  white-space: nowrap;
}

main > header > div:not(.cf-view-tresa-logo, .header-actions) {
  min-width: 0;
}

main > header .header-actions {
  justify-self: end;
}

.panel,
.page-panel,
.filters-card,
.installation-selector,
.installation-card,
.asset-profile,
.bulk-import-card,
.cf-equipment-action-menu,
.calendar,
.cf-dashboard-panel,
.cf-dashboard-filters,
.kpis article {
  border-color: #acdce6 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 10px 28px rgba(7, 83, 109, 0.09) !important;
}

thead th {
  border-bottom-color: #86cfdf !important;
  background: #e1f6fa !important;
  color: var(--tresa-deep) !important;
}

button.primary,
.primary {
  border-color: #0786a6 !important;
  background: linear-gradient(135deg, #08a9c9, #0786a6) !important;
}

button.primary:hover,
.primary:hover {
  background: linear-gradient(135deg, #078eae, #066f8b) !important;
}

@media (max-width: 760px) {
  main:not(.cf-dashboard-view) > header,
  main.cf-dashboard-view > header {
    grid-template-columns: 62px minmax(0, 1fr);
    min-height: 0 !important;
    gap: 12px !important;
    padding: 16px !important;
  }

  .cf-view-tresa-logo {
    width: 62px;
    min-height: 62px;
    padding: 5px;
  }

  .cf-view-tresa-logo img {
    width: 48px;
    height: 42px;
  }

  .cf-view-tresa-logo span {
    display: none;
  }

  main > header .header-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
  }
}
