/* Q3 Prototype Styles */

/* Authentication Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f4f6f5;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo .logo-icon {
    background: var(--sidebar-active);
    color: white;
    border-radius: 50%;
    padding: 10px 15px;
    font-size: 24px;
    margin-bottom: 15px;
    display: inline-block;
}

.auth-title {
    color: var(--sidebar-active);
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 30px;
}

.auth-form .form-control {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.auth-form .btn-primary {
    background: var(--sidebar-active);
    border: none;
    padding: 12px;
    width: 100%;
    font-weight: bold;
}

.auth-form .btn-primary:hover {
    background: var(--sidebar-hover);
}

.auth-error {
    color: var(--sidebar-active);
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
}

.logout-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    background: white;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.logout-btn:hover {
    background: #f5f5f5;
}

.config-btn {
    position: fixed;
    top: 60px;
    right: 16px;
    z-index: 9999;
    background: var(--sidebar-active);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.config-btn:hover {
    background: var(--sidebar-hover);
}

.main-content-wrapper {
    display: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.main-content-wrapper.authenticated {
    display: block;
}

:root {
    --sidebar-bg: #ffffff;
    --sidebar-text: #2c3e50;
    --sidebar-active: #ed2024;
    --sidebar-hover: #ff3a3f;
    --header-bg: #424242;
    --widget-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Header */
.top-header {
    background: var(--header-bg);
    color: white;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
    margin: 0;
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
}

/* Ensure container-fluid has no unwanted margins commented out because it was causing the left padding to be lost
.container-fluid {
    padding-left: 0px;
    padding-right: 0px;
}
*/

/* Ensure top header container extends properly */
.top-header .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

.logo {
    font-weight: bold;
    font-size: 18px;
}

.logo .logo-icon {
    background: #e67e22;
    color: white;
    border-radius: 50%;
    padding: 5px 8px;
    margin-right: 8px;
}

.help-desk {
    font-size: 18px;
}

/* Standardize user info section */
.user-info {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 30px;
}

/* Sidebar */
.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    min-height: calc(100vh - 60px);
    padding-left: 12px;
    position: relative;
    padding-bottom: 70px; /* Make room for settings button */
}

.sidebar-header {
    padding: 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: bold;
    font-size: 14px;
    color: #2c3e50;
}

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

.sidebar-menu li {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #2c3e50;
}

.sidebar-menu li:hover {
    background-color: #f5f6f7;
    color: var(--sidebar-hover);
}

.sidebar-menu li.active {
    background-color: var(--sidebar-active);
    color: #ffffff;
}

.sidebar-menu li i {
    margin-right: 10px;
    width: 20px;
}

.submenu-indicator {
    float: right;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.submenu-indicator.rotated {
    transform: rotate(180deg);
}

.menu-item-with-submenu {
    position: relative;
}

.menu-item-with-submenu a {
    color: #2c3e50;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
    padding: 12px 15px;
}

.menu-item-with-submenu a:hover {
    background-color: #f5f6f7;
    color: var(--sidebar-hover);
}

/* Make submenu parent items behave like regular menu items */
.menu-item-with-submenu:hover {
    background-color: #f5f6f7;
}

.menu-item-with-submenu:hover a {
    color: var(--sidebar-hover);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--sidebar-active);
}

.submenu li {
    padding: 8px 15px 8px 35px;
    border-bottom: 1px solid #3d2f4a;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 13px;
    color: #ffffff;
}

.submenu li:hover {
    background-color: var(--sidebar-hover);
    color: #ffffff;
}

/* Sidebar footer (settings button) */
.sidebar-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 16%; /* col-md-2 width to match sidebar */
    background-color: var(--sidebar-bg);
    border-top: 1px solid #ecf0f1;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--sidebar-text);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

.sidebar-footer:hover {
    background-color: #ffebee;
    color: var(--sidebar-active);
}

.sidebar-footer.active {
    background-color: var(--sidebar-active);
    color: #ffffff;
}

.sidebar-footer i {
    font-size: 16px;
}

/* Responsive settings button */
@media (max-width: 767.98px) {
    .sidebar-footer {
        width: 100%;
        display: none; /* Hide on mobile or adjust as needed */
    }
}

/* Main Content */
.main-content {
    padding: 20px;
}

.page-title {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
}

