textarea + div.ck.ck-reset.ck-editor.ck-rounded-corners.is-invalid-editor{
    border: 1px solid #fd5353;
}
textarea + div.ck.ck-reset.ck-editor.ck-rounded-corners.is-valid-editor{
    border: 1px solid #1eba62;
}

select + span.is-invalid-select2{
    border: 1px solid #fd5353;
}
select + span.is-valid-select2{
    border: 1px solid #1eba62;
}

table.dataTable>tbody>tr.row-selected-success{
    background: rgba(30, 186, 98, 0.2) !important;
    color: #1eba62;
}

table.dataTable>tbody>tr.row-selected-danger{
    background: rgba(253, 83, 83, 0.2) !important;
    color: #fd5353;
}

table.dataTable>tbody>tr.row-selected-warning{
    background: rgba(253, 239, 83, 0.2) !important;
    color: #fdcd53;
}

table.dataTable>tbody>tr.row-selected-info{
    background: rgba(0, 173, 163, 0.2) !important;
    color: #00ADA3;
}

.btn-primary-dark{
    background-color: #004267;
    color: white;
}

.btn-primary-dark:hover{
    background-color: #015280;
    color: white;
}

/* Add this for the active state */
.btn-primary-dark:active {
    background-color: #015280 !important; /* Keep the hover color */
    color: white; /* Keep text color */
}

.text-link {
    color: #0088ff;
}

.bg-grey {
    background-color: #9d9d9d
}

.badge-grey {
    color: #9d9d9d;
    background-color: rgba(157, 157, 157, 0.2);
}


/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

th.column-header-left {
    text-align: left !important;
}

table>tbody>tr.header-row {
    background-color: #01A3FF !important;
    color: white !important;
}

table>tbody>tr.footer-row {
    background-color: #d6d6d6 !important;
}

ul.px-3 li:hover .nav-text {
    color: #0d6efd; /* Bootstrap primary blue */
}

.nav-item.notification_dropdown a.nav-link::before{
    display: none;
}

.profile-img-display{
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #ccc;
}

/* Custom Bootstrap 5 tooltip styling */
.tooltip.bs-tooltip-top .tooltip-arrow::before,
.tooltip.bs-tooltip-bottom .tooltip-arrow::before,
.tooltip.bs-tooltip-start .tooltip-arrow::before,
.tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-color: black !important;
}

.tooltip .tooltip-inner {
    background-color: black !important;
    color: white !important;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
}

.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dataTables_empty,
.dataTables_wrapper .dataTables_info {
    text-align: center !important;
}


/* Financial Schedule Styling */

/* Overdue row styling */
.overdue-row {
    background-color: #ffebee !important;
    border-left: 4px solid #f44336 !important;
}

.overdue-row td {
    color: #c62828 !important;
    font-weight: 500;
}

.overdue-row:hover {
    background-color: #ffcdd2 !important;
}

/* Completed row styling */
.completed-row {
    opacity: 0.7;
    background-color: #f8f9fa !important;
}

.completed-row td {
    color: #6c757d !important;
}

.completed-row .fw-bold {
    text-decoration: line-through;
    font-weight: 400 !important;
}

/* Badge styling for schedule types */
.badge-primary {
    background-color: #007bff;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

/* Action button styling */
.btn-group .btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.2rem;
}

.btn-xs.sharp {
    border-radius: 0 !important;
}

.btn-xs i {
    font-size: 0.75rem;
}

/* Complete button specific styling */
.complete-financial-schedule {
    background-color: #28a745;
    border-color: #28a745;
}

