:root {
  --bg-deep: #070a0f;
  --bg-panel: #0e141c;
  --bg-elevated: #131b26;
  --border: rgba(120, 200, 255, 0.12);
  --text: #e8f1f8;
  --muted: #8aa0b4;
  --accent: #3ee0ff;
  --accent-dim: rgba(62, 224, 255, 0.15);
  --accent-hot: #ff6b35;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Outfit", var(--font);
  --sidebar-width: 272px;
  --sidebar-collapsed-width: 80px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(62, 224, 255, 0.08), transparent),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 107, 53, 0.06), transparent), var(--bg-deep);
  line-height: 1.55;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
  z-index: 0;
}

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

.container {
  width: 90%;
  max-width: none;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* —— App shell & sidebar —— */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.app-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.5rem;
  border-bottom: 1px solid rgba(120, 200, 255, 0.08);
  background: linear-gradient(180deg, rgba(12, 17, 24, 0.96) 0%, rgba(7, 10, 15, 0.92) 100%);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.app-topbar__center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.app-topbar__menu {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.24rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(120, 200, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.app-topbar__search {
  width: 100%;
  max-width: 34rem;
}

.app-topbar__search-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 200, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.app-topbar__search-label:focus-within {
  border-color: rgba(62, 224, 255, 0.38);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(62, 224, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.app-topbar__search-icon {
  flex-shrink: 0;
  color: var(--muted);
}

.app-topbar__search-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
}

.app-topbar__search-input:focus {
  outline: none;
}

.app-topbar__search-input::placeholder {
  color: rgba(138, 160, 180, 0.75);
}

.app-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.app-topbar__notif-wrap,
.app-topbar__chat-wrap,
.app-topbar__cart-wrap {
  position: relative;
}

.app-topbar__chat {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem 0.35rem 0.55rem;
  min-height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 200, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.app-topbar__chat-label {
  white-space: nowrap;
  color: var(--text);
}

.app-topbar__chat:hover,
.app-topbar__chat-wrap.is-open .app-topbar__chat,
.app-topbar__chat[aria-expanded="true"] {
  border-color: rgba(62, 224, 255, 0.32);
  background: rgba(62, 224, 255, 0.08);
}

.app-topbar__chat-badge[hidden] {
  display: none !important;
}

.app-topbar__notif {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 200, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.app-topbar__notif:hover,
.app-topbar__notif-wrap.is-open .app-topbar__notif {
  border-color: rgba(62, 224, 255, 0.32);
  background: rgba(62, 224, 255, 0.08);
}

.app-topbar__notif-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(26rem, calc(100vw - 2rem));
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
  z-index: 56;
  overflow: hidden;
}

.app-topbar__notif-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid rgba(120, 200, 255, 0.1);
}

.app-topbar__notif-menu-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.app-topbar__notif-menu-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.app-topbar__notif-menu-all {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.app-topbar__notif-menu-all:hover {
  color: #7eefff;
  text-decoration: underline;
}

.app-topbar__notif-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.85rem 0.65rem 1rem;
}

.app-topbar__notif-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.2rem;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.app-topbar__notif-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
}

.app-topbar__notif-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  background: rgba(62, 224, 255, 0.08);
  color: var(--accent);
  border: 1px solid rgba(62, 224, 255, 0.18);
}

.app-topbar__notif-item:hover .app-topbar__notif-icon-wrap {
  background: rgba(62, 224, 255, 0.14);
  border-color: rgba(62, 224, 255, 0.32);
}

.app-topbar__notif-item-badge {
  position: absolute;
  top: -0.15rem;
  right: -0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.2rem;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #ff8c42, #ff6b35);
  border-radius: 999px;
  border: 2px solid rgba(7, 10, 15, 0.92);
  box-shadow: 0 2px 6px rgba(255, 107, 53, 0.35);
  box-sizing: border-box;
}

.app-topbar__notif-item-label {
  font-size: 0.62rem;
  line-height: 1.25;
  text-align: center;
  max-width: 5.5rem;
  color: rgba(120, 200, 255, 0.82);
}

.app-topbar__notif-item:hover .app-topbar__notif-item-label {
  color: var(--accent);
}

@media (max-width: 520px) {
  .app-topbar__notif-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .app-topbar__notif-item-label {
    max-width: none;
  }
}

.app-topbar__cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 200, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.app-topbar__cart:hover,
.app-topbar__cart-wrap.is-open .app-topbar__cart {
  border-color: rgba(62, 224, 255, 0.32);
  background: rgba(62, 224, 255, 0.08);
}

.app-topbar__cart.is-active {
  border-color: rgba(62, 224, 255, 0.4);
  background: rgba(62, 224, 255, 0.12);
}

.app-topbar__cart-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(22rem, calc(100vw - 2rem));
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
  z-index: 55;
  overflow: hidden;
}

.app-topbar__cart-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(120, 200, 255, 0.1);
}

.app-topbar__cart-menu-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.app-topbar__cart-menu-count {
  font-size: 0.75rem;
  color: var(--muted);
}

.app-topbar__cart-menu-body {
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.35rem 0;
}

.app-topbar__cart-loading,
.app-topbar__cart-empty {
  margin: 0;
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.85rem;
}

.app-topbar__cart-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  transition: background 0.15s;
}

.app-topbar__cart-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.app-topbar__cart-item-info {
  min-width: 0;
  flex: 1;
}

.app-topbar__cart-item-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-topbar__cart-item-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.app-topbar__cart-item-price {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.app-topbar__cart-menu-foot {
  padding: 0.75rem 1rem 0.85rem;
  border-top: 1px solid rgba(120, 200, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.app-topbar__cart-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.app-topbar__cart-subtotal strong {
  font-size: 0.95rem;
  color: var(--text);
}

.app-topbar__cart-menu-actions {
  display: flex;
  gap: 0.5rem;
}

.app-topbar__cart-checkout-form {
  flex: 1;
  margin: 0;
}

.app-topbar__cart-btn {
  display: flex;
  flex: 1;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.15s, background 0.15s;
}

.app-topbar__cart-btn--ghost {
  color: var(--text);
  border: 1px solid rgba(120, 200, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.app-topbar__cart-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  text-decoration: none;
}

.app-topbar__cart-btn--primary {
  color: var(--bg-deep);
  background: var(--accent);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.app-topbar__cart-btn--primary:hover {
  opacity: 0.9;
  text-decoration: none;
}

.app-topbar__cart-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.2rem;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #ff8c42, #ff6b35);
  border-radius: 999px;
  border: 2px solid rgba(7, 10, 15, 0.9);
  box-shadow: 0 2px 6px rgba(255, 107, 53, 0.35);
  box-sizing: border-box;
}

.app-topbar__auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-topbar__auth-link {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.app-topbar__auth-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.app-topbar__auth-btn {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bg-deep);
  background: var(--accent);
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.app-topbar__auth-btn:hover {
  opacity: 0.88;
  text-decoration: none;
}

.app-topbar__profile {
  position: relative;
}

.app-topbar__profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.7rem 0.35rem 0.45rem;
  border: 1px solid rgba(120, 200, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.app-topbar__profile-trigger:hover,
.app-topbar__profile.is-open .app-topbar__profile-trigger {
  border-color: rgba(62, 224, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(62, 224, 255, 0.06);
}

.app-topbar__profile-name {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.app-topbar__profile-chevron {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s;
}

.app-topbar__profile.is-open .app-topbar__profile-chevron {
  transform: rotate(180deg);
}

.app-topbar__profile-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: 14rem;
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
  z-index: 50;
}

.app-topbar__profile-menu-title {
  margin: 0;
  padding: 0.35rem 0.55rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-topbar__profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-topbar__profile-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}

.app-topbar__profile-link:hover {
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.app-topbar__profile-link.is-active {
  background: rgba(62, 224, 255, 0.1);
  color: var(--accent);
}

.app-topbar__profile-link--logout {
  color: #ffb4b4;
}

.app-topbar__profile-link--logout:hover {
  background: rgba(255, 90, 90, 0.08);
}

.app-topbar__profile-divider {
  height: 1px;
  margin: 0.35rem 0.55rem;
  background: rgba(120, 200, 255, 0.12);
}

.app-sidebar__search {
  padding: 0 0.85rem 0.8rem;
}

.app-sidebar__search-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(120, 200, 255, 0.16);
  background: rgba(7, 12, 18, 0.45);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-sidebar__search-label:focus-within {
  border-color: rgba(62, 224, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(62, 224, 255, 0.08);
}

.app-sidebar__search-icon {
  flex-shrink: 0;
  color: var(--muted);
}

.app-sidebar__search-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  padding: 0;
}

.app-sidebar__search-input:focus {
  outline: none;
}

.app-sidebar__search-input::placeholder {
  color: rgba(138, 160, 180, 0.75);
}

html.sidebar-collapsed-init .app-sidebar__search,
body.sidebar-collapsed .app-sidebar__search {
  display: none;
}

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

.app-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  border-right: 1px solid rgba(120, 200, 255, 0.1);
  background: linear-gradient(180deg, rgba(14, 20, 28, 0.98) 0%, rgba(7, 10, 15, 0.98) 100%);
  backdrop-filter: blur(16px);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 60;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.app-sidebar__head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 1.1rem 0.9rem 0.9rem;
  border-bottom: 1px solid rgba(120, 200, 255, 0.08);
  min-height: 4.25rem;
  background: linear-gradient(180deg, rgba(62, 224, 255, 0.04), transparent);
}

.app-sidebar__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
}

.app-sidebar__logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.app-sidebar__logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
}

.app-sidebar__logo-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  line-height: 1.2;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.app-sidebar__collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border: 1px solid rgba(120, 200, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.25s ease;
}

.app-sidebar__collapse:hover {
  color: var(--accent);
  border-color: rgba(62, 224, 255, 0.35);
  background: rgba(62, 224, 255, 0.06);
}

.app-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 0.7rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 200, 255, 0.2) transparent;
}

.app-sidebar__pinned {
  flex-shrink: 0;
  padding: 0.35rem 0.7rem 0.55rem;
  border-top: 1px solid rgba(120, 200, 255, 0.1);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.12), transparent);
}

.app-sidebar__pinned .sidebar-group {
  margin-bottom: 0;
}

.app-sidebar__foot {
  flex-shrink: 0;
  padding: 0.65rem 0.7rem 0.9rem;
  border-top: 1px solid rgba(120, 200, 255, 0.1);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), transparent);
}

.sidebar-group {
  margin-bottom: 1.35rem;
}

.sidebar-group__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.55rem 0.15rem;
  padding: 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(138, 160, 180, 0.55);
  transition: opacity 0.2s ease, color 0.15s ease;
  width: calc(100% - 0.3rem);
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.sidebar-group__label:hover {
  color: rgba(200, 215, 228, 0.85);
}

.sidebar-group__label-text {
  min-width: 0;
}

.sidebar-group__chevron {
  width: 0.42rem;
  height: 0.42rem;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.18s ease, opacity 0.2s ease;
  flex-shrink: 0;
  opacity: 0.75;
}

.sidebar-group.is-collapsed .sidebar-group__chevron {
  transform: rotate(-45deg) translateY(1px);
}

