/* =====================================================
   GLOBAL RESET
===================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
        'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #0f172a;
    line-height: 1.6;
}

/* =====================================================
   VARIABLES
===================================================== */
:root {
    --violet: #6d28d9;
    --violet-dark: #5b21b6;
    --violet-soft: rgba(109, 40, 217, 0.12);

    --border: #e5e7eb;
    --muted: #64748b;
    --bg-soft: #f8fafc;

    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
}

/* =====================================================
   PAGE WRAPPER
===================================================== */
.track-page {
    padding: 120px 16px 100px;
    display: flex;
    justify-content: center;
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        #fafafa 100%
    );
}

.track-container {
    width: 100%;
    max-width: 980px;
}

/* =====================================================
   HEADER
===================================================== */
.track-header {
    text-align: center;
    margin-bottom: 42px;
}

.track-header h1 {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.track-header p {
    margin-top: 10px;
    font-size: 16px;
    color: var(--muted);
}

/* =====================================================
   ALERT
===================================================== */
.alert-box {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #fecaca;
    color: #7f1d1d;
    background: #fff5f5;
    margin-bottom: 22px;
    font-size: 14px;
}

/* =====================================================
   CARD BASE
===================================================== */
.card {
    background: #ffffff;
    border-radius: 22px;
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* =====================================================
   SEARCH CARD
===================================================== */
.search-card {
    margin-bottom: 34px;
}

/* ===== Modern Switches ===== */
.search-type {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.search-type label {
    position: relative;
    cursor: pointer;
}

.search-type input {
    display: none;
}

.search-type span {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid var(--border);
    color: #334155;
    background: #ffffff;
    transition: all 0.25s ease;
}

.search-type input:checked + span {
    background: linear-gradient(
        135deg,
        var(--violet),
        var(--violet-dark)
    );
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(109, 40, 217, 0.35);
}

/* =====================================================
   INPUT ROW
===================================================== */
.search-row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.search-row input {
    flex: 1;
    height: 56px;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 0 18px;
    font-size: 15px;
    background: #ffffff;
}

.search-row input::placeholder {
    color: #94a3b8;
}

.search-row input:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 4px var(--violet-soft);
}

/* CTA */
.search-row button {
    height: 56px;
    padding: 0 26px;
    border-radius: 16px;
    border: none;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--violet),
        var(--violet-dark)
    );
    box-shadow: 0 14px 30px rgba(109, 40, 217, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-row button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(109, 40, 217, 0.5);
}

.hint {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
}

/* =====================================================
   ORDER CARD
===================================================== */
.order-card {
    margin-top: 36px;
}

.order-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.order-head h2 {
    font-size: 24px;
    font-weight: 900;
}

.order-head p {
    font-size: 14px;
    color: var(--muted);
}

/* =====================================================
   STATUS BADGES
===================================================== */
.status-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status,
.flow {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid var(--border);
    background: #ffffff;
}

.status.success,
.flow.completed {
    color: var(--success);
    border-color: #bbf7d0;
}

.status.pending,
.flow.in\ progress {
    color: var(--warning);
    border-color: #fde68a;
}

/* =====================================================
   META GRID
===================================================== */
.order-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.order-meta label {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
}

.order-meta span {
    display: block;
    margin-top: 6px;
    font-weight: 800;
}

/* =====================================================
   TABLE
===================================================== */
.table-wrap {
    border-radius: 16px;
    overflow-x: auto;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

th,
td {
    padding: 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 800;
    background: var(--bg-soft);
}

.right {
    text-align: right;
}

/* =====================================================
   ACTIONS
===================================================== */
.order-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-outline {
    padding: 14px 22px;
    border-radius: 16px;
    font-weight: 800;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(
        135deg,
        var(--violet),
        var(--violet-dark)
    );
    color: #ffffff;
}

.btn-outline {
    border: 1px solid var(--border);
    color: #0f172a;
    background: #ffffff;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 640px) {
    .search-row {
        flex-direction: column;
        align-items: stretch;
    }

    .order-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-actions {
        justify-content: stretch;
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
        text-align: center;
    }
}


/* =====================================================
   ORDER STATUS COLORS
   enum('Pending','Process','In Progress','Completed','Cancelled','Failed')
===================================================== */

/* ---------- Pending ---------- */
.badge.flow.pending {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

/* ---------- Process ---------- */
.badge.flow.process {
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

/* ---------- In Progress ---------- */
.badge.flow.in\ progress {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ---------- Completed ---------- */
.badge.flow.completed {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ---------- Cancelled ---------- */
.badge.flow.cancelled {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ---------- Failed ---------- */
.badge.flow.failed {
    background: #1f2933;
    color: #fca5a5;
    border: 1px solid #374151;
}


/* =====================================================
   BULK ORDERS TABLE
===================================================== */

.bulk-orders-card {
    margin-top: 24px;
    padding: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,.06);
    overflow: hidden;
}

.bulk-orders-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

/* ================= HEADER ================= */

.bulk-orders-table thead th {
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

/* ================= BODY ================= */

.bulk-orders-table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
    color: #0f172a;
}

.bulk-orders-table tbody tr:hover {
    background: #fafafa;
}

/* Alignment helpers */
.bulk-orders-table .right {
    text-align: right;
}

.bulk-orders-table .center {
    text-align: center;
}

/* ================= TEXT HELPERS ================= */

.bulk-orders-table .mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
}

.bulk-orders-table .muted {
    color: var(--muted);
}

.bulk-orders-table .muted.small {
    font-size: 12px;
    margin-top: 2px;
}

/* ================= EMPTY STATE ================= */

.bulk-orders-table .empty-cell {
    text-align: center;
    padding: 32px;
    color: var(--muted);
    font-style: italic;
}

/* ================= STATUS BADGES ================= */

.bulk-orders-table .badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

/* Payment status */
.bulk-orders-table .badge.success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.bulk-orders-table .badge.pending {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.bulk-orders-table .badge.failed {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

/* Order flow status */
.bulk-orders-table .badge.process {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

.bulk-orders-table .badge.in-progress {
    background: #cffafe;
    color: #155e75;
    border-color: #a5f3fc;
}

.bulk-orders-table .badge.completed {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

/* ================= BUTTONS ================= */

.bulk-orders-table .btn-primary.mini {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 800;
    border-radius: 10px;
    white-space: nowrap;
}

/* ================= DATE / TIME ================= */

.bulk-orders-table .date {
    font-weight: 700;
}

.bulk-orders-table .time {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
    .table-wrap {
        overflow-x: auto;
    }

    .bulk-orders-table {
        min-width: 900px;
    }
}
/* =====================================================
   FORCE INLINE TABLE CONTENT (NO WRAPPING)
===================================================== */

/* Prevent text wrapping in ALL table cells */
.bulk-orders-table th,
.bulk-orders-table td {
    white-space: nowrap;
    word-break: keep-all;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Network column (MTN Non-Expiry + GB) */
.bulk-orders-table td strong,
.bulk-orders-table td .muted.small {
    display: inline-block;
    white-space: nowrap;
}

/* Amount (GH₵ 6.00 stays inline) */
.bulk-orders-table td .amount {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-weight: 800;
}

/* Status badges inline */
.bulk-orders-table .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Date + time inline */
.bulk-orders-table .date,
.bulk-orders-table .time {
    display: inline-block;
    white-space: nowrap;
}

/* Action button inline */
.bulk-orders-table .btn-primary.mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Keep reference strictly one line */
.bulk-orders-table .mono {
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ensure rows never stretch vertically */
.bulk-orders-table tbody tr {
    height: 72px;
}


/* =========================================================
   SMALL MOBILE (ENHANCED SIZE)
========================================================= */
@media (max-width: 480px){

    .search-card{
        padding:1.4rem;
    }

    .search-row input{
        width:100%;
        font-size:1.05rem;      /* bigger text */
        padding:1rem 1.2rem;    /* taller input */
        border-radius:16px;     /* softer premium look */
        min-height:54px;        /* larger height */
    }

    .search-row button{
        width:100%;
        padding:1rem 1.2rem;
        font-size:1rem;
        border-radius:16px;
        min-height:54px;
    }
}
