/* =========================================
   ENHANCED GST BILLING SYSTEM STYLESHEET
   ========================================= */

/* Global Variables */
:root {
    /* Primary Color Palette */
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-bg: rgba(37, 99, 235, 0.1);
    
    /* Secondary Color Palette */
    --secondary-color: #64748b;
    --secondary-light: #94a3b8;
    --secondary-dark: #475569;
    --secondary-bg: rgba(100, 116, 139, 0.1);
    
    /* Accent Colors */
    --success-color: #10b981;
    --success-light: #34d399;
    --success-dark: #059669;
    --success-bg: rgba(16, 185, 129, 0.1);
    
    --danger-color: #ef4444;
    --danger-light: #f87171;
    --danger-dark: #dc2626;
    --danger-bg: rgba(239, 68, 68, 0.1);
    
    --warning-color: #f59e0b;
    --warning-light: #fbbf24;
    --warning-dark: #d97706;
    --warning-bg: rgba(245, 158, 11, 0.1);
    
    --info-color: #06b6d4;
    --info-light: #22d3ee;
    --info-dark: #0891b2;
    --info-bg: rgba(6, 182, 212, 0.1);
    
    /* Neutral Colors */
    --light-color: #f8fafc;
    --light-gray: #f1f5f9;
    --medium-gray: #e2e8f0;
    --dark-gray: #cbd5e1;
    --dark-color: #1e293b;
    
    /* Layout Variables */
    --sidebar-width: 280px;
    --header-height: 64px;
    --border-radius-sm: 4px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --border-radius-pill: 50rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* Typography */
    --font-family: 'Segoe UI', 'SF Pro Display', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Z-index layers */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* =========================================
   GLOBAL STYLES
   ========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--light-gray);
    color: var(--dark-color);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    min-height: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   LAYOUT STRUCTURE
   ========================================= */

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    padding-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.content {
    flex: 1;
    padding: 0;
    background: var(--light-gray);
    min-height: calc(100vh - var(--header-height));
    transition: var(--transition);
}

.main-content {
    padding: 1.5rem;
    animation: fadeIn 0.3s ease-in;
}

/* =========================================
   HEADER STYLES
   ========================================= */

.navbar {
    height: var(--header-height);
    box-shadow: var(--shadow);
    z-index: var(--z-fixed);
    background-color: #ffffff;
    border-bottom: 1px solid var(--medium-gray);
}

.navbar-brand {
    font-weight: 600;
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
}

.navbar .nav-link {
    color: var(--secondary-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
}

.navbar .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--primary-bg);
}

.navbar .nav-link.active {
    color: var(--primary-color);
    background-color: var(--primary-bg);
    font-weight: 600;
}

.search-bar {
    position: relative;
    width: 300px;
    transition: width 0.3s ease;
}

.search-bar.expanded {
    width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius-pill);
    background-color: var(--light-color);
    transition: all 0.3s ease;
    font-size: var(--font-size-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    background-color: white;
}

.search-input:hover {
    border-color: var(--primary-light);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--medium-gray);
}

.search-results-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--medium-gray);
    font-weight: 600;
}

.search-results-list {
    padding: 0.5rem 0;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-result-item:hover {
    background-color: var(--primary-bg);
}

.search-result-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-bg);
    color: var(--primary-color);
    border-radius: var(--border-radius);
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    color: var(--dark-color);
}

.search-result-subtitle {
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
}

.search-results-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--medium-gray);
    text-align: center;
}

.notification-bell {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
}

.notification-bell:hover {
    background-color: var(--primary-bg);
    color: var(--primary-color);
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border: 2px solid white;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    width: 320px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    display: none;
    border: 1px solid var(--medium-gray);
    overflow: hidden;
}

.notification-dropdown.show {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.notification-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--medium-gray);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--medium-gray);
    cursor: pointer;
    transition: var(--transition-fast);
}

.notification-item:hover {
    background-color: var(--light-gray);
}