.sidebar-group.is-collapsed .sidebar-group__body {
  display: none;
}

.sidebar-group.is-collapsed .sidebar-group__label {
  margin-bottom: 0.15rem;
}

.sidebar-group__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(120, 200, 255, 0.12), transparent);
}

.sidebar-menu,
.sidebar-submenu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-menu > li + li,
.sidebar-submenu__list > li + li {
  margin-top: 0.15rem;
}

.sidebar-link,
.sidebar-submenu__trigger {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 2.65rem;
  padding: 0.4rem 0.5rem;
  border-radius: 12px;
  color: rgba(200, 215, 228, 0.82);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-link:hover,
.sidebar-submenu__trigger:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(120, 200, 255, 0.08);
  text-decoration: none;
}

.sidebar-link.is-active,
.sidebar-sublink.is-active {
  color: var(--accent);
  background: linear-gradient(90deg, rgba(62, 224, 255, 0.14), rgba(62, 224, 255, 0.06));
  border-color: rgba(62, 224, 255, 0.22);
  box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-submenu__trigger.is-parent-active {
  color: var(--text);
  border-color: rgba(62, 224, 255, 0.12);
  background: rgba(62, 224, 255, 0.05);
}

.sidebar-link--cta {
  background: linear-gradient(135deg, rgba(62, 224, 255, 0.18), rgba(255, 107, 53, 0.12));
  border-color: rgba(62, 224, 255, 0.25);
  color: var(--text);
}

.sidebar-link--cta:hover {
  border-color: rgba(62, 224, 255, 0.45);
  color: var(--accent);
}

/* Kotak ikon elegan */
.sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  color: rgba(180, 200, 220, 0.9);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 200, 255, 0.08);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.sidebar-icon--sm {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
}

.sidebar-icon--sm svg {
  width: 0.9rem;
  height: 0.9rem;
}

.sidebar-icon--danger {
  color: rgba(255, 160, 160, 0.85);
  background: rgba(255, 90, 90, 0.06);
  border-color: rgba(255, 120, 120, 0.12);
}

.sidebar-link:hover .sidebar-icon,
.sidebar-submenu__trigger:hover .sidebar-icon,
.sidebar-sublink:hover .sidebar-icon {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(120, 200, 255, 0.16);
}

.sidebar-link.is-active .sidebar-icon,
.sidebar-sublink.is-active .sidebar-icon {
  color: var(--accent);
  background: rgba(62, 224, 255, 0.12);
  border-color: rgba(62, 224, 255, 0.28);
  box-shadow: 0 0 16px rgba(62, 224, 255, 0.15);
}

.sidebar-link--cart .sidebar-icon {
  color: var(--accent);
  background: rgba(62, 224, 255, 0.08);
  border-color: rgba(62, 224, 255, 0.18);
}

.sidebar-link__text,
.sidebar-user-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.sidebar-link__badge {
  flex-shrink: 0;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-hot), #ff8f5a);
  border-radius: 999px;
}

.sidebar-submenu > summary {
  list-style: none;
}

.sidebar-submenu > summary::-webkit-details-marker {
  display: none;
}

.sidebar-submenu__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  width: 1.25rem;
  height: 1.25rem;
  color: rgba(170, 190, 210, 0.9);
  transition: transform 0.2s ease, color 0.15s ease;
}

.sidebar-submenu__caret svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.sidebar-submenu__trigger:hover .sidebar-submenu__caret {
  color: var(--accent);
}

.sidebar-submenu[open] > .sidebar-submenu__trigger .sidebar-submenu__caret {
  transform: rotate(180deg);
  color: var(--accent);
}

.sidebar-submenu__list {
  position: relative;
  margin: 0.35rem 0 0 1.45rem;
  padding: 0.15rem 0 0.15rem 0.85rem;
}

.sidebar-submenu__list::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(62, 224, 255, 0.35), rgba(120, 200, 255, 0.08));
}

.sidebar-submenu__list--foot {
  margin-left: 0;
  padding-left: 0;
  margin-top: 0.35rem;
}

.sidebar-submenu__list--foot::before {
  display: none;
}

.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.45rem;
  margin: 0.1rem 0;
  border-radius: 10px;
  color: rgba(170, 190, 210, 0.85);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-sublink__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-sublink:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.sidebar-sublink--logout {
  color: rgba(138, 160, 180, 0.9);
  margin-top: 0.2rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
}

.sidebar-sublink--logout:hover {
  color: #ffb4b4;
  background: rgba(255, 90, 90, 0.08);
}

.sidebar-group__label--foot {
  margin-bottom: 0.55rem;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.4rem;
  padding: 0.5rem 0.55rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 200, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
  cursor: default;
  user-select: none;
}

.sidebar-submenu__list--account {
  margin-top: 0;
}

.sidebar-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(135deg, rgba(62, 224, 255, 0.35), rgba(255, 107, 53, 0.28));
  border: 1px solid rgba(120, 200, 255, 0.3);
  box-shadow: 0 0 20px rgba(62, 224, 255, 0.12);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

/* Collapsed (desktop) */
html.sidebar-collapsed-init body,
body.sidebar-collapsed {
  --sidebar-active-width: var(--sidebar-collapsed-width);
}

html.sidebar-collapsed-init .app-sidebar,
body.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-collapsed-width);
}

