:root {
    --ink: #1f2d3d;
    --teal: #0da7ac;
    --teal-deep: #0a8fa4;
    --teal-darker: #074447;
    --foam: #eafcfb;
    --line: #e9ecef;
    --muted: #6c757d;
    --white: #ffffff;
}

/* =========================================================
   CUSTOMER DETAIL PAGE
   ========================================================= */

.acd {
    color: var(--ink);
}

/* =========================================================
   BACK BUTTON
   ========================================================= */

.acd > .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 9px 15px;
    margin-bottom: 20px !important;

    background: #fff;
    color: var(--ink);

    border: 1px solid var(--line);
    border-radius: 9px;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.acd > .btn-secondary:hover {
    background: var(--foam);
    color: var(--teal-darker);

    border-color: #c9ecea;

    transform: translateX(-2px);

    box-shadow: 0 4px 10px rgba(10, 110, 116, 0.08);
}


/* =========================================================
   GENERAL CARD
   ========================================================= */

.acd > .card {
    overflow: hidden;

    background: var(--white);

    border: 1px solid var(--line) !important;
    border-radius: 14px !important;

    box-shadow:
        0 4px 14px rgba(10, 110, 116, 0.06);
}


/* =========================================================
   CUSTOMER INFORMATION CARD
   ========================================================= */

.acd > .card:first-of-type {
    margin-bottom: 20px !important;
}


/* =========================================================
   CUSTOMER INFORMATION HEADER
   ========================================================= */

.acd > .card:first-of-type .card-header {
    padding: 16px 20px;

    background: linear-gradient(
        135deg,
        var(--teal),
        var(--teal-deep)
    ) !important;

    color: #fff;

    border: none;
}

.acd > .card:first-of-type .card-header h5 {
    margin: 0 !important;

    font-size: 17px;
    font-weight: 700;
}


/* =========================================================
   CUSTOMER INFORMATION BODY
   ========================================================= */

.acd > .card:first-of-type .card-body {
    padding: 20px;
}

.acd > .card:first-of-type .card-body p {
    margin-bottom: 9px !important;

    color: var(--muted);

    font-size: 14px;
    line-height: 1.6;
}

.acd > .card:first-of-type .card-body p:last-child {
    margin-bottom: 0 !important;
}

.acd > .card:first-of-type .card-body strong {
    color: var(--ink);
    font-weight: 700;
}


/* =========================================================
   STATS COLUMN
   ========================================================= */

.acd > .card:first-of-type .col-md-6:last-child {
    padding-left: 25px;

    border-left: 1px solid #edf1f1;
}


/* =========================================================
   ORDER HISTORY CARD
========================================================= */

.acd .order-history-card {
    margin-bottom: 0 !important;

    overflow: hidden;

    background: #fff;

    border: 1px solid var(--line) !important;
    border-radius: 14px !important;

    box-shadow:
        0 4px 14px rgba(10, 110, 116, 0.06);
}


/* =========================================================
   ORDER HISTORY HEADER
========================================================= */

.acd .order-history-card .card-header {
    padding: 16px 20px;
    background: linear-gradient(
        135deg,
        var(--teal),
        var(--teal-deep)
    ) !important;
    color: #fff !important;
    border: none !important;
}
.acd .order-history-card .card-header h5 {
    margin: 0 !important;

    color: #fff !important;

    font-size: 16px;
    font-weight: 700;
}



/* =========================================================
   ORDER HISTORY BODY
   ========================================================= */

.acd > .card:last-of-type .card-body {
    padding: 0;
}


/* =========================================================
   EMPTY ORDERS
   ========================================================= */

.acd .text-muted.text-center {
    padding: 32px 20px;

    color: var(--muted) !important;

    font-size: 14px;
}


/* =========================================================
   TABLE WRAPPER
   ========================================================= */

.acd .table-responsive {
    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;
}


/* =========================================================
   ORDER TABLE
   ========================================================= */

.acd table {
    width: 100%;

    margin-bottom: 0 !important;

    font-size: 13.5px;

    border-collapse: collapse;
}


