:root {
  --bg: #eef2f5;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #d7dde5;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --danger: #b91c1c;
  --shadow: 0 16px 38px rgba(15, 23, 42, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 0.86rem;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

input,
select {
  min-height: 38px;
  padding: 0 11px;
  font-size: 0.84rem;
}

textarea {
  min-height: 96px;
  padding: 11px;
  resize: vertical;
}

.topbar {
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-size: 1.1rem;
  font-weight: 900;
}

.subbrand {
  color: var(--muted);
  font-size: 0.85rem;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.app-shell {
  min-height: calc(100vh - 72px);
}

.auth-layout {
  max-width: 1120px;
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: 1fr 410px;
  gap: 40px;
  align-items: center;
}

.auth-copy h1 {
  max-width: 620px;
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.02;
}

.auth-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.auth-panel,
.control-panel,
.preview-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-panel {
  padding: 22px;
}

.auth-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.auth-header.inline {
  margin-bottom: 4px;
  padding-bottom: 0;
  border-bottom: 0;
}

.auth-header h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.auth-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.hidden {
  display: none !important;
}

.primary {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary {
  background: #e5eaf0;
  color: #1f2937;
  font-weight: 800;
}

.checkout {
  width: 100%;
  margin-top: 10px;
  background: #111827;
  color: #fff;
  font-weight: 900;
}

.danger-button {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 900;
}

.message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.message.error {
  color: var(--danger);
}

.message a {
  color: var(--accent-dark);
  font-weight: 800;
}

.auth-switch {
  margin: 2px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.55;
}

.auth-switch span {
  color: #94a3b8;
}

.text-link {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-dark);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.workspace {
  min-height: calc(100vh - 72px);
  width: calc(100% - 28px);
  margin: 0 auto;
  padding: 18px 0 28px;
}

.page-tabs {
  width: max-content;
  max-width: 100%;
  display: flex;
  gap: 5px;
  margin-left: auto;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  overflow-x: auto;
}

.page-tab {
  min-width: 0;
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  padding: 0 12px;
  place-items: center;
  background: transparent;
  color: #334155;
  font-weight: 900;
  font-size: 0.8rem;
}

.page-tab.active {
  background: var(--accent);
  color: #fff;
}

.page-panel {
  display: none;
}

.page-panel.active {
  display: block;
}

.studio {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}

.control-panel {
  align-self: start;
  padding: 16px;
  overflow: auto;
  max-height: calc(100vh - 116px);
}

.panel-section {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.panel-section:first-child {
  padding-top: 0;
}

.panel-section:last-child {
  border-bottom: 0;
}

.panel-section h2 {
  margin: 0;
  color: #0f172a;
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
}

.control-label {
  margin-bottom: 8px;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 800;
}

.swatch {
  position: relative;
  width: 100%;
  min-height: 32px;
  border: 2px solid #d7dde5;
  border-radius: 6px;
  padding: 0;
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.swatch.selected {
  border-color: var(--accent);
  outline: 3px solid rgba(15, 118, 110, 0.18);
}

.swatch.selected::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.button-row {
  display: grid;
  gap: 9px;
}

.preview-panel {
  min-width: 0;
  padding: 16px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.preview-toolbar h1 {
  margin: 0 0 5px;
  font-size: 1.25rem;
}

.preview-toolbar p {
  margin: 0;
  color: var(--muted);
}

.price-box {
  min-width: 142px;
  text-align: right;
  font-weight: 900;
  color: var(--accent-dark);
}

.preview-stage {
  position: relative;
  min-height: 500px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    #fbfdff;
  background-size: 28px 28px;
  overflow: hidden;
}

.object-editor {
  grid-template-columns: 1fr;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 13px 0;
  background: transparent;
}

.editor-title {
  margin-top: 2px;
  color: var(--accent-dark);
  font-size: 0.95rem;
  font-weight: 900;
}

.editor-hint {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.editor-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
}

.color-picker-controls {
  justify-self: stretch;
  width: 100%;
}

.color-picker {
  display: grid;
  gap: 8px;
}

.color-picker-toggle {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #1f2937;
  font-weight: 800;
  cursor: default;
}

.selected-color-chip {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: var(--selected-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.color-grid {
  width: 100%;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(6, minmax(26px, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.disabled-controls {
  opacity: 0.58;
}

.disabled-controls select {
  background: #f1f5f9;
}

.canvas-tools {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.canvas-tool {
  position: relative;
  width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.canvas-tool:hover::after,
.canvas-tool:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: max-content;
  max-width: 180px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

#previewSvg {
  width: min(100%, 1000px);
  height: min(70vh, 620px);
  min-height: 420px;
  touch-action: none;
}

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

.list-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.list-item strong {
  font-size: 0.92rem;
}

.list-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.list-item button {
  min-height: 34px;
  margin-top: 4px;
}

.list-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.content-panel {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.account-panel {
  max-width: none;
}

.section-heading {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-heading h1 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.account-form {
  display: grid;
  gap: 12px;
}

.password-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.form-group-title {
  margin-top: 2px;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 900;
}

.narrow-action {
  width: min(220px, 100%);
}

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

.market-actions,
.order-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.market-actions button {
  width: auto;
}

.market-actions span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.order-filter {
  width: auto;
  min-height: 32px;
  padding: 0 12px;
  background: #eef2f7;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 900;
}

.order-filter.active {
  background: var(--accent);
  color: #fff;
}

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

.product-card {
  position: relative;
  display: grid;
  grid-template-rows: 150px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.product-select {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 900;
}

.product-select input {
  width: 15px;
  height: 15px;
}

.product-open {
  width: 100%;
  height: 150px;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.product-open .product-media {
  height: 100%;
}

.product-open-area {
  cursor: pointer;
}

.product-media {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.10), rgba(15, 23, 42, 0.06)),
    #f8fafc;
  color: #0f766e;
  font-weight: 900;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.product-category {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.product-body h2 {
  margin: 0;
  font-size: 1rem;
}

.product-body p {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.product-footer strong {
  white-space: nowrap;
}

.inactive-product {
  opacity: 0.58;
}

.admin-product-form {
  margin-bottom: 18px;
}

.cart-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.cart-heading,
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-heading {
  margin-bottom: 10px;
}

.cart-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.cart-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.cart-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.cart-item span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.cart-check {
  display: grid;
  place-items: center;
}

.cart-check input {
  width: 18px;
  height: 18px;
}

.cart-item-main {
  flex: 1;
}

.cart-qty {
  width: 78px;
  min-height: 34px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 18px;
  margin-top: 14px;
}

.detail-media {
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.10), rgba(15, 23, 42, 0.06)),
    #f8fafc;
  color: #0f766e;
  font-weight: 900;
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  display: grid;
  align-content: start;
  gap: 12px;
}

.detail-info h1 {
  margin: 0;
  font-size: 1.7rem;
}

.detail-price {
  color: var(--accent-dark);
  font-size: 1.3rem;
}

.detail-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.detail-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.quantity-field {
  max-width: 160px;
}

.detail-actions,
.checkout-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-actions button,
.checkout-actions button {
  width: auto;
  min-width: 160px;
}

.checkout-summary {
  display: grid;
  gap: 12px;
}

.checkout-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.checkout-block h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.checkout-block p {
  margin: 3px 0;
  color: var(--muted);
}

.checkout-items {
  display: grid;
  gap: 8px;
}

.checkout-items > div,
.checkout-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.checkout-total strong {
  color: var(--accent-dark);
  font-size: 1.15rem;
}

.compact-heading {
  margin-top: 6px;
  margin-bottom: 12px;
}

.order-card {
  display: grid;
  grid-template-columns: 1fr auto minmax(220px, 270px);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.order-card strong {
  display: block;
}

.order-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.status-pill {
  display: inline-block;
  margin-bottom: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985 !important;
  font-weight: 900;
}

.order-preview-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.order-preview-header strong,
.order-preview-header span {
  display: block;
}

.order-preview-header span {
  color: var(--muted);
  font-size: 0.86rem;
}

.order-preview-box img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.order-preview-fallback {
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 2rem;
  font-weight: 900;
}

.order-item-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.order-item-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    min-height: 72px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    padding: 18px;
  }

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

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

  .detail-media {
    min-height: 260px;
  }

  .cart-item {
    flex-wrap: wrap;
  }

  .workspace {
    width: calc(100% - 16px);
    padding: 12px 0 26px;
  }

  .page-tabs {
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
  }

  .page-tab {
    min-width: 0;
  }

  .control-panel {
    order: 2;
    max-height: none;
  }

  .preview-panel {
    order: 1;
  }

  .preview-toolbar {
    flex-direction: column;
    gap: 8px;
  }

  .object-editor,
  .editor-controls {
    grid-template-columns: 1fr;
  }

  .color-picker-controls {
    justify-self: stretch;
    width: 100%;
  }

  .two-col,
  .three-col,
  .order-card {
    grid-template-columns: 1fr;
  }

  .price-box {
    text-align: left;
  }

  .preview-stage {
    min-height: 420px;
  }

  #previewSvg {
    min-height: 360px;
  }
}

@media (max-width: 560px) {
  .workspace {
    width: min(100% - 12px, 100%);
  }

  .topbar {
    padding: 12px;
  }

  .user-box {
    width: 100%;
    justify-content: space-between;
  }

  .page-tabs {
    gap: 4px;
    padding: 4px;
  }

  .page-tab {
    flex: 0 0 auto;
    padding: 0 10px;
  }

  .control-panel,
  .preview-panel,
  .content-panel {
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  }

  .preview-panel {
    padding: 12px;
  }

  .preview-stage {
    min-height: 350px;
  }

  #previewSvg {
    min-height: 300px;
  }
}

/* Visual refresh: shop-style layout */
:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #6b7280;
  --line: #e3e7ee;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --accent-soft: #e7f5f2;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

body {
  background: linear-gradient(180deg, #ffffff 0, #f5f6f8 180px), #f5f6f8;
}

button {
  min-height: 38px;
  border-radius: 8px;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

input,
select,
textarea {
  border-color: #dce2ea;
  border-radius: 8px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.12);
  border-color: var(--accent);
}

.topbar {
  height: 64px;
  padding: 0 max(18px, calc((100vw - 1240px) / 2));
  border-bottom-color: #edf0f4;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.brand {
  letter-spacing: 0;
}

.subbrand {
  font-size: 0.78rem;
}

.user-box {
  gap: 8px;
  font-size: 0.84rem;
}

.user-box button {
  min-height: 34px;
  background: #f1f5f9;
  color: #172033;
  font-weight: 800;
}

.workspace {
  width: min(100% - 32px, 1240px);
  min-height: calc(100vh - 64px);
  padding: 16px 0 34px;
}

.page-tabs {
  position: sticky;
  top: 76px;
  z-index: 8;
  width: max-content;
  margin: 0 0 16px auto;
  padding: 4px;
  gap: 4px;
  border: 1px solid #e5e9f0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.page-tabs::-webkit-scrollbar {
  display: none;
}

.page-tab {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 900;
}

.page-tab.active {
  background: #172033;
  color: #fff;
}

.content-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 0;
  border-bottom: 0;
}

.section-heading h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.section-heading p {
  max-width: 560px;
  font-size: 0.9rem;
}

.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.product-card {
  grid-template-rows: 188px 1fr;
  min-height: 360px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.product-card:hover {
  border-color: #c9d5df;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
}

.product-open {
  height: 188px;
}

.product-media,
.detail-media,
.cart-thumb,
.checkout-thumb {
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.16), transparent 34%), linear-gradient(135deg, rgba(15, 118, 110, 0.11), rgba(15, 23, 42, 0.06)), #f8fafc;
}

.product-media span,
.detail-media span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #0f766e;
  font-size: 0.78rem;
}

.product-body {
  align-content: start;
  gap: 9px;
  padding: 12px;
}

.product-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #8a94a6;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-category {
  color: var(--accent-dark);
}

.product-body h2 {
  min-height: 42px;
  margin: 0;
  color: #172033;
  font-size: 0.98rem;
  line-height: 1.35;
}

.product-body p {
  min-height: 46px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.product-footer {
  margin-top: auto;
}

.product-price,
.detail-price {
  color: #f97316;
}

.product-footer .secondary {
  min-height: 34px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.product-detail {
  grid-template-columns: minmax(300px, 470px) minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-media {
  min-height: 430px;
  border-radius: 10px;
}

.detail-info {
  gap: 14px;
  padding: 4px 2px;
}

.detail-info h1 {
  font-size: 1.85rem;
  line-height: 1.18;
}

.detail-price {
  font-size: 1.55rem;
}

.detail-meta,
.checkout-block,
.cart-panel,
.account-form,
.order-preview-box {
  border-color: #e5e9f0;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.detail-actions button {
  min-height: 42px;
}

.cart-panel {
  margin-top: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.cart-heading {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e9f0;
}

.cart-heading h2 {
  font-size: 1.05rem;
}

.cart-heading strong {
  color: #f97316;
}

.cart-list {
  gap: 0;
  margin: 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 26px 72px minmax(0, 1fr) 86px 110px 82px;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: #fff;
}

.cart-thumb,
.checkout-thumb {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 900;
}

.cart-thumb img,
.checkout-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-main strong {
  color: #172033;
}

.cart-qty {
  width: 86px;
}

.cart-subtotal {
  color: #172033;
  text-align: right;
}

.cart-panel > .checkout {
  width: calc(100% - 32px);
  margin: 14px 16px 16px;
}

.checkout-summary {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.checkout-block {
  background: #fff;
}

.checkout-block:last-child,
.checkout-total {
  grid-column: 2;
}

.checkout-items > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
}

.checkout-thumb {
  width: 58px;
  height: 58px;
}

.checkout-total {
  align-items: center;
  background: #172033;
  color: #fff;
}

.checkout-total strong {
  color: #fff;
}

.checkout-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.order-tabs {
  margin-bottom: 14px;
  padding: 4px;
  width: max-content;
  max-width: 100%;
  border: 1px solid #e5e9f0;
  border-radius: 999px;
  background: #fff;
}

.order-filter {
  border-radius: 999px;
  background: transparent;
}

.order-filter.active {
  background: #172033;
}

.order-card {
  grid-template-columns: minmax(0, 1fr) auto 230px;
  border-color: #e5e9f0;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.status-pill {
  background: #e7f5f2;
  color: var(--accent-dark) !important;
}

.account-form,
.admin-product-form,
.password-form {
  padding: 16px;
  border: 1px solid #e5e9f0;
  background: #fff;
}

.password-form {
  margin-top: 14px;
}

.studio {
  grid-template-columns: 310px minmax(0, 1fr);
}

.control-panel,
.preview-panel {
  border-color: #e5e9f0;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.preview-stage {
  border-color: #e5e9f0;
  border-radius: 10px;
}

@media (max-width: 900px) {
  .page-tabs {
    position: static;
    margin-left: 0;
  }

  .product-detail,
  .checkout-summary,
  .studio {
    grid-template-columns: 1fr;
  }

  .checkout-block:last-child,
  .checkout-total {
    grid-column: auto;
  }

  .cart-item {
    grid-template-columns: 26px 64px minmax(0, 1fr);
  }

  .cart-qty,
  .cart-subtotal,
  .cart-item .danger-button {
    grid-column: 3;
    width: 100%;
  }

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

@media (max-width: 560px) {
  .topbar {
    padding: 12px;
  }

  .workspace {
    width: min(100% - 18px, 1240px);
  }

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

  .product-card {
    min-height: 315px;
    grid-template-rows: 150px 1fr;
  }

  .product-open {
    height: 150px;
  }

  .product-body {
    padding: 10px;
  }

  .product-body h2 {
    min-height: 38px;
    font-size: 0.9rem;
  }

  .product-body p {
    display: none;
  }

  .product-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .product-footer .secondary {
    width: 100%;
  }

  .detail-media {
    min-height: 280px;
  }

  .detail-info h1 {
    font-size: 1.35rem;
  }

  .checkout-actions {
    justify-content: stretch;
  }

  .checkout-actions button,
  .detail-actions button {
    width: 100%;
  }
}

/* Header navigation refresh */
.topbar {
  min-height: 74px;
  height: auto;
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 12px max(18px, calc((100vw - 1240px) / 2));
  border-bottom: 0;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.94), rgba(15, 23, 42, 0.98)),
    #0f172a;
  color: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.brand-block {
  min-width: 0;
}

.brand {
  color: #fff;
}

.subbrand {
  color: rgba(255, 255, 255, 0.72);
}

#mainNav.page-tabs {
  position: static;
  justify-self: center;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

#mainNav .page-tab {
  min-height: 36px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
}

#mainNav .page-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.user-box {
  justify-self: end;
  color: rgba(255, 255, 255, 0.82);
}

.user-box button {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.workspace {
  min-height: calc(100vh - 74px);
  padding-top: 24px;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    gap: 10px 12px;
  }

  #mainNav.page-tabs {
    grid-column: 1 / -1;
    justify-self: start;
    overflow-x: auto;
  }

  .user-box {
    justify-self: end;
  }
}

@media (max-width: 560px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
  }

  .user-box {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    justify-self: end;
    justify-content: flex-end;
    gap: 8px;
    font-size: 0.78rem;
  }

  .user-box span {
    display: none;
  }

  #mainNav.page-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }
}

/* Account and product action refinements */
.account-panel {
  display: grid;
  gap: 14px;
}

.account-card {
  padding: 16px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.account-note {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field input {
  padding-right: 46px;
  display: block;
}

.password-visibility {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  transform: translateY(-50%);
  border-radius: 8px;
  background: transparent;
  line-height: 0;
  z-index: 1;
}

.password-visibility:hover {
  background: #eef2f7;
}

.eye-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
  border: 2px solid #64748b;
  border-radius: 999px / 720px;
}

.eye-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #64748b;
}

.password-visibility.is-visible .eye-icon::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 4px;
  width: 24px;
  height: 2px;
  transform: rotate(-35deg);
  border-radius: 999px;
  background: #b91c1c;
}

.password-form.account-card {
  margin-top: 0;
  padding-top: 16px;
  border-top: 1px solid #e5e9f0;
}

.address-form select:disabled {
  background: #f3f6fa;
  color: #94a3b8;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 190px));
  align-items: stretch;
  gap: 10px;
}

.detail-actions button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  line-height: 1.1;
  white-space: nowrap;
}

.detail-actions .checkout {
  margin-top: 0;
}

@media (max-width: 560px) {
  .detail-actions {
    grid-template-columns: 1fr;
  }
}

/* Admin panel */
.admin-panel {
  display: grid;
  gap: 14px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  background: #f8fafc;
}

.admin-tab {
  width: auto;
  min-height: 34px;
  padding: 0 14px;
  background: transparent;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.admin-tab.active {
  background: #0f766e;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: grid;
  gap: 14px;
}

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

.admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.admin-card:has(.admin-thumb) {
  grid-template-columns: 80px minmax(0, 1fr) auto;
}

.admin-card-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-card-main span {
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.35;
}

.admin-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-card-title strong {
  font-size: 0.98rem;
}

.admin-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-card-actions button,
.admin-card-actions select {
  width: auto;
  min-height: 34px;
}

.admin-card-actions .primary,
.admin-card-actions .danger-button,
.admin-card-actions .secondary {
  padding: 0 12px;
}

.admin-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
}

.product-admin-list .admin-thumb,
.product-admin-list .admin-card-main {
  cursor: pointer;
}

.admin-order-items {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-order-items span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-weight: 800;
}

.status-history {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed #dbe3ec;
}

.status-history span {
  color: #64748b;
  font-size: 0.78rem;
}

.final-status {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 900;
}

.admin-product-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  background: #f8fafc;
}

.admin-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-preview-detail {
  box-shadow: none;
}

@media (max-width: 720px) {
  .admin-card,
  .admin-card:has(.admin-thumb) {
    grid-template-columns: 1fr;
  }

  .admin-card-actions {
    justify-content: flex-start;
  }
}

.price-stack {
  display: grid;
  gap: 2px;
}

.price-stack span {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: line-through;
}

.price-stack em {
  width: max-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff7ed;
  color: #ea580c;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.detail-price-stack {
  align-items: start;
}

/* Marketplace polish pass */
.primary,
.secondary,
.checkout,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.checkout {
  width: auto;
  margin-top: 0;
}

.narrow-action {
  width: max-content;
  min-width: 132px;
}

.page-tabs {
  scrollbar-width: none;
}

.page-tabs::-webkit-scrollbar,
.admin-tabs::-webkit-scrollbar,
.admin-filter-tabs::-webkit-scrollbar {
  display: none;
}

.product-card {
  height: 334px;
  min-height: 334px;
  overflow: hidden;
}

.product-card .product-media span {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #0f766e;
  letter-spacing: 0;
}

.product-body {
  display: grid;
  grid-template-rows: auto minmax(42px, auto) 1fr;
  gap: 8px;
}

.shop-card-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  min-height: 20px;
}

.shop-card-badges span {
  max-width: 100%;
  padding: 2px 5px;
  border: 1px solid #fecaca;
  border-radius: 3px;
  color: #dc2626;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: none;
}

.product-body h2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-body p {
  display: none;
}

.product-footer {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 8px;
  align-self: end;
}

.product-footer small {
  display: none;
}

.product-price {
  white-space: nowrap;
}

.product-footer .secondary,
.add-one-cart {
  width: 100%;
}

.cart-panel > .checkout {
  width: calc(100% - 32px);
}

.checkout-actions .checkout,
.checkout-actions .secondary {
  min-width: 180px;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-check input {
  width: 18px;
  min-height: 18px;
}

.address-book {
  display: grid;
  gap: 14px;
}

.address-book-header,
.checkout-block-header,
.admin-section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.address-book-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.address-list,
.checkout-address-list {
  display: grid;
  gap: 10px;
}

.address-card,
.checkout-address-option {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  background: #fff;
}

.address-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.address-card.default,
.checkout-address-option.selected {
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.08);
}

.address-card-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.address-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.address-card-main span,
.address-card-main p,
.checkout-address-option em,
.checkout-address-option small {
  margin: 0;
  color: #64748b;
  font-style: normal;
  line-height: 1.45;
}

.address-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.checkout-address-option {
  grid-template-columns: 22px minmax(0, 1fr);
  cursor: pointer;
}

.checkout-address-option input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.checkout-address-option span {
  display: grid;
  gap: 3px;
}

.empty-state {
  padding: 16px;
  border: 1px dashed #dbe3ec;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
}

.admin-section-toolbar {
  padding: 10px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  background: #fff;
}

.admin-filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.admin-filter {
  width: auto;
  min-height: 34px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 900;
}

.admin-filter.active {
  background: #172033;
  color: #fff;
}

.admin-product-form {
  max-width: 980px;
}

.admin-product-preview {
  background: #fff;
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px;
  }

  .brand {
    font-size: 1rem;
  }

  .subbrand {
    font-size: 0.78rem;
  }

  .user-box {
    justify-content: flex-end;
  }

  #mainNav.page-tabs {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    margin: 2px 0 0;
    border-radius: 999px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  #mainNav .page-tab {
    min-width: max-content;
    scroll-snap-align: start;
  }

  .workspace {
    width: 100%;
    padding: 16px 12px 28px;
  }

  .content-panel {
    width: 100%;
  }

  .section-heading {
    align-items: center;
  }

  .section-heading h1 {
    font-size: 1.25rem;
  }

  .address-book-header,
  .checkout-block-header,
  .admin-section-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .address-book-header .primary,
  .checkout-block-header .secondary,
  .admin-section-toolbar .primary,
  .narrow-action {
    width: 100%;
  }

  .address-card {
    grid-template-columns: 1fr;
  }

  .address-actions {
    justify-content: stretch;
  }

  .address-actions button {
    flex: 1 1 100%;
  }

  .checkout-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .checkout-actions .checkout,
  .checkout-actions .secondary {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .product-card {
    height: 292px;
    grid-template-rows: 142px 1fr;
    min-height: 292px;
  }

  .product-open {
    height: 142px;
  }

  .product-meta-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .product-body h2 {
    min-height: 0;
  }

  .cart-panel {
    border-radius: 10px;
  }

  .cart-item {
    grid-template-columns: 28px 68px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 12px;
  }

  .cart-thumb {
    width: 68px;
    height: 68px;
  }

  .cart-qty,
  .cart-subtotal,
  .cart-item .danger-button {
    grid-column: 3;
    width: 100%;
  }

  .cart-subtotal {
    text-align: left;
  }

  .cart-panel > .checkout {
    width: calc(100% - 24px);
    margin: 12px;
  }

  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .admin-card-actions button {
    width: 100%;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.empty-cart {
  min-height: 86px;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #64748b;
  text-align: center;
  font-weight: 800;
}

.cart-heading h2 {
  color: #172033;
  font-size: 0.98rem;
}

.order-card {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  overflow: hidden;
  background: #fff;
}

.order-main {
  min-width: 0;
}

.order-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.order-title-row h1,
.order-title-row strong {
  margin: 0;
  color: #0f172a;
}

.order-main > span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  margin-bottom: 0;
  line-height: 1.15;
}

.order-price {
  min-width: 106px;
  text-align: right;
}

.order-price strong {
  color: #0f172a;
}

.order-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button {
  position: relative;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 10px;
  background: #eef2f7;
  color: #0f172a;
}

.icon-button:hover:not(:disabled) {
  background: #e2e8f0;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.view-order::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 14px;
  width: 18px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.view-order::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.cancel-order-icon {
  background: #fee2e2;
  color: #991b1b;
}

.cancel-order-icon:hover:not(:disabled) {
  background: #fecaca;
}

.cancel-order-icon::before,
.cancel-order-icon::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 20px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.cancel-order-icon::before {
  transform: rotate(45deg);
}

.cancel-order-icon::after {
  transform: rotate(-45deg);
}

.order-detail {
  display: grid;
  gap: 16px;
}

.order-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e9f0;
}

.order-detail-header h1 {
  font-size: 1.35rem;
}

.order-detail-header > strong {
  color: #f97316;
  font-size: 1.08rem;
  white-space: nowrap;
}

.order-detail-header span:not(.status-pill) {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 0.9rem;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.order-detail-grid .order-preview-box {
  grid-row: span 3;
  margin: 0;
}

.order-detail-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.order-detail-card h2 {
  margin: 0;
  font-size: 1rem;
}

.order-detail-card p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.order-timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-timeline li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
}

.order-timeline li:last-child {
  border-bottom: 0;
}

.order-timeline strong,
.order-timeline span {
  display: block;
}

.order-timeline span,
.order-timeline time {
  color: #64748b;
  font-size: 0.84rem;
}

@media (max-width: 760px) {
  .order-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .order-main {
    grid-column: 1;
  }

  .order-price {
    grid-column: 1;
    text-align: left;
  }

  .order-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

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

  .order-detail-header {
    display: grid;
  }

  .order-detail-header > strong {
    justify-self: start;
  }

  .order-detail-grid .order-preview-box {
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .empty-cart {
    min-height: 76px;
  }

  .order-card {
    padding: 12px;
  }

  .order-actions {
    gap: 6px;
  }

  .icon-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    border-radius: 9px;
  }

  .view-order::before {
    left: 9px;
    top: 12px;
  }

  .view-order::after {
    left: 16px;
    top: 16px;
  }

  .cancel-order-icon::before,
  .cancel-order-icon::after {
    left: 11px;
    top: 18px;
  }

  .order-timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.password-form .password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-form .password-field input {
  height: 40px;
  min-height: 40px;
  padding-right: 48px;
}

.password-form .password-visibility {
  top: 50%;
  right: 7px;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
}

.password-form .eye-icon {
  margin: 0;
}
