:root {
  --red: #D92B2B;
  --red-light: #E53935;
  --red-dark: #B71C1C;
  --green: #16a34a;
  --amber: #d97706;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Navbar (tetap gelap) */
  --nav-bg: #0D0D0D;
  --nav-surface: #1C1C1C;
  --nav-border: rgba(255,255,255,0.08);
  --nav-text: #F3F4F6;
  --nav-muted: #9CA3AF;

  /* Konten (putih & bersih) */
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --surface2: #F9FAFB;
  --border: #E5E7EB;
  --text: #111827;
  --muted: #6B7280;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── NAVBAR ── */
.r-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,13,13,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  padding: 0 32px;
  display: flex; align-items: center; gap: 20px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img {
  height: 70px;
  width: auto;
  display: block;
  object-fit: contain;
}

.search-bar {
  flex: 1;
  position: relative;
  max-width: 520px;
}
.search-bar input {
  width: 100%;
  background: var(--nav-surface);
  border: 1px solid var(--nav-border);
  border-radius: 10px;
  padding: 10px 16px 10px 42px;
  color: var(--nav-text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.search-bar input::placeholder { color: var(--nav-muted); }
.search-bar input:focus {
  border-color: var(--red);
  background: #252525;
}
.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--nav-muted);
  pointer-events: none;
}

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.btn-ghost {
  background: none;
  border: 1px solid var(--nav-border);
  color: var(--nav-text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-decoration: none;
  display: inline-flex; align-items: center;
}
.btn-ghost:hover { border-color: var(--red); color: #fff; }

.nav-profile { position: relative; }

.nav-profile-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s;
  max-width: 280px;
}
.nav-profile-toggle:hover,
.nav-profile.open .nav-profile-toggle {
  background: rgba(255, 255, 255, 0.06);
}

.nav-profile-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  min-width: 0;
  gap: 2px;
}
.nav-profile-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--nav-text);
  line-height: 1.25;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-profile-email {
  font-size: 12px;
  font-weight: 400;
  color: var(--nav-muted);
  line-height: 1.25;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--nav-border);
  background: #fff;
  padding: 4px;
  object-fit: contain;
  flex-shrink: 0;
}
.nav-profile-avatar.is-photo {
  padding: 0;
  object-fit: cover;
}

.nav-profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  background: #1A1A1A;
  border: 1px solid var(--nav-border);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  z-index: 200;
}
.nav-profile-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--nav-text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-profile-item:hover {
  background: var(--nav-surface);
  color: #fff;
}
.nav-profile-item--danger { color: #FCA5A5; }
.nav-profile-item--danger:hover {
  background: rgba(217, 43, 43, 0.15);
  color: #FECACA;
}
.nav-profile-logout {
  margin: 4px 0 0;
  padding-top: 4px;
  border-top: 1px solid var(--nav-border);
}

.cart-btn {
  position: relative;
  background: var(--nav-surface);
  border: 1px solid var(--nav-border);
  color: var(--nav-text);
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: border-color 0.2s;
  text-decoration: none;
}
.cart-btn:hover { border-color: var(--red); }
.cart-count {
  position: absolute; top: -5px; right: -5px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 50%;
  display: grid; place-items: center;
}

/* ── LIKES (suka) ── */
.nav-likes { position: relative; }
.like-nav-btn {
  position: relative;
  background: var(--nav-surface);
  border: 1px solid var(--nav-border);
  color: var(--nav-text);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  font-family: var(--font);
}
.like-nav-btn:hover,
.nav-likes.open .like-nav-btn {
  border-color: #F87171;
  color: #FCA5A5;
  background: rgba(217, 43, 43, 0.12);
}
.like-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.likes-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(400px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  z-index: 220;
  overflow: hidden;
}
.likes-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.likes-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.likes-panel-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
}
.likes-panel-all:hover { color: var(--red-dark); }
.likes-list {
  max-height: 360px;
  overflow-y: auto;
}
.likes-empty {
  padding: 36px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.likes-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #F3F4F6;
}
.likes-item:last-child { border-bottom: none; }
.likes-item-main {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.likes-item-main:hover .likes-item-name { color: var(--red); }
.likes-item-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.likes-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.likes-item-thumb svg { opacity: 0.25; stroke: #9CA3AF; }
.likes-item-body { min-width: 0; }
.likes-item-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.likes-item-price {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  margin-top: 2px;
}
.likes-item-cart { margin: 0; }
.likes-item-add {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s;
}
.likes-item-add:hover { background: var(--red-light); }
.likes-item-oos {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 4px;
}
.likes-item-unlike {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: #9CA3AF;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.likes-item-unlike:hover,
.likes-item-unlike.liked {
  border-color: #FECACA;
  background: #FEF2F2;
  color: var(--red);
}

.card-img-wrap {
  position: relative;
  margin-bottom: 12px;
}
.like-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #9CA3AF;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(6px);
}
.like-btn:hover { transform: scale(1.06); color: var(--red); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1); }
.like-btn.liked {
  color: var(--red);
  background: #FEF2F2;
  box-shadow: 0 2px 10px rgba(226, 75, 74, 0.15);
}
.like-btn svg { pointer-events: none; }
.like-btn--detail {
  position: static;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
/* Baris aksi kartu katalog: tombol keranjang + like sejajar */
.card-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
  width: 100%;
}
.card-actions > .add-btn {
  flex: 1;
  min-width: 0;
}
.card-actions form:has(.add-btn) {
  flex: 1;
  min-width: 0;
  display: flex;
}
.card-actions form.portal-bundle-delete-form,
.card-actions form:not(:has(.add-btn)) {
  flex: 0 0 auto;
}
.card-actions .add-btn {
  width: 100%;
  margin-top: 0;
  height: 100%;
}
.like-btn--inline {
  position: static;
  width: 42px;
  height: auto;
  min-height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  backdrop-filter: none;
  box-shadow: none;
}
.like-btn--inline:hover {
  transform: none;
  background: #FEF2F2;
  border-color: #FECACA;
  box-shadow: none;
}
.like-btn--inline.liked {
  border-color: #FECACA;
}
a.like-btn.like-btn--inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #9CA3AF;
}
a.like-btn.like-btn--inline:hover {
  color: var(--red);
}
.product-tags-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.product-tags-row .product-tags { margin-bottom: 0; }

