:root {
    /* Colors — EPR Business Solutions Branding (Logo Match) */
    --clr-background: #F8FAFC;
    --clr-surface: #FFFFFF;
    --clr-primary: #000000;
    --clr-navy: #04469B;
    /* Brand Navy from 'EPR' text */
    --clr-secondary: #475569;
    --clr-accent: #00B4D8;
    /* Brand Cyan from Bars */
    --clr-accent-light: #E0F2FE;
    --clr-accent-dark: #04469B;
    --clr-accent-glow: #48CAE4;
    --clr-success: #059669;
    --clr-warning: #D97706;
    --clr-danger: #DC2626;
    --clr-border: #E2E8F0;

    --grad-premium: linear-gradient(135deg, #00B4D8 0%, #04469B 100%);
    --grad-bars: linear-gradient(180deg, #48CAE4 0%, #00B4D8 100%);
    --clr-border: #E2E8F0;

    /* Sidebar — Light Blue Theme as requested */
    --clr-sidebar-bg: #E0F2FE;
    --clr-sidebar-text: #003B73;
    --clr-sidebar-active-bg: #FFFFFF;
    --clr-sidebar-active-text: #003B73;
    --clr-sidebar-hover: rgba(0, 59, 115, 0.05);

    /* Shadows */
    --shadow-premium: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 6px 24px -4px rgba(0, 0, 0, 0.06);
    --shadow-floating: 0 20px 60px -15px rgba(0, 0, 0, 0.1), 0 8px 20px -8px rgba(0, 0, 0, 0.05);
    --shadow-inset: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);

    --font-sans: 'Bookman Old Style', 'Bookman', 'URW Bookman L', 'Georgia', serif;
}

/* Base Overrides */
body {
    font-family: var(--font-sans);
    background-color: var(--clr-background);
    color: var(--clr-primary);
    -webkit-font-smoothing: antialiased;
}

[x-cloak] {
    display: none !important;
}

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

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

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

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

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

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

.fw-black {
    font-weight: 900 !important;
}

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

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

.txt-8 {
    font-size: 8px !important;
}

.txt-9 {
    font-size: 9px !important;
}

.txt-10 {
    font-size: 10px !important;
}

.txt-11 {
    font-size: 11px !important;
}

.txt-12 {
    font-size: 12px !important;
}

.txt-13 {
    font-size: 13px !important;
}

.txt-14 {
    font-size: 14px !important;
}

/* Layout Utilities — Fix Alignment */
.sidebar-width {
    width: 280px !important;
    min-width: 280px !important;
    flex-shrink: 0 !important;
}

.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Sidebar Toggle Utilities */
.-translate-x-full {
    transform: translateX(-100%) !important;
}

.translate-x-0 {
    transform: translateX(0) !important;
}

.modal-backdrop-blur {
    background: rgba(0, 20, 40, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Responsive Utilities */
@media (min-width: 992px) {
    .lg-position-relative {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        bottom: auto !important;
    }

    .lg-translate-x-0 {
        transform: translateX(0) !important;
    }

    .lg-shadow-none {
        box-shadow: none !important;
    }
}


/* Modal & Position Utilities */
.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.overflow-y-auto {
    overflow-y: auto !important;
}

.transition-transform-fadescale-enter {
    animation: fadeScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.transition-slide-in-right-enter {
    animation: slideInRight 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.transition-slide-in-right-leave {
    animation: slideOutRight 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

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

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

.animate-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Sidebar Component */
.sidebar-scrollbar::-webkit-scrollbar {
    display: none;
}

.sidebar-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-bg-custom {
    background-color: var(--clr-sidebar-bg) !important;
    border-right: 1px solid rgba(0, 59, 115, 0.1);
}

.sidebar-nav-title {
    font-size: 9px;
    font-weight: 900;
    color: var(--clr-sidebar-text);
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    padding: 0 1.5rem;
    margin-bottom: 1rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    margin: 0.2rem 0.75rem;
    border-radius: 12px;
    color: var(--clr-sidebar-text) !important;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.sidebar-link:hover {
    background-color: var(--clr-sidebar-hover);
    opacity: 1;
    transform: translateX(4px);
}

.sidebar-link.active {
    background-color: var(--clr-sidebar-active-bg);
    color: var(--clr-sidebar-active-text) !important;
    opacity: 1;
    box-shadow: var(--shadow-premium);
}

.sidebar-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 12px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    color: var(--clr-sidebar-text);
}

.sidebar-link.active .sidebar-icon {
    background: var(--clr-navy);
    color: white;
}

.sidebar-logout-btn {
    border: 1px solid rgba(0, 59, 115, 0.1) !important;
    background-color: white !important;
    color: var(--clr-danger) !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    transition: all 0.2s ease !important;
}

.sidebar-logout-btn:hover {
    background-color: var(--clr-danger) !important;
    color: white !important;
    border-color: var(--clr-danger) !important;
}

.sidebar-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 12px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    color: var(--clr-sidebar-text);
}

.sidebar-link.active .sidebar-icon {
    background: var(--clr-navy);
    color: white;
}

/* Button System — Brand Navy */
.btn-primary-premium {
    background: var(--clr-navy) !important;
    color: white !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    padding: 0.8rem 2rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    border: none;
    box-shadow: 0 4px 12px rgba(4, 70, 155, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn-primary-premium:hover {
    background: var(--grad-premium) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(4, 70, 155, 0.4) !important;
}

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

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

.bg-premium-gradient {
    background: var(--grad-premium) !important;
}

.btn-premium-action {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: white;
    border: 1px solid var(--clr-border);
    color: var(--clr-navy);
    transition: all 0.2s ease;
}

.btn-premium-action svg {
    width: 16px !important;
    height: 16px !important;
}

.btn-premium-action:hover {
    background: var(--clr-navy);
    color: white;
    border-color: var(--clr-navy);
    transform: scale(1.05);
}

/* Cards & Containers */
.shadow-premium {
    box-shadow: var(--shadow-premium) !important;
}

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

.rounded-4 {
    border-radius: 1.5rem !important;
}

/* Table Styling */
.table-premium thead th {
    background-color: rgba(0, 59, 115, 0.02);
    color: var(--clr-navy);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 10px;
    padding: 1.25rem 1rem;
    border-bottom: 2px solid var(--clr-border);
}

.table-premium tbody td {
    padding: 1rem;
    color: var(--clr-primary);
    border-bottom: 1px solid rgba(0, 59, 115, 0.05);
}

/* Modals */
.form-control-premium {
    background-color: #F8FAFC !important;
    border: 1px solid var(--clr-border) !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 0.75rem 1rem !important;
    color: #1E293B !important;
}

/* Global Placeholders — Refined for "Lite" feel */
::placeholder {
    color: #94A3B8 !important;
    font-weight: 400 !important;
    font-size: 11px !important;
    opacity: 0.7 !important;
}

.form-control-premium:focus {
    border-color: var(--clr-navy) !important;
    box-shadow: 0 0 0 4px rgba(0, 59, 115, 0.05) !important;
}

/* Overlay & Transitions */
.fixed-inset-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 20, 40, 0.4);
    backdrop-filter: blur(4px);
}

.z-overlay {
    z-index: 9998;
}

.z-modal {
    z-index: 9999;
    overflow-y: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767.98px) {
    .z-modal {
        align-items: flex-start !important;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

/* Dashboard Widgets */
.stat-card-gradient {
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 59, 115, 0.05);
    box-shadow: var(--shadow-premium);
}

/* Note Dialog Popups */
.note-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 20, 40, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.note-dialog {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-floating);
    border: 1px solid rgba(0, 180, 216, 0.1);
    animation: dialogIn 0.3s ease-out;
}

@keyframes dialogIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}