:root {
  --navy: #082b66;
  --blue: #0867ed;
  --blue-strong: #0057d9;
  --blue-soft: #eaf3ff;
  --ink: #152744;
  --muted: #667895;
  --line: #dce5f0;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --green: #087d43;
  --green-soft: #ddf7e7;
  --orange: #f47c00;
  --shadow: 0 18px 50px rgba(17, 44, 82, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.topbar {
  min-height: 86px;
  padding: 18px clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.brand { display: flex; gap: 22px; align-items: center; color: var(--navy); text-decoration: none; min-width: 0; }
.brand-logo { display: block; width: clamp(142px, 15vw, 206px); height: auto; flex: 0 0 auto; }
.brand-title { display: block; padding-left: 22px; border-left: 1px solid var(--line); font-size: clamp(17px, 1.7vw, 24px); line-height: 1.15; font-weight: 750; letter-spacing: -.025em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.pilot-badge { color: var(--blue); background: var(--blue-soft); border: 1px solid #cbe0ff; border-radius: 999px; padding: 7px 11px; font-weight: 800; font-size: 12px; letter-spacing: .08em; }
.header-icon-button { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #cbd7e5; border-radius: 10px; background: #fff; color: var(--navy); text-decoration: none; }
.header-icon-button[hidden] { display: none !important; }
.header-icon-button:hover { border-color: var(--blue); color: var(--blue); }
.header-icon-button:disabled { cursor: default; opacity: .48; }
.header-icon-button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-count { position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px; padding: 0 5px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 999px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 900; }

#app { width: min(1500px, calc(100% - 40px)); margin: 0 auto; min-height: calc(100vh - 154px); padding: 40px 0 64px; }
.eyebrow { color: #8fc3ff; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 42px 0 18px; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: clamp(25px, 3vw, 36px); letter-spacing: -.03em; }
.section-heading p { margin: 6px 0 0; color: var(--muted); }

.category-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.category-card { border: 1px solid var(--line); background: var(--surface); padding: 28px; border-radius: 16px; text-align: left; color: var(--ink); display: grid; grid-template-columns: 76px 1fr auto; gap: 18px; align-items: center; box-shadow: 0 8px 26px rgba(20,53,96,.06); transition: .2s ease; }
.category-card:not(:disabled):hover { transform: translateY(-3px); border-color: #9cc7ff; box-shadow: var(--shadow); }
.category-card:disabled { opacity: .6; cursor: not-allowed; }
.category-icon { width: 76px; height: 64px; padding: 6px; display: grid; place-items: center; border-radius: 14px; background: #fff; border: 1px solid #d9e5f2; color: var(--blue); font-size: 14px; font-weight: 900; overflow: hidden; }
.category-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.category-card h3 { margin: 0 0 5px; color: var(--navy); font-size: 22px; }
.category-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.category-card .arrow { color: var(--blue); font-size: 24px; }

.breadcrumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); margin-bottom: 16px; font-size: 14px; }
.breadcrumbs a { color: var(--blue); text-decoration: none; }
.back-button { margin-bottom: 14px; border: 1px solid #cbd7e5; border-radius: 9px; padding: 9px 14px; background: #fff; color: var(--navy); font-weight: 800; }
.back-button:hover { border-color: var(--blue); color: var(--blue); }
.page-navigation {
  position: sticky;
  top: 86px;
  z-index: 19;
  display: grid;
  justify-items: start;
  gap: 10px;
  margin: -10px 0 16px;
  padding: 10px 0 12px;
  background: rgba(244, 247, 251, .96);
  border-bottom: 1px solid rgba(203, 215, 229, .9);
  backdrop-filter: blur(12px);
}
.page-navigation .back-button,
.page-navigation .breadcrumbs { margin-bottom: 0; }
.page-title { margin: 0; color: var(--navy); font-size: clamp(30px, 4vw, 48px); letter-spacing: -.04em; }
.page-intro { color: var(--muted); max-width: 760px; line-height: 1.55; }

.filterbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 28px 0; padding: 14px; border-radius: 14px; background: #edf2f8; }
.search-control { grid-column: span 2; }
.control { display: grid; gap: 7px; }
.control label { color: #526783; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.control input, .control select, .control textarea { min-height: 44px; width: 100%; border: 1px solid #cfd9e6; border-radius: 9px; background: #fff; color: var(--ink); padding: 10px 12px; outline: none; }
.control input:focus, .control select:focus, .control textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,103,237,.12); }
.filter-results { margin: -14px 0 18px; color: var(--muted); font-size: 13px; }
.filter-results strong { color: var(--navy); }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 8px 26px rgba(20,53,96,.06); }
.device-art { height: 190px; padding: 18px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
.product-content { padding: 17px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.product-content h3 { margin: 0; font-size: 19px; color: var(--navy); }
.product-code { color: var(--blue); font-weight: 800; font-size: 13px; }
.product-content p { color: var(--muted); line-height: 1.5; margin: 0; }
.product-subtitle { min-height: 42px; font-size: 14px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 900; color: var(--blue-strong); background: var(--blue-soft); white-space: nowrap; }
.tag.green { color: #14693c; background: var(--green-soft); }
.tag.gray { color: #51627a; background: #eef2f6; }
.tag.cost-low { color: #14693c; background: #e2f6e9; }
.tag.cost-high { color: #9b3e00; background: #fff0df; }
.button-row { margin-top: auto; display: flex; gap: 10px; }
.btn { min-height: 44px; border-radius: 9px; border: 1px solid #cbd7e5; padding: 10px 16px; background: #fff; color: var(--navy); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-strong); }
.btn.orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.full { width: 100%; }
.btn:disabled, .btn:disabled:hover { opacity: .48; cursor: not-allowed; border-color: #cbd7e5; color: #6c7e99; background: #eef3f8; box-shadow: none; }
.empty-state { grid-column: 1 / -1; padding: 44px; border: 1px dashed #b9c8da; border-radius: 16px; background: #fff; text-align: center; color: var(--muted); }

.config-layout { display: grid; grid-template-columns: minmax(230px, .78fr) minmax(430px, 1.55fr) minmax(290px, .82fr); gap: 18px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 26px rgba(20,53,96,.05); }
.product-panel { overflow: hidden; }
.product-panel .device-art { height: 215px; }
.panel-body { padding: 22px; }
.panel-title { margin: 0 0 16px; color: var(--navy); font-size: 22px; }
.config-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.config-section-heading .panel-title { margin: 0; }
.reset-config { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; white-space: nowrap; }
.config-actions { display: grid; justify-items: end; align-items: start; gap: 10px; }
.selection-mode { display: inline-flex; border: 1px solid #cbd7e5; border-radius: 9px; overflow: hidden; background: #fff; }
.mode-button { min-height: 38px; border: 0; border-right: 1px solid #cbd7e5; padding: 8px 11px; background: #fff; color: var(--navy); font-weight: 750; }
.mode-button:last-child { border-right: 0; }
.mode-button.active { background: var(--blue); color: #fff; }
.secondary-config-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.taiwan-control { position: relative; display: flex; align-items: center; gap: 6px; }
.taiwan-button { min-height: 34px; border: 1px solid #cbd7e5; border-radius: 8px; padding: 6px 10px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; gap: 7px; }
.taiwan-button:hover { border-color: var(--blue); color: var(--blue); }
.taiwan-button.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.taiwan-flag { display: block; width: 22px; height: 15px; object-fit: cover; border: 1px solid rgba(8, 43, 102, .18); border-radius: 2px; }
.taiwan-info { position: relative; }
.info-trigger { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #b9c8da; border-radius: 50%; background: #fff; color: var(--navy); font-weight: 900; font-style: normal; cursor: pointer; list-style: none; user-select: none; }
.info-trigger::-webkit-details-marker { display: none; }
.info-trigger:hover { border-color: var(--blue); color: var(--blue); }
.taiwan-info[open] .info-trigger { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.info-popover { position: absolute; top: calc(100% + 9px); right: 0; z-index: 35; width: 310px; padding: 12px 14px; border: 1px solid #cbd7e5; border-radius: 10px; background: #fff; color: var(--ink); box-shadow: var(--shadow); font-size: 13px; font-weight: 550; line-height: 1.45; }
.spec-list { margin: 18px 0; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.spec-row { display: grid; grid-template-columns: minmax(92px, .75fr) 1.25fr; gap: 10px; font-size: 13px; }
.spec-row dt { color: var(--muted); }
.spec-row dd { margin: 0; color: var(--ink); font-weight: 650; }
.notice { margin-bottom: 14px; border-radius: 10px; background: var(--blue-soft); color: #285c9f; padding: 12px 14px; font-size: 13px; line-height: 1.4; }
.component-list { display: grid; gap: 12px; }
.component-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; grid-template-columns: minmax(150px, .85fr) minmax(220px, 1.35fr); gap: 18px; align-items: center; }
.component-card h3 { margin: 0 0 5px; color: var(--navy); font-size: 16px; }
.component-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.component-choice select { width: 100%; min-height: 42px; border: 1px solid #cfd9e6; border-radius: 8px; background: white; color: var(--ink); padding: 8px 10px; }
.component-choice select.stock-selected,
.component-choice select option.stock-option { color: #18733a; font-weight: 700; }
.summary-panel { position: sticky; top: 106px; }
.validation { padding: 16px; border-radius: 11px; background: #e4f8eb; color: #116b3b; font-weight: 800; margin-bottom: 16px; }
.validation.pending { background: #fff5d6; color: #745500; }
.bom-table { width: 100%; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; border-spacing: 0; overflow: hidden; font-size: 13px; }
.bom-table th { padding: 9px 10px; background: #edf3fa; color: var(--navy); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.bom-table td { padding: 9px 10px; border-top: 1px solid #edf1f5; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.bom-table th:first-child, .bom-table td:first-child { width: 36px; text-align: center; }
.bom-table th:last-child, .bom-table td:last-child { width: 86px; text-align: center; }
.copy-bom { margin: -4px 0 18px; }
.add-cart-button { margin: -7px 0 18px; }
.download-grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
.engineering-cta { margin-top: 14px; width: 100%; border: 1.5px solid var(--blue); background: #eef6ff; color: var(--navy); border-radius: 12px; padding: 18px; text-align: left; text-decoration: none; display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; }
.engineering-icon { width: 42px; height: 42px; display: grid !important; place-items: center; border-radius: 50%; background: var(--blue); color: white !important; font-size: 22px !important; margin: 0 !important; }
.engineering-copy strong { display: block; font-size: 19px; }
.engineering-copy > span { display: block; color: #5f7694; margin-top: 4px; font-size: 13px; line-height: 1.4; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(11,28,52,.58); display: grid; place-items: center; padding: 20px; }
.modal { width: min(680px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 28px 90px rgba(5,20,40,.34); }
.modal-header { display: flex; justify-content: space-between; gap: 18px; align-items: start; padding: 24px 24px 14px; }
.modal-header h2 { margin: 0; color: var(--navy); font-size: 26px; }
.modal-header p { margin: 6px 0 0; color: var(--muted); }
.icon-button { border: 0; background: transparent; color: var(--navy); font-size: 27px; line-height: 1; padding: 0 4px; }
.modal-body { padding: 0 24px 24px; }
.option-list { display: grid; gap: 10px; }
.option-row { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.option-row:has(input:checked) { border-color: var(--blue); background: #f4f8ff; box-shadow: 0 0 0 1px var(--blue); }
.option-row input { width: 18px; height: 18px; accent-color: var(--blue); }
.option-row strong { display: block; color: var(--navy); }
.option-row small { color: var(--muted); display: block; margin-top: 3px; }
.modal-actions { display: flex; justify-content: end; gap: 10px; margin-top: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .wide { grid-column: 1 / -1; }

.cart-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.cart-page-heading .page-intro { margin-bottom: 0; }
.cart-heading-actions { display: flex; align-items: center; gap: 10px; }
.cart-export-button { white-space: nowrap; }
.cart-summary { margin-bottom: 14px; padding: 13px 16px; border: 1px solid #cbe0ff; border-radius: 11px; background: var(--blue-soft); color: #285c9f; }
.cart-list { display: grid; gap: 14px; }
.cart-item { display: grid; grid-template-columns: 42px minmax(260px, 1fr) 130px auto; gap: 18px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 26px rgba(20,53,96,.06); }
.cart-item-number { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 900; }
.cart-item-main h2 { margin: 4px 0; color: var(--navy); font-size: 20px; }
.cart-item-main p { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.cart-item-main a { color: var(--blue); font-size: 13px; font-weight: 750; }
.cart-quantity { display: grid; gap: 6px; color: #526783; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.cart-quantity input { width: 100%; min-height: 42px; border: 1px solid #cfd9e6; border-radius: 8px; padding: 8px 10px; color: var(--ink); }
.cart-item-actions { display: flex; gap: 9px; }
.btn.danger { color: #a32929; border-color: #e3b9b9; }
.btn.danger:hover { color: #fff; border-color: #b42d2d; background: #b42d2d; }

.admin-page-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.admin-local-badge { display: inline-flex; margin-bottom: 10px; padding: 6px 9px; border-radius: 999px; background: #fff2d8; color: #8a5b00; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.admin-tabs { display: inline-flex; margin-bottom: 18px; border: 1px solid #cbd7e5; border-radius: 11px; overflow: hidden; background: #fff; }
.admin-tab { min-height: 44px; padding: 10px 22px; border: 0; border-right: 1px solid #cbd7e5; background: #fff; color: var(--navy); font-weight: 800; }
.admin-tab:last-child { border-right: 0; }
.admin-tab.active { background: var(--blue); color: #fff; }
.admin-section { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 26px rgba(20,53,96,.06); }
.admin-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.admin-section-heading h2 { margin: 0; color: var(--navy); }
.admin-section-heading p { margin: 5px 0 0; color: var(--muted); }
.admin-create-panel { margin-bottom: 18px; border: 1px solid #cbd7e5; border-radius: 11px; background: #f8fbff; }
.admin-create-panel summary { padding: 14px 16px; color: var(--blue); font-weight: 850; cursor: pointer; }
.admin-product-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; padding: 4px 16px 16px; }
.admin-product-form label { display: grid; gap: 6px; color: #526783; font-size: 12px; font-weight: 800; }
.admin-product-form input, .admin-product-form select, .admin-search, .admin-tag-input { width: 100%; min-height: 40px; border: 1px solid #cfd9e6; border-radius: 8px; background: #fff; color: var(--ink); padding: 8px 10px; }
.admin-product-form .wide { grid-column: span 2; }
.admin-product-form .admin-check { display: flex; align-items: center; gap: 8px; }
.admin-product-form .admin-check input { width: 18px; min-height: 18px; }
.admin-search { width: min(360px, 100%); }
.admin-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 11px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { padding: 11px 12px; background: #edf3fa; color: var(--navy); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.admin-table td { padding: 11px 12px; border-top: 1px solid #edf1f5; vertical-align: middle; }
.admin-table td > small { display: block; margin-top: 3px; color: var(--muted); }
.admin-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); }
.admin-tag-input { min-width: 210px; }
.admin-user-card { display: grid; grid-template-columns: 46px 1fr auto; gap: 13px; align-items: center; margin-bottom: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.admin-user-avatar { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 900; }
.admin-user-card strong, .admin-user-card span { display: block; }
.admin-user-card div > span { margin-top: 3px; color: var(--muted); font-size: 13px; }
.notice.warning { margin-bottom: 18px; border-color: #f0d69b; background: #fff7df; color: #73520b; }
.user-admin-form { margin-bottom: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbff; }
.user-form-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.user-form-heading h3 { margin: 0; color: var(--navy); }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 7px; min-width: 250px; }
.btn.compact { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.btn:disabled { cursor: not-allowed; opacity: .48; }
.user-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 850; }
.user-status.active { background: #def4e7; color: #13723b; }
.user-status.blocked { background: #fde4e4; color: #a32929; }

.auth-shell { min-height: 58vh; display: grid; place-items: center; }
.auth-card { width: min(480px, 100%); }
.auth-form { display: grid; gap: 14px; margin-top: 20px; }
.auth-form label { display: grid; gap: 7px; color: #526783; font-size: 13px; font-weight: 800; }
.auth-form input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cbd7e5; border-radius: 9px; color: var(--ink); background: #fff; }
.auth-help { margin: 15px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.account-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 20px; }
.account-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.account-details { display: grid; gap: 0; margin: 20px 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.account-details div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 13px 15px; border-top: 1px solid var(--line); }
.account-details div:first-child { border-top: 0; }
.account-details dt { color: var(--muted); font-weight: 750; }
.account-details dd { margin: 0; color: var(--navy); font-weight: 800; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; background: var(--navy); color: #fff; border-radius: 10px; padding: 13px 16px; box-shadow: var(--shadow); animation: toast-in .2s ease; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

.site-footer { min-height: 68px; padding: 18px clamp(20px, 4vw, 64px); background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
.link-button { border: 0; background: none; color: var(--blue); font-weight: 800; }

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .config-layout { grid-template-columns: minmax(220px, .7fr) minmax(420px, 1.3fr); }
  .summary-panel { grid-column: 1 / -1; position: static; }
  .summary-panel .panel-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}

@media (max-width: 760px) {
  .topbar { position: sticky; }
  .pilot-badge { display: none; }
  .brand { gap: 12px; }
  .brand-logo { width: 118px; }
  .brand-title { padding-left: 12px; font-size: 15px; }
  #app { width: min(100% - 24px, 1500px); padding-top: 20px; }
  .category-grid, .config-layout { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filterbar, .component-card, .summary-panel .panel-body, .form-grid { grid-template-columns: 1fr; }
  .search-control { grid-column: auto; }
  .form-grid .wide { grid-column: auto; }
  .summary-panel { grid-column: auto; }
  .download-grid { grid-template-columns: 1fr; }
  .config-section-heading { flex-direction: column; }
  .config-actions { width: 100%; justify-items: stretch; }
  .selection-mode { width: 100%; }
  .mode-button { flex: 1; }
  .secondary-config-actions { justify-content: flex-start; flex-wrap: wrap; }
  .info-popover { right: auto; left: 0; width: min(310px, calc(100vw - 48px)); }
  .cart-page-heading { align-items: stretch; flex-direction: column; }
  .cart-heading-actions { align-items: stretch; flex-direction: column; }
  .cart-item { grid-template-columns: 38px 1fr; }
  .cart-quantity, .cart-item-actions { grid-column: 2; }
  .admin-tabs { width: 100%; }
  .admin-tab { flex: 1; padding-inline: 10px; }
  .admin-section, .admin-product-form { padding: 14px; }
  .admin-section-heading { align-items: stretch; flex-direction: column; }
  .admin-product-form { grid-template-columns: 1fr; }
  .admin-product-form .wide { grid-column: auto; }
  .account-layout { grid-template-columns: 1fr; }
  .account-details div { grid-template-columns: 1fr; gap: 4px; }
  .admin-row-actions { min-width: 210px; }
  .site-footer { align-items: start; gap: 8px; flex-direction: column; }
}

@media (max-width: 500px) {
  .product-grid { grid-template-columns: 1fr; }
  .brand-title { display: none; }
  .cart-item-actions { align-items: stretch; flex-direction: column; }
}