.likes-page {
  width: 100%;
  min-height: calc(100vh - 105px);
  background: var(--surface);
  padding: 28px 32px;
}
.likes-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.nav-notif { position: relative; }
.notif-btn {
  position: relative;
  background: var(--nav-surface);
  border: 1px solid var(--nav-border);
  color: var(--nav-text);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-family: var(--font);
}
.notif-btn:hover { border-color: var(--red); background: #252525; }
.notif-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(380px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  z-index: 220;
  overflow: hidden;
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.notif-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.notif-mark-all {
  border: none;
  background: none;
  color: var(--red);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.notif-mark-all:hover { color: var(--red-dark); }
.notif-list {
  max-height: 320px;
  overflow-y: auto;
}
.notif-empty {
  padding: 36px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.notif-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px 16px;
  border-bottom: 1px solid #F3F4F6;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface2); }
.notif-item.unread { background: #FEF2F2; }
.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.notif-item-icon.ok { background: #DCFCE7; color: #15803D; }
.notif-item-icon.danger { background: #FEE2E2; color: #B91C1C; }
.notif-item-icon.info { background: #DBEAFE; color: #1D4ED8; }
.notif-item-body { min-width: 0; }
.notif-item-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.notif-item-msg {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-time {
  display: block;
  font-size: 11px;
  color: #9CA3AF;
  margin-top: 4px;
}
.notif-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ── SUBNAV ── */
.subnav {
  position: relative;
  z-index: 50;
  background: #141414;
  border-bottom: 1px solid var(--nav-border);
  padding: 0 32px;
  display: flex; gap: 0;
}
.subnav a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 16px;
  color: var(--nav-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.subnav a.active { color: #fff; border-color: var(--red); }
.subnav a:hover { color: var(--nav-text); }

/* ── ALERTS ── */
.alert-banner {
  margin: 16px 32px 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid;
}
.alert-banner a { color: inherit; font-weight: 600; }
.alert-danger {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #B91C1C;
}
.alert-success {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #15803D;
}
.alert-warning {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #B45309;
}

/* ── LAYOUT ── */
.page {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: calc(100vh - 105px);
  background: var(--surface);
}

.page--single {
  grid-template-columns: 1fr;
}

aside,
.catalog-sidebar {
  background: var(--surface2);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 64px;
  height: calc(100vh - 105px);
  overflow-y: auto;
}

.catalog-sidebar {
  padding: 24px 20px;
}

.filter-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-toggle:hover,
.catalog-sidebar.is-open .filter-toggle {
  border-color: #FECACA;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.filter-toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.filter-toggle-left svg { stroke: var(--red); flex-shrink: 0; }
.filter-toggle-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 20px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}
.filter-toggle-chevron {
  flex-shrink: 0;
  stroke: var(--muted);
  transition: transform 0.25s;
}
.catalog-sidebar.is-open .filter-toggle-chevron { transform: rotate(180deg); }

.filter-panel {
  display: block;
}

.filter-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.filter-group { margin-bottom: 28px; }
.filter-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

.filter-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.2s;
}
.filter-select:focus { border-color: var(--red); }

.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip.active { background: var(--red); border-color: var(--red); color: #fff; }

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

.clear-btn {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
  text-align: center;
}
.clear-btn:hover { border-color: var(--red); color: var(--red); }

.catalog-sidebar-search {
  margin-bottom: 4px;
}

.catalog-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.catalog-search-field:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(226, 75, 74, 0.1);
}

.catalog-search-field svg {
  flex-shrink: 0;
  stroke: var(--muted);
}

.catalog-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  padding: 10px 0;
  outline: none;
}

.catalog-search-input::placeholder {
  color: #9ca3af;
}

.catalog-search-btn {
  width: 100%;
  margin-top: 8px;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.catalog-search-btn:hover {
  background: #d43f3e;
}

.catalog-search-active {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: -8px 0 20px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  color: #64748b;
}

.catalog-search-active strong {
  color: #111827;
  font-weight: 600;
}

.catalog-search-clear {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
}

.catalog-search-clear:hover {
  text-decoration: underline;
}

/* ── MAIN ── */
main.catalog-main { padding: 28px 32px; background: var(--surface); }
.reseller-main { padding: 28px 32px; max-width: 1100px; background: var(--surface); }

.catalog-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap; gap: 12px;
}

.catalog-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.catalog-sub {
  font-size: 13px;
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.catalog-sub span {
  background: #FEF2F2;
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #FECACA;
}

.catalog-meta {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}

.catalog-filters-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .04);
}

.catalog-filters-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.catalog-filters-toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.catalog-filters-toggle-left svg { stroke: var(--red); flex-shrink: 0; }

.catalog-filters-panel {
  display: block;
}

.catalog-filters-form {
  margin-bottom: 16px;
}

.catalog-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  align-items: flex-end;
}

.catalog-filters-row--selects {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.catalog-filter-field {
  flex: 1;
  min-width: 160px;
}

.catalog-filter-field--chips {
  flex: 1 1 280px;
}

.catalog-filters-active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.catalog-active-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 600;
}

.catalog-filters-reset {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}

.catalog-filters-reset:hover {
  color: var(--red);
}

.catalog-filters-card.is-open .filter-toggle-chevron { transform: rotate(180deg); }

@media (min-width: 901px) {
  .catalog-filters-panel {
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    padding-top: 0 !important;
  }
}

.product-count {
  font-size: 13px;
  color: var(--muted);
}
.product-count strong { color: var(--text); font-weight: 600; }

.sort-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  padding: 8px 32px 8px 12px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* ── GRID ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  animation: fadeUp 0.35s ease both;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  padding: 12px;
}
.product-card:hover {
  border-color: #FECACA;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

/* Highlight kartu produk yang sedang promo agar menonjol di katalog */
.product-card--promo {
  position: relative;
  border: 1.5px solid #FCA5A5;
  background: linear-gradient(180deg, #FFF7F7 0%, #fff 55%);
  box-shadow: 0 4px 16px rgba(220, 38, 56, 0.10);
}
.product-card--promo:hover {
  border-color: #F87171;
  box-shadow: 0 12px 30px rgba(220, 38, 56, 0.16);
}
.promo-ribbon {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #EF4444, #DC2626);
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
  animation: promoPulse 2s ease-in-out infinite;
}
@keyframes promoPulse {
  0%, 100% { box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35); }
  50% { box-shadow: 0 3px 16px rgba(220, 38, 38, 0.6); }
}

/* Slider gambar paket bundle */
.bundle-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.bundle-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.bundle-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.card-img.js-bundle-slider,
.pd-modal-media-visual.js-bundle-slider {
  cursor: pointer;
}
.bundle-slider-dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 3;
  display: flex;
  gap: 5px;
  transform: translateX(-50%);
}
.bundle-slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.22);
  transition: background 0.2s ease, transform 0.2s ease;
}
.bundle-slider-dot.is-active {
  background: #dc2626;
  transform: scale(1.15);
}
.bundle-modal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bundle-modal-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
}
.bundle-modal-list li.is-out-of-stock {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.bundle-modal-list__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bundle-modal-list strong {
  font-size: 12.5px;
  color: #1f2937;
}
.bundle-modal-list li.is-out-of-stock strong {
  color: #7f1d1d;
}
.bundle-modal-list span {
  font-size: 11px;
  color: #64748b;
}
.bundle-modal-stock {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.bundle-modal-stock.is-ok {
  background: #ecfdf5;
  color: #047857;
}
.bundle-modal-stock.is-empty {
  background: #fee2e2;
  color: #b91c1c;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-img {
  aspect-ratio: 1 / 1;
  width: 100%;
  background: #fff;
  display: block;
  position: relative;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
button.card-img {
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.card-img svg {
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0.2;
  stroke: #9CA3AF;
}
.brand-tag {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
}

.stock-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.stock-ok { background: #DCFCE7; color: #15803D; border: 1px solid #BBF7D0; }
.stock-low { background: #FEF3C7; color: #B45309; border: 1px solid #FDE68A; }
.stock-crit { background: #FEE2E2; color: #B91C1C; border: 1px solid #FECACA; }

/* Overlay stok habis ala Shopee */
.product-card--habis {
  opacity: 0.96;
}
.product-card--habis:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  border-color: var(--border);
}
.product-card--habis .card-img img {
  opacity: 0.45;
  filter: grayscale(15%);
}
.catalog-habis-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.06);
}
.catalog-habis-badge {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}
.pd-modal-media-visual.is-habis .pd-modal-media-img,
.pd-modal-media-visual.is-habis .pd-modal-media-placeholder {
  opacity: 0.45;
  filter: grayscale(15%);
}
.pd-modal-media-visual.is-habis .catalog-habis-badge {
  width: 96px;
  height: 96px;
  font-size: 15px;
}
.add-btn--habis,
.add-btn--habis:hover {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.card-body { padding: 0 2px 4px; flex: 1; display: flex; flex-direction: column; }

.card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-name:hover { color: var(--red); }

.js-katalog-open { cursor: pointer; }

.card-sku {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}

.card-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.add-btn {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.2s, transform 0.15s;
  margin-top: auto;
  text-decoration: none;
}
.add-btn:hover { background: var(--red-light); transform: scale(1.01); }
.add-btn:active { transform: scale(0.99); }
.add-btn:disabled, .add-btn.disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
}

.blocked-note {
  font-size: 11px;
  color: var(--red);
  text-align: center;
  margin-top: auto;
  padding-top: 8px;
}

.bundle-oos {
  margin-top: auto;
  margin-bottom: 8px;
  padding: 9px 10px 8px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff7f7;
}
.bundle-oos__head {
  margin: 0 0 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #b91c1c;
}
.bundle-oos__empty {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #9f1239;
}
.bundle-oos__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bundle-oos__list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.bundle-oos__name {
  min-width: 0;
  font-size: 11px;
  line-height: 1.35;
  color: #7f1d1d;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bundle-oos__badge {
  flex-shrink: 0;
  margin-top: 1px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.bundle-oos__more {
  margin: 6px 0 0;
  font-size: 10px;
  font-weight: 700;
  color: #9f1239;
}
.bundle-oos--modal {
  margin: 0;
  margin-top: 4px;
}
.product-card--portal-bundle.product-card--habis .card-sku,
.product-card--promo.product-card--habis .card-sku {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface2);
}

/* ── PAGINATION ── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  margin-top: 40px; padding-bottom: 32px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 36px; height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.2s;
  text-decoration: none;
}
.page-btn:hover:not(.disabled):not(.active) { border-color: var(--red); color: var(--red); }
.page-btn.active { background: var(--red); border-color: var(--red); color: #fff; }
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }

/* ── PANELS ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.panel-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}
.panel-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .center { text-align: center; }
.data-table .cell-title { font-weight: 600; color: var(--text); }
.data-table .cell-muted { font-size: 12px; color: var(--muted); margin-top: 2px; }
.data-table .cell-price { font-weight: 700; color: var(--red); }

.status-pill {
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.status-pill.ok { background: #DCFCE7; color: #15803D; border-color: #BBF7D0; }
.status-pill.warn { background: #FEF3C7; color: #B45309; border-color: #FDE68A; }
.status-pill.danger { background: #FEE2E2; color: #B91C1C; border-color: #FECACA; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.stat-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.stat-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.stat-card .value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.stat-card .value.price { color: var(--red); }
.stat-card .value.due { color: #B91C1C; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-input, .form-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(217,43,43,0.1);
}
.form-input.qty { width: 80px; text-align: center; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-error { font-size: 12px; color: #B91C1C; margin-top: 4px; }

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

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--red-light); transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--red); color: var(--red); }

.btn-success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #15803D;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-success:hover { background: #DCFCE7; }

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.total-row .label { font-size: 14px; color: var(--muted); }
.total-row .amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -0.3px;
}

.checkout-list { list-style: none; }
.checkout-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.checkout-list li:last-child { border-bottom: none; }
.checkout-list .item-name { font-weight: 600; color: var(--text); }
.checkout-list .item-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.back-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--red); }

.link-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
}
.link-action:hover { color: var(--red-dark); }

/* ── PRODUCT DETAIL (katalog/show) ── */
.pd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.pd-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.pd-breadcrumb a:hover { color: var(--red); }
.pd-breadcrumb svg { flex-shrink: 0; opacity: 0.35; stroke: var(--muted); }
.pd-breadcrumb span {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-detail-center {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

.product-detail-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.product-detail-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
}

.product-gallery {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  border-right: 1px solid var(--border);
}

.product-gallery-img {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(160deg, #FAFAFA 0%, #F3F4F6 55%, #ECEFF3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-gallery-img .stock-badge {
  top: 16px;
  right: 16px;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 20px;
  z-index: 2;
}
.product-gallery-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-detail-card:hover .product-gallery-img img { transform: scale(1.02); }

.product-gallery-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 40px;
  color: var(--muted);
}
.product-gallery-placeholder-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}
.product-gallery-placeholder-icon svg { opacity: 0.25; stroke: #9CA3AF; }
.product-gallery-placeholder-brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

.product-info {
  min-width: 0;
  padding: 15px 36px 0px 32px;
  display: flex;
  flex-direction: column;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.product-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.product-tag.brand {
  background: #FEF2F2;
  border-color: #FECACA;
  color: var(--red);
}

.product-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}
.product-sku {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
  font-family: ui-monospace, 'SF Mono', monospace;
  letter-spacing: 0.2px;
}

.product-price-hero {
  margin: 22px 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, #FEF2F2 0%, #FFF7F7 100%);
  border: 1px solid #FECACA;
  border-radius: 12px;
}
.product-price-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-price {
  font-size: 30px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.product-add-form { margin-bottom: 4px; }
.product-add-form .form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.product-add-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qty-stepper--detail {
  align-self: flex-start;
  border-radius: 10px;
}
.qty-stepper--detail input {
  width: 64px;
  height: 44px;
  font-size: 16px;
}
.qty-stepper-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--surface2);
  color: var(--text);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  font-family: var(--font);
}
.qty-stepper-btn:hover { background: #E5E7EB; color: var(--red); }
.product-add-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 14px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(217, 43, 43, 0.25);
}
.product-add-btn:hover { box-shadow: 0 6px 20px rgba(217, 43, 43, 0.35); }

.product-blocked-box {
  padding: 14px 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  font-size: 13px;
  color: #B91C1C;
  line-height: 1.5;
  margin-bottom: 8px;
}

.product-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.product-spec {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
}
.product-spec-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.product-spec-value {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.pd-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}
.pd-back-link:hover { color: var(--red); gap: 8px; }
.pd-back-link svg { stroke: currentColor; }

/* Sidebar terlaris */
.product-bestsellers {
  position: sticky;
  top: 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 4px 20px rgba(17, 24, 39, 0.05);
}
.product-bestsellers-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.product-bestsellers-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FEF2F2, #FEE2E2);
  border: 1px solid #FECACA;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.product-bestsellers-icon svg { stroke: var(--red); fill: rgba(217,43,43,0.12); }
.product-bestsellers-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}
.product-bestsellers-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.bestseller-list {
  display: flex;
  flex-direction: column;
}
.bestseller-item {
  display: grid;
  grid-template-columns: 28px 48px 1fr 16px;
  gap: 10px;
  align-items: center;
  padding: 11px 6px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, padding 0.15s;
  border-radius: 8px;
}
.bestseller-item:last-child { border-bottom: none; }
.bestseller-item:hover {
  background: var(--surface2);
  padding-left: 10px;
  padding-right: 10px;
}
.bestseller-rank {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.bestseller-rank.top {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.bestseller-rank.rank-1 { background: #FEE2E2; color: var(--red); }
.bestseller-rank.rank-2 { background: #FFEDD5; color: #C2410C; }
.bestseller-rank.rank-3 { background: #FEF3C7; color: #B45309; }
.bestseller-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bestseller-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bestseller-thumb svg { opacity: 0.2; stroke: #9CA3AF; }
.bestseller-info { min-width: 0; }
.bestseller-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bestseller-item:hover .bestseller-name { color: var(--red); }
.bestseller-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  margin-top: 3px;
}
.bestseller-arrow {
  opacity: 0;
  stroke: var(--muted);
  transition: opacity 0.15s, transform 0.15s;
}
.bestseller-item:hover .bestseller-arrow {
  opacity: 1;
  transform: translateX(2px);
  stroke: var(--red);
}
.bestseller-empty {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 28px 12px;
  background: var(--surface2);
  border-radius: 10px;
}

.qty-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface);
  border: 1px solid #BBF7D0;
  color: #15803D;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 10px;
  display: flex; align-items: center; gap: 8px;
  transform: translateY(80px); opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error {
  border-color: #FECACA;
  color: #B91C1C;
}

.table-scroll { overflow-x: auto; }

/* ── KERANJANG ── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
  width: 100%;
}
.cart-layout--single {
  grid-template-columns: 1fr;
}

.cart-main { min-width: 0; width: 100%; }

.cart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.cart-header-meta {
  font-size: 13px;
  color: var(--muted);
}
.cart-header-meta strong { color: var(--text); font-weight: 600; }

.cart-items { display: flex; flex-direction: column; gap: 12px; }

.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cart-item:hover {
  border-color: #FECACA;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.cart-item-thumb {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-thumb svg { opacity: 0.2; stroke: #9CA3AF; }

.cart-item-info { min-width: 0; }
.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.cart-item-name:hover { color: var(--red); }
.cart-item-sku {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.cart-item-stock {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
}

.cart-item-price {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.cart-item-price strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.qty-stepper input {
  width: 48px;
  height: 36px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  outline: none;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cart-item-subtotal {
  font-size: 16px;
  font-weight: 700;
  color: var(--red);
  text-align: right;
  white-space: nowrap;
  min-width: 100px;
}

.btn-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.btn-remove:hover { color: #B91C1C; background: #FEF2F2; }

.cart-summary {
  position: sticky;
  top: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.cart-summary-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.cart-summary-row strong { color: var(--text); font-weight: 600; }
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin: 12px 0 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cart-summary-total span:first-child {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.cart-summary-total span:last-child {
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -0.3px;
}

.cart-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-summary-actions .btn-primary,
.cart-summary-actions .btn-secondary {
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
}
.cart-summary-actions .btn-primary.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.cart-summary-note {
  margin-top: 0;
  padding: 12px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  font-size: 12px;
  color: #B45309;
  line-height: 1.5;
}

.cart-empty {
  text-align: center;
  padding: 64px 24px;
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.cart-empty svg {
  width: 64px;
  height: 64px;
  color: #D1D5DB;
  margin: 0 auto 16px;
}
.cart-empty h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.cart-empty p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ── PESANAN & halaman konten full-width ── */
.orders-page,
.order-detail-page,
.cart-page-full {
  width: 100%;
  min-height: calc(100vh - 105px);
  background: var(--surface);
  /* padding: 28px 32px; */
}

.product-detail-page {
  width: 100%;
  min-height: calc(100vh - 105px);
  background: var(--bg);
  padding: 20px 32px 40px;
}

.orders-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.order-list { display: flex; flex-direction: column; gap: 12px; }

.order-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.order-card:hover {
  border-color: #FECACA;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.order-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.order-card-kode {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}
.order-card-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.order-card-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.order-card-stat .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 500;
}
.order-card-stat .value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.order-card-stat .value.due { color: #B91C1C; }
.order-card-stat .value.total { color: var(--red); }

.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.order-card-due {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.order-card-due.warn { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.order-card-due.danger { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }

.order-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

.order-detail-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.order-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.order-breadcrumb a:hover { color: var(--red); }

.order-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.order-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.order-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.order-item-row {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.order-item-row:last-child { border-bottom: none; padding-bottom: 0; }
.order-item-row:first-child { padding-top: 0; }

.order-item-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-item-thumb svg { opacity: 0.2; stroke: #9CA3AF; }

.order-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.order-item-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.order-item-qty {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  min-width: 48px;
}
.order-item-subtotal {
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  text-align: right;
  min-width: 100px;
}

.payment-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.payment-card:last-child { border-bottom: none; padding-bottom: 0; }
.payment-card:first-child { padding-top: 0; }
.payment-card-info { flex: 1; min-width: 0; }
.payment-card-date { font-size: 12px; color: var(--muted); }
.payment-card-nominal {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}
.payment-card-reject {
  font-size: 12px;
  color: #B91C1C;
  margin-top: 6px;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.sidebar-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.sidebar-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.sidebar-stat strong { color: var(--text); font-weight: 600; }
.sidebar-stat.due strong { color: #B91C1C; }
.sidebar-stat.total {
  padding: 14px 0;
  margin: 8px 0 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}
.sidebar-stat.total strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--red);
}

.sidebar-alert {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid;
}
.sidebar-alert.warn { background: #FFFBEB; border-color: #FDE68A; color: #B45309; }
.sidebar-alert.danger { background: #FEF2F2; border-color: #FECACA; color: #B91C1C; }
.sidebar-alert.ok { background: #F0FDF4; border-color: #BBF7D0; color: #15803D; }

.upload-box {
  margin-top: 4px;
}
.upload-box .form-label { margin-top: 12px; }
.upload-box .form-label:first-child { margin-top: 0; }
.upload-box .btn-success {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.info-field .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 500;
}
.info-field .value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ── PROFILE PAGE ── */
.profile-page {
  width: 100%;
  min-height: calc(100vh - 105px);
  background: var(--bg);
  padding: 28px 32px 40px;
}
.profile-center {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(17, 24, 39, 0.06);
}
.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 28px 24px;
  background: linear-gradient(135deg, #FEF2F2 0%, #FFFFFF 55%);
  border-bottom: 1px solid var(--border);
}
.profile-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.profile-hero-avatar.is-photo {
  padding: 0;
  object-fit: cover;
}
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
}
.profile-avatar-form {
  position: absolute;
  inset: 0;
  margin: 0;
}
.profile-avatar-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.profile-avatar-upload {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 16px;
  background: rgba(17, 24, 39, 0.55);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.profile-avatar-wrap:hover .profile-avatar-upload,
.profile-avatar-wrap:focus-within .profile-avatar-upload {
  opacity: 1;
}
.profile-avatar-upload-icon {
  display: grid;
  place-items: center;
}
.profile-avatar-upload-text {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.profile-avatar-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted, #6b7280);
}
.profile-avatar-error {
  margin: 6px 0 0;
  font-size: 12px;
  color: #b91c1c;
  font-weight: 500;
}
.profile-avatar-remove-form {
  margin-top: 8px;
}
.profile-avatar-remove {
  border: none;
  background: transparent;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.profile-avatar-remove:hover {
  color: #991b1b;
}
.profile-hero-info { min-width: 0; }
.profile-hero-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.25;
  margin-bottom: 4px;
}
.profile-hero-email {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  word-break: break-all;
}
.profile-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.profile-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.profile-badge.ok {
  background: #DCFCE7;
  border-color: #BBF7D0;
  color: #15803D;
}
.profile-badge.muted {
  background: #F3F4F6;
  border-color: #E5E7EB;
  color: #6B7280;
}
.profile-hero-warehouse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 28px;
  background: var(--surface);
}
.profile-hero-warehouse-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.profile-hero-warehouse-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.profile-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.profile-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
}
.profile-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.profile-info-grid .profile-row--full {
  grid-column: 1 / -1;
}
.profile-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 8px;
  border-radius: 10px;
  transition: background 0.15s;
}
.profile-row:hover { background: var(--surface2); }
.profile-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--red);
}
.profile-row-body { min-width: 0; }
.profile-row-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 3px;
}
.profile-row-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
.profile-address-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
  padding: 4px 8px;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
.profile-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.profile-action-btn:hover {
  border-color: #FECACA;
  color: var(--red);
}
.profile-action-btn.primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(217, 43, 43, 0.25);
}
.profile-action-btn.primary:hover {
  background: var(--red-light);
  border-color: var(--red-light);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface2); }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }

@media (max-width: 900px) {
  .r-nav { padding: 0 16px; gap: 12px; }
  .logo-img { height: 30px; }
  .search-bar { max-width: none; }
  .nav-profile-text { display: none; }
  .nav-profile-toggle { padding: 4px; max-width: none; }
  .subnav { padding: 0 16px; }
  .page { grid-template-columns: 1fr; }
  aside,
  .catalog-sidebar {
    position: static;
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
  }
  .catalog-filters-card {
    padding: 14px 16px;
    border-radius: 16px;
  }
  .catalog-filters-toggle { display: flex; }
  .catalog-filters-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
    padding-top: 0;
  }
  .catalog-filters-card.is-open .catalog-filters-panel {
    max-height: 1200px;
    opacity: 1;
    padding-top: 14px;
    overflow: visible;
  }
  .catalog-filters-row--selects {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
  .catalog-filter-field {
    min-width: 100%;
  }
  .filter-toggle { display: flex; }
  .filter-title { display: none; }
  .catalog-sidebar .filter-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
    padding-top: 0;
  }
  .catalog-sidebar.is-open .filter-panel {
    max-height: 1400px;
    opacity: 1;
    padding-top: 14px;
    overflow: visible;
  }
  .catalog-sidebar .filter-group:last-of-type { margin-bottom: 20px; }
  main.catalog-main, .reseller-main { padding: 20px 16px; }
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .orders-page,
  .cart-page-full,
  .product-detail-page,
  .likes-page,
  .profile-page { padding: 20px 16px; }
  .profile-hero-main { flex-direction: column; text-align: center; padding: 24px 20px 20px; }
  .profile-hero-badges { justify-content: center; }
  .profile-actions { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-item {
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
  }
  .cart-item-thumb { width: 72px; height: 72px; grid-row: span 2; }
  .cart-item-price,
  .cart-item-subtotal,
  .cart-item .qty-stepper,
  .cart-item .btn-remove {
    grid-column: 2;
  }
  .cart-item-price { text-align: left; }
  .cart-item-subtotal { text-align: left; }
  .order-detail-page { padding: 20px 16px; }
  .order-detail-sidebar { position: static; }
  .order-item-row {
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
  }
  .order-item-thumb { width: 56px; height: 56px; grid-row: span 2; }
  .order-item-qty,
  .order-item-subtotal { grid-column: 2; text-align: left; }
  .info-grid { grid-template-columns: 1fr; }
  .alert-banner { margin: 12px 16px 0; }
  .product-detail-inner { grid-template-columns: 1fr; }
  .product-gallery { border-right: none; border-bottom: 1px solid var(--border); }
  .product-info { padding: 24px 20px; }
  .product-specs { grid-template-columns: 1fr; }
  .product-title { font-size: 20px; }
  .product-price { font-size: 26px; }
  .catalog-title { font-size: 20px; }
}

@media (max-width: 540px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* ── TAGIHAN RESELLER ── */
.tagihan-page {
  width: 100%;
  max-width: none;
  margin: 0;
  position: relative;
}

.tagihan-page-bg {
  position: absolute;
  inset: 0 -16px 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 55% at 5% -5%, rgba(248, 113, 113, .11), transparent 58%),
    radial-gradient(ellipse 50% 35% at 98% 0%, rgba(148, 163, 184, .08), transparent 52%),
    linear-gradient(180deg, #FAFBFC 0%, #fff 42%);
  background-color: #fff;
}

.tagihan-page > :not(.tagihan-page-bg) {
  position: relative;
  z-index: 1;
}

.tagihan-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tagihan-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(226, 232, 240, .9);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.tagihan-hero-badge svg { flex-shrink: 0; opacity: .85; }

.tagihan-hero-title {
  background: linear-gradient(135deg, #0F172A 0%, #475569 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagihan-hero-highlight {
  align-self: center;
  min-width: 180px;
  padding: 16px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, #FFF5F5 0%, #fff 100%);
  border: 1px solid #FECACA;
  box-shadow: 0 8px 24px rgba(220, 38, 38, .08);
  text-align: right;
}

.tagihan-hero-highlight-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 4px;
}

.tagihan-hero-highlight strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #B91C1C;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.tagihan-hero-highlight-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.tagihan-flash {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  backdrop-filter: blur(8px);
}
.tagihan-flash.success { background: rgba(236, 253, 245, .95); color: #065F46; border-color: #A7F3D0; }
.tagihan-flash.error { background: rgba(254, 242, 242, .95); color: #991B1B; border-color: #FECACA; }
.tagihan-flash.info { background: rgba(239, 246, 255, .95); color: #1E40AF; border-color: #BFDBFE; }

.tagihan-week-card-list {
  margin-bottom: 20px;
}
.tagihan-week-card .tagihan-week-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tagihan-week-card-row .po-order-item-info {
  min-width: 0;
  flex: 1;
}
.tagihan-week-bulk {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.tagihan-week-bulk-hint {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: #1D4ED8;
}
.tagihan-week-bulk-hint.is-error {
  color: #B91C1C;
}
.po-btn.is-loading {
  opacity: .7;
  cursor: wait;
  pointer-events: none;
}

.tagihan-pay-loading {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .18s ease;
}
.tagihan-pay-loading[hidden] {
  display: none !important;
}
.tagihan-pay-loading.is-open {
  opacity: 1;
}
.tagihan-pay-loading-card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(15, 23, 42, .18);
}
.tagihan-pay-loading-card .tagihan-modal-spinner {
  margin: 0 auto 14px;
}
.tagihan-pay-loading-card strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
}
.tagihan-pay-loading-card p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #64748B;
  line-height: 1.45;
}

.tagihan-week-pay-modal {
  z-index: 1210;
}
.tagihan-week-pay-dialog {
  width: min(1080px, 100%);
  max-height: min(92vh, 880px);
  background: #F8FAFC;
}
.tagihan-week-pay-table-wrap {
  max-height: min(48vh, 420px);
}
.tagihan-week-pay-history {
  margin: 0;
  border: 0;
  border-top: 1px solid #EEF2F7;
  border-radius: 0;
  background: #F8FAFC;
}
.tagihan-week-pay-empty {
  padding: 24px 16px;
  text-align: center;
  color: #94A3B8;
  font-size: 13px;
}

.tagihan-week-list-modal {
  z-index: 1190;
}
.tagihan-week-list-dialog {
  width: min(840px, 100%);
  max-height: min(92vh, 880px);
  background: #F8FAFC;
}
.tagihan-week-list-content {
  padding: 16px;
}
.tagihan-week-list-meta {
  margin: 6px 0 0;
  font-size: 13px;
  color: #64748B;
  line-height: 1.45;
}
.tagihan-week-list-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 12px;
  padding: 10px 14px;
  border: 1px solid #E8EDF3;
  border-radius: 12px;
  background: #F8FAFC;
  color: #94A3B8;
}
.tagihan-week-list-toolbar:focus-within {
  border-color: #fecaca;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
  color: #64748B;
}
.tagihan-week-list-toolbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: #0F172A;
  padding: 0;
}
.tagihan-week-list-toolbar input:focus {
  outline: none;
}
.tagihan-week-list-toolbar input::placeholder {
  color: #94A3B8;
}
.tagihan-week-list-table-wrap {
  max-height: min(52vh, 480px);
}
.tagihan-week-list-row.is-lunas .tm-subtotal {
  color: #16A34A;
}
.tagihan-week-list-empty {
  padding: 48px 16px;
  text-align: center;
  color: #94A3B8;
  font-size: 13px;
}

.tagihan-due-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid;
  font-size: 13px;
  line-height: 1.45;
}
.tagihan-due-alert-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.tagihan-due-alert-body { min-width: 0; }
.tagihan-due-alert-body strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.tagihan-due-alert-body p {
  margin: 0;
  opacity: .92;
}
.tagihan-due-alert--danger {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #991B1B;
}
.tagihan-due-alert--danger .tagihan-due-alert-icon {
  background: #FEE2E2;
  color: #DC2626;
}
.tagihan-due-alert--warn {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #92400E;
}
.tagihan-due-alert--warn .tagihan-due-alert-icon {
  background: #FEF3C7;
  color: #D97706;
}

.tagihan-sisa-summary {
  margin: 0 0 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #fff7f7 0%, #fff 80%);
  border: 1px solid #fecaca;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, .04);
}
.tagihan-sisa-summary-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.tagihan-sisa-summary-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #6b7280;
}
.tagihan-sisa-summary-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #b91c1c;
}
.tagihan-sisa-summary-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.tagihan-toolbar {
  margin-bottom: 20px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, .04);
  backdrop-filter: blur(10px);
}

.tagihan-period-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, .04);
  backdrop-filter: blur(10px);
}

.tagihan-period-bar--combined {
  align-items: center;
  gap: 14px 18px;
}

.tagihan-period-bar--combined .tagihan-filter-strip {
  flex: 1 1 auto;
  min-width: min(100%, 280px);
}

.tagihan-period-bar--combined .tagihan-segment {
  flex: 0 1 auto;
  margin-left: auto;
  max-width: 100%;
  overflow-x: auto;
}

.tagihan-period-bar .tagihan-filter-strip {
  flex: 1;
  min-width: min(100%, 360px);
}

.tagihan-period-bar .tagihan-period-hint {
  margin: 0;
  white-space: nowrap;
}

.tagihan-toolbar--status {
  padding: 10px 12px;
  margin-bottom: 18px;
}

.tagihan-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tagihan-filter-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.tagihan-filter-strip--inline {
  flex: 1;
  min-width: min(100%, 320px);
}

.tagihan-period-bar .btn-export {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 9px 14px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tagihan-period-bar .btn-export:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #065f46;
}

.tagihan-period-bar .btn-export svg {
  width: 16px;
  height: 16px;
  color: #059669;
  flex-shrink: 0;
}

.tagihan-filter-strip-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
}

.tagihan-filter-select,
.tagihan-filter-date,
.tagihan-filter-search {
  appearance: none;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.tagihan-filter-search {
  flex: 1;
  min-width: min(100%, 180px);
  max-width: 320px;
}

.tagihan-filter-select {
  padding-right: 34px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.tagihan-filter-date { min-width: 150px; }
.tagihan-filter-date-year { width: 110px; min-width: 110px; }

.tagihan-filter-range-sep {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.tagihan-filter-select:focus,
.tagihan-filter-date:focus,
.tagihan-filter-search:focus {
  border-color: #FCA5A5;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .1);
  background: #fff;
}

.tagihan-filter-apply {
  border: none;
  border-radius: 12px;
  padding: 9px 18px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .15s ease;
  box-shadow: 0 4px 14px rgba(220, 38, 38, .2);
}

.tagihan-filter-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, .26);
}

.tagihan-period-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.tagihan-period-hint strong {
  color: var(--text);
  font-weight: 700;
}

.tagihan-segment {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
}

.tagihan-segment-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748B;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background .2s ease,
    color .2s ease,
    box-shadow .2s ease,
    transform .2s ease;
}

.tagihan-segment-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.tagihan-segment-item.is-active .tagihan-segment-count {
  background: #fee2e2;
  color: #b91c1c;
}

.tagihan-segment-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .65);
}

