html {
  font-size: 14px;
}

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  overflow-x: hidden;
}

.container-fluid {
  width: 100%;
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

.main-content {
  width: 100%;
  max-width: 100%;
}

.main-content.full-width {
  width: 100vw;
  max-width: 100vw;
}

/* Feature Lock Icons */
.feature-lock {
  display: inline-block;
  align-items: center;
  margin-left: 0.25rem;
  position: relative;
  z-index: 1;
}

.billing-lock,
.billing-lock i {
  color: #dc3545 !important; /* Red for billing restrictions */
  cursor: pointer;
}

.role-lock,
.role-lock i {
  color: #ffc107 !important; /* Yellow for role restrictions */
}

.feature-locked {
  opacity: 0.6;
  pointer-events: none;
}

.locked .nav-link {
  opacity: 0.7;
}

/* Bootstrap Tooltip Overrides */
.tooltip {
  z-index: 9999 !important;
  font-size: 12px;
}

.tooltip-inner {
  max-width: 300px;
  text-align: left;
  background-color: rgba(0, 0, 0, 0.9);
  border-radius: 4px;
  padding: 8px 12px;
}

.locked .nav-link.disabled {
  pointer-events: none;
}

.upgrade-hint {
  font-size: 0.75rem;
  color: #6c757d;
  font-style: italic;
  margin-left: 4px;
}

.nav-item.locked .nav-link {
  color: #6c757d !important;
}

.nav-item.billing-locked .nav-link {
  position: relative;
}

.nav-item.role-locked .nav-link {
  position: relative;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #212529; /* Ensure default text color is dark for better contrast */
  margin: 0;
  padding: 0;
}

/* Transaction Management Table Styles */
#transactionsTable .badge {
  color: #fff !important; /* Ensure text color is white for all badges */
  font-weight: 500;
  padding: 0.4em 0.65em;
  font-size: 0.85em;
  line-height: 1.2;
  border-radius: 0.25rem;
  text-transform: capitalize;
}

/* Source Badges */
#transactionsTable .badge.badge-secondary { background-color: #6c757d; } /* Manual */
#transactionsTable .badge.badge-success { background-color: #28a745; } /* Sale, Invoice Payment */
#transactionsTable .badge.badge-warning { 
  background-color: #ffc107; 
  color: #212529 !important; /* Dark text for better contrast on light backgrounds */
} /* Purchase */
#transactionsTable .badge.badge-info { background-color: #17a2b8; } /* Invoice */
#transactionsTable .badge.badge-primary { background-color: #007bff; } /* Receipt */
#transactionsTable .badge.badge-light { 
  background-color: #f8f9fa; 
  color: #212529 !important; /* Dark text for light badges */
  border: 1px solid #dee2e6;
}

/* Category Badges */
#transactionsTable .badge.badge-danger { background-color: #dc3545; } /* Expense */

/* Type Badges */
#transactionsTable .badge.badge-success { background-color: #28a745; } /* Credit */
#transactionsTable .badge.badge-warning { 
  background-color: #ffc107; 
  color: #212529 !important; /* Dark text for better contrast on light backgrounds */
} /* Debit */

/* Hover effects for better interactivity */
#transactionsTable .badge, #accountsTable .badge {
  transition: all 0.2s ease-in-out;
  color: #fff !important;
}

#transactionsTable .badge:hover, #accountsTable .badge:hover {
  filter: brightness(90%);
  transform: translateY(-1px);
}

/* Account Management Table Styles */
#accountsTable th {
  color: #212529 !important;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

#accountsTable td {
  vertical-align: middle;
}

/* Account Type Badges */
#accountsTable .badge.badge-info { 
  background-color: #17a2b8; 
  color: #fff !important;
}

#accountsTable .badge.badge-success { 
  background-color: #28a745; 
  color: #fff !important;
}

#accountsTable .badge.badge-danger { 
  background-color: #dc3545; 
  color: #fff !important;
}

#accountsTable .badge.badge-warning { 
  background-color: #ffc107; 
  color: #212529 !important;
}

