:root {
    --sidebar-width: 250px;
    --sidebar-bg: #212529;
    --sidebar-hover: #343a40;
    --sidebar-active: #0d6efd;
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --card-radius: 0.5rem;
}

#wrapper {
    min-height: 100vh;
}

#sidebar-wrapper {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: margin-left 0.3s ease;
}

[dir="rtl"] #sidebar-wrapper {
    left: auto;
    right: 0;
}

#page-content-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

[dir="rtl"] #page-content-wrapper {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

.sidebar-heading {
    font-size: 1.1rem;
}

.sidebar-menu .list-group-item {
    border: none;
    border-left: 3px solid transparent;
    padding: 0.7rem 1.25rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

[dir="rtl"] .sidebar-menu .list-group-item {
    border-left: none;
    border-right: 3px solid transparent;
}

.sidebar-menu .list-group-item:hover {
    background-color: var(--sidebar-hover) !important;
    border-left-color: var(--sidebar-active);
}

[dir="rtl"] .sidebar-menu .list-group-item:hover {
    border-left-color: transparent;
    border-right-color: var(--sidebar-active);
}

.sidebar-menu .list-group-item.active {
    background-color: var(--sidebar-active) !important;
    border-left-color: #fff;
}

[dir="rtl"] .sidebar-menu .list-group-item.active {
    border-left-color: transparent;
    border-right-color: #fff;
}

.card {
    border: none;
    box-shadow: var(--card-shadow);
    border-radius: var(--card-radius);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 600;
    border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
}

.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

table.dataTable {
    margin-top: 0 !important;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
}

.signature-pad-container {
    border: 2px dashed #ccc;
    border-radius: 8px;
    background: #fff;
    cursor: crosshair;
}

.signature-pad {
    width: 100%;
    height: 200px;
}

.report-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

@media (max-width: 991.98px) {
    #sidebar-wrapper {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    [dir="rtl"] #sidebar-wrapper {
        margin-left: 0;
        margin-right: calc(-1 * var(--sidebar-width));
    }

    #sidebar-wrapper.toggled {
        margin-left: 0;
    }

    [dir="rtl"] #sidebar-wrapper.toggled {
        margin-right: 0;
    }

    #page-content-wrapper {
        margin-left: 0;
    }

    [dir="rtl"] #page-content-wrapper {
        margin-right: 0;
    }
}

@media print {
    #sidebar-wrapper, .navbar, .btn, .card-header .btn {
        display: none !important;
    }
    #page-content-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
    body {
        font-size: 12pt;
    }
}

.invoice-template .invoice-header {
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.invoice-template .table th {
    background: #f8f9fa;
}
