/* ══════════════════════════════════════════════════
   order-feed.css — Riwayat Pesanan Live (tabel compact)
══════════════════════════════════════════════════ */

#order-feed {
  background: var(--bg);
  padding: 2.5rem 0 2rem;
  overflow: hidden;
  position: relative;
}
#order-feed::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(168,85,247,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Header ── */
.of-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.of-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.of-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: 99px;
  padding: 2px 7px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.38rem;
  color: #c084fc;
  letter-spacing: 1.2px;
}
.of-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a855f7;
  animation: ofPulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes ofPulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.7); }
}
.of-counter {
  font-size: 0.65rem;
  color: var(--text-muted, #888);
}
.of-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 0.65rem;
  color: var(--text-muted, #888);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.of-refresh-btn:hover {
  background: rgba(168,85,247,0.1);
  color: #c084fc;
  border-color: rgba(168,85,247,0.3);
}
.of-last-updated {
  font-size: 0.6rem;
  color: var(--text-muted, #888);
  opacity: 0.55;
}

/* ── Table wrapper ── */
.of-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.015);
}

/* ── Tabel ── */
.of-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  table-layout: auto;
}

/* Lebar kolom — gunakan max-width agar kolom bisa menyusut/membesar sesuai konten */
.of-col-id     { width: 82px; }
.of-col-user   { max-width: 72px; }
/* .of-col-item — auto, ambil sisa */
.of-col-price  { white-space: nowrap; }
.of-col-status { white-space: nowrap; }
.of-col-time   { white-space: nowrap; }

.of-table thead tr {
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.of-table thead th {
  padding: 0.38rem 0.3rem;
  text-align: left;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.3rem;
  font-weight: 400;
  color: var(--text-muted, #555);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}
.of-table thead th.of-col-price,
.of-table thead th.of-col-status,
.of-table thead th.of-col-time {
  text-align: right;
}

/* ── Baris ── */
.of-row {
  opacity: 0;
  transition: opacity 0.2s ease, background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.035);
}
.of-row:last-child { border-bottom: none; }
.of-row--visible   { opacity: 1; }
.of-row:hover      { background: rgba(168,85,247,0.04); }

.of-row--pending td:first-child {
  box-shadow: inset 2px 0 0 rgba(245,158,11,0.55);
}
.of-row--selesai td:first-child {
  box-shadow: inset 2px 0 0 rgba(93,189,58,0.45);
}
.of-row--new {
  animation: ofRowFlash 1.8s ease forwards;
}
@keyframes ofRowFlash {
  0%   { background: rgba(168,85,247,0.1); }
  100% { background: transparent; }
}

/* ── Sel ── */
.of-row td {
  padding: 0.38rem 0.3rem;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.of-row td:first-child,
.of-table thead th:first-child {
  padding-left: 0.5rem;
}

.of-col-id {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.32rem;
  color: var(--text-muted, #555);
  overflow: visible;
  white-space: nowrap;
}
.of-col-user {
  color: #c084fc;
  font-weight: 600;
  font-size: 0.7rem;
}
.of-col-item {
  color: var(--text, #e2e8f0);
  font-size: 0.7rem;
}
.of-col-price {
  text-align: right;
  font-weight: 700;
  color: #f4c430;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: visible;
}
.of-col-status { text-align: right; }
.of-col-time {
  text-align: right;
  font-size: 0.65rem;
  color: var(--text-muted, #666);
  font-variant-numeric: tabular-nums;
}

/* ── Badge status ── */
.of-badge {
  display: inline-block;
  font-size: 0.52rem;
  font-weight: 600;
  border-radius: 3px;
  padding: 1px 3px;
  border: 1px solid;
  letter-spacing: 0.2px;
  white-space: nowrap;
  text-transform: lowercase;
}
.of-badge--selesai {
  background: rgba(93,189,58,0.1);
  border-color: rgba(93,189,58,0.25);
  color: #5dbd3a;
}
.of-badge--pending {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.3);
  color: #f59e0b;
}

/* ── Skeleton ── */
.of-skeleton { pointer-events: none; }
.of-skel-line {
  height: 7px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: ofShimmer 1.4s ease-in-out infinite;
}
@keyframes ofShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ── Empty state ── */
.of-empty {
  display: none;
  text-align: center;
  padding: 1.8rem 1rem;
  color: var(--text-muted, #888);
  font-size: 0.72rem;
}
.of-empty-icon { font-size: 1.4rem; margin-bottom: 0.35rem; }

/* ── CTA ── */
.of-cta-wrap {
  text-align: center;
  margin-top: 1rem;
}
.of-cta-wrap p {
  font-size: 0.72rem;
  color: var(--text-muted, #aaa);
  margin-bottom: 0.45rem;
}
.of-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 6px;
  padding: 0.45rem 1rem;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.44rem;
  color: #c084fc;
  letter-spacing: 0.8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.of-cta-btn:hover {
  background: rgba(168,85,247,0.22);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════
   ORDER FEED — Responsive
══════════════════════════════════════════════════ */
@media(max-width:768px) {
  .of-header { gap: 0.5rem; }
  .of-table { font-size: 0.62rem; }
  .of-table thead th { font-size: 0.28rem; padding: 0.3rem 0.25rem; }
  .of-row td { padding: 0.3rem 0.25rem; }
  .of-col-id { width: 72px; font-size: 0.30rem !important; overflow: visible; white-space: nowrap; }
  .of-col-user { max-width: 50px; font-size: 0.62rem !important; }
  .of-col-item { font-size: 0.62rem !important; }
  .of-col-price { font-size: 0.62rem !important; white-space: nowrap !important; overflow: visible !important; }
  .of-col-status { white-space: nowrap; }
  .of-col-time { font-size: 0.58rem !important; white-space: nowrap; }
  .of-badge { font-size: 0.45rem; padding: 1px 2px; }
}

@media(max-width:480px) {
  .of-table-wrap { border-radius: 6px; }
  .of-table { font-size: 0.58rem; }
  .of-col-time { display: none; }
  .of-table thead th:last-child { display: none; }
  .of-col-id { width: 64px; overflow: visible; white-space: nowrap; }
  .of-col-user { max-width: 45px; font-size: 0.58rem !important; }
  .of-col-item { font-size: 0.58rem !important; }
  .of-col-price { font-size: 0.58rem !important; white-space: nowrap !important; overflow: visible !important; }
  .of-col-status { white-space: nowrap; }
}
