:root {
    --sp-blue: #0877b8;
    --sp-blue-dark: #005f96;
    --sp-navy: #002d49;
    --sp-navy-2: #082d43;
    --sp-soft: #eef7fc;
    --sp-soft-2: #f6f9fc;
    --sp-border: #dfe7ef;
    --sp-text: #182533;
    --sp-muted: #667788;
    --sp-success: #18a66a;
    --sp-danger: #dc5360;
    --sp-warning: #e5a229;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.souqpulse-body { font-family: Inter, sans-serif; background: #f4f7fa; color: var(--sp-text); font-size: 14px; }
a { color: var(--sp-blue); }
.souqpulse-navbar { min-height: 74px; background: #fff; border-bottom: 1px solid var(--sp-border); box-shadow: 0 3px 18px rgba(0,45,73,.05); z-index: 1030; }
.souqpulse-brand img { width: 220px; max-width: 100%; height: 42px; object-fit: contain; object-position: left center; }
.souqpulse-main-nav { gap: 5px; }
.souqpulse-main-nav .nav-link { color: #536474; font-weight: 600; padding: 11px 15px !important; border-radius: 9px; display: flex; align-items: center; gap: 8px; transition: .2s ease; }
.souqpulse-main-nav .nav-link i { color: #788a99; }
.souqpulse-main-nav .nav-link:hover { color: var(--sp-blue); background: var(--sp-soft); }
.souqpulse-main-nav .nav-link.active { color: #fff; background: var(--sp-blue); box-shadow: 0 7px 16px rgba(8,119,184,.18); }
.souqpulse-main-nav .nav-link.active i { color: #fff; }
.souqpulse-settings-menu { min-width: 220px; padding: 8px; border: 1px solid var(--sp-border); border-radius: 12px; box-shadow: 0 14px 38px rgba(20,44,65,.14); }
.souqpulse-settings-menu .dropdown-item { padding: 9px 11px; border-radius: 8px; font-weight: 500; }
.souqpulse-settings-menu .dropdown-item i { width: 22px; color: var(--sp-blue); }
.user-menu-btn { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; color: var(--sp-navy); }
.user-menu-btn small { display: block; color: #8897a4; font-size: 10px; }
.user-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--sp-soft); color: var(--sp-blue); display: inline-flex; align-items: center; justify-content: center; }
.souqpulse-main { min-height: calc(100vh - 128px); }
.souqpulse-footer { min-height: 54px; background: #fff; border-top: 1px solid var(--sp-border); color: #7d8b98; font-size: 12px; display: flex; align-items: center; }
.page-title-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.page-title-wrap h3 { color: var(--sp-navy); font-size: 22px; margin: 0 0 4px; font-weight: 700; }
.page-title-wrap p { color: var(--sp-muted); margin: 0; }
.card { border: 1px solid var(--sp-border); box-shadow: 0 6px 20px rgba(24,37,51,.045); border-radius: 13px; }
.card-header { background: #fff; border-bottom: 1px solid var(--sp-border); padding: 15px 18px; border-radius: 13px 13px 0 0 !important; }
.card-title { color: var(--sp-navy); font-weight: 700; }
.btn-primary { background: var(--sp-blue); border-color: var(--sp-blue); }
.btn-primary:hover, .btn-primary:focus { background: var(--sp-blue-dark); border-color: var(--sp-blue-dark); }
.btn-soft-primary { color: var(--sp-blue); background: var(--sp-soft); border-color: #d5ebf7; }
.btn-soft-primary:hover { color: #fff; background: var(--sp-blue); border-color: var(--sp-blue); }
.form-label { font-weight: 600; color: #344757; }
.form-control, .form-select { border-color: #d8e2eb; min-height: 42px; border-radius: 8px; }
.form-control:focus, .form-select:focus { border-color: #76b7dd; box-shadow: 0 0 0 .2rem rgba(8,119,184,.1); }
.select2-container { width: 100% !important; }
.select2-container--default .select2-selection--single { height: 42px; border: 1px solid #d8e2eb; border-radius: 8px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 40px; padding-left: 13px; color: #344757; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; }
.select2-dropdown { border: 1px solid #d8e2eb; border-radius: 8px; box-shadow: 0 8px 24px rgba(24,37,51,.12); overflow: hidden; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--sp-blue); }
.table { vertical-align: middle; }
.table thead th { background: #f7f9fb; color: #526473; font-size: 11px; text-transform: uppercase; letter-spacing: .035em; border-bottom-width: 1px; white-space: nowrap; }
.table td { color: #344757; }
.table-actions { display: flex; gap: 6px; white-space: nowrap; }
.action-btn { width: 34px; height: 34px; border-radius: 8px; border: 0; display: inline-flex; align-items: center; justify-content: center; }
.action-edit { background: #eaf5fb; color: var(--sp-blue); }
.action-delete { background: #fff0f1; color: var(--sp-danger); }
.status-chip { border: 0; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 72px; transition: .2s ease; }
.status-chip:hover { transform: translateY(-1px); }
.status-active { background: #e7f8ef; color: #138653; }
.status-inactive { background: #f1f3f5; color: #737f89; }
.record-status { padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; text-transform: capitalize; }
.record-status.pending { background: #fff7df; color: #a87610; }
.record-status.approved { background: #e7f8ef; color: #138653; }
.record-status.rejected { background: #fff0f1; color: #bd3f4b; }
.new-offer-yes { background: #e8f3ff; color: #176ea7; }
.new-offer-no { background: #f1f3f5; color: #6a7884; }
.modal-content { border: 0; border-radius: 15px; box-shadow: 0 25px 70px rgba(20,44,65,.2); }
.modal-header { border-bottom-color: var(--sp-border); }
.modal-footer { border-top-color: var(--sp-border); }
.souqpulse-toast-container { position: fixed; top: 92px; right: 22px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.souqpulse-toast { min-width: 290px; max-width: 390px; background: #fff; border: 1px solid var(--sp-border); border-left: 4px solid var(--sp-blue); box-shadow: 0 14px 36px rgba(20,44,65,.18); border-radius: 10px; padding: 13px 16px; display: flex; align-items: flex-start; gap: 10px; animation: spToastIn .25s ease; transition: opacity .35s ease, transform .35s ease; pointer-events: auto; }
.souqpulse-toast.success { border-left-color: var(--sp-success); }
.souqpulse-toast.error { border-left-color: var(--sp-danger); }
.souqpulse-toast.fade-out { opacity: 0; transform: translateX(20px); }
.souqpulse-toast i { margin-top: 2px; }
.souqpulse-toast.success i { color: var(--sp-success); }
.souqpulse-toast.error i { color: var(--sp-danger); }
@keyframes spToastIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform:none; } }
.flatpickr-calendar { border-radius: 12px; border: 1px solid #d6e5ef; box-shadow: 0 12px 34px rgba(0,45,73,.18); overflow: hidden; }
.flatpickr-months { background: var(--sp-navy); color: #fff; }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months, .flatpickr-current-month input.cur-year, .flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { color: #fff; fill: #fff; }
.flatpickr-weekdays { background: #f0f7fb; }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange { background: var(--sp-blue); border-color: var(--sp-blue); color: #fff; }
.flatpickr-day.inRange { background: #e3f1f9; border-color: #e3f1f9; box-shadow: -5px 0 0 #e3f1f9, 5px 0 0 #e3f1f9; }
.kpi-card { position: relative; overflow: hidden; min-height: 132px; }
.kpi-card:after { content:''; position:absolute; width:105px; height:105px; right:-35px; top:-35px; background: rgba(8,119,184,.06); border-radius:50%; }
.kpi-card .kpi-label { font-size: 12px; color: #71818f; font-weight: 600; }
.kpi-card .kpi-value { font-size: 28px; color: var(--sp-navy); font-weight: 800; margin: 9px 0 2px; }
.kpi-card .kpi-sub { font-size: 11px; color: #8a98a4; }
.kpi-icon { width: 46px; height: 46px; border-radius: 12px; display:flex; align-items:center; justify-content:center; background: var(--sp-soft); color: var(--sp-blue); font-size: 19px; }
.dashboard-filter { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.dashboard-filter .form-control { width: 235px; }
.chart-box { min-height: 315px; }
.latest-entry-message { max-width: 390px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-state { padding: 44px 20px; text-align:center; color:#8292a0; }
.empty-state i { font-size: 34px; color:#aac3d3; margin-bottom:10px; }
.login-page { min-height:100vh; background: radial-gradient(circle at 12% 18%, rgba(8,119,184,.16), transparent 30%), radial-gradient(circle at 90% 80%, rgba(0,45,73,.10), transparent 32%), linear-gradient(135deg,#f7fbfe,#edf6fb); display:flex; align-items:center; justify-content:center; padding:24px; }
.login-shell { width:min(1180px,96vw); min-height:650px; background:#fff; display:grid; grid-template-columns:1.08fr .92fr; border-radius:24px; overflow:hidden; box-shadow:0 32px 90px rgba(0,45,73,.15); }
.login-brand { padding:54px; color:#fff; background: linear-gradient(145deg,#002d49 0%,#064c74 55%,#0877b8 100%); position:relative; overflow:hidden; }
.login-brand:after { content:''; position:absolute; width:370px; height:370px; border-radius:50%; background:rgba(255,255,255,.06); right:-170px; bottom:-160px; }
.login-brand img { width:315px; filter: brightness(0) invert(1); margin-bottom:52px; position:relative; z-index:2; }
.login-brand h1 { font-size:39px; line-height:1.16; font-weight:700; margin-bottom:15px; position:relative; z-index:2; }
.login-brand p { font-size:16px; color:rgba(255,255,255,.82); max-width:550px; line-height:1.6; position:relative; z-index:2; }
.login-feature-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:38px; position:relative; z-index:2; }
.login-feature { border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.08); border-radius:13px; padding:15px; }
.login-feature i { font-size:18px; margin-bottom:9px; }
.login-feature strong { display:block; margin-bottom:4px; }
.login-feature span { font-size:11px; color:rgba(255,255,255,.72); line-height:1.45; display:block; }
.login-form-side { display:flex; align-items:center; padding:62px; }
.login-form-card { width:100%; max-width:430px; margin:auto; }
.login-form-card .brand-mini { display:none; width:240px; margin-bottom:25px; }
.login-form-card h2 { color:var(--sp-navy); font-size:28px; font-weight:700; }
.login-form-card .lead-text { color:#7c8c99; margin-bottom:34px; }
.login-input-wrap { position:relative; }
.login-input-wrap > i { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:#8fa1af; }
.login-input-wrap .form-control { padding-left:42px; height:48px; }
.password-toggle { position:absolute; right:12px; top:50%; transform:translateY(-50%); border:0; background:transparent; color:#8fa1af; }
.login-btn { height:48px; font-weight:700; }
.dataTables_wrapper .dataTables_length select { min-width:72px; }
.dataTables_wrapper .dataTables_filter input { border:1px solid #d8e2eb; border-radius:8px; padding:7px 10px; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { background:var(--sp-blue) !important; color:#fff !important; border-color:var(--sp-blue) !important; }
@media (max-width: 1199.98px) {
    .souqpulse-brand img { width:185px; }
    .souqpulse-main-nav { margin-top:12px; margin-bottom:12px; }
    .souqpulse-main-nav .nav-link { padding:10px 12px !important; }
    .souqpulse-user-menu { margin-bottom:12px; }
}
@media (max-width: 900px) {
    .login-shell { grid-template-columns:1fr; min-height:unset; }
    .login-brand { display:none; }
    .login-form-side { padding:42px 30px; min-height:620px; }
    .login-form-card .brand-mini { display:block; }
}
@media (max-width: 575.98px) {
    .page-title-wrap { align-items:flex-start; }
    .dashboard-filter { width:100%; }
    .dashboard-filter .form-control { flex:1; min-width:180px; }
    .souqpulse-toast-container { left:14px; right:14px; top:84px; }
    .souqpulse-toast { min-width:0; width:100%; }
}

/* SouqPulse v2 refinements */
.nav-caret, .user-caret { font-size: 10px; margin-left: 2px; transition: transform .18s ease; }
.show > .nav-link .nav-caret, .show > .user-menu-btn .user-caret { transform: rotate(180deg); }
.souqpulse-main-nav .dropdown-toggle::after, .user-menu-btn.dropdown-toggle::after { display: none !important; }
.user-dropdown-menu { min-width: 230px; padding: 8px; border: 1px solid var(--sp-border); border-radius: 12px; box-shadow: 0 14px 38px rgba(20,44,65,.14); }
.user-dropdown-menu .dropdown-item { border-radius: 8px; padding: 10px 12px; }
.user-dropdown-menu .dropdown-item i { width: 22px; color: var(--sp-blue); }
.action-view { color: #1976a8; background: #eaf6fc; border-color: #d7edf8; text-decoration: none; }
.action-view:hover { color: #fff; background: var(--sp-blue); border-color: var(--sp-blue); }
.panelist-entry-count { min-width: 125px; border: 1px solid var(--sp-border); background: #fff; border-radius: 12px; padding: 10px 16px; text-align: center; box-shadow: 0 5px 18px rgba(24,37,51,.04); }
.panelist-entry-count span { display:block; color:var(--sp-navy); font-size:24px; line-height:1; font-weight:800; }
.panelist-entry-count small { color:var(--sp-muted); font-size:10px; text-transform:uppercase; letter-spacing:.05em; }
.screenshot-thumb { width: 58px; height: 58px; padding: 0; border: 1px solid #d7e3ec; border-radius: 9px; background: #fff; overflow: hidden; position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: zoom-in; }
.screenshot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.screenshot-thumb span { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,45,73,.58); color:#fff; opacity:0; transition:.18s ease; }
.screenshot-thumb:hover span { opacity:1; }
.image-preview-content { overflow:hidden; }
.image-preview-full { max-width: 100%; max-height: 75vh; width: auto; height: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,45,73,.12); }
.message-cell { width:100%; min-width:0; max-width:none; white-space:normal; line-height:1.4; overflow-wrap:anywhere; word-break:normal; }
.dataTables_wrapper .row:first-child { align-items: center; margin-bottom: 12px; }
.dataTables_wrapper .dataTables_filter { text-align: right; }
.dataTables_wrapper .dataTables_filter input { min-width: 235px; margin-left: 8px; }
.dataTables_wrapper .dataTables_length label, .dataTables_wrapper .dataTables_filter label { font-weight: 500; color: #405565; }
.table-actions { flex-wrap: nowrap; }
.flatpickr-calendar { border: 1px solid #d8e2eb; border-radius: 12px; box-shadow: 0 14px 40px rgba(0,45,73,.16); overflow: hidden; }
.flatpickr-months .flatpickr-month, .flatpickr-current-month, .flatpickr-weekdays { background: var(--sp-navy); color: #fff; fill:#fff; }
.flatpickr-weekday { color: rgba(255,255,255,.85) !important; }
.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { color:#fff; fill:#fff; }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange { background: var(--sp-blue); border-color: var(--sp-blue); }
.flatpickr-day.inRange { background:#eaf6fc; border-color:#eaf6fc; box-shadow:-5px 0 0 #eaf6fc,5px 0 0 #eaf6fc; }
@media (max-width: 767.98px) {
    .dataTables_wrapper .dataTables_filter { text-align: left; margin-top: 10px; }
    .dataTables_wrapper .dataTables_filter input { min-width: 0; width: calc(100% - 10px); }
}


/* SouqPulse v3 additions */
.metric-badge { min-width: 34px; padding: 6px 8px; font-weight: 700; border-radius: 8px; }
.metric-accepted { background: #e7f8ef; color: #138a58; }
.metric-rejected { background: #fff0f1; color: #c94754; }

.dashboard-chart-stack { display: flex; flex-direction: column; gap: 16px; }
.dashboard-chart-stack > .card { flex: 1 1 0; min-height: 0; }
.chart-box-half { min-height: 230px; }

.entry-filter-card .form-label { margin-bottom: 5px; font-size: 12px; }
.entry-status-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.entry-status-tab {
    border: 1px solid var(--sp-border);
    background: #fff;
    color: #5d6f7e;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    transition: .2s ease;
}
.entry-status-tab:hover { border-color: #9ccde8; color: var(--sp-blue); }
.entry-status-tab.active { background: var(--sp-blue); border-color: var(--sp-blue); color: #fff; }

.screenshot-square-thumb {
    width: 58px;
    height: 58px;
    min-width: 58px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--sp-border);
    background: #f6f9fc;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.screenshot-square-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.screenshot-square-thumb span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,45,73,.50);
    color: #fff;
    opacity: 0;
    transition: .18s ease;
}
.screenshot-square-thumb:hover span { opacity: 1; }

.entries-review-table tbody tr.entry-review-row { cursor: pointer; transition: background-color .16s ease, box-shadow .16s ease; }
.entries-review-table tbody tr.entry-review-row:hover > * { background: #edf8fe !important; }
.entries-review-table tbody tr.entry-review-row:hover { box-shadow: inset 3px 0 0 var(--sp-blue); }

.review-image-wrap {
    height: 100%;
    max-height: 650px;
    border: 1px solid var(--sp-border);
    border-radius: 12px;
    background: #f5f8fb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: scroll;
    padding: 12px;
}
.review-image-wrap img { max-width: 100%; object-fit: contain; border-radius: 8px; }

.dataTables_wrapper .dataTables_processing {
    background: rgba(255,255,255,.94);
    border: 1px solid var(--sp-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(24,37,51,.10);
    color: var(--sp-navy);
    font-weight: 700;
}

@media (max-width: 1199.98px) {
    .dashboard-chart-stack { height: auto !important; }
}


/* SouqPulse v4 refinements */
.metric-approved { background: #e7f8ef; color: #138a58; }
.metric-pending { background: #fff7df; color: #b7791f; }
.chart-box-half { min-height: 330px; height: 330px; }
.dashboard-chart-stack > .card .card-body { padding-top: 10px; padding-bottom: 10px; }

.panelist-entry-counters {
    display: grid;
    grid-template-columns: repeat(4, minmax(105px, 1fr));
    gap: 10px;
}
.panelist-entry-count.total { border-top: 3px solid var(--sp-blue); }
.panelist-entry-count.approved { border-top: 3px solid #18a66a; }
.panelist-entry-count.pending { border-top: 3px solid #e0a128; }
.panelist-entry-count.rejected { border-top: 3px solid #dc5360; }
.panelist-entry-count.approved span { color: #138a58; }
.panelist-entry-count.pending span { color: #b7791f; }
.panelist-entry-count.rejected span { color: #c94754; }

.review-validation-note {
    padding: 10px 12px;
    border-radius: 8px;
    background: #eef8fe;
    color: #2f6687;
    font-size: 12px;
}
.review-status-action { min-width: 118px; font-weight: 700; }
.review-status-action.btn-warning { color: #6a4a00; }

@media (max-width: 991.98px) {
    .panelist-entries-title { align-items: flex-start; }
    .panelist-entry-counters { grid-template-columns: repeat(2, minmax(105px, 1fr)); width: 100%; }
}
@media (max-width: 575.98px) {
    .panelist-entry-counters { grid-template-columns: 1fr 1fr; }
}

.dashboard-chart-stack > .card .card-body { display: flex; flex-direction: column; min-height: 0; }
.dashboard-chart-stack .chart-box-half { flex: 1 1 auto; width: 100%; min-height: 330px; height: 100%; }


/* SouqPulse v5 refinements */
.date-two-line {
    display: inline-block;
    min-width: 62px;
    line-height: 1.35;
    white-space: nowrap;
}
.entries-review-table th:first-child,
.entries-review-table td:first-child {
    min-width: 82px;
    width: 82px;
}

.entry-status-tab[data-status="approved"].active {
    background: #18a66a;
    border-color: #18a66a;
}
.entry-status-tab[data-status="pending"].active {
    background: #e0a128;
    border-color: #e0a128;
    color: #fff;
}
.entry-status-tab[data-status="rejected"].active {
    background: #dc5360;
    border-color: #dc5360;
}

.panelist-entry-count {
    cursor: pointer;
    font: inherit;
    appearance: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.panelist-entry-count:hover {
    transform: translateY(-1px);
}
.panelist-entry-count.total.active {
    background: var(--sp-blue);
    border-color: var(--sp-blue);
}
.panelist-entry-count.approved.active {
    background: #18a66a;
    border-color: #18a66a;
}
.panelist-entry-count.pending.active {
    background: #e0a128;
    border-color: #e0a128;
}
.panelist-entry-count.rejected.active {
    background: #dc5360;
    border-color: #dc5360;
}
.panelist-entry-count.active span,
.panelist-entry-count.active small {
    color: #fff !important;
}

.dashboard-new-entries-wrap {
    overflow-x: hidden;
}
.dashboard-new-entries-table {
    width: 100%;
    table-layout: fixed;
}
.dashboard-new-entries-table th:nth-child(1) { width: 72px; }
.dashboard-new-entries-table th:nth-child(2) { width: 128px; }
.dashboard-new-entries-table th:nth-child(3) { width: 95px; }
.dashboard-new-entries-table th:nth-child(4) { width: 145px; }
.dashboard-new-entries-table th:nth-child(5) { width: 62px; }
.dashboard-new-entries-table th:nth-child(6) { width: 88px; }
.dashboard-new-entries-table td {
    overflow: hidden;
}
.dashboard-entry-main-row > td {
    border-bottom: 0;
    padding-bottom: 5px;
}
.dashboard-entry-message-row > td {
    padding-top: 0;
    border-top: 0;
}
.dashboard-entry-message-row:hover > * {
    background: inherit !important;
}
.latest-entry-message {
    max-width: 100%;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #506272;
    padding-bottom: 10px;
}
.latest-entry-message-label {
    color: var(--sp-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-right: 5px;
}
.dashboard-date-cell {
    vertical-align: top;
}

@media (max-width: 1399.98px) {
    .dashboard-new-entries-table th:nth-child(2) { width: 112px; }
    .dashboard-new-entries-table th:nth-child(4) { width: 125px; }
}


/* v6 refinements */
.dashboard-entry-message-row > td {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
}
.latest-entry-message {
    display: block;
    max-width: 100%;
    width: 100%;
}

/* SouqPulse v7 refinements */
.login-brand h1 { color: #ffffff !important; opacity: 1 !important; }
.login-brand > p { color: rgba(255,255,255,.96) !important; }

/* All DataTables must fit their card without a horizontal scrollbar. */
.table-responsive { overflow-x: visible !important; }
.dataTables_wrapper, .dataTables_wrapper .dataTables_scroll, .dataTables_wrapper .dataTables_scrollBody { width: 100% !important; max-width: 100% !important; overflow-x: visible !important; }
table.dataTable, table.js-server-table { width: 100% !important; table-layout: fixed; }
table.dataTable th, table.dataTable td { white-space: normal !important; overflow-wrap: anywhere; word-break: normal; }
.dataTables_wrapper .dataTables_filter input { max-width: 100%; }

/* Entries table */
.entry-filter-card .form-label { margin-bottom: 5px; font-size: 12px; }
.entry-status-tabs { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.entry-status-tab { border:1px solid var(--sp-border); background:#fff; color:#5d6f7e; border-radius:999px; padding:8px 14px; font-weight:700; transition:.2s ease; }
.entry-status-tab:hover { border-color:#9ccde8; color:var(--sp-blue); }
.entry-status-tab[data-status="approved"].active { background:#18a66a; border-color:#18a66a; color:#fff; }
.entry-status-tab[data-status="pending"].active { background:#e0a128; border-color:#e0a128; color:#fff; }
.entry-status-tab[data-status="rejected"].active { background:#dc5360; border-color:#dc5360; color:#fff; }
.entries-review-table tbody tr.entry-review-row { cursor:pointer; transition:background-color .16s ease, box-shadow .16s ease; }
.entries-review-table tbody tr.entry-review-row:hover > * { background:#edf8fe !important; }
.entries-review-table tbody tr.entry-review-row:hover { box-shadow:inset 3px 0 0 var(--sp-blue); }
.entries-review-table th:first-child, .entries-review-table td:first-child { min-width:76px; width:76px; }
.entry-thumbnail { width:57px !important; height:57px !important; min-width:57px; max-width:57px; object-fit:contain; background:#fff; display:block; border-radius:8px; border:1px solid var(--sp-border); margin:auto; }

/* Keep wide tables compact enough to remain 100% width. */
#entriesTable { font-size:12px; }
#entriesTable th:nth-child(1) { width:6%; }
#entriesTable th:nth-child(2) { width:10%; }
#entriesTable th:nth-child(3) { width:7%; }
#entriesTable th:nth-child(4) { width:10%; }
#entriesTable th:nth-child(5) { width:9%; }
#entriesTable th:nth-child(6) { width:9%; }
#entriesTable th:nth-child(7) { width:6%; }
#entriesTable th:nth-child(8) { width:17%; }
#entriesTable th:nth-child(9) { width:8%; }
#entriesTable th:nth-child(10) { width:7%; }
#entriesTable th:nth-child(11) { width:6%; }
#entriesTable th:nth-child(12) { width:5%; }
#panelistsTable { font-size:12px; }
#panelistsTable th:nth-child(1) { width:6%; }
#panelistsTable th:nth-child(2) { width:11%; }
#panelistsTable th:nth-child(3) { width:8%; }
#panelistsTable th:nth-child(4) { width:8%; }
#panelistsTable th:nth-child(5) { width:7%; }
#panelistsTable th:nth-child(6) { width:7%; }
#panelistsTable th:nth-child(7), #panelistsTable th:nth-child(8), #panelistsTable th:nth-child(9), #panelistsTable th:nth-child(10) { width:7%; }
#panelistsTable th:nth-child(11) { width:8%; }
#panelistsTable th:nth-child(12) { width:12%; }
#panelistEntriesTable { font-size:12px; }
#panelistEntriesTable th:nth-child(1) { width:7%; }
#panelistEntriesTable th:nth-child(2) { width:13%; }
#panelistEntriesTable th:nth-child(3) { width:11%; }
#panelistEntriesTable th:nth-child(4) { width:10%; }
#panelistEntriesTable th:nth-child(5) { width:7%; }
#panelistEntriesTable th:nth-child(6) { width:30%; }
#panelistEntriesTable th:nth-child(7) { width:8%; }
#panelistEntriesTable th:nth-child(8) { width:7%; }
#panelistEntriesTable th:nth-child(9) { width:7%; }

/* Approved entry content is view-only, while Status remains selectable. */
#entryReviewModal.approved-readonly .select2-container--disabled .select2-selection--single { background:#f4f7fa; cursor:not-allowed; }
#entryReviewModal.approved-readonly #reviewMessage { background:#f4f7fa; cursor:not-allowed; }

/* Panelist credential controls */
#panelistChangePasswordLink { font-weight:700; text-decoration:none; }


/* SouqPulse v8 refinements */
#exportEntriesExcel,
#exportPanelistsExcel { background:#1D6F42 !important; border-color:#1D6F42 !important; color:#fff !important; }
#exportEntriesExcel:hover, #exportEntriesExcel:focus,
#exportPanelistsExcel:hover, #exportPanelistsExcel:focus { background:#185c37 !important; border-color:#185c37 !important; color:#fff !important; }
#entriesTable { width:100% !important; table-layout:fixed !important; }
#entriesTable th, #entriesTable td { padding-left:8px; padding-right:8px; vertical-align:middle; overflow:hidden; text-overflow:clip; }
#entriesTable td { overflow-wrap:anywhere; word-break:normal; }
#entriesTable .message-cell { overflow:visible; }
#entryReviewModal.approved-readonly textarea:disabled,
#entryReviewModal.approved-readonly select:disabled,
#entryReviewModal.approved-readonly .select2-container--disabled .select2-selection--single { background:#f1f4f7 !important; color:#6d7b86 !important; cursor:not-allowed !important; opacity:1; }

/* SouqPulse v28 dashboard settings charts */
.settings-chart-section { margin-top: 16px; }
.settings-chart-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin:0 0 12px; }
.settings-chart-heading h4 { margin:0 0 3px; color:var(--sp-navy); font-size:18px; font-weight:700; }
.settings-chart-heading p { margin:0; color:var(--sp-muted); font-size:12px; }
.settings-chart-card .card-body { padding:10px 12px 12px; overflow:hidden; }
.settings-chart-box { width:100%; min-height:280px; }
@media (max-width: 767.98px) {
    .settings-chart-heading { align-items:flex-start; }
    .settings-chart-box { min-height:250px; }
}


/* SouqPulse v28 refinements */
.entry-thumbnail {
    width:57px !important;
    height:57px !important;
    min-width:57px;
    max-width:57px;
    object-fit:cover !important;
    object-position:top center !important;
    background:#fff;
    display:block;
    border-radius:8px;
    border:1px solid var(--sp-border);
    margin:auto;
}

/* Review screen: keep the screenshot anchored at the top and let the message
   use the vertical space that was previously empty above the action button. */
#entryReviewModal .review-modal-row { align-items:stretch; }
#entryReviewModal .review-image-wrap {
    height:72vh;
    max-height:720px;
    min-height:620px;
    align-items:flex-start;
    justify-content:center;
    overflow:auto;
    padding:12px;
}
#entryReviewModal .review-image-wrap img {
    width:100%;
    height:auto;
    max-width:none;
    max-height:none;
    object-fit:cover;
    object-position:top center;
    border-radius:8px;
}
#entryReviewModal .review-form-column {
    height:72vh;
    max-height:720px;
    min-height:620px;
    display:flex;
    flex-direction:column;
}
#entryReviewModal .review-message-field {
    flex:1 1 auto;
    min-height:0;
    display:flex;
    flex-direction:column;
}
#entryReviewModal #reviewMessage {
    flex:1 1 auto;
    min-height:310px;
    height:auto;
    resize:vertical;
}
#entryReviewModal .review-fields-row { flex:0 0 auto; }

.dashboard-pending-card .card-body { padding:0; }
.dashboard-pending-table {
    width:100%;
    table-layout:fixed;
    font-size:12px;
    margin:0;
}
.dashboard-pending-table th,
.dashboard-pending-table td {
    padding:8px;
    white-space:normal !important;
    overflow-wrap:anywhere;
    vertical-align:middle;
}
.dashboard-pending-table th:nth-child(1) { width:6%; }
.dashboard-pending-table th:nth-child(2) { width:10%; }
.dashboard-pending-table th:nth-child(3) { width:7%; }
.dashboard-pending-table th:nth-child(4) { width:10%; }
.dashboard-pending-table th:nth-child(5) { width:9%; }
.dashboard-pending-table th:nth-child(6) { width:8%; }
.dashboard-pending-table th:nth-child(7) { width:7%; }
.dashboard-pending-table th:nth-child(8) { width:18%; }
.dashboard-pending-table th:nth-child(9) { width:8%; }
.dashboard-pending-table th:nth-child(10) { width:7%; }
.dashboard-pending-table th:nth-child(11) { width:6%; }
.dashboard-pending-table th:nth-child(12) { width:4%; }
.dashboard-pending-table tbody tr { cursor:pointer; }
.dashboard-pending-table tbody tr:hover > * { background:#edf8fe !important; }
.dashboard-pending-table .message-cell {
    display:-webkit-box;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden;
}
.dashboard-row-chart .settings-chart-box,
.dashboard-row-chart .chart-box { min-height:315px; }

@media (max-width: 991.98px) {
    #entryReviewModal .review-image-wrap,
    #entryReviewModal .review-form-column {
        height:auto;
        max-height:none;
        min-height:0;
    }
    #entryReviewModal .review-image-wrap { max-height:60vh; }
    #entryReviewModal #reviewMessage { min-height:260px; }
}


/* SouqPulse v29 refinements */
.panelist-filter-card .form-label{margin-bottom:5px;font-size:12px}
#entryReviewModal .review-image-wrap{position:relative}
#entryReviewModal .review-image-loading{
    position:absolute;inset:12px;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
    background:#f5f8fb;color:#718795;font-size:12px;border-radius:8px;
}
#entryReviewModal .review-image-loading[hidden]{display:none!important}
#entryReviewModal #reviewEntryImage{transition:opacity .15s ease}
#entryReviewModal #reviewEntryImage.is-loading{opacity:0}


/* SouqPulse v41 panelist form + compact Entries rows */
#panelistModal input[type="text"]::-webkit-contacts-auto-fill-button,
#panelistModal input[type="text"]::-webkit-credentials-auto-fill-button {
    visibility:hidden;
    display:none !important;
    pointer-events:none;
    position:absolute;
    right:0;
}

#entriesTable tbody td {
    padding-top:8px !important;
    padding-bottom:8px !important;
    vertical-align:middle !important;
}
#entriesTable .message-cell {
    display:-webkit-box !important;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden !important;
    max-height:4.35em;
    line-height:1.45;
    white-space:normal;
}
#entriesTable tbody tr.entry-review-row {
    height:74px;
}

/* SouqPulse v42: Panelist Entries rows match main Entries table */
#panelistEntriesTable tbody td {
    padding-top:8px !important;
    padding-bottom:8px !important;
    vertical-align:middle !important;
}
#panelistEntriesTable .message-cell {
    display:-webkit-box !important;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden !important;
    max-height:4.35em;
    line-height:1.45;
    white-space:normal;
}
#panelistEntriesTable tbody tr.entry-review-row {
    height:74px;
}
#panelistEntriesTable .entry-thumbnail {
    width:57px;
    height:57px;
    object-fit:cover;
    display:block;
}


/* SouqPulse v43: Panelist Entries filters */
.panelist-entry-filter-card .form-label {
    margin-bottom:5px;
    font-size:12px;
}


#exportPanelistEntriesExcel {
    background:#1D6F42 !important;
    border-color:#1D6F42 !important;
    color:#fff !important;
}
#exportPanelistEntriesExcel:hover,
#exportPanelistEntriesExcel:focus {
    background:#185c37 !important;
    border-color:#185c37 !important;
    color:#fff !important;
}

/* Review Entry delete action */
#entryReviewModal .review-delete-button {
    width: 44px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

#entryReviewModal .review-modal-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}
#entryReviewModal .review-current-status {
    margin: 0;
    color: #7b8797;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}
#entryReviewModal .review-delete-button i {
    margin: 0;
}


/* SouqPulse v54 authentication */
.login-options{display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:13px}
.login-remember{display:inline-flex;align-items:center;gap:8px;color:#536675;cursor:pointer;user-select:none}
.login-remember input{width:16px;height:16px;accent-color:#0877b8}
.login-forgot{color:#0877b8;text-decoration:none;font-weight:500}
.login-forgot:hover{text-decoration:underline}

/* SouqPulse v55: visible borders for authentication inputs */
.login-input-wrap .form-control {
    border: 1px solid #cbd8e3 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    color: #263746;
}
.login-input-wrap .form-control:hover {
    border-color: #b5c6d4 !important;
}
.login-input-wrap .form-control:focus {
    border-color: #0877b8 !important;
    box-shadow: 0 0 0 3px rgba(8,119,184,.10) !important;
    outline: 0;
}
.login-input-wrap .form-control:disabled,
.login-input-wrap .form-control[readonly] {
    background: #f6f9fb !important;
}

/* SouqPulse v56: password visibility controls on reset-password fields */
.login-input-wrap:has(.password-toggle) .form-control {
    padding-right: 48px !important;
}

/* SouqPulse v84: organized Panelist profile form */
#panelistModal .modal-body {
    padding: 18px 22px 22px;
}
#panelistModal .panelist-fieldset {
    border: 1px solid #d9e5ec;
    border-radius: 8px;
    padding: 18px;
    background: #fff;
    min-width: 0;
}
#panelistModal .panelist-fieldset legend {
    float: none;
    width: auto;
    margin: 0 0 12px;
    padding: 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--sp-navy);
}
#panelistModal .form-label {
    margin-bottom: 5px;
    font-size: 12px;
    color: #4f6574;
}
#panelistModal .panelist-change-password-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
}
#panelistModal .select2-container {
    width: 100% !important;
}
#panelistModal #panelist_date_of_joining,
#panelistModal .flatpickr-input + input.form-control {
    background: #fff;
}
@media (max-width: 767.98px) {
    #panelistModal .modal-body { padding: 14px; }
    #panelistModal .panelist-fieldset { padding: 14px; }
}

/* SouqPulse v87: compact five-column Panelist Add/Edit form */
#panelistModal .panelist-five-grid > .panelist-field-col {
    position: relative;
    width: 20%;
    max-width: 20%;
    flex: 0 0 20%;
    min-width: 0;
    padding-left: calc(var(--bs-gutter-x) * .5);
    padding-right: calc(var(--bs-gutter-x) * .5);
}
#panelistModal .select2-selection:focus {
    border-color: #0877b8 !important;
    box-shadow: 0 0 0 3px rgba(8,119,184,.10) !important;
    outline: 0;
}
#panelistModal #panelistMobileError {
    min-height: 16px;
    margin-top: 4px;
    font-size: 11px;
}
@media (max-width: 991.98px) {
    #panelistModal .panelist-five-grid > .panelist-field-col {
        width: 33.333333%;
        max-width: 33.333333%;
        flex-basis: 33.333333%;
    }
}
@media (max-width: 767.98px) {
    #panelistModal .panelist-five-grid > .panelist-field-col {
        width: 50%;
        max-width: 50%;
        flex-basis: 50%;
    }
}
@media (max-width: 575.98px) {
    #panelistModal .panelist-five-grid > .panelist-field-col {
        width: 100%;
        max-width: 100%;
        flex-basis: 100%;
    }
}


/* SouqPulse v88: wider Panelist modal and stable three-column Login Details row */
@media (min-width: 992px) {
    #panelistModal .modal-dialog {
        width: calc(100vw - 48px);
        max-width: 1560px;
    }
}
#panelistModal .panelist-login-grid {
    align-items: flex-start !important;
}
#panelistModal .panelist-login-grid > .panelist-field-col {
    position: relative;
    width: 33.333333%;
    max-width: 33.333333%;
    flex: 0 0 33.333333%;
    min-width: 0;
    padding-left: calc(var(--bs-gutter-x) * .5);
    padding-right: calc(var(--bs-gutter-x) * .5);
    align-self: flex-start;
}
#panelistModal .panelist-login-grid #panelistMobileError {
    display: block;
}
@media (max-width: 767.98px) {
    #panelistModal .panelist-login-grid > .panelist-field-col {
        width: 100%;
        max-width: 100%;
        flex-basis: 100%;
    }
}

/* SouqPulse v89: spacing refinements for Panelist Add/Edit fields */
@media (min-width: 992px) {
    #panelistModal .panelist-five-grid > .panelist-field-col {
        width: 18%;
        max-width: 18%;
        flex: 0 0 18%;
        margin-right: 20px;
    }

    #panelistModal .panelist-login-grid > .panelist-field-col {
        width: 25%;
        max-width: 25%;
        flex: 0 0 25%;
        margin-right: 20px;
    }
}


/* SouqPulse v90: modal actions in header and compact edit-password layout */
.sp-modal-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.sp-modal-header-actions .btn-close {
    margin: 0;
}
#panelistModal #panelistPasswordEditLinkWrap.panelist-password-link-col {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    margin-right: 8px !important;
    padding-top: 25px;
}
#panelistModal #panelistPasswordEditLinkWrap .panelist-change-password-link {
    white-space: nowrap;
    min-height: 42px;
}
#panelistModal #panelistPasswordChangeWrap {
    margin-left: 0 !important;
}
@media (max-width: 767.98px) {
    #panelistModal #panelistPasswordEditLinkWrap.panelist-password-link-col {
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: 100% !important;
        margin-right: 0 !important;
        padding-top: 0;
    }
}

/* SouqPulse v99: multi-language review and optional Entries columns */
#entryReviewModal .select2-container--default .select2-selection--multiple {
    min-height: 42px;
    border: 1px solid #d8e2eb;
    border-radius: 8px;
    padding: 4px 8px;
}
#entryReviewModal .select2-container--default .select2-selection--multiple .select2-selection__choice {
    margin-top: 3px;
    margin-bottom: 3px;
}
#entryReviewModal .select2-container--disabled .select2-selection--multiple {
    background: #f1f4f7 !important;
    cursor: not-allowed !important;
}
#reviewRejectionReason[readonly] {
    background: #f4f7fa;
}
.entry-language-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.25;
    white-space: nowrap;
}
.entry-more-data-menu {
    width: 330px;
    max-height: min(560px, 70vh);
    overflow-y: auto;
    border: 1px solid #d8e2eb;
    box-shadow: 0 12px 32px rgba(24,37,51,.16);
}
.entry-more-data-title {
    font-size: 13px;
    font-weight: 700;
    color: #173b53;
    margin-bottom: 10px;
}
.entry-more-data-list {
    display: grid;
    gap: 5px;
}
.entry-more-data-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    color: #344757;
}
.entry-more-data-option:hover {
    background: #f2f8fc;
}
.entry-more-data-option .form-check-input {
    margin: 0;
}
#entriesTable th,
#entriesTable td {
    vertical-align: middle;
}
#entriesTable .message-cell {
    white-space: normal;
}
@media (max-width: 575.98px) {
    .entry-more-data-menu {
        width: min(330px, calc(100vw - 32px));
    }
}


/* SouqPulse v100: Entries More Data + Review Entry UI refinements */
.entry-more-data-menu {
    width: 330px;
    max-height: none;
    overflow: visible;
    padding-bottom: 12px !important;
}
.entry-more-data-list {
    display: grid;
    gap: 5px;
    max-height: 150px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-gutter: stable;
}
.entry-more-data-option {
    height: 26px;
    min-height: 26px;
    overflow: hidden;
}
.entry-more-data-option span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.entry-more-data-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-top: 12px;
    background: #fff;
}
.entries-table-responsive {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
}
.entries-table-responsive .dataTables_wrapper {
    width: 100% !important;
    max-width: none !important;
    overflow: visible !important;
}
#entriesTable.entries-with-extra-columns {
    width: calc(100% + var(--sp-extra-columns-width, 145px)) !important;
    min-width: calc(100% + var(--sp-extra-columns-width, 145px)) !important;
    table-layout: auto !important;
}
#entriesTable.entries-with-extra-columns th,
#entriesTable.entries-with-extra-columns td {
    min-width: 118px;
}
#entriesTable.entries-with-extra-columns th:nth-child(1),
#entriesTable.entries-with-extra-columns td:nth-child(1) { min-width: 76px; }
#entriesTable.entries-with-extra-columns th:nth-child(7),
#entriesTable.entries-with-extra-columns td:nth-child(7) { min-width: 82px; }
#entriesTable.entries-with-extra-columns th:nth-child(8),
#entriesTable.entries-with-extra-columns td:nth-child(8) { min-width: 260px; }
#entriesTable.entries-with-extra-columns th:nth-child(11),
#entriesTable.entries-with-extra-columns td:nth-child(11) { min-width: 96px; }
#entriesTable.entries-with-extra-columns th:nth-child(12),
#entriesTable.entries-with-extra-columns td:nth-child(12) { min-width: 86px; }

/* Make selected Review Entry languages clearly visible. */
#entryReviewModal .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: #12344d !important;
    border-color: #12344d !important;
    color: #fff !important;
    font-weight: 600;
}
#entryReviewModal .select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    color: #fff !important;
}
#entryReviewModal .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(255,255,255,.82) !important;
    background: transparent !important;
    border-right-color: rgba(255,255,255,.28) !important;
}
#entryReviewModal .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff !important;
    background: rgba(255,255,255,.12) !important;
}

/* Keep the Review Entry fields inside the available modal height without overlap. */
#entryReviewModal .modal-dialog.modal-xl {
    max-width: min(1480px, calc(100vw - 32px));
}
#entryReviewModal .modal-content {
    max-height: calc(100vh - 32px);
}
#entryReviewModal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 12px;
}
#entryReviewModal .review-modal-row {
    height: min(76vh, 760px);
    min-height: 590px;
}
#entryReviewModal .review-image-wrap,
#entryReviewModal .review-form-column {
    height: 100%;
    min-height: 0;
    max-height: none;
}
#entryReviewModal .review-form-column {
    overflow: hidden;
}
#entryReviewModal .review-message-field {
    flex: 1 1 auto;
    min-height: 170px;
    margin-bottom: 12px !important;
}
#entryReviewModal #reviewMessage {
    min-height: 170px;
    height: 100%;
    overflow-y: auto;
    resize: none;
}
#entryReviewModal .review-fields-row {
    flex: 0 0 auto;
    --bs-gutter-y: .75rem;
}
#entryReviewModal #reviewRejectionReason {
    min-height: 68px;
    height: 68px;
    max-height: 96px;
    resize: vertical;
}
#entryReviewModal #reviewRejectionReasonHelp {
    margin-top: 4px;
    line-height: 1.25;
}
#entryReviewModal .modal-footer {
    min-height: 44px;
    padding: 6px 20px 10px;
}
#entryReviewModal .review-delete-button {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 6px;
    font-size: 13px;
}
@media (max-width: 991.98px) {
    #entryReviewModal .modal-content { max-height: none; }
    #entryReviewModal .modal-body { overflow: visible; }
    #entryReviewModal .review-modal-row { height: auto; min-height: 0; }
    #entryReviewModal .review-image-wrap,
    #entryReviewModal .review-form-column { height: auto; }
    #entryReviewModal .review-form-column { overflow: visible; }
    #entryReviewModal #reviewMessage { min-height: 240px; height: 240px; resize: vertical; }
}

/* Base Entries widths include the final Status column when no More Data columns are visible. */
#entriesTable:not(.entries-with-extra-columns) th:nth-child(1) { width:6%; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(2) { width:9%; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(3) { width:6%; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(4) { width:9%; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(5) { width:8%; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(6) { width:7%; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(7) { width:6%; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(8) { width:17%; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(9) { width:7%; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(10) { width:6%; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(11) { width:6%; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(12) { width:5%; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(29) { width:8%; }


/* SouqPulse v102: small Admin UI corrections */
/* More Data uses the Font Awesome sliders icon only, with no Bootstrap caret. */
#moreDataButton::after {
    display: none !important;
    content: none !important;
}

/* Constrain the Review Entry form itself so modal body flex sizing works correctly. */
#entryReviewModal .modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 32px);
}
#entryReviewModal .modal-body {
    min-height: 0;
}
#entryReviewModal .review-form-column {
    min-height: 0;
}
#entryReviewModal .review-message-field {
    min-height: 170px;
}
#entryReviewModal #reviewMessage {
    flex: 1 1 auto;
    min-height: 170px;
    height: auto !important;
}

