.activity-timeline {
    max-height: 400px; /* Optional: make it scrollable */
    overflow-y: auto;
    padding-left: 20px;
    border-left: 2px solid #ddd;
}

.timeline-item {
    position: relative;
}

.timeline-icon {
    width: 30px;
    height: 30px;
    background-color: #28a745;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-size: 18px;
}

.bg-light-blue {
    background-color: #e6f7ff;
}

.modal-m {
    --bs-modal-width: 75%;
}

.modal-md {
    --bs-modal-width: 50%;
}

#serviceChart-legend ul {
    width: 200px;
    text-align: left;
    margin-left: auto;
}

select.form-select {
    color: #1e293b;
    font-size: 0.875rem;
}

select.chart-filter-select,
select.form-select.chart-filter-select {
    height: 38px !important;
    padding: 6px 34px 6px 12px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    color: #1e293b !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
}

select.chart-filter-select option {
    color: #1e293b !important;
    background-color: #ffffff !important;
}

.select2-selection__rendered {
    padding: 0.2rem 0.2rem;
}

.form-group span.select2-selection__clear,
.form-group span.select2-selection__placeholder {
    line-height: 14px;
}

.form-group span {
    font-size: 0.875rem;
    line-height: 1.4rem;
    vertical-align: top;
}

.form-group .datepicker span {
    margin-bottom: 0;
}

div.dataTables_processing > div:last-child > div {
    background: #545454;
}

.dataTables_wrapper .dataTable thead .sorting:before,
.dataTables_wrapper .dataTable thead .sorting_asc:before {
    right: 10px;
}

.dataTables_wrapper .dataTable thead .sorting:after,
.dataTables_wrapper .dataTable thead .sorting_asc:after {
    right: 10px;
}

.accordion > .card.content-card {
    box-shadow: none;
}

.accordion > .card .card-header.content-modal {
    padding: 1.5rem;
}

    .accordion > .card .card-header.content-modal a {
        font-size: 14px;
    }

    .accordion > .card .card-header.content-modal a:before {
        left: 110px;
    }

    .accordion > .card .card-header.content-modal a[aria-expanded=false]:before {
        content: "\e64b";
    }

    .accordion > .card .card-header.content-modal a[aria-expanded=true]:before {
        content: "\e648";
    }

.email-header-box {
    border: 1px solid #ccc;
    padding: 10px;
    font-size: 14px;
    line-height: 1.7;
}

.table-sm th, .table-sm td {
    padding: 0.5rem 0.5rem;
}

td.dt-control::before {
    content: none !important;
}

/* ==========================================================================
   Quota Utilization Report & Modern DataTables Controls
   ========================================================================== */

/* Modern DataTables Export Buttons */
.dt-buttons {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.dt-buttons .btn,
button.dt-button,
div.dt-button,
a.dt-button {
    background-color: #ffffff !important;
    background-image: none !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: #475569 !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
    margin: 0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    text-shadow: none !important;
    filter: none !important;
    transition: all 0.2s ease-in-out !important;
}

.dt-buttons .btn:hover,
button.dt-button:hover,
div.dt-button:hover,
a.dt-button:hover {
    background-color: #f1f5f9 !important;
    background-image: none !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06) !important;
}

/* Eradicate unwanted DataTables sort arrow pseudo-elements on Quota Report */
#quotaReportTable.dataTable thead > tr > th.sorting:before,
#quotaReportTable.dataTable thead > tr > th.sorting:after,
#quotaReportTable.dataTable thead > tr > th.sorting_asc:before,
#quotaReportTable.dataTable thead > tr > th.sorting_asc:after,
#quotaReportTable.dataTable thead > tr > th.sorting_desc:before,
#quotaReportTable.dataTable thead > tr > th.sorting_desc:after,
#quotaReportTable.dataTable thead > tr > th.sorting_asc_disabled:before,
#quotaReportTable.dataTable thead > tr > th.sorting_asc_disabled:after,
#quotaReportTable.dataTable thead > tr > th.sorting_desc_disabled:before,
#quotaReportTable.dataTable thead > tr > th.sorting_desc_disabled:after,
#quotaReportTable.dataTable thead th.sorting:before,
#quotaReportTable.dataTable thead th.sorting:after,
#quotaReportTable.dataTable thead th.sorting_asc:before,
#quotaReportTable.dataTable thead th.sorting_asc:after,
#quotaReportTable.dataTable thead th.sorting_desc:before,
#quotaReportTable.dataTable thead th.sorting_desc:after,
#quotaReportTable.dataTable thead th.sorting::after,
#quotaReportTable.dataTable thead th.sorting_asc::after,
#quotaReportTable.dataTable thead th.sorting_desc::after,
#quotaReportTable.dataTable thead th.sorting::before,
#quotaReportTable.dataTable thead th.sorting_asc::before,
#quotaReportTable.dataTable thead th.sorting_desc::before,
#quotaReportTable thead th:before,
#quotaReportTable thead th:after,
#quotaReportTable thead th::before,
#quotaReportTable thead th::after {
    content: "" !important;
    display: none !important;
    opacity: 0 !important;
}