.tagihan-segment-item.is-active {
  background: #fff;
  color: var(--red);
  border-color: rgba(254, 202, 202, .8);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
}

.tagihan-segment--compact {
  flex-wrap: nowrap;
  gap: 2px;
  padding: 3px;
}

.tagihan-segment--compact .tagihan-segment-item {
  gap: 6px;
  padding: 7px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.tagihan-segment--compact .tagihan-segment-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
}

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

.tagihan-summary-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition:
    transform .25s cubic-bezier(.22, 1, .36, 1),
    box-shadow .25s ease,
    border-color .25s ease;
}

.tagihan-summary-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .55) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}

.tagihan-summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .07);
}

.tagihan-summary-card:hover::after { opacity: 1; }

.tagihan-summary-card.highlight {
  border-color: #FECACA;
  background: linear-gradient(145deg, rgba(255, 245, 245, .95) 0%, rgba(255, 255, 255, .95) 55%);
}

.tagihan-summary-card .label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.tagihan-summary-card .amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -.02em;
}

.tagihan-summary-card .amount.ok { color: #059669; }
.tagihan-summary-card .meta { font-size: 12px; color: var(--muted); }

.tagihan-summary-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}

.tagihan-summary-card:hover .tagihan-summary-icon { transform: scale(1.06) rotate(-3deg); }

