:root {
  --brand-navy: #0f2f86;
  --brand-blue: #1971d4;
  --brand-cyan: #16a6c9;
  --bg-main: #f3f6fb;
  --bg-card: #ffffff;
  --text-main: #172033;
  --text-muted: #5f6b85;
  --line-soft: #e5eaf3;
  --shadow-soft: 0 10px 28px rgba(10, 31, 78, 0.08);
}

body,
button,
input,
select,
textarea {
  font-family: "Plus Jakarta Sans", "Segoe UI", Tahoma, sans-serif;
}

body.app-shell {
  color: var(--text-main);
  background:
    radial-gradient(circle at 20% -5%, rgba(22, 166, 201, 0.14), transparent 32%),
    radial-gradient(circle at 90% 0%, rgba(25, 113, 212, 0.15), transparent 40%),
    var(--bg-main);
}

.topbar {
  min-height: 64px;
  background: linear-gradient(90deg, #0d2a78 0%, #1042a1 52%, #0d2a78 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(8, 22, 58, 0.35);
}

.topbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.35);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.1px;
}

.brand-logo {
  width: 130px;
  height: auto;
  max-height: 34px;
  object-fit: contain;
}

.user-chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  color: #ffffff;
}

.user-chip:hover,
.user-chip:focus,
.user-chip:active,
.user-chip.show {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.28);
}

.nav-visibility-toggle {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 999px;
  padding-inline: 0.9rem;
}

.nav-visibility-toggle:hover,
.nav-visibility-toggle:focus,
.nav-visibility-toggle:active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.28);
}

.topbar .dropdown-menu {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.app-layout {
  min-height: calc(100vh - 64px);
}

.sidebar {
  min-height: calc(100vh - 64px);
  background: linear-gradient(180deg, #fafdff 0%, #f4f8ff 100%);
  border-right: 1px solid var(--line-soft);
}

.nav-menu {
  gap: 0.35rem;
}

.nav-menu .list-group-item {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #283a5e;
  font-weight: 600;
  padding: 0.58rem 0.82rem;
}

.nav-menu .list-group-item-action:hover {
  background: #e8f1ff;
  color: #113980;
}

.nav-menu .list-group-item-action.active {
  background: linear-gradient(90deg, #dbebff 0%, #e5f6ff 100%);
  color: #0e377f;
  box-shadow: inset 0 0 0 1px #bed8ff;
}

.nav-menu .nav-group-title {
  margin-top: 0.55rem;
  color: #8190ad;
  font-size: 0.71rem;
  letter-spacing: 0.07em;
  font-weight: 700;
  text-transform: uppercase;
  cursor: default;
  padding-top: 0.7rem;
}

.main-content {
  padding-inline: 1.15rem;
}

h3,
h4,
h5 {
  font-weight: 700;
  color: #12264e;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.card .card-body {
  padding: 1rem 1.1rem;
}

.card-metric {
  border-left: 4px solid var(--brand-blue);
  position: relative;
  overflow: hidden;
}

.card-metric::after {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 110px;
  height: 110px;
  transform: translate(30%, -45%);
  background: radial-gradient(circle, rgba(25, 113, 212, 0.19) 0%, rgba(25, 113, 212, 0) 72%);
  pointer-events: none;
}

.form-control,
.form-select {
  border-radius: 10px;
  border-color: #d6dfec;
  min-height: 42px;
}

.calendar-control {
  padding-right: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.flatpickr-input.form-control[readonly] {
  background-color: #fff;
  opacity: 1;
}

.flatpickr-calendar {
  border: 1px solid #d6dfec;
  box-shadow: 0 14px 30px rgba(10, 31, 78, 0.16);
  border-radius: 14px;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  font-weight: 600;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
  background: #1a74d8;
  border-color: #1a74d8;
}

.flatpickr-day.today {
  border-color: #179fd4;
}

.calendar-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.calendar-presets .btn {
  border-radius: 999px;
  padding-inline: 0.75rem;
}

.form-control:focus,
.form-select:focus {
  border-color: #97c1ff;
  box-shadow: 0 0 0 0.2rem rgba(25, 113, 212, 0.16);
}

.btn {
  border-radius: 10px;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(90deg, #1a74d8 0%, #179fd4 100%);
  border-color: #1a74d8;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(90deg, #1666c0 0%, #148eba 100%);
  border-color: #155eb1;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  white-space: nowrap;
  border-bottom-width: 1px;
  border-color: #d6dfec;
  background: #eef4ff;
  color: #23365a;
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.table tbody td {
  border-color: #edf2f9;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: #fbfdff;
}

.list-group-item {
  border-color: var(--line-soft);
}

.alert {
  border-radius: 12px;
}

.invoice-line-total-preview {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(90deg, #eff6ff 0%, #f0fdf4 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.invoice-line-total-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.invoice-line-total-value {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 800;
  color: #14532d;
}

@media (max-width: 991.98px) {
  .sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    box-shadow: var(--shadow-soft);
    margin-bottom: 0.8rem;
    border-radius: 0 0 14px 14px;
  }

  .main-content {
    padding-inline: 0.7rem;
  }

  .brand-logo {
    width: 110px;
  }

  .sidebar.collapse:not(.show) {
    display: none;
  }
}

body.shop-shell {
  color: var(--text-main);
  background: #f6f8fb;
}

.shop-topbar {
  min-height: 64px;
  background: #0d2a78;
  box-shadow: 0 8px 20px rgba(8, 22, 58, 0.22);
}

.shop-topbar .navbar-brand {
  color: #fff;
}

.shop-main {
  padding-block: 1.5rem 3rem;
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.shop-header h1,
.shop-panel h1,
.shop-main h1 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  letter-spacing: 0;
}

.shop-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  align-items: stretch;
  min-height: 390px;
  margin-bottom: 1.25rem;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-soft);
}

.shop-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.35rem, 4vw, 3rem);
}

.shop-kicker {
  color: #1666c0;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 0.65rem;
}

.shop-hero h1 {
  max-width: 760px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.02;
  margin-bottom: 1rem;
  color: #10244c;
}

.shop-hero p {
  max-width: 600px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.shop-hero-search {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.45fr) auto;
  gap: 0.65rem;
  margin-top: 1rem;
}

.shop-hero-media {
  position: relative;
  min-height: 300px;
  background: #eef4ff;
}

.shop-hero-media a {
  display: block;
  height: 100%;
}

.shop-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 220ms ease;
}

.shop-hero-product {
  position: absolute;
  inset: auto 1rem 1rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(214, 223, 236, 0.45);
  backdrop-filter: blur(8px);
  border-radius: 8px;
}

.shop-hero-product span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.shop-hero-product strong {
  font-family: "Allura", "Plus Jakarta Sans", sans-serif;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 400;
  color: #243758;
}

.shop-category-strip {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-block: 0.3rem 1rem;
}

.shop-category-strip a {
  flex: 0 0 auto;
  text-decoration: none;
  color: #1f3760;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
}

.shop-category-strip a.active,
.shop-category-strip a:hover {
  color: #ffffff;
  background: #123b8b;
  border-color: #123b8b;
}

.shop-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 0.5rem 0 1rem;
}

