/* Base styles */
:root {
    /* QuickBooks-inspired colors - Slightly warmer background */
    --primary: #2CA01C;         /* Main green */
    --primary-darker: #218415;  /* Darker green */
    --primary-hover: #39B829;   /* Lighter green */
    --secondary: #107992;       /* Teal */
    --tertiary: #005848;        /* Dark green */
    --accent: #06B6D4;          /* Bright blue */
    --success: #2CA01C;         /* Green */
    --warning: #F2A324;         /* Orange */
    --danger: #E23D28;          /* Red */
    --info: #0EA5E9;            /* Blue */
    --light: #FFFFFF;           /* Pure white */
    --dark: #393A3D;            /* Dark gray */
    --gray: #6B7280;            /* Medium gray */
    --text-primary: #1F2937;    /* Darker text for better contrast */
    --text-secondary: #6B7280;  /* Medium gray */
    --text-muted: #9CA3AF;      /* Light gray */
    --bg-body: #F8F9FA;         /* Slightly off-white for better component visibility */
    --bg-sidebar: #FFFFFF;      /* Pure white sidebar */
    --bg-card: #FFFFFF;         /* Pure white cards */
    --bg-input: #FFFFFF;        /* Pure white inputs */
    --border-color: #E9ECEF;    /* Slightly more visible borders */

    /* Bootstrap variable aliases used by Bootstrap utilities and isolated components */
    --bs-primary: var(--primary);
    --bs-primary-rgb: 44, 160, 28;
    --bs-secondary: var(--secondary);
    --bs-secondary-rgb: 16, 121, 146;
    --bs-success: var(--success);
    --bs-success-rgb: 44, 160, 28;
    --bs-warning: var(--warning);
    --bs-warning-rgb: 242, 163, 36;
    --bs-danger: var(--danger);
    --bs-danger-rgb: 226, 61, 40;
    --bs-info: var(--info);
    --bs-info-rgb: 14, 165, 233;
    --bs-body-color: var(--text-primary);
    --bs-body-color-rgb: 31, 41, 55;
    --bs-secondary-color: var(--text-secondary);
    --bs-border-color: var(--border-color);
    --bs-link-color: var(--primary);
    --bs-link-hover-color: var(--primary-hover);
    
    /* Component colors - Slightly more visible */
    --bg-blue-100: #F0F9FF;
    --text-blue-800: #0054A0;
    --bg-pink-100: #FDF2F8;
    --text-pink-800: #9D174D;
    --bg-gray-50: #FAFBFC;
    --bg-gray-100: #F8F9FA;     /* Slightly more visible gray backgrounds */
    --bg-gray-200: #E9ECEF;     /* More visible secondary gray */
    --text-gray-800: #1F2937;

    /* Light variations for backgrounds - More subtle but visible */
    --primary-light: rgba(44, 160, 28, 0.06);     /* Slightly more visible */
    --secondary-light: rgba(16, 121, 146, 0.06);
    --success-light: rgba(44, 160, 28, 0.06);
    --warning-light: rgba(242, 163, 36, 0.06);
    --danger-light: rgba(226, 61, 40, 0.06);
    --info-light: rgba(14, 165, 233, 0.06);

    /* QuickBooks UI specific styles - More pronounced shadows */
    --qb-header-height: 56px;
    --qb-sidebar-width: 240px;
    --qb-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);   /* More visible shadows */
    --qb-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);      /* More pronounced shadows */
    --qb-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);  /* Much more pronounced */
    --qb-transition: all 0.2s ease;
    
    /* Animation durations and easings */
    --transition-fast: 0.15s;
    --transition-normal: 0.2s;
    --transition-slow: 0.3s;
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 15px;
    overflow-x: hidden;
}