.tagihan-summary-icon.due {
  background: linear-gradient(135deg, #FEE2E2, #FECACA);
  color: #B91C1C;
}

.tagihan-summary-icon.warn {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: #B45309;
}

.tagihan-summary-icon.ok {
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  color: #047857;
}

.tagihan-summary-icon.total {
  background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
  color: #1D4ED8;
}

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

.tagihan-card {
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
  transition:
    transform .28s cubic-bezier(.22, 1, .36, 1),
    box-shadow .28s ease,
    border-color .28s ease,
    background .28s ease;
}

.tagihan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

.tagihan-card--lunas {
  background: linear-gradient(145deg, #D1FAE5 0%, #ECFDF5 38%, #F7FEF9 100%);
  border-color: rgba(110, 231, 183, .45);
}

.tagihan-card--lunas:hover {
  box-shadow: 0 16px 36px rgba(5, 150, 105, .1);
}

.tagihan-card--partial {
  background: linear-gradient(145deg, #FEF3C7 0%, #FFFBEB 42%, #FFFEF7 100%);
  border-color: rgba(252, 211, 77, .5);
}

.tagihan-card--partial:hover {
  box-shadow: 0 16px 36px rgba(180, 83, 9, .08);
}

.tagihan-card--unpaid {
  background: linear-gradient(145deg, #FECACA 0%, #FEF2F2 42%, #FFF8F8 100%);
  border-color: rgba(252, 165, 165, .5);
}

.tagihan-card--unpaid:hover {
  box-shadow: 0 16px 36px rgba(220, 38, 38, .08);
}

.tagihan-card--piutang {
  background: linear-gradient(145deg, #EDE9FE 0%, #F5F3FF 45%, #FAFAFF 100%);
  border-color: rgba(196, 181, 253, .55);
}

.tagihan-card--batal {
  background: linear-gradient(145deg, #F3F4F6 0%, #F9FAFB 100%);
  border-color: #E5E7EB;
  opacity: .88;
}

.tagihan-card.is-overdue {
  box-shadow: 0 4px 18px rgba(15, 23, 42, .08);
}

.tagihan-card--unpaid.is-overdue {
  border-color: rgba(248, 113, 113, .7);
  box-shadow: 0 4px 18px rgba(220, 38, 38, .12);
}

.tagihan-card--partial.is-overdue {
  border-color: rgba(245, 158, 11, .65);
  box-shadow: 0 4px 18px rgba(180, 83, 9, .12);
}

.tagihan-card-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  padding: 18px 16px 16px;
}

.tagihan-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.tagihan-card .status-pill {
  flex-shrink: 0;
  font-size: 10px;
  padding: 4px 8px;
}

.tagihan-card-kode {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  word-break: break-all;
  letter-spacing: -.01em;
  line-height: 1.35;
}

.tagihan-card-meta {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 4px;
  line-height: 1.45;
}

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

.tagihan-card-stat--full {
  grid-column: 1 / -1;
}

.tagihan-card-stat {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  transition: background .2s ease, border-color .2s ease;
}

.tagihan-card:hover .tagihan-card-stat {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(255, 255, 255, 1);
}

.tagihan-card--batal .tagihan-card-stat {
  background: rgba(255, 255, 255, .65);
  border-color: rgba(229, 231, 235, .9);
}

.tagihan-card-amounts .mini-label {
  display: block;
  font-size: 10px;
  color: #94A3B8;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}

.tagihan-card-amounts strong {
  font-size: 14px;
  color: #0F172A;
  font-weight: 700;
}

.tagihan-card-amounts .due { color: #DC2626; }
.tagihan-card-amounts .ok { color: #059669; }

.tagihan-card-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.tagihan-progress {
  height: 5px;
  background: rgba(255, 255, 255, .55);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .4);
}

.tagihan-card--lunas .tagihan-progress-bar {
  background: linear-gradient(90deg, #6EE7B7, #059669);
}

.tagihan-card--partial .tagihan-progress-bar {
  background: linear-gradient(90deg, #FCD34D, #D97706);
}

.tagihan-card--unpaid .tagihan-progress-bar {
  background: linear-gradient(90deg, #FCA5A5, #DC2626);
}

.tagihan-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #FCA5A5, var(--red));
  border-radius: 999px;
  position: relative;
  transition: width 1s cubic-bezier(.22, 1, .36, 1);
}

.tagihan-page.is-ready .tagihan-progress-bar {
  width: var(--progress, 0%);
}

.tagihan-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .45) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: tagihan-shine 2.2s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes tagihan-shine {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(200%); }
}

.btn-tagihan-detail,
.btn-tagihan-manual {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-family: inherit;
  transition:
    transform .2s ease,
    background .15s ease,
    border-color .15s ease,
    box-shadow .2s ease;
}

.btn-tagihan-detail:hover,
.btn-tagihan-manual:hover {
  transform: translateY(-1px);
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
  background: #F8FAFC;
}

.btn-tagihan-pay,
.btn-midtrans-pay {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #fff;
  cursor: pointer;
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    opacity .15s ease;
  box-shadow: 0 4px 14px rgba(220, 38, 38, .22);
}

.btn-tagihan-pay:hover,
.btn-midtrans-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(220, 38, 38, .3);
  opacity: 1;
  color: #fff;
}

.btn-midtrans-pay.is-loading { opacity: .7; cursor: wait; }
.btn-midtrans-pay:disabled { opacity: .65; cursor: not-allowed; }

.tagihan-empty {
  margin-top: 12px;
  padding: 48px 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .85);
  border: 1px dashed #E2E8F0;
}

.tagihan-empty-icon { color: #CBD5E1; margin-bottom: 8px; }

.tagihan-page .tagihan-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity .55s cubic-bezier(.22, 1, .36, 1),
    transform .55s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.tagihan-page.is-ready .tagihan-reveal {
  opacity: 1;
  transform: translateY(0);
}

.tagihan-flash.tagihan-reveal { transform: translateY(-8px); }
.tagihan-page.is-ready .tagihan-flash.tagihan-reveal { transform: translateY(0); }

.tagihan-page.is-ready .tagihan-empty {
  animation: tagihan-float 5s ease-in-out 1s infinite;
}

@keyframes tagihan-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.tagihan-empty-icon {
  animation: tagihan-pulse 2.5s ease-in-out infinite;
}

@keyframes tagihan-pulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.tagihan-detail-page .tagihan-detail-grid { align-items: start; }
.tagihan-section-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.tagihan-pay-sidebar .sidebar-card { border-radius: 16px; }
.tagihan-pay-card { margin-bottom: 14px; }
.tagihan-pay-desc { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }
.tagihan-pay-note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.tagihan-pay-note.error { color: #B91C1C; }

.tagihan-pay-progress-wrap { margin-bottom: 14px; }
.tagihan-pay-progress { height: 8px; background: #F3F4F6; border-radius: 999px; overflow: hidden; }
.tagihan-pay-progress-bar { height: 100%; background: linear-gradient(90deg, #34D399, #059669); }
.tagihan-pay-progress-label { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; }

.due-text { color: #B91C1C !important; }
.ok-text { color: #059669 !important; }
.purple-text { color: #7C3AED !important; }

.tagihan-page .status-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.sidebar-alert.danger { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.sidebar-alert.ok { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }

.tagihan-history-list { display: flex; flex-direction: column; gap: 10px; }
.tagihan-history-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FAFAFA;
}
.tagihan-history-item div { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.tagihan-history-item span { font-size: 12px; color: var(--muted); }
.tagihan-history-item p { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

.status-pill.muted { background: #F3F4F6; color: #6B7280; }
.status-pill.purple { background: #EDE9FE; color: #6D28D9; border-color: #DDD6FE; }

/* ── TAGIHAN MODAL (clean / modern) ── */
body.tagihan-modal-open { overflow: hidden; }

/* SweetAlert2 above app modals (tagihan-modal z-index: 1200) */
div:where(.swal2-container) {
  z-index: 1400 !important;
}

.tagihan-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}
.tagihan-modal[hidden] { display: none !important; }

.tagihan-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(10px);
}

.tagihan-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  max-height: min(92vh, 880px);
  background: #F8FAFC;
  border-radius: 24px;
  box-shadow: 0 40px 80px rgba(15, 23, 42, .16), 0 0 0 1px rgba(15, 23, 42, .04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tagihan-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: #fff;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.tagihan-modal-close:hover {
  background: #F1F5F9;
  color: #0F172A;
  transform: scale(1.04);
}

.tagihan-modal-body {
  overflow: auto;
  padding: 0;
}

.tagihan-modal-loading,
.tagihan-modal-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 64px 24px;
  text-align: center;
  color: #64748B;
  font-size: 14px;
}
.tagihan-modal-error { color: #DC2626; }

.tagihan-modal-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E2E8F0;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: tm-spin .7s linear infinite;
}
@keyframes tm-spin { to { transform: rotate(360deg); } }

/* ── KATALOG PRODUCT MODAL (template) ── */
.catalog-product-modal .tagihan-modal-backdrop {
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(8px);
}

.catalog-product-modal .tagihan-modal-dialog {
  width: min(1040px, calc(100% - 2rem));
  max-height: min(94vh, 960px);
  background: #fff;
  border-radius: 24px;
  border: none;
  box-shadow: 0 24px 48px rgba(15, 23, 42, .14), 0 0 0 1px rgba(15, 23, 42, .04);
  overflow: hidden;
}

.catalog-product-modal .tagihan-modal-body {
  background: #fff;
  padding: 0;
}

.catalog-product-modal .tagihan-modal-close {
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border: none;
  color: #64748b;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .08);
}

.catalog-product-modal .tagihan-modal-close:hover {
  background: #fff;
  color: #334155;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .1);
}

.pd-modal-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.pd-modal-body {
  display: flex;
  align-items: stretch;
  min-height: 460px;
}

.pd-modal-media {
  width: 420px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  align-self: stretch;
}

.pd-modal-stock {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
  backdrop-filter: blur(8px);
}

.pd-modal-stock--ok {
  background: #EAF3DE;
  color: #3B6D11;
}

.pd-modal-stock--low {
  background: #FEF3C7;
  color: #92400E;
}

.pd-modal-stock--crit {
  background: #FEE2E2;
  color: #991B1B;
}

.pd-modal-like {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
  transition: color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.pd-modal-like:hover {
  color: #E24B4A;
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .1);
}

.pd-modal-like:hover,
.pd-modal-like.liked {
  color: #E24B4A;
}

.pd-modal-like svg {
  pointer-events: none;
  width: 20px;
  height: 20px;
}

.pd-modal-media-visual {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  overflow: hidden;
}

.pd-modal-media-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.pd-modal-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 320px;
  color: #94a3b8;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.pd-modal-detail {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.pd-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pd-modal-tag {
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
  padding: 4px 12px;
  border-radius: 999px;
}

.pd-modal-tag--brand {
  background: #FCEBEB;
  color: #A32D2D;
}

.pd-modal-sku {
  font-size: 11px;
  color: #9ca3af;
  margin: 0 0 8px;
  font-family: ui-monospace, 'SF Mono', monospace;
}

.pd-modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.pd-modal-title {
  flex: 1;
  min-width: 0;
  font-size: 24px;
  font-weight: 500;
  margin: 0;
  color: #111827;
  line-height: 1.35;
}

.pd-modal-price-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff5f5 0%, #feecec 100%);
  border: 1px solid rgba(226, 75, 74, .2);
  box-shadow: 0 4px 16px rgba(226, 75, 74, .12);
  font-size: 22px;
  font-weight: 700;
  color: #E24B4A;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -.01em;
}

.pd-modal-descbox {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 1.25rem;
}

.pd-modal-desc-label {
  font-size: 11px;
  color: #64748b;
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pd-modal-desc {
  margin: 0;
}

.pd-modal-desc p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.75;
  margin: 0 0 12px;
}

.pd-modal-desc p:last-child {
  margin-bottom: 0;
}

.pd-modal-features {
  display: flex;
  gap: 10px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.pd-modal-feature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 7px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e8edf2;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  line-height: 1;
}

.pd-modal-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  flex-shrink: 0;
}

.pd-modal-feature-icon svg {
  width: 13px;
  height: 13px;
}

.pd-modal-feature-icon--stock {
  color: #059669;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.pd-modal-feature-text {
  padding-right: 2px;
}

.pd-modal-blocked {
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 8px;
  background: #FEF2F2;
  border: .5px solid #FECACA;
  font-size: 13px;
  color: #991B1B;
  line-height: 1.5;
}

.pd-modal-cart-form {
  margin-top: auto;
}

.pd-modal-cart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pd-modal-qty-label {
  font-size: 11px;
  color: #6b7280;
  margin: 0;
  font-weight: 500;
}

.pd-modal-qty {
  display: flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.pd-modal-qty-btn {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.pd-modal-qty-btn:hover {
  background: #f9fafb;
  color: #111827;
}

.pd-modal-qty-input {
  min-width: 44px;
  width: 44px;
  height: 40px;
  border: none;
  border-left: .5px solid #e5e7eb;
  border-right: .5px solid #e5e7eb;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: #111827;
  background: #fff;
  font-family: inherit;
  padding: 0;
  -moz-appearance: textfield;
}

.pd-modal-qty-input::-webkit-outer-spin-button,
.pd-modal-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pd-modal-add-btn {
  flex: 1;
  min-width: 200px;
  height: 42px;
  background: #E24B4A;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 4px 14px rgba(226, 75, 74, .24);
}

.pd-modal-add-btn:hover {
  background: #D43F3E;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(226, 75, 74, .28);
}

.pd-modal-footer {
  border-top: 1px solid #f1f5f9;
  padding: 16px 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  background: #fafbfc;
  flex-wrap: wrap;
}

.pd-modal-footer span {
  font-size: 13px;
  color: #6b7280;
}

.pd-modal-footer span::before {
  margin-right: 4px;
}

.pd-modal-footer span:nth-child(1)::before { content: '🚚'; }
.pd-modal-footer span:nth-child(2)::before { content: '📦'; }
.pd-modal-footer span:nth-child(3)::before { content: '🏅'; }

.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;
}

.pd-modal-loaded .pd-modal-card {
  animation: pd-modal-in .35s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes pd-modal-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
  .catalog-product-modal .tagihan-modal-dialog {
    width: min(100%, calc(100% - 1rem));
    max-height: 94vh;
    border-radius: 20px;
  }

  .pd-modal-body {
    flex-direction: column;
    min-height: 0;
  }

  .pd-modal-media {
    width: 100%;
    min-height: 0;
    padding: 1rem 1rem 0;
    background: #f8fafc;
  }

  .pd-modal-media-visual {
    min-height: 260px;
    border-radius: 18px;
  }

  .pd-modal-detail {
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .pd-modal-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .pd-modal-price-badge {
    align-self: flex-end;
    font-size: 20px;
    padding: 9px 16px;
  }

  .pd-modal-cart-row {
    flex-direction: column;
    align-items: stretch;
  }

  .pd-modal-add-btn {
    width: 100%;
  }

  .pd-modal-footer {
    padding: 12px 1.25rem;
    gap: 10px;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-modal-loaded .pd-modal-card {
    animation: none;
  }
}

/* Modal inner layout (.tm) */
.tm { display: flex; flex-direction: column; min-height: 100%; }

.tm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 64px 20px 24px;
  background: #fff;
  border-bottom: 1px solid #EEF2F7;
}
.tm-header-main { min-width: 0; flex: 1; }
.tm-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: 6px;
}
.tm-title {
  margin: 0;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 700;
  color: #0F172A;
  line-height: 1.35;
  word-break: break-word;
}
.tm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}
.tm-chip svg { flex-shrink: 0; opacity: .75; }
.tm-chip-link {
  text-decoration: none;
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}
.tm-chip-link:hover { background: #fee2e2; }

.tm-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  padding: 16px;
  align-items: start;
}

.tm-panel {
  background: #fff;
  border: 1px solid #E8EDF3;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  overflow: hidden;
}
.tm-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 12px;
}
.tm-panel-head.compact { padding-top: 18px; }
.tm-panel-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
}
.tm-panel-head span {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 600;
}

.tm-table-wrap {
  max-height: 320px;
  overflow: auto;
  border-top: 1px solid #EEF2F7;
  border-bottom: 1px solid #EEF2F7;
}
.tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tm-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #F8FAFC;
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94A3B8;
  border-bottom: 1px solid #EEF2F7;
}
.tm-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5F9;
  color: #334155;
  vertical-align: top;
}
.tm-table tbody tr:last-child td { border-bottom: none; }
.tm-table tbody tr:hover { background: #FAFCFF; }
.tm-product-name { font-weight: 600; color: #0F172A; line-height: 1.4; }
.tm-product-code { font-size: 11px; color: #94A3B8; margin-top: 2px; }
.tm-qty {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 8px;
  background: #F1F5F9;
  font-weight: 700;
  font-size: 12px;
}
.tm-subtotal { font-weight: 700; color: #0F172A; white-space: nowrap; }

.tm-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #F8FAFC;
  font-size: 13px;
  color: #64748B;
}
.tm-table-footer strong {
  font-size: 16px;
  color: #0F172A;
}

.tm-history { border-top: 1px solid #EEF2F7; }
.tm-history-row {
  padding: 12px 18px;
  border-bottom: 1px solid #F1F5F9;
}
.tm-history-row:last-child { border-bottom: none; }
.tm-history-row div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.tm-history-row strong { color: #0F172A; font-size: 14px; }
.tm-history-row span { font-size: 12px; color: #94A3B8; }
.tm-history-row p { margin: 6px 0 0; font-size: 12px; color: #64748B; line-height: 1.45; }

/* Shipping card (modal detail pesanan) */
.tm-ship {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 16px 16px;
}
.tm-ship-courier {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #E2E8F0;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
}
.tm-ship-logo {
  flex-shrink: 0;
  width: 52px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #EEF2F7;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
  overflow: hidden;
}
.tm-ship-logo img {
  max-width: 42px;
  max-height: 26px;
  object-fit: contain;
}
.tm-ship-logo span {
  font-size: 11px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: .02em;
}
.tm-ship-courier-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.tm-ship-courier-info strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
}
.tm-ship-courier-info span {
  font-size: 12px;
  color: #64748B;
}
.tm-ship-etd {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  color: #1D4ED8;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.tm-ship-resi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #0F172A;
  color: #fff;
}
.tm-ship-resi-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.tm-ship-resi-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}
.tm-ship-resi-value {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  word-break: break-all;
}
.tm-ship-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  transition: background .15s ease;
}
.tm-ship-copy:hover { background: rgba(255, 255, 255, .16); }
.tm-ship-copy .tm-ship-copy-ok { display: none; color: #4ADE80; }
.tm-ship-copy.is-copied .tm-ship-copy-ic { display: none; }
.tm-ship-copy.is-copied .tm-ship-copy-ok { display: block; }
.tm-ship-dest {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #E2E8F0;
  background: #fff;
}
.tm-ship-dest-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #FEF2F2;
  color: #DC2626;
}
.tm-ship-dest-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tm-ship-dest-info strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
}
.tm-ship-dest-info span {
  font-size: 12px;
  color: #64748B;
}
.tm-ship-dest-info p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748B;
  line-height: 1.5;
}
.tm-ship-track { margin-top: 2px; }

.tm-panel-pay { display: flex; flex-direction: column; }

.tm-pay-breakdown {
  margin: 0 16px 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #E8EDF3;
}
.tm-pay-breakdown-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: 12px;
}
.tm-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
  color: #64748B;
  border-bottom: 1px dashed #EEF2F7;
}
.tm-pay-row:last-child { border-bottom: none; }
.tm-pay-row strong {
  color: #0F172A;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}
.tm-pay-row-total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #E2E8F0;
  border-bottom: none;
}
.tm-pay-row-total span {
  font-weight: 600;
  color: #334155;
}
.tm-pay-row-total strong { font-size: 16px; }

.tm-pay-hero {
  margin: 0 16px 14px;
  padding: 0 2px;
}
.tm-pay-hero-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
}
.tm-pay-hero-amount {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.tm-pay-hero-amount.is-due { color: #DC2626; }
.tm-pay-hero-amount.is-ok { color: #059669; font-size: 28px; }
.tm-pay-hero-amount.is-purple { color: #7C3AED; }

.tm-pay-progress { margin-top: 0; }
.tm-pay-progress-track {
  height: 8px;
  background: #FEE2E2;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.tm-pay-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #F87171, var(--red));
}
.tm-pay-progress span {
  font-size: 11px;
  color: #64748B;
  line-height: 1.4;
}

.tm-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 16px 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}
.tm-alert svg { flex-shrink: 0; margin-top: 1px; }
.tm-alert.is-warn { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.tm-alert.is-danger { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.tm-alert.is-ok { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.tm-alert.is-purple { background: #F5F3FF; color: #5B21B6; border: 1px solid #DDD6FE; }
.tm-alert strong { display: block; font-weight: 600; }
.tm-alert-desc { margin: 4px 0 0; font-size: 12px; opacity: 0.9; }

.tm-pay-section {
  margin: 0 16px 16px;
  padding: 16px;
  border-radius: 14px;
  background: #F8FAFC;
  border: 1px solid #E8EDF3;
}
.tm-pay-section-head { margin-bottom: 14px; }
.tm-pay-section-head p {
  margin: 8px 0 0;
  font-size: 12px;
  color: #64748B;
  line-height: 1.5;
}
.tm-pay-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.tm-pay-badge.online { background: #FEE2E2; color: #B91C1C; }
.tm-pay-badge.manual { background: #E0F2FE; color: #0369A1; }

.tm-btn-primary,
.tm-btn-secondary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.tm-btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(220, 38, 38, .22);
  text-decoration: none;
}
.tm-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(220, 38, 38, .28); }
.tm-btn-primary:disabled,
.tm-btn-primary.is-loading { opacity: .7; cursor: wait; transform: none; }
.tm-btn-invoice { margin-top: 12px; }
.tm-btn-secondary {
  background: #fff;
  color: #0F172A;
  border: 1px solid #CBD5E1;
}
.tm-btn-secondary:hover { background: #F8FAFC; }

.tm-form { display: flex; flex-direction: column; gap: 12px; }
.tm-field { display: flex; flex-direction: column; gap: 6px; }
.tm-field span {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}
.tm-file,
.tm-input,
.tm-textarea {
  width: 100%;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: #0F172A;
}
.tm-file { padding: 10px; }
.tm-input {
  padding: 10px 12px;
}
.tm-input-rp {
  display: flex;
  align-items: stretch;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.tm-input-rp:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}
.tm-input-rp-prefix {
  display: flex;
  align-items: center;
  padding-left: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
  flex-shrink: 0;
  user-select: none;
}
.tm-input-rp-field {
  border: none !important;
  box-shadow: none !important;
  flex: 1;
  min-width: 0;
  padding-left: 6px;
}
.tm-input-rp-field:focus {
  outline: none;
  box-shadow: none !important;
}
.tm-textarea {
  padding: 10px 12px;
  min-height: 72px;
  resize: vertical;
}
.tm-file:focus,
.tm-input:focus,
.tm-textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.tm-pay-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: #64748B;
  text-align: center;
}
.tm-pay-note.tm-pay-note-hint {
  margin: 6px 0 24px;
  text-align: left;
}

.tm-pay-note.error { color: #DC2626; }

.tm-pay-history {
  margin: 0 16px 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #E8EDF3;
}

.tm-pay-history-row + .tm-pay-history-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #EEF2F7;
}

.tm-pay-history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tm-pay-history-top strong {
  font-size: 14px;
  color: #0F172A;
}

.tm-pay-history-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #94A3B8;
}

.tm-pay-history-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748B;
  line-height: 1.45;
}

.tm-pay-history-note.is-danger {
  color: #DC2626;
}

.tm-pay-history-row .status-pill {
  flex-shrink: 0;
  font-size: 10px;
  padding: 3px 8px;
}

.tm-pay-history-row .po-modal-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
}

/* ── TAGIHAN MODAL ANIMATIONS ── */
.tagihan-modal-backdrop {
  opacity: 0;
  transition: opacity .22s ease;
}

.tagihan-modal-dialog {
  opacity: 0;
  transform: scale(.96) translateY(16px);
  transition:
    opacity .22s cubic-bezier(.22, 1, .36, 1),
    transform .22s cubic-bezier(.22, 1, .36, 1);
}

.tagihan-modal.is-open .tagihan-modal-backdrop { opacity: 1; }

.tagihan-modal.is-open .tagihan-modal-dialog {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.tm-header {
  background: linear-gradient(180deg, #fff 0%, #FAFCFF 100%);
}

.tm-panel-animate {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity .45s cubic-bezier(.22, 1, .36, 1),
    transform .45s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--panel-delay, 0ms);
}

.tm-loaded .tm-panel-animate {
  opacity: 1;
  transform: translateY(0);
}

.tm-loaded .tm-header {
  animation: tm-header-in .4s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes tm-header-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.tm-pay-progress-fill {
  transition: width 1s cubic-bezier(.22, 1, .36, 1);
  position: relative;
  overflow: hidden;
}

.tm-loaded .tm-pay-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  animation: tagihan-shine 2s ease-in-out 1;
}

.tm-btn-primary,
.tm-btn-secondary {
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    opacity .15s ease;
}

.tm-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(220, 38, 38, .28);
}

.tm-btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}

@media (prefers-reduced-motion: reduce) {
  .tagihan-page .tagihan-reveal,
  .tagihan-progress-bar,
  .tm-panel-animate,
  .tm-loaded .tm-header,
  .tagihan-empty,
  .tagihan-empty-icon {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .tagihan-page.is-ready .tagihan-progress-bar,
  .tm-pay-progress-fill {
    width: var(--progress, auto) !important;
  }

  .tagihan-modal-backdrop,
  .tagihan-modal-dialog {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 900px) {
  .tagihan-hero-highlight { width: 100%; text-align: left; }
  .tagihan-period-bar { flex-direction: column; align-items: stretch; }
  .tagihan-period-bar--combined .tagihan-segment { margin-left: 0; width: 100%; }
  .tagihan-period-bar .tagihan-period-hint { white-space: normal; }
  .tagihan-toolbar-top { flex-direction: column; align-items: stretch; }
  .tagihan-period-hint { white-space: normal; }
  .tagihan-filter-apply { width: 100%; }
  .tagihan-segment { width: 100%; }
  .tagihan-segment-item { flex: 1; justify-content: center; }
  .tagihan-summary-grid { grid-template-columns: 1fr; }
  .tagihan-list { grid-template-columns: 1fr; }
  .tagihan-card-amounts { grid-template-columns: 1fr 1fr; }
  .tm-grid { grid-template-columns: 1fr; padding: 12px; }
  .tm-header { padding: 18px 56px 16px 16px; }
  .tagihan-modal-dialog { max-height: 94vh; border-radius: 18px; }
  .tagihan-modal-close { top: 12px; right: 12px; }
}

@media (max-width: 1200px) and (min-width: 901px) {
  .tagihan-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tagihan-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .tagihan-card-head { flex-direction: column; gap: 8px; }
  .tagihan-card-amounts { grid-template-columns: 1fr; }
}

/* ── ACCOUNT PAGE (pesanan / profil / suka / notifikasi / voucher) ── */
.account-page {
  background: var(--surface);
}
.account-sidebar {
  background: var(--surface2);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 64px;
  height: calc(100vh - 105px);
  overflow-y: auto;
  padding: 20px 16px;
}
.account-sidebar-toggle {
  display: none;
}
.account-sidebar-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 8px 8px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.account-sidebar-avatar {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  border: 2px solid #fecaca;
  background: #fff;
  padding: 12px;
  object-fit: contain;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.12);
}
.account-sidebar-avatar.is-photo {
  padding: 0;
  object-fit: cover;
}
.account-sidebar-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
}
.account-sidebar-email {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted, #6b7280);
  word-break: break-all;
}
.account-sidebar-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}
.account-sidebar-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: #f3f4f6;
  color: #4b5563;
}
.account-sidebar-badge.ok {
  background: #ecfdf5;
  color: #047857;
}
.account-sidebar-badge.muted {
  background: #f3f4f6;
  color: #9ca3af;
}
.account-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.account-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  color: #374151;
  text-decoration: none;
  font-size: 13px;
  font-weight: 550;
  transition: background 0.15s ease, color 0.15s ease;
}
.account-nav-item:hover {
  background: #fff;
  color: #111827;
}
.account-nav-item.is-active {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
}
.account-nav-icon {
  display: grid;
  place-items: center;
  width: 20px;
  color: inherit;
  flex-shrink: 0;
}
.account-nav-label {
  flex: 1;
  min-width: 0;
}
.account-nav-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.account-main {
  padding: 28px 32px 40px;
  background: var(--surface);
  min-width: 0;
}
.account-content-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.account-action-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: #374151;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.account-action-btn:hover {
  border-color: #fca5a5;
  color: #b91c1c;
}
.account-action-btn--ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: transparent;
  background: transparent;
  color: #64748b;
  padding: 6px 8px;
}
.account-action-btn--ghost:hover {
  border-color: transparent;
  background: #f8fafc;
  color: #0f172a;
}
.notif-unread-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.notif-page .likes-header {
  margin-bottom: 18px;
}
.account-notif-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.account-notif-item {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}
.account-notif-item:last-child {
  border-bottom: 0;
}
.account-notif-item:hover {
  background: #f8fafc;
  box-shadow: none;
}
.account-notif-item.is-unread {
  background: #fff;
}
.account-notif-item.is-unread:hover {
  background: #fafafa;
}
.account-notif-item.is-read .account-notif-top strong {
  font-weight: 500;
  color: #334155;
}
.account-notif-item.is-read .account-notif-body p {
  color: #94a3b8;
}
.account-notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: transparent;
  margin-top: 7px;
  flex-shrink: 0;
}
.account-notif-item.is-unread .account-notif-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.account-notif-body {
  min-width: 0;
  flex: 1;
}
.account-notif-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.account-notif-top strong {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.account-notif-top time {
  font-size: 11px;
  color: #94a3b8;
  flex-shrink: 0;
  white-space: nowrap;
}
.account-notif-body p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-empty {
  border: 1px dashed #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 48px 24px;
}
.notif-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #eef2f7;
}
.notif-empty h2 {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}
.notif-empty p {
  color: #94a3b8;
}
@media (max-width: 640px) {
  .account-notif-item {
    padding: 14px 14px;
  }
  .account-notif-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
.profile-page--embedded,
.likes-page--embedded {
  min-height: 0;
  padding: 0;
  background: transparent;
}
.account-page .cart-page--embedded {
  min-height: 0;
  padding: 0;
  background: transparent;
}
.account-page .checkout-page--embedded {
  min-height: 0;
  padding: 0;
  background: transparent;
}
.account-page .order-page--embedded.order-detail-page {
  min-height: 0;
  padding: 0;
  background: transparent;
}
.account-page .order-page--embedded .order-detail-inner,
.account-page .order-page--embedded .tagihan-flash {
  position: relative;
  z-index: 1;
}
.account-page .checkout-page--embedded .checkout-info,
.account-page .checkout-page--embedded .tagihan-flash,
.account-page .checkout-page--embedded .cart-layout {
  position: relative;
  z-index: 1;
}
.checkout-item-readonly {
  grid-template-columns: 96px 1fr auto !important;
  align-items: center;
}
.checkout-item-readonly .cart-item-accent {
  display: none;
}
.checkout-item-readonly .cart-item-subtotal {
  justify-self: end;
  text-align: right;
}
@media (max-width: 900px) {
  .checkout-item-readonly {
    grid-template-columns: 80px 1fr !important;
    grid-template-areas:
      "thumb info"
      "thumb subtotal" !important;
  }
  .checkout-item-readonly .cart-item-thumb { grid-area: thumb; }
  .checkout-item-readonly .cart-item-info { grid-area: info; }
  .checkout-item-readonly .cart-item-subtotal {
    grid-area: subtotal;
    text-align: left;
    justify-self: start;
  }
}
.cart-account-header {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
  align-items: flex-start;
}
.cart-account-header .cart-hero-stats {
  align-self: flex-start;
}
.account-page .cart-page--embedded .cart-layout {
  position: relative;
  z-index: 1;
}
.account-page .cart-page--embedded .tagihan-flash {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
}
.account-page .cart-page--embedded .cart-empty .btn-primary {
  display: inline-flex;
  margin-top: 8px;
}
.profile-page--embedded .profile-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  max-width: none;
}
.profile-page--embedded .profile-hero,
.profile-page--embedded .profile-panel {
  height: 100%;
  margin: 0;
}
.profile-hero-main--stack {
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: none;
  padding: 28px 24px 20px;
}
.profile-hero-info--center {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.profile-hero-badges--center {
  justify-content: center;
}
.profile-avatar-wrap--lg,
.profile-hero-avatar--lg {
  width: 96px;
  height: 96px;
}
.profile-avatar-wrap--lg .profile-avatar-upload {
  border-radius: 18px;
}
.profile-hero-avatar--lg {
  border-radius: 18px;
}
.profile-row-value--wrap {
  white-space: normal;
  line-height: 1.45;
}

.profile-password-form {
  margin-top: 12px;
}
.profile-password-form .profile-panel-title {
  margin-bottom: 4px;
  padding-bottom: 0;
  border-bottom: 0;
}
.profile-password-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.profile-password-form-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.profile-password-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.profile-password-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-password-field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.profile-password-field--full {
  grid-column: 1 / -1;
}
.profile-password-submit {
  flex-shrink: 0;
  height: 40px;
  padding: 0 18px;
  font-size: 13px;
}
.form-error {
  font-size: 12px;
  color: #dc2626;
}
@media (max-width: 900px) {
  .profile-password-form-head {
    flex-direction: column;
    align-items: stretch;
  }
  .profile-password-submit {
    width: 100%;
  }
  .profile-password-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .profile-page--embedded .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-info-grid {
    grid-template-columns: 1fr;
  }
}
.account-page .pesanan-page.orders-page,
.account-page .tagihan-page {
  min-height: 0;
}
.account-page .tagihan-page-bg {
  display: none;
}

@media (max-width: 900px) {
  .account-sidebar {
    position: static;
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
  }
  .account-sidebar-toggle {
    display: flex;
  }
  .account-sidebar-panel {
    display: none;
    padding-top: 14px;
  }
  .account-sidebar.is-open .account-sidebar-panel {
    display: block;
  }
  .account-sidebar.is-open .filter-toggle-chevron {
    transform: rotate(180deg);
  }
  .account-main {
    padding: 20px 16px 32px;
  }
  .account-sidebar-profile {
    flex-direction: row;
    text-align: left;
    align-items: center;
  }
  .account-sidebar-avatar {
    width: 64px;
    height: 64px;
  }
  .account-sidebar-badges {
    justify-content: flex-start;
  }
}

/* ── PESANAN RESELLER (premium, shared tagihan tokens) ── */
.pesanan-page.orders-page {
  position: relative;
  background: transparent;
}

.pesanan-order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.po-order {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.po-order.po-order--clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.po-order.po-order--clickable:hover {
  border-color: #fecaca;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

.po-order.po-order--clickable:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.po-order.is-overdue {
  border-color: #fecaca;
}

.po-order.is-due-soon {
  border-color: #fde68a;
}

.po-order.is-lunas {
  border-color: #86efac;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08);
}

.po-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.po-order-shop {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.po-order-shop-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fef2f2;
  color: #dc2626;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.po-order-shop-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.po-order-shop-meta strong {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.po-order-shop-meta span {
  font-size: 11px;
  color: #94a3b8;
}

.po-order-due {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.po-order-due.is-due-soon {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.po-order-due.is-overdue {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.po-order-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  flex-shrink: 0;
  max-width: 48%;
}

.po-order-status-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.po-order-status-hint.ok { color: #059669; }
.po-order-status-hint.warn { color: #d97706; }
.po-order-status-hint.danger { color: #dc2626; }
.po-order-status-hint.muted { color: #94a3b8; }
.po-order-status-hint.info { color: #2563eb; }

.po-order-status-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #dc2626;
  text-transform: uppercase;
}

.po-order-status-label.ok { color: #059669; }
.po-order-status-label.warn { color: #d97706; }
.po-order-status-label.danger { color: #dc2626; }
.po-order-status-label.muted { color: #94a3b8; }
.po-order-status-label.info { color: #2563eb; }

.po-order-status-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill.info {
  background: #DBEAFE;
  color: #1D4ED8;
  border-color: #BFDBFE;
}

.po-order-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
}

.po-order-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: flex-start;
}

.po-order-item--empty {
  grid-template-columns: 1fr;
  color: #94a3b8;
  font-size: 13px;
}

.po-order-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  overflow: hidden;
  flex-shrink: 0;
}

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

.po-order-thumb-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #cbd5e1;
}

.po-order-item-info {
  min-width: 0;
}

.po-order-item-name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.po-order-item-sku,
.po-order-item-qty {
  margin: 3px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.po-order-item-price {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
}

.po-order-more {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-align: left;
  width: fit-content;
}

.po-order-more:hover {
  color: #dc2626;
}

.po-order-total {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 8px;
  padding: 0 16px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.po-order-total span {
  font-size: 13px;
  color: #64748b;
}

.po-order-total strong {
  font-size: 18px;
  font-weight: 700;
  color: #dc2626;
}

.po-order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 14px;
  flex-wrap: wrap;
}

.po-order-foot-note {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  min-width: 0;
  flex: 1;
}

.po-order-foot-note strong {
  color: #dc2626;
  font-weight: 700;
}

.po-order-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.po-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.po-btn-secondary {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
}

.po-btn-secondary:hover {
  border-color: #fca5a5;
  color: #b91c1c;
}

.po-btn-primary {
  border: 1px solid #dc2626;
  background: #dc2626;
  color: #fff;
}

.po-btn-primary:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.po-btn-danger {
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
}

.po-btn-danger:hover {
  border-color: #f87171;
  background: #fef2f2;
  color: #991b1b;
}

@media (max-width: 640px) {
  .po-order-head {
    flex-direction: column;
    align-items: stretch;
  }
  .po-order-status {
    align-items: flex-start;
    text-align: left;
    max-width: none;
  }
  .po-order-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .po-order-item-price {
    grid-column: 2;
  }
  .po-order-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .po-order-actions {
    width: 100%;
  }
  .po-order-actions .po-btn {
    flex: 1;
    text-align: center;
  }
}

.pesanan-card {
  cursor: default;
}

.pesanan-card .tagihan-card-actions {
  margin-top: 4px;
}

.po-modal-link {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}

.po-modal-link:hover {
  text-decoration: underline;
}

.tm-history-row .status-pill {
  margin-top: 6px;
}

.pesanan-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.pesanan-card-alerts {
  min-width: 0;
  flex: 1;
}

.pesanan-alert {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  background: rgba(255, 255, 255, .78);
  color: #64748B;
  border: 1px solid rgba(255, 255, 255, .92);
  backdrop-filter: blur(4px);
}

.pesanan-alert.warn {
  background: rgba(255, 251, 235, .92);
  color: #B45309;
  border-color: rgba(253, 230, 138, .85);
}

.pesanan-alert.danger {
  background: rgba(254, 242, 242, .92);
  color: #B91C1C;
  border-color: rgba(254, 202, 202, .85);
}

.pesanan-card-link {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  transition: transform .2s ease, opacity .2s ease;
}

.pesanan-card:hover .pesanan-card-link {
  transform: translateX(2px);
}

.pesanan-card .pesanan-card-foot {
  margin-bottom: 0;
}

.pesanan-page .pagination-wrap {
  margin-top: 20px;
}

.pesanan-page .cart-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

/* ── KERANJANG ENHANCED UI & ANIMATIONS ── */
.cart-page {
  position: relative;
}

.cart-page-bg {
  position: absolute;
  inset: 0 -16px 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 8% 0%, rgba(248, 113, 113, .14), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 5%, rgba(220, 38, 38, .08), transparent 50%),
    linear-gradient(180deg, #FFF5F5 0%, #fff 100%);
  background-color: #fff;
}

.cart-page > :not(.cart-page-bg) {
  position: relative;
  z-index: 1;
}

.cart-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.cart-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(254, 202, 202, .55);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.cart-hero-title {
  background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cart-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: center;
}

.cart-hero-stat {
  min-width: 110px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  transition: transform .25s ease, box-shadow .25s ease;
}

.cart-hero-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
}

.cart-hero-stat.highlight {
  border-color: #FECACA;
  background: linear-gradient(145deg, #FFF5F5 0%, #fff 100%);
}

.cart-hero-stat .label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 4px;
}

.cart-hero-stat strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.cart-hero-stat.highlight strong { color: var(--red); }

.cart-page .cart-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity .5s cubic-bezier(.22, 1, .36, 1),
    transform .5s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.cart-page.is-ready .cart-reveal {
  opacity: 1;
  transform: translateY(0);
}

.cart-page .cart-item {
  position: relative;
  overflow: hidden;
  grid-template-columns: 96px 1fr auto auto auto auto;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 16px;
  transition:
    transform .28s cubic-bezier(.22, 1, .36, 1),
    box-shadow .28s ease,
    border-color .28s ease;
}

.cart-page .cart-item--selectable .cart-item-accent {
  display: none;
}

.cart-page .cart-item--selectable {
  grid-template-columns: 28px 96px 1fr auto auto auto auto;
}

.cart-page .cart-item--selectable:not(.is-selected) {
  opacity: .72;
}

.cart-page .cart-item--selectable.is-selected {
  border-color: #E5E7EB;
  background: #fff;
}

.cart-select-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.cart-select-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.cart-select-all input {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

.cart-select-hint {
  font-size: 12px;
  color: var(--muted);
}

.cart-item-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cart-item-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cart-item-check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid #CBD5E1;
  border-radius: 5px;
  background: #fff;
  display: inline-block;
  position: relative;
  transition: border-color .15s ease, background .15s ease;
}

.cart-item-check input:checked + .cart-item-check-box {
  border-color: var(--red);
  background: var(--red);
}

.cart-item-check input:checked + .cart-item-check-box::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cart-item-check input:focus-visible + .cart-item-check-box {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .15);
}

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

.checkout-submit-btn.disabled,
.checkout-submit-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

.cart-page .cart-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
  border-color: #FECACA;
}

.cart-item-accent {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #FCA5A5, var(--red));
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}

.cart-page.is-ready .cart-item-accent {
  transform: scaleY(1);
}

.cart-page .cart-item-thumb {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  transition: transform .25s ease;
}

.cart-page .cart-item:hover .cart-item-thumb {
  transform: scale(1.03);
}

.cart-page .cart-item-price .mini-label,
.cart-page .cart-item-subtotal .mini-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 3px;
  font-weight: 500;
}

.cart-page .cart-item-subtotal strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--red);
}

.qty-stepper--modern {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #F9FAFB;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03);
}

.qty-stepper--modern .qty-btn {
  width: 36px;
  height: 38px;
  border: none;
  background: #fff;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  font-family: inherit;
}

.qty-stepper--modern .qty-btn:hover:not(:disabled) {
  background: #FEF2F2;
  color: var(--red);
}

.qty-stepper--modern .qty-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.qty-stepper--modern input {
  width: 52px;
  height: 38px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: #fff;
}

.cart-page .btn-remove {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #9CA3AF;
  transition:
    transform .2s ease,
    color .2s ease,
    background .2s ease,
    border-color .2s ease;
}

.cart-page .btn-remove:hover {
  color: #B91C1C;
  background: #FEF2F2;
  border-color: #FECACA;
  transform: scale(1.05);
}

.cart-page .cart-summary {
  position: sticky;
  top: 88px;
  overflow: hidden;
  border-radius: 18px;
  padding: 0;
  border: 1px solid #E8EDF3;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
  transition: transform .3s ease, box-shadow .3s ease;
}

.cart-page .cart-summary:hover {
  box-shadow: 0 16px 40px rgba(15, 23, 42, .1);
}

.cart-summary-accent {
  height: 4px;
  background: linear-gradient(90deg, #F87171, var(--red));
}

.cart-summary-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.cart-summary-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FEE2E2, #FECACA);
  color: var(--red);
  flex-shrink: 0;
}

.cart-page .cart-summary-title {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 16px;
}

.cart-summary-breakdown {
  padding: 16px 22px 0;
}

.cart-page .cart-summary-total {
  margin: 8px 22px 20px;
  padding: 16px 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #FFF5F5 0%, #FFF 100%);
  border: 1px solid #FECACA;
}

.cart-summary-actions {
  padding: 0 22px 22px;
}

.cart-checkout-btn,
.cart-continue-btn,
.cart-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cart-checkout-btn {
  box-shadow: 0 6px 18px rgba(220, 38, 38, .25);
  transition: transform .2s ease, box-shadow .2s ease;
}

.cart-checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(220, 38, 38, .3);
}

.cart-page .cart-empty {
  padding: 72px 28px;
  border-radius: 18px;
  background: linear-gradient(160deg, #FAFAFA 0%, #fff 100%);
  border: 1px dashed #D1D5DB;
}

.cart-empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F3F4F6;
  animation: cart-empty-pulse 2.8s ease-in-out infinite;
}

.cart-empty-icon svg {
  width: 40px;
  height: 40px;
  color: #9CA3AF;
  margin: 0;
}

@keyframes cart-empty-pulse {
  0%, 100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.06); opacity: 1; }
}

.cart-page.is-ready .cart-empty {
  animation: cart-empty-float 5s ease-in-out 1s infinite;
}

@keyframes cart-empty-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
  .cart-page .cart-reveal,
  .cart-item-accent,
  .cart-empty-icon,
  .cart-page.is-ready .cart-empty {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

@media (max-width: 900px) {
  .cart-hero { flex-direction: column; }
  .cart-hero-stats { width: 100%; }
  .cart-hero-stat { flex: 1; min-width: 0; }
  .cart-account-header .cart-hero-stats { width: 100%; }
  .cart-page .cart-item {
    grid-template-columns: 80px 1fr auto;
    grid-template-areas:
      "thumb info remove"
      "thumb price remove"
      "qty qty subtotal";
    gap: 12px 14px;
  }
  .cart-page .cart-item--selectable {
    grid-template-columns: 24px 80px 1fr auto;
    grid-template-areas:
      "check thumb info remove"
      "check thumb price remove"
      "check qty qty subtotal";
  }
  .cart-page .cart-item--selectable .cart-item-check { grid-area: check; align-self: start; padding-top: 4px; }
  .cart-page .cart-item-thumb { width: 80px; height: 80px; grid-area: thumb; }
  .cart-page .cart-item-info { grid-area: info; }
  .cart-page .cart-item-price { grid-area: price; text-align: left; }
  .cart-qty-form { grid-area: qty; }
  .cart-page .cart-item-subtotal { grid-area: subtotal; text-align: right; }
  .cart-remove-form,
  .cart-page .cart-item--selectable .btn-remove { grid-area: remove; align-self: start; }
}

/* ── CHECKOUT ENHANCED UI & ANIMATIONS ── */
.checkout-page {
  position: relative;
}

.checkout-page-bg {
  position: absolute;
  inset: 0 -16px 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 8% 0%, rgba(248, 113, 113, .14), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 5%, rgba(220, 38, 38, .08), transparent 50%),
    linear-gradient(180deg, #FFF5F5 0%, #fff 100%);
  background-color: #fff;
}

.checkout-page > :not(.checkout-page-bg) {
  position: relative;
  z-index: 1;
}

.checkout-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.checkout-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(253, 230, 138, .7);
  color: #B45309;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.checkout-hero-title {
  background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.checkout-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: center;
}

.checkout-hero-stat {
  min-width: 110px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  transition: transform .25s ease, box-shadow .25s ease;
}

.checkout-hero-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
}

.checkout-hero-stat.highlight {
  border-color: #FDE68A;
  background: linear-gradient(145deg, #FFFBEB 0%, #fff 100%);
}

.checkout-hero-stat .label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 4px;
}

.checkout-hero-stat strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.checkout-hero-stat.highlight strong { color: var(--red); }

.checkout-page .checkout-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity .5s cubic-bezier(.22, 1, .36, 1),
    transform .5s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.checkout-page.is-ready .checkout-reveal {
  opacity: 1;
  transform: translateY(0);
}

.checkout-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 14px;
  border: 1px solid transparent;
}

.checkout-info svg { flex-shrink: 0; margin-top: 1px; }

.checkout-info--warn {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEFCE8 100%);
  border-color: #FDE68A;
  color: #92400E;
}

.checkout-info--warn svg { color: #D97706; }

.checkout-info--danger {
  background: linear-gradient(135deg, #FEF2F2 0%, #FFF5F5 100%);
  border-color: #FECACA;
  color: #991B1B;
}

.checkout-info--danger svg { color: #DC2626; }

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.checkout-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.checkout-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  transition: box-shadow .25s ease;
}

.checkout-panel:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.checkout-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #FAFCFF 100%);
}

.checkout-panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.checkout-panel-head span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.checkout-items {
  list-style: none;
  margin: 0;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-item {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  transition:
    transform .25s ease,
    background .25s ease,
    box-shadow .25s ease,
    border-color .25s ease;
}

.checkout-item:hover {
  background: #FFFBFB;
  border-color: #FECACA;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
  transform: translateY(-1px);
}

.checkout-item-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #FCA5A5, var(--red));
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
}

.checkout-page.is-ready .checkout-item-accent {
  transform: scaleY(1);
}

.checkout-item-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.checkout-item-thumb svg {
  opacity: .25;
  stroke: #9CA3AF;
}

.checkout-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.checkout-item-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.checkout-item-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
}

.checkout-form-panel {
  padding-bottom: 4px;
}

.checkout-summary-form {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  margin-top: 0;
}

.checkout-summary-form.checkout-form {
  padding: 14px 20px;
}

.checkout-summary-form .checkout-field span em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
}

.checkout-form {
  padding: 16px 20px 20px;
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkout-field[hidden],
.checkout-resi-fields[hidden],
.checkout-alamat-fields[hidden],
.checkout-whatsapp-resi-note[hidden] {
  display: none !important;
}

.checkout-field span {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.checkout-textarea {
  min-height: 96px;
  border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.checkout-textarea:focus {
  border-color: #FCA5A5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
}

.checkout-summary-form .checkout-input,
.checkout-summary-form .checkout-file {
  border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.checkout-summary-form .checkout-input:focus,
.checkout-summary-form .checkout-file:focus {
  border-color: #FCA5A5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
  outline: none;
}

.checkout-field-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted, #94a3b8);
}

.checkout-field-error {
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
}

.checkout-shipping-type-field {
  margin-bottom: 2px;
}

.checkout-shipping-type-options {
  display: grid;
  gap: 10px;
}

.checkout-shipping-type-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.checkout-shipping-type-option:hover {
  border-color: #FECACA;
  background: #FFFBFB;
}

.checkout-shipping-type-option.is-selected {
  border-color: #DC2626;
  background: #FFF5F5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
}

.checkout-shipping-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkout-shipping-type-radio {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 999px;
  border: 2px solid #CBD5E1;
  flex-shrink: 0;
  position: relative;
}

.checkout-shipping-type-option.is-selected .checkout-shipping-type-radio {
  border-color: #DC2626;
}

.checkout-shipping-type-option.is-selected .checkout-shipping-type-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: #DC2626;
}

.checkout-shipping-type-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checkout-shipping-type-copy strong {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
}

.checkout-shipping-type-copy em {
  font-size: 12px;
  font-style: normal;
  color: #64748B;
}

.tm-shipping-type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tm-shipping-type-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  transition: border-color .2s ease, background .2s ease;
}

.tm-shipping-type-option.is-selected {
  border-color: #DC2626;
  background: #FFF5F5;
  color: #B91C1C;
}

.tm-shipping-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkout-summary-row--discount strong {
  color: #059669;
}

.checkout-voucher-box {
  padding: 0 20px 12px;
}

.checkout-voucher-picker {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px dashed #FECACA;
  border-radius: 12px;
  background: #FFF8F8;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: border-color .2s ease, background .2s ease;
}

.checkout-voucher-picker:hover {
  border-color: #FCA5A5;
  background: #FEF2F2;
}

.checkout-voucher-picker-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #FECACA;
  color: var(--red);
  flex-shrink: 0;
}

.checkout-voucher-picker-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checkout-voucher-picker-copy strong {
  font-size: 13px;
  font-weight: 700;
}

.checkout-voucher-picker-copy em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.checkout-voucher-picker-chevron {
  color: #94A3B8;
  flex-shrink: 0;
}

.checkout-voucher-applied-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.checkout-voucher-change {
  border: none;
  background: transparent;
  color: #047857;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.checkout-voucher-change:hover {
  background: #D1FAE5;
}

.checkout-voucher-form .checkout-field {
  gap: 6px;
}

.checkout-voucher-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.checkout-voucher-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.checkout-voucher-input:focus {
  outline: none;
  border-color: #FCA5A5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
}

.checkout-voucher-apply {
  flex-shrink: 0;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  white-space: nowrap;
}

.checkout-voucher-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #A7F3D0;
  border-radius: 12px;
  background: #ECFDF5;
}

