/* ==================================
   PAGE LAYOUT
================================== */

.provider-orders-page {
    min-height: 100vh;
    padding: 25px 35px 40px;
    background: transparent !important;
    box-sizing: border-box;
}

/* ==================================
   HEADER
================================== */

.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.provider-header h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: #0d2c54;
    line-height: 1.1;
}

.provider-header p {
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}

/* ==================================
   TABLE WRAPPER
================================== */

.orders-table-wrapper {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #dfe5ec;
    overflow: visible;
    box-shadow: 0 2px 14px rgba(0,0,0,.05);
}

/* ==================================
   TABLE
================================== */

.orders-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.orders-table th {
    padding: 18px 16px;
    text-align: left;
    background: #fff;
    color: #0d2c54;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid #e6ebf1;
}

.orders-table td {
    padding: 14px 16px;
    font-size: 15px;
    color: #0d2c54;
    border-bottom: 1px solid #eef2f6;
    vertical-align: middle;
}

.orders-table th,
.orders-table td {
    border-right: 1px solid #eef2f6;
}

.orders-table th:last-child,
.orders-table td:last-child {
    border-right: none;
}

.orders-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==================================
   COLUMN SIZES
================================== */

.orders-table th:nth-child(1),
.orders-table td:nth-child(1) {
    width: 90px;
}

.orders-table th:nth-child(2),
.orders-table td:nth-child(2) {
    width: 120px;
}

.orders-table th:nth-child(3),
.orders-table td:nth-child(3) {
    width: 170px;
}

.orders-table th:nth-child(4),
.orders-table td:nth-child(4) {
    width: 80px;
}

.orders-table th:nth-child(5),
.orders-table td:nth-child(5) {
    width: 110px;
}

.orders-table th:nth-child(6),
.orders-table td:nth-child(6) {
    width: 135px;
}

.orders-table th:nth-child(7),
.orders-table td:nth-child(7) {
    width: 190px;
}

.orders-table th:nth-child(8),
.orders-table td:nth-child(8) {
    width: 200px;
}

/* ==================================
   PRICE COLUMN
================================== */

.price-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.price-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-price {
    color: #0d2c54;
    font-size: 15px;
    font-weight: 600;
}

.net-price {
    color: #15803d;
    font-size: 14px;
    font-weight: 700;
}

/* ==================================
   STATUS
================================== */

.item-status-cell {
    text-align: center;
}

.item-status-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.item-status-select {
    width: 100px;
    height: 29px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid #d9e2ec;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.item-status-select.status-processing {
    color: #2563eb;
    background: #eef4ff;
    border-color: #adc6ff;
}

.item-status-select.status-completed {
    color: #15803d;
    background: #ecfdf3;
    border-color: #86efac;
}

.item-status-save-btn {
    display: none;
    width: 90px;
    height: 30px;
    border: 1px solid #2563eb;
    border-radius: 999px;
    background: transparent;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.item-status-save-btn:hover {
    background: #eff6ff;
}

/* ==================================
   ORDER TOOLTIPS
================================== */

.price-header,
.status-header,
.tracking-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.orders-help {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #9CA3AF;
    color: #9CA3AF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
}

.orders-tooltip {
    position: absolute;
    top: 28px;
    right: 0;
    left: auto;
    transform: none;

    width: 260px;
    max-width: 260px;
    padding: 12px 14px;

    background: #f8fbff;
    border: 1px solid #d8e4ff;
    border-radius: 12px;

    color: #0d2c54 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;

    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    text-align: left !important;

    box-shadow: 0 10px 25px rgba(75,115,244,.16);

    opacity: 0;
    visibility: hidden;
    transition: .2s ease;
    z-index: 999999;
}

.orders-help:hover .orders-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ==================================
   TRACKING
================================== */

.tracking-card {
    width: 170px;
    max-width: 170px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tracking-form {
    width: 170px;
    max-width: 170px;
    margin: 0;
}

.tracking-input {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    outline: none;
    font-size: 13px;
    color: #0d2c54;
    box-sizing: border-box;
}

.tracking-input:focus {
    border-color: #4b73f4;
    box-shadow: 0 0 0 3px rgba(75,115,244,.12);
}

.tracking-save-btn {
    display: none;
    width: 100%;
    height: 34px;
    margin-top: 4px;
    border: none;
    border-radius: 8px;
    background: #0059b3;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}


.tracking-save-btn:hover {
    background: #004080;
}

.virtual-product-label {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

/* ==================================
   TABLET + MOBILE
================================== */

@media (max-width: 1200px) {
    .orders-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .orders-table {
        min-width: 1150px;
    }
}

@media (max-width: 1000px) {
    .provider-orders-page {
        margin-left: 0;
        padding: 20px 15px;
    }

    .provider-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .provider-header h1 {
        font-size: 26px;
    }
}

.item-status-save-btn[hidden],
.tracking-save-btn[hidden] {
    display: none !important;
}