/* TechRoof CRM - Modern Design System */

:root {
    /* Primary Colors */
    --primary-blue: #0066FF;
    --primary-black: #0A0A0A;
    --primary-white: #FFFFFF;
    
    /* Accent Colors */
    --accent-gold: #FFB800;
    --accent-green: #00D084;
    --accent-red: #FF3B30;
    
    /* Neutral Colors */
    --gray-50: #F9FAFB;
    --gray-100: #F8F9FA;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --crm-surface: #F5F7FA;
    --crm-card-border: #E0E6ED;
    --crm-shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", monospace;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--gray-100);
    color: var(--primary-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern Navigation Bar */
.navbar {
    background: var(--primary-white) !important;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-black) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    color: var(--primary-blue);
}

.navbar-nav .nav-link {
    color: var(--gray-700) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: var(--gray-100);
    color: var(--primary-black) !important;
}

.navbar-nav .nav-link.active {
    background-color: var(--primary-blue);
    color: var(--primary-white) !important;
}

/* Modern Cards */
.card {
    background: var(--primary-white);
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--primary-white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
}

/* Modern Buttons */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    transition: background 0.2s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

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

.btn-primary:hover {
    background: #0052CC;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary-white);
}

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

.btn-success:hover {
    background: #00B571;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary-white);
}

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

.btn-danger:hover {
    background: #D70015;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary-white);
}

.btn-warning {
    background: var(--accent-gold);
    color: var(--primary-black);
}

.btn-warning:hover {
    background: #E6A500;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary-black);
}

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

.btn-dark:hover {
    background: var(--gray-900);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Modern Forms */
.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.form-control,
.form-select {
    border: 2px solid var(--gray-300);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--primary-white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
    outline: none;
}

/* Modern Badges */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

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

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

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

.bg-warning {
    background-color: var(--accent-gold) !important;
    color: var(--primary-black) !important;
}

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

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

/* Modern Tables */
.table {
    background: var(--primary-white);
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background: var(--gray-100);
    border-bottom: 2px solid var(--gray-300);
    font-weight: 600;
    color: var(--gray-700);
    padding: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.table tbody tr {
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--gray-800);
}

/* Modern Stat Cards */
.stat-card {
    background: var(--primary-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-green));
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-black);
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Modern Sidebar */
.sidebar {
    background: var(--primary-white);
    border-right: 1px solid var(--gray-200);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    padding-top: 70px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu-item {
    margin: 0.25rem 1rem;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.sidebar-menu-link:hover {
    background: var(--gray-100);
    color: var(--primary-blue);
}

.sidebar-menu-link.active {
    background: var(--primary-blue);
    color: var(--primary-white);
}

.sidebar-menu-link i {
    width: 20px;
    margin-right: 0.75rem;
}

/* Modern Page Headers */
.page-header {
    background: var(--primary-white);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-blue);
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--gray-600);
    margin: 0;
}

/* Modern Modals */
.modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
    color: var(--primary-black);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
    background: var(--gray-50);
}

/* Modern Dropdowns */
.dropdown-menu {
    border: none;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--primary-blue);
}

/* Modern Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(0, 208, 132, 0.1);
    color: var(--accent-green);
    border-left: 4px solid var(--accent-green);
}

.alert-danger {
    background: rgba(255, 59, 48, 0.1);
    color: var(--accent-red);
    border-left: 4px solid var(--accent-red);
}

.alert-warning {
    background: rgba(255, 184, 0, 0.1);
    color: #CC9400;
    border-left: 4px solid var(--accent-gold);
}

/* Modern Progress Bars */
.progress {
    height: 0.75rem;
    background: var(--gray-200);
    border-radius: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-green));
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Utilities */
.text-primary { color: var(--primary-blue) !important; }
.text-success { color: var(--accent-green) !important; }
.text-danger { color: var(--accent-red) !important; }
.text-warning { color: var(--accent-gold) !important; }
.text-dark { color: var(--primary-black) !important; }
.text-muted { color: var(--gray-600) !important; }

.border-primary { border-color: var(--primary-blue) !important; }
.border-success { border-color: var(--accent-green) !important; }
.border-danger { border-color: var(--accent-red) !important; }
.border-warning { border-color: var(--accent-gold) !important; }

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .content-wrapper {
        margin-left: 0;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
}

/* CRM Professional Shell */
body.crm-shell {
    --primary-blue: #1F3A63;
    --accent-gold: #D99A1B;
    --accent-green: #2E7D5F;
    --accent-red: #C23B22;
    --primary-black: #1F2837;
    --gray-100: #F4F6F9;
    --gray-200: #E4E7EC;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475467;
    --gray-700: #344054;
    --gray-800: #1D2939;
    --gray-900: #101828;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #F5F7FA;
    color: var(--primary-black);
    margin: 0;
    padding: 0;
}