.notification-item.unread {
    background-color: var(--primary-bg);
    border-left: 3px solid var(--primary-color);
}

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.notification-title {
    font-weight: 600;
    color: var(--dark-color);
}

.notification-description {
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
}

.notification-time {
    font-size: var(--font-size-xs);
    color: var(--secondary-light);
    margin-top: 0.25rem;
}

.user-dropdown {
    position: relative;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background-color: var(--light-color);
    border: 2px solid transparent;
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-menu-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.user-menu-button:hover::before {
    left: 100%;
}

.user-menu-button:hover {
    background-color: var(--primary-bg);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    color: var(--dark-color);
}

.user-role {
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-bg);
    color: var(--primary-color);
    border-radius: 50%;
}

/* =========================================
   BREADCRUMB & PAGE HEADER STYLES
   ========================================= */

.page-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--medium-gray);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.2) 50%, transparent 100%);
}

.page-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.page-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: var(--font-size-base);
    color: var(--secondary-color);
    margin: 0;
    font-weight: 400;
}

.breadcrumb-nav {
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.breadcrumb-nav .breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-sm);
    color: var(--secondary-color);
    transition: var(--transition-fast);
}

.breadcrumb-nav .breadcrumb-item:hover {
    color: var(--primary-color);
}

.breadcrumb-nav .breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    margin: 0 0.5rem;
    color: var(--medium-gray);
    font-weight: 400;
}

.breadcrumb-nav .breadcrumb-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
}

.breadcrumb-nav .breadcrumb-link:hover {
    color: var(--primary-color);
    background-color: var(--primary-bg);
    text-decoration: none;
}

.breadcrumb-nav .breadcrumb-link:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.breadcrumb-nav .breadcrumb-icon {
    font-size: var(--font-size-xs);
    opacity: 0.7;
}

.breadcrumb-nav .breadcrumb-current {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.breadcrumb-nav .breadcrumb-current .breadcrumb-icon {
    opacity: 1;
}

/* Breadcrumb variations */
.breadcrumb-compact {
    font-size: var(--font-size-xs);
}

.breadcrumb-compact .breadcrumb-item {
    gap: 0.25rem;
}

.breadcrumb-compact .breadcrumb-link {
    padding: 0.125rem 0.25rem;
}

/* Page header variations */
.page-header-compact {
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.page-header-compact .page-title {
    font-size: var(--font-size-2xl);
}

.page-header-with-bg {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(37, 99, 235, 0.01) 100%);
    border-bottom: 2px solid var(--primary-bg);
}

.page-header-with-bg::after {
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
    height: 2px;
}

/* =========================================
   SIDEBAR STYLES
   ========================================= */

.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    color: var(--dark-color);
    transition: var(--transition);
    border-right: 1px solid var(--medium-gray);
    overflow-y: auto;
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    z-index: var(--z-fixed);
    box-shadow: var(--shadow);
}

.sidebar-header {
    padding: 1.25rem;
    background: var(--light-color);
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h4 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--primary-color);
}

.sidebar-search {
    padding: 0 1.25rem 1rem;
    position: relative;
}

.sidebar-search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    background-color: var(--light-color);
    transition: var(--transition-fast);
}

.sidebar-search-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.sidebar-search-icon {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    pointer-events: none;
}

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

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

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition-fast);
    font-weight: 500;
    border-radius: var(--border-radius);
    position: relative;
}

.sidebar-nav .nav-link:hover {
    background: rgba(37, 99, 235, 0.05);
    transform: translateX(2px);
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-left: 3px solid #2563eb;
    font-weight: 600;
    color: #1d4ed8;
}

.sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #2563eb;
    border-radius: 0 2px 2px 0;
}

.sidebar-collapsed .nav-link {
    position: relative;
}

.sidebar-collapsed .nav-link::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    margin-left: 10px;
}

.sidebar-collapsed .nav-link:hover::after {
    opacity: 1;
    visibility: visible;
}

.nav-link-loading {
    position: relative;
    overflow: hidden;
}