.checkout-voucher-applied strong {
  display: block;
  font-size: 13px;
  color: #065F46;
}

.checkout-voucher-applied span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #047857;
}

.checkout-voucher-remove {
  border: none;
  background: transparent;
  color: #B91C1C;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.checkout-voucher-remove:hover {
  background: #FEF2F2;
}

.checkout-voucher-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #B45309;
}

body.checkout-voucher-modal-open {
  overflow: hidden;
}

.checkout-voucher-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.checkout-voucher-modal[hidden] {
  display: none !important;
}

.checkout-voucher-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
}

.checkout-voucher-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(82vh, 640px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, .18);
}

@media (min-width: 640px) {
  .checkout-voucher-modal {
    align-items: center;
    padding: 24px;
  }
  .checkout-voucher-modal-dialog {
    border-radius: 16px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .2);
  }
}

.checkout-voucher-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.checkout-voucher-modal-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.checkout-voucher-modal-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.checkout-voucher-modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #64748B;
  cursor: pointer;
  flex-shrink: 0;
}

.checkout-voucher-modal-close:hover {
  background: #F8FAFC;
}

.checkout-voucher-modal-body {
  overflow-y: auto;
  padding: 12px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-voucher-option {
  margin: 0;
}

.checkout-voucher-option-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  color: inherit;
  transition: border-color .2s ease, background .2s ease;
}

.checkout-voucher-option:not(.is-disabled) .checkout-voucher-option-btn:hover {
  border-color: #FCA5A5;
  background: #FFF8F8;
}

.checkout-voucher-option.is-selected .checkout-voucher-option-btn {
  border-color: #6EE7B7;
  background: #ECFDF5;
}

.checkout-voucher-option.is-disabled .checkout-voucher-option-btn {
  opacity: .55;
  cursor: not-allowed;
  background: #F8FAFC;
}

.checkout-voucher-option-value {
  min-width: 72px;
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
  flex-shrink: 0;
}

.checkout-voucher-option-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checkout-voucher-option-copy strong {
  font-size: 13px;
  color: var(--text);
}

.checkout-voucher-option-copy em,
.checkout-voucher-option-copy small {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.checkout-voucher-option-check {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
}

.checkout-voucher-option.is-selected .checkout-voucher-option-check {
  color: #047857;
}

.checkout-voucher-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

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

.voucher-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.voucher-card-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -0.02em;
}

.voucher-card-body strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.voucher-card-body code {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.voucher-card-body p,
.voucher-card-body ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.voucher-card-cta {
  margin-top: auto;
  justify-content: center;
}

.checkout-summary {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 104px);
  max-height: calc(100dvh - 104px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow: none;
}

.checkout-summary:hover {
  box-shadow: none;
}

.checkout-summary-accent {
  height: 4px;
  background: linear-gradient(90deg, #FBBF24, #F59E0B);
}

.checkout-summary-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.checkout-summary-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: #B45309;
  flex-shrink: 0;
}

.checkout-summary-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.checkout-summary-rows {
  padding: 14px 20px 4px;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
  color: var(--muted);
}

.checkout-summary-row strong {
  color: var(--text);
  font-weight: 600;
}

.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 20px 16px;
  padding: 14px 0 0;
  border-radius: 0;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
}

