/* Notification Styles */
.notification-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.notification-item:hover {
    background-color: rgba(0,0,0,0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.notification-item.unread {
    background-color: rgba(13, 110, 253, 0.1);
    border-right: 3px solid var(--bs-primary);
}

.notification-item.unread:hover {
    background-color: rgba(13, 110, 253, 0.15);
}

.notification-text {
    font-size: 0.9rem;
    color: var(--bs-body-color);
    margin-right: 0.5rem;
}

.notifications-count {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    transition: transform 0.3s ease;
}

.notifications-count.has-notifications {
    animation: pulse 1.5s infinite;
}

.notifications-menu {
    min-width: 320px;
    max-width: 400px;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.mark-all-read {
    color: var(--bs-primary);
    font-size: 0.9rem;
    padding: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
    border-top: 1px solid rgba(0,0,0,0.1);
    font-weight: 500;
}

.mark-all-read:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--bs-primary);
    text-decoration: none;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}

.notifications-list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* Notification Icons */
.notification-icon {
    font-size: 1.1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 0.75rem;
}

/* Animation Keyframes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Dark mode adjustments */
[data-theme='dark'] .notification-item {
    border-bottom-color: rgba(255,255,255,0.1);
}

[data-theme='dark'] .mark-all-read {
    border-top-color: rgba(255,255,255,0.1);
}

[data-theme='dark'] .notifications-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

[data-theme='dark'] .notifications-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
}

[data-theme='dark'] .notification-item:hover {
    background-color: rgba(255,255,255,0.05);
}

[data-theme='dark'] .notification-item.unread {
    background-color: rgba(13, 110, 253, 0.2);
}

[data-theme='dark'] .notification-item.unread:hover {
    background-color: rgba(13, 110, 253, 0.25);
}

[data-theme='dark'] .notification-text {
    color: var(--bs-light);
}

[data-theme='dark'] .mark-all-read:hover {
    background-color: rgba(255,255,255,0.1);
}

