.premium-order-card,
.premium-order-card * {
  box-sizing: border-box;
}

/* Account data freshness status (additive; existing order styling is preserved). */
.account-sync-status {
    min-height: 22px;
    margin: 0 0 12px;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0.9;
    transition: color 180ms ease, opacity 180ms ease;
}

.account-sync-status[data-account-sync-status="syncing"],
.account-sync-status[data-account-sync-status="slow"],
.account-sync-status[data-account-sync-status="loading"] {
    color: #ff9a62;
}

.account-sync-status[data-account-sync-status="fresh"] {
    color: #7dd3a7;
}

.account-sync-status[data-account-sync-status="error"] {
    color: #f6b16f;
}

.filter-count.filter-count-pending {
    min-width: 1.5em;
    color: var(--text-secondary, #94a3b8);
    opacity: 0.72;
}

@media (prefers-reduced-motion: reduce) {
    .account-sync-status {
        transition: none;
    }
}
.premium-order-card {
  background: var(--surface-glass, #ffffff);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow:
    0 8px 32px #0000000d,
    inset 0 1px #ffffff1a;
  border: 1px solid var(--border-light, rgba(0, 0, 0, 0.05));
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  min-width: 0;
}
[data-theme="dark"] .premium-order-card,
body.dark-mode .premium-order-card {
  background: var(--surface-glass);
  border-color: #ffffff0d;
  box-shadow:
    0 12px 40px #0003,
    inset 0 1px #ffffff0d;
}
.premium-order-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 16px 40px #00000014,
    inset 0 1px #ffffff26;
  border-color: #ff6b004d;
}
[data-theme="dark"] .premium-order-card:hover,
body.dark-mode .premium-order-card:hover {
  box-shadow:
    0 16px 50px #0006,
    inset 0 1px #ffffff1a;
  border-color: #ff6b004d;
}
.poc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
[data-theme="dark"] .poc-header,
body.dark-mode .poc-header {
  border-bottom-color: #ffffff14;
}
.poc-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.poc-id {
  font-family:
    SF Mono,
    ui-monospace,
    monospace;
  font-weight: 600;
  color: #1a1a1a;
  font-size: 14px;
  letter-spacing: 0.5px;
}
[data-theme="dark"] .poc-id,
body.dark-mode .poc-id {
  color: #f5f5f5;
}
.poc-date {
  font-size: 13px;
  color: #888;
  font-weight: 500;
}
.poc-badge {
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.poc-badge:before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.poc-badge.status-completed {
  background: #2ecc711a;
  color: #27ae60;
}
.poc-badge.status-completed:before {
  background: #27ae60;
}
.poc-badge.status-unpaid,
.poc-badge.status-awaiting_payment {
  background: #e74c3c1a;
  color: #c0392b;
}
.poc-badge.status-unpaid:before,
.poc-badge.status-awaiting_payment:before {
  background: #c0392b;
  animation: pulse-dot 2s infinite;
}
.poc-badge.status-processing {
  background: #f1c40f26;
  color: #d35400;
}
.poc-badge.status-processing:before {
  background: #d35400;
}
@keyframes pulse-dot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 #e74c3cb3;
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px #e74c3c00;
  }
  to {
    transform: scale(0.95);
    box-shadow: 0 0 #e74c3c00;
  }
}