html.sidebar-collapsed-init .app-sidebar__logo-text,
html.sidebar-collapsed-init .sidebar-group__label,
html.sidebar-collapsed-init .sidebar-link__text,
html.sidebar-collapsed-init .sidebar-sublink__text,
html.sidebar-collapsed-init .sidebar-user-name,
html.sidebar-collapsed-init .sidebar-submenu__caret,
html.sidebar-collapsed-init .sidebar-group__label::after,
body.sidebar-collapsed .app-sidebar__logo-text,
body.sidebar-collapsed .sidebar-group__label,
body.sidebar-collapsed .sidebar-link__text,
body.sidebar-collapsed .sidebar-sublink__text,
body.sidebar-collapsed .sidebar-user-name,
body.sidebar-collapsed .sidebar-submenu__caret,
body.sidebar-collapsed .sidebar-group__label::after {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

html.sidebar-collapsed-init .app-sidebar__collapse,
body.sidebar-collapsed .app-sidebar__collapse {
  transform: rotate(180deg);
}

html.sidebar-collapsed-init .sidebar-submenu__list:not(.sidebar-submenu__list--account),
body.sidebar-collapsed .sidebar-submenu__list:not(.sidebar-submenu__list--account) {
  display: none;
}

html.sidebar-collapsed-init .sidebar-submenu__list--account,
body.sidebar-collapsed .sidebar-submenu__list--account {
  display: none;
  margin-left: 0;
  padding-left: 0;
}

html.sidebar-collapsed-init .sidebar-group__chevron,
body.sidebar-collapsed .sidebar-group__chevron {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

.sidebar-flyout__title,
.sidebar-flyout__heading {
  display: none;
}

html.sidebar-collapsed-init .sidebar-user-card,
body.sidebar-collapsed .sidebar-user-card {
  justify-content: center;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
  margin-bottom: 0.25rem;
}

html.sidebar-collapsed-init .sidebar-submenu[open] > .sidebar-submenu__trigger,
body.sidebar-collapsed .sidebar-submenu[open] > .sidebar-submenu__trigger {
  background: rgba(62, 224, 255, 0.08);
}

html.sidebar-collapsed-init .sidebar-link,
html.sidebar-collapsed-init .sidebar-submenu__trigger,
html.sidebar-collapsed-init .sidebar-sublink,
body.sidebar-collapsed .sidebar-link,
body.sidebar-collapsed .sidebar-submenu__trigger,
body.sidebar-collapsed .sidebar-sublink {
  justify-content: center;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
  box-shadow: none;
}

html.sidebar-collapsed-init .sidebar-link.is-active,
html.sidebar-collapsed-init .sidebar-sublink.is-active,
body.sidebar-collapsed .sidebar-link.is-active,
body.sidebar-collapsed .sidebar-sublink.is-active {
  box-shadow: inset 0 0 0 1px rgba(62, 224, 255, 0.25);
}

html.sidebar-collapsed-init .app-sidebar__pinned,
body.sidebar-collapsed .app-sidebar__pinned,
html.sidebar-collapsed-init .app-sidebar__foot,
body.sidebar-collapsed .app-sidebar__foot {
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

html.sidebar-collapsed-init .sidebar-link__badge,
body.sidebar-collapsed .sidebar-link__badge {
  position: absolute;
  top: 0.2rem;
  right: 0.35rem;
  min-width: 0.95rem;
  height: 0.95rem;
  font-size: 0.55rem;
  line-height: 0.95rem;
}

html.sidebar-collapsed-init .sidebar-link--cart,
body.sidebar-collapsed .sidebar-link--cart,
html.sidebar-collapsed-init .sidebar-sublink--pending-pay,
body.sidebar-collapsed .sidebar-sublink--pending-pay {
  position: relative;
}

html.sidebar-collapsed-init .app-sidebar__head,
body.sidebar-collapsed .app-sidebar__head {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

html.sidebar-collapsed-init .app-sidebar__logo,
body.sidebar-collapsed .app-sidebar__logo {
  flex: 0;
}

/* Flyout submenu saat sidebar ciut (desktop) */
@media (min-width: 901px) {
  html.sidebar-collapsed-init .app-sidebar,
  html.sidebar-collapsed-init .app-sidebar__inner,
  html.sidebar-collapsed-init .app-sidebar__nav,
  body.sidebar-collapsed .app-sidebar,
  body.sidebar-collapsed .app-sidebar__inner,
  body.sidebar-collapsed .app-sidebar__nav {
    overflow: visible;
  }

  html.sidebar-collapsed-init .sidebar-submenu--expandable,
  html.sidebar-collapsed-init .app-sidebar__foot[data-sidebar-flyout],
  body.sidebar-collapsed .sidebar-submenu--expandable,
  body.sidebar-collapsed .app-sidebar__foot[data-sidebar-flyout] {
    position: relative;
  }

  html.sidebar-collapsed-init .sidebar-submenu--expandable > .sidebar-submenu__list,
  html.sidebar-collapsed-init .app-sidebar__foot .sidebar-foot-flyout,
  body.sidebar-collapsed .sidebar-submenu--expandable > .sidebar-submenu__list,
  body.sidebar-collapsed .app-sidebar__foot .sidebar-foot-flyout {
    position: absolute;
    left: calc(100% + 0.45rem);
    top: 0;
    z-index: 220;
    min-width: 14rem;
    max-width: 18rem;
    max-height: min(70vh, 28rem);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    margin: 0;
    padding: 0.45rem;
    border-radius: 10px;
    border: 1px solid rgba(120, 200, 255, 0.18);
    background: rgba(12, 20, 32, 0.98);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(62, 224, 255, 0.06);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-8px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  }

  html.sidebar-collapsed-init .sidebar-submenu--expandable > .sidebar-submenu__list::before,
  body.sidebar-collapsed .sidebar-submenu--expandable > .sidebar-submenu__list::before {
    display: none;
  }

  html.sidebar-collapsed-init .sidebar-submenu--expandable > .sidebar-submenu__list::after,
  html.sidebar-collapsed-init .app-sidebar__foot .sidebar-foot-flyout::after,
  body.sidebar-collapsed .sidebar-submenu--expandable > .sidebar-submenu__list::after,
  body.sidebar-collapsed .app-sidebar__foot .sidebar-foot-flyout::after {
    content: "";
    position: absolute;
    top: 0;
    left: -0.55rem;
    width: 0.55rem;
    height: 100%;
  }

  html.sidebar-collapsed-init .sidebar-submenu--expandable.is-flyout-open > .sidebar-submenu__list,
  html.sidebar-collapsed-init .app-sidebar__foot.is-flyout-open .sidebar-foot-flyout,
  body.sidebar-collapsed .sidebar-submenu--expandable.is-flyout-open > .sidebar-submenu__list,
  body.sidebar-collapsed .app-sidebar__foot.is-flyout-open .sidebar-foot-flyout {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  html.sidebar-collapsed-init .sidebar-flyout__title,
  html.sidebar-collapsed-init .sidebar-flyout__heading,
  body.sidebar-collapsed .sidebar-flyout__title,
  body.sidebar-collapsed .sidebar-flyout__heading {
    display: block;
    margin: 0 0 0.35rem;
    padding: 0.25rem 0.55rem 0;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(138, 160, 180, 0.75);
    list-style: none;
  }

  html.sidebar-collapsed-init .sidebar-flyout__title,
  body.sidebar-collapsed .sidebar-flyout__title {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--text);
    padding-bottom: 0.15rem;
    border-bottom: 1px solid rgba(120, 200, 255, 0.1);
    margin-bottom: 0.45rem;
  }

  html.sidebar-collapsed-init .sidebar-submenu--expandable > .sidebar-submenu__list .sidebar-sublink,
  html.sidebar-collapsed-init .app-sidebar__foot .sidebar-foot-flyout .sidebar-sublink,
  body.sidebar-collapsed .sidebar-submenu--expandable > .sidebar-submenu__list .sidebar-sublink,
  body.sidebar-collapsed .app-sidebar__foot .sidebar-foot-flyout .sidebar-sublink {
    justify-content: flex-start;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  html.sidebar-collapsed-init .app-sidebar__foot .sidebar-foot-flyout .sidebar-submenu__list--account,
  body.sidebar-collapsed .app-sidebar__foot .sidebar-foot-flyout .sidebar-submenu__list--account {
    display: block;
    margin: 0;
    padding: 0;
  }

  html.sidebar-collapsed-init .sidebar-submenu--expandable > .sidebar-submenu__list .sidebar-sublink__text,
  body.sidebar-collapsed .sidebar-submenu--expandable > .sidebar-submenu__list .sidebar-sublink__text,
  html.sidebar-collapsed-init .app-sidebar__foot .sidebar-foot-flyout .sidebar-sublink__text,
  body.sidebar-collapsed .app-sidebar__foot .sidebar-foot-flyout .sidebar-sublink__text {
    opacity: 1;
    width: auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: auto;
  }

  html.sidebar-collapsed-init .sidebar-submenu--expandable > .sidebar-submenu__trigger[data-sidebar-tip]:hover::after,
  html.sidebar-collapsed-init .app-sidebar__foot .sidebar-user-card[data-sidebar-tip]:hover::after,
  body.sidebar-collapsed .sidebar-submenu--expandable > .sidebar-submenu__trigger[data-sidebar-tip]:hover::after,
  body.sidebar-collapsed .app-sidebar__foot .sidebar-user-card[data-sidebar-tip]:hover::after {
    content: none;
    display: none;
  }

  html.sidebar-collapsed-init .sidebar-submenu--expandable > .sidebar-submenu__trigger .sidebar-submenu__caret,
  body.sidebar-collapsed .sidebar-submenu--expandable > .sidebar-submenu__trigger .sidebar-submenu__caret {
    display: none;
  }

  html.sidebar-collapsed-init .app-sidebar__foot .sidebar-foot__body > .sidebar-submenu__list--account,
  body.sidebar-collapsed .app-sidebar__foot .sidebar-foot__body > .sidebar-submenu__list--account {
    display: none;
  }

  html.sidebar-collapsed-init .sidebar-group.is-collapsed .sidebar-group__body,
  body.sidebar-collapsed .sidebar-group.is-collapsed .sidebar-group__body {
    display: block;
  }

  html.sidebar-collapsed-init .sidebar-submenu--expandable > .sidebar-submenu__trigger,
  body.sidebar-collapsed .sidebar-submenu--expandable > .sidebar-submenu__trigger {
    position: relative;
  }

  html.sidebar-collapsed-init .sidebar-submenu--expandable > .sidebar-submenu__trigger .sidebar-icon::after,
  body.sidebar-collapsed .sidebar-submenu--expandable > .sidebar-submenu__trigger .sidebar-icon::after {
    content: "";
    position: absolute;
    right: -0.08rem;
    bottom: -0.08rem;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(62, 224, 255, 0.75);
    box-shadow: 0 0 0 1px rgba(9, 16, 24, 0.85);
  }

  html.sidebar-collapsed-init .sidebar-submenu--expandable > .sidebar-submenu__trigger .sidebar-icon,
  body.sidebar-collapsed .sidebar-submenu--expandable > .sidebar-submenu__trigger .sidebar-icon {
    position: relative;
  }
}

/* Tooltip saat collapsed — hanya link tanpa submenu */
body.sidebar-collapsed [data-sidebar-tip] {
  position: relative;
}

html.sidebar-collapsed-init .sidebar-link[data-sidebar-tip]:hover::after,
body.sidebar-collapsed .sidebar-link[data-sidebar-tip]:hover::after,
html.sidebar-collapsed-init .sidebar-sublink[data-sidebar-tip]:hover::after,
body.sidebar-collapsed .sidebar-sublink[data-sidebar-tip]:hover::after {
  content: attr(data-sidebar-tip);
  position: absolute;
  left: calc(100% + 0.55rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  pointer-events: none;
}

@media (max-width: 900px) {
  body {
    /* Dipakai .app-content, dropdown keranjang, panel chat */
    --app-topbar-height: 6.9rem;
  }

  .app-topbar {
    /* Baris 1: menu + aksi; baris 2: search penuh */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-top: calc(0.7rem + env(safe-area-inset-top, 0px));
    padding-bottom: 0.7rem;
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
    z-index: 45;
    box-sizing: border-box;
  }

  .app-content {
    padding-top: calc(var(--app-topbar-height) + env(safe-area-inset-top, 0px));
  }

  .app-topbar__menu {
    display: inline-flex;
    order: 0;
  }

  .app-topbar__actions {
    order: 1;
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
    gap: 0.45rem;
  }

  .app-topbar__center {
    order: 2;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    justify-content: stretch;
  }

  .app-topbar__search {
    max-width: none;
    width: 100%;
  }

  .app-topbar__search-label {
    padding: 0.62rem 1rem;
    border-radius: 12px;
  }

  .app-topbar__search-input {
    font-size: 0.9rem;
  }

  .app-topbar__profile-name {
    display: none;
  }

  .app-topbar__profile-trigger {
    border-radius: 12px;
    padding: 0.35rem 0.45rem;
  }

  .app-topbar__chat {
    border-radius: 12px;
    padding: 0.35rem 0.55rem 0.35rem 0.45rem;
    font-size: 0.82rem;
  }

  /* Fixed: tidak tertutup baris search & selaras dengan dropdown keranjang */
  .app-topbar__notif-menu,
  .app-topbar__cart-menu {
    position: fixed;
    top: calc(var(--app-topbar-height, 6.9rem) + env(safe-area-inset-top, 0px) + 0.35rem);
    left: max(0.85rem, env(safe-area-inset-left, 0px));
    right: max(0.85rem, env(safe-area-inset-right, 0px));
    width: auto;
    max-width: none;
    z-index: 60;
  }

  .app-topbar__notif-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.75rem 0.75rem 1rem;
  }

  .app-topbar__notif-item-label {
    max-width: none;
    font-size: 0.68rem;
  }

  .app-topbar__notif-icon-wrap {
    width: 2.85rem;
    height: 2.85rem;
  }

  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.28s ease, width 0.25s ease;
    box-shadow: var(--shadow);
  }

  body.sidebar-mobile-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-mobile-open .sidebar-backdrop {
    display: block;
  }

  .app-sidebar__collapse {
    display: none;
  }

  html.sidebar-collapsed-init .app-sidebar,
  body.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-width);
  }

  html.sidebar-collapsed-init .app-sidebar__logo-text,
  html.sidebar-collapsed-init .sidebar-group__label,
  html.sidebar-collapsed-init .sidebar-link__text,
  html.sidebar-collapsed-init .sidebar-sublink__text,
  html.sidebar-collapsed-init .sidebar-user-name,
  html.sidebar-collapsed-init .sidebar-submenu__caret,
  body.sidebar-collapsed .app-sidebar__logo-text,
  body.sidebar-collapsed .sidebar-group__label,
  body.sidebar-collapsed .sidebar-link__text,
  body.sidebar-collapsed .sidebar-sublink__text,
  body.sidebar-collapsed .sidebar-user-name,
  body.sidebar-collapsed .sidebar-submenu__caret {
    opacity: 1;
    width: auto;
    pointer-events: auto;
  }

  html.sidebar-collapsed-init .sidebar-submenu__list,
  body.sidebar-collapsed .sidebar-submenu__list {
    display: block;
  }

  html.sidebar-collapsed-init .sidebar-link,
  html.sidebar-collapsed-init .sidebar-submenu__trigger,
  body.sidebar-collapsed .sidebar-link,
  body.sidebar-collapsed .sidebar-submenu__trigger {
    justify-content: flex-start;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 10, 15, 0.78);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hot));
  box-shadow: 0 0 24px rgba(62, 224, 255, 0.35);
  position: relative;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(0, 0, 0, 0.35);
  border-radius: 4px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.24rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(120, 200, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle__line {
  display: block;
  width: 1rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-nav-open .nav-toggle__line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

.site-header.is-nav-open .nav-toggle__line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-order-dropdown {
  position: relative;
  flex-shrink: 0;
}

.nav-order-dropdown > summary {
  list-style: none;
}

.nav-order-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-order-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease;
}

.nav-order-dropdown__trigger:hover,
.nav-order-dropdown[open] > .nav-order-dropdown__trigger {
  color: var(--text);
}

.nav-order-dropdown__caret {
  display: flex;
  flex-shrink: 0;
  line-height: 0;
  transition: transform 0.2s ease, color 0.15s ease;
}

.nav-order-dropdown[open] .nav-order-dropdown__caret {
  transform: rotate(180deg);
  color: var(--accent);
}

.nav-order-dropdown__menu {
  position: absolute;
  left: 0;
  top: calc(100% + 0.55rem);
  z-index: 120;
  min-width: 13rem;
  padding: 0.35rem;
  background: var(--bg-panel);
  border: 1px solid rgba(120, 200, 255, 0.14);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.nav .nav-order-dropdown__item {
  display: block;
  padding: 0.48rem 0.7rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav .nav-order-dropdown__item:hover {
  background: rgba(62, 224, 255, 0.1);
  color: var(--accent);
}

/* Ikon keranjang + badge (header), tanpa ring / lingkaran luar */
.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0.35rem;
  border-radius: 0;
  background: transparent;
  color: var(--accent) !important;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-cart:hover {
  background: rgba(62, 224, 255, 0.06);
  color: #b8f4ff !important;
}

.nav-cart__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.nav-cart__icon svg {
  display: block;
}

.nav-cart__badge {
  position: absolute;
  top: -0.05rem;
  right: -0.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  min-height: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-hot), #ff8f5a);
  border-radius: 999px;
  border: 2px solid var(--bg-deep);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.35);
  box-sizing: border-box;
}

/* Menu akun (nama user): dropdown tanpa JS */
.nav-user-dropdown {
  position: relative;
  flex-shrink: 0;
}

.nav-user-dropdown > summary {
  list-style: none;
}

.nav-user-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-user-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: min(12rem, 42vw);
  padding: 0.32rem 0.55rem 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 200, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nav-user-dropdown__trigger:hover {
  border-color: rgba(62, 224, 255, 0.35);
  background: rgba(62, 224, 255, 0.06);
}

.nav-user-dropdown[open] > .nav-user-dropdown__trigger {
  border-color: rgba(62, 224, 255, 0.45);
  background: rgba(62, 224, 255, 0.08);
}

.nav-user-dropdown__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.nav-user-dropdown__caret {
  display: flex;
  flex-shrink: 0;
  color: var(--muted);
  line-height: 0;
  transition: transform 0.2s ease, color 0.15s ease;
}

.nav-user-dropdown[open] .nav-user-dropdown__caret {
  transform: rotate(180deg);
  color: var(--accent);
}

.nav-user-dropdown__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 120;
  min-width: 11.75rem;
  padding: 0.35rem;
  background: var(--bg-panel);
  border: 1px solid rgba(120, 200, 255, 0.14);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.nav .nav-user-dropdown__item {
  display: block;
  padding: 0.48rem 0.7rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav .nav-user-dropdown__item:hover {
  background: rgba(62, 224, 255, 0.1);
  color: var(--accent);
}

.nav .nav-user-dropdown__item--logout {
  color: var(--muted);
  margin-top: 0.15rem;
  border-top: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  padding-top: 0.55rem;
}

.nav .nav-user-dropdown__item--logout:hover {
  color: #ffb4b4;
  background: rgba(255, 90, 90, 0.08);
}

@media (max-width: 760px) {
  .header-inner {
    flex-wrap: nowrap;
    position: relative;
  }

  .logo-text {
    font-size: 1.3rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-panel);
    box-shadow: var(--shadow);
    z-index: 130;
  }

  .site-header.is-nav-open .nav {
    display: flex;
  }

  .nav > a,
  .nav-order-dropdown__trigger,
  .nav-user-dropdown__trigger {
    width: 100%;
    max-width: none;
    min-height: 2.35rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(120, 200, 255, 0.15);
    background: rgba(255, 255, 255, 0.02);
  }

  .nav-cart {
    justify-content: flex-start;
    border: 1px solid rgba(120, 200, 255, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
  }

  .nav-cart__badge {
    top: 0.35rem;
    right: auto;
    left: 1.25rem;
  }

  .nav-order-dropdown__menu,
  .nav-user-dropdown__menu {
    position: static;
    width: 100%;
    margin-top: 0.35rem;
    box-shadow: none;
  }
}

.template-tabs-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.template-tabs-bar__tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  flex: 0 1 auto;
  min-width: 0;
}

.template-tabs__button {
  flex-shrink: 0;
  border: 1px solid rgba(150, 170, 190, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.gallery-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.gallery-search__icon {
  position: absolute;
  left: 0.75rem;
  width: 14px;
  height: 14px;
  color: rgba(200, 215, 230, 0.55);
  pointer-events: none;
  transition: color 0.2s ease;
}

.gallery-search-wrap:focus-within .gallery-search__icon {
  color: var(--accent);
}

input[type="text"].gallery-search {
  padding: 0.48rem 0.85rem 0.48rem 2.5rem;
  border: 1px solid rgba(150, 170, 190, 0.22);
  border-radius: 999px;
  background: rgba(15, 24, 36, 0.55);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  outline: none;
  width: auto;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"].gallery-search:hover {
  border-color: rgba(150, 170, 190, 0.38);
  background: rgba(15, 24, 36, 0.7);
}

input[type="text"].gallery-search:focus {
  border-color: rgba(62, 224, 255, 0.5);
  background: rgba(15, 24, 36, 0.8);
  box-shadow: 0 0 0 3px rgba(62, 224, 255, 0.08);
}

input[type="text"].gallery-search::placeholder {
  color: rgba(210, 220, 235, 0.6);
  font-weight: 400;
}

.template-tabs-bar .gallery-search-wrap {
  margin-left: auto;
}

.template-tabs-bar .gallery-search {
  width: 200px;
}

.pagar-page__head .gallery-search-wrap {
  margin-top: 0.85rem;
}

.pagar-page__head .gallery-search {
  width: min(360px, 100%);
}

.template-tabs__button:hover,
.template-tabs__button.is-active {
  border-color: rgba(62, 224, 255, 0.58);
  background: rgba(62, 224, 255, 0.1);
  color: var(--accent);
}

.template-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.template-tile {
  margin: 0;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(150, 170, 190, 0.28);
  background: rgba(255, 255, 255, 0.02);
}

.template-tile__button {
  width: 100%;
  border: 0;
  margin: 0;
  padding: 0.7rem;
  text-align: left;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: inherit;
}

.template-tile__button.is-active {
  box-shadow: inset 0 0 0 1px rgba(62, 224, 255, 0.5);
  background: rgba(62, 224, 255, 0.05);
}

.template-tile__preview {
  border-radius: 10px;
  border: 1px solid rgba(150, 170, 190, 0.25);
  background: #ececec;
  padding: 0.4rem;
}

.template-tile__preview svg {
  display: block;
  width: 100%;
  height: auto;
}

.template-tile__preview svg :is(rect, circle, ellipse, path, polygon) {
  fill: #acacaf;
}

.template-tile__preview svg .cutout {
  fill: #ececec;
}

.template-tile h3 {
  margin: 0.55rem 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: #c9d2de;
}

.template-empty-state {
  margin: 0.8rem 0 0;
  text-align: center;
}

.template-builder {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 0.9rem;
  align-items: start;
}

.template-builder__hint {
  margin: 0 0 0.6rem;
  text-align: center;
  font-size: 0.85rem;
}

.template-builder__canvas-wrap {
  border-radius: 10px;
  border: 1px solid rgba(150, 170, 190, 0.3);
  background: #ececec;
  padding: 0.6rem;
}

#template-builder-svg {
  display: block;
  width: 100%;
  height: auto;
}

#template-builder-svg .tb-part-fill {
  fill: #acacaf;
  stroke: #2f2f2f;
  stroke-width: 0.6;
}

#template-builder-svg .tb-cutout {
  fill: #ececec;
  stroke: #2f2f2f;
  stroke-width: 0.6;
}

#template-builder-svg .tb-dim-line {
  stroke: #2f2f2f;
  stroke-width: 1.2;
}

