:root {
    --primary: #6200ea; /* Deep Purple */
    --primary-light: #b388ff;
    --primary-dark: #283593;
    --secondary: #2962ff; /* Blue A700 */
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --text-main: #202124;
    --text-muted: #5f6368;
    --border: #dadce0;
    --shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Roboto', 'Segoe UI', sans-serif; }

body { background-color: var(--bg-body); color: var(--text-main); display: flex; flex-direction: column; min-height: 100vh; }

/* Layout */
.app-container { display: flex; flex: 1; }
.sidebar { width: 250px; background: var(--bg-card); border-right: 1px solid var(--border); padding: 20px; display: none; } /* Mobile first hidden */
.main-content { flex: 1; padding: 20px; width: 100%; }

/* Responsive Sidebar */
@media (min-width: 768px) {
    .sidebar { display: block; }
}

/* Components */
.card { background: var(--bg-card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.btn { background: var(--primary); color: white; padding: 10px 20px; border: none; border-radius: 24px; cursor: pointer; font-weight: 500; transition: 0.2s; }
.btn:hover { box-shadow: 0 4px 8px rgba(98, 0, 234, 0.3); }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-control { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: #f8f9fa; }
.form-control:focus { border-color: var(--primary); outline: none; background: #fff; }

/* Tables */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; }

/* Utility */
.text-primary { color: var(--primary); }

/* Floating Inputs (Google Style) */
.input-group { position: relative; margin-bottom: 20px; }
.input-group input, .input-group select {
    width: 100%; padding: 12px 12px 12px 12px;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 1rem; background: white; transition: 0.2s;
}
.input-group input:focus, .input-group select:focus {
    border-color: var(--primary); outline: none;
    box-shadow: 0 0 0 3px rgba(98, 0, 234, 0.1);
}
.input-group label {
    position: absolute; top: -10px; left: 10px;
    background: white; padding: 0 5px; font-size: 0.75rem;
    color: var(--primary); font-weight: 500;
}

/* Status Badges */
.badge { padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.badge.new { background: #e3f2fd; color: #1565c0; }
.badge.lead { background: #fff3e0; color: #ef6c00; }
.badge.client { background: #e8f5e9; color: #2e7d32; }

/* 360 View Tabs */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab { padding: 15px 20px; cursor: pointer; color: var(--text-muted); font-weight: 500; border-bottom: 2px solid transparent; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; animation: fadeIn 0.3s; }
.tab-content.active { display: block; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Floating Action Button (FAB) Mobile */
.fab {
    position: fixed; bottom: 20px; right: 20px;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(98, 0, 234, 0.4);
    cursor: pointer; transition: transform 0.2s; z-index: 100;
}
.fab:active { transform: scale(0.95); }

/* Company colors */
.badge.prospect { background: #e0f7fa; color: #006064; }
.badge.active { background: #e8f5e9; color: #1b5e20; }
.badge.churn { background: #ffebee; color: #b71c1c; }

/* Autocomplete results */
.autocomplete-items {
    position: absolute; border: 1px solid #d4d4d4; border-bottom: none; border-top: none; z-index: 99;
    top: 100%; left: 0; right: 0; background-color: #fff; max-height: 200px; overflow-y: auto;
    border-radius: 0 0 8px 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.autocomplete-items div { padding: 10px; cursor: pointer; border-bottom: 1px solid #d4d4d4; }
.autocomplete-items div:hover { background-color: #e9e9e9; }

/* Timeline Component (HU-046) */
.timeline { border-left: 2px solid var(--border); margin-left: 10px; padding-left: 20px; position: relative; }
.timeline-item { margin-bottom: 25px; position: relative; }
.timeline-item::before {
    content: ''; position: absolute; left: -26px; top: 0;
    width: 10px; height: 10px; background: white; border: 2px solid var(--primary); border-radius: 50%;
}
.timeline-date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.timeline-content { background: #f8f9fa; padding: 10px 15px; border-radius: 8px; font-size: 0.9rem; }
.timeline-user { font-weight: 600; font-size: 0.8rem; color: var(--primary-dark); }

/* Status Badges Colors Extended */
.badge.new, .badge.prospect { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.badge.lead { background: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }
.badge.client, .badge.active { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.badge.churn, .badge.inactive { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }