/* Lead Management System - Professional Blue & White Theme */

/* ===========================================
   Reset & Base Styles
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f3f4f6;
    color: #1f2937;
    line-height: 1.6;
}

/* ===========================================
   Login Page
   =========================================== */
.login-body {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #2563eb;
    font-size: 32px;
    margin-bottom: 10px;
}

.login-header p {
    color: #6b7280;
    font-size: 16px;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-footer {
    margin-top: 25px;
    text-align: center;
}

.login-footer p {
    color: #6b7280;
    margin-bottom: 15px;
}

.login-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

.demo-credentials {
    margin-top: 20px;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 6px;
}

.demo-credentials small {
    color: #6b7280;
}

/* ===========================================
   Dashboard Layout
   =========================================== */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #e5e7eb;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.sidebar-header h2 {
    color: white;
    font-size: 22px;
    text-align: center;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f3f4f6;
    color: #2563eb;
    border-left-color: #2563eb;
}

.nav-item.active {
    background: #dbeafe;
    color: #2563eb;
    border-left-color: #2563eb;
    font-weight: 600;
}

.nav-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 28px;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    background: #f3f4f6;
}

/* Header */
.top-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-header h1 {
    font-size: 24px;
    color: #1f2937;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-menu span {
    color: #6b7280;
    font-weight: 600;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 6px;
    margin-top: 8px;
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #374151;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background: #f3f4f6;
}

/* Content Area */
.content-area {
    padding: 30px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 28px;
    color: #1f2937;
    margin-bottom: 5px;
}

.page-header p {
    color: #6b7280;
    font-size: 16px;
}

/* ===========================================
   Cards
   =========================================== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.card-header h3 {
    font-size: 18px;
    color: #1f2937;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

/* ===========================================
   Statistics Cards
   =========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-info h3 {
    font-size: 32px;
    color: #1f2937;
    margin-bottom: 5px;
}

.stat-info p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 3px;
}

.stat-info small {
    color: #9ca3af;
    font-size: 12px;
}

/* ===========================================
   Forms
   =========================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-form input,
.filter-form select {
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

.filter-form input {
    flex: 1;
    min-width: 200px;
}

/* ===========================================
   Buttons
   =========================================== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-info:hover {
    background: #2563eb;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* ===========================================
   Tables
   =========================================== */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: #f9fafb;
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

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

/* ===========================================
   Badges
   =========================================== */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-new {
    background: #dbeafe;
    color: #1e40af;
}

.badge-progress {
    background: #fef3c7;
    color: #92400e;
}

.badge-completed {
    background: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.badge-high {
    background: #fee2e2;
    color: #991b1b;
}

.badge-medium {
    background: #fef3c7;
    color: #92400e;
}

.badge-low {
    background: #d1fae5;
    color: #065f46;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ===========================================
   Alerts
   =========================================== */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* ===========================================
   Activity & Timeline
   =========================================== */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
}

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

.activity-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin-bottom: 5px;
}

.activity-content small {
    display: block;
    color: #9ca3af;
    font-size: 12px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
}

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: #2563eb;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #2563eb;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 17px;
    width: 2px;
    height: calc(100% - 10px);
    background: #e5e7eb;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-content h4 {
    color: #1f2937;
    margin-bottom: 5px;
    font-size: 16px;
}

.timeline-content p {
    color: #6b7280;
    margin-bottom: 5px;
}

/* ===========================================
   Notes
   =========================================== */
.notes-list {
    max-height: 400px;
    overflow-y: auto;
}

.note-item {
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #2563eb;
}

.note-item p {
    color: #374151;
    margin-bottom: 10px;
}

/* ===========================================
   Profile
   =========================================== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 25px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-info h2 {
    color: #1f2937;
    margin-bottom: 8px;
}

.profile-info p {
    color: #6b7280;
    margin-bottom: 5px;
}

/* Lead Info Grid */
.lead-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item label {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 5px;
    font-weight: 600;
}

.info-item p {
    color: #1f2937;
    font-size: 15px;
    font-weight: 500;
}

/* ===========================================
   Utilities
   =========================================== */
.text-muted {
    color: #9ca3af !important;
}

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

.mb-3 {
    margin-bottom: 15px !important;
}

.mt-3 {
    margin-top: 15px !important;
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-form input,
    .filter-form select {
        width: 100%;
    }
}