#quotaReportTable.dataTable thead > tr > th.sorting,
#quotaReportTable.dataTable thead > tr > th.sorting_asc,
#quotaReportTable.dataTable thead > tr > th.sorting_desc,
#quotaReportTable.dataTable thead th.sorting,
#quotaReportTable.dataTable thead th.sorting_asc,
#quotaReportTable.dataTable thead th.sorting_desc,
#quotaReportTable thead th {
    background-image: none !important;
    cursor: pointer;
    padding-right: 16px !important;
}

#quotaReportTable thead th,
#event-listing thead th,
#consent-listing thead th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    padding: 12px 16px !important;
    border-top: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    white-space: nowrap;
}

#quotaReportTable tbody td,
#event-listing tbody td,
#consent-listing tbody td {
    padding: 14px 16px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

#quotaReportTable tbody tr:hover,
#event-listing tbody tr:hover,
#consent-listing tbody tr:hover {
    background-color: #f8fafc !important;
}

/* DataTables pagination & length controls */
.dataTables_length label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 0.82rem !important;
    color: #64748b !important;
    margin-bottom: 0 !important;
}

.dataTables_length select {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 5px 10px !important;
    font-size: 0.82rem !important;
    color: #334155 !important;
    background-color: #ffffff !important;
    outline: none !important;
    height: 34px !important;
}


#btn-search {
    background-color: #4B49AC;
    border-color: #4B49AC;
    transition: all 0.2s ease-in-out;
}

#btn-search:hover {
    background-color: #3f3da0 !important;
    border-color: #3f3da0 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(75, 73, 172, 0.25) !important;
}

#btn-clear {
    transition: all 0.2s ease-in-out;
}

#btn-clear:hover {
    background-color: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

/* Period Filter Segmented Control */
.period-filter-group .btn-period {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.period-filter-group .btn-period.active {
    background: #ffffff;
    color: #4B49AC;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.period-filter-group .btn-period:hover:not(.active) {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.5);
}

/* Top Clients Leaderboard */
.top-client-row {
    padding: 10px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.top-client-row:hover {
    background-color: #f8fafc;
}

.rank-badge {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.rank-badge.rank-1 {
    background: #fef3c7;
    color: #b45309;
}

.rank-badge.rank-2 {
    background: #f1f5f9;
    color: #475569;
}

.rank-badge.rank-3 {
    background: #ffedd5;
    color: #c2410c;
}

.rank-badge.rank-default {
    background: #f8fafc;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}

.client-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffffff;
    flex-shrink: 0;
}

.client-name-link {
    transition: color 0.15s ease;
}

.client-name-link:hover {
    color: #4B49AC !important;
    text-decoration: underline !important;
}

/* ========================================================================== */
/* REPORT PAGES - COMMON & MODERN DESIGN SYSTEM STYLES                       */
/* ========================================================================== */

/* Metric Cards Hover Lift */
.client-metric-card,
.health-metric-card,
.event-metric-card {
    transition: all 0.25s ease;
}
.client-metric-card:hover,
.health-metric-card:hover,
.event-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06) !important;
}

/* Quick Filter & Preset Buttons */
.preset-btn,
.month-preset-btn,
.status-preset-btn {
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    color: #475569;
    transition: all 0.2s ease;
}
.preset-btn:hover,
.month-preset-btn:hover,
.status-preset-btn:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}
.preset-btn.active,
.month-preset-btn.active,
.status-preset-btn.active {
    background-color: #4B49AC;
    border-color: #4B49AC;
    color: #fff;
    box-shadow: 0 2px 4px rgba(75, 73, 172, 0.25);
}

/* Report & Search Tables Styling (General Reports, Monthly Health, Client Export, Search Events and Cookie Consent) */
#clients-export-table thead th,
#health-report-table thead th,
#clientStatsTable thead th,
#event-listing thead th,
#consent-listing thead th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 14px !important;
    border-top: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    vertical-align: middle !important;
}

#clients-export-table tbody td,
#health-report-table tbody td,
#clientStatsTable tbody td,
#event-listing tbody td,
#consent-listing tbody td {
    padding: 12px 14px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 0.86rem !important;
    color: #334155 !important;
}

