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

:root {
  --primary: #2754ff;
  --primary-dark: #1233a3;
  --accent: #00a6ff;
  --green: #0fb981;
  --orange: #ff8a00;
  --danger: #ef4444;
  --text: #101828;
  --muted: #667085;
  --bg: #f6f8fc;
  --white: #ffffff;
  --soft: #eef5ff;
  --line: #e3e9f5;
  --shadow: 0 18px 44px rgba(39, 84, 255, 0.13);
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 92px;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

/* Header */
.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 14px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 22px;
  box-shadow: var(--shadow);
}

.brand-box h3 {
  font-size: 16px;
  line-height: 1;
}

.brand-box p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.login-btn {
  border: none;
  background: var(--soft);
  color: var(--primary-dark);
  padding: 10px 15px;
  border-radius: 50px;
  font-weight: 900;
}

/* Referral */
.ref-strip {
  display: none;
  margin: 12px 15px 0;
  padding: 12px 14px;
  background: #eafaf3;
  color: #087148;
  border-radius: 16px;
  font-size: 14px;
  border: 1px solid #c8f0df;
}

/* Hero */
.page-hero {
  margin: 15px;
  padding: 22px 17px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, #dbeaff, transparent 34%),
    linear-gradient(135deg, #ffffff, #eef5ff);
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.05);
}

.tagline {
  display: inline-block;
  background: var(--soft);
  color: var(--primary-dark);
  border-radius: 50px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.page-hero h1 {
  font-size: 34px;
  line-height: 1.05;
  margin: 12px 0 8px;
  letter-spacing: -1px;
}

.page-hero h1 span {
  color: var(--primary);
}

.page-hero p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Filter */
.filter-box {
  margin: 0 15px 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 13px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.05);
}

.filter-box input,
.filter-box select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 13px;
  outline: none;
  background: white;
}

.filter-box input:focus,
.filter-box select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(39, 84, 255, 0.09);
}

/* Orders */
.orders-section {
  padding: 10px 15px 26px;
}

.orders-grid {
  display: grid;
  gap: 14px;
}

.order-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.05);
}

.order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.order-top h3 {
  font-size: 18px;
}

.order-top p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}

