/**
 * Global Marine — cohesive blue shell (main area, sidebar, header, footer, auth).
 */

.gm-brand-logo {
  display: block;
  width: 210px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.small-logo.gm-brand-logo {
  max-height: 36px;
  max-width: 44px;
}

/* Sidebar wordmark must stay inside the header and not cover the menu. */
.demo1 .kt-sidebar .kt-sidebar-header {
  height: auto;
  min-height: var(--header-height);
  padding-top: 8px;
  padding-bottom: 8px;
}

.demo1 .kt-sidebar .default-logo.gm-brand-logo {
  display: block;
  width: auto;
  height: 84px;
  max-width: 100%;
  object-fit: contain;
}

.demo1 .kt-sidebar .small-logo.gm-brand-logo {
  display: block;
  width: auto;
  height: 32px;
  max-width: 36px;
  max-height: 32px;
  object-fit: contain;
}

/* Loaded after assets/css/styles.css */

/* ----- Logged-in app (Metronic demo1 body) ----- */
html:not(.dark) body.demo1 {
  background: linear-gradient(180deg, #d8e6fb 0%, #e4eefb 42%, #edf3fd 100%) !important;
  background-color: #e4eefb !important;
}

html.dark body.demo1 {
  background: linear-gradient(180deg, #0a1220 0%, #0f1b2e 45%, #0c1526 100%) !important;
  background-color: #0f1b2e !important;
}

html:not(.dark) body.demo1 .kt-wrapper {
  background: transparent;
}

html:not(.dark) body.demo1 header#header.kt-header,
html:not(.dark) body.demo1 header.kt-header {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(185, 204, 232, 0.55) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 32px -20px rgba(30, 64, 175, 0.18);
}

html.dark body.demo1 header#header.kt-header,
html.dark body.demo1 header.kt-header {
  background: rgba(15, 27, 46, 0.96) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.14) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 12px 36px -16px rgba(0, 0, 0, 0.5);
}

html:not(.dark) body.demo1 .kt-footer {
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid #c5d8f0;
  margin-top: auto;
}

html.dark body.demo1 .kt-footer {
  background: rgba(10, 18, 32, 0.6);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

/* Fade content top into header — avoids a flat “lavender strip” under the toolbar */
html:not(.dark) body.demo1 main#content {
  background-image: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(255, 255, 255, 0.55) 1.5rem,
    rgba(255, 255, 255, 0.12) 3rem,
    rgba(255, 255, 255, 0) 5rem
  );
  background-repeat: no-repeat;
}

html.dark body.demo1 .kt-wrapper {
  background: transparent;
}

html.dark body.demo1 main#content {
  background-image: linear-gradient(
    180deg,
    rgba(15, 27, 46, 0.95) 0%,
    rgba(15, 27, 46, 0.5) 1.5rem,
    rgba(15, 27, 46, 0.12) 3rem,
    rgba(15, 27, 46, 0) 5.25rem
  );
  background-repeat: no-repeat;
}

/* Sidebar + mobile drawer: same surface */
html:not(.dark) #sidebar.redstone-sidebar-surface,
html:not(.dark) .kt-drawer #sidebar.redstone-sidebar-surface {
  background: linear-gradient(180deg, #c9daf5 0%, #bdd2f0 50%, #b3caeb 100%) !important;
  background-color: #bdd2f0 !important;
  border-right-color: #a8bddf !important;
}

html.dark #sidebar.redstone-sidebar-surface,
html.dark .kt-drawer #sidebar.redstone-sidebar-surface {
  background: linear-gradient(180deg, #152a45 0%, #102238 55%, #0d1c30 100%) !important;
  background-color: #102238 !important;
  border-right-color: rgba(148, 163, 184, 0.15) !important;
}

html:not(.dark) #sidebar_header {
  border-bottom: 1px solid rgba(55, 90, 140, 0.15);
}

html.dark #sidebar_header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Submenu rail + toggle on blue sidebar */
html:not(.dark) #sidebar.redstone-sidebar-surface .kt-menu-accordion::before {
  border-color: rgba(45, 75, 120, 0.22) !important;
}

html:not(.dark) #sidebar.redstone-sidebar-surface #sidebar_toggle {
  border-color: rgba(45, 75, 120, 0.35);
  color: rgba(30, 58, 95, 0.85);
}

html.dark #sidebar.redstone-sidebar-surface #sidebar_toggle {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(226, 232, 240, 0.9);
}

/* ----- Auth pages (.page-bg from Metronic classic templates) ----- */
.page-bg {
  background-image: none !important;
  background-size: auto !important;
}

html:not(.dark) .page-bg {
  background: linear-gradient(150deg, #d2e2fb 0%, #e2ebfc 45%, #eef4fe 100%) !important;
}

html.dark .page-bg,
.dark .page-bg {
  background: linear-gradient(155deg, #0b1526 0%, #111f38 50%, #0a1322 100%) !important;
}

/* Customers KPI + filter bar: see inline <style> in customers.php (avoids missing styles when only that file is synced) */