/* =========================================================
   TABLE HEADER
   ========================================================= */

/* =========================================================
   TABLE HEADER
========================================================= */

.acd .table thead {
    background: linear-gradient(
        135deg,
        #f0fbfb,
        #eafcfb
    ) !important;
}

.acd .table thead tr {
    background: transparent !important;
}

.acd .table thead th {
    padding: 14px 15px !important;
    background: transparent !important;
    color: var(--teal-darker) !important;
    border: none !important;
    border-bottom: 2px solid #c9ecea !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

/* First header cell */
.acd .table thead th:first-child {
    padding-left: 20px !important;
}

/* Last header cell */
.acd .table thead th:last-child {
    padding-right: 20px !important;
}


/* =========================================================
   TABLE BODY
   ========================================================= */

.acd table tbody td {
    padding: 13px 15px;

    color: var(--ink);

    border: none !important;
    border-bottom: 1px solid #f1f3f5 !important;

    vertical-align: middle;
}

.acd table tbody tr {
    background: #fff;

    transition:
        background 0.15s ease;
}

.acd table tbody tr:hover {
    background: #f8fbfc !important;
}

.acd table tbody tr:last-child td {
    border-bottom: none !important;
}


/* =========================================================
   ORDER ID
   ========================================================= */

.acd table tbody td:first-child strong {
    color: var(--teal-darker);

    font-weight: 700;
}


/* =========================================================
   DATE / TIME
   ========================================================= */

.acd table tbody td small {
    color: var(--muted) !important;

    font-size: 11px;
}


/* =========================================================
   AMOUNT
   ========================================================= */

.acd table tbody td:nth-child(4) {
    color: var(--ink);

    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
   BADGES
   ========================================================= */

.acd .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 70px;

    padding: 5px 10px;

    border-radius: 999px;

    font-size: 10.5px;
    font-weight: 700;

    line-height: 1.2;
}


/* =========================================================
   SUCCESS
   ========================================================= */

.acd .badge.bg-success {
    background: #d1fae5 !important;
    color: #065f46 !important;
}


/* =========================================================
   WARNING
   ========================================================= */

.acd .badge.bg-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
}


/* =========================================================
   DANGER
   ========================================================= */

.acd .badge.bg-danger {
    background: #fdeeee !important;
    color: #9c2b2b !important;
}


/* =========================================================
   INFO
   ========================================================= */

.acd .badge.bg-info {
    background: #dbeafe !important;
    color: #1e40af !important;
}


/* =========================================================
   PRIMARY
   ========================================================= */

.acd .badge.bg-primary {
    background: #e0e7ff !important;
    color: #3730a3 !important;
}


/* =========================================================
   DARK
   ========================================================= */

.acd .badge.bg-dark {
    background: #e5e7eb !important;
    color: #374151 !important;
}


/* =========================================================
   SECONDARY
   ========================================================= */

.acd .badge.bg-secondary {
    background: #f1f3f5 !important;
    color: var(--muted) !important;
}


/* =========================================================
   ORDER HISTORY PAGINATION
   ========================================================= */

.acd .order-pagination-wrap {
    margin-top: 15px;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
}


.acd .order-pagination-info {
    background: #f4f6f8;
    color: var(--muted);

    padding: 8px 14px;

    border-radius: 8px;

    font-size: 13px;
}

.acd .order-pagination-nav {
    display: flex;
    align-items: center;
    gap: 8px;

    flex-wrap: wrap;
}

.acd .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 36px;
    height: 36px;

    padding: 0 12px;

    background: #fff;
    color: var(--ink);

    border: 1px solid var(--line);
    border-radius: 8px;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.acd .page-btn:hover {
    background: var(--foam);
    color: var(--teal-darker);

    border-color: #c9ecea;

    transform: translateY(-1px);

    text-decoration: none;
}

.acd .page-btn.active {
    background: linear-gradient(
        135deg,
        var(--teal),
        var(--teal-deep)
    );

    color: #fff;

    border-color: transparent;

    box-shadow: 0 4px 10px rgba(10, 143, 164, 0.20);
}

