/* ============================================================
   Modern UI Enhancement Layer
   ------------------------------------------------------------
   Builds on the existing CSS variable design system so it
   automatically respects the active theme color (--bs-primary),
   light/dark mode and RTL. Loaded LAST in header.php so it
   layers on top without touching the core framework files.
   Safe to remove: just delete this file + its <link> tag.
   ============================================================ */

:root {
    --ui-radius: 12px;
    --ui-radius-sm: 8px;
    --ui-radius-lg: 16px;
    --ui-shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .10);
    --ui-shadow-md: 0 4px 6px -1px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .06);
    --ui-shadow-lg: 0 12px 24px -6px rgba(16, 24, 40, .12), 0 4px 8px -4px rgba(16, 24, 40, .08);
    --ui-ease: cubic-bezier(.4, 0, .2, 1);
    --ui-speed: .2s;
}

/* ---------- Global smoothing ---------- */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    transition: background-color .3s var(--ui-ease), color .3s var(--ui-ease);
}

/* ---------- Cards / boxes ---------- */
.box {
    border-radius: var(--ui-radius);
    border: 1px solid var(--bs-card-border-light-gray);
    box-shadow: var(--ui-shadow-sm);
    transition: box-shadow var(--ui-speed) var(--ui-ease),
                transform var(--ui-speed) var(--ui-ease);
    overflow: hidden;
}

.box:hover {
    box-shadow: var(--ui-shadow-md);
}

.box.box-primary,
.box.box-info,
.box.box-success,
.box.box-warning,
.box.box-danger {
    border-top-width: 3px;
}

.box-header.with-border {
    border-bottom: 1px solid var(--bs-hr-color);
}

.box-header .box-title {
    font-weight: 600;
    letter-spacing: .2px;
}

/* ---------- Dashboard stat widgets (info-box) ---------- */
.info-box {
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow-sm);
    border: 1px solid var(--bs-card-border-light-gray);
    background: var(--bs-card-bg);
    transition: transform var(--ui-speed) var(--ui-ease),
                box-shadow var(--ui-speed) var(--ui-ease);
    overflow: hidden;
}

.info-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--ui-shadow-lg);
}

