/* ===== Modern Color Scheme ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --info-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

/* ===== Sidebar Styling ===== */
.sidebar {
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
}

.sidebar .nav-link {
    color: #ecf0f1;
    padding: 0.875rem 1.25rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.sidebar .nav-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    color: #fff;
    transform: translateX(4px);
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.2) 0%, transparent 100%);
    border-left: 4px solid #667eea;
    color: #fff;
}

.sidebar .nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidebar .nav-link:hover i {
    transform: scale(1.15);
}

/* ===== Main Content ===== */
main {
    margin-top: 56px;
    background-color: #f8f9fa;
}

/* ===== Card Styling ===== */
.card {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    border: none;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ===== Stats Card Styling ===== */
.stats-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.5s ease;
}

.stats-card:hover::before {
    left: 100%;
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.15);
}

/* ===== Table Styling ===== */
.table th {
    border-top: none;
    font-weight: 700;
    color: #2c3e50;
    background-color: #f8f9fa;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e9ecef;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* ===== Alert Styling ===== */
.alert {
    border: none;
    border-radius: 0.75rem;
    border-left: 4px solid;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}

.alert-success {
    border-left-color: #84fab0;
    background: linear-gradient(90deg, rgba(132, 250, 176, 0.1) 0%, transparent 100%);
}

.alert-danger {
    border-left-color: #fa709a;
    background: linear-gradient(90deg, rgba(250, 112, 154, 0.1) 0%, transparent 100%);
}

.alert-warning {
    border-left-color: #fee140;
    background: linear-gradient(90deg, rgba(254, 225, 64, 0.1) 0%, transparent 100%);
}

.alert-info {
    border-left-color: #667eea;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
}

/* ===== Button Styling ===== */
.btn {
    border-radius: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.btn-danger {
    background: linear-gradient(135deg, #fa709a 0%, #f5576c 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(250, 112, 154, 0.4);
    color: white;
    text-decoration: none;
}

.btn-warning {
    background: linear-gradient(135deg, #ffa751 0%, #ffe259 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(255, 167, 81, 0.4);
    color: white;
    text-decoration: none;
}

.btn-outline-primary {
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* ===== Form Controls ===== */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    padding: 0.625rem 0.875rem;
    font-weight: 500;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control-lg, .form-select-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

/* ===== Badge Styling ===== */
.badge {
    padding: 0.5rem 0.875rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 0.5rem;
}

/* ===== Modal Styling ===== */
.modal-content {
    border-radius: 0.75rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: none;
}

/* ===== Utility Classes ===== */
.min-vh-100 {
    min-height: 100vh;
}

.balance-positive {
    color: #84fab0;
    font-weight: bold;
}

.balance-negative {
    color: #fa709a;
    font-weight: bold;
}

/* ===== Navbar Styling ===== */
.pbm-navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.pbm-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ===== Text Styling ===== */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    font-weight: 700;
}

.text-muted {
    color: #95a5a6 !important;
}

/* ===== Animations ===== */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: slideInDown 0.3s ease;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .sidebar {
        padding-top: 0;
    }
    
    .sidebar .nav-link {
        padding: 0.75rem 1rem;
    }
    
    main {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}