#clients-export-table tbody tr:hover,
#health-report-table tbody tr:hover,
#clientStatsTable tbody tr:hover,
#event-listing tbody tr:hover,
#consent-listing tbody tr:hover {
    background-color: #f8fafc !important;
}

#clients-export-table tfoot td,
#health-report-table tfoot td,
#clientStatsTable tfoot td {
    padding: 12px 14px !important;
    vertical-align: middle !important;
    border-top: 2px solid #e2e8f0 !important;
    background-color: #f8fafc !important;
}

/* DataTables Button Styling for Reports */
#clients-export-table_wrapper .dt-buttons .btn,
#health-report-table_wrapper .dt-buttons .btn,
#clientStatsTable_wrapper .dt-buttons .btn {
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
}

/* Modern Popup Modal Styling (Drill-downs) */
.modal-modern .modal-dialog {
    max-width: 940px;
}
.modal-modern.modal-drilldown-wide .modal-dialog {
    max-width: 1100px;
}

.modal-modern .modal-content {
    border-radius: 18px !important;
    border: none !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
    overflow: hidden;
    background: #ffffff;
}

.modal-modern .modal-header-modern {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid #eef2f6 !important;
}

.modal-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.modal-icon-badge-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.modal-icon-badge-primary {
    background: #ede9fe;
    color: #6366f1;
    border: 1px solid #ddd6fe;
}

.modal-modern-close {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 50% !important;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none !important;
}
.modal-modern-close:hover {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
    transform: rotate(90deg);
}

/* Modal Mini Stat Cards Strip */
.modal-mini-card {
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}
.modal-mini-card:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    transform: translateY(-1px);
}
.mini-card-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 2px;
}
.mini-card-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Modal Action Buttons */
.modal-modern .dt-buttons {
    display: inline-flex !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
}
.modal-modern .dt-buttons .dt-button,
.modal-modern .dt-buttons .btn {
    margin: 0 !important;
    background-image: none !important;
    border-radius: 8px !important;
    font-size: 0.825rem !important;
    font-weight: 600 !important;
    padding: 0.48rem 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    border: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
.modal-modern .dt-buttons .btn-export-excel {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25) !important;
}
.modal-modern .dt-buttons .btn-export-excel:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35) !important;
    transform: translateY(-1px);
}

/* Full Width & Responsive Table Inside Modal */
.modal-modern .table-responsive {
    width: 100% !important;
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.modal-modern table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eef2f6 !important;
}
.modal-modern table.dataTable thead th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    padding: 13px 16px !important;
    border-top: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    vertical-align: middle !important;
}
.modal-modern table.dataTable tbody td {
    padding: 12px 16px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 0.84rem !important;
    color: #334155 !important;
}

