:root {
  --ui-radius: 14px;
  --ui-shadow-sm: 0 2px 10px rgba(16, 24, 40, 0.06);
  --ui-shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08);
}

body.app-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bs-body-bg) 94%, #dce8ff 6%) 0%, var(--bs-body-bg) 35%);
}

.app-navbar {
  backdrop-filter: blur(6px);
  box-shadow: var(--ui-shadow-sm);
}

.app-navbar .navbar-brand img {
  width: 34px;
  height: 28px;
  border-radius: 6px;
}

.app-navbar .nav-link {
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
}

.app-navbar .nav-link.active,
.app-navbar .dropdown-item.active {
  color: var(--bs-primary);
  background-color: color-mix(in srgb, var(--bs-primary) 14%, transparent);
}

.app-main {
  padding: 1rem 0 1.5rem;
}

.app-main .container-sm,
.app-main .container,
.app-main .container-fluid {
  max-width: 1320px;
}

.app-footer {
  margin-top: 1rem;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--bs-border-color);
  background: color-mix(in srgb, var(--bs-body-bg) 92%, #eef3ff 8%);
}

.app-footer .nav-link {
  padding: 0.25rem 0.5rem;
}

.ui-page-header {
  margin: 0.35rem 0 1rem;
}

.ui-page-title {
  font-size: clamp(1.15rem, 1.2rem + 0.6vw, 1.7rem);
  margin: 0;
}

.ui-page-subtitle {
  color: var(--bs-secondary-color);
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.ui-surface {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-sm);
}

.ui-surface-elevated {
  box-shadow: var(--ui-shadow-md);
}

.ui-filter-panel {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ui-radius);
  background: var(--bs-body-bg);
}

.ui-filter-panel .card-header {
  background: transparent;
  border-bottom: 1px solid var(--bs-border-color);
}

.table-responsive.ui-table-wrap {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-sm);
  background: var(--bs-body-bg);
}

.table-responsive.ui-table-wrap table {
  margin-bottom: 0;
}

.table-responsive.ui-table-wrap thead th {
  background: var(--bs-tertiary-bg);
}

input.form-control,
select.form-select,
button.btn,
a.btn,
.form-check-input {
  min-height: 42px;
}

button.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.form-check-input {
  min-height: 1.2rem;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--bs-primary) 40%, transparent);
  outline-offset: 1px;
}

.stats-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stats-card {
  padding: 0.85rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--bs-body-bg);
}

.stats-label {
  display: block;
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}

.stats-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.pickup-output {
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-sm);
}

.pickup-table td,
.pickup-table th {
  vertical-align: middle;
}

.cookie-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: min(460px, calc(100vw - 2rem));
  z-index: 1100;
  border: 1px solid color-mix(in srgb, var(--bs-primary) 20%, var(--bs-border-color));
  border-radius: 18px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--bs-body-bg) 92%, #e5f0ff 8%), var(--bs-body-bg));
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.24);
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner__shape {
  position: absolute;
  top: -34px;
  right: -38px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--bs-primary) 28%, transparent) 0%, transparent 66%);
  pointer-events: none;
}

.cookie-banner__content {
  position: relative;
  padding: 1rem 1rem 0.9rem;
}

.cookie-banner__eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.cookie-banner__title {
  font-weight: 700;
}

.cookie-banner__text {
  color: var(--bs-secondary-color);
  max-width: 40ch;
}

.cookie-banner__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cookie-banner__link {
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
}

.cookie-banner__link:hover {
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

@media (max-width: 767.98px) {
  .cookie-banner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
  }

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

  .cookie-banner__actions {
    width: 100%;
    justify-content: stretch;
  }

  .cookie-banner__actions .btn {
    flex: 1 1 100%;
  }

  .app-main {
    padding-top: 0.6rem;
  }

  .app-navbar .navbar-collapse {
    margin-top: 0.6rem;
    padding: 0.5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    background: var(--bs-body-bg);
  }

  .pickup-table thead {
    display: none;
  }

  .pickup-table,
  .pickup-table tbody,
  .pickup-table tr,
  .pickup-table td {
    display: block;
    width: 100%;
  }

  .pickup-table tr {
    margin-bottom: 0.85rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    background: var(--bs-body-bg);
    box-shadow: var(--ui-shadow-sm);
    overflow: hidden;
  }

  .pickup-table td {
    border: 0;
    padding: 0.65rem 0.75rem;
  }

  .pickup-table td:first-child {
    border-bottom: 1px solid var(--bs-border-color);
  }

  .ui-mobile-full {
    width: 100% !important;
  }
}