.nav-link-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.sidebar-nav .nav-link i {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    text-align: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar-nav .nav-link:hover i {
    transform: scale(1.1);
    color: #2563eb;
}

.sidebar-nav .submenu {
    list-style: none;
    padding: 0.5rem 0 0.5rem 2.5rem;
    margin: 0;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    margin-top: 0.25rem;
}

.sidebar-nav .submenu .nav-link {
    padding: 0.625rem 1rem;
    font-size: var(--font-size-xs);
}

.sidebar-nav .chevron {
    transition: transform 0.3s ease;
}

.sidebar-nav .expanded .chevron {
    transform: rotate(90deg);
}

.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--medium-gray);
    background-color: var(--light-color);
}

.sidebar-footer-content {
    background-color: var(--primary-bg);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.sidebar-footer-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.sidebar-footer-text {
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-fixed) - 1);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

/* =========================================
   CARD STYLES
   ========================================= */

.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    background-color: #ffffff;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* Card States */
.card-loading {
    position: relative;
    pointer-events: none;
}

.card-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.card-loading .card-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--light-gray);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.card-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--secondary-color);
}

.card-empty-icon {
    font-size: var(--font-size-4xl);
    color: var(--secondary-light);
    margin-bottom: 1rem;
}

.card-empty-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.card-empty-text {
    font-size: var(--font-size-sm);
    margin-bottom: 1.5rem;
}

.card-error {
    border-left: 4px solid var(--danger-color);
    background: linear-gradient(135deg, #ffffff 0%, rgba(239, 68, 68, 0.02) 100%);
}

.card-disabled {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(50%);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--medium-gray);
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin: 0;
}

.card-header-icon {
    color: var(--primary-color);
}

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background-color: var(--light-color);
    border-top: 1px solid var(--medium-gray);
    padding: 1rem 1.25rem;
}

/* Card variations */
.card-primary {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, #ffffff 0%, rgba(37, 99, 235, 0.02) 100%);
}

.card-primary .card-header {
    border-bottom-color: var(--primary-light);
}