@media (max-width: 991.98px) {
    #entryReviewModal .modal-content > form {
        max-height: none;
    }
}


/* SouqPulse v103: compact More Data rows + default Review Entry message height */
/* Keep the Message area compact enough that all classification fields are visible on desktop by default. */
@media (min-width: 992px) {
    #entryReviewModal .review-message-field {
        flex: 0 0 auto;
        min-height: 0;
        margin-bottom: 12px !important;
    }
    #entryReviewModal #reviewMessage {
        flex: 0 0 auto;
        height: clamp(260px, 37vh, 340px) !important;
        min-height: 260px;
        max-height: 340px;
        overflow-y: auto;
        resize: vertical;
    }
}

/* SouqPulse v104: default Entries width + dynamic rejection layout + seven More Data rows */
/* Default Entries view must consume the full card width without hidden More Data columns reserving space. */
.entries-table-responsive,
.entries-table-responsive .dataTables_wrapper,
.entries-table-responsive .dataTables_wrapper > .row {
    width: 100% !important;
    max-width: 100% !important;
}
#entriesTable:not(.entries-with-extra-columns) {
    width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed !important;
}
#entriesTable:not(.entries-with-extra-columns) th,
#entriesTable:not(.entries-with-extra-columns) td {
    min-width: 0 !important;
}
/* 13 visible default columns, including Status, total exactly 100%. */
#entriesTable:not(.entries-with-extra-columns) th:nth-child(1) { width: 6% !important; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(2) { width: 9% !important; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(3) { width: 7% !important; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(4) { width: 8% !important; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(5) { width: 8% !important; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(6) { width: 8% !important; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(7) { width: 7% !important; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(8) { width: 15% !important; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(9) { width: 7% !important; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(10) { width: 6% !important; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(11) { width: 6% !important; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(12) { width: 5% !important; }
#entriesTable:not(.entries-with-extra-columns) th:nth-child(29) { width: 8% !important; }

