@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

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

:root {
  --red: rgb(249, 32, 32);
  --red-glow: rgba(249, 32, 32, 0.15);
  --bg: #ffffff;
  --surface: #f6f6f6;
  --surface2: #ececec;
  --border: rgba(0, 0, 0, 0.08);
  --text: #111111;
  --muted: #888888;
}

.orders-root {
  min-height: 100vh;
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--text);
  padding: 60px 0 100px;
  position: relative;
  overflow: hidden;
}

/* Subtle background accent */
.orders-root::before {
  content: '';
  position: fixed;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(249,32,32,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.orders-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Page header */
.orders-header {
  margin-bottom: 48px;
  animation: fadeUp 0.6s ease both;
}
.orders-header-label {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 10px;
}
.orders-header-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--text);
}
.orders-header-title em {
  font-style: italic;
  color: var(--red);
}
.orders-header-sub {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

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

/* Summary strip */
.summary-strip {
  display: flex;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.1s ease both;
}
.summary-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.summary-pill strong { color: var(--text); font-weight: 600; }
.summary-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green { background: #05CD99; box-shadow: 0 0 6px rgba(5,205,153,0.5); }
.dot-red { background: #EE5D50; box-shadow: 0 0 6px rgba(238,93,80,0.5); }
.dot-yellow { background: #FFB800; box-shadow: 0 0 6px rgba(255,184,0,0.5); }

/* Order cards */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: box-shadow 0.25s, border-color 0.25s;
  animation: fadeUp 0.5s ease both;
}
.order-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  border-color: rgba(249,32,32,0.2);
}

/* Card top bar */
.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.order-id-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.order-id-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.order-id-value {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface2);
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  letter-spacing: 1px;
}

/* Status badge */
.status-badge {
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status-completed { color: #05CD99; background: rgba(5,205,153,0.1); }
.status-cancelled { color: #EE5D50; background: rgba(238,93,80,0.1); }
.status-pending { color: #FFB800; background: rgba(255,184,0,0.1); }

/* Card body - items */
.order-card-body { padding: 0; }

.order-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.order-item:last-child { border-bottom: none; }
.order-item:hover { background: var(--surface); }

.item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.item-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.item-qty {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  white-space: nowrap;
  text-align: center;
}
.item-qty strong { color: var(--text); }

.item-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  text-align: right;
  min-width: 80px;
}
.item-price span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  animation: fadeUp 0.6s ease both;
}
.empty-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.empty-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.empty-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-body);
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 4px 20px var(--red-glow);
}
.btn-primary:hover {
  background: #e01818;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--red-glow);
  color: #fff;
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-body);
  text-decoration: none;
  transition: all 0.2s;
}
.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(0,0,0,0.2);
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.3s ease both;
}

/* Loading */
.loading-screen {
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
  font-family: var(--font-display);
}
.loading-logo { font-size: 24px; font-weight: 700; color: var(--text); }
.loading-logo span { color: var(--red); }
.loading-bar {
  width: 180px; height: 2px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar-fill {
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  animation: loadFill 1.4s ease-in-out infinite;
}
@keyframes loadFill {
  0% { width: 0%; margin-left: 0; }
  50% { width: 80%; margin-left: 0; }
  100% { width: 0%; margin-left: 100%; }
}

@media (max-width: 600px) {
  .orders-header-title { font-size: 30px; }
  .order-item { grid-template-columns: 1fr; gap: 8px; }
  .item-price { text-align: left; }
  .order-card-head { flex-direction: column; align-items: flex-start; }
}