.shop-section-heading h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #10244c;
}

.shop-section-heading p {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.shop-grid-featured {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.shop-product,
.shop-panel {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.shop-product {
  overflow: hidden;
}

.shop-product-image-link {
  display: block;
  position: relative;
  overflow: hidden;
}

.shop-product img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eef4ff;
  transition: transform 180ms ease;
}

.shop-product:hover img {
  transform: scale(1.035);
}

.shop-product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: #ffffff;
  color: #123b8b;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.shop-product-body {
  padding: 0.95rem;
}

.shop-product h2 {
  font-size: 1rem;
  min-height: 2.5rem;
  margin: 0.25rem 0 0.75rem;
}

.shop-price {
  font-weight: 800;
  color: #103980;
}

.shop-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.shop-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.8fr);
  gap: 1.4rem;
  align-items: start;
}

.shop-detail-gallery,
.shop-detail-panel {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.shop-detail-gallery {
  padding: 1rem;
}

.shop-detail-panel {
  padding: clamp(1rem, 3vw, 1.4rem);
}

.shop-detail-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #eef4ff;
}

.shop-detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.shop-detail-thumbs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #eef4ff;
}

.shop-panel {
  padding: 1rem;
}

.shop-narrow {
  max-width: 520px;
  margin-inline: auto;
}

.shop-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
  padding: 0.9rem 1rem;
  background: #eef4ff;
  border: 1px solid #d6dfec;
  border-radius: 8px;
}

.cart-product-image {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #eef4ff;
}

.order-list-image {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #eef4ff;
}

.shop-cart-icon {
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: -0.18rem;
}

.cart-qty-form {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.cart-qty-input {
  min-width: 72px;
  text-align: center;
}

@media (max-width: 575.98px) {
  .shop-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-grid {
    grid-template-columns: 1fr;
  }

  .shop-hero-search {
    grid-template-columns: 1fr;
  }

  .cart-qty-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .shop-hero,
  .shop-detail-layout {
    grid-template-columns: 1fr;
  }
}