/* Show seven compact options before the More Data list starts scrolling. */
.entry-more-data-list {
    max-height: 212px;
}

/* Rejection Reason uses the same modal footprint by temporarily giving Message less height. */
@media (min-width: 992px) {
    #entryReviewModal.review-has-rejection-reason #reviewMessage {
        height: clamp(170px, 22vh, 215px) !important;
        min-height: 170px;
        max-height: 215px;
    }
}



/* SouqPulse v105: remove duplicate Panelist Status More Data field, align Dashboard New Entries widths, position Panelists export in filter card */
/* Status is already a permanent Entries column, so the final visible column is now table column 28. */
#entriesTable:not(.entries-with-extra-columns) th:nth-child(28) { width: 8% !important; }

/* Dashboard New Entries follows the same visual proportions as the main Entries table (without the final Status column). */
.dashboard-pending-table {
    width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed !important;
}
.dashboard-pending-table th:nth-child(1) { width: 6.5% !important; }
.dashboard-pending-table th:nth-child(2) { width: 9.8% !important; }
.dashboard-pending-table th:nth-child(3) { width: 7.6% !important; }
.dashboard-pending-table th:nth-child(4) { width: 8.7% !important; }
.dashboard-pending-table th:nth-child(5) { width: 8.7% !important; }
.dashboard-pending-table th:nth-child(6) { width: 8.7% !important; }
.dashboard-pending-table th:nth-child(7) { width: 7.6% !important; }
.dashboard-pending-table th:nth-child(8) { width: 16.3% !important; }
.dashboard-pending-table th:nth-child(9) { width: 7.6% !important; }
.dashboard-pending-table th:nth-child(10) { width: 6.5% !important; }
.dashboard-pending-table th:nth-child(11) { width: 6.5% !important; }
.dashboard-pending-table th:nth-child(12) { width: 5.5% !important; }