/* Enhanced Scrollbar Styling - Much better visibility and usability */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-gray-100);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 5px;
    border: 2px solid var(--bg-gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

::-webkit-scrollbar-thumb:active {
    background: #6B7280;
}

::-webkit-scrollbar-corner {
    background: var(--bg-gray-100);
}

/* Firefox scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: #D1D5DB var(--bg-gray-100);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.2;
}

h1 {
    font-size: 1.65rem;
}

h2 {
    font-size: 1.4rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Links */
a, .btn-link {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.15s ease;
}

a:hover, .btn-link:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Buttons - More pronounced shadows on hover */
.btn {
    font-weight: 500;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(44, 160, 28, 0.15);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-darker);
    border-color: var(--primary-darker);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(44, 160, 28, 0.2);
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #0B6175;
    border-color: #0B6175;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(16, 121, 146, 0.2);
}

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
    background-color: transparent;
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    background-color: var(--bg-gray-100);
    color: var(--text-primary);
    border-color: var(--gray);
}

.btn-tertiary {
    background-color: white;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-tertiary:hover, .btn-tertiary:focus {
    background-color: var(--bg-gray-100);
    color: var(--text-primary);
}

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
}

.btn-success:hover, .btn-success:focus {
    background-color: var(--primary-darker);
    border-color: var(--primary-darker);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(44, 160, 28, 0.2);
}

.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: white;
}

.btn-danger:hover, .btn-danger:focus {
    background-color: #C43520;
    border-color: #C43520;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(226, 61, 40, 0.2);
}

.btn-warning {
    background-color: var(--warning);
    border-color: var(--warning);
    color: white;
}

.btn-warning:hover, .btn-warning:focus {
    background-color: #E09215;
    border-color: #E09215;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(242, 163, 36, 0.2);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background-color: transparent;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-icon {
    height: 32px;
    width: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background-color: var(--bg-gray-100);
    color: var(--primary);
    border-color: var(--primary-hover);
}

.btn-icon.text-danger:hover {
    background-color: #FEF2F2;
    color: var(--danger);
    border-color: var(--danger);
}

/* Cards - More pronounced shadows */
.card {
    background-color: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--qb-shadow);
    overflow: hidden;
    transition: var(--qb-transition);
}