/* Badges & Pills in Drill-downs */
.badge-reason-bounce {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.badge-reason-drop {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
.badge-reason-other {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.badge-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 0.32rem 0.85rem;
    font-size: 0.825rem;
    font-weight: 600;
    border-radius: 20px;
    letter-spacing: 0.2px;
}
.badge-count-neutral {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.badge-count-success {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
.badge-count-danger {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.badge-count-zero {
    background-color: transparent;
    color: #94a3b8;
    border: 1px dashed #cbd5e1;
    font-weight: 500;
}

.date-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ede9fe;
    color: #6366f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.email-avatar-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background-color: #e0e7ff;
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

/* Event Details Modal & Drawer Components */
.event-details-card {
    border-radius: 10px;
    border: 1px solid #eef2f6 !important;
    background: #fff;
    overflow: hidden;
    margin-bottom: 1rem;
}

.event-details-header {
    background: #f8fafc;
    border-bottom: 1px solid #eef2f6;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.event-details-header:hover {
    background: #f1f5f9;
}

.event-details-table th {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #64748b !important;
    padding: 8px 12px !important;
    vertical-align: top;
    width: 130px;
    border-bottom: 1px solid #f1f5f9;
}

.event-details-table td {
    font-size: 0.85rem !important;
    color: #1e293b;
    padding: 8px 12px !important;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.event-details-table tr:last-child th,
.event-details-table tr:last-child td {
    border-bottom: none;
}

.attachment-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-right: 6px;
    margin-bottom: 6px;
    text-decoration: none !important;
    color: #1e293b;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.attachment-pill:hover {
    background: #ede9fe;
    border-color: #cbd5e1;
    color: #4B49AC;
    transform: translateY(-1px);
}

/* ==========================================================================
   Select2 Unified Height & Modern Form Control Styling
   ========================================================================== */
.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single,
.select2-container--default .select2-selection--single {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    display: block !important;
    position: relative !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
    box-sizing: border-box !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 30px !important;
    height: 30px !important;
    padding-left: 12px !important;
    padding-right: 30px !important;
    font-size: 0.875rem !important;
    color: #1e293b !important;
    font-weight: 400 !important;
    width: 100% !important;
    margin: 0 !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8 !important;
    font-size: 0.875rem !important;
    line-height: 30px !important;
}

/* Explicitly override style.css padding-top: 50px */
.select2-container--default .select2-selection__arrow,
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 30px !important;
    width: 24px !important;
    position: absolute !important;
    top: 0 !important;
    right: 4px !important;
    bottom: 0 !important;
    padding: 0 !important;
    padding-top: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    margin-left: -4px !important;
    margin-top: -2px !important;
    border-color: #64748b transparent transparent transparent !important;
    border-style: solid !important;
    border-width: 5px 4px 0 4px !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #64748b transparent !important;
    border-width: 0 4px 5px 4px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #4B49AC !important;
    box-shadow: 0 0 0 0.2rem rgba(75, 73, 172, 0.15) !important;
    outline: 0 !important;
}

/* Validation support for Select2 */
.is-invalid + .select2-container--default .select2-selection--single,
.select2-container--default.is-invalid .select2-selection--single {
    border-color: #dc2626 !important;
}

.is-invalid + .select2-container--default.select2-container--focus .select2-selection--single {
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.15) !important;
}

/* Enroll Service modal uses full-size .form-control inputs (not -sm): size Select2 with the same
   padding/line-height so the service dropdown matches the inputs beside it. */
#enrollServiceModal .select2-container--default .select2-selection--single {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 1.125rem 2.5rem 1.125rem 1.375rem !important;
    border-color: var(--bs-border-color) !important;
    border-radius: 4px !important;
}

#enrollServiceModal .select2-container--default .select2-selection--single .select2-selection__rendered,
#enrollServiceModal .select2-container--default .select2-selection--single .select2-selection__placeholder {
    height: auto !important;
    line-height: 19px !important; /* matches the rendered text height of .form-control inputs */
    padding: 0 !important;
    transform: none !important;
}

#enrollServiceModal .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 12px !important;
}

/* Select2 Modern Dropdown Menu */
.select2-dropdown {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
    z-index: 1060 !important;
    font-size: 0.875rem !important;
}

.select2-container--default .select2-results__option {
    padding: 7px 12px !important;
    font-size: 0.85rem !important;
    color: #1e293b !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #ede9fe !important;
    color: #4B49AC !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #4B49AC !important;
    color: #ffffff !important;
}

.select2-container--default .select2-search--dropdown {
    padding: 8px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 5px 10px !important;
    font-size: 0.85rem !important;
    outline: none !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #4B49AC !important;
}

/* ==========================================================================
   Table Expand/Collapse Button (+ / - Centering)
   ========================================================================== */
td.dt-control {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 8px 4px !important;
}

.dt-expand-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    border-radius: 50% !important;
    background: #ede9fe !important;
    color: #4B49AC !important;
    border: 1px solid #ddd6fe !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

.dt-expand-btn:hover {
    background: #ddd6fe !important;
    color: #3730a3 !important;
}

.dt-expand-btn i {
    font-size: 15px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

.dt-expand-btn i::before {
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
}

/* ==========================================================================
   Date Presets Pills Styling
   ========================================================================== */
.preset-btn {
    border-radius: 20px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    padding: 3px 12px !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    transition: all 0.2s ease !important;
    line-height: 1.5 !important;
}

.preset-btn:hover {
    background: #ede9fe !important;
    border-color: #c4b5fd !important;
    color: #4B49AC !important;
}

.preset-btn.active {
    background: #4B49AC !important;
    border-color: #4B49AC !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(75, 73, 172, 0.25) !important;
}

/* ==========================================================================
   Email Message Inspector Modal Sizing (Expanded)
   ========================================================================== */
#viewContentModal .modal-dialog {
    max-width: 82vw !important;
    width: 82vw !important;
}






/* ==========================================================================
   Client > Config page (tabbed layout)
   ========================================================================== */
.client-config-tabs {
    border-bottom: 1px solid #e2e8f0;
    gap: 4px;
}

.client-config-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    padding: 0.6rem 1rem;
}

.client-config-tabs .nav-link:hover {
    color: #4B49AC;
}

.client-config-tabs .nav-link.active {
    color: #4B49AC;
    border-bottom-color: #4B49AC;
    background: transparent;
}

.client-config-card .section-heading,
#emailIdSettings .section-heading {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 0.75rem;
}