.checkout-summary-total span:first-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.checkout-summary-total span:last-child {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}

.checkout-summary-steps {
  padding: 0 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
}

.checkout-step-num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #FEF3C7;
  color: #B45309;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkout-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px 20px;
}

.checkout-submit-btn,
.checkout-cancel-btn,
.checkout-continue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 18px;
  border-radius: 10px;
}

.checkout-continue-btn {
  color: var(--text);
  border-color: var(--border);
  background: #fff;
}

.checkout-continue-btn:hover {
  background: var(--surface2);
}

.checkout-cancel-btn {
  color: #B91C1C;
  border-color: #FECACA;
  background: #FFF;
}

.checkout-cancel-btn:hover {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #991B1B;
}

.checkout-submit-btn {
  box-shadow: none;
  transition: background .2s ease, border-color .2s ease;
}

.checkout-submit-btn:hover {
  transform: none;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .checkout-page .checkout-reveal,
  .checkout-item-accent {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .checkout-item:hover {
    transform: none;
  }
}

@media (max-width: 900px) {
  .checkout-hero { flex-direction: column; }
  .checkout-hero-stats { width: 100%; }
  .checkout-hero-stat { flex: 1; min-width: 0; }
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  .checkout-item {
    grid-template-columns: 64px 1fr;
    grid-template-areas:
      "thumb body"
      "thumb price";
  }
  .checkout-item-thumb { width: 64px; height: 64px; grid-area: thumb; }
  .checkout-item-body { grid-area: body; }
  .checkout-item-price { grid-area: price; justify-self: start; }
}

/* ── PESANAN DETAIL ENHANCED UI ── */
.order-page.order-detail-page {
  display: block;
  background: #fff;
}

.order-page {
  position: relative;
}

.order-page-bg {
  position: absolute;
  inset: 0 -16px 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 8% 0%, rgba(248, 113, 113, .14), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 5%, rgba(220, 38, 38, .08), transparent 50%),
    linear-gradient(180deg, #FFF5F5 0%, #fff 100%);
  background-color: #fff;
}

.order-detail-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.order-page .order-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity .5s cubic-bezier(.22, 1, .36, 1),
    transform .5s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.order-page.is-ready .order-reveal {
  opacity: 1;
  transform: translateY(0);
}

.order-hero-title {
  background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.order-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.order-breadcrumb span:last-child {
  color: var(--text);
  font-weight: 600;
}

.order-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  transition: box-shadow .25s ease;
}

.order-panel:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.order-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.order-panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.order-panel-head span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.order-panel-body {
  padding: 16px 20px 20px;
}

.order-items {
  list-style: none;
  margin: 0;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-page .order-item-row {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  border-bottom: none;
  transition:
    transform .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}

.order-page .order-item-row:hover {
  border-color: #FECACA;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
  transform: translateY(-1px);
}

.order-item-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #FCA5A5, var(--red));
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
}

.order-page.is-ready .order-item-accent {
  transform: scaleY(1);
}

.order-page .order-item-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
}

.order-item-body { min-width: 0; }

.order-page .order-item-name {
  font-size: 14px;
}

.order-page .order-item-qty,
.order-page .order-item-subtotal {
  text-align: right;
}

.order-page .order-item-qty .mini-label,
.order-page .order-item-subtotal .mini-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 3px;
  font-weight: 500;
}

.order-page .order-item-qty strong,
.order-page .order-item-subtotal strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.order-page .order-item-subtotal strong {
  font-size: 15px;
  color: var(--red);
}

.order-item-unit {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.order-note {
  margin: 0 16px 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #F9FAFB;
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.55;
}

.order-note strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 6px;
}

.order-note p {
  margin: 0;
  color: var(--text);
}

.order-form-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.order-payments {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.order-page .payment-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #FAFAFA;
  border-bottom: none;
}

.order-page .payment-card:hover {
  border-color: #FECACA;
  background: #FFFBFB;
}

.payment-card-side {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.order-detail-sidebar {
  top: 88px;
  gap: 16px;
  background: transparent;
}

.order-page .checkout-summary .sidebar-alert {
  margin: 0 22px 16px;
}

.order-pay-section {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, #FFFBFB 0%, #fff 100%);
}

.order-pay-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.order-pay-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 55%, #B91C1C 100%);
  box-shadow:
    0 8px 22px rgba(220, 38, 38, .28),
    inset 0 1px 0 rgba(255, 255, 255, .18);
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    opacity .2s ease;
}

.order-pay-btn svg {
  flex-shrink: 0;
  opacity: .95;
}

.order-pay-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 28px rgba(220, 38, 38, .34),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}

.order-pay-btn:active {
  transform: translateY(0);
  box-shadow:
    0 4px 14px rgba(220, 38, 38, .24),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}

.order-pay-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(254, 202, 202, .9),
    0 8px 22px rgba(220, 38, 38, .28);
}

.order-pay-btn:disabled,
.order-pay-btn.is-loading {
  opacity: .72;
  cursor: wait;
  transform: none;
  box-shadow: 0 4px 14px rgba(220, 38, 38, .18);
}

.order-pay-status {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.order-pay-status.is-error {
  color: #B91C1C;
}

.order-pay-pending {
  margin: 0 22px 16px;
}

.order-upload-wrap {
  padding: 0 22px 22px;
}

.order-upload-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.warn-text { color: #B45309; font-weight: 600; }

.order-file-input { padding: 8px !important; }

.order-upload-btn {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .order-page .order-reveal,
  .order-item-accent {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .order-page .order-item-row:hover {
    transform: none;
  }

  .order-pay-btn:hover,
  .order-pay-btn:active {
    transform: none;
  }
}

@media (max-width: 900px) {
  .order-detail-inner { grid-template-columns: 1fr; }
  .order-detail-sidebar { position: static; }
  .order-page .order-item-row {
    grid-template-columns: 64px 1fr;
    grid-template-areas:
      "thumb body"
      "thumb qty"
      "thumb subtotal";
  }
  .order-page .order-item-thumb { grid-area: thumb; width: 64px; height: 64px; }
  .order-item-body { grid-area: body; }
  .order-page .order-item-qty { grid-area: qty; text-align: left; }
  .order-page .order-item-subtotal { grid-area: subtotal; text-align: left; }
}

/* —— Floating chat (reseller ↔ warehouse) —— */
.r-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: Inter, system-ui, sans-serif;
}
.r-chat-fab {
  position: relative;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 10px 28px rgba(220, 38, 38, 0.35);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
.r-chat-fab:hover { background: #b91c1c; transform: translateY(-1px); }
.r-chat-fab.is-open { background: #111827; box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
.r-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: none;
  place-items: center;
  border: 2px solid #fff;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
  box-sizing: border-box;
}
.r-chat-badge.is-visible,
.r-chat-badge:not([hidden]) {
  display: grid !important;
}
.r-chat-badge[hidden] {
  display: none !important;
}
.r-chat-fab.is-open .r-chat-badge {
  background: #dc2626;
}
.r-chat-panel {
  width: min(360px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 120px));
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.r-chat-panel.is-open {
  display: flex;
}
.r-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
}
.r-chat-title { margin: 0; font-size: 14px; font-weight: 700; }
.r-chat-sub { margin: 2px 0 0; font-size: 11px; color: rgba(255,255,255,0.65); }
.r-chat-close {
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.r-chat-close:hover { background: rgba(255,255,255,0.18); }
.r-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.r-chat-messages[hidden],
.r-chat-compose[hidden],
.r-chat-attach-preview[hidden] {
  display: none !important;
}
.r-chat-empty {
  margin: auto;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  padding: 24px 12px;
  max-width: 220px;
  line-height: 1.45;
}
.r-chat-bubble { display: flex; }
.r-chat-bubble.is-mine { justify-content: flex-end; }
.r-chat-bubble-inner {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.r-chat-bubble.is-mine .r-chat-bubble-inner {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  border-bottom-right-radius: 5px;
}
.r-chat-bubble:not(.is-mine) .r-chat-bubble-inner {
  border-bottom-left-radius: 5px;
}
.r-chat-bubble-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.r-chat-bubble-time {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.65;
}
.r-chat-compose {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}
.r-chat-compose-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.r-chat-attach-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: #334155;
}
.r-chat-attach-preview button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.r-chat-attach {
  width: 40px;
  height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.r-chat-attach:hover {
  border-color: #fecaca;
  color: #dc2626;
  background: #fff7f7;
}
.r-chat-attach input { display: none; }
.r-chat-compose textarea {
  flex: 1;
  min-height: 40px;
  max-height: 96px;
  resize: none;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  outline: none;
}
.r-chat-compose textarea:focus {
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.r-chat-bubble-image {
  display: block;
  max-width: 220px;
  max-height: 180px;
  border-radius: 10px;
  margin-bottom: 6px;
  object-fit: cover;
}
.r-chat-bubble-file {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  color: inherit;
  text-decoration: none;
  font-size: 12px;
}
.r-chat-bubble.is-mine .r-chat-bubble-file {
  background: rgba(255, 255, 255, 0.18);
}
.r-chat-bubble-file-name {
  display: block;
  font-weight: 700;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.r-chat-bubble-file-size {
  display: block;
  opacity: 0.75;
  font-size: 11px;
}
.r-chat-send {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: #dc2626;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.r-chat-send:hover { background: #b91c1c; }
@media (max-width: 480px) {
  .r-chat { right: 12px; bottom: 12px; }
  .r-chat-panel { width: calc(100vw - 24px); height: min(70vh, 520px); }
}

/* ── RESELLER REKAP LAPORAN ── */
.account-page .laporan-page {
  min-height: 0;
  gap: 16px;
}

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

.laporan-summary-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.laporan-summary-card.is-accent {
  border-color: #FECACA;
  background: linear-gradient(145deg, #FFF5F5 0%, #fff 100%);
}

.laporan-summary-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.laporan-summary-card strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}

.laporan-summary-card.is-accent strong {
  color: var(--red);
}

.laporan-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.laporan-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2, #F8FAFC);
}

.laporan-panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.laporan-panel-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.laporan-table-wrap {
  overflow-x: auto;
}

.laporan-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1040px;
  font-size: 12px;
}

.laporan-table th,
.laporan-table td {
  border-bottom: 1px solid #EEF2F7;
  padding: 10px 12px;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--text);
}

.laporan-table thead th {
  background: #F8FAFC;
  color: #64748B;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.laporan-table tbody tr:hover {
  background: #FFF8F8;
}

.laporan-table tbody tr.is-empty-row {
  color: #94A3B8;
}

.laporan-table--bulanan tbody tr.is-sunday {
  background: #FFF1F2;
}

.laporan-table tfoot th {
  background: #FFF5F5;
  border-top: 1px solid #FECACA;
  color: var(--text);
  font-weight: 700;
}

.laporan-table .is-center { text-align: center; }
.laporan-table .is-right { text-align: right; font-variant-numeric: tabular-nums; }
.laporan-table .is-left {
  text-align: left;
  white-space: normal;
  min-width: 160px;
  max-width: 260px;
  line-height: 1.35;
}

.laporan-table .is-cut {
  background: #FFFBEB;
}

.laporan-table thead th.is-cut,
.laporan-table--harian thead tr:last-child th {
  background: #FFF7ED;
  color: #9A3412;
}

.laporan-table--shopee-fee {
  min-width: 1180px;
}

.laporan-table--shopee-fee thead th.is-fee-group {
  background: #EEF2FF;
  color: #3730A3;
  letter-spacing: .04em;
}

.laporan-th-sub {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  color: #94A3B8;
}

.laporan-table--shopee-fee thead tr:last-child th.is-cut {
  white-space: normal;
  line-height: 1.25;
  min-width: 108px;
  max-width: 132px;
  vertical-align: bottom;
}

.laporan-table .is-emphasis {
  font-weight: 700;
  color: var(--red);
}

.laporan-harga-jual-form,
.laporan-edit-form {
  display: flex;
  justify-content: flex-end;
}

.laporan-harga-jual-input,
.laporan-edit-input {
  width: 118px;
  max-width: 100%;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #fff;
  padding: 7px 10px;
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.laporan-harga-jual-input:focus,
.laporan-edit-input:focus {
  border-color: #F87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .18);
}

.laporan-harga-jual-input::placeholder,
.laporan-edit-input::placeholder {
  color: #94A3B8;
  font-size: 11px;
}

.laporan-table--shopee-fee .laporan-edit-input {
  width: 104px;
}

.laporan-table tfoot .is-emphasis {
  color: var(--red);
}

/* WhatsApp order-manual — same soft palette as Shopee/TikTok laporan */
.laporan-table--whatsapp {
  min-width: 1100px;
}

.laporan-table--whatsapp .is-left {
  text-align: left;
  white-space: normal;
  min-width: 0;
  max-width: none;
  line-height: 1.4;
}

.laporan-wa-alamat,
.laporan-wa-barang,
.laporan-wa-ket {
  min-width: 140px;
  max-width: 260px;
  white-space: pre-wrap;
}

.laporan-wa-badge {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.laporan-wa-badge--green {
  background: #d9f99d;
  color: #3f6212;
  border: 1px solid #a3e635;
}

.laporan-wa-badge--orange {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fdba74;
}

.laporan-wa-badge--sky {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #7dd3fc;
}

.laporan-wa-badge--violet {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #c4b5fd;
}

.laporan-wa-badge--rose {
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fda4af;
}

.laporan-wa-ship {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}

.laporan-wa-ship.is-reguler {
  background: #d9f99d;
  color: #3f6212;
  border: 1px solid #a3e635;
}

.laporan-wa-ship.is-instant {
  background: #166534;
  color: #fff;
  border: 1px solid #14532d;
}

.laporan-wa-ongkir {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text);
}

.laporan-wa-ongkir__rp {
  font-weight: 600;
}

.laporan-wa-ongkir__val {
  text-align: right;
  margin-left: auto;
}

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

@media (max-width: 560px) {
  .laporan-summary-grid {
    grid-template-columns: 1fr;
  }
}
/* Reseller order edit modal — premium layout */
.po-modal--edit .tm-panel-items {
  border: none;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}

.po-modal--edit .tm-header {
  background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
  border-bottom: 1px solid #e8edf3;
}

.roe-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.roe-section {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.03);
  overflow: hidden;
}

.roe-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #fcfdff 0%, #fff 100%);
}

.roe-section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.roe-section-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.roe-badge {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.roe-product-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 8px;
}

.roe-product-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid #e8edf3;
  border-radius: 16px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.roe-product-card:hover {
  border-color: #dbe4ef;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.roe-product-card.is-removed {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.2);
}

.roe-product-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  border: 1px solid #e8edf3;
  overflow: hidden;
  color: #94a3b8;
}

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

.roe-product-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.roe-product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.roe-product-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.roe-product-meta {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.roe-product-promo {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 10px;
  font-weight: 700;
}

.roe-product-remove {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff;
  color: #dc2626;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.roe-product-remove:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.roe-product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.roe-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.roe-stepper-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.roe-stepper-btn:hover {
  background: #fff5f5;
  color: #dc2626;
}

.roe-stepper-input {
  width: 44px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  appearance: textfield;
  -moz-appearance: textfield;
}

.roe-stepper-input::-webkit-outer-spin-button,
.roe-stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.roe-product-price {
  text-align: right;
}

.roe-product-unit {
  display: block;
  font-size: 11px;
  color: #94a3b8;
}

.roe-product-subtotal {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.roe-product-stock {
  margin: 0;
  font-size: 11px;
  color: #64748b;
}

.roe-bonus-list {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px dashed #fde68a;
}

.roe-bonus-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #92400e;
}

.roe-bonus-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #78350f;
}

.roe-bonus-row + .roe-bonus-row {
  margin-top: 6px;
}

.roe-bonus-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef3c7;
  font-size: 10px;
  font-weight: 700;
}

.roe-total-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border: 1px solid #fecaca;
  font-size: 13px;
  color: #64748b;
}

.roe-total-preview strong {
  font-size: 18px;
  font-weight: 800;
  color: #b91c1c;
  letter-spacing: -0.02em;
}

.roe-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  padding: 16px 20px 20px;
}

.roe-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roe-field-span-2 {
  grid-column: 1 / -1;
}

.roe-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.roe-label em {
  color: #dc2626;
  font-style: normal;
}

.roe-label small {
  font-weight: 500;
  color: #94a3b8;
}

.roe-input,
.roe-textarea,
.roe-file {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.roe-input,
.roe-file {
  min-height: 44px;
  padding: 0 14px;
}

.roe-textarea {
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

.roe-input:focus,
.roe-textarea:focus,
.roe-file:focus {
  outline: none;
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.roe-hint {
  font-size: 11px;
  color: #94a3b8;
}

.roe-link {
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  text-decoration: none;
}

.roe-link:hover {
  text-decoration: underline;
}

.roe-shipping-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.roe-shipping-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.roe-shipping-option:hover {
  border-color: #fecaca;
  background: #fffcfc;
}

.roe-shipping-option.is-selected {
  border-color: #dc2626;
  background: linear-gradient(180deg, #fff7f7 0%, #fff 100%);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.roe-shipping-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.roe-shipping-icon {
  font-size: 18px;
  line-height: 1;
}

.roe-shipping-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.roe-shipping-copy strong {
  font-size: 13px;
  color: #0f172a;
}

.roe-shipping-copy em {
  font-style: normal;
  font-size: 11px;
  color: #64748b;
}

.roe-form-actions {
  padding: 4px 2px 8px;
}

.roe-btn-primary {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.roe-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.28);
}

.roe-btn-primary:disabled,
.roe-btn-primary.is-loading {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.roe-form-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

.roe-form-status {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.roe-form-status.is-error {
  color: #dc2626;
}

.roe-cancel-block {
  margin-top: 6px;
  padding: 0 2px 8px;
}

.roe-cancel-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #fecaca;
  background: #fffafa;
}

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

.roe-btn-ghost,
.roe-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.roe-btn-ghost {
  flex: 1;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
}

.roe-btn-danger {
  flex: 1;
  border: none;
  background: #dc2626;
  color: #fff;
}

.roe-btn-ghost:hover {
  background: #f8fafc;
}

.roe-alert {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.5;
}

.roe-alert.is-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.roe-alert p {
  margin: 6px 0 0;
}

@media (max-width: 720px) {
  .roe-fields-grid,
  .roe-shipping-options {
    grid-template-columns: 1fr;
  }

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

  .roe-product-price {
    text-align: left;
  }
}

/* ── Edit Pesanan Page (premium) ── */
.roe-edit-page {
  --roe-edit-bg: #f8fafc;
  --roe-edit-border: #e8edf3;
  --roe-edit-text: #0f172a;
  --roe-edit-muted: #64748b;
  --roe-edit-accent: #dc2626;
  padding-bottom: 40px;
}

.roe-edit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.roe-edit-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--roe-edit-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.roe-edit-back:hover {
  color: var(--roe-edit-accent);
}

.roe-edit-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.roe-edit-title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--roe-edit-text);
  line-height: 1.2;
}

.roe-edit-code {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--roe-edit-border);
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.roe-edit-sub {
  margin: 0;
  max-width: 520px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--roe-edit-muted);
}

.roe-edit-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--roe-edit-border);
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.roe-edit-reset:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--roe-edit-text);
}

.roe-edit-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
  border: 1px solid #fde68a;
}

.roe-edit-notice-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #fef3c7;
  color: #b45309;
}