.card:hover {
    box-shadow: var(--qb-shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--bg-gray-100);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Forms */
.form-control, .form-select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    transition: all 0.15s ease;
    font-size: 0.85rem;
    height: auto;
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 160, 28, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.input-group-text {
    background-color: var(--bg-gray-100);
    color: var(--text-secondary);
    border-color: var(--border-color);
    font-size: 0.85rem;
}

.form-floating > .form-control,
.form-floating > .form-control-plaintext,
.form-floating > .form-select {
    height: calc(3.1rem + 2px);
    padding: 0.875rem 0.75rem;
    font-size: 0.85rem;
}

.form-floating > label {
    padding: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-control-plaintext ~ label,
.form-floating > .form-select ~ label {
    transform: scale(0.85) translateY(-0.75rem) translateX(0.15rem);
    color: var(--primary);
}

.form-check-input {
    background-color: var(--bg-input);
    border-color: #ADB5BD;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    font-size: 0.85rem;
}

/* Tables */
.table {
    color: var(--text-primary);
    vertical-align: middle;
    border-color: var(--border-color);
    font-size: 0.85rem;
    background-color: white;
}

.table thead {
    background-color: var(--bg-gray-100);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
}

.table thead th {
    font-weight: 600;
    padding: 0.75rem;
    border-bottom-width: 1px;
}

.table tbody td {
    padding: 0.75rem;
    border-color: var(--border-color);
}

.table-hover tbody tr {
    transition: all 0.15s ease;
}

.table-hover tbody tr:hover {
    background-color: var(--bg-gray-100);
}

/* Page Header */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.page-subtitle {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .page-title {
        margin-bottom: 0.25rem;
    }
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    height: 3.5rem;
    width: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
}

/* Modals */
.modal-content {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--qb-shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    background-color: var(--bg-gray-100);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    background-color: var(--bg-gray-100);
}

.modal-title {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Improved modal animations */
.modal.fade .modal-dialog {
    transition: transform 0.3s var(--ease-out);
}

.modal.fade .modal-dialog {
    transform: scale(0.95);
}

.modal.show .modal-dialog {
    transform: none;
}

/* Alerts - Much lighter backgrounds */
.alert {
    border-radius: 6px;
    padding: 0.875rem 1rem;
    border: 1px solid transparent;
    font-size: 0.85rem;
}

.alert-success {
    color: #155724;
    background-color: #F0F9F0;
    border-color: #C3E6CB;
}

.alert-warning {
    color: #856404;
    background-color: #FFFBF0;
    border-color: #FFEEBA;
}

.alert-danger {
    color: #721C24;
    background-color: #FDF2F2;
    border-color: #F5C6CB;
}

.alert-info {
    color: #0C5460;
    background-color: #F0F9FF;
    border-color: #BEE5EB;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    border-radius: 4px;
}

.bg-blue-100 {
    background-color: var(--bg-blue-100);
}

.text-blue-800 {
    color: var(--text-blue-800);
}

.bg-pink-100 {
    background-color: var(--bg-pink-100);
}

.text-pink-800 {
    color: var(--text-pink-800);
}

.bg-gray-100 {
    background-color: var(--bg-gray-100);
}

.text-gray-800 {
    color: var(--text-gray-800);
}

/* Avatar */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Actions */
.actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Nav tabs */
.nav-tabs {
    border-bottom-color: var(--border-color);
    gap: 0;
}

.nav-tabs .nav-link {
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-radius: 6px 6px 0 0;
    padding: 0.5rem 0.875rem;
    background-color: transparent;
    transition: all 0.15s ease;
    margin-bottom: -1px;
    font-size: 0.85rem;
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    background-color: var(--bg-gray-100);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    background-color: white;
    border: 1px solid var(--border-color);
    border-bottom-color: white;
}

/* Dropdowns */
.dropdown-menu {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--qb-shadow-lg);
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.dropdown-item {
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    transition: all 0.15s ease;
}

.dropdown-item:hover, .dropdown-item:focus {
    color: var(--primary);
    background-color: var(--bg-gray-100);
}

.dropdown-item.text-danger:hover {
    color: var(--danger);
    background-color: #FEF2F2;
}

.dropdown-divider {
    border-top: 1px solid var(--border-color);
    margin: 0.25rem 0;
}

/* Bootstrap icon overrides */
.bi {
    margin-right: 0.375rem;
}

/* Error boundary */
.blazor-error-boundary {
    background: var(--danger);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    font-size: 0.85rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* Error UI */
#blazor-error-ui {
    background-color: var(--warning);
    color: var(--dark);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 0.85rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    font-weight: bold;
}

/* Validations */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success);
}

.invalid {
    outline: 1px solid var(--danger);
}

.validation-message {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Dark border checkbox */
.darker-border-checkbox.form-check-input {
    border-color: #ADB5BD;
}

/* Content */
.content {
    background-color: var(--bg-body);
}

/* QuickBooks-inspired specific components */
.qb-section {
    margin-bottom: 1.5rem;
}

.qb-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Dashboard Stat Cards - More pronounced shadows */
.qb-data-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--qb-shadow);
    padding: 1.5rem;
    height: 100%;
    transition: var(--qb-transition);
    border: 1px solid var(--border-color);
}

.qb-data-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--qb-shadow-lg);
    border-color: var(--primary);
}

.qb-data-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.qb-data-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.qb-data-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.qb-data-indicator {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.qb-data-indicator.positive {
    color: var(--success);
}

.qb-data-indicator.negative {
    color: var(--danger);
}

.qb-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.bg-primary-light {
    background-color: var(--primary-light);
    color: var(--primary);
}

.bg-secondary-light {
    background-color: var(--secondary-light);
    color: var(--secondary);
}

.bg-success-light {
    background-color: var(--success-light);
    color: var(--success);
}

.bg-warning-light {
    background-color: var(--warning-light);
    color: var(--warning);
}

.bg-danger-light {
    background-color: var(--danger-light);
    color: var(--danger);
}

.bg-info-light {
    background-color: var(--info-light);
    color: var(--info);
}

/* Chart placeholder for demo */
.chart-placeholder {
    height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.placeholder-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-grow: 1;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.chart-bar {
    width: 6.5%;
    background-color: var(--primary);
    opacity: 0.85;
    border-radius: 4px 4px 0 0;
    transition: var(--qb-transition);
}

.chart-bar:nth-child(even) {
    background-color: var(--secondary);
}

.chart-bar:hover {
    opacity: 1;
    transform: scaleY(1.05);
}

.chart-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
}

/* Activity timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
}

.activity-item {
    display: flex;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--qb-transition);
}

.activity-item:hover {
    background-color: var(--bg-gray-100);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.activity-icon i {
    margin: 0;
    font-size: 1rem;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.activity-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Quick links */
.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    text-align: center;
    height: 120px;
    transition: var(--qb-transition);
    box-shadow: var(--qb-shadow);
}