.client-config-card .settings-box {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    background: #fff;
}

.email-id-pills .nav-link {
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    color: #475569;
    border-radius: 999px;
}

.email-id-pills .nav-link.active {
    background-color: #4B49AC;
    color: #fff;
}

.email-id-pills .nav-link.active .badge {
    background-color: rgba(255, 255, 255, 0.25) !important;
}

.sendgrid-key-masked {
    display: inline-block;
    max-width: 100%;
    min-width: 0;
    vertical-align: middle;
    color: #334155;
    background: #f1f5f9;
    border-radius: 4px;
    padding: 1px 6px;
}

/* Client > Config header spacing */
.client-config-header {
    margin-bottom: 1.75rem;
}

.client-config-back {
    display: inline-block;
    margin-bottom: 0.6rem;
}

.client-config-title {
    margin: 0 0 0.85rem;
    line-height: 1.2;
}

.client-config-meta {
    gap: 0.6rem 0.75rem;
}

.client-config-meta .badge {
    padding: 0.45em 0.85em;
}

/* Client > Config: the theme gives every .tab-content a bordered box; this page uses a plain underline tab bar instead. */
.client-config-card .client-config-panes {
    border: none;
    padding: 1.5rem 0 0;
    text-align: left;
}

/* Client > Config tabs: no heavy focus box after a click; keep a visible ring for keyboard users. */
.client-config-tabs .nav-link:focus {
    box-shadow: none;
    outline: none;
}

.client-config-tabs .nav-link:focus-visible {
    outline: 2px solid rgba(75, 73, 172, 0.35);
    outline-offset: -2px;
    border-radius: 4px;
}

/* ==========================================================================
   Client > Config > Activity timeline
   ========================================================================== */
.client-activity {
    position: relative;
    padding-left: 0.25rem;
}

.client-activity-day {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin: 1.25rem 0 0.75rem;
}

.client-activity-day:first-child {
    margin-top: 0;
}

.client-activity-item {
    position: relative;
    display: flex;
    gap: 0.9rem;
    padding-bottom: 1rem;
}

/* connector line between icons */
.client-activity-item::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 38px;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.client-activity-item:last-child::before,
.client-activity-item:has(+ .client-activity-day)::before,
.client-activity-item:has(+ .d-none)::before {
    display: none;
}