#template-builder-svg .tb-dim-text {
  fill: #111;
  font-size: 16px;
  font-weight: 500;
}

#template-builder-svg .tb-highlight,
#template-builder-svg .tb-highlight-ring {
  stroke: #dc2626;
  vector-effect: non-scaling-stroke;
}

#template-builder-svg .tb-part-fill.tb-highlight,
#template-builder-svg .tb-cutout.tb-highlight,
#template-builder-svg path.tb-cutout.tb-highlight {
  stroke: #dc2626;
  stroke-width: 3;
}

#template-builder-svg .tb-dim-line.tb-highlight {
  stroke: #dc2626;
  stroke-width: 2.5;
}

#template-builder-svg .tb-highlight-ring,
#template-builder-svg .tb-highlight-corner {
  fill: none;
  stroke-width: 3.5;
  pointer-events: none;
}

#template-builder-svg .tb-highlight-corner {
  stroke: #dc2626;
  stroke-linecap: round;
}

#template-builder-svg .tb-annot-line {
  stroke: #ef4444;
  stroke-width: 1.6;
  stroke-dasharray: 5 3;
  fill: none;
  vector-effect: non-scaling-stroke;
}

#template-builder-svg .tb-annot-dot {
  fill: #ef4444;
  stroke: none;
}

#template-builder-svg .tb-annot-text {
  fill: #ef4444;
  font-size: 8px;
  font-weight: 600;
  paint-order: stroke;
  stroke: var(--bg-panel, #1a1d23);
  stroke-width: 3px;
  stroke-linejoin: round;
}

#template-builder-svg .tb-annot-circle {
  fill: none;
  stroke: #ef4444;
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
}

#template-builder-svg .tb-annot-line--limit {
  stroke: #dc2626;
  stroke-width: 2.2;
  stroke-dasharray: none;
}

#template-builder-svg .tb-annot-text--limit {
  fill: #111;
  stroke: #ef4444;
  stroke-width: 4px;
  font-size: 9px;
  font-weight: 700;
}

.template-builder__limit-hint {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #f87171;
}

.template-builder__field--clamped label {
  color: #f87171;
}

.template-builder__field--clamped .template-builder__input-row input {
  border-color: rgba(220, 38, 38, 0.65);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18);
}

.template-builder__field--focused label {
  color: #f87171;
}

.template-builder__field--focused .template-builder__input-row input,
.template-builder__field--focused .template-builder__input-row select {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.template-builder__panel {
  position: sticky;
  top: 1rem;
}

#template-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem 0.7rem;
}

#template-fields > h4 {
  grid-column: 1 / -1;
}

.template-builder__field {
  margin-bottom: 0.58rem;
}

.template-builder__field--row {
  grid-column: 1 / -1;
}

.template-builder__field--row .template-builder__input-row {
  grid-template-columns: minmax(0, 250px) auto;
  justify-content: start;
}

.template-builder__field label {
  font-size: 0.79rem;
  margin-bottom: 0.14rem;
  line-height: 1.3;
}

.template-builder__input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.38rem;
  align-items: center;
}