.roe-edit-notice p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #92400e;
}

.roe-edit-notice strong {
  font-weight: 700;
}

.roe-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.roe-edit-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.roe-resend-main:empty {
  display: none;
}

.roe-resend-main:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--roe-edit-border, #e2e8f0);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 12px 32px rgba(15, 23, 42, 0.04);
}

.roe-resend-main .roe-resend-status-card,
.roe-resend-main .roe-resend-panel,
.roe-resend-main .roe-resend-history {
  margin-bottom: 0;
}

.roe-resend-main .roe-resend-history {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.roe-resend-main .roe-detail-resend {
  margin: 0;
  padding: 0;
}

.roe-edit-panel {
  background: #fff;
  border: 1px solid var(--roe-edit-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 12px 32px rgba(15, 23, 42, 0.04);
}

.roe-edit-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #fcfdff 0%, #fff 100%);
}

.roe-edit-panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--roe-edit-text);
}

.roe-edit-panel-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--roe-edit-muted);
}

.roe-edit-count {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.roe-edit-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
}

.roe-edit-item {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--roe-edit-border);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.roe-edit-item:hover {
  border-color: #dbe4ef;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.roe-edit-item.is-new {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
}

.roe-edit-item-accent {
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #fca5a5, var(--roe-edit-accent));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.roe-edit-item:hover .roe-edit-item-accent {
  opacity: 1;
}

.roe-edit-item-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  border: 1px solid var(--roe-edit-border);
  overflow: hidden;
  color: #94a3b8;
}

.roe-edit-item-thumb--sm {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

.roe-edit-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.roe-edit-item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.roe-edit-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.roe-edit-item-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--roe-edit-text);
}

.roe-edit-item-meta {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

.roe-edit-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.roe-edit-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.roe-edit-tag.is-new {
  background: #dcfce7;
  color: #166534;
}

.roe-edit-tag.is-promo {
  background: #fef2f2;
  color: #b91c1c;
  text-transform: none;
}

.roe-edit-tag.is-bonus {
  background: #fef3c7;
  color: #92400e;
}

.roe-edit-tag.is-return {
  background: #fff1f2;
  color: #be123c;
}

.roe-edit-item-remove {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.roe-edit-item-remove:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--roe-edit-accent);
}

.roe-edit-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.roe-edit-stepper {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.roe-edit-stepper-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: background 0.15s ease, color 0.15s ease;
}

.roe-edit-stepper-btn:hover {
  background: #fff5f5;
  color: var(--roe-edit-accent);
}

.roe-edit-stepper-input {
  width: 44px;
  height: 32px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--roe-edit-text);
  -moz-appearance: textfield;
}

.roe-edit-stepper-input::-webkit-outer-spin-button,
.roe-edit-stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.roe-edit-item-price {
  text-align: right;
}

.roe-edit-item-price span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
}

.roe-edit-item-price strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--roe-edit-text);
}

.roe-edit-item-stock {
  margin: 0;
  font-size: 11px;
  color: var(--roe-edit-muted);
}

.roe-edit-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 20px;
  text-align: center;
  color: var(--roe-edit-muted);
}

.roe-edit-empty p {
  margin: 0;
  font-size: 13px;
}

.roe-edit-bonus {
  margin: 0 18px 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px dashed #fde68a;
}

.roe-edit-bonus-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #92400e;
}

.roe-edit-bonus-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #78350f;
}

.roe-edit-bonus-row + .roe-edit-bonus-row {
  margin-top: 6px;
}

.roe-edit-bonus-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: #a16207;
}

.roe-edit-search {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 16px 18px 18px;
}

.roe-edit-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--roe-edit-border);
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.roe-edit-search-field:focus-within {
  background: #fff;
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.roe-edit-search-field svg {
  flex-shrink: 0;
  color: #94a3b8;
}

.roe-edit-search-field input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--roe-edit-text);
}

.roe-edit-search-field input:focus {
  outline: none;
}

.roe-edit-search-field input::placeholder {
  color: #94a3b8;
}

.roe-edit-search-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: 14px;
  background: var(--roe-edit-text);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.roe-edit-search-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.roe-edit-search-hint,
.roe-edit-search-empty {
  margin: 0 18px 18px;
  font-size: 13px;
  color: var(--roe-edit-muted);
}

.roe-edit-search-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 18px 18px;
}

.roe-edit-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--roe-edit-border);
  background: #fafbfd;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.roe-edit-search-item:hover {
  background: #fff;
  border-color: #dbe4ef;
}

.roe-edit-search-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.roe-edit-search-info strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--roe-edit-text);
}

.roe-edit-search-price {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--roe-edit-accent);
}

.roe-edit-add-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.roe-edit-add-qty {
  width: 48px !important;
  height: 36px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  background: #fff !important;
}

.roe-edit-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.roe-edit-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.26);
}

.roe-edit-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 104px);
  max-height: calc(100dvh - 104px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.roe-edit-sidebar::-webkit-scrollbar {
  width: 6px;
}

.roe-edit-sidebar::-webkit-scrollbar-track {
  background: transparent;
  margin: 12px 0;
}

.roe-edit-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.roe-edit-sidebar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.roe-edit-page .roe-edit-sidebar {
  background: #fff;
  border: 1px solid var(--roe-edit-border);
  border-radius: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 16px 40px rgba(15, 23, 42, 0.06);
  gap: 0;
}

.roe-edit-page .roe-edit-sidebar .roe-edit-sidebar-card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  overflow: visible;
}

.roe-edit-page .roe-edit-sidebar .roe-edit-sidebar-card > .roe-edit-sidebar-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

.roe-edit-page .roe-edit-sidebar .roe-edit-sidebar-card + .roe-edit-sidebar-card {
  border-top: 1px solid #f1f5f9;
}

.roe-edit-sidebar-card {
  background: #fff;
  border: 1px solid var(--roe-edit-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 16px 40px rgba(15, 23, 42, 0.06);
}

.roe-edit-sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.roe-edit-sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: var(--roe-edit-accent);
  flex-shrink: 0;
}

.roe-edit-sidebar-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--roe-edit-text);
}

.roe-edit-sidebar-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--roe-edit-muted);
}

.roe-edit-summary-rows {
  padding: 14px 20px 4px;
}

.roe-edit-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
  color: var(--roe-edit-muted);
}

.roe-edit-summary-row strong {
  color: var(--roe-edit-text);
  font-weight: 600;
}

.roe-summary-card__head {
  border-bottom: none;
  padding-bottom: 8px;
}

.roe-summary-card__body {
  padding: 0 18px 18px;
}

.roe-summary-hero {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(248, 113, 113, 0.10), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.roe-summary-hero.is-ok {
  border-color: #bbf7d0;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(34, 197, 94, 0.12), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.roe-summary-hero.is-due {
  border-color: #fecaca;
}

.roe-summary-hero__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.roe-summary-hero__value {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.roe-summary-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.roe-summary-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roe-summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.roe-summary-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #eef2f7;
  background: #fff;
}

.roe-summary-metric span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #64748b;
}

.roe-summary-metric strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--roe-edit-text);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.roe-edit-page .roe-edit-sidebar .roe-edit-sidebar-card.roe-summary-card > .roe-edit-sidebar-head {
  background: linear-gradient(180deg, #fff 70%, rgba(255, 255, 255, 0.92));
}

.roe-detail-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #64748b;
}

.roe-detail-progress-head strong {
  font-variant-numeric: tabular-nums;
  color: var(--roe-edit-text);
}

.roe-edit-summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 20px 0;
  padding: 14px 0 16px;
  border-top: 1px solid #f1f5f9;
}

.roe-edit-summary-total span {
  font-size: 13px;
  font-weight: 600;
  color: var(--roe-edit-text);
}

.roe-edit-summary-total strong {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--roe-edit-text);
}

.roe-edit-save-form {
  padding: 0 20px 20px;
}

.roe-edit-form-block {
  padding-top: 16px;
}

.roe-edit-form-block h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #475569;
}

.roe-edit-form-block .checkout-shipping-type-field {
  margin-bottom: 14px;
}

.roe-edit-form-block .checkout-shipping-type-field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.roe-edit-form-block .checkout-shipping-type-field em {
  color: var(--roe-edit-accent);
  font-style: normal;
}

.roe-edit-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.roe-edit-field > span {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.roe-edit-field em {
  color: var(--roe-edit-accent);
  font-style: normal;
}

.roe-edit-field small {
  font-weight: 500;
  color: #94a3b8;
}

.roe-edit-input,
.roe-edit-textarea,
.roe-edit-file {
  width: 100%;
  border: 1px solid var(--roe-edit-border);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--roe-edit-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.roe-edit-input,
.roe-edit-file {
  min-height: 44px;
  padding: 0 14px;
}

.roe-edit-textarea {
  min-height: 88px;
  padding: 12px 14px;
  resize: vertical;
}

.roe-edit-input:focus,
.roe-edit-textarea:focus,
.roe-edit-file:focus {
  outline: none;
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.roe-edit-hint {
  font-size: 11px;
  color: #94a3b8;
}

.roe-edit-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--roe-edit-accent);
  text-decoration: none;
}

.roe-edit-link:hover {
  text-decoration: underline;
}

.roe-edit-save-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  margin-top: 8px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(220, 38, 38, 0.24);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.roe-edit-save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(220, 38, 38, 0.3);
}

.roe-edit-save-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
  color: #94a3b8;
}

@media (max-width: 960px) {
  .roe-edit-layout {
    grid-template-columns: 1fr;
  }

  .roe-edit-sidebar,
  .roe-edit-page .roe-edit-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    scroll-behavior: auto;
  }
}

@media (max-width: 720px) {
  .roe-edit-head {
    flex-direction: column;
  }

  .roe-edit-search {
    flex-direction: column;
  }

  .roe-edit-search-btn {
    width: 100%;
  }

  .roe-edit-item {
    grid-template-columns: 56px minmax(0, 1fr);
    padding: 14px;
  }

  .roe-edit-item-thumb {
    width: 56px;
    height: 56px;
  }

  .roe-edit-item-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .roe-edit-item-price {
    text-align: left;
  }

  .roe-edit-search-item {
    flex-direction: column;
    align-items: stretch;
  }

  .roe-edit-add-form {
    justify-content: space-between;
  }
}

.roe-edit-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.roe-edit-cta p {
  margin: 4px 0 0;
  font-size: 13px;
}

.roe-alert.is-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.roe-edit-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.roe-edit-add-product-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.roe-edit-add-product-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.28);
}

/* Edit order — catalog picker modal */
.roe-edit-catalog-modal .tagihan-modal-dialog {
  width: min(1080px, calc(100% - 2rem));
  max-height: min(92vh, 920px);
  background: #fff;
  border-radius: 24px;
  border: none;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.roe-edit-catalog-modal .tagihan-modal-body {
  padding: 0;
  background: #fff;
  overflow: auto;
  max-height: min(92vh, 920px);
}

.roe-edit-catalog-modal .tagihan-modal-close {
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: none;
  color: #64748b;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.roe-catalog-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #fcfdff 0%, #fff 100%);
}

.roe-catalog-modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.roe-catalog-modal-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

.roe-catalog-modal-count {
  flex-shrink: 0;
  padding: 6px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.roe-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfd;
}

.roe-catalog-search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 12px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.roe-catalog-search:focus-within {
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.roe-catalog-search svg {
  flex-shrink: 0;
  color: #94a3b8;
}

.roe-catalog-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
}

.roe-catalog-search input:focus {
  outline: none;
}

.roe-catalog-select {
  flex: 0 1 auto;
  min-width: 130px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: #334155;
}

.roe-catalog-search-btn {
  flex-shrink: 0;
  height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.roe-catalog-search-btn:hover {
  background: #1e293b;
}

.roe-catalog-search-active {
  padding: 10px 24px 0;
  font-size: 13px;
  color: #64748b;
}

.roe-catalog-body {
  padding: 18px 24px 24px;
}

.roe-catalog-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.roe-catalog-grid .card-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 2px;
}

.roe-catalog-promo-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.roe-catalog-promo-badge {
  font-size: 10px;
  font-weight: 800;
  color: #dc2626;
  background: #fef2f2;
  border-radius: 999px;
  padding: 3px 7px;
}

.roe-catalog-promo-normal {
  font-size: 11px;
  color: #94a3b8;
  text-decoration: line-through;
}

.roe-catalog-add-form {
  margin-top: 10px;
}

.roe-catalog-add-form .add-btn {
  width: 100%;
}

.roe-catalog-empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  font-size: 14px;
  color: #64748b;
}

.roe-catalog-pagination {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

@media (max-width: 960px) {
  .roe-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .roe-edit-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .roe-edit-panel-actions {
    justify-content: space-between;
  }

  .roe-catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .roe-catalog-select,
  .roe-catalog-search-btn {
    width: 100%;
  }

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

  .roe-edit-catalog-modal .tagihan-modal-dialog {
    width: calc(100% - 1rem);
    max-height: 94vh;
    border-radius: 18px;
  }
}

/* ── Pesanan detail modal — premium ── */
.po-modal--detail {
  background: #f8fafc;
}

.po-modal--detail .tm-header--detail {
  padding: 22px 56px 20px 22px;
  background: #fff;
  border-bottom: 1px solid #eef2f7;
}

.po-modal--detail .tm-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.po-modal--detail .tm-title {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.po-modal--detail .tm-status-pill {
  font-size: 11px;
  padding: 5px 11px;
}

.po-modal--detail .tm-chip.is-instant {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.po-modal--detail .tm-grid--detail {
  gap: 14px;
  padding: 14px;
}

.po-modal--detail .tm-panel {
  border-radius: 20px;
  border-color: #e8edf3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 10px 28px rgba(15, 23, 42, 0.04);
}

.po-modal--detail .tm-panel-head--detail {
  align-items: flex-start;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #fcfdff 0%, #fff 100%);
}

.po-modal--detail .tm-panel-head--detail h3 {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.po-modal--detail .tm-panel-head--detail p {
  margin: 3px 0 0;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.po-modal--detail .tm-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.po-modal--detail .tm-edit-link:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.po-modal--detail .tm-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  max-height: 340px;
  overflow: auto;
}

.po-modal--detail .tm-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #eef2f7;
  background: #fafbfd;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.po-modal--detail .tm-item:hover {
  background: #fff;
  border-color: #e2e8f0;
}

.po-modal--detail .tm-item.is-bonus {
  background: #fffbeb;
  border-color: #fde68a;
}

.po-modal--detail .tm-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  border: 1px solid #e8edf3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #94a3b8;
}

.po-modal--detail .tm-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.po-modal--detail .tm-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.po-modal--detail .tm-item-meta {
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
}

.po-modal--detail .tm-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.po-modal--detail .tm-item-tag {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.po-modal--detail .tm-item-tag.is-bonus {
  background: #fef3c7;
  color: #92400e;
}

.po-modal--detail .tm-item-tag.is-promo {
  background: #fef2f2;
  color: #b91c1c;
}

.po-modal--detail .tm-item-qty-col,
.po-modal--detail .tm-item-price-col {
  text-align: right;
}

.po-modal--detail .tm-item-qty-label,
.po-modal--detail .tm-item-price-unit {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 3px;
}

.po-modal--detail .tm-item-price-col .tm-subtotal {
  font-size: 14px;
}

.po-modal--detail .tm-table-footer--detail {
  margin: 0 16px 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #eef2f7;
  background: #fff;
}

.po-modal--detail .tm-table-footer--detail strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.po-modal--detail .tm-ship-block {
  margin: 0 16px 16px;
  border-radius: 16px;
  border: 1px solid #eef2f7;
  background: #fafbfd;
  overflow: hidden;
}

.po-modal--detail .tm-ship-block .tm-panel-head.compact {
  padding: 14px 16px 10px;
  background: transparent;
}

.po-modal--detail .tm-ship-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.po-modal--detail .tm-ship-field {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eef2f7;
}

.po-modal--detail .tm-ship-field span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 4px;
}

.po-modal--detail .tm-ship-field strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
  word-break: break-word;
}

.po-modal--detail .tm-ship-field--full {
  grid-column: 1 / -1;
}

.po-modal--detail .tm-ship-note {
  padding: 0 16px 16px;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
}

.po-modal--detail .tm-notice {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.5;
}

.po-modal--detail .tm-notice.is-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.po-modal--detail .tm-notice p {
  margin: 6px 0 0;
}

.po-modal--detail .tm-cancel-section {
  margin: 0 16px 16px;
  padding-top: 4px;
}

.po-modal--detail .tm-cancel-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.po-modal--detail .tm-cancel-toggle:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.po-modal--detail .tm-cancel-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e8edf3;
  background: #fff;
}

.po-modal--detail .tm-cancel-actions {
  display: flex;
  gap: 8px;
}

.po-modal--detail .tm-btn-danger,
.po-modal--detail .tm-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.po-modal--detail .tm-btn-danger {
  border: none;
  background: #dc2626;
  color: #fff;
}

.po-modal--detail .tm-btn-ghost {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
}

.po-modal--detail .tm-form-status {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
}

.po-modal--detail .tm-pay-breakdown--detail {
  margin-top: 0;
  background: #fafbfd;
}

.po-modal--detail .tm-pay-row-total {
  background: #fff;
  margin: 0 -16px -14px;
  padding: 14px 16px;
  border-radius: 0 0 12px 12px;
}

.po-modal--detail .tm-btn-return {
  margin-top: 8px;
  color: #b91c1c;
  border-color: #fecaca;
}

.po-modal--detail .tm-return-form {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.po-modal--detail .tm-return-form:not([hidden]) {
  display: flex;
}

.po-modal--detail .tm-return-actions {
  display: flex;
  gap: 8px;
}

.po-modal--detail .tm-btn-danger-fill {
  flex: 1;
  background: #b91c1c;
}

.po-modal--detail .tm-field em {
  color: #dc2626;
  font-style: normal;
}

@media (max-width: 768px) {
  .po-modal--detail .tm-grid--detail {
    grid-template-columns: 1fr;
  }

  .po-modal--detail .tm-item {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .po-modal--detail .tm-item-qty-col,
  .po-modal--detail .tm-item-price-col {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .po-modal--detail .tm-item-qty-col {
    margin-top: 4px;
  }

  .po-modal--detail .tm-ship-grid {
    grid-template-columns: 1fr;
  }

  .po-modal--detail .tm-panel-head--detail {
    flex-direction: column;
    gap: 12px;
  }
}

/* Pesanan detail page (matches edit layout) */
.roe-detail-edit-link {
  text-decoration: none;
}

.roe-edit-item.is-bonus {
  background: linear-gradient(135deg, #fffbeb 0%, #fff 40%);
  border-color: #fde68a;
}

.roe-detail-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--roe-edit-border);
}

.roe-detail-qty-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--roe-edit-muted);
}

.roe-detail-qty strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--roe-edit-text);
}

.roe-detail-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 20px 20px;
  padding: 16px 0 0;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
  font-weight: 600;
  color: var(--roe-edit-muted);
}

.roe-detail-total strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--roe-edit-text);
}

.roe-detail-ship {
  margin: 0;
  padding: 20px 20px 0;
  border-top: none;
}

.roe-detail-sidebar-extra .roe-detail-ship:first-child {
  padding-top: 20px;
}

.roe-detail-sidebar-extra .roe-detail-ship:last-child:not(:only-child) {
  padding-bottom: 0;
}

.roe-detail-ship h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #475569;
}

.roe-detail-ship-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.roe-detail-sidebar-extra .roe-detail-ship-grid {
  grid-template-columns: 1fr;
}

.roe-detail-ship-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}

.roe-detail-ship-field--full {
  grid-column: 1 / -1;
}

.roe-detail-ship-field > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--roe-edit-muted);
}