.client-activity-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.client-activity-icon.tone-success { background: #dcfce7; color: #15803d; }
.client-activity-icon.tone-danger  { background: #fee2e2; color: #b91c1c; }
.client-activity-icon.tone-warning { background: #fef3c7; color: #b45309; }
.client-activity-icon.tone-info    { background: #e0f2fe; color: #0369a1; }
.client-activity-icon.tone-teal    { background: #ccfbf1; color: #0f766e; }
.client-activity-icon.tone-purple  { background: #f3e8ff; color: #7e22ce; }
.client-activity-icon.tone-indigo  { background: #e0e7ff; color: #4B49AC; }
.client-activity-icon.tone-slate   { background: #f1f5f9; color: #475569; }

.client-activity-body {
    flex: 1;
    min-width: 0;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
}

.client-activity-title {
    font-weight: 600;
    color: #1e293b;
}

.client-activity-time {
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
}

.client-activity-details {
    font-size: 0.85rem;
    color: #475569;
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

.client-activity-by {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 0.3rem;
}

.client-activity-empty .mdi {
    font-size: 2rem;
}

/* Client > Config: enrolled services section below the client form (Details tab) */
.client-config-services {
    border-top: 1px solid #e2e8f0;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
}

/* ==========================================================================
   Search > SendGrid Events page
   ========================================================================== */
.search-page-header {
    margin-bottom: 1.5rem;
}

.search-filter-card,
.search-results-card {
    border: 1px solid #eef2f6;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.search-filter-card .card-body,
.search-results-card .card-body {
    padding: 1.5rem;
}

.search-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.35rem;
}

/* Prominent recipient search box */
.search-primary {
    position: relative;
}

.search-primary .search-primary-icon {
    position: absolute;
    left: 14px;
    top: 22px; /* half of the 44px input; not 50%, so the icon stays put when the error text appears below */
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.search-primary .form-control {
    height: 44px;
    padding: 0 1rem 0 2.5rem;
    font-size: 0.92rem;
    border-radius: 10px;
    border-color: #cbd5e1;
}

.search-primary .form-control:focus {
    border-color: #4B49AC;
    box-shadow: 0 0 0 0.2rem rgba(75, 73, 172, 0.12);
}

.search-primary .form-control.is-invalid ~ .search-primary-icon,
.search-primary .form-control.is-invalid {
    border-color: #dc2626;
}

/* invalid-feedback follows the input, so the icon sits before both */
.search-primary .invalid-feedback {
    margin-top: 0.3rem;
}

.search-actions {
    padding-top: calc(1rem + 0.35rem); /* label line (16px) + label margin: aligns buttons with the input */
}

.search-actions .btn {
    height: 44px;
    border-radius: 10px;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .search-actions {
        padding-top: 0;
    }
}

.search-filter-card .form-control-sm,
.search-filter-card .input-group-sm > .form-control {
    border-radius: 8px;
    border-color: #cbd5e1;
}

.search-filter-card .input-group-sm > .form-control:first-child {
    border-radius: 8px 0 0 8px;
}

.search-filter-card .input-group-sm > .search-time {
    flex: 0 0 105px;
    max-width: 105px;
    border-left: 0;
    border-radius: 0 8px 8px 0 !important;
}

.search-date-row {
    border-top: 1px dashed #e2e8f0;
}

.search-presets .preset-btn {
    border-radius: 999px;
    padding: 4px 12px;
}

.search-presets .preset-clear {
    background: transparent;
    border-color: transparent;
    color: #94a3b8;
}

.search-presets .preset-clear:hover {
    color: #dc2626;
    background: transparent;
}

/* Search page: one control height (38px) for inputs, dates and dropdowns in the filter card */
.search-filter-card .form-control-sm,
.search-filter-card .input-group-sm > .form-control {
    height: 38px;
    min-height: 38px;
}

.search-filter-card .select2-container .select2-selection--single {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    border-radius: 8px !important;
}

.search-filter-card .select2-container--default .select2-selection--single .select2-selection__rendered,
.search-filter-card .select2-container--default .select2-selection--single .select2-selection__placeholder {
    line-height: 36px !important;
    height: 36px !important;
}

.search-filter-card .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

/* Search page: the custom border colour above must not hide Bootstrap's validation/focus states */
.search-filter-card .form-control-sm.is-invalid,
.search-filter-card .input-group-sm > .form-control.is-invalid {
    border-color: #dc2626; /* same red as the email box and Select2 invalid state */
}

.search-filter-card .form-control-sm.is-invalid:focus,
.search-filter-card .input-group-sm > .form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.15);
}

.search-filter-card .form-control-sm:focus:not(.is-invalid),
.search-filter-card .input-group-sm > .form-control:focus:not(.is-invalid) {
    border-color: #4B49AC;
    box-shadow: 0 0 0 0.2rem rgba(75, 73, 172, 0.12);
}

/* Search page: quick-range chips sit on the same 38px line as the From/To inputs (label above, like them) */
.search-presets {
    min-height: 38px;
}

/* Search page: results table */
.search-cell-empty {
    color: #cbd5e1;
}

.search-cell-email {
    font-weight: 600;
    color: #1e293b;
}

/* Expanded row: compact event timeline */
.search-timeline-wrap {
    padding: 0.75rem 1rem 0.5rem 3rem; /* indent under the expand button */
}

.search-timeline-title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.6rem;
}

.search-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1rem;
    border-left: 2px solid #e2e8f0;
}

.search-timeline-item {
    position: relative;
    padding: 0 0 0.85rem 0.9rem;
}

.search-timeline-item:last-child {
    padding-bottom: 0.25rem;
}

/* dot on the line */
.search-timeline-item::before {
    content: "";
    position: absolute;
    left: -1.42rem;
    top: 0.45rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #94a3b8;
}

.search-timeline-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.search-timeline-time {
    font-size: 0.8rem;
    color: #64748b;
}

.search-timeline-details {
    font-size: 0.82rem;
    color: #334155;
    margin-top: 0.3rem;
    overflow-wrap: anywhere;
}

.search-timeline-empty {
    padding: 0.75rem 1rem 0.75rem 3rem;
    font-size: 0.82rem;
    color: #64748b;
}

/* ==========================================================================
   Search > email details modal (inspector)
   ========================================================================== */
.inspector .min-w-0 {
    min-width: 0;
}

.inspector-summary {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eef2f6;
}

.inspector-subject {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.4rem;
    overflow-wrap: anywhere;
}

.inspector-route {
    font-size: 0.86rem;
    color: #334155;
    overflow-wrap: anywhere;
}

.inspector-route-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-right: 0.35rem;
}

.inspector-status {
    font-weight: 600;
    font-size: 0.78rem;
    padding: 5px 10px;
    border-radius: 6px;
    text-transform: capitalize;
}

.inspector-action {
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.inspector-forward {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding: 0.6rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 10px;
}

.inspector-forward .form-control {
    flex: 1 1 240px;
    max-width: 360px;
    border-radius: 8px;
}

.inspector-copy {
    color: #94a3b8;
    text-decoration: none;
}

.inspector-copy:hover {
    color: #4B49AC;
}

.inspector-preview-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0.25rem 0 0.5rem;
}

/* Like an email client: the message sits on a plain light background, no extra card border. */
.inspector-preview {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 1rem;
}

/* Search results: icon-only "view email" button */
.search-view-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid transparent;
    color: #4B49AC;
    background: transparent;
    font-size: 1rem;
}

.search-view-btn:hover,
.search-view-btn:focus-visible {
    background: #ede9fe;
    border-color: #ddd6fe;
    color: #4B49AC;
}

/* Search page (filters reordered): email box same height as the other filters, actions last on the right */
.search-primary .form-control {
    height: 38px;
    font-size: 0.875rem;
    border-radius: 8px;
}

.search-primary .search-primary-icon {
    top: 19px; /* half of the 38px input */
}

.search-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.search-buttons {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.search-buttons .btn {
    height: 38px;
    border-radius: 8px;
    font-weight: 600;
    padding: 0 1.1rem;
}

.search-buttons #btn-search {
    min-width: 140px;
}

/* Search page: Reset/Search sit right after the quick-range chips instead of the far right */
.search-footer {
    justify-content: flex-start;
    gap: 1.5rem;
}

.search-buttons {
    margin-left: 0;
}

/* Users list */
.users-badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 6px;
}

#records_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 0.35rem 0.75rem;
    min-width: 220px;
}

/* Form cards (Client config/add, User add/edit): the theme greys out <select> text so a chosen value looks
   like a placeholder; show selected values in the normal text colour. */
.client-config-card select.form-control,
.client-config-card select.form-select {
    color: #1e293b;
}

/* Clients list */
.clients-name {
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
}

.clients-name:hover {
    color: #4B49AC;
    text-decoration: underline;
}

.clients-website {
    display: block;
    max-width: 260px;
    margin-top: 2px;
    font-size: 0.78rem;
    color: #64748b;
    text-decoration: none;
}

.clients-website:hover {
    color: #4B49AC;
}

.clients-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ede9fe;
    color: #4B49AC;
    font-weight: 600;
    font-size: 0.78rem;
}

.clients-table .min-w-0 {
    min-width: 0;
}

/* Sorting: headers are clickable; only the column currently sorted shows an arrow
   (replaces the static chevrons that made every column look sorted). */
.clients-table thead th.sorting,
.clients-table thead th.sorting_asc,
.clients-table thead th.sorting_desc {
    cursor: pointer;
    background-image: none !important;
    padding-right: 1.5rem !important;
    position: relative;
}

.clients-table thead th.sorting::before,
.clients-table thead th.sorting::after,
.clients-table thead th.sorting_asc::before,
.clients-table thead th.sorting_desc::before {
    content: none !important;
    display: none !important;
}

.clients-table thead th.sorting_asc::after,
.clients-table thead th.sorting_desc::after {
    content: "\25B2" !important;
    display: inline-block !important;
    position: absolute !important;
    right: 0.5rem !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%);
    font-size: 0.6rem !important;
    color: #4B49AC !important;
    opacity: 1 !important;
}