body.crm-shell .main-content {
    background: #F5F7FA;
    padding: 0;
    min-height: auto;
}

body.crm-shell .main-footer {
    background: #FFFFFF;
    border-top: 1px solid #E0E6ED;
    padding: 1rem 0;
    margin-top: auto;
}

body.crm-shell .btn {
    border-radius: 0.375rem;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

body.crm-shell .btn-outline-primary {
    border-width: 1px;
}

body.crm-shell .badge {
    border-radius: 999px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.75rem;
}

/* CRM Dashboard Components */
.crm-dashboard {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1.25rem 1.5rem 2rem;
}

@media (max-width: 768px) {
    .crm-dashboard {
        padding: 1rem 1rem 1.5rem;
    }
}

.crm-page-heading {
    background: #FFFFFF;
    border-bottom: 1px solid #E0E6ED;
    border-radius: 0;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-shadow: none;
    margin: 0 -1.5rem 1.25rem;
    width: calc(100% + 3rem);
}

@media (max-width: 768px) {
    .crm-page-heading {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        margin: 0 -1rem 1rem;
        width: calc(100% + 2rem);
    }
}

.crm-page-heading h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-black);
}

.crm-page-heading p {
    margin: 0.25rem 0 0;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.crm-eyebrow {
    display: none;
}

.crm-heading-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.crm-panel {
    background: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    box-shadow: none;
}

.crm-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.crm-section-title h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-black);
}

.crm-section-title p {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.crm-section-title small {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.crm-pill {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.crm-quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.crm-quick-link {
    border: 1px solid #E0E6ED;
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: #FFFFFF;
    text-decoration: none;
    color: var(--primary-black);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.crm-quick-link:hover {
    border-color: var(--primary-blue);
    background: #F8FAFC;
}

.crm-quick-icon {
    width: 36px;
    height: 36px;
    border-radius: 0.375rem;
    background: #F1F5F9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.crm-quick-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.crm-quick-subtext {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.crm-metric-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1100px) {
    .crm-metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .crm-metric-grid {
        grid-template-columns: 1fr;
    }
}

.crm-metric-card {
    background: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    box-shadow: none;
}

.crm-metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
}

.crm-metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-black);
    line-height: 1.2;
    margin: 0.25rem 0;
}

.crm-metric-trend {
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
}

.crm-metric-trend.is-positive {
    background: rgba(46, 125, 95, 0.15);
    color: #1F6B4D;
}

.crm-metric-trend.is-neutral {
    background: rgba(217, 154, 27, 0.15);
    color: #8A5A0A;
}

.crm-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.crm-activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid #E0E6ED;
}

.crm-activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.crm-activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F1F5F9;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.crm-activity-icon.is-job {
    color: var(--accent-green);
}

.crm-activity-icon.is-appointment {
    color: var(--accent-gold);
}

.crm-activity-content {
    flex: 1;
}

.crm-activity-title {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.1rem;
    color: var(--primary-black);
}

.crm-activity-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.crm-empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--gray-500);
    border: 1px dashed var(--crm-card-border);
    border-radius: 0.75rem;
    background: var(--gray-50);
}

.crm-activity-more {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.crm-activity-more a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}

.crm-activity-more a:hover {
    text-decoration: underline;
}

.crm-score-list {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crm-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
}

.crm-score-row span:last-child {
    color: var(--primary-black);
    font-weight: 600;
}

/* CRM Filters */
.crm-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.crm-filter-group {
    min-width: 150px;
    flex: 1;
    max-width: 220px;
}

.crm-filter-actions {
    display: flex;
    gap: 0.5rem;
}

/* CRM Table */
.crm-table-wrapper {
    overflow-x: auto;
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.crm-table thead th {
    background: #F8FAFC;
    border-bottom: 1px solid #E0E6ED;
    padding: 0.625rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--gray-600);
    white-space: nowrap;
}

.crm-table tbody td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #E0E6ED;
    vertical-align: middle;
}

.crm-table tbody tr:hover {
    background: #F8FAFC;
}

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

.crm-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.crm-link:hover {
    text-decoration: underline;
}

.crm-actions {
    display: flex;
    gap: 0.25rem;
}

.crm-actions .btn {
    padding: 0.25rem 0.5rem;
}

/* CRM Tabs */
.crm-tabs {
    border-bottom: 1px solid #E0E6ED;
    gap: 0.25rem;
}