/* KPI Widgets */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-widget {
    background: var(--widget-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s;
}

.kpi-widget:hover {
    transform: translateY(-2px);
}

.kpi-widget.blue {
    border-left: 4px solid #3498db;
}

.kpi-widget.teal {
    border-left: 4px solid #1abc9c;
}

.kpi-widget.grey {
    border-left: 4px solid #95a5a6;
}

.kpi-widget.orange {
    border-left: 4px solid #e67e22;
}

.kpi-widget.yellow {
    border-left: 4px solid #f39c12;
}

.kpi-widget.green {
    border-left: 4px solid #27ae60;
}

.kpi-widget.pink {
    border-left: 4px solid #e91e63;
}

.kpi-widget.purple {
    border-left: 4px solid #9b59b6;
}

.kpi-widget.dark-blue {
    border-left: 4px solid #2c3e50;
}

.kpi-widget.dark-grey {
    border-left: 4px solid #34495e;
}

.kpi-widget i {
    font-size: 24px;
    margin-bottom: 10px;
}

.kpi-widget.blue i {
    color: #3498db;
}

.kpi-widget.teal i {
    color: #1abc9c;
}

.kpi-widget.grey i {
    color: #95a5a6;
}

.kpi-widget.orange i {
    color: #e67e22;
}

.kpi-widget.yellow i {
    color: #f39c12;
}

.kpi-widget.green i {
    color: #27ae60;
}

.kpi-widget.pink i {
    color: #e91e63;
}

.kpi-widget.purple i {
    color: #9b59b6;
}

.kpi-widget.dark-blue i {
    color: #2c3e50;
}

.kpi-widget.dark-grey i {
    color: #34495e;
}

.widget-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.widget-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
}

/* Data Tables */
.data-section {
    background: var(--widget-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.table-responsive {
    border-radius: 4px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: var(--text-primary);
}

.table td {
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Status badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-new {
    background: #e3f2fd;
    color: #1976d2;
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-approved {
    background: #e8f5e8;
    color: #388e3c;
}

.status-declined {
    background: #ffebee;
    color: var(--sidebar-active);
}

.status-completed {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Buttons */
.btn-view {
    background: #3498db;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
}

.btn-view:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

/* Filter section */
.filter-section {
    background: var(--widget-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 120px;
}

.date-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-inputs input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 500;
}

.search-btn:hover {
    background: #2980b9;
}

.error-message {
    color: var(--sidebar-active);
    font-size: 14px;
    margin-top: 10px;
}

/* Report section */
.report-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.report-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.report-condition {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.report-buttons {
    display: flex;
    gap: 10px;
}

.btn-print, .btn-pdf, .btn-excel {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    color: var(--text-primary);
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
}

.btn-print:hover, .btn-pdf:hover, .btn-excel:hover {
    background: #f8f9fa;
    color: var(--text-primary);
    text-decoration: none;
}

/* Pagination */
.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.pagination .page-link {
    color: var(--text-primary);
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #3498db;
    border-color: #3498db;
}

.pagination .page-link:hover {
    background-color: #f8f9fa;
    color: var(--text-primary);
}

/* Quote links */
.quote-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.quote-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Highlighted rows */
.table tbody tr.highlighted {
    background-color: #ffebee !important;
}

/* Chart Section */
.chart-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-legend {
    padding: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 10px;
    display: inline-block;
}

/* Responsive design */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-inputs {
        flex-direction: column;
    }
    
    .report-buttons {
        flex-wrap: wrap;
    }
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px 25px;
}

.modal-title {
    color: #2c3e50;
    font-weight: 600;
}

.modal-body {
    padding: 0 25px 20px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-check-label {
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
}

.btn-primary {
    background: var(--sidebar-active);
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--sidebar-hover);
}

/* Configuration Modal Styles */
.config-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.config-section-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.config-section-title i {
    color: var(--sidebar-active);
}

.customer-purchase-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customer-purchase-options .form-check {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.customer-purchase-options .form-check:hover {
    border-color: var(--sidebar-active);
    background: #f8f4ff;
}

.customer-purchase-options .form-check-input:checked ~ .form-check-label {
    color: var(--sidebar-active);
}

.customer-purchase-options .form-check-input:checked + .form-check-label + * {
    border-color: var(--sidebar-active);
}

.customer-purchase-options .form-check-label {
    cursor: pointer;
    width: 100%;
    margin-left: 10px;
}

.customer-purchase-options .form-check-label strong {
    display: block;
    margin-bottom: 4px;
}

.nav-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-toggle-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.nav-toggle-item:hover {
    border-color: var(--sidebar-active);
    background: #f8f4ff;
}

.nav-toggle-item .form-check-label {
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    margin-bottom: 0;
}

.nav-toggle-item .form-check {
    margin: 0;
}

.nav-toggle-item .form-check-input {
    cursor: pointer;
}

.nav-toggle-item .form-check-input:checked {
    background-color: var(--sidebar-active);
    border-color: var(--sidebar-active);
}

.nav-toggle-item .form-check-input:focus {
    border-color: var(--sidebar-hover);
    box-shadow: 0 0 0 0.25rem rgba(237, 32, 36, 0.25);
}

/* Timeline Styles for Lead Modal */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -22px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #e0e0e0;
}

.timeline-content {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    margin-left: 10px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.timeline-header strong {
    color: #333;
    font-size: 14px;
}

.timeline-header small {
    font-size: 12px;
}

.timeline-content p {
    margin: 0;
    color: #666;
    font-size: 13px;
}

/* Lead Modal Specific Styles */
#leadModal .modal-dialog {
    max-width: 800px;
}

#leadModal .card {
    border: 1px solid #dee2e6;
    box-shadow: none;
}

#leadModal .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

#leadModal .btn {
    font-size: 14px;
    padding: 8px 16px;
}

#leadModal .d-grid.gap-2 {
    gap: 0.5rem !important;
} 