/* General Styles */
[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

/* Dark Mode */
:root[data-theme="dark"] {
    --bs-body-bg: #212529;
    --bs-body-color: #f8f9fa;
    --bs-card-bg: #343a40;
    --bs-card-border-color: #495057;
    --bs-primary: #0d6efd;
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
    --bs-link-color: #0d6efd;
    --bs-link-hover-color: #0a58ca;
}

:root[data-theme="dark"] .card {
    background-color: var(--bs-card-bg);
    border-color: var(--bs-card-border-color);
}

:root[data-theme="dark"] .table {
    color: var(--bs-body-color);
}

:root[data-theme="dark"] .dropdown-menu {
    background-color: var(--bs-card-bg);
    border-color: var(--bs-card-border-color);
}

:root[data-theme="dark"] .dropdown-item {
    color: var(--bs-body-color);
}

:root[data-theme="dark"] .dropdown-item:hover {
    background-color: #495057;
    color: var(--bs-body-color);
}

:root[data-theme="dark"] .dropdown-divider {
    border-color: var(--bs-card-border-color);
}

/* Room Status Banner Styles */
.room-status-banner {
    width: 100%;
    padding: 1rem;
    text-align: center;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.room-status-text {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.room-status-text i {
    font-size: 2rem;
}

.room-status-text.maintenance {
    background-color: #dc3545;
    color: white;
}

.room-status-text.cleaning {
    background-color: #ffc107;
    color: black;
}

.room-status-text.occupied {
    background-color: #dc3545;
    color: white;
    font-size: 1.75rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Occupied Room Info Styles */
.occupied-room-info {
    background-color: rgba(255, 193, 7, 0.15);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.occupied-room-info h6 {
    color: #000;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid rgba(255, 193, 7, 0.3);
    padding-bottom: 8px;
}

.occupied-room-info h6 i {
    color: #ffc107;
    margin-left: 8px;
    font-size: 1.2rem;
}

.occupied-room-info .guest-details {
    padding: 0 10px;
}

.occupied-room-info .guest-details p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.occupied-room-info .guest-details strong {
    color: #000;
    font-weight: 600;
    margin-left: 5px;
}

[data-theme="dark"] .occupied-room-info {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
}

[data-theme="dark"] .occupied-room-info h6,
[data-theme="dark"] .occupied-room-info .guest-details strong,
[data-theme="dark"] .occupied-room-info .guest-details p {
    color: #fff;
}

/* Room Cards with Status */
.card.room-available {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border: none;
    border-right: 5px solid #1e7e34;
}

.card.room-cleaning {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
    border-right: 5px solid #117a8b;
}

.card.room-maintenance {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-right: 5px solid #bd2130;
}

.card.room-occupied {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: black;
    border: 2px solid #ffc107;
    border-right: 8px solid #ffc107;
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
    animation: occupied-pulse 2s infinite;
    transform-origin: center;
}

.occupied-room-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.occupied-room-header i {
    font-size: 1.5rem;
    color: #dc3545;
    animation: blink 1s infinite;
}

.occupied-room-header .card-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
    color: black;
    text-shadow: none;
}

@keyframes occupied-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1060;
    max-width: 450px;
    width: 100%;
    pointer-events: none;
}

.custom-toast {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    text-align: center;
    border: none;
    font-size: 1.2rem;
    font-weight: 600;
}

.custom-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.custom-toast.success {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: successPulse 2s infinite;
}

.custom-toast.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .custom-toast {
    background: #343a40;
}

[data-theme="dark"] .custom-toast.success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .custom-toast.error {
    background: linear-gradient(135deg, #dc3545, #bd2130);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Expense Category Badge Colors */
.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-salary {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.category-maintenance {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc02;
}

.category-utilities {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.category-supplies {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.category-marketing {
    background-color: #fce4ec;
    color: #c2185b;
    border: 1px solid #f8bbd9;
}

.category-external {
    background-color: #e0f2f1;
    color: #00695c;
    border: 1px solid #80cbc4;
}

.category-charity {
    background-color: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffecb3;
}

.category-loan {
    background-color: #f1f8e9;
    color: #558b2f;
    border: 1px solid #c5e1a5;
}

.category-other {
    background-color: #f5f5f5;
    color: #424242;
    border: 1px solid #e0e0e0;
}

/* Dark mode adjustments for category badges */
[data-theme="dark"] .category-salary {
    background-color: rgba(21, 101, 192, 0.2);
    color: #64b5f6;
    border-color: rgba(187, 222, 251, 0.3);
}

[data-theme="dark"] .category-maintenance {
    background-color: rgba(239, 108, 0, 0.2);
    color: #ffb74d;
    border-color: rgba(255, 204, 2, 0.3);
}

[data-theme="dark"] .category-utilities {
    background-color: rgba(123, 31, 162, 0.2);
    color: #ba68c8;
    border-color: rgba(206, 147, 216, 0.3);
}

[data-theme="dark"] .category-supplies {
    background-color: rgba(46, 125, 50, 0.2);
    color: #81c784;
    border-color: rgba(165, 214, 167, 0.3);
}

[data-theme="dark"] .category-marketing {
    background-color: rgba(194, 24, 91, 0.2);
    color: #f06292;
    border-color: rgba(248, 187, 217, 0.3);
}

[data-theme="dark"] .category-external {
    background-color: rgba(0, 105, 92, 0.2);
    color: #4db6ac;
    border-color: rgba(128, 203, 196, 0.3);
}

[data-theme="dark"] .category-charity {
    background-color: rgba(245, 127, 23, 0.2);
    color: #ffcc02;
    border-color: rgba(255, 236, 179, 0.3);
}

[data-theme="dark"] .category-loan {
    background-color: rgba(85, 139, 47, 0.2);
    color: #aed581;
    border-color: rgba(197, 225, 165, 0.3);
}

[data-theme="dark"] .category-other {
    background-color: rgba(66, 66, 66, 0.2);
    color: #bdbdbd;
    border-color: rgba(224, 224, 224, 0.3);
}

/* Quick Filter Buttons Styles */
.quick-filters-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 123, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.quick-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.quick-filter-btn {
    border-radius: 22px !important;
    padding: 0.6rem 1.2rem !important;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent !important;
    background: white !important;
    color: #6c757d !important;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
}

.quick-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
    border-color: #007bff !important;
    color: #007bff !important;
    background: rgba(0, 123, 255, 0.05) !important;
}

.quick-filter-btn.active {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    color: white !important;
    border-color: #007bff !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transform: translateY(-1px);
}

.quick-filter-btn.active:hover {
    background: linear-gradient(135deg, #0056b3, #004085) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.quick-filter-btn i {
    transition: transform 0.3s ease;
}

.quick-filter-btn:hover i {
    transform: scale(1.1);
}

.quick-filter-btn.active i {
    animation: pulse 2s infinite;
}

/* Filter Header Styles */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 8px;
    border-bottom: 1px solid rgba(0, 123, 255, 0.1);
}

.filter-header h6 {
    color: #495057;
    font-weight: 600;
}

.filter-header button {
    color: #007bff !important;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.filter-header button:hover {
    transform: scale(1.1);
}

/* Enhanced Search Button */
.btn-search {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-search:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

/* Dark mode adjustments */
[data-theme="dark"] .quick-filters-section {
    background: linear-gradient(135deg, #343a40, #495057);
    border-color: rgba(0, 123, 255, 0.2);
}

[data-theme="dark"] .quick-filter-btn {
    background: #495057 !important;
    color: #e9ecef !important;
    border-color: #6c757d !important;
}

[data-theme="dark"] .quick-filter-btn:hover {
    background: rgba(0, 123, 255, 0.1) !important;
    border-color: #007bff !important;
    color: #007bff !important;
}

[data-theme="dark"] .filter-header {
    background: linear-gradient(135deg, #495057, #6c757d);
}

[data-theme="dark"] .filter-header h6 {
    color: #e9ecef;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .quick-filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quick-filter-btn {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
        padding: 0.7rem 1.2rem !important;
        font-size: 0.9rem;
        border-radius: 20px !important;
    }
    
    .quick-filters-section {
        padding: 1rem;
    }
}

/* Animation for filter buttons */
@keyframes filterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.quick-filter-btn.active {
    animation: filterPulse 2s infinite;
}

/* Expense Categories Cards Styles */
.expense-categories-section {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 0;
    border: 1px solid rgba(0, 123, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.expense-categories-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.section-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 2rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.section-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

.header-content {
    display: flex;
    align-items: center;
    z-index: 2;
    position: relative;
}

.header-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    animation: pulse 3s infinite;
}

.header-icon i {
    font-size: 2rem;
    color: white;
}

.header-text h4 {
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

.header-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
}

.header-stats {
    z-index: 2;
    position: relative;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-width: 100px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    padding: 2rem;
}

.category-card {
    background: white;
    border-radius: 14px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 123, 255, 0.3);
}

.card-header {
    padding: 1.2rem 1.2rem 0.8rem;
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
    gap: 0.8rem;
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.category-icon i {
    font-size: 1.3rem;
    color: white;
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-name {
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.category-count {
    font-size: 0.75rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    display: inline-block;
}

.card-body {
    padding: 0 1.2rem 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.amount-display {
    display: flex;
    align-items: baseline;
    margin-bottom: 1rem;
    gap: 0.4rem;
}

.amount-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #2c3e50;
    line-height: 1;
}

.amount-currency {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
}

.percentage-display {
    margin-bottom: 0.8rem;
}

.percentage-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    position: relative;
}

.percentage-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1.5s ease;
    position: relative;
}

.percentage-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

.percentage-text {
    font-size: 1rem;
    font-weight: 700;
    color: #495057;
    text-align: center;
}

.card-footer {
    padding: 0.8rem 1.2rem 1.2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    animation: pulse 2s infinite;
}

/* Category-specific colors */
.category-card.category-salary .category-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.category-card.category-salary .percentage-fill {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.category-card.category-maintenance .category-icon {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.category-card.category-maintenance .percentage-fill {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.category-card.category-utilities .category-icon {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.category-card.category-utilities .percentage-fill {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.category-card.category-supplies .category-icon {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.category-card.category-supplies .percentage-fill {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.category-card.category-marketing .category-icon {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.category-card.category-marketing .percentage-fill {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.category-card.category-external .category-icon {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
}

.category-card.category-external .percentage-fill {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
}

.category-card.category-charity .category-icon {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
}

.category-card.category-charity .percentage-fill {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
}

.category-card.category-loan .category-icon {
    background: linear-gradient(135deg, #a18cd1, #fbc2eb);
}

.category-card.category-loan .percentage-fill {
    background: linear-gradient(135deg, #a18cd1, #fbc2eb);
}

.category-card.category-other .category-icon {
    background: linear-gradient(135deg, #d299c2, #fef9d7);
}

.category-card.category-other .percentage-fill {
    background: linear-gradient(135deg, #d299c2, #fef9d7);
}

/* Dark mode adjustments */
[data-theme="dark"] .expense-categories-section {
    background: linear-gradient(135deg, #343a40, #495057);
    border-color: rgba(0, 123, 255, 0.2);
}

[data-theme="dark"] .category-card {
    background: #495057;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .category-card:hover {
    border-color: rgba(0, 123, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .category-name {
    color: #e9ecef;
}

[data-theme="dark"] .category-count {
    background: #6c757d;
    color: #e9ecef;
}

[data-theme="dark"] .amount-value {
    color: #e9ecef;
}

[data-theme="dark"] .amount-currency {
    color: #adb5bd;
}

[data-theme="dark"] .percentage-text {
    color: #e9ecef;
}

[data-theme="dark"] .percentage-bar {
    background: #6c757d;
}

[data-theme="dark"] .card-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .progress-indicator {
    color: #adb5bd;
}

/* Enhanced horizontal layout */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    max-width: 100%;
}

/* Force horizontal layout on larger screens */
@media (min-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.2rem;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.1rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .amount-display {
        justify-content: center;
    }
    
    .card-header {
        padding: 1rem;
        gap: 0.6rem;
    }
    
    .category-icon {
        width: 45px;
        height: 45px;
    }
    
    .category-icon i {
        font-size: 1.1rem;
    }
    
    .category-name {
        font-size: 0.9rem;
        line-height: 1.1;
    }
    
    .category-count {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Animation for shimmer effect */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Animation for floating effect */
@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* Total Expenses Card Styles */
.total-expenses-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    padding: 0;
    border: 1px solid rgba(220, 53, 69, 0.1);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.total-expenses-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.15);
}

.total-header {
    background: linear-gradient(135deg, #dc3545, #c82333);
    padding: 1rem;
    color: white;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.total-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.total-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.8rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 2;
    position: relative;
}

.total-icon i {
    font-size: 1.3rem;
    color: white;
}

.total-info {
    z-index: 2;
    position: relative;
}

.total-title {
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.total-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    margin: 0;
}

.total-amount {
    padding: 1rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.amount-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #dc3545;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.amount-currency {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
}

.total-footer {
    padding: 0.7rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(248, 249, 250, 0.5);
}

.expense-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.count-icon {
    width: 18px;
    height: 18px;
    background: #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.count-icon i {
    font-size: 0.6rem;
    color: white;
}

.count-text {
    font-weight: 600;
}

/* Dark mode adjustments for total card */
[data-theme="dark"] .total-expenses-card {
    background: linear-gradient(135deg, #343a40, #495057);
    border-color: rgba(220, 53, 69, 0.2);
}

[data-theme="dark"] .total-expenses-card:hover {
    box-shadow: 0 12px 32px rgba(220, 53, 69, 0.25);
}

[data-theme="dark"] .amount-value {
    color: #ff6b7a;
}

[data-theme="dark"] .amount-currency {
    color: #adb5bd;
}

[data-theme="dark"] .total-footer {
    background: rgba(73, 80, 87, 0.5);
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .expense-count {
    color: #adb5bd;
}

/* Responsive adjustments for total card */
@media (max-width: 768px) {
    .total-header {
        padding: 0.8rem;
    }
    
    .total-icon {
        width: 35px;
        height: 35px;
        margin-right: 0.6rem;
    }
    
    .total-icon i {
        font-size: 1rem;
    }
    
    .total-title {
        font-size: 0.85rem;
    }
    
    .total-subtitle {
        font-size: 0.7rem;
    }
    
    .total-amount {
        padding: 0.8rem;
    }
    
    .amount-value {
        font-size: 1.5rem;
    }
    
    .amount-currency {
        font-size: 0.8rem;
    }
    
    .total-footer {
        padding: 0.5rem 0.8rem;
    }
    
    .expense-count {
        font-size: 0.7rem;
        gap: 0.3rem;
    }
    
    .count-icon {
        width: 16px;
        height: 16px;
    }
    
    .count-icon i {
        font-size: 0.5rem;
    }
}