#pickupPage *, #pickupPage *::before, #pickupPage *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#pickupPage body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #f1f5f9;
    color: #0f172a;
    min-height: 100vh;
    padding: 40px 32px;
}

#pickupPage .header {
  max-width: 960px;
  margin: 0 auto 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

#pickupPage .header-left { display: flex; align-items: center; gap: 14px; }

#pickupPage .header-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

#pickupPage .header-icon:hover {
  transform: scale(1.05);
}

#pickupPage .header-icon svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2.5;
}

#pickupPage .header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

#pickupPage .header p {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
  font-weight: 500;
}

#pickupPage .header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

#pickupPage .header-date {
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  text-align: right;
  line-height: 1.6;
}

#pickupPage .header-badge {
  padding: 6px 14px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1e40af;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
  transition: background 0.2s ease, transform 0.15s ease;
}

#pickupPage .header-badge:hover {
  background: #e0f2fe;
  transform: translateY(-1px);
}


/* ── STATS ── */
#pickupPage .stats { max-width: 1000px; margin: 0 auto 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
#pickupPage .stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 20px; }
#pickupPage .stat .label { font-size: 12px; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
#pickupPage .stat .value { font-size: 26px; font-weight: 700; color: #0f172a; margin-top: 4px; letter-spacing: -0.5px; }
#pickupPage .stat.blue .value { color: #2563eb; }
#pickupPage .stat.green .value { color: #16a34a; }

/* ── CARD ── */
#pickupPage .card { max-width: 1000px; margin: 0 auto; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }

/* ── TABLE ── */
#pickupPage table { width: 100%; border-collapse: collapse; }
#pickupPage thead tr { border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
#pickupPage thead th { padding: 12px 20px; text-align: left; font-size: 11.5px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
#pickupPage thead th.center { text-align: center; }
#pickupPage tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.1s; }
#pickupPage tbody tr:last-child { border-bottom: none; }
#pickupPage tbody tr:not(.locked):hover { background: #fafafa; }
#pickupPage tbody tr.locked { background: #f8fafc; }
#pickupPage td { padding: 14px 20px; font-size: 13.5px; vertical-align: middle; }

/* cells */
#pickupPage .td-num { width: 36px; color: #cbd5e1; font-size: 12px; font-weight: 600; }
#pickupPage .td-name .name { font-size: 14px; font-weight: 600; color: #0f172a; }
#pickupPage .td-name .id { font-size: 11.5px; color: #94a3b8; margin-top: 2px; font-weight: 500; }

/* badge */
#pickupPage .badge { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 13px; font-weight: 700; background: #eff6ff; color: #2563eb; }

/* input */
#pickupPage .qty-input { width: 130px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 12px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13.5px; font-weight: 500; color: #0f172a; background: #f8fafc; outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; -moz-appearance: textfield; }
#pickupPage .qty-input::-webkit-inner-spin-button, #pickupPage .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }
#pickupPage .qty-input:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08); }
#pickupPage .qty-input.error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08); }
#pickupPage .locked-val {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #16a34a;
}

#pickupPage .locked-val .unit {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}
#pickupPage .locked-val svg { color: #94a3b8; }

/* coverage */
#pickupPage .cov-empty { font-size: 12px; color: #cbd5e1; font-weight: 500; }
#pickupPage .cov-wrap { display: flex; align-items: center; gap: 10px; min-width: 130px; }
#pickupPage .cov-track { flex: 1; height: 5px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
#pickupPage .cov-fill { height: 100%; border-radius: 99px; background: #2563eb; transition: width 0.35s ease; }
#pickupPage .cov-fill.full { background: #16a34a; }
#pickupPage .cov-pct { font-size: 12px; font-weight: 600; color: #64748b; width: 34px; text-align: right; flex-shrink: 0; }

/* button */
#pickupPage .td-action { text-align: center; }
#pickupPage .btn { padding: 7px 18px; border: none; border-radius: 8px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12.5px; font-weight: 600; cursor: pointer; background: #2563eb; color: #fff; transition: background 0.15s, box-shadow 0.15s; white-space: nowrap; }
#pickupPage .btn:hover { background: #1d4ed8; box-shadow: 0 2px 8px rgba(37,99,235,0.25); }
#pickupPage .btn:active { transform: scale(0.98); }
#pickupPage .confirmed { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #16a34a; }
#pickupPage .confirmed svg { width: 14px; height: 14px; }

/* footer row */
#pickupPage tfoot tr { border-top: 1px solid #e2e8f0; background: #f8fafc; }
#pickupPage tfoot td { padding: 12px 20px; font-size: 12px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }
#pickupPage tfoot td.fval { font-size: 14px; font-weight: 700; color: #0f172a; letter-spacing: 0; text-transform: none; }

/* flash */
#pickupPage .flash { animation: settle 0.7s ease-out forwards; }

/* toast */
#pickupPage #toast { position: fixed; bottom: 24px; right: 24px; background: #0f172a; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13px; font-weight: 500; opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 999; box-shadow: 0 4px 20px rgba(0,0,0,0.15); max-width: 320px; }
#pickupPage #toast.show { opacity: 1; transform: translateY(0); }

/* ── TABLE WRAPPER ── */
#pickupPage .table-wrapper {
    width: 100%;
    /* No overflow-x: auto — we want a true full-width table on all sizes */
}

#pickupPage table {
    /* Remove min-width so the table can shrink to fit the viewport */
    min-width: unset;
    width: 100%;
    table-layout: fixed; /* columns share space proportionally */
}

