/* CRM Base Styles - Glassmorphism Theme */
:root {
    --primary-color: #6366f1;
    /* Indigo */
    --primary-hover: #4f46e5;
    --secondary-color: #1e293b;
    /* Slate 800 */
    --accent-color: #8b5cf6;
    /* Violet */
    --bg-color: #f3f4f6;
    /* Gray 100 */
    --surface-color: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

body {
    background: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Glassmorphism Card */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(79, 70, 229, 0.3);
}

/* Dashboard Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 80px;
    /* Collapsed by default or just icons */
    background: var(--secondary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    transition: width 0.3s ease;
    z-index: 10;
}

.sidebar.expanded {
    width: 260px;
}

.sidebar-nav {
    flex: 1;
    width: 100%;
    margin-top: 40px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 26px;
    /* Center icon when collapsed */
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--accent-color);
}

.nav-icon {
    font-size: 1.4rem;
    min-width: 30px;
}

.nav-label {
    margin-left: 15px;
    font-weight: 500;
    display: none;
    /* Hidden when collapsed */
}

.sidebar.expanded .nav-label {
    display: block;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

/* Chat Layout */
.chat-layout {
    display: flex;
    height: 100%;
}

.chat-list {
    width: 350px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    background: white;
    display: flex;
    flex-direction: column;
}

.chat-area {
    flex: 1;
    background: #f0f2f5;
    /* WhatsApp-like bg */
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Utility */
.d-none {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}