.card-success {
    border-left: 4px solid var(--success-color);
    background: linear-gradient(135deg, #ffffff 0%, rgba(16, 185, 129, 0.02) 100%);
}

.card-success .card-header {
    border-bottom-color: var(--success-light);
}

.card-danger {
    border-left: 4px solid var(--danger-color);
    background: linear-gradient(135deg, #ffffff 0%, rgba(239, 68, 68, 0.02) 100%);
}

.card-danger .card-header {
    border-bottom-color: var(--danger-light);
}

.card-warning {
    border-left: 4px solid var(--warning-color);
    background: linear-gradient(135deg, #ffffff 0%, rgba(245, 158, 11, 0.02) 100%);
}

.card-warning .card-header {
    border-bottom-color: var(--warning-light);
}

.card-info {
    border-left: 4px solid var(--info-color);
    background: linear-gradient(135deg, #ffffff 0%, rgba(6, 182, 212, 0.02) 100%);
}

.card-info .card-header {
    border-bottom-color: var(--info-light);
}

/* Card sizes */
.card-sm {
    margin-bottom: 1rem;
}

.card-sm .card-header {
    padding: 0.75rem 1rem;
}

.card-sm .card-body {
    padding: 1rem;
}

.card-sm .card-footer {
    padding: 0.75rem 1rem;
}

.card-lg {
    margin-bottom: 2rem;
}

.card-lg .card-header {
    padding: 1.5rem 2rem;
}

.card-lg .card-body {
    padding: 2rem;
}

.card-lg .card-footer {
    padding: 1.5rem 2rem;
}

/* Card layouts */
.card-horizontal {
    display: flex;
    flex-direction: row;
}

.card-horizontal .card-header {
    flex: 0 0 200px;
    border-right: 1px solid var(--medium-gray);
    border-bottom: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    padding: 2rem 1rem;
}

.card-horizontal .card-body {
    flex: 1;
}

/* Stat cards */
.stat-card {
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background-color: #ffffff;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    font-size: var(--font-size-xl);
}

.stat-icon-primary {
    background-color: var(--primary-bg);
    color: var(--primary-color);
}

.stat-icon-success {
    background-color: var(--success-bg);
    color: var(--success-color);
}

.stat-icon-danger {
    background-color: var(--danger-bg);
    color: var(--danger-color);
}

.stat-icon-warning {
    background-color: var(--warning-bg);
    color: var(--warning-color);
}

.stat-icon-info {
    background-color: var(--info-bg);
    color: var(--info-color);
}

.stat-content {
    flex: 1;
}

.stat-title {
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.stat-description {
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
}

/* =========================================
   BUTTON STYLES
   ========================================= */

.btn {
    border-radius: var(--border-radius);
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    transition: var(--transition-fast);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:active::after {
    opacity: 0.3;
    transform: scale(50, 50) translate(-50%, -50%);
    transition: transform 0.5s, opacity 1s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: var(--success-dark);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-dark);
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: var(--warning-dark);
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-info:hover {
    background-color: var(--info-dark);
}

.btn-light {
    background-color: var(--light-color);
    color: var(--dark-color);
    border: 1px solid var(--medium-gray);
}

.btn-light:hover {
    background-color: var(--light-gray);
}

.btn-dark {
    background-color: var(--dark-color);
    color: white;
}

.btn-dark:hover {
    background-color: #0f172a;
}

/* Outline buttons */
.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn-outline-success {
    background-color: transparent;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.btn-outline-success:hover {
    background-color: var(--success-color);
    color: white;
}

.btn-outline-danger {
    background-color: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.btn-outline-danger:hover {
    background-color: var(--danger-color);
    color: white;
}

.btn-outline-warning {
    background-color: transparent;
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.btn-outline-warning:hover {
    background-color: var(--warning-color);
    color: white;
}

.btn-outline-info {
    background-color: transparent;
    color: var(--info-color);
    border: 1px solid var(--info-color);
}

.btn-outline-info:hover {
    background-color: var(--info-color);
    color: white;
}

/* Button sizes */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-lg);
}

/* Icon buttons */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-icon-sm {
    width: 28px;
    height: 28px;
    font-size: var(--font-size-xs);
}

.btn-icon-lg {
    width: 48px;
    height: 48px;
    font-size: var(--font-size-lg);
}

/* Floating action button */
.btn-floating {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-fixed);
    transition: var(--transition);
}

.btn-floating:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.btn-floating i {
    font-size: var(--font-size-xl);
}

/* =========================================
   FORM STYLES
   ========================================= */

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border-radius: var(--border-radius);
    border: 1px solid var(--medium-gray);
    padding: 0.625rem 0.875rem;
    transition: var(--transition-fast);
    width: 100%;
    font-size: var(--font-size-sm);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.form-control::placeholder {
    color: var(--secondary-light);
}

.form-text {
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.form-select {
    border-radius: var(--border-radius);
    border: 2px solid var(--medium-gray);
    padding: 0.75rem 2.5rem 0.75rem 0.875rem;
    transition: all 0.3s ease;
    width: 100%;
    font-size: var(--font-size-sm);
    background-color: var(--light-color);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    appearance: none;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    background-color: white;
    transform: translateY(-1px);
}

.form-select:hover {
    border-color: var(--primary-light);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    margin-top: 0;
    cursor: pointer;
}

.form-check-label {
    font-size: var(--font-size-sm);
    cursor: pointer;
}

/* Input groups */
.input-group {
    display: flex;
    position: relative;
}

.input-group .form-control {
    flex: 1;
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.input-group .form-control:last-child {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    background-color: var(--light-color);
    border: 1px solid var(--medium-gray);
    color: var(--secondary-color);
}

.input-group-text:first-child {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.input-group-text:last-child {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

/* Form validation */
.is-valid {
    border-color: var(--success-color) !important;
}

.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

.is-invalid {
    border-color: var(--danger-color) !important;
}

.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

.valid-feedback {
    font-size: var(--font-size-xs);
    color: var(--success-color);
    margin-top: 0.25rem;
}

.invalid-feedback {
    font-size: var(--font-size-xs);
    color: var(--danger-color);
    margin-top: 0.25rem;
}

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* =========================================
   TABLE STYLES
   ========================================= */

.table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.table th {
    background-color: var(--light-color);
    color: var(--dark-color);
    font-weight: 600;
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--medium-gray);
    white-space: nowrap;
}

.table td {
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid var(--medium-gray);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--light-color);
}

.table-hover tbody tr:hover {
    background-color: var(--primary-bg);
}

.table-sm th,
.table-sm td {
    padding: 0.5rem 0.75rem;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Table actions */
.table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-actions .btn {
    padding: 0.375rem;
    font-size: var(--font-size-xs);
}

/* Table pagination */
.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-top: 2px solid var(--primary-bg);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.table-pagination-info {
    font-size: var(--font-size-sm);
    color: var(--secondary-color);
    font-weight: 500;
}

.table-pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-pagination-button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    color: var(--secondary-color);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.table-pagination-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.4s ease;
}

.table-pagination-button:hover::before {
    left: 100%;
}

.table-pagination-button:hover {
    background-color: var(--primary-bg);
    color: var(--primary-color);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.15);
}

.table-pagination-button.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.table-pagination-button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.table-pagination-button.disabled:hover {
    background-color: white;
    color: var(--secondary-color);
    border-color: var(--medium-gray);
    transform: none;
    box-shadow: none;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

.page-item.first .page-link,
.page-item.last .page-link,
.page-item.prev .page-link,
.page-item.next .page-link {
    width: auto;
    padding: 0 0.75rem;
}

/* =========================================
   DROPDOWN STYLES
   ========================================= */

.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.5rem;
    vertical-align: middle;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: var(--z-dropdown);
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    background-color: white;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.dropdown-menu.show {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.dropdown-menu-end {
    right: 0;
    left: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    color: var(--dark-color);
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    text-decoration: none;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background-color: var(--primary-bg);
    color: var(--primary-color);
}

.dropdown-item.active {
    background-color: var(--primary-bg);
    color: var(--primary-color);
    font-weight: 600;
}

.dropdown-item.disabled {
    color: var(--secondary-light);
    pointer-events: none;
    background-color: transparent;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid var(--medium-gray);
}

.dropdown-header {
    display: block;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* =========================================
   TOOLTIP & POPOVER STYLES
   ========================================= */

.tooltip {
    position: absolute;
    z-index: var(--z-tooltip);
    display: block;
    margin: 0;
    font-size: var(--font-size-xs);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tooltip.show {
    opacity: 1;
}

.tooltip-inner {
    max-width: 200px;
    padding: 0.25rem 0.5rem;
    color: white;
    text-align: center;
    background-color: var(--dark-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow);
}

.popover {
    position: absolute;
    top: 0;
    left: 0;
    z-index: var(--z-popover);
    display: block;
    max-width: 276px;
    font-size: var(--font-size-sm);
    background-color: white;
    background-clip: padding-box;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.popover-header {
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    font-size: var(--font-size-sm);
    color: var(--dark-color);
    background-color: var(--light-color);
    border-bottom: 1px solid var(--medium-gray);
    border-top-left-radius: calc(var(--border-radius) - 1px);
    border-top-right-radius: calc(var(--border-radius) - 1px);
}

.popover-body {
    padding: 0.5rem 1rem;
    color: var(--secondary-color);
}

/* =========================================
   PROGRESS BAR STYLES
   ========================================= */

.progress {
    display: flex;
    height: 0.5rem;
    overflow: hidden;
    background-color: var(--light-gray);
    border-radius: var(--border-radius-pill);
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: white;
    text-align: center;
    white-space: nowrap;
    background-color: var(--primary-color);
    transition: width 0.6s ease;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    from {
        background-position: 1rem 0;
    }
    to {
        background-position: 0 0;
    }
}

/* Progress variations */
.progress-sm {
    height: 0.25rem;
}

.progress-lg {
    height: 1rem;
}

.progress-primary .progress-bar {
    background-color: var(--primary-color);
}

.progress-success .progress-bar {
    background-color: var(--success-color);
}

.progress-danger .progress-bar {
    background-color: var(--danger-color);
}

.progress-warning .progress-bar {
    background-color: var(--warning-color);
}

.progress-info .progress-bar {
    background-color: var(--info-color);
}

/* =========================================
   SPINNER STYLES
   ========================================= */

.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.spinner-grow {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    background-color: currentColor;
    border-radius: 50%;
    opacity: 0;
    animation: spinner-grow 0.75s linear infinite;
}

.spinner-grow-sm {
    width: 1rem;
    height: 1rem;
}

@keyframes spinner-grow {
    0% {
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: none;
    }
}

/* =========================================
   AVATAR STYLES
   ========================================= */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--primary-bg);
    color: var(--primary-color);
    font-weight: 600;
    overflow: hidden;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: var(--font-size-xs);
}

.avatar-md {
    width: 48px;
    height: 48px;
    font-size: var(--font-size-base);
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: var(--font-size-xl);
}

.avatar-xl {
    width: 96px;
    height: 96px;
    font-size: var(--font-size-3xl);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-group {
    display: flex;
    align-items: center;
}

.avatar-group .avatar {
    margin-left: -0.5rem;
    border: 2px solid white;
    transition: var(--transition-fast);
}

.avatar-group .avatar:first-child {
    margin-left: 0;
}

.avatar-group .avatar:hover {
    transform: translateY(-5px);
}

/* =========================================
   UTILITY CLASSES
   ========================================= */

/* Text colors */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.text-light {
    color: var(--light-color) !important;
}

.text-dark {
    color: var(--dark-color) !important;
}

.text-muted {
    color: var(--secondary-light) !important;
}

/* Background colors */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

.bg-dark {
    background-color: var(--dark-color) !important;
}

/* Background soft colors */
.bg-soft-primary {
    background-color: var(--primary-bg) !important;
}

.bg-soft-secondary {
    background-color: var(--secondary-bg) !important;
}

.bg-soft-success {
    background-color: var(--success-bg) !important;
}

.bg-soft-danger {
    background-color: var(--danger-bg) !important;
}

.bg-soft-warning {
    background-color: var(--warning-bg) !important;
}

.bg-soft-info {
    background-color: var(--info-bg) !important;
}

/* Border colors */
.border-primary {
    border-color: var(--primary-color) !important;
}

.border-secondary {
    border-color: var(--secondary-color) !important;
}

.border-success {
    border-color: var(--success-color) !important;
}

.border-danger {
    border-color: var(--danger-color) !important;
}

.border-warning {
    border-color: var(--warning-color) !important;
}

.border-info {
    border-color: var(--info-color) !important;
}

.border-light {
    border-color: var(--light-color) !important;
}

.border-dark {
    border-color: var(--dark-color) !important;
}

/* Border radius */
.rounded-sm {
    border-radius: var(--border-radius-sm) !important;
}

.rounded {
    border-radius: var(--border-radius) !important;
}

.rounded-lg {
    border-radius: var(--border-radius-lg) !important;
}

.rounded-xl {
    border-radius: var(--border-radius-xl) !important;
}

.rounded-pill {
    border-radius: var(--border-radius-pill) !important;
}

.rounded-circle {
    border-radius: 50% !important;
}

.rounded-0 {
    border-radius: 0 !important;
}

/* Shadows */
.shadow-none {
    box-shadow: none !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.shadow-xl {
    box-shadow: var(--shadow-xl) !important;
}

/* Font weights */
.fw-light {
    font-weight: 300 !important;
}

.fw-normal {
    font-weight: 400 !important;
}

.fw-medium {
    font-weight: 500 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-extrabold {
    font-weight: 800 !important;
}

/* Font sizes */
.fs-xs {
    font-size: var(--font-size-xs) !important;
}

.fs-sm {
    font-size: var(--font-size-sm) !important;
}

.fs-base {
    font-size: var(--font-size-base) !important;
}

.fs-lg {
    font-size: var(--font-size-lg) !important;
}

.fs-xl {
    font-size: var(--font-size-xl) !important;
}

.fs-2xl {
    font-size: var(--font-size-2xl) !important;
}

.fs-3xl {
    font-size: var(--font-size-3xl) !important;
}

.fs-4xl {
    font-size: var(--font-size-4xl) !important;
}

/* =========================================
   ANIMATION CLASSES
   ========================================= */

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-down {
    animation: fadeInDown 0.3s ease-out;
}

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

.fade-in-left {
    animation: fadeInLeft 0.3s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-right {
    animation: fadeInRight 0.3s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.slide-in-down {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

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

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

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

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   CUSTOM COMPONENTS
   ========================================= */

/* Status badges */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-pill);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.status-paid {
    background-color: var(--success-bg);
    color: var(--success-color);
}

.status-pending {
    background-color: var(--warning-bg);
    color: var(--warning-color);
}

.status-overdue {
    background-color: var(--danger-bg);
    color: var(--danger-color);
}

.status-draft {
    background-color: var(--light-gray);
    color: var(--secondary-color);
}

/* Feature cards */
.feature-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-bg);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: var(--font-size-2xl);
}

.feature-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.feature-description {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    flex: 1;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0.5rem;
    width: 2px;
    background-color: var(--medium-gray);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid white;
    box-shadow: var(--shadow);
}

.timeline-date {
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.timeline-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.timeline-content {
    color: var(--secondary-color);
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Chart container */
.chart-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 1.75rem;
    height: 400px;
    position: relative;
    border: 1px solid rgba(37, 99, 235, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.chart-container:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.chart-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--light-gray);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

@media (min-width: 992px) {
    .content {
        margin-left: var(--sidebar-width);
    }
    
    .sidebar-toggle {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        position: fixed;
        z-index: var(--z-fixed);
        height: 100vh;
        top: var(--header-height);
        transition: margin-left 0.3s ease;
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .content {
        width: 100%;
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .main-content {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .table-responsive {
        font-size: var(--font-size-xs);
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 575.98px) {
    .main-content {
        padding: 0.75rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: var(--font-size-base);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* =========================================
   PRINT STYLES
   ========================================= */

@media print {
    .navbar,
    .sidebar,
    .breadcrumb-nav,
    .footer,
    .btn,
    .action-buttons {
        display: none !important;
    }
    
    .content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }
    
    .table {
        font-size: 10pt;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* =========================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================= */

/* Focus styles */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.sidebar-nav .nav-link:focus-visible {
    outline-offset: -2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    z-index: var(--z-fixed);
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --success-color: #008000;
        --danger-color: #ff0000;
        --warning-color: #ff8000;
        --info-color: #0080ff;
    }
    
    .sidebar-nav .nav-link {
        border: 1px solid transparent;
    }
    
    .sidebar-nav .nav-link:hover,
    .sidebar-nav .nav-link.active {
        border-color: var(--primary-color);
    }
    
    .btn {
        border: 1px solid currentColor;
    }
    
    .card,
    .alert,
    .badge,
    .progress {
        border: 1px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================
   DARK MODE SUPPORT
   ========================================= */

@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #1e293b;
        --light-gray: #0f172a;
        --medium-gray: #334155;
        --dark-gray: #475569;
        --dark-color: #f8fafc;
        
        --primary-bg: rgba(37, 99, 235, 0.2);
        --secondary-bg: rgba(100, 116, 139, 0.2);
        --success-bg: rgba(16, 185, 129, 0.2);
        --danger-bg: rgba(239, 68, 68, 0.2);
        --warning-bg: rgba(245, 158, 11, 0.2);
        --info-bg: rgba(6, 182, 212, 0.2);
    }
    
    body {
        background-color: var(--light-gray);
        color: var(--dark-color);
    }
    
    .navbar,
    .sidebar,
    .card,
    .modal-content,
    .dropdown-menu {
        background-color: var(--light-color);
        border-color: var(--medium-gray);
    }
    
    .card-header,
    .card-footer,
    .modal-header,
    .modal-footer,
    .dropdown-divider {
        border-color: var(--medium-gray);
    }
    
    .form-control,
    .form-select,
    .input-group-text {
        background-color: var(--light-gray);
        border-color: var(--medium-gray);
        color: var(--dark-color);
    }
    
    .form-control::placeholder {
        color: var(--dark-gray);
    }
    
    .table {
        color: var(--dark-color);
    }
    
    .table th {
        background-color: var(--medium-gray);
    }
    
    .table td {
        border-color: var(--medium-gray);
    }
    
    .table-striped tbody tr:nth-of-type(odd) {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .table-hover tbody tr:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-item {
        color: var(--dark-color);
    }
    
    .dropdown-item:hover {
        background-color: var(--medium-gray);
    }
    
    .text-muted {
        color: var(--dark-gray) !important;
    }
}

/* =========================================
   CUSTOM SCROLLBAR
   ========================================= */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* =========================================
   CUSTOM COMPONENTS - INVOICE SPECIFIC
   ========================================= */

.invoice-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.invoice-logo {
    height: 60px;
    width: auto;
}

.invoice-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.invoice-subtitle {
    font-size: var(--font-size-base);
    color: var(--secondary-color);
}

.invoice-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.invoice-info-item {
    padding: 1rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
}

.invoice-info-label {
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.invoice-info-value {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--dark-color);
}

.invoice-items-table {
    margin-bottom: 2rem;
}

.invoice-total {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
}

.invoice-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.invoice-total-label {
    font-weight: 500;
    color: var(--secondary-color);
}

.invoice-total-value {
    font-weight: 600;
    color: var(--dark-color);
}

.invoice-total-row.grand-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--medium-gray);
}

.invoice-total-row.grand-total .invoice-total-label,
.invoice-total-row.grand-total .invoice-total-value {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--primary-color);
}

.invoice-notes {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.invoice-notes-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.invoice-notes-content {
    color: var(--secondary-color);
}

.invoice-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--medium-gray);
    text-align: center;
    color: var(--secondary-color);
    font-size: var(--font-size-xs);
}

/* =========================================
   CUSTOM COMPONENTS - DASHBOARD SPECIFIC
   ========================================= */

.dashboard-welcome {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #ffffff 100%);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.dashboard-welcome::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 35%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.04) 50%, transparent 100%);
    z-index: 0;
    border-radius: 0 var(--border-radius-xl) var(--border-radius-xl) 0;
}

.dashboard-welcome::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.dashboard-welcome-content {
    position: relative;
    z-index: 1;
}

.dashboard-welcome-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.dashboard-welcome-subtitle {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.dashboard-welcome-text {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.dashboard-welcome-actions {
    display: flex;
    gap: 1rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.dashboard-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.dashboard-stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    font-size: var(--font-size-2xl);
}

.dashboard-stat-content {
    flex: 1;
}

.dashboard-stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.dashboard-stat-label {
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-stat-trend {
    font-size: var(--font-size-xs);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.dashboard-stat-trend.positive {
    color: var(--success-color);
}

.dashboard-stat-trend.negative {
    color: var(--danger-color);
}

.dashboard-chart-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.dashboard-chart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-chart-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-chart-title i {
    color: var(--primary-color);
}

.dashboard-chart-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-chart-body {
    padding: 1.5rem;
    height: 350px;
}

.dashboard-chart-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--medium-gray);
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-chart-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dashboard-chart-legend-label {
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
}

.dashboard-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-quick-action {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.dashboard-quick-action:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.dashboard-quick-action-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: var(--font-size-2xl);
    margin-bottom: 0.5rem;
}

.dashboard-quick-action-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.dashboard-quick-action-description {
    font-size: var(--font-size-xs);
    color: var(--secondary-color);
    margin: 0;
}