.clients-table thead th.sorting_desc::after {
    content: "\25BC" !important;
}

.clients-table thead th.sorting:hover {
    color: #4B49AC;
}

#sortable-table-1_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 0.35rem 0.75rem;
    min-width: 220px;
}

/* Settings page: Save sits at the bottom-right of each section, like the other forms */
.settings-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #eef2f6;
    margin-top: 1.25rem;
    padding-top: 1rem;
}

/* ==========================================================================
   Login / account pages (_LoginLayout)
   ========================================================================== */
.login-page {
    min-height: 100vh;
    background: radial-gradient(circle at top, #ede9fe 0%, #f5f7ff 45%, #f8fafc 100%) !important;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.login-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #4B49AC;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(75, 73, 172, 0.3);
}

.login-brand-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.login-card {
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    padding: 2.25rem 2rem;
}

@media (max-width: 575.98px) {
    .login-card {
        padding: 1.75rem 1.25rem;
    }
}

.login-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.login-card .form-control-lg {
    height: 46px;
    font-size: 0.92rem;
    border-radius: 10px;
    border-color: #cbd5e1;
    padding: 0 0.95rem;
}

.login-card .form-control-lg:focus {
    border-color: #4B49AC;
    box-shadow: 0 0 0 0.2rem rgba(75, 73, 172, 0.12);
}

.login-password {
    position: relative;
}

.login-password .form-control-lg {
    padding-right: 2.75rem;
}

.login-password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 8px;
}