.quick-link-card i {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
    margin-right: 0;
    transition: var(--qb-transition);
}

.quick-link-card span {
    font-weight: 500;
}

.quick-link-card:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--qb-shadow-lg);
    border-color: var(--primary);
}

.quick-link-card:hover i {
    color: white;
    transform: scale(1.1);
}

/* QuickBooks-inspired layout elements */
.qb-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.qb-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Transition properties */
.transition-all {
    transition: var(--qb-transition);
}

/* New animation utilities */
.transition-transform {
    transition: transform var(--transition-normal) var(--ease-out);
}

.transition-opacity {
    transition: opacity var(--transition-normal) var(--ease-out);
}

.transition-colors {
    transition: background-color var(--transition-normal) var(--ease-out), 
                border-color var(--transition-normal) var(--ease-out), 
                color var(--transition-normal) var(--ease-out);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-raise:hover {
    transform: translateY(-3px);
}

.hover-slide-right:hover {
    transform: translateX(3px);
}

.hover-shadow:hover {
    box-shadow: var(--qb-shadow-lg);
}

/* Shadow utilities - More pronounced */
.shadow-sm {
    box-shadow: var(--qb-shadow-sm) !important;
}

.shadow {
    box-shadow: var(--qb-shadow) !important;
}

.shadow-lg {
    box-shadow: var(--qb-shadow-lg) !important;
}

/* Hover effects */
.hover-lift {
    transition: var(--qb-transition);
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--qb-shadow-lg);
}

