﻿/* ============================================================================
   feeLogix School Fee Management System - Custom Styles
   Professional Accounting Application Design
   Last Updated: May 8, 2026
   ============================================================================ */

/* ------------------------ Base Overrides ------------------------ */
html {
    overflow-x: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}

#layout-wrapper {
    margin: 0;
    padding: 0;
}

.page-wrapper {
    overflow-x: hidden;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ------------------------ Color Variables ------------------------ */
/* Base variables - used as fallback when school_data is not available */
:root {
    /* Static feeLogix brand colors (backward compatibility) */
    --feelogix-primary: #2BB673;
    --feelogix-primary-hover: #249960;
    --feelogix-primary-active: #1f8550;
    --feelogix-primary-light: #e6f9f1;
    --feelogix-secondary: #1C1C1C;
    --feelogix-secondary-hover: #000000;
    --feelogix-background: #F5F5F5;
    --feelogix-accent: #FFC857;
    --feelogix-success: #0D6EFD;
    --feelogix-danger: #DC3545;
    --feelogix-warning: #FFA500;
    --feelogix-info: #0DCAF0;
    --bs-primary: #2BB673;
    --bs-primary-rgb: 43, 182, 115;
}

/* ============================================================================
   IMPORTANT: Theme colors are now applied dynamically in header.php
   This allows each school to have custom branding colors from database.
   The --school-primary, --school-secondary variables override these defaults.
   ============================================================================ */

/* ------------------------ Button Styles ------------------------ */
/* NOTE: Button colors are dynamically applied in header.php and header_login.php */
.btn-primary, .theme-btn, .orange-btn {
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover, .btn-primary:focus, .theme-btn:hover, .orange-btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-primary:active, .btn-primary.active {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
}

.btn-outline-primary {
    background-color: transparent;
    font-weight: 600;
}

.btn-secondary, .btn-cta, .theme-btn-2 {
    font-weight: 600;
}

.btn-secondary:hover, .btn-cta:hover, .theme-btn-2:hover {
    opacity: 0.9;
}

/* Success button - Match primary button styling for consistency */
.btn-success {
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-success:hover, .btn-success:focus {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-success:active, .btn-success.active {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
}

/* Info button - Consistent styling */
.btn-info {
    background-color: #0DCAF0 !important;
    border-color: #0DCAF0 !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-info:hover, .btn-info:focus {
    background-color: #0bb4d1 !important;
    border-color: #0bb4d1 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Warning button - Consistent styling */
.btn-warning {
    background-color: #FFA500 !important;
    border-color: #FFA500 !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-warning:hover, .btn-warning:focus {
    background-color: #e69500 !important;
    border-color: #e69500 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Danger button - Consistent styling */
.btn-danger {
    background-color: #DC3545 !important;
    border-color: #DC3545 !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-danger:hover, .btn-danger:focus {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Outline button variants */
.btn-outline-success {
    color: var(--theme-primary-btn-bg) !important;
    border-color: var(--theme-primary-btn-border) !important;
    background-color: transparent;
    font-weight: 600;
}

.btn-outline-success:hover, .btn-outline-success:focus {
    background-color: var(--theme-primary-btn-bg) !important;
    border-color: var(--theme-primary-btn-border) !important;
    color: var(--theme-primary-btn-text) !important;
}

.btn-outline-info {
    color: #0DCAF0 !important;
    border-color: #0DCAF0 !important;
    background-color: transparent;
    font-weight: 600;
}

.btn-outline-info:hover, .btn-outline-info:focus {
    background-color: #0DCAF0 !important;
    border-color: #0DCAF0 !important;
    color: #ffffff !important;
}

.btn-outline-warning {
    color: #FFA500 !important;
    border-color: #FFA500 !important;
    background-color: transparent;
    font-weight: 600;
}

.btn-outline-warning:hover, .btn-outline-warning:focus {
    background-color: #FFA500 !important;
    border-color: #FFA500 !important;
    color: #ffffff !important;
}

.btn-outline-danger {
    color: #DC3545 !important;
    border-color: #DC3545 !important;
    background-color: transparent;
    font-weight: 600;
}

.btn-outline-danger:hover, .btn-outline-danger:focus {
    background-color: #DC3545 !important;
    border-color: #DC3545 !important;
    color: #ffffff !important;
}

/* ------------------------ Colors & Backgrounds ------------------------ */
.bg-primary, .bg-active-primary-text-white { background-color: #2BB673 !important; }
.text-primary { color: #2BB673 !important; }
.border-primary { border-color: #2BB673 !important; }
a.text-primary:hover { color: #249960 !important; }
.bg-gradient-primary { background: linear-gradient(135deg, #2BB673 0%, #1f8550 100%) !important; }
.section-bg { background-color: #F5F5F5 !important; }
.section-bg-2 { background-color: #1C1C1C !important; }

/* ------------------------ Badge Styles ------------------------ */
.badge.bg-primary, .badge-primary { background-color: #2BB673 !important; color: #ffffff; }
.badge-success, .badge-paid { background-color: #0D6EFD !important; color: #ffffff; }
.badge-danger, .badge-overdue { background-color: #DC3545 !important; color: #ffffff; }
.badge-warning, .badge-pending { background-color: #FFA500 !important; color: #ffffff; }
.badge-info, .badge-partial { background-color: #0DCAF0 !important; color: #000000; }
.badge-role { font-size: 13px; font-weight: 600; padding: 0.5rem 1rem; border-radius: 8px; }

/* ------------------------ Alert Styles ------------------------ */
.alert { border-radius: 0; text-align: center; padding: 12px; border: none; }
.alert-primary { background-color: #e6f9f1 !important; border-left: 4px solid #2BB673; color: #1f8550 !important; }
.alert-success { background-color: #d4edda; color: #155724; }
.alert-error, .alert-danger { background-color: #f8d7da; color: #721c24; }
.alert-warning { background-color: #fff3cd; color: #856404; }
.alert-info { background-color: #d1ecf1; color: #0c5460; }

/* ------------------------ Form Controls ------------------------ */
/* Note: Form focus colors are now applied dynamically in header.php and header_login.php */
.form-control:focus, .form-select:focus {
    border-color: #2BB673;
    box-shadow: 0 0 0 0.25rem rgba(43, 182, 115, 0.25);
}

/* ------------------------ Navigation ------------------------ */
.nav-pills .nav-link { color: var(--school-primary, #2BB673); }
.nav-pills .nav-link:hover { background-color: color-mix(in srgb, var(--school-primary, #2BB673) 10%, transparent); color: color-mix(in srgb, var(--school-primary, #2BB673) 85%, black); }
.nav-pills .nav-link.active { background-color: var(--school-primary, #2BB673) !important; color: #ffffff !important; }
.sidebar .nav-link:hover, .nav-link.active { color: #2BB673 !important; }

/* ------------------------ Pagination ------------------------ */
.pagination .page-link { color: var(--school-primary, #2BB673) !important; }
.pagination .page-link:hover { background-color: color-mix(in srgb, var(--school-primary, #2BB673) 8%, white); color: color-mix(in srgb, var(--school-primary, #2BB673) 85%, black) !important; }
.pagination .page-item.active .page-link {
    background-color: var(--school-primary, #2BB673) !important;
    border-color: var(--school-primary, #2BB673) !important;
    color: #ffffff !important;
}

/* ------------------------ Cards ------------------------ */
.card {
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.card .card-header {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}
.card .card-body:last-child {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}
.card.border-primary { border-color: var(--school-primary, #2BB673) !important; border-width: 2px; }
.card-header.bg-primary { background-color: var(--school-primary, #2BB673) !important; color: #ffffff !important; font-weight: 600; }
.gray-card { background: #F8F9FA; padding: 15px; border-radius: 16px; border: 1px solid #dee2e6; }

/* Card Title Styles */
.card-title-lg {
    font-size: 18px;
    font-weight: 600;
    color: #1C1C1C;
}
.card-title-md {
    font-size: 14px;
    font-weight: 600;
    color: #1C1C1C;
}
.stat-number {
    font-size: 28px;
    font-weight: 700;
}
.dashboard-main-title {
    font-size: 28px;
    font-weight: 700;
    color: #1C1C1C;
}
.section-heading {
    font-size: 18px;
    font-weight: 600;
    color: #1C1C1C;
    margin: 0;
}

/* Icon Wrapper Styles */
.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-box-sm {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-box-xs {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ------------------------ Tables ------------------------ */
.table thead th {
    background-color: #F5F5F5;
    color: #1C1C1C;
    font-weight: 600;
    /* Border color is set dynamically in header.php using --school-primary */
}
.table-striped tbody tr:nth-of-type(odd) { background-color: rgba(43, 182, 115, 0.05); }

/* ------------------------ Dropdown ------------------------ */
.dropdown-item.active, .dropdown-item:active {
    background-color: #2BB673 !important;
    color: #ffffff !important;
}
.dropdown-item:hover { background-color: #e6f9f1; color: #249960; }

/* ------------------------ Progress & Spinners ------------------------ */
.progress-bar, .progress-bar.bg-primary { background-color: var(--school-primary, #2BB673) !important; }
.spinner-border.text-primary { color: var(--school-primary, #2BB673) !important; }

/* ------------------------ List Groups ------------------------ */
.list-group-item-primary { background-color: #e6f9f1 !important; color: #1f8550 !important; }
.list-group-item:hover { background-color: #F5F5F5; }

/* ------------------------ Accordion ------------------------ */
.accordion-button { background-color: #F5F5F5; color: #1C1C1C; }
.accordion-button:not(.collapsed) { background-color: color-mix(in srgb, var(--school-primary, #2BB673) 8%, white); color: var(--school-primary, #2BB673); }
.accordion-button:focus {
    border-color: var(--school-primary, #2BB673);
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--school-primary, #2BB673) 25%, transparent);
}

/* ------------------------ Header Styles ------------------------ */
/* NOTE: Header colors are overridden by header.php with school-specific colors */
.header-2, .header-2.style-3 { 
    background-color: #FFFFFF !important; 
}

/* Header Container Padding */
.header-2.style-3 .container-fluid {
    padding-left: 40px !important;
    padding-right: 40px !important;
}

.header-2.style-3 .header-main .header-left .logo {
    background: transparent !important;
    clip-path: none !important;
    padding: 10px 15px 10px 0px !important;
}
.header-main .main-menu ul li a { 
    color: #1C1C1C !important; 
    transition: color 0.3s ease; 
}
.header-main .main-menu ul li a:hover, .header-main .main-menu ul li a.active {
    color: #FFC857 !important;
}
#header-sticky.sticky {
    background-color: var(--theme-header-bg) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-user-profile {
    background-color: transparent;
    border: none;
    color: var(--theme-header-text);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}
.header-user-profile:hover, .header-user-profile.active {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--theme-header-text);
}
.header-profile-dropdown .dropdown-item {
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
}
.header-profile-dropdown .dropdown-item:hover {
    background-color: #e6f9f1;
    color: #2BB673;
}
.header-profile-dropdown .dropdown-item.text-danger:hover {
    background-color: #ffe6e6;
    color: #DC3545 !important;
}

/* Header Navigation & Dropdown Fixes */
.header-2.style-3 {
    position: relative;
    z-index: 1000;
    padding: 0 !important;
}

.header-2.style-3 .header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 10px 0;
}

.header-2.style-3 .header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-2.style-3 .header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

/* Navigation Menu */
.header-2.style-3 .main-menu ul {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-2.style-3 .main-menu ul li {
    position: relative;
    margin: 0;
}

.header-2.style-3 .main-menu ul li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

/* Dropdown Styling */
.header-2.style-3 .has-dropdown {
    position: relative;
}

.header-2.style-3 .has-dropdown .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    list-style: none;
}

.header-2.style-3 .has-dropdown:hover .submenu,
.header-2.style-3 .has-dropdown.active .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-2.style-3 .submenu li {
    margin: 0;
    padding: 0;
}

.header-2.style-3 .submenu li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #1C1C1C !important;
    font-size: 14px;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.2s ease;
}

.header-2.style-3 .submenu li a:hover {
    background-color: #e6f9f1;
    color: #2BB673 !important;
    padding-left: 1.5rem;
}

.header-2.style-3 .submenu li a.active {
    background-color: #e6f9f1;
    color: #2BB673 !important;
}

.header-2.style-3 .submenu li a i {
    width: 18px;
    text-align: center;
    font-size: 16px;
}

/* Header Right Account Dropdown */
.header-2.style-3 .header-right .has-dropdown > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--theme-header-text) !important;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.header-2.style-3 .header-right .has-dropdown > a:hover,
.header-2.style-3 .header-right .has-dropdown.active > a {
    background-color: rgba(43, 182, 115, 0.1);
}

/* Logout Link Special Styling */
.header-2.style-3 .submenu li a[href*="logout"] {
    color: #DC3545 !important;
    margin-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.header-2.style-3 .submenu li a[href*="logout"]:hover {
    background-color: #ffe6e6;
    color: #DC3545 !important;
}

/* ------------------------ Footer Styles ------------------------ */
.footer-wrapper { 
    background-color: #F5F5F5 !important;
    padding: 0 !important;
    display: block;
    flex-shrink: 0;
}
.footer-widgets-1 { background-color: #ffffff !important; }
.footer-wrapper .widget-head h4 { color: #1C1C1C; font-weight: 600; }
.footer-wrapper .list-area li a { color: #6C757D; transition: all 0.3s ease; }
.footer-wrapper .list-area li a:hover { color: #2BB673; padding-left: 5px; }
.footer-bottom { 
    background-color: #1C1C1C !important; 
    color: #ffffff !important;
    margin-bottom: 0 !important;
    display: block;
}

/* ------------------------ Dashboard Styles ------------------------ */
/* Page Container - Standard background and padding */
.page-container {
    background: #F5F5F5;
    padding: 2rem;
    flex: 1 0 auto;
}

.footer-wrapper {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    clear: both;
}

footer, footer * {
    margin-bottom: 0 !important;
}

.dashboard-container { 
    background: #F5F5F5; 
    min-height: 100vh; 
    padding: 2rem;
}
.dashboard-title { 
    font-size: 32px; 
    font-weight: 700; 
    color: #1C1C1C; 
    letter-spacing: -0.5px; 
}
.dashboard-subtitle {
    color: #6C757D;
    font-size: 14px;
}

/* Row Spacing for Dashboard Sections */
.row.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}
.row.mb-4 {
    margin-bottom: 1.5rem !important;
}
.row.mb-5 {
    margin-bottom: 2rem !important;
}

.stat-card {
    background: #ffffff;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    height: 100%;
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}
.stat-card .card-body { 
    padding: 1.75rem !important; 
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 16px !important;
}

.icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.stat-card:hover .icon-wrapper { transform: scale(1.1); }
.icon-wrapper i { font-size: 32px; }
.icon-wrapper.icon-primary { background: color-mix(in srgb, var(--school-primary, #2BB673) 12%, transparent); }
.icon-wrapper.icon-primary i { color: var(--school-primary, #2BB673); }
.icon-wrapper.icon-success { background: rgba(13, 110, 253, 0.12); }
.icon-wrapper.icon-success i { color: #0D6EFD; }
.icon-wrapper.icon-warning { background: rgba(255, 165, 0, 0.12); }
.icon-wrapper.icon-warning i { color: #FFA500; }
.icon-wrapper.icon-danger { background: rgba(220, 53, 69, 0.12); }
.icon-wrapper.icon-danger i { color: #DC3545; }
.icon-wrapper.icon-info { background: rgba(13, 202, 240, 0.12); }
.icon-wrapper.icon-info i { color: #0DCAF0; }

.kpi-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #6C757D;
    margin-bottom: 0.75rem;
}
.kpi-value { font-size: 40px; font-weight: 700; line-height: 1.1; color: #1C1C1C; }
.kpi-value-sm { font-size: 28px; font-weight: 700; line-height: 1.2; }

.quick-action-card-old {
    background: #ffffff;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-top: 4px solid transparent !important;
}
.quick-action-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

.trend-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}
.trend-indicator.trend-up { background-color: rgba(13, 110, 253, 0.1); color: #0D6EFD; }
.trend-indicator.trend-down { background-color: rgba(220, 53, 69, 0.1); color: #DC3545; }

/* Enhanced Dashboard Components */
.kpi-card {
    transition: all 0.3s ease;
    overflow: hidden;
}
.kpi-card .card-body {
    min-height: 200px !important;
}

/* Brand Color Utilities */
.text-success-custom { color: #2BB673 !important; }
.text-warning-custom { color: #FFA500 !important; }

/* ------------------------ Stat Cards ------------------------ */
.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Icon Wrapper Variants - Gradient Backgrounds */
.icon-wrapper.icon-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.icon-wrapper.icon-gradient-success {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: white;
}
.icon-wrapper.icon-gradient-success-alt {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}
.icon-wrapper.icon-gradient-warning {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #856404;
}
.icon-wrapper.icon-gradient-warning-alt {
    background: linear-gradient(135deg, #fad0c4 0%, #ffd1ff 100%);
    color: #856404;
}
.icon-wrapper.icon-gradient-info {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    color: #004085;
}
.icon-wrapper.icon-gradient-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

/* Icon Wrapper Circle Variant */
.icon-wrapper.icon-circle {
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

/* ------------------------ Timeline Styles ------------------------ */
.timeline-container {
    position: relative;
}
.timeline-item {
    position: relative;
    padding-left: 0;
}
.timeline-icon {
    font-size: 1.25rem;
}

/* Custom Scrollbar for Timeline */
.timeline-container::-webkit-scrollbar {
    width: 8px;
}
.timeline-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.timeline-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
.timeline-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ------------------------ Navigation Tabs ------------------------ */
.nav-tabs .nav-link.active {
    color: #003366 !important;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: 600;
}
.nav-tabs .nav-link {
    color: #6c757d;
    transition: all 0.3s ease;
}
.nav-tabs .nav-link:hover {
    color: #003366;
    border-color: #e9ecef #e9ecef #dee2e6;
}
.nav-tabs .nav-link i {
    transition: transform 0.3s ease;
}
.nav-tabs .nav-link:hover i {
    transform: scale(1.1);
}

/* ------------------------ Button Groups ------------------------ */
/* Fix btn-group with disabled button tooltip wrapper */
.btn-group > span[data-bs-toggle="tooltip"] {
    display: inline-block !important;
    margin-left: -1px;
}
.btn-group > span[data-bs-toggle="tooltip"] > .btn {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    margin-left: 0 !important;
}
.btn-group > .btn:not(:first-child),
.btn-group > a:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}
.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
.btn-group > a:not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* ------------------------ Theme Cards ------------------------ */
.theme-card {
    transition: all 0.3s ease;
    cursor: pointer;
}
.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}
.theme-card.border-primary {
    box-shadow: 0 8px 24px rgba(43, 182, 115, 0.3) !important;
}
.theme-option-card.selected .theme-card {
    border-width: 3px !important;
}
.theme-preview {
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ------------------------ Permission Checkboxes ------------------------ */
.permission-checkbox { 
    width: 18px; 
    height: 18px; 
    cursor: pointer;
    accent-color: #FFC857;
}
.permission-checkbox:checked {
    background-color: #FFC857;
    border-color: #FFC857;
}

/* ------------------------ Page Headers ------------------------ */
.page-header-title {
    font-size: 28px;
    font-weight: 600;
    color: #1C1C1C;
}
.page-header-subtitle {
    font-size: 14px;
    color: #6c757d;
}

/* ------------------------ Code Display ------------------------ */
pre {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
}
code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 90%;
}
.text-primary-custom { color: #0D6EFD !important; }
.text-accent-custom { color: #FFC857 !important; }

/* Progress Circle (Collection Rate) */
.progress-circle-container {
    position: relative;
    display: inline-block;
}
.progress-ring {
    transform: rotate(-90deg);
}
.progress-ring-circle-bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 8;
}
.progress-ring-circle {
    fill: none;
    stroke: #2BB673;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: calc(326.73 - (326.73 * var(--percent)) / 100);
    transition: stroke-dashoffset 1s ease-in-out;
}
.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* Section Card Styling */
.section-card {
    background: #ffffff;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}
.section-card .card-header {
    background: #FFFFFF !important;
    border-bottom: 1px solid #f0f0f0 !important;
    padding: 1.25rem 1.5rem !important;
    color: #1C1C1C !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}
.section-card .card-body {
    padding: 1.5rem !important;
}

.section-card .card-body:last-child {
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
}

.section-card .card-body-table {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    padding-top: 0 !important;
    padding-bottom: 1.5rem !important;
}

.section-card .card-body-table:last-child {
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
}


/* Quick Action Cards with Gradients */
.quick-action-card {
    background: linear-gradient(135deg, #2BB673 0%, #1a8f55 100%);
    padding: 2rem 1.5rem;
    border-radius: 16px;
    color: #ffffff;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.quick-action-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.quick-action-card .action-icon {
    font-size: 48px;
    margin-bottom: 1rem;
    opacity: 0.9;
}
.quick-action-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #ffffff;
}
.quick-action-card p {
    font-size: 14px;
    margin-bottom: 1rem;
    opacity: 0.9;
    color: #ffffff;
}
.quick-action-card .action-count {
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: #ffffff;
}
.icon-wrapper.icon-accent {
    background: rgba(255, 200, 87, 0.12);
}
.icon-wrapper.icon-accent i {
    color: #FFC857;
}

/* Activity Timeline */
.activity-timeline {
    position: relative;
}
.timeline-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 0;
}
.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 40px;
    bottom: -24px;
    width: 2px;
    background: #e0e0e0;
}
.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
}
.timeline-icon i {
    font-size: 18px;
}
.timeline-content {
    flex: 1;
    padding-top: 4px;
}
.bg-success-subtle {
    background-color: rgba(43, 182, 115, 0.1);
}
.text-success {
    color: #2BB673 !important;
}
.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.1);
}
.text-primary {
    color: #0D6EFD !important;
}
.bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.1);
}
.text-info {
    color: #0DCAF0 !important;
}
.bg-warning-subtle {
    background-color: rgba(255, 165, 0, 0.1);
}
.text-warning {
    color: #FFA500 !important;
}
.bg-secondary-subtle {
    background-color: rgba(108, 117, 125, 0.1);
}
.text-secondary {
    color: #6C757D !important;
}
.bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.1);
}
.text-danger {
    color: #DC3545 !important;
}

/* Notification Items */
.notification-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    background: #f8f9fa;
}
.notification-item:hover {
    background: #f0f0f0;
}
.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notification-icon i {
    font-size: 20px;
}
.notification-icon.success {
    background: rgba(43, 182, 115, 0.1);
    color: #2BB673;
}
.notification-icon.danger {
    background: rgba(220, 53, 69, 0.1);
    color: #DC3545;
}
.notification-icon.warning {
    background: rgba(255, 165, 0, 0.1);
    color: #FFA500;
}
.notification-icon.info {
    background: rgba(13, 202, 240, 0.1);
    color: #0DCAF0;
}
.notification-content {
    flex: 1;
}
.notification-dismiss {
    border: none;
    background: transparent;
    color: #6C757D;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.notification-dismiss:hover {
    background: #e0e0e0;
    color: #1C1C1C;
}

/* Calendar Widget */
.mini-calendar {
    padding: 0.5rem;
}
.calendar-grid {
    margin-top: 1rem;
}
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}
.calendar-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #6C757D;
    text-transform: uppercase;
    padding: 0.5rem 0;
}
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}
.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.calendar-day:hover {
    background: #e6f9f1;
    transform: scale(1.05);
}
.calendar-day.today {
    background: #2BB673;
    color: #ffffff;
    font-weight: 700;
}
.calendar-day .day-number {
    font-size: 13px;
    font-weight: 500;
}
.calendar-day .payment-indicator {
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
}
.calendar-day .payment-indicator.success {
    background: #2BB673;
}
.calendar-day .payment-indicator.warning {
    background: #FFA500;
}
.calendar-legend {
    padding-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
}
.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

/* Student Items & Avatars */
.student-item {
    transition: all 0.2s ease;
}
.student-item:hover {
    transform: translateX(4px);
}
.student-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2BB673 0%, #1a8f55 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* Payment Items */
.payment-item {
    transition: all 0.2s ease;
}
.payment-item:hover {
    background: #f8f9fa;
    border-radius: 8px;
}
.payment-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.payment-icon i {
    font-size: 24px;
}

/* Stat Link */
.stat-link {
    color: #2BB673;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.stat-link:hover {
    color: #249960;
    gap: 0.5rem;
}
.stat-link i {
    transition: transform 0.2s ease;
}
.stat-link:hover i {
    transform: translateX(4px);
}

/* ------------------------ Schools Management Page ------------------------ */
/* Schools KPI Cards */
.schools-page-kpi-card {
    background: #ffffff;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.schools-page-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.schools-page-kpi-card .card-body {
    padding: 1.5rem !important;
}

/* Large KPI Value for Schools Page */
.kpi-value-large {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
    color: #1C1C1C;
    margin-bottom: 0.25rem;
}

/* Page Header Styles */
.page-header-title {
    font-size: 32px;
    font-weight: 700;
    color: #1C1C1C;
    margin-bottom: 0.5rem;
}

.page-header-subtitle {
    font-size: 14px;
    color: #6C757D;
}

/* Theme Color Preview Badge */
.theme-badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    vertical-align: middle;
}

/* Color Preview (Create Form) */
.color-preview {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    vertical-align: middle;
    cursor: pointer;
}

.color-preview + code {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #495057;
    border: 1px solid #dee2e6;
}

/* Color Preview Large (View Page) */
.color-preview-large {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 3px solid #dee2e6;
    display: inline-block;
    margin: 0 10px;
}

/* Logo Preview (View Page) */
.logo-preview {
    max-width: 200px;
    max-height: 100px;
    object-fit: contain;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

/* Schools View Page - Compressed Styles */
.slug-badge {
    background: #f8d7da;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
}

.status-badge-lg {
    padding: 6px 12px;
    font-size: 13px;
}

.status-badge-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: #1C1C1C;
}

.kpi-text {
    font-size: 14px;
}

.section-header {
    padding: 1.25rem 1.5rem;
    color: var(--theme-primary-btn-bg);
    font-size: 15px;
}

.section-header h6 {
    color: inherit;
}

.section-body {
    padding: 1.5rem;
}

.action-btn {
    min-width: 180px;
    height: 38px;
    text-align: center;
}

/* ============================================================================
   Profile Navigation Buttons
   ============================================================================ */

/* Profile page navigation buttons */
.btn-profile-nav {
    background-color: white;
    border: 1px solid #dee2e6;
    color: #405189 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 400;
    transition: all 0.2s ease-in-out;
}

.btn-profile-nav:hover {
    background-color: #f8f9fa;
    border-color: #405189;
    color: #405189 !important;
    box-shadow: 0 2px 4px rgba(64, 81, 137, 0.1);
}

.btn-profile-nav:focus,
.btn-profile-nav:active {
    background-color: white;
    border-color: #405189;
    color: #405189 !important;
    box-shadow: 0 0 0 0.2rem rgba(64, 81, 137, 0.1);
}

/* Ensure icon and text are vertically centered */
.btn-profile-nav i {
    vertical-align: middle;
    line-height: 1;
}

.btn-centered {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-table th {
    width: 40%;
    color: #6C757D;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 0;
}

.info-table td {
    color: #1C1C1C;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 0;
}

.section-label {
    font-size: 13px;
    font-weight: 500;
}

.theme-badge {
    background: #6C757D;
    font-size: 13px;
    padding: 8px 14px;
    font-weight: 500;
}

.color-label {
    font-size: 12px;
}

.color-value {
    color: #1C1C1C;
    font-weight: 600;
    font-size: 12px;
}

/* Stat Card with Gradient (Schools View Page Only) */
.schools-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    text-align: center;
}

.schools-stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* ------------------------ DataTables ------------------------ */
/* Minimal overrides - let Bootstrap handle the rest */

/* ------------------------ Select2 ------------------------ */
.select2-container { width: 100% !important; }
.select2-container--bootstrap-5 .select2-selection {
    min-height: calc(1.5em + 0.75rem + 2px);
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #2BB673 !important;
    color: #ffffff !important;
}
.select2-dropdown {
    border-color: #2BB673;
    border-radius: 0.375rem;
    z-index: 1050 !important;
}

/* ------------------------ Modals & Toasts ------------------------ */
.modal-header { background-color: var(--school-primary, #2BB673); color: #ffffff; }
.modal-header .modal-title { color: #ffffff !important; }
.modal-header .btn-close { filter: brightness(0) invert(1); }
.toast-header { background-color: var(--school-primary, #2BB673); color: #ffffff; }
.toast-success { border-left: 4px solid #0D6EFD; }
.toast-error { border-left: 4px solid #DC3545; }
.toast-warning { border-left: 4px solid #FFA500; }

/* ------------------------ Loading States ------------------------ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(245, 245, 245, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.loading-spinner {
    border: 4px solid #F5F5F5;
    border-top: 4px solid #2BB673;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ------------------------ Scrollbar ------------------------ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #F5F5F5; }
::-webkit-scrollbar-thumb { 
    background: var(--school-primary, #2BB673); 
    border-radius: 4px; 
}
::-webkit-scrollbar-thumb:hover { 
    background: color-mix(in srgb, var(--school-primary, #2BB673) 85%, black);
}

/* ------------------------ Responsive Adjustments ------------------------ */
@media (max-width: 992px) {
    .dashboard-container { padding: 1.5rem; }
    .dashboard-title { font-size: 28px; }
    .kpi-value { font-size: 32px; }
    .icon-wrapper { width: 56px; height: 56px; }
    .icon-wrapper i { font-size: 28px; }
}

@media (max-width: 768px) {
    .dashboard-container { padding: 1rem; }
    .dashboard-title { font-size: 24px; }
    .kpi-value { font-size: 28px; }
    .kpi-value-sm { font-size: 22px; }
    .stat-card .card-body { padding: 1.25rem !important; }
    .icon-wrapper { width: 48px; height: 48px; }
    .icon-wrapper i { font-size: 24px; }
    .card { margin-bottom: 1rem; }
}

@media print {
    .btn, .sidebar, .header-main { display: none; }
    .card { box-shadow: none; border: 1px solid #dee2e6; }
}