/* Keep the Panelists Excel button aligned with the last filter row. */
.panelist-filter-card #exportPanelistsExcel {
    min-height: 40px;
}

/* SouqPulse v106: restore Review image scrollbar + match Entries row/header spacing to Dashboard New Entries */
#entryReviewModal .review-image-wrap {
    overflow-y: scroll !important;
    overflow-x: hidden !important;
}
#entryReviewModal .review-image-wrap::-webkit-scrollbar {
    width: 10px;
}
#entryReviewModal .review-image-wrap::-webkit-scrollbar-track {
    background: transparent;
}
#entryReviewModal .review-image-wrap::-webkit-scrollbar-thumb {
    background: #8d9297;
    border-radius: 8px;
    border: 2px solid #f5f8fb;
}

/* Main Entries table uses the same compact cell spacing as Dashboard New Entries. */
#entriesTable thead th,
#entriesTable tbody td {
    padding: 8px !important;
    vertical-align: middle !important;
    line-height: 1.35;
}
#entriesTable tbody tr.entry-review-row {
    height: 74px;
}

/* SouqPulse v107: effective Review image scrolling + exact Entries/Dashboard row sizing */
/* The outer preview remains the framed/loading surface. The inner element exclusively owns scrolling. */
#entryReviewModal .review-image-wrap {
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 12px !important;
}
#entryReviewModal .review-image-scroll {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    scrollbar-gutter: stable !important;
    scrollbar-width: auto;
    scrollbar-color: #8d9297 #eef3f7;
    overscroll-behavior: contain;
}
#entryReviewModal .review-image-scroll::-webkit-scrollbar {
    width: 11px;
}
#entryReviewModal .review-image-scroll::-webkit-scrollbar-track {
    background: #eef3f7;
    border-radius: 8px;
}
#entryReviewModal .review-image-scroll::-webkit-scrollbar-thumb {
    background: #8d9297;
    border-radius: 8px;
    border: 2px solid #eef3f7;
}
#entryReviewModal .review-image-scroll::-webkit-scrollbar-thumb:hover {
    background: #737b82;
}
#entryReviewModal .review-image-scroll #reviewEntryImage {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    object-fit: initial !important;
    object-position: initial !important;
    flex: none !important;
}

