:root {
  --ink: #172331;
  --muted: #617181;
  --line: #d8e1e8;
  --soft: #f4f7f9;
  --paper: #ffffff;
  --brand: #123a5a;
  --brand-2: #167c8b;
  --accent: #e5a13a;
  --danger: #b93434;
  --success: #177245;
  --shadow: 0 18px 40px rgba(23, 35, 49, 0.09);
  --radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header,
.site-footer,
.section,
.page-hero,
.hero,
.admin-nav {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 278px;
}

.brand-logo,
.brand-mark {
  width: 72px;
  height: 48px;
  display: grid;
  place-items: center;
  background: transparent;
  border-radius: 8px;
  flex: 0 0 auto;
}

.brand-logo {
  border: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.brand-mark {
  background: var(--brand);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.main-nav a,
.admin-nav a,
.link-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  color: var(--muted);
  border-radius: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.main-nav a.active,
.main-nav a:hover,
.admin-nav a.active,
.admin-nav a:hover,
.link-button:hover {
  color: var(--brand);
  background: #edf5f7;
}

.cart-link span {
  margin-left: 6px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--brand-2);
  font-size: 0.78rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.flash-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
}

.flash {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--soft);
  margin-bottom: 8px;
}

.flash.success {
  border-color: #b8dcc9;
  background: #edf9f2;
}

.flash.warning {
  border-color: #ead4a8;
  background: #fff8e9;
}

.flash.danger {
  border-color: #e3b0b0;
  background: #fff0f0;
}

.hero {
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: 56px;
  padding: 46px 0 34px;
}

.hero-copy h1,
.page-hero h1 {
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: 1;
  margin: 10px 0 18px;
  letter-spacing: 0;
}

.hero-copy p,
.page-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-panel {
  min-height: 390px;
  display: grid;
  place-items: center;
  background: #edf4f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-hero-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.logo-hero-panel img {
  width: min(100%, 640px);
  height: auto;
  max-height: 420px;
  object-fit: contain;
  filter: drop-shadow(0 22px 34px rgba(23, 35, 49, 0.16));
}

.hero-actions,
.form-actions,
.cart-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.eyebrow,
.tag {
  color: var(--brand-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section {
  padding: 42px 0;
}

.featured-section {
  padding-top: 8px;
}

.page {
  min-height: 58vh;
}

.page-hero {
  padding: 58px 0 24px;
}

.compact-hero {
  padding-bottom: 12px;
}

.with-action {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.split,
.checkout-layout,
.account-layout,
.settings-layout,
.order-detail-grid,
.admin-columns,
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 28px;
  align-items: start;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.service-grid article,
.panel,
.info-panel,
.form-card,
.summary-box,
.history-panel,
.product-card,
.metric-grid article {
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(23, 35, 49, 0.05);
}

.service-grid article {
  padding: 18px;
}

.service-grid strong,
.service-grid span {
  display: block;
}

.service-grid strong {
  margin-bottom: 5px;
}

.service-grid span,
.muted {
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading h2,
.panel h2,
.summary-box h2,
.form-card h2 {
  margin: 0 0 12px;
}

.text-link {
  color: var(--brand-2);
  font-weight: 700;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  min-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-media {
  aspect-ratio: 4 / 3;
  background: white;
  border-bottom: 1px solid var(--line);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.product-body h3 {
  min-height: 54px;
  margin: 0;
  font-size: 1.08rem;
}

.product-details p {
  color: var(--muted);
  margin: 0;
}

.product-details {
  color: var(--muted);
  padding: 12px 0 2px;
  border-top: 1px solid var(--line);
}

.details-toggle {
  min-height: 36px;
  width: fit-content;
  border: 1px solid #cfe0e6;
  border-radius: 8px;
  padding: 7px 11px;
  color: var(--brand);
  background: #eef5f7;
  font-weight: 800;
  cursor: pointer;
}

.product-meta,
.price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-card .product-meta {
  margin-top: auto;
}

.product-meta span,
.price-line span {
  color: var(--muted);
  font-size: 0.9rem;
}

.btn {
  min-height: 42px;
  min-width: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  color: white;
  background: var(--brand);
}

.btn.secondary {
  color: var(--brand);
  background: #eef5f7;
  border-color: #cfe0e6;
}

.btn.ghost {
  color: var(--brand);
  border-color: var(--line);
  background: white;
}

.btn.danger {
  color: white;
  background: var(--danger);
}

.btn.small {
  min-height: 34px;
  min-width: 68px;
  padding: 7px 10px;
  font-size: 0.88rem;
}

.btn.wide {
  width: 100%;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  margin-bottom: 22px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

label span {
  font-size: 0.9rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cbd7df;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
}

textarea {
  resize: vertical;
}

.filter-bar label {
  min-width: min(280px, 100%);
  flex: 1;
}

.empty-state {
  width: min(760px, calc(100% - 32px));
  margin: 42px auto;
  padding: 42px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.product-detail {
  width: min(1080px, calc(100% - 32px));
  margin: 46px auto;
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 36px;
  align-items: center;
}

.product-detail-media {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  overflow: hidden;
}

.product-detail-copy h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  margin: 12px 0;
}

.purchase-form {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.purchase-form label {
  max-width: 120px;
}

.form-card,
.panel,
.info-panel,
.summary-box,
.history-panel {
  padding: 22px;
}

.form-card {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.check-list {
  padding-left: 20px;
}

.check-list li {
  margin: 10px 0;
}

.service-list {
  display: grid;
  gap: 18px;
}

.service-list article {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-list img {
  width: 88px;
  height: 88px;
}

.cart-table,
.table-wrap {
  min-width: 0;
}

.cart-row {
  display: grid;
  grid-template-columns: 76px minmax(160px, 1fr) 110px 110px 120px;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-row img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--soft);
}

.cart-row h3 {
  margin: 0;
  font-size: 1rem;
}

.cart-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.summary-box dl,
.totals-list {
  display: grid;
  gap: 8px;
}

.summary-box dl div,
.totals-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary-box .total,
.totals-list .total {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-size: 1.16rem;
  font-weight: 800;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.auth-page {
  display: grid;
  place-items: start center;
  padding: 46px 16px;
}

.auth-card {
  width: min(470px, 100%);
}

.history-panel {
  min-width: 0;
}

.order-list {
  display: grid;
  gap: 10px;
}

.order-list article {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-list small {
  color: var(--muted);
  grid-column: 1 / -1;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 0 0;
}

.admin-nav form {
  margin-left: auto;
}

.admin-page .page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.metric-grid article {
  padding: 18px;
}

.metric-grid span {
  color: var(--muted);
}

.metric-grid strong {
  display: block;
  font-size: 2rem;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-list a {
  display: grid;
  grid-template-columns: 1fr 1fr 0.8fr 0.8fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.data-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: white;
}

.data-table th,
.data-table td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

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

.table-product {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-product img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 800;
  background: #eef3f6;
  color: var(--muted);
}

.status.paid {
  background: #e7f6ed;
  color: var(--success);
}

.status.pending {
  background: #fff6df;
  color: #8c5c0c;
}

.status.cancelled {
  background: #fff0f0;
  color: var(--danger);
}

.current-image {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.current-image img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.order-detail-grid {
  grid-template-columns: 1fr 1fr;
}

.wide-panel {
  grid-column: 1 / -1;
}

.result-summary {
  width: min(460px, 100%);
  margin: 22px auto;
  text-align: left;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 40px;
  padding: 34px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer strong {
  color: var(--ink);
}

@media (max-width: 980px) {
  .hero,
  .split,
  .checkout-layout,
  .account-layout,
  .settings-layout,
  .cart-layout,
  .admin-columns,
  .product-detail {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 24px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cart-row {
    grid-template-columns: 76px minmax(160px, 1fr) 100px;
  }

  .cart-row label,
  .cart-row strong {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 68px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo,
  .brand-mark {
    width: 58px;
    height: 40px;
  }

  .brand small {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    padding: 10px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: grid;
  }

  .main-nav a {
    justify-content: space-between;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .hero-panel {
    min-height: 260px;
  }

  .page-hero {
    padding-top: 34px;
  }

  .section {
    padding: 28px 0;
  }

  .product-grid,
  .service-grid,
  .form-grid,
  .metric-grid,
  .order-detail-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .purchase-form,
  .site-footer,
  .with-action,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .service-list article {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .service-list img {
    width: 72px;
    height: 72px;
  }

  .empty-state {
    padding: 28px 18px;
  }

  .cart-row {
    grid-template-columns: 62px 1fr;
  }

  .cart-row img {
    width: 62px;
    height: 62px;
  }

  .cart-row > div,
  .cart-row label,
  .cart-row strong {
    grid-column: 2;
  }

  .admin-nav {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .admin-nav form {
    margin-left: 0;
  }

  .admin-list a,
  .order-list article {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header,
  .site-footer,
  .section,
  .page-hero,
  .hero,
  .admin-nav,
  .product-detail {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.2rem;
  }
}
