/* Primary Theme Colors */
:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --sidebar-dark-bg: var(--primary-color);
    --sidebar-dark-text: #ffffff;
    --topbar-light-bg: #ffffff;
    --body-bg: #f8f9fc;
}

/* Layout */
body {
    background-color: var(--body-bg);
}

/* Sidebar */
.sidebar {
    width: 250px;
    min-height: 100vh;
    background-color: var(--primary-color);
    padding-top: 1rem;
    transition: all 0.3s ease-in-out;
    position: fixed;
    height: 100%;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-brand {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #ffffff;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.sidebar-brand img {
    height: 35px;
    width: auto;
    margin-bottom: 0.5rem;
}

.sidebar-nav {
    padding: 0;
    list-style: none;
    margin-top: 1rem;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    color: rgba(255,255,255,0.95);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    text-decoration: none !important;
}

.nav-link span {
    color: rgba(255,255,255,0.95) !important;
}

.nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.08);
}

.nav-link i {
    width: 1.5rem;
    text-align: center;
    margin-right: 0.75rem;
    font-size: 1rem;
}

.nav-link.active {
    color: #fff;
    background-color: rgba(0,0,0,0.12);
    border-left: 3px solid rgba(255,255,255,0.18);
    padding-left: calc(1rem - 3px);
}

/* Sidebar Collapse State */
.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .sidebar-brand span {
    display: none;
}

/* Content Area */
#content-wrapper {
    flex: 1;
    margin-left: 250px;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 110px; /* Account for fixed topbar */
}

.content-wrapper.expanded {
    margin-left: 70px;
}

/* Topbar */
.topbar {
    background-color: var(--topbar-light-bg);
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    z-index: 1030;
    height: 70px;
    transition: none;
}

.content-wrapper.expanded .topbar {
    left: 70px;
}
}

.topbar .dropdown-toggle {
    color: var(--dark-color) !important;
    text-decoration: none !important;
}

.topbar .dropdown-toggle:hover {
    color: var(--primary-color) !important;
}

.topbar .dropdown-menu {
    z-index: 9999;
    position: absolute;
}

.topbar .dropdown {
    position: relative;
    margin-left: auto;
    margin-right: 16rem;
}

.topbar .topbar-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.toggle-sidebar {
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Dashboard Cards */
.dashboard-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    transition: transform 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-3px);
}

.dashboard-card.income {
    background: linear-gradient(135deg, #1cc88a, #169c6a);
    color: white;
}

.dashboard-card.expense {
    background: linear-gradient(135deg, #e74a3b, #c23b2e);
    color: white;
}

.dashboard-card.balance {
    background: linear-gradient(135deg, #4e73df, #3756a8);
    color: white;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-top: none;
    background-color: var(--light-color);
    font-weight: 600;
}

.text-currency {
    font-family: monospace;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar .nav-link span {
        display: none;
    }

    .sidebar .sidebar-brand span {
        display: none;
    }

    #content-wrapper {
        margin-left: 70px;
    }

    .topbar {
        left: calc(70px + 1.5rem);
    }
}
}

/* Transitions */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s;
}

.fade-enter, .fade-leave-to {
    opacity: 0;
}

/* Custom Card Styles */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 1.25rem;
}

.card-header h5 {
    margin: 0;
    color: var(--dark-color);
}

/* Quick Actions */
.quick-actions .btn {
    padding: 0.75rem;
    font-weight: 500;
    border-radius: 0.5rem;
}

/* Badges */
.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown .dropdown-menu {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}