/* Main Entries table uses the same sizing model as Dashboard > New Entries. */
#entriesTable {
    font-size: 12px !important;
}
#entriesTable thead tr {
    height: 44px !important;
}
#entriesTable thead th {
    height: 44px !important;
    min-height: 44px !important;
    padding: 8px !important;
    line-height: 1.25 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    white-space: normal !important;
}
#entriesTable tbody tr.entry-review-row {
    height: 74px !important;
    min-height: 74px !important;
}
#entriesTable tbody td {
    height: 74px !important;
    padding: 8px !important;
    line-height: 1.35 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}
#entriesTable .message-cell {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.35 !important;
    max-height: calc(1.35em * 3) !important;
}
/* Keep DataTables sorting controls from increasing the header height. */
#entriesTable.dataTable thead > tr > th.sorting,
#entriesTable.dataTable thead > tr > th.sorting_asc,
#entriesTable.dataTable thead > tr > th.sorting_desc,
#entriesTable.dataTable thead > tr > td.sorting,
#entriesTable.dataTable thead > tr > td.sorting_asc,
#entriesTable.dataTable thead > tr > td.sorting_desc {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}



/* SouqPulse v108: always-visible custom scrollbar for Review Entry screenshot */
#entryReviewModal .review-image-wrap {
    position: relative !important;
}
#entryReviewModal .review-image-scroll {
    position: relative !important;
    height: 100% !important;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