.info-box .info-box-icon {
    border-radius: var(--ui-radius-sm) 0 0 var(--ui-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        var(--bs-primary),
        color-mix(in srgb, var(--bs-primary) 70%, #000 30%));
    color: #fff;
    transition: transform var(--ui-speed) var(--ui-ease);
}

.info-box:hover .info-box-icon {
    transform: scale(1.05);
}

.info-box .info-box-number {
    font-weight: 700;
    letter-spacing: .3px;
}

/* ---------- Progress widgets on dashboard ---------- */
.topprograssstart {
    border-radius: var(--ui-radius);
    background: var(--bs-card-bg);
    border: 1px solid var(--bs-card-border-light-gray);
    box-shadow: var(--ui-shadow-sm);
    padding: 16px;
    transition: transform var(--ui-speed) var(--ui-ease),
                box-shadow var(--ui-speed) var(--ui-ease);
}

.topprograssstart:hover {
    transform: translateY(-2px);
    box-shadow: var(--ui-shadow-md);
}

.progress,
.progress-minibar {
    border-radius: 50rem;
    background: var(--bs-progress-bg);
    overflow: hidden;
}

.progress-bar {
    border-radius: 50rem;
    transition: width .6s var(--ui-ease);
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: var(--ui-radius-sm);
    font-weight: 500;
    transition: transform var(--ui-speed) var(--ui-ease),
                box-shadow var(--ui-speed) var(--ui-ease),
                background-color var(--ui-speed) var(--ui-ease),
                filter var(--ui-speed) var(--ui-ease);
}

.btn:hover {
    filter: brightness(.96);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary,
.btn-info,
.btn-success,
.btn-danger,
.btn-warning {
    box-shadow: var(--ui-shadow-sm);
}

.btn-primary:hover,
.btn-info:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-warning:hover {
    box-shadow: var(--ui-shadow-md);
}

/* ---------- High-Contrast Accessible Button Hardening (Zero White-on-White) ---------- */
.btn-info {
    background-color: #0284c7 !important;
    border-color: #0369a1 !important;
    color: #ffffff !important;
}
.btn-info:hover,
.btn-info:focus,
.btn-info:active {
    background-color: #0369a1 !important;
    border-color: #075985 !important;
    color: #ffffff !important;
}

.btn-primary {
    background-color: #2563eb !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #1d4ed8 !important;
    border-color: #1e40af !important;
    color: #ffffff !important;
}

.btn-success {
    background-color: #059669 !important;
    border-color: #047857 !important;
    color: #ffffff !important;
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background-color: #047857 !important;
    border-color: #065f46 !important;
    color: #ffffff !important;
}

.btn-warning {
    background-color: #d97706 !important;
    border-color: #b45309 !important;
    color: #ffffff !important;
}
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    background-color: #b45309 !important;
    border-color: #92400e !important;
    color: #ffffff !important;
}

/* Explicit Fee Collection Button Rules across Modals & Tables */
.save_button[data-action="collect"],
button.save_button[data-action="collect"],
.payment_collect,
button.payment_collect {
    background-color: #059669 !important;
    border-color: #047857 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}
.save_button[data-action="collect"]:hover,
button.save_button[data-action="collect"]:hover,
.payment_collect:hover,
button.payment_collect:hover {
    background-color: #047857 !important;
    border-color: #065f46 !important;
    color: #ffffff !important;
}

.save_button[data-action="print"],
button.save_button[data-action="print"] {
    background-color: #0284c7 !important;
    border-color: #0369a1 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}
.save_button[data-action="print"]:hover,
button.save_button[data-action="print"]:hover {
    background-color: #0369a1 !important;
    border-color: #075985 !important;
    color: #ffffff !important;
}

.collectSelected,
button.collectSelected {
    background-color: #d97706 !important;
    border-color: #b45309 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}
.collectSelected:hover,
button.collectSelected:hover {
    background-color: #b45309 !important;
    border-color: #92400e !important;
    color: #ffffff !important;
}

/* Modal Cancel / Close Buttons */
.modal-footer .btn-default,
.modal-footer button[data-dismiss="modal"] {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    font-weight: 500 !important;
}
.modal-footer .btn-default:hover,
.modal-footer button[data-dismiss="modal"]:hover {
    background-color: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* ---------- Form controls ---------- */
.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-radius: var(--ui-radius-sm);
    transition: border-color var(--ui-speed) var(--ui-ease),
                box-shadow var(--ui-speed) var(--ui-ease);
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .15);
}

/* ---------- Tables ---------- */
.table > thead > tr > th {
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: capitalize;
    border-bottom: 2px solid var(--bs-hr-color);
}

.table > tbody > tr {
    transition: background-color var(--ui-speed) var(--ui-ease);
}

.table-hover > tbody > tr:hover,
.table > tbody > tr:hover {
    background-color: var(--bs-primary-rgb-custom);
}

.table.dataTable,
.dataTables_wrapper .dataTable {
    border-radius: var(--ui-radius-sm);
    overflow: hidden;
}

/* ---------- Top header ---------- */
.main-header .navbar,
.main-header .logo {
    transition: background-color .3s var(--ui-ease);
}

.main-header .logo {
    font-weight: 700;
}

.search-form,
.search-form3 {
    border-radius: 50rem !important;
}

.topsidesearchbtn {
    border-radius: 0 50rem 50rem 0 !important;
}

/* ---------- Sidebar menu ---------- */
.sidebar-menu > li > a {
    border-radius: var(--ui-radius-sm);
    margin: 2px 8px;
    transition: background-color var(--ui-speed) var(--ui-ease),
                color var(--ui-speed) var(--ui-ease),
                padding-left var(--ui-speed) var(--ui-ease);
}

.sidebar-menu > li > a:hover {
    padding-left: 18px;
}

.sidebar-menu > li.active > a {
    box-shadow: var(--ui-shadow-sm);
}

.sidebar-menu > li > a > i {
    transition: transform var(--ui-speed) var(--ui-ease);
}

.sidebar-menu > li:hover > a > i {
    transform: scale(1.12);
}

.treeview-menu > li > a {
    border-radius: var(--ui-radius-sm);
    margin: 1px 6px;
    transition: background-color var(--ui-speed) var(--ui-ease),
                padding-left var(--ui-speed) var(--ui-ease);
}

.treeview-menu > li > a:hover {
    padding-left: 22px;
}

/* ---------- Dropdowns ---------- */
.dropdown-menu {
    border-radius: var(--ui-radius-sm);
    border: 1px solid var(--bs-card-border-light-gray);
    box-shadow: var(--ui-shadow-lg);
    overflow: hidden;
    animation: uiDropIn .18s var(--ui-ease);
}

@keyframes uiDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Modals ---------- */
.modal-content {
    border-radius: var(--ui-radius);
    border: none;
    box-shadow: var(--ui-shadow-lg);
    overflow: hidden;
}

.modal-header {
    border-top-left-radius: var(--ui-radius);
    border-top-right-radius: var(--ui-radius);
}

/* ---------- Badges / labels ---------- */
.badge,
.label {
    border-radius: 50rem;
    font-weight: 600;
    letter-spacing: .2px;
}

/* ---------- Pagination ---------- */
.pagination > li > a,
.pagination > li > span {
    transition: background-color var(--ui-speed) var(--ui-ease),
                color var(--ui-speed) var(--ui-ease);
}

.pagination > li:first-child > a,
.pagination > li:first-child > span {
    border-top-left-radius: var(--ui-radius-sm);
    border-bottom-left-radius: var(--ui-radius-sm);
}

.pagination > li:last-child > a,
.pagination > li:last-child > span {
    border-top-right-radius: var(--ui-radius-sm);
    border-bottom-right-radius: var(--ui-radius-sm);
}

/* ---------- Nav tabs ---------- */
.nav-tabs-custom {
    border-radius: var(--ui-radius);
    overflow: hidden;
    box-shadow: var(--ui-shadow-sm);
}

.nav-tabs > li > a {
    border-radius: var(--ui-radius-sm) var(--ui-radius-sm) 0 0;
    transition: background-color var(--ui-speed) var(--ui-ease),
                color var(--ui-speed) var(--ui-ease);
}

/* ---------- Alerts ---------- */
.alert,
.dashalert {
    border-radius: var(--ui-radius-sm);
    border: none;
    box-shadow: var(--ui-shadow-sm);
}

/* ---------- Custom scrollbars ---------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--scroll-bg);
    border-radius: 50rem;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary);
    background-clip: content-box;
    border: 2px solid transparent;
}

/* ---------- Content fade-in ---------- */
.content-wrapper > .content {
    animation: uiFadeUp .35s var(--ui-ease);
}

@keyframes uiFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- User avatar in header ---------- */
.topuser-image {
    border: 2px solid rgba(255, 255, 255, .4);
    transition: transform var(--ui-speed) var(--ui-ease);
}

.user-menu:hover .topuser-image {
    transform: scale(1.05);
}

/* ---------- Reduced motion accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

/* ============================================================
   Dashboard-specific polish
   ============================================================ */

/* Give dashboard stat cards a subtle accent strip and varied
   icon colors so the dashboard reads more clearly. The icon
   colors cycle through a friendly palette while text/value
   stay theme-neutral. */
.info-box {
    position: relative;
    min-height: 92px;
    display: flex;
    align-items: stretch;
}

.info-box > a {
    display: flex;
    align-items: stretch;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.info-box .info-box-icon {
    width: 78px;
    font-size: 30px;
    min-height: 92px;
}

.info-box .info-box-content {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-box .info-box-text {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .4px;
    color: var(--bs-text-muted, #94a3b8);
}

.info-box .info-box-number {
    font-size: 22px;
}

/* Color variety for dashboard stat icons (cycles per row) */
.row .col-lg-3:nth-child(4n+1) .info-box .info-box-icon {
    background: linear-gradient(135deg, #6366f1, #4338ca);
}
.row .col-lg-3:nth-child(4n+2) .info-box .info-box-icon {
    background: linear-gradient(135deg, #10b981, #047857);
}
.row .col-lg-3:nth-child(4n+3) .info-box .info-box-icon {
    background: linear-gradient(135deg, #f59e0b, #b45309);
}
.row .col-lg-3:nth-child(4n+4) .info-box .info-box-icon {
    background: linear-gradient(135deg, #ec4899, #be185d);
}

/* Dashboard chart cards */
.box.box-primary.borderwhite,
.box.box-info.borderwhite {
    border-top: none;
}

/* Progress widget headings */
.topprograssstart h5.pro-border {
    font-weight: 600;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--bs-hr-color);
}

.topprograssstart .ftlayer {
    color: var(--bs-primary);
    margin-right: 6px;
}

/* ============================================================
   Inner page polish (list / create / edit pages)
   ============================================================ */

/* Page header title bar */
.content-header {
    padding: 16px 18px 12px;
}

.content-header > h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.content-header > h1 > i {
    color: var(--bs-primary);
}

.content-header > h1 > small {
    color: var(--bs-text-muted, #94a3b8);
    font-weight: 400;
    font-size: 14px;
}

.content-header .breadcrumb {
    background: transparent;
    border-radius: 50rem;
    padding: 6px 14px;
}

/* Box body spacing consistency */
.box-body {
    padding: 16px;
}

.box-body.no-padding {
    padding: 0;
}

/* Box footer */
.box-footer {
    border-top: 1px solid var(--bs-hr-color);
    background: transparent;
}

/* Small action buttons in tables/lists */
.btn-xs {
    border-radius: 6px;
    transition: transform var(--ui-speed) var(--ui-ease),
                box-shadow var(--ui-speed) var(--ui-ease),
                filter var(--ui-speed) var(--ui-ease);
}

.btn-xs:hover {
    transform: translateY(-1px);
}

/* Student list slide cards */
.slide-content {
    transition: transform var(--ui-speed) var(--ui-ease);
}

.slide-row {
    border-radius: var(--ui-radius);
    transition: box-shadow var(--ui-speed) var(--ui-ease);
}

.slide-row:hover {
    box-shadow: var(--ui-shadow-md);
}

/* DataTables search + length inputs */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 8px;
    border: 1.5px solid var(--bs-border-color);
    padding: 4px 10px;
    transition: border-color var(--ui-speed) var(--ui-ease),
                box-shadow var(--ui-speed) var(--ui-ease);
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .15);
    outline: none;
}

/* Input groups */
.input-group-addon {
    border-radius: var(--ui-radius-sm) 0 0 var(--ui-radius-sm);
    background: var(--bs-gray-smoke, #f7f7f7);
    border: 1px solid var(--bs-border-color);
}

/* Labels above form fields */
.form-group > label {
    font-weight: 600;
    font-size: 13px;
    color: var(--bs-body-color);
    margin-bottom: 6px;
}

/* Required asterisk */
.req {
    color: #ef4444;
    font-weight: 700;
}

/* ============================================================
   AJAX live search dropdown (top header)
   ============================================================ */
.ss-live-search-wrap {
    position: relative;
}

.ss-live-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 320px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--bs-card-bg, #fff);
    border: 1px solid var(--bs-card-border-light-gray, #e6e6e8);
    border-radius: var(--ui-radius, 12px);
    box-shadow: var(--ui-shadow-lg, 0 12px 24px -6px rgba(16,24,40,.18));
    z-index: 1050;
    display: none;
    padding: 6px;
    animation: uiDropIn .18s var(--ui-ease);
}

.ss-live-search-results.open {
    display: block;
}

.ss-ls-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: var(--ui-radius-sm, 8px);
    color: var(--bs-body-color, #333);
    text-decoration: none;
    transition: background-color var(--ui-speed, .2s) var(--ui-ease);
}

.ss-ls-item:hover,
.ss-ls-item:focus {
    background: var(--bs-primary-rgb-custom, rgba(115,103,240,.1));
    color: var(--bs-body-color, #333);
    text-decoration: none;
}

.ss-ls-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--bs-card-border-light-gray, #e6e6e8);
    background: var(--bs-gray-smoke, #f7f7f7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ss-ls-avatar-fallback {
    color: var(--bs-primary);
    font-size: 18px;
}

.ss-ls-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ss-ls-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-ls-sub {
    font-size: 12px;
    color: var(--bs-text-muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-ls-sub i {
    opacity: .7;
}

.ss-ls-state {
    padding: 18px 14px;
    text-align: center;
    color: var(--bs-text-muted, #94a3b8);
    font-size: 13px;
}

.ss-ls-footer {
    margin-top: 4px;
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--bs-primary);
    border-top: 1px solid var(--bs-hr-color, #eee);
    cursor: pointer;
    border-radius: 0 0 var(--ui-radius-sm, 8px) var(--ui-radius-sm, 8px);
    transition: background-color var(--ui-speed, .2s) var(--ui-ease);
}

.ss-ls-footer:hover {
    background: var(--bs-primary-rgb-custom, rgba(115,103,240,.1));
}

@media (max-width: 767px) {
    .ss-live-search-results {
        min-width: 260px;
    }
}

/* ============================================================
   Dashboard welcome hero banner
   ============================================================ */
.ss-dash-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(120deg,
        var(--bs-primary),
        color-mix(in srgb, var(--bs-primary) 55%, #1e1b4b 45%));
    color: #fff;
    border-radius: var(--ui-radius-lg, 16px);
    padding: 22px 26px;
    margin: 14px 0 18px;
    box-shadow: 0 10px 28px -8px rgba(var(--bs-primary-rgb), .5);
    overflow: hidden;
}

.ss-dash-hero::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -5%;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, .12);
    border-radius: 50%;
}

.ss-dash-hero::after {
    content: "";
    position: absolute;
    bottom: -60%;
    right: 16%;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, .08);
    border-radius: 50%;
}

.ss-dash-hero-text {
    position: relative;
    z-index: 1;
}

.ss-dash-hello {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .3px;
    color: #fff;
}

.ss-dash-sub {
    margin: 0;
    font-size: 14px;
    opacity: .9;
}

.ss-dash-hero-illu {
    position: relative;
    z-index: 1;
    font-size: 56px;
    opacity: .9;
    line-height: 1;
}

@media (max-width: 575px) {
    .ss-dash-hero { padding: 18px; }
    .ss-dash-hello { font-size: 19px; }
    .ss-dash-hero-illu { font-size: 40px; }
}

/* ============================================================
   AI Assistant floating chatbot widget
   ============================================================ */
.ss-ai-chat {
    display: none !important;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    font-size: 14px;
}

[dir="rtl"] .ss-ai-chat {
    right: auto;
    left: 24px;
}

/* Launcher button */
.ss-ai-launcher {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg,
        var(--bs-primary),
        color-mix(in srgb, var(--bs-primary) 55%, #1e1b4b 45%));
    box-shadow: 0 10px 24px -6px rgba(var(--bs-primary-rgb), .7);
    position: relative;
    transition: transform .25s var(--ui-ease), box-shadow .25s var(--ui-ease);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ss-ai-launcher:hover {
    transform: scale(1.07) translateY(-2px);
    box-shadow: 0 14px 30px -6px rgba(var(--bs-primary-rgb), .8);
}

.ss-ai-launcher i {
    font-size: 24px;
    position: absolute;
    transition: opacity .2s var(--ui-ease), transform .25s var(--ui-ease);
}

.ss-ai-launcher .ss-ai-launcher-close { opacity: 0; transform: rotate(-90deg) scale(.5); }
.ss-ai-launcher .ss-ai-launcher-open  { opacity: 1; transform: rotate(0) scale(1); }

.ss-ai-chat.open .ss-ai-launcher-close { opacity: 1; transform: rotate(0) scale(1); }
.ss-ai-chat.open .ss-ai-launcher-open  { opacity: 0; transform: rotate(90deg) scale(.5); }

/* Gentle attention pulse */
.ss-ai-launcher::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--bs-primary);
    animation: ssAiPulse 2.4s ease-out infinite;
}
.ss-ai-chat.open .ss-ai-launcher::after { display: none; }

@keyframes ssAiPulse {
    0%   { transform: scale(1); opacity: .6; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* Chat panel */
.ss-ai-panel {
    position: absolute;
    bottom: 74px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: var(--bs-card-bg, #fff);
    border: 1px solid var(--bs-card-border-light-gray, #e6e6e8);
    border-radius: var(--ui-radius-lg, 16px);
    box-shadow: 0 24px 60px -12px rgba(16, 24, 40, .35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .25s var(--ui-ease), transform .25s var(--ui-ease), visibility .25s;
}

[dir="rtl"] .ss-ai-panel { right: auto; left: 0; transform-origin: bottom left; }

.ss-ai-chat.open .ss-ai-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.ss-ai-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    color: #fff;
    background: linear-gradient(135deg,
        var(--bs-primary),
        color-mix(in srgb, var(--bs-primary) 55%, #1e1b4b 45%));
}

.ss-ai-head-info { display: flex; align-items: center; gap: 10px; }

.ss-ai-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.ss-ai-title { font-weight: 700; font-size: 15px; line-height: 1.1; }

.ss-ai-status {
    font-size: 11px;
    opacity: .9;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.ss-ai-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, .7);
    animation: ssAiBlink 1.8s infinite;
}

@keyframes ssAiBlink {
    0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); }
    70%  { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.ss-ai-min {
    background: rgba(255, 255, 255, .15);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .2s var(--ui-ease);
}
.ss-ai-min:hover { background: rgba(255, 255, 255, .28); }

/* Body / messages */
.ss-ai-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--bs-gray-smoke, #f7f7f7);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ss-ai-msg { display: flex; }
.ss-ai-msg.user { justify-content: flex-end; }
.ss-ai-msg.bot { justify-content: flex-start; }

.ss-ai-bubble {
    max-width: 80%;
    padding: 10px 13px;
    border-radius: 14px;
    line-height: 1.45;
    word-wrap: break-word;
    animation: ssAiBubbleIn .25s var(--ui-ease);
}

@keyframes ssAiBubbleIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ss-ai-msg.bot .ss-ai-bubble {
    background: var(--bs-card-bg, #fff);
    color: var(--bs-body-color, #333);
    border: 1px solid var(--bs-card-border-light-gray, #e6e6e8);
    border-bottom-left-radius: 4px;
}

.ss-ai-msg.user .ss-ai-bubble {
    background: linear-gradient(135deg,
        var(--bs-primary),
        color-mix(in srgb, var(--bs-primary) 70%, #000 30%));
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Navigate button inside a bot bubble */
.ss-ai-nav { margin-top: 10px; }

.ss-ai-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 50rem;
    background: var(--bs-primary);
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: filter .2s var(--ui-ease), transform .2s var(--ui-ease);
}
.ss-ai-nav-btn:hover { filter: brightness(1.05); transform: translateX(2px); color: #fff; text-decoration: none; }

/* Typing indicator */
.ss-ai-typing { display: flex; gap: 4px; align-items: center; }
.ss-ai-typing span {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--bs-primary);
    opacity: .5;
    animation: ssAiTyping 1.3s infinite ease-in-out both;
}
.ss-ai-typing span:nth-child(1) { animation-delay: -0.32s; }
.ss-ai-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes ssAiTyping {
    0%, 80%, 100% { transform: scale(.6); opacity: .4; }
    40%           { transform: scale(1);  opacity: 1; }
}

/* Quick chips */
.ss-ai-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px 0;
    background: var(--bs-gray-smoke, #f7f7f7);
}

.ss-ai-chip {
    border: 1px solid var(--bs-primary);
    background: transparent;
    color: var(--bs-primary);
    border-radius: 50rem;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s var(--ui-ease), color .2s var(--ui-ease);
}
.ss-ai-chip:hover { background: var(--bs-primary); color: #fff; }

/* Input */
.ss-ai-input {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    background: var(--bs-gray-smoke, #f7f7f7);
    border-top: 1px solid var(--bs-hr-color, #eee);
}

.ss-ai-input input {
    flex: 1;
    height: 42px;
    border-radius: 50rem;
    border: 1.5px solid var(--bs-border-color, #d2d6de);
    background: var(--bs-input-bg, #fff);
    color: var(--bs-body-color, #333);
    padding: 0 16px;
    outline: none;
    transition: border-color .2s var(--ui-ease), box-shadow .2s var(--ui-ease);
}

.ss-ai-input input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .15);
}

.ss-ai-input button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--bs-primary);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: filter .2s var(--ui-ease), transform .2s var(--ui-ease);
}
.ss-ai-input button:hover:not(:disabled) { filter: brightness(1.05); transform: scale(1.05); }
.ss-ai-input button:disabled { opacity: .6; cursor: not-allowed; }

@media (max-width: 480px) {
    .ss-ai-chat { bottom: 16px; right: 16px; }
    [dir="rtl"] .ss-ai-chat { left: 16px; right: auto; }
    .ss-ai-panel { width: calc(100vw - 32px); height: 70vh; }
}

@media (prefers-reduced-motion: reduce) {
    .ss-ai-launcher::after { animation: none; }
    .ss-ai-dot { animation: none; }
}

/* Inline chips inside a bot bubble + help list */
.ss-ai-inline-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.ss-ai-chip-dyn {
    border: 1px solid var(--bs-primary);
    background: var(--bs-card-bg, #fff);
    color: var(--bs-primary);
    border-radius: 50rem;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s var(--ui-ease), color .2s var(--ui-ease);
}
.ss-ai-chip-dyn:hover { background: var(--bs-primary); color: #fff; }

.ss-ai-help {
    margin: 8px 0 0;
    padding-left: 2px;
    list-style: none;
}
.ss-ai-help li {
    margin: 6px 0;
    line-height: 1.4;
}

.ss-ai-bubble b { font-weight: 700; }

/* Lists rendered inside a chatbot bubble (defaulters, student matches) */
.ss-ai-list {
    margin-top: 10px;
    border-top: 1px solid var(--bs-hr-color, #eee);
    padding-top: 8px;
}

.ss-ai-list-head {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--bs-text-muted, #94a3b8);
    margin-bottom: 6px;
}

.ss-ai-list-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--bs-hr-color, #eee);
    flex-wrap: wrap;
}
.ss-ai-list-row:last-child { border-bottom: none; }

.ss-ai-rank {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ss-ai-list-name {
    font-weight: 600;
    color: var(--bs-primary) !important;
    text-decoration: none;
    flex: 1 1 auto;
    min-width: 90px;
}
.ss-ai-list-name:hover { text-decoration: underline; }

.ss-ai-list-sub {
    font-size: 11px;
    color: var(--bs-text-muted, #94a3b8);
}

.ss-ai-list-amt {
    font-weight: 700;
    font-size: 13px;
    color: #ef4444;
    margin-left: auto;
}

/* Navigation countdown inside chatbot bubble */
.ss-ai-countdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--bs-text-muted, #94a3b8);
}

.ss-ai-count-num {
    color: var(--bs-primary);
    font-weight: 700;
}

.ss-ai-cancel {
    border: 1px solid var(--bs-border-color, #d2d6de);
    background: transparent;
    color: var(--bs-body-color, #333);
    border-radius: 50rem;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s var(--ui-ease), color .2s var(--ui-ease), border-color .2s var(--ui-ease);
}

.ss-ai-cancel:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

/* ============================================================
   Dashboard: This-month vs last-month comparison cards
   ============================================================ */
.ss-cmp-row {
    margin-bottom: 6px;
}

.ss-cmp-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bs-card-bg, #fff);
    border: 1px solid var(--bs-card-border-light-gray, #e6e6e8);
    border-radius: var(--ui-radius, 12px);
    box-shadow: var(--ui-shadow-sm);
    padding: 16px 18px;
    margin-bottom: 16px;
    transition: transform var(--ui-speed) var(--ui-ease), box-shadow var(--ui-speed) var(--ui-ease);
}

.ss-cmp-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ui-shadow-lg);
}

.ss-cmp-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg,
        var(--bs-primary),
        color-mix(in srgb, var(--bs-primary) 60%, #1e1b4b 40%));
}

.ss-cmp-body {
    min-width: 0;
    flex: 1;
}

.ss-cmp-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--bs-text-muted, #94a3b8);
}

.ss-cmp-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--bs-body-color, #333);
    line-height: 1.2;
    margin: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-cmp-trend {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ss-cmp-up   { color: #16a34a; }
.ss-cmp-down { color: #dc2626; }
.ss-cmp-flat { color: var(--bs-text-muted, #94a3b8); }

.ss-cmp-note {
    color: var(--bs-text-muted, #94a3b8);
    font-weight: 400;
    font-size: 11px;
    margin-left: 2px;
}

/* ============================================================
   Dashboard: Top Fee Defaulters widget
   ============================================================ */
.ss-defaulter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.ss-defaulter-box .box-title {
    font-weight: 600;
    margin: 0;
}

.ss-defaulter-total {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ss-dft-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 50rem;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.ss-dft-pill-amt {
    background: rgba(220, 38, 38, .12);
    color: #dc2626;
}
.ss-dft-pill-count {
    background: var(--bs-primary-rgb-custom, rgba(115,103,240,.12));
    color: var(--bs-primary);
}

.ss-defaulter-table {
    margin-bottom: 0;
    width: 100%;
}

.ss-defaulter-table > thead > tr > th {
    border-bottom: 2px solid var(--bs-hr-color, #eee);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--bs-text-muted, #94a3b8);
    padding: 12px 14px;
    white-space: nowrap;
}

.ss-defaulter-table > tbody > tr > td {
    vertical-align: middle;
    padding: 12px 14px;
    border-top: 1px solid var(--bs-hr-color, #f0f0f0);
}

.ss-defaulter-table > tbody > tr:hover {
    background: var(--bs-primary-rgb-custom, rgba(115,103,240,.06));
}

.ss-dft-rank-col   { width: 48px; text-align: center; }
.ss-dft-class-col  { width: 120px; }
.ss-dft-action-col { width: 120px; }

.ss-defaulter-name {
    font-weight: 600;
    color: var(--bs-primary) !important;
    text-decoration: none;
    display: block;
    line-height: 1.3;
}
.ss-defaulter-name:hover { text-decoration: underline; }

.ss-defaulter-adm {
    font-size: 11px;
    color: var(--bs-text-muted, #94a3b8);
}

.ss-dft-class-badge {
    display: inline-block;
    background: var(--bs-primary-rgb-custom, rgba(115,103,240,.12));
    color: var(--bs-primary);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ss-defaulter-amt {
    font-weight: 700;
    color: #dc2626;
    white-space: nowrap;
}

.ss-cmp-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bs-primary-rgb-custom, rgba(115,103,240,.12));
    color: var(--bs-primary);
    font-weight: 700;
    font-size: 12px;
}

.ss-dft-actions {
    display: inline-flex;
    gap: 6px;
    justify-content: center;
}

.ss-btn-wa {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}
.ss-btn-wa:hover, .ss-btn-wa:focus {
    background: #1da851;
    border-color: #1da851;
    color: #fff;
}

/* Responsive: stack into cards on small screens */
@media (max-width: 600px) {
    .ss-defaulter-table > thead { display: none; }
    .ss-defaulter-table, .ss-defaulter-table > tbody,
    .ss-defaulter-table > tbody > tr, .ss-defaulter-table > tbody > tr > td {
        display: block;
        width: 100%;
    }
    .ss-defaulter-table > tbody > tr {
        border: 1px solid var(--bs-card-border-light-gray, #e6e6e8);
        border-radius: var(--ui-radius-sm, 8px);
        margin: 10px;
        padding: 6px;
    }
    .ss-defaulter-table > tbody > tr > td {
        border: none;
        padding: 6px 10px;
        text-align: left !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .ss-defaulter-table > tbody > tr > td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--bs-text-muted, #94a3b8);
        font-size: 12px;
    }
    .ss-dft-rank-col, .ss-dft-class-col, .ss-dft-action-col { width: auto; }
    .ss-dft-actions { justify-content: flex-end; }
}

/* ============================================================
   Fee Defaulters dedicated page
   ============================================================ */
.ss-fd-summary { margin-bottom: 4px; }

.ss-fd-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bs-card-bg, #fff);
    border: 1px solid var(--bs-card-border-light-gray, #e6e6e8);
    border-radius: var(--ui-radius, 12px);
    box-shadow: var(--ui-shadow-sm);
    padding: 18px;
    margin-bottom: 18px;
}

.ss-fd-tile-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    flex-shrink: 0;
}
.ss-fd-tile-red .ss-fd-tile-icon    { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.ss-fd-tile-orange .ss-fd-tile-icon { background: linear-gradient(135deg, #f59e0b, #b45309); }
.ss-fd-tile-blue .ss-fd-tile-icon   { background: linear-gradient(135deg, #6366f1, #4338ca); }

.ss-fd-tile-num {
    font-size: 22px;
    font-weight: 700;
    color: var(--bs-body-color, #333);
    line-height: 1.2;
}
.ss-fd-tile-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--bs-text-muted, #94a3b8);
    font-weight: 600;
}

/* Class-wise grid */
.ss-fd-class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.ss-fd-class-card {
    display: block;
    border: 1px solid var(--bs-card-border-light-gray, #e6e6e8);
    border-radius: var(--ui-radius-sm, 8px);
    padding: 14px;
    text-decoration: none;
    color: var(--bs-body-color, #333);
    background: var(--bs-card-bg, #fff);
    transition: transform var(--ui-speed) var(--ui-ease), box-shadow var(--ui-speed) var(--ui-ease), border-color var(--ui-speed) var(--ui-ease);
}
.ss-fd-class-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ui-shadow-md);
    color: var(--bs-body-color, #333);
    text-decoration: none;
    border-color: var(--bs-primary);
}
.ss-fd-class-card.active {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), .3);
}

.ss-fd-class-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
}
.ss-fd-class-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}
.ss-fd-class-count {
    font-size: 12px;
    color: var(--bs-text-muted, #94a3b8);
}
.ss-fd-class-amt {
    font-weight: 700;
    color: #dc2626;
    font-size: 14px;
}

/* Filter tag */
.ss-fd-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bs-primary-rgb-custom, rgba(115,103,240,.12));
    color: var(--bs-primary);
    border-radius: 50rem;
    padding: 2px 10px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 8px;
}
.ss-fd-clear {
    color: var(--bs-primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
}

.ss-fd-filter-form { margin-bottom: 0; }
.ss-fd-filter-form .form-control { margin-bottom: 6px; }

/* Bulk bar */
.ss-fd-bulkbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bs-gray-smoke, #f7f7f7);
    border-bottom: 1px solid var(--bs-hr-color, #eee);
    flex-wrap: wrap;
}
.ss-fd-selectall {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.ss-fd-table { margin-bottom: 0; width: 100%; }
.ss-fd-table > thead > tr > th {
    border-bottom: 2px solid var(--bs-hr-color, #eee);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--bs-text-muted, #94a3b8);
    padding: 12px 14px;
    white-space: nowrap;
}
.ss-fd-table > tbody > tr > td {
    vertical-align: middle;
    padding: 12px 14px;
    border-top: 1px solid var(--bs-hr-color, #f0f0f0);
}
.ss-fd-table > tbody > tr:hover {
    background: var(--bs-primary-rgb-custom, rgba(115,103,240,.06));
}
.ss-fd-cb-col { width: 42px; text-align: center; }

.ss-fd-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--bs-text-muted, #94a3b8);
}
.ss-fd-empty i { font-size: 42px; color: #16a34a; margin-bottom: 10px; }
.ss-fd-empty p { font-size: 15px; margin: 0; }

/* Responsive: stack table rows into cards */
@media (max-width: 680px) {
    .ss-fd-table > thead { display: none; }
    .ss-fd-table, .ss-fd-table > tbody, .ss-fd-table > tbody > tr, .ss-fd-table > tbody > tr > td {
        display: block; width: 100%;
    }
    .ss-fd-table > tbody > tr {
        border: 1px solid var(--bs-card-border-light-gray, #e6e6e8);
        border-radius: var(--ui-radius-sm, 8px);
        margin: 10px;
        padding: 6px;
    }
    .ss-fd-table > tbody > tr > td {
        border: none;
        padding: 6px 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: right;
    }
    .ss-fd-table > tbody > tr > td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--bs-text-muted, #94a3b8);
        font-size: 12px;
        text-align: left;
    }
    .ss-fd-cb-col { width: auto; }
}

/* Overdue due-date display on Fee Defaulters page */
.ss-fd-duedate {
    font-weight: 600;
    color: var(--bs-body-color, #333);
    white-space: nowrap;
}
.ss-fd-overdue-days {
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
}
.ss-dft-subtitle {
    font-size: 12px;
    color: var(--bs-text-muted, #94a3b8);
    font-weight: 400;
}

/* ============================================================
   Header: blinking Fee Defaulters button
   ============================================================ */
.ss-defaulter-headerbtn .ss-defaulter-blink {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    background: #dc2626;
    border-radius: 8px;
    padding: 6px 12px !important;
    margin: 8px 4px;
    font-weight: 600;
    animation: ssDefaulterBlink 1.3s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(220, 38, 38, .6);
}

.ss-defaulter-headerbtn .ss-defaulter-blink:hover {
    background: #b91c1c;
    color: #fff !important;
}

@keyframes ssDefaulterBlink {
    0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, .55); }
    70%  { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.ss-defaulter-badge {
    background: #fff;
    color: #dc2626;
    border-radius: 50rem;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    margin-left: 6px;
}

/* ============================================================
   Fee breakdown chips (which month / exam / transport fee)
   ============================================================ */
.ss-fd-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.ss-fd-fee-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bs-gray-smoke, #f3f4f6);
    border: 1px solid var(--bs-card-border-light-gray, #e6e6e8);
    border-radius: 50rem;
    padding: 2px 10px;
    font-size: 11px;
    color: var(--bs-body-color, #444);
    white-space: nowrap;
}
.ss-fd-fee-chip b { color: #dc2626; }

.ss-fd-breakdown-sm .ss-fd-fee-chip {
    font-size: 10px;
    padding: 1px 8px;
}

/* ============================================================
   Bulk WhatsApp sender (Fee Defaulters page)
   ============================================================ */
.ss-fd-bulk-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ss-wa-modal-head {
    background: #25d366;
    color: #fff;
    border-top-left-radius: var(--ui-radius, 12px);
    border-top-right-radius: var(--ui-radius, 12px);
}
.ss-wa-modal-head .modal-title { color: #fff; font-weight: 600; }
.ss-wa-modal-head .close { color: #fff; opacity: .9; }

.ss-wa-info {
    background: rgba(37, 211, 102, .1);
    border: 1px solid rgba(37, 211, 102, .3);
    border-radius: var(--ui-radius-sm, 8px);
    padding: 10px 12px;
    font-size: 13px;
    color: var(--bs-body-color, #444);
    margin-bottom: 14px;
}

.ss-wa-progress {
    height: 8px;
    background: var(--bs-progress-bg, #eee);
    border-radius: 50rem;
    overflow: hidden;
}
.ss-wa-progress-bar {
    height: 100%;
    background: #25d366;
    transition: width .3s ease;
}
.ss-wa-count {
    text-align: center;
    font-size: 12px;
    color: var(--bs-text-muted, #94a3b8);
    margin: 6px 0 12px;
    font-weight: 600;
}

.ss-wa-list {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--bs-card-border-light-gray, #e6e6e8);
    border-radius: var(--ui-radius-sm, 8px);
}
.ss-wa-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--bs-hr-color, #f0f0f0);
    font-size: 13px;
}
.ss-wa-item:last-child { border-bottom: none; }
.ss-wa-item small { color: var(--bs-text-muted, #94a3b8); }
.ss-wa-done    { color: #16a34a; }
.ss-wa-done i  { color: #16a34a; }
.ss-wa-current { background: rgba(37, 211, 102, .08); font-weight: 600; }
.ss-wa-current i { color: #25d366; }
.ss-wa-pending i { color: var(--bs-text-muted, #cbd5e1); }

/* Auto-paced WhatsApp: gap selector + countdown */
.ss-wa-gap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.ss-wa-gap label {
    margin: 0;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}
.ss-wa-gap select {
    width: auto;
    min-width: 110px;
}

.ss-wa-timer {
    text-align: center;
    font-size: 13px;
    color: var(--bs-body-color, #444);
    margin-bottom: 12px;
    min-height: 18px;
}
.ss-wa-timer b {
    color: #25d366;
    font-size: 15px;
}

/* Extension status badge + inline gap selector (Fee Defaulters) */
.ss-fd-extbar {
    padding: 8px 16px 0;
}
.ss-ext-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50rem;
    padding: 4px 12px;
}
.ss-ext-on {
    background: rgba(22, 163, 74, .12);
    color: #16a34a;
}
.ss-ext-off {
    background: rgba(245, 158, 11, .12);
    color: #b45309;
}

.ss-fd-gap-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--bs-text-muted, #94a3b8);
}
.ss-fd-gap-inline select {
    width: auto;
    min-width: 90px;
    display: inline-block;
}

/* ============================================================
   Hide Logo on Mobile Devices
   ============================================================ */
@media (max-width: 767px) {
    .main-header .logo {
        display: none !important;
    }
    .main-header .navbar {
        margin-left: 0 !important;
        width: 100% !important;
        float: none !important;
    }
    .fixed .content-wrapper,
    .fixed .right-side {
        padding-top: 50px !important;
    }
    body.hold-transition .main-header .logo {
        display: none !important;
    }
}

