/* AI-assisted — see AI-ATTRIBUTION.md for details */
:root {
  --ink: #1a2332;
  --muted: #5b6675;
  --line: #d7dde5;
  --bg: #f3f5f8;
  --panel: #ffffff;
  --accent: #0b5f8a;
  --accent-dark: #084766;
  --ok: #1f6b3a;
  --warn: #8a5a00;
  --err: #8b1e1e;
}

* { box-sizing: border-box; }

button, input, select, textarea {
  font-family: Barlow, sans-serif;
}

body {
  margin: 0;
  font-family: Barlow, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(11, 95, 138, 0.08), transparent 40%),
    linear-gradient(180deg, #eef2f6 0%, var(--bg) 40%, #e9edf2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

.portal-header {
  --header-blue: #0072bc;
  --header-teal: #00b5c3;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-top {
  background: #000;
  color: #fff;
}

.header-top .header-inner {
  min-height: 42px;
}

.header-phone,
.header-account {
  color: #fff !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 400;
}

.header-phone:hover,
.header-account:hover {
  color: #d9d9d9 !important;
}

.header-top-right {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.header-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--header-blue);
  color: #fff !important;
  text-decoration: none !important;
  padding: 0.45rem 0.85rem;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.header-cart:hover {
  background: #005a96;
  color: #fff !important;
}

.header-cart-icon {
  position: relative;
  display: inline-flex;
}

.header-cart-count {
  position: absolute;
  top: -8px;
  right: -9px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fff;
  color: var(--header-blue);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.header-main {
  background: #fff;
  border-bottom: 3px solid var(--header-teal);
}

.header-main .header-inner {
  min-height: 84px;
  flex-wrap: wrap;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none !important;
  flex-shrink: 0;
}

.site-logo img {
  display: block;
  height: 52px;
  width: auto;
}

.portal-nav {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.portal-nav a,
.portal-nav span {
  color: #333 !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none !important;
  white-space: nowrap;
}

.portal-nav a:hover {
  color: var(--header-blue) !important;
}

.header-search {
  display: flex;
  margin: 0;
}

.header-search input[type="search"] {
  width: 190px;
  min-width: 140px;
  padding: 0.4rem 0.65rem;
  border: 1px solid #d0d0d0;
  border-radius: 2px;
  font: inherit;
  font-size: 13px;
}

.header-search input[type="search"]:focus {
  outline: 1px solid var(--header-teal);
  border-color: var(--header-teal);
}

.profile-picker {
  position: relative;
  flex-shrink: 0;
  margin-right: auto;
}

.profile-picker-summary {
  list-style: none;
  cursor: pointer;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-picker-summary::-webkit-details-marker {
  display: none;
}

.profile-picker-summary::after {
  content: " ▾";
  font-size: 10px;
  opacity: 0.85;
}

.profile-picker[open] .profile-picker-summary {
  color: var(--header-blue);
}

.profile-picker-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  width: 280px;
  padding: 0.65rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.profile-picker-search {
  margin-bottom: 0.5rem;
}

.profile-picker-search input[type="search"] {
  width: 100%;
}

.profile-picker-options {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-height: 240px;
  overflow-y: auto;
}

.profile-picker-option {
  display: block;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.profile-picker-option:hover {
  background: #eef2f6;
}

.profile-picker-options hr {
  width: 100%;
  margin: 0.25rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.profile-picker-option.is-hidden,
.profile-picker-options hr.is-hidden {
  display: none;
}

.portal-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  flex: 1 0 auto;
  width: 100%;
}

.breadcrumbs {
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: var(--line);
}

.breadcrumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.messages li {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: #e8f1f7;
  border: 1px solid #c5d9e6;
}

.messages li.error,
.messages li.error { background: #f8e8e8; border-color: #e3bcbc; color: var(--err); }
.messages li.success { background: #e7f4eb; border-color: #b9d8c2; color: var(--ok); }
.messages li.warning { background: #fff6e5; border-color: #ead4a4; color: var(--warn); }

h1 { margin: 0 0 0.75rem; font-size: 1.75rem; }
h2 { margin: 1.5rem 0 0.75rem; font-size: 1.25rem; }
.lede { color: var(--muted); margin: 0 0 1.25rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

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

.card-link {
  display: block;
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card-link:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(26, 35, 50, 0.08);
  text-decoration: none;
}

.card-link strong { display: block; margin-bottom: 0.35rem; }
.card-link span { color: var(--muted); font-size: 0.9rem; }

.product-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.product-card-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}

.product-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-thumb-contain {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-thumb-contain img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-card-placeholder {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

table.data {
  width: 100%;
  border-collapse: collapse;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.data th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }

.inventory-zero-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
}

.btn:hover { background: var(--accent-dark); }
.btn-secondary { background: #5b6675; }
.btn-secondary:hover { background: #434c58; }
.btn-danger { background: var(--err); }

.form-row { margin-bottom: 1rem; }
.form-row label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.form-row .errorlist {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  color: var(--err);
  font-size: 0.9rem;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="number"],
.form-row input[type="file"],
.form-row textarea,
.search-form input[type="search"] {
  width: 100%;
  max-width: 480px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.search-form input[type="search"] { max-width: none; flex: 1; }

.muted { color: var(--muted); }
.price { font-weight: 700; white-space: nowrap; }
.status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #e8eef3;
}
.status-submitted, .status-confirmed { background: #e7f4eb; color: var(--ok); }
.status-failed { background: #f8e8e8; color: var(--err); }
.status-pending { background: #fff6e5; color: var(--warn); }
.status-active, .status-in_stock { background: #e7f4eb; color: var(--ok); }
.status-inactive, .status-out_of_stock { background: #f8e8e8; color: var(--err); }

.address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.address-block {
  font-style: normal;
  line-height: 1.45;
}

.search-result-row {
  align-items: stretch;
}

.search-result-link {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
  flex: 1;
}

.search-result-link:hover strong {
  color: var(--accent);
  text-decoration: underline;
}

.thumb-wrap {
  flex: 0 0 auto;
}

.thumb-wrap img,
.product-hero {
  display: block;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: cover;
}

.thumb-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  border: 1px dashed var(--line);
  background: #eef2f6;
}

.thumb-placeholder.large {
  width: 100%;
  max-width: 480px;
  height: 280px;
}

.product-detail {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1rem;
  width: 100%;
}

.product-detail-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  width: 100%;
  align-items: stretch;
}

.product-detail-media,
.product-detail-price {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.product-detail-media {
  text-align: center;
}

.product-detail-media .product-hero,
.product-detail-media .thumb-placeholder.large {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.product-hero {
  max-width: 100%;
  width: auto;
  height: auto;
}

.product-detail-price {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-price-value {
  font-size: 1.5rem;
  margin: 0.35rem 0 1rem;
}

.product-price-form {
  flex-wrap: wrap;
}

table.specs th {
  width: 40%;
}

.product-long-description {
  margin-top: 1rem;
  color: var(--muted);
}

@media (max-width: 800px) {
  .product-detail-hero {
    grid-template-columns: 1fr;
  }
}


.variant-list { list-style: none; padding: 0; margin: 0; }
.variant-list li {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

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

.pdp-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.pdp-top .breadcrumbs {
  margin: 0;
  flex: 1;
}

.pdp-top p { margin: 0; }

body:has(.shop-pdp) {
  background: #fff;
}

.portal-main:has(.shop-pdp) {
  max-width: 1180px;
  padding-top: 1.25rem;
}

.shop-pdp {
  --shop-blue: #0072bc;
  --shop-blue-dark: #005a96;
  --shop-text: #333333;
  --shop-muted: #888888;
  --shop-line: #e5e5e5;
  --shop-label: #f7f7f7;
  color: var(--shop-text);
  background: #fff;
}

.shop-pdp a {
  color: var(--shop-blue);
}

.shop-pdp-grid {
  display: grid;
  grid-template-columns: minmax(260px, 42%) minmax(0, 1fr);
  gap: 2.75rem 3.25rem;
  align-items: start;
}

.shop-gallery-main {
  position: relative;
  background: #fff;
}

.shop-gallery-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.shop-zoom {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.shop-zoom::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 9px;
  height: 9px;
  border: 2px solid #555;
  border-radius: 50%;
}

.shop-zoom::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 15px;
  width: 6px;
  height: 2px;
  background: #555;
  transform: rotate(45deg);
  transform-origin: left center;
}

.shop-gallery-placeholder {
  min-height: 360px;
  background: #f7f7f7;
}

.shop-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.shop-thumb {
  width: 84px;
  height: 84px;
  padding: 4px;
  border: 1px solid var(--shop-line);
  background: #fff;
  cursor: pointer;
}

.shop-thumb:hover,
.shop-thumb.is-active {
  border-color: var(--shop-blue);
}

.shop-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shop-crumbs {
  margin: 0 0 0.7rem;
  font-size: 12px;
  color: var(--shop-muted);
  line-height: 1.55;
}

.shop-crumbs a {
  color: var(--shop-muted);
  text-decoration: none;
}

.shop-crumbs a:hover {
  color: var(--shop-blue);
  text-decoration: underline;
}

.shop-crumbs-sep {
  margin: 0 0.3rem;
  color: #bdbdbd;
}

.shop-title {
  margin: 0 0 0.7rem;
  color: var(--shop-blue);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-transform: uppercase;
}

.shop-sku,
.shop-cats {
  margin: 0 0 0.3rem;
  font-size: 14px;
  color: var(--shop-text);
}

.shop-sku strong,
.shop-cats strong {
  font-weight: 700;
  margin-right: 0.35rem;
}

.shop-cats a:hover { text-decoration: underline; }

.shop-admin { margin: 0.35rem 0 0; font-size: 13px; }

.shop-price {
  margin: 0.9rem 0 0.45rem;
  color: var(--shop-blue);
  font-size: 22px;
  font-weight: 600;
}

.shop-price-final {
  margin-top: 1.1rem;
  font-size: 24px;
}

.shop-short {
  margin: 0 0 1.35rem;
  color: var(--shop-text);
  font-size: 15px;
}

.shop-config { margin: 0 0 1.75rem; }

.shop-options {
  width: 100%;
  border-top: 1px solid var(--shop-line);
}

.shop-option {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 1px solid var(--shop-line);
}

.shop-option:nth-child(odd) {
  background: var(--shop-label);
}

.shop-option:nth-child(even) {
  background: #fff;
}

.shop-option label,
.shop-option-label {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-right: 1px solid var(--shop-line);
  font-weight: 700;
  font-size: 14px;
  color: var(--shop-text);
}

.shop-option-control {
  display: flex;
  align-items: center;
  padding: 8px 10px;
}

.shop-option select {
  width: 100%;
  max-width: none;
  height: 36px;
  padding: 0 2rem 0 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 14px;
  color: var(--shop-text);
}

.shop-option select:disabled {
  color: var(--shop-text);
  opacity: 1;
  background-color: #fff;
}

.shop-clear {
  margin: 6px 0 0;
  text-align: right;
  font-size: 13px;
}

.shop-clear a:hover { text-decoration: underline; }

.shop-buy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.shop-qty-label {
  font-size: 14px;
  font-weight: 700;
}

.shop-buy input[type="number"] {
  width: 72px;
  max-width: none;
  height: 38px;
  padding: 0 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font: inherit;
}

.shop-pdp .btn.shop-cart-btn {
  background: var(--shop-blue);
  border-radius: 3px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
}

.shop-pdp .btn.shop-cart-btn:hover {
  background: var(--shop-blue-dark);
}

.shop-copy h2 {
  margin: 0 0 0.7rem;
  font-size: 16px;
  font-weight: 700;
  color: #444;
}

.shop-details,
.shop-details p {
  color: var(--shop-text);
  font-size: 14px;
  line-height: 1.6;
}

.shop-details p { margin: 0 0 0.75rem; }

.shop-bullets {
  margin: 0.85rem 0;
  padding: 0;
  list-style: none;
  color: var(--shop-text);
  font-size: 14px;
  line-height: 1.6;
}

.shop-bullets li::before {
  content: "- ";
}

.shop-ids {
  margin: 0.9rem 0 0;
  color: var(--shop-text);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .shop-pdp-grid,
  .shop-option { grid-template-columns: 1fr; }
  .shop-option label,
  .shop-option-label { border-right: 0; border-bottom: 1px solid var(--shop-line); }
}


.portal-footer {
  background: #016fb9;
  color: #fff;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1.1fr);
  gap: 3rem 2.5rem;
  align-items: start;
}

.footer-col img {
  display: block;
  height: 56px;
  width: auto;
  margin: 0 0 1rem;
}

.footer-col p,
.footer-col address,
.footer-col .footer-note {
  margin: 0 0 0.85rem;
  font-size: 15px;
  font-style: normal;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.footer-col p {
  max-width: 32ch;
}

.footer-col h3 {
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.28);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  font-size: 15px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.92);
}

.footer-col a {
  color: #fff !important;
  text-decoration: none !important;
  font-size: 15px;
  line-height: 1.7;
}

.footer-col a:hover {
  text-decoration: underline !important;
}

.report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: flex-end;
}

.report-filters .form-row {
  margin-bottom: 0;
}

.report-filters .form-row input[type="date"] {
  width: 11.5rem;
  max-width: 100%;
}

.report-filters-submit {
  padding-bottom: 0.15rem;
}

.so-report-summary {
  margin: 0 0 1rem;
  color: var(--muted);
}

.so-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.so-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.so-header p {
  margin: 0;
}

.so-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.so-header-total {
  font-size: 1.15rem;
}

.so-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem 1rem;
  margin: 0 0 1rem;
}

.so-meta div {
  margin: 0;
}

.so-meta dt {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.so-meta dd {
  margin: 0.15rem 0 0;
}

.so-note {
  margin: 0 0 1rem;
  color: var(--muted);
}

.status-issued,
.status-in-progress,
.status-fulfilled { background: #e7f4eb; color: var(--ok); }
.status-estimate { background: #fff6e5; color: var(--warn); }
.status-voided,
.status-cancelled,
.status-expired { background: #f8e8e8; color: var(--err); }

@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.25rem;
  }
}