/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f9fafb;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.btn-outline {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    position: relative;
    float:left;
    width:100%;
}
.img-fluid{
    width:100%;
    max-width:100%;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    font-weight:700;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.show-on-mobile{
    display:none;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .show-on-desktop{
        display:none;
    }
    .show-on-mobile{
        display:block;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-form {
    padding: 0 24px 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge {
    background: #dbeafe;
    color: #1e40af;
}

.badge.warning {
    background: #fed7aa;
    color: #c2410c;
}

.badge.success {
    background: #d1fae5;
    color: #059669;
}

.badge.error {
    background: #fee2e2;
    color: #dc2626;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: #f9fafb;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.p-4 { padding: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 16px; }

/* Submenu hidden by default */
.sidebar-menu .has-submenu .submenu {
    display: none;
    position: relative;
    left: 0;
    background: #00114e; /* match sidebar bg */
    padding: 0;
    min-width: 200px;
    z-index: 999;
    list-style-type:none;
}
.sidebar-menu .has-submenu a{
    border-radius:10px 10px 0 0;
}

.sidebar-menu .has-submenu .submenu li {
    padding:0;
}

.btn-danger{
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}
.btn-secondary{
    background: linear-gradient(135deg, #04970b, #049f3f);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
}
.btn-primary{
    background: linear-gradient(135deg, #2600ffff, #6f42c1);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.pagination-container {
    display: flex;
    justify-content: end;
    margin: 20px 0;
}
.p-0{
    padding:0 !important;
}
.p-5{
    padding:20px !important;
} 
#budgetModal #userModalTitle{
    font-size:22px;
    font-weight:900;
    line-height: 30px;
}
#budgetModal #userModalTitle small{
    background: #0e0080;
    color: #fff;
    padding: 0 5px;
}
#budgetModal .modal-header{
    margin-bottom: 0;
}
.pagination {
    display: flex;
    gap: 5px;
    list-style: none;
    padding: 0;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 5px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination li a:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.pagination li.active span {
    background-color: #2600ffff; /* purple */
    color: #fff;
    border-color: #6f42c1;
}

.pagination li.disabled span {
    color: #aaa;
    cursor: not-allowed;
}
#expenseFilters select,
#incomeFilters select {
    padding: 8px;
}

.sidebar-toggle{
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    position: relative;
    top: -13px;
    font-weight: 900;
    color: #0000ba;
    font-size: 23px !important;
}
.sidebar-header .sidebar-toggle{
    background: rgba(255, 255, 255, 0.5) !important;
    line-height: 10px;
    padding: 7px 10px;
    right: -14px;
    top: -27px;
}
.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    margin-top: 0;
}

/* Submenu items */
.sidebar-menu .has-submenu .submenu li a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #fff;
    white-space: nowrap;
    border-radius: 0;
    background:none;
    box-shadow:none;
}
.sidebar-menu .has-submenu .submenu li a:hover {
    background: #2563eb !important;
}

/* Show submenu on hover */
.sidebar-menu .has-submenu.active .submenu {
    display: block;
}

/* Arrow icon rotation on hover */
.sidebar-menu .has-submenu:hover .submenu-arrow {
    transform: rotate(90deg);
}

/* Optional: submenu hover effect */
.sidebar-menu .has-submenu .submenu li a:hover {
    background: #333;
}



/* Responsive */
@media (max-width: 768px) {
    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-form {
        padding: 16px;
    }
    
}