/* ===============================
   📱 MOBILE TABLE OPTIMIZATION
=================================*/
@media (max-width: 768px) {

    #pickupPage {
        padding: 8px;
    }

    /* ── Header collapses cleanly ── */
    #pickupPage .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 10px;
    }

    #pickupPage .header-icon {
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    #pickupPage .header h1 { font-size: 15px; }
    #pickupPage .header p  { font-size: 11px; }

    #pickupPage .header-right {
        width: 100%;
        justify-content: space-between;
    }

    #pickupPage .header-date { font-size: 11px; }

    #pickupPage .header-badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    /* ── Stats: 3 columns stay, just smaller ── */
    #pickupPage .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        margin-bottom: 10px;
    }

    #pickupPage .stat {
        padding: 10px 10px;
        border-radius: 8px;
    }

    #pickupPage .stat .label {
        font-size: 9px;
        letter-spacing: 0.03em;
    }

    #pickupPage .stat .value {
        font-size: 18px;
        margin-top: 2px;
    }

    /* ── Card ── */
    #pickupPage .card {
        border-radius: 10px;
    }

    /* ── Table headers: tighter, smaller text ── */
    #pickupPage thead th {
        font-size: 9px;
        padding: 8px 6px;
        letter-spacing: 0.03em;
        white-space: normal;       /* allow wrapping if needed */
        word-break: break-word;
    }

    /* ── Table cells: tighter padding, smaller text ── */
    #pickupPage td {
        padding: 10px 6px;
        font-size: 11.5px;
        vertical-align: middle;
    }

    /* ── Row number column: hide on tiny screens if too cramped ── */
    #pickupPage .td-num {
        width: 22px;
        font-size: 10px;
        padding-left: 6px;
        padding-right: 0;
    }

    /* ── Name cell ── */
    #pickupPage .td-name .name { font-size: 12px; }
    #pickupPage .td-name .id   { font-size: 10px; margin-top: 1px; }

    /* ── Badge ── */
    #pickupPage .badge {
        padding: 2px 7px;
        font-size: 11px;
        border-radius: 5px;
    }

    /* ── Quantity input: shrink to fit ── */
    #pickupPage .qty-input {
        width: 100%;          /* fill the cell */
        max-width: 80px;
        padding: 6px 7px;
        font-size: 12px;
        border-radius: 6px;
    }

    /* ── Locked value ── */
    #pickupPage .locked-val {
        font-size: 12px;
        gap: 3px;
    }

    #pickupPage .locked-val .unit { font-size: 10px; }

    /* ── Coverage bar: hide the text percentage on very small cells ── */
    #pickupPage .cov-wrap {
        gap: 5px;
        min-width: unset;
    }

    #pickupPage .cov-pct {
        font-size: 10px;
        width: 26px;
    }

    /* ── Action button ── */
    #pickupPage .btn {
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 6px;
    }

    #pickupPage .confirmed {
        font-size: 10px;
        gap: 3px;
    }

    /* ── Footer ── */
    #pickupPage tfoot td {
        padding: 10px 6px;
        font-size: 10px;
    }

    #pickupPage tfoot td.fval {
        font-size: 12px;
    }

    /* ── Toast: centered at bottom ── */
    #pickupPage #toast {
        left: 50%;
        transform: translateX(-50%) translateY(6px);
        right: auto;
        bottom: 16px;
        max-width: 90%;
        font-size: 12px;
    }

    #pickupPage #toast.show {
        transform: translateX(-50%) translateY(0);
    }
}

/* Extra small screens (< 400px) — hide the # column entirely */
@media (max-width: 400px) {
    #pickupPage .td-num,
    #pickupPage thead th:first-child {
        display: none;
    }
}

.locked-input {
    background: #f0f8ff;
    font-weight: 600;
}

.btn-update {
    background: #2d8cf0;
}
/* Pickup input field */
#pickupPage input[type="number"] {
    width: 80px;                /* compact size */
    padding: 5px 8px;           /* small padding */
    border: 1px solid #ccc;     /* light border */
    border-radius: 5px;          /* rounded corners */
    text-align: center;          /* center the number */
    font-size: 14px;
    transition: 0.2s;
}

#pickupPage input[type="number"]:focus {
    border-color: #007bff;     
    outline: none;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
}

#pickupPage input[type="number"].error {
    border-color: #e83200;      /* red border for error */
    background-color: #ffe5e0;  /* light red background */
}
#pickupPage input[type="number"] {
    width: 60px;
    padding: 4px 6px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#pickupPage input[type="number"].error {
    border-color: #e83200;
    background-color: #ffeaea;
}

/* SEARCH */
#pickupPage .search-bar {
    max-width: 1000px;
    margin: 0 auto 12px;
}

#pickupPage .search-bar input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    outline: none;
}

#pickupPage .search-bar input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}

/* ===============================
   MOBILE CARD VIEW
=================================*/

/* Hide mobile list by default (desktop) */
#mobileList {
    display: none;
}

/* Mobile only */
@media (max-width: 768px) {

    /* Hide table */
    #pickupPage table {
        display: none;
    }

    /* Show mobile list */
    #mobileList {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 10px;
    }

    #pickupPage .pickup-card {
        background: #fff;
        border-radius: 12px;
        padding: 14px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    }

    #pickupPage .pickup-card h3 {
        font-size: 14px;
        margin-bottom: 8px;
        font-weight: 600;
    }

    #pickupPage .pickup-meta {
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        margin-bottom: 10px;
        color: #475569;
    }

    #pickupPage .pickup-card input {
        width: 100%;
        padding: 8px;
        margin-bottom: 8px;
        border-radius: 8px;
        border: 1px solid #cbd5e1;
    }

    #pickupPage .pickup-card button {
        width: 100%;
        padding: 10px;
        border-radius: 8px;
        background: #2563eb;
        color: white;
        border: none;
        font-weight: 600;
    }

    #pickupPage .pickup-card button:disabled {
        background: #94a3b8;
    }
}



}
