/* DealWise Frontend - Custom Styles */

:root {
    --primary-color: #0066CC;
    --success-color: #28A745;
    --warning-color: #FFC107;
    --danger-color: #DC3545;
    --light-color: #F8F9FA;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    padding-top: 0; /* Remove default padding, handled by inline styles */
}

/* Navbar Sticky */
.navbar {
    z-index: 1030 !important; /* Bootstrap navbar z-index */
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 56px; /* Height of Bootstrap navbar */
    left: 0;
    bottom: 0;
    width: 250px;
    background-color: var(--dark-color);
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar .nav-link {
    color: #fff;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* KPI Card Styles */
.kpi-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
}

/* Button Styles */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Form Styles */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* Table Styles */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 102, 204, 0.05);
}

/* Loading Spinner */
._dash-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        left: 0;
        right: 0;
        width: 100%;
        bottom: auto;
        max-height: calc(100vh - 56px);
        transform: translateY(-100%);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
    }
    
    .sidebar.show {
        transform: translateY(0);
    }
    
    #page-content-container {
        margin-left: 0 !important;
    }
}

/* Chart Container */
.chart-container {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Utility Classes */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.text-truncate-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.fade-in {
    animation: fadeIn 0.3s ease-in;
}