.complete-financial-schedule:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Modal form styling */
#financial-schedule-modal .form-text {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Table responsive adjustments */
@media (max-width: 768px) {
    .financial-schedule-table .btn-group {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .financial-schedule-table .btn-xs {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* DataTable button styling */
.dt-buttons .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Row selection styling */
.row-selected-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
}

.row-selected-danger {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
}

/* Loading state for buttons */
.btn.loading {
    position: relative;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Company Selector Dropdown */
.company-selector-dropdown .company-option.active {
    background-color: rgba(var(--primary-rgb), 0.1);
    font-weight: 500;
}

.company-selector-dropdown .company-option:hover {
    background-color: rgba(var(--primary-rgb), 0.05);
}

#selected-company-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================================================
   SITEWIDE SPACING TIGHTENING OVERRIDES
   Conservative approach - reduces spacing without breaking layout
   ======================================================================== */

/* === PAGE TITLES (Reduced significantly) === */
div.page-titles,
.page-titles {
    padding: 0.5rem 0 !important; /* Significantly reduced */
    padding-bottom: 0 !important; /* Significantly reduced */
    margin-bottom: 0.75rem !important;
}

.page-titles h4,
.page-titles .breadcrumb {
    margin-bottom: 0.25rem !important;
}

/* === NAVBAR FONT SIZE === */
.header,
.nav-header {
    font-size: 0.9rem !important; /* Reduced from default ~1rem */
}

.header .nav-link,
.header .dropdown-toggle,
.header .nav-item {
    font-size: 0.875rem !important;
}

.dlabnav .metismenu a {
    font-size: 0.875rem !important; /* Reduced sidebar font */
}

.nav-text {
    font-size: 0.875rem !important;
}

div.row{
    margin: 0.5rem !important;
}
/* === CARDS === */
.card {
    margin-bottom: 1rem !important; /* Further reduced */
}

.card-body {
    padding: 0.875rem !important; /* Further reduced */
}

.card-header,
.card-footer {
    padding: 0.5rem 0.5rem !important; /* Further reduced */
    padding-bottom: 0 !important; /* Further reduced */
}

div#payment-method-totals-card>div.card>div.card-body{
    padding-bottom: 2rem !important;
}

.card-title {
    margin-bottom: 0.5rem !important; /* Further reduced */
}

/* === FORMS === */
.form-control,
.form-select {
    padding: 0.45rem 0.75rem !important; /* Further reduced */
}

.form-control-sm {
    padding: 0.25rem 0.5rem !important;
}

.form-label {
    margin-bottom: 0.35rem !important; /* Further reduced */
}

/* === BUTTONS === */
.btn {
    padding: 0.45rem 1rem !important; /* Further reduced */
}

.btn-sm {
    padding: 0.3rem 0.75rem !important;
}

.btn-lg {
    padding: 0.65rem 1.5rem !important;
}

/* === NAVIGATION & SIDEBAR === */
.dlabnav .metismenu > li > a {
    padding: 0.6rem 1.25rem !important; /* Further reduced */
}

.dlabnav .metismenu ul a {
    padding: 0.35rem 0.875rem 0.35rem 3.5rem !important; /* Further reduced */
}

.nav-header {
    padding: 0.75rem 1.25rem !important;
}

/* === TABLES === */
.table > :not(caption) > * > * {
    padding: 0.5rem 0.65rem !important; /* Further reduced */
}

.table-sm > :not(caption) > * > * {
    padding: 0.35rem 0.45rem !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 0.75rem !important;
}

/* === MODALS === */
.modal-header {
    padding: 0.75rem 1rem !important; /* Further reduced */
}

.modal-body {
    padding: 0.875rem 1rem !important; /* Further reduced */
}

.modal-footer {
    padding: 0.65rem 1rem !important; /* Further reduced */
}

/* === DASHBOARD WIDGETS === */
.widget-stat {
    padding: 0.875rem !important; /* Further reduced */
}

.widget-stat .media {
    padding: 0.75rem !important;
}

/* === ALERTS & NOTIFICATIONS === */
.alert {
    padding: 0.75rem 1rem !important; /* Further reduced */
    margin-bottom: 0.75rem !important;
}

/* === TABS & ACCORDIONS === */
.nav-tabs .nav-link,
.nav-pills .nav-link {
    padding: 0.5rem 1rem !important; /* Further reduced */
}

.tab-content {
    padding: 0.875rem !important; /* Further reduced */
}

.accordion-button {
    padding: 0.75rem 1rem !important; /* Further reduced */
}

.accordion-body {
    padding: 0.75rem 1rem !important; /* Further reduced */
}

/* === DROPDOWNS === */
.dropdown-menu {
    padding: 0.35rem 0 !important;
}

.dropdown-item {
    padding: 0.375rem 1rem !important; /* Further reduced */
}

.dropdown-header {
    padding: 0.375rem 1rem !important;
}

/* === LIST GROUPS === */
.list-group-item {
    padding: 0.6rem 1rem !important; /* Further reduced */
}

/* === BADGES & LABELS === */
.badge {
    padding: 0.3rem 0.55rem !important;
}

/* === BREADCRUMBS === */
.breadcrumb {
    padding: 0.5rem 0.75rem !important; /* Further reduced */
    margin-bottom: 0.75rem !important;
}

/* === PAGINATION === */
.page-link {
    padding: 0.4rem 0.75rem !important; /* Further reduced */
}

/* === PROGRESS BARS === */
.progress {
    margin-bottom: 0.75rem !important;
}

/* === HEADINGS === */
h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
    margin-bottom: 0.5rem !important; /* Further reduced */
}

/* === SPECIFIC TEMPLATE COMPONENTS === */
.profile-info {
    padding: 0.875rem !important; /* Further reduced */
}

.widget-timeline .timeline-badge {
    margin-right: 0.75rem !important;
}

.card-profile .profile-photo {
    margin-bottom: 0.75rem !important;
}

/* === CHART CONTAINERS === */
.chart-container {
    padding: 0.75rem !important;
}

/* === INPUT GROUPS === */
.input-group-text {
    padding: 0.45rem 0.75rem !important; /* Further reduced */
}

a.has-arrow:after {
    display: none !important;
}

/* === NAVIGATION & SIDEBAR === */
.dlabnav .metismenu > li > a {
    padding: 0.6rem 1.25rem !important; /* Further reduced */
}

.dlabnav .metismenu ul a {
    padding: 0.35rem 0.75rem 0.35rem 0.75rem !important; /* Reduced left padding from 3.5rem to 2.75rem */
    white-space: normal !important; /* Allow wrapping when needed */
    word-wrap: break-word !important; /* Break long words if necessary */
}

.mm-collapse a,
.mm-show a {
    white-space: normal !important; /* Allow wrapping when needed */
    word-wrap: break-word !important;
}

.nav-header {
    padding: 0.75rem 1.25rem !important;
}

div.card-header a{
    padding: 0.2rem !important;
}

div.card.capture-card,
div.card.donation-card {
    padding-bottom: 1rem !important;
}

/* Restore proper padding for bootstrapMaterialDatePicker day cells */
.dtp-picker-days.table > :not(caption) > * > * {
    padding: 0.25rem !important; /* matches plugin default */
    line-height: 1.2 !important;
    width: auto !important; /* prevents forced expansion */
}

/* ========================================================================
   END OF SPACING TIGHTENING OVERRIDES
   Note: Grid system (row/col) and main containers left untouched to preserve layout
   ======================================================================== */
