html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --app-text: #152238;
  --app-muted: #5f728f;
  --app-border: rgba(200, 212, 228, 0.95);
  --app-surface: rgba(255, 255, 255, 0.86);
  --app-surface-strong: rgba(255, 255, 255, 0.94);
  --app-nav-surface: rgba(255, 255, 255, 0.84);
  --app-shadow: 0 18px 48px rgba(23, 42, 74, 0.12);
  --app-accent: #184f96;
  --app-accent-soft: rgba(24, 79, 150, 0.08);
}

body.app-shell {
  margin: 0;
  color: var(--app-text);
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.app-background-layer,
.app-background-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.app-background-layer {
  z-index: -3;
  background-image:
    linear-gradient(180deg, rgba(241, 246, 252, 0.42) 0%, rgba(228, 236, 246, 0.3) 100%),
    url('/img/main-01.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: scale(1.02);
}

.app-background-overlay {
  z-index: -2;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.4), transparent 34%),
    linear-gradient(180deg, rgba(246, 250, 255, 0.08), rgba(230, 237, 246, 0.18));
}

.app-shell-inner .app-background-layer {
  filter: saturate(0.68) brightness(1.08);
}

.app-shell-public .app-background-layer {
  filter: saturate(1.02) brightness(1.01);
  transform: scale(1);
}

.app-shell-public .app-background-overlay {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.14) 100%),
    radial-gradient(circle at left center, rgba(255, 255, 255, 0.14), transparent 42%);
}

.app-shell-inner .app-background-overlay {
  background:
    linear-gradient(180deg, rgba(244, 248, 253, 0.78) 0%, rgba(240, 245, 251, 0.88) 32%, rgba(235, 242, 249, 0.92) 100%),
    radial-gradient(circle at top right, rgba(24, 79, 150, 0.08), transparent 28%);
}

.app-shell-home .app-background-layer {
  filter: saturate(1) brightness(1.02);
}

.app-shell-home .app-background-overlay {
  background:
    linear-gradient(180deg, rgba(10, 24, 48, 0.08) 0%, rgba(10, 24, 48, 0.12) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 38%, rgba(255, 255, 255, 0.02) 100%);
}

.app-navbar {
  position: sticky;
  top: 0;
  z-index: 1040;
  padding: 0.9rem 0 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.app-navbar-inner {
  margin: 0 0.9rem;
  padding: 0.9rem 1.35rem;
  border-radius: 22px;
  border: 1px solid rgba(209, 219, 233, 0.9);
  background: var(--app-nav-surface);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(23, 42, 74, 0.12);
}

.app-navbar .navbar-brand {
  margin-right: 1.4rem;
}

.app-navbar .nav-link,
.app-navbar .dropdown-toggle {
  color: var(--app-text) !important;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  padding: 0.5rem 0.9rem !important;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .dropdown-toggle:hover,
.app-navbar .nav-link:focus,
.app-navbar .dropdown-toggle:focus {
  color: var(--app-accent) !important;
  background: var(--app-accent-soft);
  transform: translateY(-1px);
}

.app-navbar .dropdown-menu {
  margin-top: 0.75rem;
  border: 1px solid rgba(208, 219, 233, 0.95);
  border-radius: 18px;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 42px rgba(23, 42, 74, 0.16);
}

.app-navbar .dropdown-menu .nav-link {
  border-radius: 12px;
  padding: 0.55rem 0.8rem !important;
}

.app-content-shell {
  flex: 1 1 auto;
  padding: 1rem 1rem 1.5rem;
  position: relative;
  z-index: 1;
}

.app-content {
  position: relative;
}

.app-content-inner {
  padding: 1.35rem 1.5rem 2.5rem;
  border: 1px solid var(--app-border);
  border-radius: 28px;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
  backdrop-filter: blur(10px);
}

.app-content-home {
  min-height: calc(100vh - 180px);
  padding: 0 0 2.75rem;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
  box-shadow: 0 24px 60px rgba(16, 32, 57, 0.18);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.app-content-home::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(13, 28, 54, 0.22) 0%, rgba(13, 28, 54, 0.1) 32%, rgba(13, 28, 54, 0.03) 58%, rgba(13, 28, 54, 0) 100%);
}

.app-content-public {
  min-height: calc(100vh - 180px);
  width: min(100%, 620px);
  margin: 1rem 0 0 clamp(1rem, 5vw, 4.75rem);
  padding: 1.75rem 1.85rem 2.25rem;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 64px rgba(15, 30, 55, 0.16);
  backdrop-filter: blur(10px);
}

.app-shell-public .app-content-public .row {
  margin: 0;
}

.app-shell-public .app-content-public .row > [class*="col-"] {
  width: 100%;
  max-width: none;
  flex: 0 0 100%;
  padding: 0;
}

.app-shell-public .app-content-public .form-control,
.app-shell-public .app-content-public .form-select,
.app-shell-public .app-content-public .input-group,
.app-shell-public .app-content-public .btn {
  width: 100%;
}

.app-footer {
  position: relative;
  margin-top: 0;
  padding: 0 1rem 1rem;
  border: none !important;
  background: transparent;
  z-index: 1;
}

.app-footer-inner {
  max-width: none;
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 0.8rem 1.25rem;
  border-top: 1px solid rgba(209, 219, 233, 0.88);
  border-radius: 0 0 20px 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 -6px 18px rgba(23, 42, 74, 0.04);
}

.app-footer a {
  color: var(--app-accent);
  text-decoration: none;
}

.app-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 991.98px) {
  .app-navbar-inner {
    margin: 0 0.5rem;
    padding: 0.85rem 1rem;
  }

  .app-content-shell {
    padding: 0.75rem 0.5rem 1rem;
  }

  .app-content-inner,
  .app-content-home,
  .app-content-public {
    border-radius: 22px;
  }
}

@media (max-width: 767.98px) {
  #cargohelper-image {
    width: 220px;
  }

  .app-navbar .nav-link,
  .app-navbar .dropdown-toggle {
    padding: 0.55rem 0.7rem !important;
  }

  .app-content-inner {
    padding: 1rem;
  }

  .app-content-home {
    min-height: calc(100vh - 150px);
  }

  .app-content-public {
    min-height: calc(100vh - 150px);
    width: 100%;
    margin: 0.5rem 0 0;
    padding: 1.1rem 1rem 1.5rem;
  }
}