.template-builder__unit {
  min-width: 1.9rem;
  text-align: right;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 980px) {
  .template-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .template-builder__panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .template-gallery {
    grid-template-columns: 1fr;
  }

  .template-tabs-bar {
    flex-wrap: wrap;
  }

  .template-tabs-bar__tabs {
    flex-wrap: wrap;
    flex: 1 1 100%;
  }

  .template-tabs-bar .gallery-search-wrap {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .template-tabs-bar .gallery-search {
    width: 100%;
  }
}

.main {
  flex: 1;
  padding: 2rem 0 4rem;
  position: relative;
  z-index: 1;
}

.app-content > .main > .container,
.app-content > .site-footer > .container {
  width: 90%;
  max-width: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-inner p {
  margin: 0;
}

.hero {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  padding: 2rem 0 3rem;
}

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

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.hero p.lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 1.75rem;
  max-width: 46ch;
}

.hero-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 1rem;
  color: var(--accent);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.steps li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.95rem;
}
.steps strong {
  color: var(--text);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(62, 224, 255, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-family: var(--font);
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #1fb8d4);
  color: #041014;
  box-shadow: 0 10px 30px rgba(62, 224, 255, 0.25);
}
.btn-primary:hover {
  color: #041014;
  box-shadow: 0 14px 36px rgba(62, 224, 255, 0.35);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: rgba(62, 224, 255, 0.35);
  color: var(--accent);
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.btn-google:hover {
  color: #1f1f1f;
  background: #f8f9fa;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.btn-google__icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.25rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  font-family: var(--font-display);
  margin-top: 0;
}

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

@media (max-width: 720px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  color-scheme: dark;
}

select option,
select optgroup {
  background-color: var(--bg-elevated);
  color: var(--text);
}

select option:checked,
select option:hover,
select option:focus {
  background-color: rgba(62, 224, 255, 0.2);
  color: var(--text);
}

/* Hilangkan panjang atas/bawah pada input number (Chrome, Safari, Edge) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(62, 224, 255, 0.35);
  outline-offset: 1px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.check input {
  width: auto;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}
.alert-error {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 120, 120, 0.35);
  color: #ffb4b4;
}
.alert-success {
  background: rgba(80, 220, 160, 0.12);
  border: 1px solid rgba(120, 240, 190, 0.35);
  color: #b8ffe0;
}

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

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.data th,
table.data td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th {
  background: var(--bg-elevated);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
table.data tr:last-child td {
  border-bottom: none;
}

@media (max-width: 640px) {
  .table-wrap {
    overflow-x: visible;
    border: 0;
  }

  .dxf-stats-scroll {
    overflow-x: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  table.data,
  .dxf-report-table {
    border-collapse: separate !important;
    border-spacing: 0 0.75rem !important;
    background: transparent !important;
  }

  table.data thead,
  .dxf-report-table thead {
    display: none;
  }

  table.data,
  table.data tbody,
  table.data tr,
  table.data td,
  .dxf-report-table,
  .dxf-report-table tbody,
  .dxf-report-table tr,
  .dxf-report-table td {
    display: block;
    width: 100%;
  }

  table.data tbody tr,
  .dxf-report-table tbody tr {
    margin-bottom: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-panel);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  }

  table.data td,
  .dxf-report-table td {
    display: grid;
    grid-template-columns: minmax(7rem, 38%) minmax(0, 1fr);
    gap: 0.35rem 0.75rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    text-align: left !important;
    border-bottom: 1px solid var(--border);
  }

  .dxf-report-table td:not(:last-child) {
    border-bottom: 1px solid var(--border) !important;
  }

  table.data td:last-child,
  .dxf-report-table td:last-child {
    border-bottom: 0 !important;
  }

  table.data td::before,
  .dxf-report-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    line-height: 1.25;
    text-transform: uppercase;
  }
}

.price {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--accent);
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

.divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.page-sub {
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.radio-cards {
  display: grid;
  gap: 0.75rem;
}

.radio-card {
  display: block;
  cursor: pointer;
  position: relative;
}

/* Radio disembunyikan dengan benar supaya tidak menimpa teks (.box).
   Tanpa position: relative di .radio-card, absolute bisa mengacu ke ancestor lain. */
.radio-card input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.radio-card .box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  background: var(--bg-elevated);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 3.5rem;
}

.radio-card:hover .box {
  border-color: rgba(62, 224, 255, 0.22);
  background: rgba(19, 27, 38, 0.95);
}

.radio-card input:focus-visible + .box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.radio-card input:checked + .box {
  border-color: rgba(62, 224, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(62, 224, 255, 0.2) inset;
  background: rgba(62, 224, 255, 0.06);
}

.radio-card .box strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.radio-card .box > span {
  display: block;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Halaman checkout: dua kolom lebih seimbang di layar lebar */
.checkout-page .checkout-grid {
  align-items: start;
}

@media (min-width: 721px) {
  .checkout-page .checkout-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1.75rem;
  }
}

/* Badge status riwayat transaksi (orders.php) */
.status-badge {
  display: inline-block;
  max-width: 100%;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  white-space: normal;
  text-align: left;
  border: 1px solid transparent;
}

.status-badge--pending_pay {
  color: #1a1408;
  background: linear-gradient(135deg, #ffe082, #ffca28);
  border-color: rgba(255, 202, 40, 0.45);
  box-shadow: 0 0 12px rgba(255, 202, 40, 0.18);
}

.status-badge--verifikasi {
  color: #1a1408;
  background: linear-gradient(135deg, #ffd54f, #ffb300);
  border-color: rgba(255, 193, 7, 0.45);
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.2);
}

.status-badge--antrian {
  color: #e8f4ff;
  background: rgba(62, 140, 255, 0.22);
  border-color: rgba(100, 180, 255, 0.4);
  box-shadow: 0 0 14px rgba(62, 140, 255, 0.15);
}

.status-badge--produksi {
  color: #fff5f0;
  background: rgba(255, 107, 53, 0.28);
  border-color: rgba(255, 140, 90, 0.45);
  box-shadow: 0 0 14px rgba(255, 107, 53, 0.18);
}

.status-badge--selesai {
  color: #061a10;
  background: linear-gradient(135deg, #5ee9a8, #2dd48a);
  border-color: rgba(45, 212, 138, 0.45);
  box-shadow: 0 0 12px rgba(45, 212, 138, 0.2);
}

.status-badge--siap_diambil {
  color: #04131a;
  background: linear-gradient(135deg, #7ee8ff, #3ee0ff);
  border-color: rgba(62, 224, 255, 0.5);
  box-shadow: 0 0 12px rgba(62, 224, 255, 0.2);
}

.status-badge--akan_dikirim {
  color: #fff8f0;
  background: linear-gradient(135deg, #ffb86b, #ff8c4a);
  border-color: rgba(255, 160, 90, 0.5);
  box-shadow: 0 0 12px rgba(255, 140, 74, 0.2);
}

.status-badge--diambil {
  color: #041014;
  background: linear-gradient(135deg, var(--accent), #1fb8d4);
  border-color: rgba(62, 224, 255, 0.5);
  box-shadow: 0 0 14px rgba(62, 224, 255, 0.22);
}

.status-badge--dikirim {
  color: #fff8f0;
  background: linear-gradient(135deg, #ff9a6b, #ff6b4a);
  border-color: rgba(255, 140, 100, 0.5);
  box-shadow: 0 0 12px rgba(255, 107, 74, 0.2);
}

.status-badge--reject_kurir {
  color: #fff5f5;
  background: linear-gradient(135deg, #ff6b7a, #e63946);
  border-color: rgba(255, 120, 130, 0.5);
  box-shadow: 0 0 12px rgba(230, 57, 70, 0.2);
}

.status-badge--unknown,
.status-badge--dash {
  color: var(--muted);
  background: rgba(138, 160, 180, 0.12);
  border-color: var(--border);
}

/* Badge di kartu baris / detail — teks status lengkap, boleh beberapa baris */
.status-badge--compact {
  white-space: normal;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  font-size: 0.68rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  box-shadow: none;
  text-align: center;
  hyphens: auto;
}

.order-line-card .status-badge--compact.status-badge--verifikasi,
.order-line-card .status-badge--compact.status-badge--antrian,
.order-line-card .status-badge--compact.status-badge--produksi,
.order-line-card .status-badge--compact.status-badge--selesai,
.order-line-card .status-badge--compact.status-badge--siap_diambil,
.order-line-card .status-badge--compact.status-badge--akan_dikirim,
.order-line-card .status-badge--compact.status-badge--diambil,
.order-line-card .status-badge--compact.status-badge--dikirim,
.order-line-card .status-badge--compact.status-badge--reject_kurir {
  box-shadow: none;
}

.order-line-card__aside .status-badge--compact {
  text-align: left;
  width: 100%;
  max-width: 15rem;
}

.detail-receipt__meta .status-badge--compact {
  text-align: left;
  max-width: min(100%, 22rem);
}

/* Riwayat transaksi: nota + kartu item (orders.php), layout ringkas */
.orders-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.15rem;
}

a.orders-page-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(150, 170, 190, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

a.orders-page-tab:hover,
a.orders-page-tab:focus-visible,
a.orders-page-tab.is-active {
  border-color: rgba(62, 224, 255, 0.58);
  background: rgba(62, 224, 255, 0.1);
  color: var(--accent);
  outline: none;
}

.orders-page-tab__badge {
  flex-shrink: 0;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-hot), #ff8f5a);
  border-radius: 999px;
}

.my-files-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.my-files-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 960px) {
  .my-files-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .my-files-grid {
    grid-template-columns: 1fr;
  }
}

.my-files-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 24, 36, 0.72);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.my-files-card:hover,
.my-files-card:focus-within {
  border-color: rgba(62, 224, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(62, 224, 255, 0.25), 0 10px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
  outline: none;
}

.my-files-card__order-link,
.my-files-card__title a {
  color: inherit;
  text-decoration: none;
}

.my-files-card__order-link:focus-visible,
.my-files-card__title a:focus-visible {
  outline: 2px solid rgba(62, 224, 255, 0.7);
  outline-offset: 3px;
}

.my-files-card__media {
  aspect-ratio: 4 / 3;
  background: #eef2f6;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.pagar-card__thumb-canvas,
.template-produk-card__thumb-canvas,
.my-files-card__thumb-canvas {
  width: 100%;
  height: 100%;
  min-height: 120px;
  background: #eef2f6;
  overflow: hidden;
  position: relative;
  line-height: 0;
}

.pagar-card__thumb-canvas canvas,
.template-produk-card__thumb-canvas canvas,
.my-files-card__thumb-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
}

.pagar-card__thumb-canvas img,
.template-produk-card__thumb-canvas img,
.my-files-card__thumb-canvas img,
.dxf-gallery-thumb__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  pointer-events: none;
}

.dxf-gallery-thumb__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 120px;
  font-size: 0.75rem;
  color: var(--muted);
}

.my-files-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.my-files-card__body {
  padding: 0.65rem 0.75rem 0.75rem;
}

.my-files-card__meta {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.my-files-card__title {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 600;
}

.my-files-card__original,
.my-files-card__tags,
.my-files-card__notes {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
}

.my-files-card__tags {
  color: #a7f3d0;
}

.my-files-card__notes {
  padding-top: 0.35rem;
  border-top: 1px solid rgba(120, 200, 255, 0.12);
}

.my-files-card__edit {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(120, 200, 255, 0.12);
}

.my-files-card__edit summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.my-files-card__form {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.55rem;
}

.my-files-card__form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.my-files-card__form input,
.my-files-card__form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.76);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  padding: 0.5rem 0.6rem;
}

.my-files-card__form textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.my-files-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.orders-history {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-nota {
  border-radius: 14px;
  border: 1px solid rgba(120, 200, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(62, 224, 255, 0.045), transparent 32%),
    var(--bg-panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.order-nota__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1rem 0.78rem;
  border-bottom: 1px solid rgba(120, 200, 255, 0.12);
}

.order-nota__header-main {
  min-width: 0;
  flex: 1 1 160px;
}

.order-nota__eyebrow {
  margin: 0 0 0.16rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.order-nota__code {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  word-break: break-word;
  line-height: 1.2;
}

.order-nota__meta {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.order-nota__header-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-shrink: 0;
}

.order-nota__total {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.order-nota__header-aside .btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
}

.order-nota__lines {
  padding: 0.75rem 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.08);
}

.order-line-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 0.45rem 0.8rem;
  align-items: center;
  padding: 0.72rem 0.8rem;
  border-radius: 10px;
  background: rgba(19, 27, 38, 0.84);
  border: 1px solid rgba(120, 200, 255, 0.12);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.order-line-card__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-line-card__thumb-link {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(120, 200, 255, 0.22);
  background: rgba(255, 255, 255, 0.02);
}

.order-line-card__thumb-canvas,
.order-line-card__thumb-empty {
  width: 84px;
  height: 62px;
  min-width: 84px;
  min-height: 62px;
}

.order-line-card__thumb-empty {
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.order-line-card__thumb-empty--type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.35rem;
  line-height: 1.25;
  color: var(--accent);
}

.order-line-card__thumb-img {
  display: block;
  width: 84px;
  height: 62px;
  object-fit: cover;
}

.order-line-card__thumb-canvas .backend-order-line__preview-fallback,
.order-line-card__thumb-canvas .order-line-card__thumb-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.order-line-card:hover {
  border-color: rgba(62, 224, 255, 0.28);
  background: rgba(19, 27, 38, 0.96);
}

.order-line-card__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.45rem;
}

.order-line-card__id {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.order-line-card__bahan {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.order-line-card__qty-inline {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 200, 255, 0.22);
  background: rgba(62, 224, 255, 0.08);
}

.order-line-card__spec {
  margin: 0.28rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.order-line-card__file {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-line-card__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  text-align: right;
}

.order-line-card__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.24rem;
}

.order-line-card__line-total {
  font-size: 0.96rem;
  font-weight: 700;
}

/* Tautan detail sebagai pill (selaras badge status) */
.order-line-card__detail-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 0.24rem 0.75rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--accent);
  background: rgba(62, 224, 255, 0.08);
  border: 1px solid rgba(62, 224, 255, 0.38);
  line-height: 1.25;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.order-line-card__detail-badge:hover {
  color: #7aebff;
  background: rgba(62, 224, 255, 0.14);
  border-color: rgba(62, 224, 255, 0.55);
  box-shadow: 0 0 14px rgba(62, 224, 255, 0.12);
}

.order-line-card__detail-badge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.order-line-card__actions .status-badge--compact {
  width: auto;
  max-width: none;
  text-align: center;
  margin: 0;
}

.orders-pagination {
  margin-top: 1rem;
  margin-bottom: 0.85rem;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.orders-pagination__link,
.orders-pagination__nav,
.orders-pagination__ellipsis {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(120, 200, 255, 0.2);
  background: rgba(19, 27, 38, 0.92);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.orders-pagination__link:hover,
.orders-pagination__nav:hover {
  color: var(--text);
  border-color: rgba(62, 224, 255, 0.4);
  text-decoration: none;
}

.orders-pagination__link.is-active {
  color: #031219;
  border-color: rgba(62, 224, 255, 0.9);
  background: linear-gradient(135deg, var(--accent), #1fb8d4);
}

.orders-pagination__ellipsis {
  border-color: transparent;
  background: transparent;
  min-width: auto;
  padding: 0 0.2rem;
}

.orders-pagination__nav.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

@media (max-width: 560px) {
  .order-nota__header {
    padding: 0.7rem 0.75rem;
  }

  .order-nota__header-aside {
    width: 100%;
    align-items: flex-start;
  }

  .order-nota__lines {
    padding: 0.6rem 0.65rem 0.7rem;
  }

  .order-line-card {
    grid-template-columns: 1fr;
    padding: 0.62rem 0.65rem;
  }

  .order-line-card__thumb {
    justify-content: flex-start;
  }

  .order-line-card__aside {
    align-items: flex-start;
    text-align: left;
    gap: 0.3rem;
  }

  .order-line-card__actions {
    margin-top: 0.1rem;
  }
}

/* Detail satu baris transaksi (order_view.php) — satu kartu ringkas */
.detail-receipt {
  width: 100%;
  max-width: none;
  margin: 0 auto 2rem;
  padding: 1rem 1.1rem 1.05rem;
  background: var(--bg-panel);
  border: 1px solid rgba(120, 200, 255, 0.12);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}

.detail-receipt__back {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
}

.detail-receipt__back:hover {
  color: var(--accent);
}

.detail-receipt__head {
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(62, 224, 255, 0.07), transparent 55%);
  margin-left: -1.1rem;
  margin-right: -1.1rem;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
  padding-top: 0.15rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.detail-receipt__eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-receipt__nobukti {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1.2;
  word-break: break-all;
}

.detail-receipt__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  font-size: 0.78rem;
}

.detail-receipt__body {
  padding-top: 0.15rem;
}

.detail-receipt__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(0.95rem, 2.4vw, 1.35rem);
  align-items: start;
}

.detail-receipt__col-title {
  margin: 0 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-receipt__filename-top {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  word-break: break-word;
  color: var(--text);
}

.detail-receipt__section-label {
  margin: 0.85rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-receipt__section-label:first-of-type {
  margin-top: 0;
}

.detail-kv {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-kv__row {
  display: grid;
  grid-template-columns: minmax(5.5rem, 32%) 1fr;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  padding: 0.38rem 0;
  font-size: 0.8rem;
  line-height: 1.4;
  border-bottom: 1px solid rgba(120, 200, 255, 0.06);
}

.detail-kv__row:last-child {
  border-bottom: none;
}

.detail-kv__row--stack {
  grid-template-columns: 1fr;
  gap: 0.2rem;
}

.detail-kv__row--stack .detail-kv__k {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-kv__row--wide {
  grid-template-columns: 1fr;
  gap: 0.2rem;
}

.detail-kv__row--wide .detail-kv__v {
  text-align: left;
  font-size: 0.76rem;
}

.detail-kv__k {
  color: var(--muted);
  font-weight: 500;
}

.detail-kv__v {
  text-align: right;
  min-width: 0;
}

.detail-kv__row--stack .detail-kv__v,
.detail-kv__row--stack .detail-kv__code {
  text-align: left;
}

.detail-kv__note {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text);
}

.detail-kv__filename {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.detail-kv__row--stack .detail-kv__filename {
  text-align: left;
}

.detail-kv__code {
  display: block;
  font-size: 0.7rem;
  word-break: break-all;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.detail-kv--prices .detail-kv__row {
  padding: 0.3rem 0;
  font-size: 0.78rem;
}

.detail-receipt__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(62, 224, 255, 0.06);
  border: 1px solid rgba(62, 224, 255, 0.15);
  font-size: 0.82rem;
  font-weight: 600;
}

.detail-receipt__total .price {
  font-size: 1.05rem;
}

.detail-receipt__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.detail-receipt__missing {
  font-size: 0.8rem;
}

.detail-receipt__preview {
  align-self: start;
}

.detail-receipt__viewer-shell {
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: linear-gradient(
    145deg,
    rgba(62, 224, 255, 0.18) 0%,
    rgba(62, 224, 255, 0.06) 50%,
    rgba(62, 224, 255, 0.14) 100%
  );
  overflow: hidden;
  max-width: 100%;
}

.detail-receipt__viewer {
  height: clamp(280px, 56vh, 620px);
  min-height: 240px;
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-sm) - 2px);
  background: #0a1018;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.detail-receipt__viewer canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
}
.detail-receipt__viewer canvas:active {
  cursor: grabbing;
}

.detail-receipt__viewer-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.detail-receipt__viewer-error:empty {
  display: none;
}

.detail-receipt__viewer-error {
  margin-top: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(220, 38, 38, 0.12);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.35);
  font-size: 0.8rem;
  white-space: pre-wrap;
}

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

@media (max-width: 480px) {
  .detail-kv__row:not(.detail-kv__row--stack) {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .detail-kv__v {
    text-align: left;
  }
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

/* Hemat % (subtotal/total: sesudah vs sebelum diskon jasa) */
.price-savings-pct {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #7ae9b5;
  letter-spacing: 0.02em;
  text-align: right;
}

.price-compare-sep {
  opacity: 0.55;
  margin: 0 0.2rem;
  font-weight: 500;
  font-size: 0.85em;
}

.price--before-disc {
  text-decoration: line-through;
  opacity: 0.72;
  font-weight: 600;
}

.price--after-disc {
  font-weight: 800;
}

.qty-price-tier-preview .price-compare-sep {
  opacity: 0.55;
  font-weight: 500;
  font-size: 0.85em;
  margin: 0 0.12rem;
}

.qty-tier-preview__before {
  text-decoration: line-through;
  opacity: 0.72;
  font-weight: 600;
}

.qty-tier-preview__dot {
  opacity: 0.45;
  margin: 0 0.1rem;
}

.qty-tier-preview__hemat {
  font-size: 0.72rem;
  font-weight: 700;
  color: #7ae9b5;
  white-space: nowrap;
}

/* —— Katalog produk (pelanggan) —— */
.catalog-page {
  padding-bottom: 2.5rem;
}

.catalog-page__head {
  margin-bottom: 1.25rem;
}

.catalog-page__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  letter-spacing: -0.02em;
}

.catalog-page__lead {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
}

.catalog-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.catalog-layout--no-sidebar .catalog-layout__main {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.catalog-sidebar {
  flex: 0 0 13.5rem;
  width: 13.5rem;
  max-width: 100%;
  position: sticky;
  top: 1rem;
  padding: 1rem 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
}

.catalog-sidebar__title {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.catalog-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.catalog-sidebar__link {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.catalog-sidebar__link:hover {
  background: var(--bg-elevated);
  color: var(--accent);
}

.catalog-sidebar__link.is-active {
  background: rgba(62, 224, 255, 0.1);
  border-color: rgba(62, 224, 255, 0.35);
  color: var(--accent);
  font-weight: 600;
}

.catalog-layout__main {
  flex: 1;
  min-width: 0;
}

.catalog-filter {
  --catalog-filter-height: 2.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.catalog-filter--with-category {
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem) auto;
}

.catalog-filter__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.catalog-filter input,
.catalog-filter select {
  width: 100%;
  height: var(--catalog-filter-height);
  min-height: var(--catalog-filter-height);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  line-height: 1.2;
  outline: none;
  color-scheme: dark;
  box-sizing: border-box;
}

.catalog-filter select {
  appearance: auto;
}

.catalog-filter input:focus,
.catalog-filter select:focus {
  border-color: rgba(62, 224, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(62, 224, 255, 0.08);
}

.catalog-filter__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.catalog-filter__actions .btn {
  height: var(--catalog-filter-height);
  min-height: var(--catalog-filter-height);
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .catalog-layout {
    flex-direction: column;
    gap: 1rem;
  }

  .catalog-sidebar {
    position: static;
    width: 100%;
    flex: none;
  }

  .catalog-sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .catalog-sidebar__link {
    padding: 0.4rem 0.65rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 760px) {
  .catalog-filter {
    grid-template-columns: 1fr;
  }

  .catalog-filter__actions {
    align-items: stretch;
  }

  .catalog-filter__actions .btn {
    justify-content: center;
  }
}

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

.catalog-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.catalog-card:hover {
  transform: translateY(-3px);
  border-color: rgba(62, 224, 255, 0.35);
}

.catalog-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--bg-elevated);
  overflow: hidden;
}

.catalog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.catalog-card__body {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.catalog-card__cat {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.catalog-card__title {
  margin: 0;
  font-size: 1rem;
  font-family: var(--font-display);
  line-height: 1.3;
}

.catalog-card__title a {
  color: var(--text);
  text-decoration: none;
}

.catalog-card__title a:hover {
  color: var(--accent);
}

.catalog-card__sku {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.search-page__head {
  margin-bottom: 1.25rem;
}

.search-page__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.search-page__lead {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
  line-height: 1.55;
}

.search-page__form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.search-page__field {
  flex: 1 1 16rem;
  min-width: 0;
}

.search-page__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.search-page__field input[type="search"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(120, 200, 255, 0.18);
  background: rgba(7, 12, 18, 0.55);
  color: var(--text);
  font-size: 0.95rem;
}

.search-page__field input[type="search"]:focus {
  outline: none;
  border-color: rgba(62, 224, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(62, 224, 255, 0.1);
}

.search-page__meta {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.search-page__group {
  margin-bottom: 2rem;
}

.search-page__group-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.search-card__media--icon .search-card__placeholder {
  background: linear-gradient(145deg, rgba(62, 224, 255, 0.12), rgba(62, 224, 255, 0.03));
}

.search-card__placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.search-card--channel .search-card__placeholder {
  background: linear-gradient(145deg, rgba(201, 162, 39, 0.14), rgba(62, 224, 255, 0.05));
  color: var(--gold, #c9a227);
}

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

.catalog-breadcrumb {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.catalog-breadcrumb__sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}

.catalog-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.75rem;
  align-items: start;
}

.catalog-detail__gallery {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

@media (max-width: 900px) {
  .catalog-detail__grid {
    grid-template-columns: 1fr;
  }
}

.catalog-detail__hero {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-detail__hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0a0e14;
}

.catalog-detail__hero--empty {
  color: var(--muted);
  font-size: 0.95rem;
}

.catalog-detail__thumbs {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}

.catalog-detail__thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  width: 4.25rem;
  height: 4.25rem;
  cursor: pointer;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.catalog-detail__thumb:hover,
.catalog-detail__thumb:focus-visible {
  border-color: rgba(62, 224, 255, 0.55);
  outline: none;
}

.catalog-detail__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(62, 224, 255, 0.35);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.catalog-detail__head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.45rem;
}

.catalog-detail__head-row .catalog-pill {
  margin-bottom: 0;
}

.catalog-detail__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  letter-spacing: -0.02em;
}

.catalog-detail__sku {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.catalog-detail__desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  opacity: 0.95;
}

.catalog-detail__desc--under-media {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.catalog-detail__back {
  margin: 0 0 0 auto;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.catalog-detail__back a {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.catalog-detail__back a:hover {
  text-decoration: underline;
}

.catalog-order-alert {
  margin: 0.75rem 0 1rem;
}

.catalog-order-panel {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.catalog-order-panel .card-title {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.catalog-order-panel__file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.catalog-order-panel__viewer {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

#dxf-viewer {
  width: 1px;
  height: 1px;
}

#dxf-viewer.is-dxf-loading {
  position: relative;
}

#dxf-viewer.is-dxf-loading canvas,
#dxf-viewer.is-dxf-loading .dxf-vector-viewer-host {
  opacity: 0.22;
}

.dxf-preview-loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1.25rem;
  text-align: center;
  color: #dff8ff;
  background:
    radial-gradient(circle at 50% 38%, rgba(62, 224, 255, 0.18), transparent 34%),
    rgba(7, 13, 22, 0.82);
  backdrop-filter: blur(2px);
  border-radius: inherit;
}

.dxf-preview-loading__spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 3px solid rgba(62, 224, 255, 0.2);
  border-top-color: #3ee0ff;
  box-shadow: 0 0 22px rgba(62, 224, 255, 0.28);
  animation: dxf-preview-spin 0.8s linear infinite;
}

.dxf-preview-loading__text {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.dxf-preview-loading__hint {
  max-width: 24rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

@keyframes dxf-preview-spin {
  to {
    transform: rotate(360deg);
  }
}

#dxf-error:empty {
  display: none;
}

#dxf-error {
  margin: 0 0 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(220, 38, 38, 0.12);
  color: #fecaca;
  font-size: 0.85rem;
  white-space: pre-wrap;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.geometry-summary-card {
  position: relative;
  margin: 0 0 1rem;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(62, 224, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(62, 224, 255, 0.11), rgba(62, 224, 255, 0.035) 48%, rgba(15, 23, 42, 0.55)),
    var(--bg-elevated);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.geometry-summary-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 0%, rgba(62, 224, 255, 0.15), transparent 42%);
}

.geometry-summary-card > * {
  position: relative;
  z-index: 1;
}

.dxf-komponen-panel {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.8rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(62, 224, 255, 0.2);
  background:
    linear-gradient(160deg, rgba(62, 224, 255, 0.1), rgba(62, 224, 255, 0.02) 55%, rgba(15, 23, 42, 0.4)),
    rgba(15, 23, 42, 0.35);
}

.dxf-komponen-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(62, 224, 255, 0.14);
}

.dxf-komponen-panel__total {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  line-height: 1;
}

.dxf-komponen-panel__total-value {
  font-size: 1.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  letter-spacing: -0.02em;
}

.dxf-komponen-panel__total-unit {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(62, 224, 255, 0.95);
  text-transform: lowercase;
}

.dxf-komponen-panel__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  min-width: 0;
}

.dxf-komponen-panel__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
  background: rgba(62, 224, 255, 0.92);
}

.dxf-komponen-panel__hint {
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: right;
  max-width: 14rem;
}

.dxf-komponen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.75rem, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dxf-komponen-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.5rem 0.55rem 0.45rem;
  border-radius: calc(var(--radius-sm) - 2px);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.dxf-komponen-card:hover {
  border-color: rgba(62, 224, 255, 0.45);
  background: rgba(15, 23, 42, 0.72);
}

.dxf-komponen-card.is-highlight-active {
  border-color: rgba(62, 224, 255, 0.85);
  background: rgba(62, 224, 255, 0.12);
  box-shadow: 0 0 12px rgba(62, 224, 255, 0.25), inset 0 0 0 1px rgba(62, 224, 255, 0.18);
}

.dxf-komponen-card.is-highlight-active .dxf-komponen-card__label {
  color: #3ee0ff;
}

.dxf-komponen-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.dxf-komponen-card__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(62, 224, 255, 0.9);
}

.dxf-komponen-card__qty {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1;
}

.dxf-komponen-card__qty-unit {
  margin-left: 1px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.dxf-komponen-card__size {
  font-size: 0.68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.25;
}

.dxf-komponen-card__holes {
  font-size: 0.62rem;
  color: var(--muted);
}

.dxf-komponen-card__bar {
  margin-top: 0.15rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.dxf-komponen-card__bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(62, 224, 255, 0.55), rgba(62, 224, 255, 0.95));
}

.dxf-komponen-card__pct {
  font-size: 0.58rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
  .dxf-komponen-panel__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .dxf-komponen-panel__meta {
    align-items: flex-start;
  }

  .dxf-komponen-panel__hint {
    text-align: left;
    max-width: none;
  }

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

.dxf-stats-heading {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dxf-stats-placeholder {
  font-size: 0.85rem;
  color: var(--muted);
}

.dxf-stats-scroll {
  overflow-x: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  max-width: 100%;
  min-width: 0;
}

.dxf-report-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.dxf-report-table th,
.dxf-report-table td {
  padding: 0.4rem 0.3rem;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.dxf-report-table thead th {
  background: rgba(62, 224, 255, 0.08);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  font-size: 0.62rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: normal;
  vertical-align: bottom;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.dxf-report-table tbody tr:last-child td {
  border-bottom: none;
}

.dxf-report-table tbody td {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.dxf-plate-stats__intro {
  margin: -0.15rem 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.dxf-plate-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dxf-plate-stats__item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(62, 224, 255, 0.18);
  background:
    linear-gradient(160deg, rgba(62, 224, 255, 0.1), rgba(62, 224, 255, 0.02) 55%, rgba(15, 23, 42, 0.35)),
    rgba(15, 23, 42, 0.35);
}

.dxf-plate-stats__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(62, 224, 255, 0.92);
  line-height: 1.35;
}

.dxf-plate-stats__value {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

.dxf-plate-stats__unit {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.dxf-plate-stats__hint {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 520px) {
  .dxf-plate-stats {
    grid-template-columns: 1fr;
  }
}

.catalog-order-panel__fields {
  grid-template-columns: 1fr;
  gap: 0;
}

.catalog-order-panel .form-group {
  margin-bottom: 0.85rem;
}

.bahan-detail-panel {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(62, 224, 255, 0.04);
}

.bahan-detail-panel .row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: baseline;
  font-size: 0.9rem;
}

.bahan-detail-panel .row + .row {
  margin-top: 0.45rem;
}

.bahan-detail-panel strong {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#beratjenis_value {
  font-variant-numeric: tabular-nums;
}

.order-detail-panel.is-locked {
  opacity: 0.64;
}

.form-group--after-panel {
  margin-top: 0.95rem;
}

.catalog-order-panel textarea {
  min-height: 78px;
}

.catalog-order-panel .btn-submit-order {
  width: 100%;
  justify-content: center;
}

.catalog-order-panel__empty {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.min-pricing-note {
  margin-top: 0.55rem;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 208, 79, 0.35);
  background: rgba(255, 208, 79, 0.08);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text);
}

.min-pricing-note[hidden] {
  display: none !important;
}

.min-pricing-note__title {
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--warning);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.min-pricing-note table {
  width: 100%;
  border-collapse: collapse;
}

.min-pricing-note th,
.min-pricing-note td {
  padding: 0.22rem 0;
  text-align: left;
  border-bottom: 1px solid rgba(255, 208, 79, 0.18);
}

.min-pricing-note tr:last-child td {
  border-bottom: none;
}

.qty-price-tier-preview {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.qty-price-tier-preview[hidden] {
  display: none !important;
}

.dxf-dimension-modal[hidden] {
  display: none !important;
}

.dxf-dimension-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.dxf-dimension-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
}

.dxf-dimension-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 42rem);
  max-width: 42rem;
  height: min(88vh, 820px);
  max-height: min(88vh, 820px);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dxf-dimension-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.1rem;
}

.dxf-dimension-modal__title,
.dxf-dimension-modal__text {
  flex-shrink: 0;
}

.dxf-dimension-modal__panel > .btn,
.dxf-dimension-modal__panel > button[type="button"] {
  flex-shrink: 0;
  margin-top: 0.85rem;
}

@media (max-width: 640px) {
  .dxf-dimension-modal {
    padding: max(0.5rem, 1.5vh);
  }

  .dxf-dimension-modal__panel {
    height: min(92vh, 820px);
    max-height: min(92vh, 820px);
    padding: 1rem;
  }
}

.dxf-dimension-modal__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
}

.dxf-dimension-modal__text {
  margin: 0 0 1rem;
  color: var(--muted);
}

.dxf-dimension-modal__preview {
  margin: 0 0 1rem;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(62, 224, 255, 0.18);
  background: #f8fafc;
}

.dxf-dimension-modal__preview-label {
  margin: 0 0 0.45rem;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dxf-dimension-modal__preview-marker-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.5rem;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.dxf-dimension-modal__preview-marker-toggle input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #ef4444;
  cursor: pointer;
}

.dxf-dimension-modal__preview-marker-toggle[hidden] {
  display: none !important;
}

.dxf-preview--hide-bad-markers .dxf-preview-bad-markers {
  display: none;
}

.dxf-dimension-modal__preview-zoom {
  position: relative;
  display: block;
  cursor: zoom-in;
  border-radius: 8px;
  outline: none;
  height: clamp(140px, 20vh, 200px);
}

.dxf-dimension-modal__preview-zoom:hover .dxf-dimension-modal__preview-viewer,
.dxf-dimension-modal__preview-zoom:focus-visible .dxf-dimension-modal__preview-viewer,
.dxf-dimension-modal__preview-zoom:hover svg,
.dxf-dimension-modal__preview-zoom:focus-visible svg {
  box-shadow: 0 0 0 2px rgba(62, 224, 255, 0.45);
}

.dxf-dimension-modal__preview-zoom-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.dxf-dimension-modal__preview-viewer {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.dxf-dimension-modal__preview-viewer .dxf-vector-viewer-host,
.dxf-dimension-modal__preview-viewer .dxf-vector-viewer-host canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.dxf-dimension-modal__preview svg {
  display: block;
  width: 100%;
  height: clamp(140px, 20vh, 200px);
  min-height: 140px;
  max-height: 200px;
  border-radius: 8px;
  background: #ffffff;
}

.dxf-dimension-modal__preview path {
  fill: none;
  stroke: #111827;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Lightbox preview besar (zoom / pan) */
body.dxf-preview-lightbox-open {
  overflow: hidden;
}

.dxf-preview-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.dxf-preview-lightbox[hidden] {
  display: none !important;
}

.dxf-preview-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
}

.dxf-preview-lightbox__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(96vw, 1100px);
  max-height: min(92vh, 900px);
  padding: 1rem 1.1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(62, 224, 255, 0.22);
  background: #0f172a;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.dxf-preview-lightbox__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.dxf-preview-lightbox__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.dxf-preview-lightbox__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.dxf-preview-lightbox__marker-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.15rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.dxf-preview-lightbox__marker-toggle input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: #ef4444;
  cursor: pointer;
}

.dxf-preview-lightbox__marker-toggle[hidden] {
  display: none !important;
}

.dxf-preview-lightbox__btn {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.dxf-preview-lightbox__btn:hover {
  background: rgba(62, 224, 255, 0.15);
  border-color: rgba(62, 224, 255, 0.45);
}

.dxf-preview-lightbox__btn--close {
  font-size: 0.95rem;
}

.dxf-preview-lightbox__hint {
  margin: 0 0 0.65rem;
  color: #94a3b8;
  font-size: 0.78rem;
}

.dxf-preview-lightbox__viewport {
  flex: 1;
  min-height: min(70vh, 640px);
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #ffffff;
  position: relative;
}

.dxf-preview-lightbox__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dxf-preview-lightbox__canvas .dxf-vector-viewer-host,
.dxf-preview-lightbox__canvas .dxf-vector-viewer-host canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.dxf-preview-lightbox__svg {
  display: block;
  width: 100%;
  height: 100%;
  background: #ffffff;
}

.dxf-preview-lightbox__svg path {
  fill: none;
  stroke: #111827;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dxf-dimension-modal__guide {
  margin: 0 0 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dxf-dimension-modal__diagram {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.9rem;
}

.dxf-guide-side {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.dxf-guide-shapes {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 86px;
}

.dxf-guide-circle,
.dxf-guide-square {
  width: 58px;
  height: 58px;
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, 0.06);
}

.dxf-guide-circle {
  border-radius: 50%;
}

.dxf-guide-square {
  border-radius: 10px;
}

.dxf-guide-open .dxf-guide-circle {
  border-right-color: transparent;
}

.dxf-guide-open .dxf-guide-square {
  border-top-color: transparent;
}

.dxf-guide-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
  background: var(--bg-elevated);
  border: 2px solid currentColor;
}

.dxf-guide-open {
  color: #ff6b6b;
}

.dxf-guide-dimension-bad {
  color: #ff9f43;
}

.dxf-dimension-modal__guide--dimensi-img {
  margin: 0 0 1rem;
  padding: 0;
  border: none;
  background: transparent;
}

.dxf-dimension-modal__guide--dimensi-img .dxf-dimension-guide-img {
  display: block;
  width: 100%;
  max-height: min(26vh, 220px);
  height: auto;
  object-fit: contain;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
}

.dxf-dimension-modal__guide--dimensi-img .dxf-dimension-modal__fix {
  margin-top: 0.75rem;
}

.dxf-guide-multi-part-bad {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.15rem;
}

.dxf-guide-multi-part-bad .dxf-guide-square {
  width: 28px;
  height: 28px;
}

.dxf-guide-closed {
  color: #69db7c;
}

.dxf-guide-arrow {
  color: var(--muted);
  font-size: 1.6rem;
}

.dxf-dimension-modal__fix {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(250, 204, 21, 0.25);
  background: rgba(250, 204, 21, 0.08);
  color: #fde68a;
  font-size: 0.86rem;
  line-height: 1.45;
}

.dxf-dimension-modal__fix strong {
  color: #fff3b0;
}

.dxf-guide-dim-box {
  position: relative;
  width: 68px;
  height: 58px;
  margin-bottom: 22px;
  border: 2px solid currentColor;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.dxf-guide-measure-line {
  position: absolute;
  left: -9px;
  right: -9px;
  bottom: -13px;
  height: 1px;
  background: currentColor;
}

.dxf-guide-measure-line::before,
.dxf-guide-measure-line::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 1px;
  height: 11px;
  background: currentColor;
}

.dxf-guide-measure-line::before {
  left: 0;
}

.dxf-guide-measure-line::after {
  right: 0;
}

.dxf-guide-measure-text {
  position: absolute;
  left: 50%;
  bottom: -24px;
  transform: translateX(-50%);
  min-width: 52px;
  color: currentColor;
  font-size: 0.6rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .dxf-dimension-modal__diagram {
    grid-template-columns: 1fr;
  }

  .dxf-guide-arrow {
    transform: rotate(90deg);
  }
}

/* ── Home Banner (Carousel + Side Cards) ── */
.home-banner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

@media (max-width: 960px) {
  .home-banner {
    grid-template-columns: 1fr;
  }
}

.home-banner__carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 2 / 1;
  min-height: 240px;
}

.home-carousel__track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.home-carousel__slide {
  min-width: 100%;
  position: relative;
  overflow: hidden;
}

.home-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-carousel__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.08) 100%);
}

.home-carousel__overlay .badge {
  width: fit-content;
  margin-bottom: 0.5rem;
}

.home-carousel__overlay h2 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  margin: 0 0 0.3rem;
  color: #fff;
  line-height: 1.2;
}

.home-carousel__overlay p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  margin: 0 0 0.9rem;
  max-width: 460px;
}

.home-carousel__overlay .btn {
  width: fit-content;
}

.home-carousel__dots {
  position: absolute;
  bottom: 12px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.home-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.home-carousel__dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
}

.home-carousel__dot:hover {
  border-color: #fff;
}

.home-banner__side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (max-width: 960px) {
  .home-banner__side {
    flex-direction: row;
  }
}

@media (max-width: 560px) {
  .home-banner__side {
    flex-direction: column;
  }
}

.home-banner__card {
  flex: 1;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  display: block;
}

.home-banner__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.home-banner__card:hover img {
  transform: scale(1.06);
}

.home-banner__card-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.9rem 1rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
}

.home-banner__card-text h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
}

.home-banner__card-text p {
  font-size: 0.75rem;
  margin: 0;
  opacity: 0.8;
  line-height: 1.35;
}

/* ── Home Order Grid ── */
.home-order-section {
  margin-top: 0;
}

.home-order-section__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
}

.home-order-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 960px) {
  .home-order-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.home-order-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.home-order-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(62, 224, 255, 0.12), 0 4px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(-3px);
}

.home-order-card__icon {
  width: 80px;
  height: 80px;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.home-order-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-order-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.home-order-card__desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

/* —— Mobile layout hardening —— */
@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell,
  .app-content,
  .main {
    width: 100%;
    min-width: 0;
  }

  .main {
    padding: 1rem 0 max(4.5rem, env(safe-area-inset-bottom) + 3rem);
  }

  .app-content > .main > .container,
  .app-content > .site-footer > .container,
  .container {
    width: 100%;
    max-width: 100%;
    padding-left: clamp(0.9rem, 4vw, 1.25rem);
    padding-right: clamp(0.9rem, 4vw, 1.25rem);
  }

  .home-banner,
  .home-banner__side,
  .home-order-grid {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .home-banner {
    gap: 0.65rem;
    margin-bottom: 1.6rem;
  }

  .home-banner__carousel {
    aspect-ratio: auto;
    min-height: 0;
    height: clamp(13.25rem, 58vw, 17rem);
    border-radius: 12px;
  }

  .home-carousel__overlay {
    padding: 1rem;
  }

  .home-carousel__overlay .badge {
    margin-bottom: 0.42rem;
    max-width: 100%;
  }

  .home-carousel__overlay h2 {
    font-size: clamp(1.08rem, 6vw, 1.45rem);
    line-height: 1.12;
  }

  .home-carousel__overlay p {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
  }

  .home-carousel__overlay .btn {
    min-height: 2.45rem;
    padding: 0.65rem 1rem;
  }

  .home-carousel__dots {
    right: 0.75rem;
    bottom: 0.7rem;
  }

  .home-banner__card {
    min-height: 9.75rem;
    border-radius: 12px;
  }

  .home-banner__card img {
    min-height: 9.75rem;
  }

  .home-banner__card-text {
    padding: 0.85rem;
  }

  .home-order-section__title {
    font-size: 1.22rem;
  }

  .home-order-grid {
    gap: 0.75rem;
  }

  .home-order-card {
    padding: 1.15rem 0.95rem 1rem;
    border-radius: 12px;
  }

  .home-order-card__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 0.55rem;
  }
}

@media (max-width: 420px) {
  .app-topbar {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .home-carousel__overlay p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .home-banner__card {
    min-height: 9.25rem;
  }

  .home-banner__card img {
    min-height: 9.25rem;
  }
}

body:not(.is-staff-sim) .price-detail-row {
  display: none !important;
}