.login-password-toggle:hover {
    background: #f1f5f9;
    color: #4B49AC;
}

.login-link {
    font-size: 0.8rem;
    color: #4B49AC;
    text-decoration: none;
}

.login-link:hover {
    text-decoration: underline;
}

.login-submit {
    height: 46px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

.login-alert {
    font-size: 0.86rem;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
}

.login-footnote {
    text-align: center;
    color: #94a3b8;
    font-size: 0.78rem;
    margin-top: 1.25rem;
}

/* Login button: text centred vertically/horizontally (theme .btn-lg padding pushed it down) and in capitals */
.login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ---------- Client > Config > Cookie Consent ---------- */
#consentSettings .consent-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#consentSettings .consent-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

#consentSettings .consent-card-heading {
    flex: 1 1 320px;
    min-width: 0;
}

#consentSettings .consent-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
}

#consentSettings .consent-card-title i {
    color: #4b49ac;
    font-size: 0.95rem;
}

#consentSettings .consent-card-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

#consentSettings .consent-card-body {
    padding: 0 1.25rem;
}

#consentSettings .consent-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

/* Save/remove messages above a card footer. The alerts carry Bootstrap's mb-0, so the gap to the footer
   comes from this container's padding, not the alert's margin. */
#consentSettings .consent-card-result {
    padding: 0 1.25rem 1rem;
}

#consentSettings .consent-card-result:empty {
    display: none;
}

#consentSettings .consent-card-result .alert {
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Sections inside a card: separated by rules instead of nested boxes. */
#consentSettings .consent-card .settings-box {
    border: none;
    border-radius: 0;
    padding: 1.25rem 0;
    background: transparent;
}

#consentSettings .consent-card-body > .settings-box + .settings-box,
#consentSettings .consent-card-body > .consent-split + .settings-box {
    border-top: 1px solid #eef2f6;
}

#consentSettings #consentTextFields {
    padding: 1.25rem 0;
}

@media (min-width: 992px) {
    #consentSettings .consent-split > .col-lg-6:first-child > .settings-box {
        padding-right: 1.5rem;
    }

    #consentSettings .consent-split > .col-lg-6 + .col-lg-6 > .settings-box {
        padding-left: 1.5rem;
        border-left: 1px solid #eef2f6;
    }
}

@media (max-width: 991.98px) {
    #consentSettings .consent-split > .col-lg-6 + .col-lg-6 > .settings-box {
        border-top: 1px solid #eef2f6;
    }
}

#consentSettings .consent-subheading {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed #e2e8f0;
}

#consentSettings .form-text {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    line-height: 1.4;
}

#consentSettings label.small {
    font-weight: 500;
    color: #334155;
}

#consentSettings code {
    word-break: break-all;
}

/* Tables: the theme stops table cells from wrapping, which pushed the register and scan tables sideways. */
#consentSettings .table {
    margin-bottom: 0;
}

#consentSettings .table th,
#consentSettings .table td {
    white-space: normal;
    padding: 0.6rem 0.75rem;
    line-height: 1.45;
    vertical-align: middle;
}

#consentSettings .table thead th {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

#consentSettings .table tbody tr:hover {
    background: #fafbfd;
}

#consentSettings .table .badge {
    font-weight: 500;
    font-size: 0.7rem;
    vertical-align: middle;
}

#consentSettings .consent-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow-x: auto;
}

#consentSettings #cookieTable td:first-child {
    min-width: 180px;
}

#consentSettings #cookieTable td:nth-child(4) {
    min-width: 220px;
}

#consentSettings .consent-scan-error {
    max-width: 520px;
    margin-top: 0.25rem;
}

#consentSettings .consent-inline-panel {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 0.85rem 1rem;
}

#consentSettings .consent-register-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

#consentSettings .consent-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 2rem;
}

#consentSettings .consent-category-list .form-check {
    margin: 0;
}

#consentSettings .section-heading .fw-normal {
    text-transform: none;
    letter-spacing: 0;
}

#consentSettings .consent-register-footer {
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
}

#consentSettings .consent-file-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

#consentSettings .consent-file-picker .btn {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    cursor: pointer;
}

#consentSettings .consent-file-name {
    font-size: 0.8rem;
    color: #94a3b8;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#consentSettings .consent-file-picker input:focus-visible + .consent-file-name,
#consentSettings .consent-file-picker label:focus-within {
    outline: 2px solid #4b49ac;
    outline-offset: 2px;
}