.crm-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray-600);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: transparent;
    border-radius: 0;
}

.crm-tabs .nav-link:hover {
    color: var(--primary-blue);
    border-bottom-color: #E0E6ED;
}

.crm-tabs .nav-link.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    background: transparent;
}

/* Two-column layout for activity + performance */
.crm-two-col {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1rem;
    margin-top: 1rem;
}

@media (max-width: 992px) {
    .crm-two-col {
        grid-template-columns: 1fr;
    }
}

.crm-activity-panel {
    min-height: 0;
}

.crm-performance-panel {
    min-height: 0;
}

.crm-chart-wrap {
    max-width: 180px;
    margin: 0 auto 0.5rem;
}

/* Autocomplete dropdown */
.crm-autocomplete-wrapper {
    position: relative;
}

.crm-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1060;
    max-height: 280px;
    overflow-y: auto;
}

.crm-autocomplete-item {
    width: 100%;
    border: none;
    background: transparent;
    color: #1e293b;
    text-align: left;
    padding: 12px 16px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
}

.crm-autocomplete-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.crm-autocomplete-item:hover {
    background: #f8fafc;
}

.crm-autocomplete-item:focus {
    background: #eff6ff;
    outline: none;
}

.crm-autocomplete-item .fa-map-marker-alt {
    color: #3b82f6;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.crm-autocomplete-item .address-text {
    flex: 1;
}

.crm-autocomplete-item .address-main {
    font-weight: 500;
    color: #1e293b;
}

.crm-autocomplete-item .address-secondary {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.crm-autocomplete-powered {
    padding: 8px 16px;
    font-size: 11px;
    color: #94a3b8;
    text-align: right;
    background: #f8fafc;
    border-radius: 0 0 8px 8px;
}

.crm-autocomplete-powered img {
    height: 14px;
    vertical-align: middle;
    margin-left: 4px;
}

/* ============================================= */
/* ========== MOBILE RESPONSIVE STYLES ========= */
/* ============================================= */

@media (max-width: 992px) {
    /* Dashboard Page Heading */
    .crm-page-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .crm-heading-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }
    
    .crm-heading-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    /* Quick Links Grid */
    .crm-quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    /* Metrics Grid */
    .crm-metric-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Two Column Layout */
    .crm-two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Main Content */
    .main-content {
        padding: 0;
    }
    
    .main-content > .container-fluid {
        padding: 0.75rem;
    }
    
    /* Dashboard */
    .crm-dashboard {
        padding: 1rem;
    }
    
    .crm-page-heading h1 {
        font-size: 1.5rem;
    }
    
    .crm-page-heading p {
        font-size: 0.875rem;
    }
    
    .crm-eyebrow {
        font-size: 0.7rem;
    }
    
    /* Panel */
    .crm-panel {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .crm-section-title h2 {
        font-size: 1rem;
    }
    
    .crm-section-title p {
        font-size: 0.8rem;
    }
    
    /* Quick Links */
    .crm-quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .crm-quick-link {
        flex-direction: column;
        text-align: center;
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .crm-quick-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin: 0 auto;
    }
    
    .crm-quick-label {
        font-size: 0.75rem;
    }
    
    .crm-quick-subtext {
        display: none;
    }
    
    /* Metrics */
    .crm-metric-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .crm-metric-card {
        padding: 0.875rem;
    }
    
    .crm-metric-value {
        font-size: 1.25rem;
    }
    
    .crm-metric-label {
        font-size: 0.7rem;
    }
    
    .crm-metric-trend {
        font-size: 0.65rem;
    }
    
    /* Activity */
    .crm-activity-item {
        padding: 0.75rem;
    }
    
    .crm-activity-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .crm-activity-title {
        font-size: 0.8rem;
    }
    
    .crm-activity-time {
        font-size: 0.7rem;
    }
    
    /* Pill */
    .crm-pill {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Buttons */
    .crm-heading-actions .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .crm-dashboard {
        padding: 0.75rem;
    }
    
    .crm-page-heading h1 {
        font-size: 1.25rem;
    }
    
    .crm-heading-actions {
        flex-direction: column;
    }
    
    .crm-heading-actions .btn {
        width: 100%;
    }
    
    .crm-quick-links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .crm-quick-link {
        padding: 0.5rem;
    }
    
    .crm-quick-icon {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .crm-quick-label {
        font-size: 0.65rem;
    }
    
    .crm-metric-card {
        padding: 0.75rem;
    }
    
    .crm-metric-value {
        font-size: 1.1rem;
    }
}