/* Compact Layout Styles - Optimized for more content on screen */

/* Global Font Size Reduction */
body {
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
}

/* Headers */
h1 { font-size: 1.5rem !important; }
h2 { font-size: 1.3rem !important; }
h3 { font-size: 1.1rem !important; }
h4 { font-size: 1rem !important; }
h5 { font-size: 0.9rem !important; }
h6 { font-size: 0.8rem !important; }

/* Cards - Compact */
.card {
    margin-bottom: 0.75rem !important;
    border-radius: 0.375rem !important;
}

.card-header {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
}

.card-body {
    padding: 0.75rem !important;
}

.card-title {
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem !important;
}

/* Tables - Compact */
.table {
    font-size: 0.8rem !important;
}

.table th {
    padding: 0.5rem 0.4rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.table td {
    padding: 0.4rem !important;
    vertical-align: middle !important;
}

.table-sm th,
.table-sm td {
    padding: 0.25rem 0.3rem !important;
}

/* Buttons - Compact */
.btn {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
}

.btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
}

.btn-lg {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
}

/* Forms - Compact */
.form-control {
    padding: 0.375rem 0.5rem !important;
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
}

.form-label {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    margin-bottom: 0.25rem !important;
}

.form-select {
    padding: 0.375rem 0.5rem !important;
    font-size: 0.8rem !important;
}

/* Alerts - Compact */
.alert {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8rem !important;
    margin-bottom: 0.75rem !important;
}

/* Badges - Compact */
.badge {
    font-size: 0.7rem !important;
    padding: 0.25rem 0.4rem !important;
}

/* Navbar - Compact */
.navbar {
    padding: 0.5rem 1rem !important;
    min-height: 50px !important;
}

.navbar-brand {
    font-size: 1.1rem !important;
}

.nav-link {
    padding: 0.375rem 0.5rem !important;
    font-size: 0.8rem !important;
}

/* Sidebar - Compact */
.sidebar {
    width: 220px !important;
}

.sidebar.collapsed {
    width: 60px !important;
}

.sidebar .nav-link {
    padding: 0.5rem 0.75rem !important;
    margin: 1px 8px !important;
    font-size: 0.8rem !important;
}

.sidebar .nav-icon {
    font-size: 1rem !important;
}

.sidebar .icon-label {
    font-size: 0.75rem !important;
}

.sidebar .nav-section-title {
    font-size: 0.7rem !important;
    padding: 8px 16px 4px !important;
}

/* Main Content - Compact */
.main-content {
    margin-left: 220px !important;
    padding: 1rem !important;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 60px !important;
}

/* Dashboard Cards - Compact */
.dashboard-card {
    margin-bottom: 0.75rem !important;
}

.dashboard-card .card-body {
    padding: 0.75rem !important;
}

.dashboard-card .h5 {
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem !important;
}

.dashboard-card .h4 {
    font-size: 1.1rem !important;
    margin-bottom: 0.25rem !important;
}

/* Grid System - Compact */
.row {
    margin-left: -0.5rem !important;
    margin-right: -0.5rem !important;
}

.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-auto, .col-sm, .col-md, .col-lg, .col-xl {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

/* Spacing - Compact */
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.25rem !important; }

.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-5 { margin-top: 1.25rem !important; }

.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.25rem !important; }

/* Text Sizes - Compact */
.text-xs { font-size: 0.7rem !important; }
.text-sm { font-size: 0.8rem !important; }
.text-lg { font-size: 1rem !important; }
.text-xl { font-size: 1.1rem !important; }

/* Modals - Compact */
.modal-dialog {
    margin: 0.5rem !important;
}

.modal-content {
    border-radius: 0.375rem !important;
}

.modal-header {
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.modal-body {
    padding: 1rem !important;
}

.modal-footer {
    padding: 0.75rem 1rem !important;
    border-top: 1px solid #dee2e6 !important;
}

/* Dropdowns - Compact */
.dropdown-menu {
    font-size: 0.8rem !important;
    padding: 0.25rem 0 !important;
}

.dropdown-item {
    padding: 0.25rem 0.75rem !important;
    font-size: 0.8rem !important;
}

/* Pagination - Compact */
.pagination {
    font-size: 0.8rem !important;
}

.page-link {
    padding: 0.375rem 0.5rem !important;
    font-size: 0.8rem !important;
}

/* Progress Bars - Compact */
.progress {
    height: 0.5rem !important;
}

/* List Groups - Compact */
.list-group-item {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8rem !important;
}

/* Utilities - Compact */
.fw-bold { font-weight: 600 !important; }
.fw-semibold { font-weight: 500 !important; }
.fw-normal { font-weight: 400 !important; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        padding: 0.5rem !important;
    }
    
    .card-body {
        padding: 0.5rem !important;
    }
    
    .table {
        font-size: 0.75rem !important;
    }
    
    .btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
}

/* Print Styles - Compact */
@media print {
    body {
        font-size: 0.75rem !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .btn {
        display: none !important;
    }
}

/* Custom Compact Classes */
.compact-card {
    margin-bottom: 0.5rem !important;
}

.compact-card .card-body {
    padding: 0.5rem !important;
}

.compact-table {
    font-size: 0.75rem !important;
}

.compact-table th,
.compact-table td {
    padding: 0.25rem 0.3rem !important;
}

.compact-form .form-control {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.75rem !important;
}

.compact-form .form-label {
    font-size: 0.75rem !important;
    margin-bottom: 0.2rem !important;
}

/* Dashboard Specific Compact Styles */
.dashboard-stats .card-body {
    padding: 0.5rem !important;
}

.dashboard-stats .h4 {
    font-size: 1rem !important;
    margin-bottom: 0.2rem !important;
}

.dashboard-stats .text-xs {
    font-size: 0.65rem !important;
}

/* Service Cards Compact */
.service-card {
    margin-bottom: 0.5rem !important;
}

.service-card .card-body {
    padding: 0.5rem !important;
}

.service-card .card-title {
    font-size: 0.8rem !important;
    margin-bottom: 0.3rem !important;
}

.service-card .card-text {
    font-size: 0.75rem !important;
    margin-bottom: 0.3rem !important;
}

/* Lead Cards Compact */
.lead-card {
    margin-bottom: 0.5rem !important;
}

.lead-card .card-body {
    padding: 0.5rem !important;
}

.lead-card .card-title {
    font-size: 0.8rem !important;
}

.lead-card .card-text {
    font-size: 0.75rem !important;
}

/* Operator Cards Compact */
.operator-card {
    margin-bottom: 0.5rem !important;
}

.operator-card .card-body {
    padding: 0.5rem !important;
}

.operator-card .card-title {
    font-size: 0.8rem !important;
}

.operator-card .card-text {
    font-size: 0.75rem !important;
}