/* Toast notification */
toast {
    background-color: white;
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toast-header {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

.toast-body {
    padding: 0.75rem 1rem;
}

/* Animation utilities */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

.animate-slide-in-up {
    animation: slideInUp 0.3s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Apply animations to specific elements */
.card {
    animation: fadeIn 0.4s ease-out;
}

.quick-link-card {
    animation: slideInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.quick-link-card:nth-child(1) { animation-delay: 0.1s; }
.quick-link-card:nth-child(2) { animation-delay: 0.2s; }
.quick-link-card:nth-child(3) { animation-delay: 0.3s; }
.quick-link-card:nth-child(4) { animation-delay: 0.4s; }

.activity-item {
    animation: slideInRight 0.3s ease-out;
    animation-fill-mode: both;
}

.activity-item:nth-child(1) { animation-delay: 0.1s; }
.activity-item:nth-child(2) { animation-delay: 0.15s; }
.activity-item:nth-child(3) { animation-delay: 0.2s; }
.activity-item:nth-child(4) { animation-delay: 0.25s; }
.activity-item:nth-child(5) { animation-delay: 0.3s; }

/* Breadcrumb styling */
.breadcrumb {
    margin-bottom: 1.25rem;
    padding: 0;
    font-size: 0.8rem;
    background-color: transparent;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

/* Pagination */
.pagination {
    font-size: 0.85rem;
}

.pagination .page-link {
    color: var(--text-secondary);
    border-color: var(--border-color);
    padding: 0.375rem 0.75rem;
}

.pagination .page-link:hover {
    z-index: 2;
    color: var(--primary);
    background-color: var(--bg-gray-100);
    border-color: var(--border-color);
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
}

.pagination .page-item.disabled .page-link {
    color: var(--text-muted);
    pointer-events: none;
    background-color: #fff;
    border-color: var(--border-color);
}

/* Skeleton Loading Animations */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-gray-100);
    border-radius: 4px;
    height: 16px; /* Default height */
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton.skeleton-title {
    height: 24px;
    width: 40%;
    margin-bottom: 1rem;
}

.skeleton.skeleton-text {
    height: 16px;
    width: 100%;
    margin-bottom: 0.5rem;
}

.skeleton.skeleton-text.short {
    width: 60%;
}

.skeleton.skeleton-text.medium {
    width: 80%;
}

.skeleton.skeleton-circle {
    height: 48px;
    width: 48px;
    border-radius: 50%;
}

.skeleton.skeleton-avatar {
    height: 32px;
    width: 32px;
    border-radius: 50%;
}

.skeleton.skeleton-button {
    height: 38px;
    width: 120px;
    border-radius: 4px;
}

.skeleton.skeleton-card {
    height: 200px;
    border-radius: 6px;
}

.skeleton.skeleton-input {
    height: 38px;
    border-radius: 4px;
}

.skeleton.skeleton-image {
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    border-radius: 6px;
}

.skeleton.skeleton-table-row {
    height: 52px;
    margin-bottom: 4px;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

@keyframes skeleton-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Skeleton loading examples */
.skeleton-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skeleton-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.skeleton-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: white;
    border-radius: 6px;
    box-shadow: var(--qb-shadow-sm);
}

.skeleton-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Shimmer effect for cards and buttons */
.shimmer-effect {
    position: relative;
    overflow: hidden;
}

.shimmer-effect::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
    pointer-events: none;
}

/* High contrast mode styles */
.high-contrast {
    --primary: #006600;
    --primary-darker: #004400;
    --primary-hover: #008800;
    --secondary: #004466;
    --tertiary: #003333;
    --text-primary: #000000;
    --text-secondary: #222222;
    --text-muted: #444444;
    --bg-body: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-input: #FFFFFF;
    --border-color: #000000;
    --bg-gray-100: #EEEEEE;
    --qb-shadow-sm: none;
    --qb-shadow: none;
}

.high-contrast .card,
.high-contrast .toast,
.high-contrast .modal-content,
.high-contrast .dropdown-menu {
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.high-contrast .btn {
    border: 1px solid black;
}

.high-contrast .nav-link.active {
    outline: 2px solid black;
}

.high-contrast .btn-primary,
.high-contrast .btn-secondary,
.high-contrast .btn-success,
.high-contrast .btn-danger,
.high-contrast .btn-warning {
    color: white;
    border-color: black;
}

/* Text size classes */
.text-size-small {
    font-size: 13px;
}

.text-size-small h1 { font-size: 1.4rem; }
.text-size-small h2 { font-size: 1.2rem; }
.text-size-small h3 { font-size: 1.1rem; }
.text-size-small .btn { font-size: 0.8rem; }
.text-size-small .form-control, 
.text-size-small .form-select { font-size: 0.8rem; }

.text-size-large {
    font-size: 17px;
}

.text-size-large h1 { font-size: 1.9rem; }
.text-size-large h2 { font-size: 1.6rem; }
.text-size-large h3 { font-size: 1.4rem; }
.text-size-large .btn { font-size: 0.95rem; }
.text-size-large .form-control,
.text-size-large .form-select { font-size: 0.95rem; }

/* Reduced motion */
.reduce-motion * {
    transition: none !important;
    animation: none !important;
}

.reduce-motion .card:hover,
.reduce-motion .quick-link-card:hover,
.reduce-motion .btn:hover,
.reduce-motion .qb-data-card:hover {
    transform: none !important;
}

/* Enhanced focus */
.enhanced-focus *:focus {
    outline: 3px solid var(--primary) !important;
    outline-offset: 3px !important;
}

.enhanced-focus .btn:focus {
    box-shadow: 0 0 0 3px rgba(44, 160, 28, 0.5) !important;
}

.enhanced-focus .form-control:focus,
.enhanced-focus .form-select:focus {
    box-shadow: 0 0 0 3px rgba(44, 160, 28, 0.5) !important;
}

/* Mobile responsiveness baseline for page content */
@media (max-width: 992px) {
    .page-header {
        gap: 0.75rem;
    }

    .actions,
    .qb-toolbar,
    .qb-toolbar-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .card-body,
    .modal-body {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.25rem;
    }

    .table-responsive,
    .card .table,
    .qb-section .table,
    .modal-body .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .table {
        min-width: 640px;
    }

    .table th,
    .table td {
        white-space: nowrap;
    }

    img,
    svg,
    canvas {
        max-width: 100%;
        height: auto;
    }
}
}