.acd .page-btn.active:hover {
    background: linear-gradient(
        135deg,
        var(--teal),
        var(--teal-deep)
    );

    color: #fff;

    transform: none;
}

.acd .page-btn.dots {
    min-width: 20px;

    padding: 0 2px;

    background: transparent;
    color: #adb5bd;

    border: none;

    cursor: default;
}

.acd .page-btn.dots:hover {
    background: transparent;
    color: #adb5bd;

    transform: none;
}

.acd .page-btn.next {
    padding: 0 14px;
}


/* =========================================================
   MOBILE TABLE
   ========================================================= */

@media (max-width: 768px) {

    /* Customer card */

    .acd > .card:first-of-type .card-body {
        padding: 16px;
    }

    .acd > .card:first-of-type .row {
        display: block;
    }

    .acd > .card:first-of-type .col-md-6 {
        width: 100%;

        padding-left: 0;
        padding-right: 0;
    }

    .acd > .card:first-of-type .col-md-6:last-child {
        margin-top: 18px;

        padding-top: 18px;
        padding-left: 0;

        border-left: none;
        border-top: 1px solid #edf1f1;
    }


    /* Order table */

    .acd .table-responsive {
        overflow: visible;
    }

    .acd table,
    .acd table tbody {
        display: block;

        width: 100%;
    }

    .acd table thead {
        display: none;
    }


    /* Order card */

    .acd table tbody tr {
        display: block;

        margin: 12px;

        padding: 14px;

        background: #fff;

        border: 1px solid var(--line);

        border-radius: 12px;

        box-shadow:
            0 3px 10px rgba(10, 110, 116, 0.05);
    }

    .acd table tbody tr:last-child {
        margin-bottom: 12px;
    }


    /* Table cells */

    .acd table tbody td {
        display: flex;

        align-items: center;
        justify-content: space-between;

        width: 100%;

        padding: 9px 0;

        border-bottom: 1px solid #f1f3f5 !important;

        text-align: right;

        white-space: normal;
    }

    .acd table tbody td:last-child {
        padding-bottom: 0;

        border-bottom: none !important;
    }


    /* Mobile labels */

    .acd table tbody td::before {
        content: attr(data-label);

        flex: 0 0 36%;

        margin-right: 12px;

        color: var(--muted);

        font-size: 10px;
        font-weight: 700;

        text-align: left;

        text-transform: uppercase;

        letter-spacing: 0.03em;
    }


    /* Order history pagination */

    .acd .order-pagination-wrap {
        justify-content: center;
        text-align: center;

        padding: 15px 12px;
    }

    .acd .order-pagination-nav {
        justify-content: center;

        gap: 5px;
    }

    .acd .page-btn {
        min-width: 33px;
        height: 33px;

        padding: 0 9px;

        font-size: 12px;
    }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 480px) {

    /* Back button */

    .acd > .btn-secondary {
        width: 100%;

        justify-content: center;

        margin-bottom: 16px !important;
    }


    /* Cards */

    .acd > .card:first-of-type .card-header,
    .acd > .card:last-of-type .card-header {
        padding: 14px 16px;
    }

    .acd > .card:first-of-type .card-header h5 {
        font-size: 15px;
    }

    .acd > .card:first-of-type .card-body {
        padding: 15px;
    }

    .acd > .card:first-of-type .card-body p {
        font-size: 13px;
    }


    /* Order cards */

    .acd table tbody tr {
        margin: 10px;

        padding: 13px;
    }

    .acd table tbody td {
        font-size: 13px;
    }

    .acd table tbody td::before {
        flex-basis: 38%;

        font-size: 9.5px;
    }


    /* Badges */

    .acd .badge {
        min-width: 65px;

        padding: 5px 8px;

        font-size: 10px;
    }


    /* Order history pagination */

    .acd .order-pagination-wrap {
        padding: 13px 8px;
    }

    .acd .order-pagination-nav {
        gap: 4px;
    }

    .acd .page-btn {
        min-width: 30px;
        height: 30px;

        padding: 0 7px;

        font-size: 11px;
    }
}