/* Dark Mode Badges */
body.dark-mode .poc-badge.status-completed {
  background: rgba(46, 204, 113, 0.15);
  color: #4ade80;
}
body.dark-mode .poc-badge.status-unpaid,
body.dark-mode .poc-badge.status-awaiting_payment {
  background: rgba(231, 76, 60, 0.15);
  color: #fb7185;
}
body.dark-mode .poc-badge.status-processing {
  background: rgba(241, 196, 15, 0.15);
  color: #fbbf24;
}
.poc-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.poc-product-info {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.poc-thumbnail-stack {
  display: flex;
  position: relative;
  padding-right: 12px;
  flex-shrink: 0;
}
.poc-thumbnail,
.poc-thumbnail-stack .product-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  background: #f8f9fa;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px #0000000f;
  position: relative;
  z-index: 2;
}
[data-theme="dark"] .poc-thumbnail,
body.dark-mode .poc-thumbnail,
[data-theme="dark"] .poc-thumbnail-stack .product-icon,
body.dark-mode .poc-thumbnail-stack .product-icon {
  border-color: #1a1a1a;
  background: #222;
}
.poc-thumbnail-more {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #f1f3f5;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #495057;
  position: absolute;
  left: 20px;
  z-index: 1;
}
[data-theme="dark"] .poc-thumbnail-more,
body.dark-mode .poc-thumbnail-more {
  background: #2a2a2a;
  border-color: #1a1a1a;
  color: #adb5bd;
}
.poc-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 1;
  min-width: 0;
}
.poc-title {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}
[data-theme="dark"] .poc-title,
body.dark-mode .poc-title {
  color: #fff;
}
.poc-meta {
  font-size: 13px;
  color: #6c757d;
  font-weight: 500;
}
[data-theme="dark"] .poc-meta,
body.dark-mode .poc-meta {
  color: #94a3b8;
}
.poc-pricing {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.poc-total-label {
  font-size: 12px;
  text-transform: uppercase;
  color: #adb5bd;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.poc-total-value {
  font-size: 18px;
  font-weight: 700;
  color: #111;
}
[data-theme="dark"] .poc-total-value,
body.dark-mode .poc-total-value {
  color: #fff;
}
.poc-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}
.poc-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  gap: 8px;
  text-decoration: none;
}
.poc-btn-primary {
  background: linear-gradient(135deg, #ff6b00e6, #ff4500e6);
  color: #fff;
  box-shadow:
    0 4px 15px #ff6b004d,
    inset 0 1px #ffffff4d;
  position: relative;
  overflow: hidden;
}
.poc-btn-primary:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: skew(-20deg);
  transition: left 0.5s ease;
}
.poc-btn-primary:hover {
  background: linear-gradient(135deg, #ff8533, #ff6226);
  transform: translateY(-2px);
  box-shadow:
    0 8px 25px #ff6b0080,
    inset 0 1px #fff6;
}
.poc-btn-primary:hover:before {
  left: 150%;
}
[data-theme="dark"] .poc-btn-primary,
body.dark-mode .poc-btn-primary,
[data-theme="dark"] .poc-btn-primary:hover,
body.dark-mode .poc-btn-primary:hover {
  color: #fff;
}
.poc-btn-primary.pay-now {
  background: linear-gradient(135deg, #ff6b00, #ff4500);
  color: #fff;
  animation: pulse-glow 2s infinite;
}
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 #ff6b0066;
  }
  70% {
    box-shadow: 0 0 0 10px #ff6b0000;
  }
  to {
    box-shadow: 0 0 #ff6b0000;
  }
}
.poc-btn-primary.pay-now:hover {
  background: linear-gradient(135deg, #ff8533, #ff6226);
  animation: none;
}
.poc-btn-primary,
.poc-btn-primary.pay-now,
a.poc-btn-primary {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.poc-btn-secondary {
  background: #ffffffb3;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #111;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 4px 10px #0000000d,
    inset 0 1px #fff;
}
.poc-btn-secondary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 6px 15px #00000014,
    inset 0 1px #fff;
}
[data-theme="dark"] .poc-btn-secondary,
body.dark-mode .poc-btn-secondary {
  background: #ffffff0d;
  color: #fff;
  border-color: #ffffff26;
  box-shadow:
    0 4px 10px #0003,
    inset 0 1px #ffffff0d;
}
[data-theme="dark"] .poc-btn-secondary:hover,
body.dark-mode .poc-btn-secondary:hover {
  background: #ffffff1a;
  border-color: #ffffff40;
  box-shadow:
    0 6px 15px #0000004d,
    inset 0 1px #ffffff1a;
}
.poc-btn-ghost {
  background: transparent;
  color: #6c757d;
}
.poc-btn-ghost:hover {
  background: #0000000a;
  color: #111;
}
[data-theme="dark"] .poc-btn-ghost:hover,
body.dark-mode .poc-btn-ghost:hover {
  background: #ffffff0d;
  color: #fff;
}
.poc-expanded {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: #f8f9fa;
  border-radius: 16px;
  margin-top: 0;
}
[data-theme="dark"] .poc-expanded,
body.dark-mode .poc-expanded {
  background: #ffffff08;
}
.poc-expanded.open {
  max-height: 1200px;
  opacity: 1;
  margin-top: 20px;
  padding: 24px;
}
.poc-expanded h4 {
  margin: 0 0 16px;
  font-size: 14px;
  color: #495057;
  font-weight: 600;
}
[data-theme="dark"] .poc-expanded h4,
body.dark-mode .poc-expanded h4 {
  color: #ced4da;
}
.poc-timeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: 32px;
  padding: 0 20px;
}
.poc-timeline:before {
  content: "";
  position: absolute;
  top: 14px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: #dee2e6;
  z-index: 0;
}
[data-theme="dark"] .poc-timeline:before,
body.dark-mode .poc-timeline:before {
  background: #333;
}
.poc-timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.poc-timeline-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #adb5bd;
}
[data-theme="dark"] .poc-timeline-icon,
body.dark-mode .poc-timeline-icon {
  background: #222;
  border-color: #444;
}
.poc-timeline-step.completed .poc-timeline-icon {
  background: #27ae60;
  border-color: #27ae60;
  color: #fff;
}
.poc-timeline-step.active .poc-timeline-icon {
  background: #ff6b00;
  border-color: #ff6b00;
  color: #fff;
  box-shadow: 0 0 0 4px #ff6b0026;
}
.poc-timeline-label {
  font-size: 11px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
}
[data-theme="dark"] .poc-timeline-label,
body.dark-mode .poc-timeline-label {
  color: #94a3b8;
}
.poc-timeline-step.completed .poc-timeline-label {
  color: #27ae60;
}
.poc-timeline-step.active .poc-timeline-label {
  color: #ff6b00;
}
@media (max-width: 992px) {
  .premium-order-card {
    padding: 16px;
    margin-bottom: 16px;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
  }
  .poc-header {
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
  }
  .poc-header-left {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
  }
  .poc-id,
  .poc-date,
  .poc-badge {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .poc-body {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .poc-product-info {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
  }
  .poc-thumbnail,
  .poc-thumbnail-stack .product-icon,
  .poc-thumbnail-more {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }
  .poc-pricing {
    align-items: flex-start;
    text-align: left;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    width: 100%;
  }
  [data-theme="dark"] .poc-pricing,
  body.dark-mode .poc-pricing {
    border-top-color: #ffffff1a;
  }
  .poc-title {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .poc-footer {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    overflow: visible;
  }
  [data-theme="dark"] .poc-footer,
  body.dark-mode .poc-footer {
    border-top-color: #ffffff1a;
  }
  .poc-btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .poc-btn-primary,
  .poc-btn.pay-now {
    width: 100%;
    flex: 1 1 100%;
    order: -1;
  }
  .poc-btn.order-copy-btn,
  .poc-btn.order-expand-btn,
  .poc-btn.order-buy-again-btn {
    flex: 1 1 auto;
    min-width: 44px;
  }
  .poc-btn-ghost {
    flex: 0 0 44px;
    width: 44px;
    padding: 0;
    justify-content: center;
  }
  .poc-timeline:before {
    left: 20px;
    right: 20px;
  }
}
.poc-item-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #fff;
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px #00000005;
}
[data-theme="dark"] .poc-item-row,
body.dark-mode .poc-item-row {
  background: #ffffff08;
}
.poc-item-row-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}
.poc-item-row-details {
  flex: 1;
  min-width: 0;
}
.poc-item-row-title {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="dark"] .poc-item-row-title,
body.dark-mode .poc-item-row-title {
  color: #fff;
}
.poc-item-row-meta {
  font-size: 12px;
  color: #6c757d;
}
.poc-item-row-price {
  font-weight: 700;
  color: #111;
  font-size: 14px;
}
[data-theme="dark"] .poc-item-row-price,
body.dark-mode .poc-item-row-price {
  color: #fff;
}
.skeleton-order-card {
  height: 180px;
  background: #f8f9fa;
  border-radius: 20px;
  margin-bottom: 24px;
  animation: pulse 1.5s infinite;
}
[data-theme="dark"] .skeleton-order-card,
body.dark-mode .skeleton-order-card {
  background: #1f1f1f;
}
@media (max-width: 992px) {
  .premium-order-card {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
  .premium-order-card:hover {
    transform: none;
  }
  .poc-body {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .poc-product-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .poc-thumbnail-stack {
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    flex-shrink: 0 !important;
    padding-right: 0 !important;
    overflow: hidden;
  }
  .poc-thumbnail-stack .product-icon:not(:first-of-type),
  .poc-thumbnail-stack .poc-thumbnail-more {
    display: none !important;
  }
  .poc-thumbnail-stack .product-icon:first-of-type {
    margin-left: 0 !important;
    width: 56px !important;
    height: 56px !important;
  }
  .poc-details,
  .poc-expanded,
  .poc-item-row-details {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .poc-header {
    align-items: flex-start;
    gap: 10px;
  }
  .poc-header-left {
    min-width: 0;
    flex-wrap: wrap;
  }
  .poc-badge {
    flex: 0 0 auto;
    max-width: 46%;
    white-space: normal;
    text-align: center;
  }
  .poc-expanded {
    width: 100% !important;
    overflow: hidden !important;
  }
  .poc-item-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    padding: 12px;
  }
  .poc-item-row-img {
    grid-row: 1 / span 2;
  }
  .poc-item-row-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }
  .poc-item-row-price {
    grid-column: 2;
    justify-self: start;
  }
  .poc-footer {
    max-width: 100%;
    overflow: visible !important;
  }
  .poc-btn {
    min-width: 44px;
  }
}

/* Mobile Cropping Fixes */
@media (max-width: 992px) {
  .order-filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .order-filters::-webkit-scrollbar {
    display: none;
  }
  .filter-chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .dashboard-panel {
    max-width: 100vw;
    overflow: hidden;
  }
  .panel-body {
    max-width: 100%;
    overflow-x: hidden;
  }
  .orders-list {
    max-width: 100%;
    overflow-x: hidden;
  }
}
