:root {
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 72px;
    --top-bar-height: 60px;
    --primary-color: #1b5885;
    --secondary-color: #f7f7f7;
    --text-color: #333;
    --border-color: #e0e0e0;
    --dark-blue: #1e2935;
    --dark-blue-hover: #2a3847;
    --menu-text: rgba(255, 255, 255, 0.8);
}

.app-theme1 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--text-color);
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--dark-blue);
    color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    height: 32px;
    width: auto;
}

.sidebar-menu {
    padding: 1rem 0;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--menu-text);
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 16px;
}

.menu-item span {
    font-size: 20px;
    margin-left: 0.5rem;
}

.menu-item i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 18px;
}

.menu-item:hover {
    background-color: var(--dark-blue-hover);
    color: white;
}

.menu-item.active {
    background-color: var(--dark-blue-hover);
    color: white;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    width: calc(100vw - var(--sidebar-width));
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow-y: auto;
    width: 100%;
}

.content-area h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1A202C;
    margin-bottom: 1.5rem;
}

.content-area h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2D3748;
    margin-bottom: 1.25rem;
}

.content-area h3 {
    font-size: 20px;
    font-weight: 600;
    color: #4A5568;
    margin-bottom: 1rem;
}

/* Table Typography */
.table {
    font-size: 16px;
    color: #4A5568;
}

.table th {
    font-weight: 600;
    color: #2D3748;
    background-color: #F7FAFC;
}

/* Tab Typography */
.nav-tabs .nav-link {
    font-size: 16px;
    font-weight: 500;
    color: #718096;
}

.nav-tabs .nav-link.active {
    font-weight: 600;
    color: #2D3748;
}

/* Form Labels and Inputs */
.form-label {
    font-size: 16px;
    font-weight: 500;
    color: #4A5568;
}

.form-control {
    font-size: 16px;
    color: #2D3748;
}

/* Button Typography */
.btn {
    font-size: 16px;
    font-weight: 500;
}

/* Alert Messages */
.alert {
    font-size: 16px;
    font-weight: 500;
}

/* Pagination Typography */
.pagination {
    font-size: 16px;
    font-weight: 500;
}

.page-link {
    color: #4A5568;
}

.page-item.active .page-link {
    font-weight: 600;
}

/* Button Styles with Morandi Colors */
.btn-primary {
    background-color: #B8C5D1;
    border-color: #B8C5D1;
    color: #2C3E50;
}

.btn-primary:hover {
    background-color: #A5B4C2;
    border-color: #A5B4C2;
    color: #2C3E50;
}

.btn-secondary {
    background-color: #E6D5C1;
    border-color: #E6D5C1;
    color: #2C3E50;
}

.btn-secondary:hover {
    background-color: #D9C4B0;
    border-color: #D9C4B0;
    color: #2C3E50;
}

.btn-success {
    background-color: #B8C5B9;
    border-color: #B8C5B9;
    color: #2C3E50;
}

.btn-success:hover {
    background-color: #A5B4A6;
    border-color: #A5B4A6;
    color: #2C3E50;
}

.btn-danger {
    background-color: #E6BCBC;
    border-color: #E6BCBC;
    color: #2C3E50;
}

.btn-danger:hover {
    background-color: #D9ABAB;
    border-color: #D9ABAB;
    color: #2C3E50;
}

/* Top Bar Typography */
.breadcrumb {
    font-size: 20px;
    color: var(--morandi-gray);
}

.breadcrumb span:last-child {
    color: var(--text-color);
    font-weight: 500;
    font-size: 16px;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-greeting {
    font-size: 16px;
    color: var(--morandi-gray);
}

/* Logout button in top bar */
.btn-outline-primary.btn-sm {
    font-size: 14px;
    padding: 0.375rem 0.75rem;
}

/* Custom Top Bar Styles */
.custom-breadcrumb {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-breadcrumb span {
    font-size: 20px;
}

.custom-user-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.custom-greeting {
    font-size: 20px;
    color: var(--text-color);
}

/* User Avatar Dropdown Styles */
.user-avatar-dropdown {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #B8C5D1;
    color: #2C3E50;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.user-avatar:hover {
    background-color: #A5B4C2;
}

.dropdown-menu {
    padding: 0.5rem 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 240px;
}

.dropdown-user-info {
    padding: 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.user-full-name {
    display: block;
    font-weight: 500;
    font-size: 16px;
    color: #2D3748;
}

.user-email {
    display: block;
    font-size: 14px;
    color: #718096;
    margin-top: 0.25rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4A5568;
    font-size: 14px;
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
    color: #718096;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.text-logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    text-transform: none;
    font-family: 'Inter', sans-serif;
}

.content-area {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.content-header {
    margin-bottom: 1.5rem;
    color: #4A5568;
}

.breadcrumb-nav {
    font-size: 14px;
    color: #718096;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-bar-height);
    background-color: var(--dark-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 1000;
}

.main-wrapper {
    display: flex;
    height: calc(100vh - 60px);
    margin-top: 60px;
}

.text-logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    text-transform: none;
    font-family: 'Inter', sans-serif;
}

/* Tab Content Styles */
.tab-content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.tab-pane {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.tab-pane.active {
    display: flex;
}

/* When sidebar is collapsed */
.sidebar.collapsed + .main-content {
    width: calc(100vw - var(--sidebar-collapsed-width));
}

.settings-container {
    width: 100%;
    max-width: none;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section {
    width: 100%;
    margin-bottom: 2rem;
}

.settings-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2D3748;
}

.settings-section .card {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: white;
}

.card-body {
    padding: 2rem;
}

.form-check {
    padding: 1rem;
    border-radius: 6px;
    background-color: var(--secondary-color);
}

/* Organization Dropdown Styles */
.custom-user-controls .dropdown {
    display: inline-block;
}

.custom-user-controls .dropdown .nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.custom-user-controls .dropdown .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.custom-user-controls .dropdown .badge {
    font-size: 0.75rem;
    padding: 0.25em 0.6em;
}

.custom-user-controls .dropdown .dropdown-header {
    padding: 0.5rem 1rem;
}

.custom-user-controls .dropdown .dropdown-header small {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.custom-user-controls .dropdown .dropdown-item i {
    width: 1.25rem;
    text-align: center;
}

/* Organization name and badge in header */
.main-header .dropdown-toggle {
    color: white;
}

.main-header .dropdown-toggle i {
    color: white;
}

/* Keep dropdown menu items dark for readability */
.dropdown-menu .dropdown-item {
    color: #333;
}

.amount-positive {
    color: #28a745 !important;  /* Bootstrap green */
    font-weight: 500;
}

.amount-negative {
    color: #dc3545 !important;  /* Bootstrap red */
    font-weight: 500;
}