.status-pill {
  border-radius: 50px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.status-pending {
  background: #fff8eb;
  color: #9a5a00;
  border: 1px solid #ffe0a8;
}

.status-uploaded {
  background: #eafaf3;
  color: #087148;
  border: 1px solid #c8f0df;
}

.status-processing {
  background: var(--soft);
  color: var(--primary-dark);
  border: 1px solid #d6e8ff;
}

.status-delivered {
  background: #eafaf3;
  color: #087148;
  border: 1px solid #c8f0df;
}

.order-products {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.order-product {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  background: #f9fbff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
}

.order-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: white;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.order-product h4 {
  font-size: 14px;
  margin-bottom: 2px;
}

.order-product p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.order-product b {
  font-size: 13px;
}

.order-summary-mini {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-top: 13px;
}

.mini-box {
  background: var(--soft);
  border-radius: 17px;
  padding: 11px;
}

.mini-box span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.mini-box b {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.timeline {
  margin: 15px 0;
  border-left: 3px solid var(--line);
  padding-left: 12px;
}

.timeline-row {
  color: var(--muted);
  font-size: 13px;
  margin: 9px 0;
  line-height: 1.35;
}

.timeline-row.active {
  color: var(--primary-dark);
  font-weight: 900;
}

.timeline-row.done {
  color: #087148;
  font-weight: 900;
}

.order-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

/* Empty */
.empty-box {
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
}

.empty-box h3 {
  color: var(--text);
  margin-bottom: 8px;
}

/* Buttons */
.primary-btn,
.secondary-btn,
.outline-btn,
.danger-btn {
  border: none;
  border-radius: 16px;
  padding: 13px 17px;
  font-weight: 900;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: var(--shadow);
}

.secondary-btn {
  background: var(--soft);
  color: var(--primary-dark);
}

.outline-btn {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
}

.danger-btn {
  background: #fff1f1;
  color: var(--danger);
}

.full-btn {
  width: 100%;
}

/* Drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 18, 35, 0.55);
  display: none;
}

.drawer-overlay.active {
  display: block;
}

.order-drawer {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: -100%;
  z-index: 100;
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px 28px 20px 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  max-height: 82vh;
  overflow: auto;
  transition: 0.25s ease;
}

.order-drawer.active {
  bottom: 12px;
}

.drawer-head {
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  padding: 16px;
  border-radius: 28px 28px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.drawer-head h2 {
  font-size: 22px;
}

.drawer-head p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.drawer-head button {
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  font-size: 24px;
}

.drawer-body {
  padding: 16px;
}

.detail-section {
  margin-bottom: 16px;
}

.detail-section h3 {
  font-size: 17px;
  margin-bottom: 10px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.detail-row b {
  color: var(--text);
  text-align: right;
}

.detail-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  background: #f9fbff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  margin-bottom: 8px;
}

.detail-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: white;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.detail-item h4 {
  font-size: 14px;
}

.detail-item p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 560px;
  z-index: 80;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: 0 14px 35px rgba(16, 24, 40, 0.18);
  border-radius: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px;
}

.bottom-nav .nav-item {
  padding: 8px 4px;
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  display: grid;
  gap: 3px;
  place-items: center;
}

.bottom-nav .nav-item span {
  font-size: 17px;
  line-height: 1;
}

.bottom-nav .nav-item b {
  font-size: 10px;
  line-height: 1;
}

.bottom-nav .nav-item.active {
  background: var(--soft);
  color: var(--primary-dark);
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}
/* Login Modal */
.login-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(8, 18, 35, 0.55);
  padding: 15px;
  place-items: end center;
}

.login-modal.active {
  display: grid;
}

.login-box {
  position: relative;
  background: white;
  border-radius: 28px;
  padding: 22px;
  width: 100%;
  max-width: 430px;
}

.close-btn {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 24px;
}

.login-box h2 {
  margin-bottom: 8px;
}

.login-box p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 14px;
}

.login-box label {
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin: 12px 0 6px;
}

.login-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 13px;
  outline: none;
}

.login-box small {
  color: var(--muted);
  display: block;
  margin: 8px 0;
}

.otp-area {
  display: none;
}

/* Desktop */
@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }

  .main-header {
    padding: 18px 38px;
  }

  .ref-strip,
  .page-hero,
  .filter-box {
    margin-left: 38px;
    margin-right: 38px;
  }

  .page-hero {
    padding: 32px;
  }

  .page-hero h1 {
    font-size: 50px;
  }

  .filter-box {
    grid-template-columns: 2fr 1fr;
  }

  .orders-section {
    padding: 10px 38px 36px;
  }

  .orders-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .order-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  .order-drawer {
    left: auto;
    right: 28px;
    width: 480px;
    bottom: auto;
    top: 80px;
    max-height: calc(100vh - 105px);
    transform: translateX(120%);
    border-radius: 28px;
  }

  .order-drawer.active {
    bottom: auto;
    transform: translateX(0);
  }

  .bottom-nav {
    display: none;
  }
}
.order-icon,
.detail-icon {
  overflow: hidden;
}

.order-icon img,
.detail-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-card {
  transition: 0.2s ease;
}

.order-card:hover {
  transform: translateY(-2px);
}

.order-product b,
.detail-item b {
  white-space: nowrap;
}

.drawer-body .order-actions {
  margin-top: 14px;
}

@media (max-width: 420px) {
  .order-product,
  .detail-item {
    grid-template-columns: 42px 1fr;
  }

  .order-product b,
  .detail-item b {
    grid-column: 2;
    justify-self: start;
  }
}