.roe-detail-ship-field strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--roe-edit-text);
  line-height: 1.45;
}

.roe-detail-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
}

.roe-wa-resi {
  border-radius: 12px;
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 48%);
}

.roe-wa-resi__title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.roe-wa-resi__icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.roe-wa-resi__preview {
  display: block;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #d1fae5;
  border-radius: 12px;
  background: #fff;
}

.roe-wa-resi__preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.roe-detail-ship.roe-wa-resi {
  margin-bottom: 4px;
  padding: 16px 16px 14px;
  border: 1px solid #a7f3d0;
}

.tm-ship-block.roe-wa-resi {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 48%);
}

.tm-ship-block.roe-wa-resi .tm-panel-head {
  margin-bottom: 10px;
}

.roe-detail-notice {
  margin: 16px 20px 0;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.roe-detail-notice.is-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.roe-detail-notice p {
  margin: 6px 0 0;
  font-size: 12px;
}

.roe-detail-cancel {
  margin: 0;
  padding: 12px 20px 12px;
  border-top: 1px solid #f1f5f9;
}

.roe-detail-sidebar-extra .roe-detail-ship + .roe-detail-notice,
.roe-detail-sidebar-extra .roe-detail-ship + .roe-detail-cancel {
  margin-top: 0;
}

.roe-detail-sidebar-extra .roe-detail-notice + .roe-detail-cancel {
  border-top: none;
  padding-top: 0;
}

.roe-detail-sidebar-extra .roe-detail-ship:only-child {
  padding-bottom: 12px;
}

.roe-detail-sidebar-extra .roe-detail-notice:last-child {
  margin-bottom: 20px;
}

.roe-detail-cancel-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.roe-detail-cancel-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.28);
}

.roe-detail-cancel-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.roe-detail-cancel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.roe-detail-cancel-actions .roe-edit-save-btn {
  width: 100%;
}

.roe-detail-btn-ghost,
.roe-detail-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--roe-edit-border);
  border-radius: 14px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.roe-detail-btn-ghost:hover,
.roe-detail-btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.roe-detail-ok {
  color: #15803d !important;
}

.roe-detail-due {
  color: #b91c1c !important;
}

.roe-detail-progress-wrap {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.roe-detail-progress-wrap.is-lunas {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.roe-detail-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.roe-detail-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f87171, #dc2626);
  transition: width 0.6s ease;
}

.roe-detail-progress-wrap > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--roe-edit-muted);
}

.roe-detail-history {
  margin: 4px 18px 0;
  padding: 16px 0 4px;
  border-top: 1px solid #f1f5f9;
}

.roe-detail-history h3 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.roe-detail-history-row {
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.roe-detail-history-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.roe-detail-history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.roe-detail-history-top strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--roe-edit-text);
}

.roe-detail-history-meta {
  font-size: 12px;
  color: var(--roe-edit-muted);
}

.roe-detail-history-note {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.roe-detail-history-note.is-danger {
  color: #b91c1c;
}

.roe-detail-actions {
  padding: 0 20px 20px;
}

.roe-detail-pay,
.roe-detail-verify {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.roe-detail-verify .roe-detail-return {
  display: flex;
}

.roe-detail-verify .roe-detail-return .roe-detail-btn-secondary {
  width: 100%;
}

.roe-detail-input-rp {
  display: flex;
  align-items: center;
  gap: 8px;
}

.roe-detail-input-rp > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--roe-edit-muted);
  flex-shrink: 0;
}

.roe-detail-input-rp .roe-edit-input {
  flex: 1;
}

.roe-detail-return-form {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.roe-detail-return-form:not([hidden]) {
  display: flex;
}

.roe-detail-return-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.roe-detail-return-actions .roe-edit-save-btn {
  flex: 1;
  min-width: 140px;
}

.roe-detail-alert {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.roe-detail-alert.is-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.roe-detail-alert.is-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.roe-detail-alert.is-ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.roe-detail-alert-desc {
  margin-top: 6px;
  font-size: 12px;
}

.roe-detail-status {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--roe-edit-muted);
}

.roe-detail-status.error {
  color: #b91c1c;
}

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

  .roe-detail-cancel-actions .roe-edit-save-btn {
    width: 100%;
  }
}

.po-order-more {
  text-decoration: none;
}

/* Cancel order modal */
.roe-detail-cancel-modal .tagihan-modal-dialog {
  width: min(480px, calc(100% - 2rem));
  background: #fff;
  border-radius: 20px;
  border: none;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.roe-detail-cancel-modal .tagihan-modal-body {
  padding: 24px;
}

.roe-detail-cancel-modal-head {
  margin-bottom: 16px;
}

.roe-detail-cancel-modal-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.roe-detail-cancel-modal-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

.roe-detail-cancel-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.roe-detail-cancel-modal-actions .roe-edit-save-btn {
  width: 100%;
}

/* Bundle builder (reseller & MO operator) */
.bundle-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 24px;
  align-items: start;
}
.bundle-builder-back {
  text-decoration: none;
  white-space: nowrap;
}
.bundle-builder-search {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 20px;
}
.bundle-builder-search-field {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.bundle-builder-search-btn {
  flex-shrink: 0;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.bundle-builder-search-btn:hover {
  background: #d43f3e;
}
.bundle-builder-grid {
  margin-bottom: 8px;
}
.bundle-builder-pagination {
  margin-top: 8px;
}
.bundle-builder-panel {
  position: sticky;
  top: 80px;
  align-self: start;
}
.bundle-builder-panel .checkout-summary-head {
  margin-bottom: 0;
  justify-content: space-between;
}
.bundle-builder-panel .checkout-summary-title {
  flex: 1;
}
.bundle-builder-panel .bundle-builder-field,
.bundle-builder-panel .bundle-builder-selected {
  margin-left: 20px;
  margin-right: 20px;
}
.bundle-builder-panel .checkout-summary-actions {
  padding: 0 20px 20px;
}
.bundle-builder-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}
.bundle-builder-field {
  margin-bottom: 14px;
}
.bundle-builder-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.bundle-builder-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.bundle-builder-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(226, 75, 74, 0.1);
}
.bundle-builder-selected {
  min-height: 100px;
  max-height: 280px;
  overflow: auto;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: #fafafa;
}
.bundle-builder-empty {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  text-align: center;
  padding: 16px 8px;
}
.bundle-selected-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.bundle-selected-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.bundle-selected-row:first-child {
  padding-top: 0;
}
.bundle-selected-info {
  min-width: 0;
}
.bundle-selected-info strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
}
.bundle-selected-info span {
  font-size: 11px;
  color: var(--muted);
}
.bundle-selected-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.bundle-selected-qty {
  width: 52px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  font: inherit;
  font-size: 13px;
}
.bundle-selected-remove {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.bundle-selected-remove:hover {
  border-color: #fecaca;
  color: var(--red);
  background: #fef2f2;
}
.add-btn--outline {
  background: #fff;
  color: var(--red);
  border: 1px solid #fecaca;
  box-shadow: none;
}
.add-btn--outline:hover {
  background: #fef2f2;
  border-color: var(--red);
}
.bundle-builder-submit {
  width: 100%;
}
.bundle-builder-submit:disabled,
.bundle-builder-submit:disabled:hover {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--red);
}
.cart-item-bundle-detail {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  margin: 4px 0;
}
@media (max-width: 1100px) {
  .bundle-builder-layout {
    grid-template-columns: 1fr;
  }
  .bundle-builder-panel {
    position: static;
    order: -1;
  }
}
@media (max-width: 900px) {
  .bundle-builder-search {
    flex-direction: column;
  }
  .bundle-builder-search-btn {
    width: 100%;
    padding: 10px 18px;
  }
}

.portal-pesan-lagi-form {
  margin: 0 0 12px;
}

.roe-edit-sidebar-card > .portal-pesan-lagi-form {
  margin-bottom: 14px;
}

.roe-edit-sidebar-card > .portal-pesan-lagi-form .portal-pesan-lagi-btn {
  width: 100%;
}

.tm-panel-pay > .portal-pesan-lagi-form {
  margin-bottom: 14px;
}

.po-order-actions .portal-pesan-lagi-form {
  display: inline-flex;
  margin: 0;
}

.po-order-actions .portal-pesan-lagi-btn {
  width: auto;
  min-height: auto;
  font-family: inherit;
}

.bundle-builder-delete-form {
  margin: 10px 0 0;
  width: 100%;
}

.bundle-builder-delete-btn {
  width: 100%;
  color: #b91c1c;
  border-color: #fecaca;
}

.bundle-builder-delete-btn:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.portal-bundle-delete-form {
  display: inline-flex;
  margin: 0;
  flex: 0 0 auto;
}

.like-btn--inline.like-btn--danger {
  color: #b91c1c;
  border-color: #fecaca;
}

.like-btn--inline.like-btn--danger:hover {
  color: #991b1b;
  border-color: #f87171;
  background: #fef2f2;
}

/* —— Portal order resend (ajukan kirim ulang) —— */
.roe-detail-resend.roe-resend-panel {
  gap: 0;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.roe-resend-cta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(160deg, #fff7ed 0%, #fff 55%);
  border: 1px solid #fed7aa;
  box-shadow: 0 1px 0 rgba(154, 52, 18, 0.04);
}

.roe-resend-cta__badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.roe-resend-cta__text strong {
  display: block;
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #9a3412;
  line-height: 1.3;
}

.roe-resend-cta__text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #78716c;
}

.roe-resend-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: #ea580c;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.roe-resend-cta__btn:hover { background: #c2410c; }
.roe-resend-cta__btn:active { transform: scale(0.98); }

.roe-resend-modal {
  z-index: 1300;
}

.roe-resend-modal {
  --roe-edit-border: #cbd5e1;
  --roe-edit-text: #0f172a;
  --roe-edit-muted: #64748b;
}

.roe-resend-modal .roe-edit-input,
.roe-resend-modal .roe-edit-textarea {
  border: 1px solid #cbd5e1;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.roe-resend-modal .roe-edit-input:focus,
.roe-resend-modal .roe-edit-textarea:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}

.roe-resend-upload.is-invalid .roe-resend-upload__box {
  border-color: #f87171;
  background: #fef2f2;
  color: #b91c1c;
}

.roe-resend-upload__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roe-resend-upload__list li {
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 12px;
  font-weight: 600;
  word-break: break-word;
}




.roe-resend-modal__dialog {
  width: min(640px, 100%);
  max-height: min(92vh, 840px);
  background: #fff;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.roe-resend-modal__head {
  flex-shrink: 0;
  padding: 22px 52px 14px 22px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}

.roe-resend-modal__head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.roe-resend-modal__head p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}

.roe-resend-modal__body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
}

.roe-resend-modal__foot {
  flex-shrink: 0;
  padding: 14px 22px 18px;
  border-top: 1px solid #f1f5f9;
  background: #fff;
}

.roe-resend-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  min-height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
}

.roe-resend-search .roe-edit-input {
  border: none;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
  min-height: 42px;
}

.roe-resend-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roe-resend-item {
  display: grid;
  grid-template-columns: 28px 48px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.roe-resend-item[hidden],
.roe-resend-item.is-search-hidden {
  display: none !important;
}

.roe-resend-item.is-selected,
.roe-resend-item.is-short {
  border-color: #fdba74;
  background: #fff7ed;
}

.roe-resend-item__check {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  cursor: pointer;
}

.roe-resend-item__check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.roe-resend-item__check-ui {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid #cbd5e1;
  background: #fff;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.roe-resend-item.is-selected .roe-resend-item__check-ui {
  border-color: #ea580c;
  background: #ea580c;
}

.roe-resend-item.is-selected .roe-resend-item__check-ui::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.roe-resend-item__thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: #e2e8f0;
  margin-top: 2px;
}

.roe-resend-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.roe-resend-item__thumb span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

.roe-resend-item__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roe-resend-item__meta {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.roe-resend-item__meta strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
}

.roe-resend-item__meta > span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
}

.roe-resend-item__meta b {
  font-weight: 700;
  color: #334155;
}

.roe-resend-item__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed #fed7aa;
}

.roe-resend-item__controls[hidden] {
  display: none !important;
}

.roe-resend-item__kurang {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #ffedd5;
  color: #c2410c;
  white-space: nowrap;
}

.roe-resend-item__kurang b { font-weight: 800; margin-left: 2px; }

.roe-resend-item__qty {
  display: flex;
  align-items: center;
  gap: 10px;
}

.roe-resend-item__qty-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.roe-resend-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.roe-resend-stepper__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-height: 40px;
  border: none;
  background: #f8fafc;
  color: #0f172a;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.roe-resend-stepper__btn:hover:not(:disabled) { background: #f1f5f9; }
.roe-resend-stepper__btn:disabled { opacity: 0.35; cursor: not-allowed; }

.roe-resend-stepper__input {
  width: 48px;
  min-height: 40px;
  border: none;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  background: #fff;
  -moz-appearance: textfield;
}

.roe-resend-stepper__input::-webkit-outer-spin-button,
.roe-resend-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.roe-resend-recipient {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.roe-resend-recipient__head strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.roe-resend-recipient__head p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.roe-resend-recipient .roe-edit-field {
  margin: 0;
}

.roe-resend-summary {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-size: 13px;
  font-weight: 600;
  color: #9a3412;
  text-align: center;
}

.roe-resend-summary.is-empty {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

.roe-resend-summary strong { font-weight: 800; }

.roe-resend-empty-filter {
  margin: 0;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

.roe-resend-upload {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.roe-resend-upload__title {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.roe-resend-upload__title em {
  font-style: normal;
  font-weight: 500;
  color: #94a3b8;
}

.roe-resend-upload__box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.roe-resend-upload:hover .roe-resend-upload__box,
.roe-resend-upload.has-file .roe-resend-upload__box {
  border-color: #fb923c;
  background: #fff7ed;
  color: #9a3412;
}

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

.roe-resend-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roe-resend-actions .roe-edit-save-btn,
.roe-resend-actions .roe-detail-btn-secondary {
  width: 100%;
  min-height: 48px;
}

.roe-resend-modal__foot .roe-form-status {
  margin: 0 0 10px;
  font-size: 12px;
  color: #b91c1c;
}

.roe-resend-status-card {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.roe-resend-status-card.is-shipped {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 70%);
  color: #166534;
}

.roe-resend-status-card.is-shipped .roe-resend-status-card__icon {
  background: #dcfce7;
  color: #15803d;
}

.roe-resend-status-card.is-shipped .roe-resend-status-card__body p,
.roe-resend-status-card.is-shipped .roe-resend-status-card__list li,
.roe-resend-status-card.is-shipped .roe-resend-status-card__list li span,
.roe-resend-status-card.is-shipped .roe-resend-status-card__ship {
  color: #166534;
}

.roe-resend-status-card__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fef3c7;
  color: #b45309;
}

.roe-resend-status-card__body {
  min-width: 0;
  flex: 1;
}

.roe-resend-status-card__body strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.roe-resend-status-card__body p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #a16207;
}

.roe-resend-status-card__list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.roe-resend-status-card__list li {
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
}

.roe-resend-status-card__list li span {
  font-weight: 500;
  color: #a16207;
}

.roe-resend-status-card__ship {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #92400e;
  font-weight: 600;
}

.roe-resend-resi {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #a7f3d0;
  background: #fff;
}

.roe-resend-resi__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.roe-resend-resi__head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #047857;
}

.roe-resend-resi__head em {
  font-style: normal;
  font-size: 11px;
  color: #64748b;
}

.roe-resend-resi__no {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.roe-resend-resi__no span {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.roe-resend-resi__no strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  word-break: break-all;
}

.roe-resend-resi__link {
  display: inline-flex;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #dc2626;
  text-decoration: none;
}

.roe-resend-resi__link:hover {
  text-decoration: underline;
}

.roe-resend-resi__preview {
  display: block;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #d1fae5;
  border-radius: 12px;
  background: #f8fafc;
}

.roe-resend-resi__preview img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.roe-resend-history {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.roe-resend-history__head h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.roe-resend-history__head p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}

.roe-resend-history__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.roe-resend-history-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.roe-resend-history-card.is-ok {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 55%);
}

.roe-resend-history-card.is-danger {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fef2f2 0%, #fff 55%);
}

.roe-resend-history-card.is-info,
.roe-resend-history-card.is-warn {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 55%);
}

.roe-resend-history-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.roe-resend-history-card__top strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.roe-resend-history-card__top span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

.roe-resend-history-card__badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.roe-resend-history-card.is-ok .roe-resend-history-card__badge {
  border-color: #bbf7d0;
  color: #166534;
  background: #ecfdf5;
}

.roe-resend-history-card.is-danger .roe-resend-history-card__badge {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fef2f2;
}

.roe-resend-history-card__items {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.roe-resend-history-card__items li {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.roe-resend-history-card__items em {
  font-style: normal;
  font-weight: 500;
  color: #64748b;
}

.roe-resend-history-card__ship {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roe-resend-history-card__ship p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.roe-resend-history-card__ship span {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.roe-resend-history-card__ship strong {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: #0f172a;
  white-space: pre-wrap;
}

.roe-resend-history-card__empty-resi {
  margin: 10px 0 0;
  font-size: 12px;
  color: #64748b;
}

.roe-resend-history-card__reject {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #b91c1c;
}

.roe-resend-history-card__cancel {
  margin-top: 12px;
}

.roe-resend-history-card__cancel .roe-detail-btn-secondary {
  width: auto;
}

@media (max-width: 720px) {
  .roe-resend-modal {
    padding: 0;
    align-items: flex-end;
  }

  .roe-resend-modal__dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
  }

  .roe-resend-modal__head,
  .roe-resend-modal__body,
  .roe-resend-modal__foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .roe-resend-item {
    grid-template-columns: 26px 44px minmax(0, 1fr);
  }

  .roe-resend-item__thumb {
    width: 44px;
    height: 44px;
  }
}

@media (min-width: 721px) {
  .roe-resend-actions {
    flex-direction: row;
  }

  .roe-resend-actions .roe-edit-save-btn { flex: 1; }

  .roe-resend-actions .roe-detail-btn-secondary {
    width: auto;
    min-width: 110px;
  }
}


/* —— Reseller kirim ulang monitor —— */
.roe-resend-monitor-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.roe-resend-monitor-tab {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.roe-resend-monitor-tab span {
  font-size: 11px;
  font-weight: 600;
}

.roe-resend-monitor-tab strong {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.roe-resend-monitor-tab:hover,
.roe-resend-monitor-tab.is-active {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.roe-resend-monitor-tab.is-active strong {
  color: #c2410c;
}

.roe-resend-monitor-search {
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
  align-items: stretch;
}

.roe-resend-monitor-search__field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
}

.roe-resend-monitor-search__field input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
  min-height: 42px;
}

.roe-resend-monitor-search .roe-edit-save-btn {
  min-width: 96px;
  min-height: 44px;
}

.roe-resend-monitor-body {
  padding: 0 16px 14px;
}

.roe-resend-monitor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #64748b;
}

.roe-resend-monitor-meta strong {
  color: #0f172a;
  font-weight: 700;
}

.roe-resend-monitor-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roe-resend-monitor-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  font-size: 13px;
  color: #334155;
}

.roe-resend-monitor-items li strong {
  flex-shrink: 0;
  color: #c2410c;
  font-weight: 700;
}

.roe-resend-monitor-items li.is-more {
  justify-content: center;
  color: #64748b;
  font-weight: 600;
  background: transparent;
  border-style: dashed;
}

.roe-resend-monitor-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 900px) {
  .roe-resend-monitor-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .roe-resend-monitor-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roe-resend-monitor-search {
    flex-direction: column;
  }

  .roe-resend-monitor-search .roe-edit-save-btn {
    width: 100%;
  }
}