#entryReviewModal .review-image-scroll::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
}
#entryReviewModal .review-image-scrollbar {
    position: absolute;
    top: 12px;
    right: 6px;
    bottom: 12px;
    width: 10px;
    border-radius: 8px;
    background: #e1e8ee;
    z-index: 6;
    opacity: 1;
    transition: opacity .15s ease;
    cursor: pointer;
}
#entryReviewModal .review-image-scrollbar.is-hidden {
    opacity: 0;
    pointer-events: none;
}
#entryReviewModal .review-image-scrollbar-thumb {
    position: absolute;
    left: 1px;
    top: 0;
    width: 8px;
    min-height: 42px;
    border-radius: 8px;
    background: #7f878e;
    cursor: grab;
    touch-action: none;
}
#entryReviewModal .review-image-scrollbar-thumb:active {
    cursor: grabbing;
    background: #687078;
}


/* SouqPulse v109: Review Entry uses the visible preview pane itself as the native scroll container. */
#entryReviewModal #reviewImageScroll.review-image-wrap {
    display: block !important;
    position: relative !important;
    height: min(70vh, 760px) !important;
    min-height: 0 !important;
    max-height: none !important;
}
#entryReviewModal #reviewImageScroll.review-image-wrap::-webkit-scrollbar {
    width: 12px !important;
}
#entryReviewModal #reviewImageScroll.review-image-wrap::-webkit-scrollbar-track {
    background: #eef3f7 !important;
}
#entryReviewModal #reviewImageScroll.review-image-wrap::-webkit-scrollbar-thumb {
    background: #8d9297 !important;
    border-radius: 8px !important;
    border: 2px solid #eef3f7 !important;
}
#entryReviewModal #reviewImageScroll.review-image-wrap::-webkit-scrollbar-thumb:hover {
    background: #737b82 !important;
}
#entryReviewModal #reviewImageScroll .review-image-content {
    display: block !important;
    width: 100% !important;
    min-height: 100% !important;
}
#entryReviewModal #reviewImageScroll #reviewEntryImage {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    object-fit: initial !important;
    object-position: initial !important;
}


/* SouqPulse v110: Final Review Entry screenshot scrolling fix for tall mobile screenshots */
#entryReviewModal .review-image-wrap {
    height: calc(100vh - 220px) !important;
    max-height: 720px !important;
    overflow: hidden !important;
    padding: 12px !important;
}
#entryReviewModal .review-image-scroll {
    height: 100% !important;
    width: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: auto !important;
    scrollbar-color: #8d9297 #eef3f7 !important;
}
#entryReviewModal .review-image-scroll::-webkit-scrollbar {
    width: 12px !important;
}
#entryReviewModal .review-image-scroll::-webkit-scrollbar-thumb {
    background: #8d9297 !important;
    border-radius: 8px !important;
}
#entryReviewModal .review-image-content img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
}

/* Entries table match Dashboard New Entries row/header height */
#entriesTable thead tr,
#entriesTable thead th {
    height: 44px !important;
}
#entriesTable tbody tr.entry-review-row {
    height: 74px !important;
}


/* SouqPulse v112: Panelists More Data + spending controls */
.sp-more-data-button::after,
#panelistMoreDataButton::after {
    display: none !important;
}
.entry-more-data-reset {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
}
.panelists-table-responsive {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
}
.panelists-table-responsive .dataTables_wrapper {
    width: 100% !important;
    max-width: none !important;
}
#panelistsTable:not(.panelists-with-extra-columns) {
    width: 100% !important;
    min-width: 100% !important;
}
#panelistsTable:not(.panelists-with-extra-columns) th:nth-child(27) { width: 8% !important; }
#panelistsTable:not(.panelists-with-extra-columns) th:nth-child(28) { width: 12% !important; }
#panelistsTable.panelists-with-extra-columns {
    width: calc(100% + var(--sp-panelist-extra-columns-width, 145px)) !important;
    min-width: calc(100% + var(--sp-panelist-extra-columns-width, 145px)) !important;
    table-layout: auto !important;
}
#panelistsTable.panelists-with-extra-columns th,
#panelistsTable.panelists-with-extra-columns td {
    white-space: nowrap;
    min-width: 120px;
}
#panelistsTable.panelists-with-extra-columns th:nth-child(2),
#panelistsTable.panelists-with-extra-columns td:nth-child(2) { min-width: 150px; }
#panelistsTable.panelists-with-extra-columns th:nth-child(28),
#panelistsTable.panelists-with-extra-columns td:nth-child(28) { min-width: 120px; }

/* SouqPulse v113: Current Offer Details uses the full Personal Details row. */
#panelistModal .panelist-five-grid > .panelist-current-offer-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-right: 0 !important;
}
#panelistModal #panelist_current_offer_details {
    min-height: 76px;
    resize: vertical;
}
@media (max-width: 991.98px) {
    #panelistModal .panelist-five-grid > .panelist-current-offer-col {
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: 100% !important;
        margin-right: 0 !important;
    }
}

/* SouqPulse v118: make missing multi-select Language visibly invalid during approval. */
#entryReviewModal .select2-container.is-invalid .select2-selection {
    border-color: #dc3545 !important;
}
