:root {
    --primary-color: #4e73df;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --secondary-color: #858796;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --crm-sidebar-width: 280px;
    --crm-sidebar-active-bg: rgba(255, 255, 255, 0.15);
    --crm-border-radius: 0.75rem;
    --crm-card-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

body {
    background-color: #f8f9fc;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #444;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: #2d3748;
}

.text-xs {
    font-size: .7rem;
}

.x-small {
    font-size: .8rem;
}

.font-weight-bold {
    font-weight: 700;
}

.letter-spacing-1 {
    letter-spacing: 0.05rem;
}

.line-height-1 {
    line-height: 1.1 !important;
}

.fw-600 {
    font-weight: 600;
}

.fw-800 {
    font-weight: 800;
}

/* Layout Structure */
.crm-sidebar {
    width: var(--crm-sidebar-width);
    min-width: var(--crm-sidebar-width);
    min-height: 100vh;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    flex-direction: column;
}

.crm-sidebar .nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: all 0.2s ease;
    padding: 0.75rem 1rem;
}

.crm-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.crm-sidebar .nav-link.active {
    background: var(--crm-sidebar-active-bg) !important;
    border-left: 4px solid var(--primary-color);
    font-weight: 700;
}

/* Avatar Utilities */
.crm-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.crm-avatar.x-small {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.crm-avatar.lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

/* Dashboard Cards */
.card {
    border-radius: var(--crm-border-radius);
    border: none;
}

.shadow-sm {
    box-shadow: var(--crm-card-shadow) !important;
}

/* Forms UI */
.form-control,
.form-select {
    border-radius: 0.5rem;
    padding: 0.6rem 0.9rem;
    border-color: #e2e8f0;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.15);
    border-color: var(--primary-color);
}

.input-group-text {
    border-radius: 0.5rem;
    border-color: #e2e8f0;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s;
}

.btn-sm {
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.35rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(78, 115, 223, 0.25);
}

/* Table Enhancements */
.table thead th {
    background-color: #f8f9fc;
    border-top: none;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 0.75rem;
}

.table tbody td {
    padding: 1rem 0.75rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* Custom Badge Styles */
.badge {
    font-weight: 700;
    padding: 0.35em 0.65em;
    border-radius: 0.45rem;
}

.rounded-pill {
    border-radius: 10rem !important;
}

/* Custom Switch */
.custom-switch-lg .form-check-input {
    width: 2.8em;
    height: 1.5em;
    border-radius: 1rem;
    cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

main {
    animation: fadeIn 0.4s ease-in-out;
}