/* Job related page — admin hub-style list + detail columns */
body.influencer-profile[data-inf-sb-page="job-related"] #content {
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 72px 20px 20px !important;
    box-sizing: border-box !important;
}
body.influencer-profile[data-inf-sb-page="job-related"].has-role-mobile-bottom-nav #content {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
}

.inf-jr-page {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: none;
    width: 100%;
    margin: 0;
}
.inf-jr-capsules {
    flex-shrink: 0;
}
body.influencer-profile[data-inf-sb-page="job-related"] .hub-main-pills.inf-jr-capsules {
    margin-bottom: 10px;
}
body.influencer-profile[data-inf-sb-page="job-related"] .hub-pill-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
body.influencer-profile[data-inf-sb-page="job-related"] .hub-pill-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.78rem;
    color: #475569;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: none;
}
body.influencer-profile[data-inf-sb-page="job-related"] .hub-pill-btn:hover {
    border-color: #c7d2fe;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}
body.influencer-profile[data-inf-sb-page="job-related"] .hub-pill-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
/* Detail back-to-list: icon + text on one baseline (match admin hub-mv-go) */
body.influencer-profile[data-inf-sb-page="job-related"] #inf_oj_detail_back,
body.influencer-profile[data-inf-sb-page="job-related"] #inf_jr_detail_back,
body.influencer-profile[data-inf-sb-page="job-related"] .inf-jr-detail-panel .hub-mv-go {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    min-height: 36px !important;
    padding: 0.35rem 0.85rem !important;
    border: none !important;
    background: #f1f5f9 !important;
    color: #334155 !important;
    box-shadow: none !important;
}
body.influencer-profile[data-inf-sb-page="job-related"] #inf_oj_detail_back > i,
body.influencer-profile[data-inf-sb-page="job-related"] #inf_jr_detail_back > i,
body.influencer-profile[data-inf-sb-page="job-related"] #inf_oj_detail_back > span,
body.influencer-profile[data-inf-sb-page="job-related"] #inf_jr_detail_back > span,
body.influencer-profile[data-inf-sb-page="job-related"] .inf-jr-detail-panel .hub-mv-go > i,
body.influencer-profile[data-inf-sb-page="job-related"] .inf-jr-detail-panel .hub-mv-go > span,
body.influencer-profile[data-inf-sb-page="job-related"] .inf-jr-detail-panel .hub-mv-go > .small {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
    margin: 0 !important;
    vertical-align: middle;
    position: relative;
    top: 0;
}
@media (max-width: 640px) {
    body.influencer-profile[data-inf-sb-page="job-related"] .hub-pill-row {
        gap: 5px !important;
        margin-bottom: 6px !important;
    }
    body.influencer-profile[data-inf-sb-page="job-related"] .hub-pill-btn {
        padding: 4px 10px !important;
        font-size: 0.74rem !important;
    }
}
.inf-jr-records-layout {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.inf-jr-hub-row {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    gap: 16px;
    overflow: hidden;
}

/* —— List panel (left card) —— */
.inf-jr-list-panel {
    flex: 1 1 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: flex-basis 0.28s ease, max-width 0.28s ease;
}
.inf-jr-hub-row.has-detail-open .inf-jr-list-panel {
    flex: 1 1 62%;
    max-width: 62%;
}
.inf-jr-list-panel .inf-jr-list-card-header {
    flex-shrink: 0;
}
.inf-jr-list-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.inf-jr-list-panel > .hub-list-pager {
    flex-shrink: 0;
    border-top: 1px solid #eef2f7;
}
.inf-jr-list-panel .hub-filter-icon-btn {
    margin-left: auto;
}
.rh-history-table thead th.hub-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.rh-history-table thead th.hub-sortable .hub-sort-ind {
    display: inline-block;
    margin-left: 4px;
    opacity: 0.35;
    font-size: 0.75em;
}
.rh-history-table thead th.hub-sortable.is-sorted-asc .hub-sort-ind,
.rh-history-table thead th.hub-sortable.is-sorted-desc .hub-sort-ind {
    opacity: 1;
    color: #4f46e5;
}
@media (max-width: 768px) {
    .inf-jr-list-scroll,
    .inf-jr-detail-body-scroll {
        padding-bottom: 12px !important;
    }
}

/* —— Detail panel (right card, sibling) —— */
.inf-jr-detail-col {
    flex: 0 0 0;
    max-width: 0;
    min-width: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateX(20px);
    transition: flex-basis 0.32s ease, max-width 0.32s ease, opacity 0.32s ease, transform 0.32s ease;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.inf-jr-detail-col.is-open {
    flex: 0 0 38%;
    max-width: 38%;
    opacity: 1;
    transform: translateX(0);
}
.inf-jr-detail-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}
.inf-jr-detail-panel .rph-history-flip-inner {
    flex: 1 1 auto;
    min-height: 0;
}
.inf-jr-detail-panel .inf-jr-detail-body-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.inf-jr-detail-panel.is-filled {
    border-color: #d4d9f7;
    box-shadow: 0 8px 26px rgba(99, 102, 241, 0.09);
}
.inf-jr-detail-panel .panel-card-header {
    flex-shrink: 0;
    padding: 8px 10px;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
}
.inf-jr-detail-panel .panel-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}
.inf-jr-detail-panel .panel-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inf-jr-detail-body-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 16px 18px;
    -webkit-overflow-scrolling: touch;
}