#accountsTable .badge.badge-secondary { 
  background-color: #6c757d; 
  color: #fff !important;
}

#accountsTable .badge.badge-primary { 
  background-color: #007bff; 
  color: #fff !important;
}

/* Ensure all text in cards is visible */
.card, .card-header, .card-body, .card-title {
  color: #212529 !important;
}

/* Fix for form controls */
.form-control, .form-control:focus {
  color: #212529;
  background-color: #fff;
}

/* Fix for table text */
table, .table {
  color: #212529 !important;
}

table td, table th {
  color: #212529 !important;
}

/* Fix for disabled form controls */
.form-control:disabled, .form-control[readonly] {
  background-color: #e9ecef;
  opacity: 1;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Product card hover effects */
.hover-shadow {
  transition: all 0.3s ease;
}

.hover-shadow:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  background-color: #f8f9fa;
}

/* Microsoft Word-style Navigation */
.modern-navbar {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 50%, #0f1419 100%);
    border-bottom: 3px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-height: 65px;
}

.modern-brand {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.4rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modern-brand:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.modern-brand i {
    font-size: 1.6rem;
    color: #ffd700;
}

.brand-text {
    background: linear-gradient(45deg, #ffffff, #e6f3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modern-nav {
    gap: 0.25rem;
}

.modern-nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.modern-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.modern-nav-link:hover::before {
    left: 100%;
}

.modern-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modern-nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-nav-link i {
    font-size: 1.1rem;
    color: #b3d9ff;
    transition: color 0.3s ease;
}

.modern-nav-link:hover i {
    color: #ffffff;
}

.nav-text {
    font-size: 0.95rem;
    white-space: nowrap;
}

.modern-dropdown {
    position: relative;
}

.modern-dropdown-menu {
    background: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 220px;
    animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-dropdown-item {
    color: #333333 !important;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.modern-dropdown-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #2c5aa0 !important;
    transform: translateX(5px);
}

.modern-dropdown-item i {
    color: #6c757d;
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

.modern-dropdown-item:hover i {
    color: #2c5aa0;
}

.modern-nav-right {
    gap: 0.25rem;
}

.user-menu {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modern-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 0.5rem;
}

.modern-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .modern-navbar {
        padding: 0.75rem 0;
    }
    
    .modern-nav-link {
        padding: 0.5rem 1rem !important;
        margin: 0.1rem 0;
    }
    
    .nav-text {
        font-size: 0.9rem;
    }
    
    .modern-dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.95);
        margin: 0.25rem 0;
        border-radius: 6px;
    }
}

/* Active page highlighting */
.navbar-nav .nav-link.active,
.navbar-nav .nav-link[aria-current="page"] {
    background: rgba(255, 255, 255, 0.25) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Smooth transitions for all interactive elements */
* {
    transition: all 0.3s ease;
}

/* Enhanced focus states for accessibility */
.modern-nav-link:focus,
.modern-dropdown-item:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Top Header Styles */
.top-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 50%, #0f1419 100%);
    border-bottom: 3px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 60px;
}

.header-brand {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.4rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.header-brand:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.header-brand i {
    font-size: 1.6rem;
    color: #ffd700;
}

.brand-text {
    background: linear-gradient(45deg, #ffffff, #e6f3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    color: #ffffff !important;
    font-size: 1.5rem;
    border: none;
    background: none;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.user-menu-btn {
    color: #ffffff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
}

.user-name {
    font-weight: 500;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 280px;
    height: calc(100vh - 60px);
    background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
    border-right: 1px solid #4b5563;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(0);
    transition: transform 0.3s ease;
    z-index: 1020;
    overflow-y: auto;
}

.sidebar.collapsed {
    transform: translateX(-280px);
}

.sidebar-content {
    padding: 1rem 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #d1d5db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    background: rgba(55, 65, 81, 0.5);
    color: #ffffff;
    border-left-color: #dc2626;
    transform: translateX(5px);
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    border-left-color: #991b1b;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.sidebar-nav .nav-link:hover i,
.sidebar-nav .nav-link.active i {
    color: inherit;
}

.nav-text {
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Public page full width styles */
.main-content.full-width {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 10px !important;
    box-sizing: border-box;
}

.content-wrapper.no-padding {
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure public pages have no constraints */
.full-width .container-fluid {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

.full-width .container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/* Submenu Styles */
.has-submenu .submenu-toggle {
    justify-content: space-between;
}

.submenu-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.submenu-toggle[aria-expanded="true"] .submenu-arrow {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid #4b5563;
    margin-left: 1.5rem;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem 0.75rem 2rem;
    color: #9ca3af;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.submenu-item:hover {
    background: rgba(55, 65, 81, 0.3);
    color: #ffffff;
    border-left-color: #dc2626;
    transform: translateX(3px);
}

.submenu-item i {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
    color: #6b7280;
    transition: color 0.3s ease;
}

.submenu-item:hover i {
    color: #ffffff;
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - 60px);
    width: calc(100% - 280px);
    padding: 10px;
    box-sizing: border-box;
}

.main-content.expanded {
    margin-left: 0;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.content-wrapper {
    padding: 2rem;
    background: #f8f9fa;
    min-height: calc(100vh - 60px);
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1040;
    }
    
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 8px;
        box-sizing: border-box;
        transition: none;
    }
    
    .header-brand .brand-text {
        display: none;
    }
    
    .user-menu-btn .user-name {
        display: none;
    }
    
    .sidebar-toggle {
        display: block !important;
    }
    
    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        padding: 5px;
        box-sizing: border-box;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(0, 0, 0, 0.6);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Hero Section - Full Width */
.hero-section, .hero, .jumbotron, .banner, .landing-hero, .full-width-section {
    margin: -10px -10px 20px -10px !important;
    padding: 60px 20px !important;
    width: calc(100% + 20px) !important;
    min-height: 400px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* For mobile screens */
@media (max-width: 768px) {
    .hero-section, .hero, .jumbotron, .banner, .landing-hero, .full-width-section {
        margin: -8px -8px 15px -8px !important;
        width: calc(100% + 16px) !important;
        padding: 40px 15px !important;
        min-height: 300px;
    }
}

@media (max-width: 576px) {
    .hero-section, .hero, .jumbotron, .banner, .landing-hero, .full-width-section {
        margin: -5px -5px 10px -5px !important;
        width: calc(100% + 10px) !important;
        padding: 30px 10px !important;
        min-height: 250px;
    }
}

/* Hero Content Styling */
.hero-section .container, .hero .container, .jumbotron .container, 
.banner .container, .landing-hero .container, .full-width-section .container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    padding-left: 20px;
    padding-right: 20px;
}

.hero-section h1, .hero h1, .jumbotron h1, 
.banner h1, .landing-hero h1, .full-width-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-section p, .hero p, .jumbotron p, 
.banner p, .landing-hero p, .full-width-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-section .btn, .hero .btn, .jumbotron .btn, 
.banner .btn, .landing-hero .btn, .full-width-section .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    margin: 0 10px 10px 0;
}

/* Responsive hero typography */
@media (max-width: 768px) {
    .hero-section .container, .hero .container, .jumbotron .container, 
    .banner .container, .landing-hero .container, .full-width-section .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-section h1, .hero h1, .jumbotron h1, 
    .banner h1, .landing-hero h1, .full-width-section h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-section p, .hero p, .jumbotron p, 
    .banner p, .landing-hero p, .full-width-section p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section .container, .hero .container, .jumbotron .container, 
    .banner .container, .landing-hero .container, .full-width-section .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .hero-section h1, .hero h1, .jumbotron h1, 
    .banner h1, .landing-hero h1, .full-width-section h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-section p, .hero p, .jumbotron p, 
    .banner p, .landing-hero p, .full-width-section p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-section .btn, .hero .btn, .jumbotron .btn, 
    .banner .btn, .landing-hero .btn, .full-width-section .btn {
        padding: 10px 20px;
        font-size: 1rem;
        margin: 0 10px 10px 0;
    }
}

/* Hero Height Variations */
.hero-section.hero-large, .hero.hero-large, .jumbotron.hero-large, 
.banner.hero-large, .landing-hero.hero-large, .full-width-section.hero-large {
    min-height: 600px;
    padding: 80px 20px !important;
}

.hero-section.hero-medium, .hero.hero-medium, .jumbotron.hero-medium, 
.banner.hero-medium, .landing-hero.hero-medium, .full-width-section.hero-medium {
    min-height: 400px;
    padding: 60px 20px !important;
}

.hero-section.hero-small, .hero.hero-small, .jumbotron.hero-small, 
.banner.hero-small, .landing-hero.hero-small, .full-width-section.hero-small {
    min-height: 250px;
    padding: 40px 20px !important;
}

/* Mobile adjustments for hero heights */
@media (max-width: 768px) {
    .hero-section.hero-large, .hero.hero-large, .jumbotron.hero-large, 
    .banner.hero-large, .landing-hero.hero-large, .full-width-section.hero-large {
        min-height: 450px;
        padding: 60px 15px !important;
    }
    
    .hero-section.hero-medium, .hero.hero-medium, .jumbotron.hero-medium, 
    .banner.hero-medium, .landing-hero.hero-medium, .full-width-section.hero-medium {
        min-height: 300px;
        padding: 40px 15px !important;
    }
    
    .hero-section.hero-small, .hero.hero-small, .jumbotron.hero-small, 
    .banner.hero-small, .landing-hero.hero-small, .full-width-section.hero-small {
        min-height: 200px;
        padding: 30px 15px !important;
    }
}

@media (max-width: 576px) {
    .hero-section.hero-large, .hero.hero-large, .jumbotron.hero-large, 
    .banner.hero-large, .landing-hero.hero-large, .full-width-section.hero-large {
        min-height: 350px;
        padding: 40px 10px !important;
    }
    
    .hero-section.hero-medium, .hero.hero-medium, .jumbotron.hero-medium, 
    .banner.hero-medium, .landing-hero.hero-medium, .full-width-section.hero-medium {
        min-height: 250px;
        padding: 30px 10px !important;
    }
    
    .hero-section.hero-small, .hero.hero-small, .jumbotron.hero-small, 
    .banner.hero-small, .landing-hero.hero-small, .full-width-section.hero-small {
        min-height: 180px;
        padding: 20px 10px !important;
    }
}

/* Content Safety Margins */
.card, .table-responsive, .alert, .form-group, .btn-group {
    margin-bottom: 1rem;
}

.row {
    margin-left: -5px;
    margin-right: -5px;
}

.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, 
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-sm, .col-md, .col-lg, .col-xl, .col-xxl {
    padding-left: 5px;
    padding-right: 5px;
}

/* Ensure tables don't overflow */
.table-responsive {
    margin: 0 -5px;
    padding: 0 5px;
}

/* Animation for sidebar toggle */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

/* Enhanced focus states for accessibility */
.sidebar-nav .nav-link:focus,
.submenu-item:focus,
.sidebar-toggle:focus,
.user-menu-btn:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Scrollbar Styling for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Footer Styles */
.footer-custom {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 50%, #0f1419 100%);
    border-top: 3px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    color: #ffffff;
    margin-top: auto;
    width: 100%;
}

.footer-link {
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.25rem 0;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    border-left: 3px solid transparent;
    padding-left: 0.5rem;
}

.footer-link:hover {
    color: #ffffff;
    background: rgba(55, 65, 81, 0.5);
    border-left-color: #dc2626;
    transform: translateX(5px);
    padding-left: 0.75rem;
}

.footer-link:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
    color: #ffffff;
}

/* Body padding adjustment */
body {
    padding-top: 60px;
}

/* Disabled menu items styling */
.nav-link.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-link.disabled:hover {
    background-color: transparent !important;
    color: inherit !important;
    transform: none !important;
    border-left-color: transparent !important;
}

.nav-link.disabled .nav-text {
    color: #6c757d !important;
}

/* Lock icon styling */
.bi-lock-fill {
    font-size: 0.8rem;
    opacity: 0.8;
}