/* Table */
.rh-history-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.rh-history-table thead tr { background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%); border-bottom: 2px solid #e0e7ff; }
.rh-history-table thead th { padding: 12px 16px; font-weight: 700; color: #4f46e5; font-size: 0.82rem; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.rh-history-table tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.15s; }
.rh-history-table tbody tr:hover { background: #f8faff; }
.rh-history-table td { padding: 12px 16px; color: #374151; vertical-align: middle; }
.rh-table-detail-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff; border: none; border-radius: 7px; padding: 6px 14px;
    font-size: 0.8rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}
.rh-table-detail-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(99, 102, 241, 0.4); }

.inf-jr-detail-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.rh-detail-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-bottom: 8px;
    margin: 12px 0 8px;
    border-bottom: 1.5px solid #e0e7ff;
    display: flex;
    align-items: center;
    gap: 6px;
}
.rh-detail-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}
.rh-detail-label {
    flex: 0 0 46%;
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 600;
}
.rh-detail-val {
    flex: 1;
    text-align: right;
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 700;
    word-break: break-word;
}
.inf-jr-desc-block {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
    border: 1px solid #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Ongoing jobs — list progress column */
.inf-oj-list-progress {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.8rem;
    line-height: 1.35;
}
.inf-oj-list-progress-num {
    font-weight: 700;
    color: #6366f1;
    font-size: 0.75rem;
}
.inf-oj-list-progress-txt {
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

/* Vertical progress (detail panel) */
.inf-oj-progress-v {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 4px 0 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.inf-oj-progress-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 4px;
    position: relative;
}
.inf-oj-progress-rail {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40px;
}
.inf-oj-progress-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
    z-index: 1;
}
.inf-oj-progress-line {
    flex: 1 1 auto;
    width: 3px;
    min-height: 20px;
    margin: 4px 0;
    background: #e2e8f0;
    border-radius: 2px;
}
.inf-oj-progress-step--line-done .inf-oj-progress-line {
    background: linear-gradient(180deg, #10b981 0%, #34d399 100%);
}
.inf-oj-progress-step--completed .inf-oj-progress-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
}
.inf-oj-progress-step--in_progress .inf-oj-progress-icon,
.inf-oj-progress-step--awaiting_link_reupload .inf-oj-progress-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
}
.inf-oj-progress-step--waiting_review .inf-oj-progress-icon,
.inf-oj-progress-step--waiting_admin .inf-oj-progress-icon,
.inf-oj-progress-step--awaiting_link_review .inf-oj-progress-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.28);
}
.inf-oj-progress-step--rejected .inf-oj-progress-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.28);
}
.inf-oj-progress-body {
    flex: 1;
    min-width: 0;
    padding-top: 6px;
    padding-bottom: 4px;
}
.inf-oj-progress-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    margin-bottom: 4px;
}
.inf-oj-progress-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}
.inf-oj-progress-step--completed .inf-oj-progress-status { color: #059669; }
.inf-oj-progress-step--in_progress .inf-oj-progress-status { color: #d97706; }
.inf-oj-progress-step--waiting_review .inf-oj-progress-status,
.inf-oj-progress-step--waiting_admin .inf-oj-progress-status,
.inf-oj-progress-step--awaiting_link_review .inf-oj-progress-status { color: #6366f1; }
.inf-oj-progress-step--rejected .inf-oj-progress-status { color: #dc2626; }
.inf-oj-progress-step--awaiting_link_reupload .inf-oj-progress-status { color: #ea580c; }

.inf-oj-progress-actions {
    margin-top: 10px;
}
.inf-oj-progress-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    max-width: 100%;
    text-align: left;
    line-height: 1.3;
}
.inf-oj-progress-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.38);
}
.inf-oj-progress-action-btn i {
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* 寄样任务:配送状态提示(非探店任务) */
.inf-oj-shipping-status-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-width: 100%;
    line-height: 1.3;
}
.inf-oj-shipping-status-text i {
    font-size: 0.95rem;
    flex-shrink: 0;
    color: #6366f1;
}

/* —— Mobile list cards (identical to admin rph-list-card) —— */
.inf-jr-mobile-card-list,
.rph-mobile-card-list {
    display: none;
}
.inf-jr-desktop-table-wrap {
    display: block;
}
body.influencer-profile[data-inf-sb-page="job-related"] .rph-list-card,
body.influencer-profile[data-inf-sb-page="job-related"] .inf-jr-row-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f7;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
    box-sizing: border-box;
}
body.influencer-profile[data-inf-sb-page="job-related"] .rph-list-card:active,
body.influencer-profile[data-inf-sb-page="job-related"] .rph-list-card:hover,
body.influencer-profile[data-inf-sb-page="job-related"] .inf-jr-row-card:active,
body.influencer-profile[data-inf-sb-page="job-related"] .inf-jr-row-card:hover {
    background: #f8faff;
}
body.influencer-profile[data-inf-sb-page="job-related"] .rph-list-card-logo {
    flex: 0 0 auto;
}
body.influencer-profile[data-inf-sb-page="job-related"] .rph-list-card-logo .hub-merchant-logo-img,
body.influencer-profile[data-inf-sb-page="job-related"] .rph-list-card-logo .hub-merchant-logo-fallback {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4338ca;
    font-weight: 700;
    font-size: 1rem;
}
body.influencer-profile[data-inf-sb-page="job-related"] .rph-list-card-logo .hub-merchant-logo-img {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
}
body.influencer-profile[data-inf-sb-page="job-related"] .rph-list-card-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
body.influencer-profile[data-inf-sb-page="job-related"] .rph-list-card-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: anywhere;
    white-space: normal;
}
body.influencer-profile[data-inf-sb-page="job-related"] .rph-list-card-actions {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 5;
}
body.influencer-profile[data-inf-sb-page="job-related"] .col-merchant .hub-merchant-logo-img,
body.influencer-profile[data-inf-sb-page="job-related"] .col-merchant .hub-merchant-logo-fallback {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4338ca;
    font-weight: 700;
}
@media (max-width: 991.98px) {
    body.influencer-profile[data-inf-sb-page="job-related"] .inf-jr-desktop-table-wrap {
        display: none !important;
    }
    body.influencer-profile[data-inf-sb-page="job-related"] .inf-jr-mobile-card-list,
    body.influencer-profile[data-inf-sb-page="job-related"] .rph-mobile-card-list {
        display: block;
    }
}
.inf-jr-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}
body.influencer-profile[data-inf-sb-page="job-related"] .hub-act-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    background: #eef2ff;
    color: #4f46e5;
    padding: 0;
    cursor: pointer;
    box-shadow: none;
}
body.influencer-profile[data-inf-sb-page="job-related"] .hub-act-btn--detail {
    background: #eef2ff !important;
    color: #4f46e5 !important;
    border: none !important;
}
body.influencer-profile[data-inf-sb-page="job-related"] .hub-act-btn i {
    font-size: 0.95rem;
    line-height: 1;
    margin: 0 !important;
}

/* Tablet + phone: toggle list / detail (not side-by-side) */
@media (max-width: 991px) {
    .inf-jr-hub-row.has-detail-open .inf-jr-list-panel {
        display: none !important;
    }
    #inf_oj_hub_row.has-detail-open #inf_oj_list_panel {
        display: none !important;
    }
    .inf-jr-detail-col.is-open {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        opacity: 1;
        transform: none;
    }
    .inf-jr-desktop-table-wrap {
        display: none !important;
    }
    .inf-jr-mobile-card-list {
        display: block !important;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 768px) {
    body.influencer-profile[data-inf-sb-page="job-related"] #content {
        padding: 68px 12px 12px !important;
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .inf-jr-hub-row { gap: 0; }
    .rh-history-table { font-size: 0.8rem; }
    .rh-history-table thead th,
    .rh-history-table td { padding: 10px 8px; }
}
