/* Solar Quotation System Styles */

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8f9fa;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

body {
    background-color: #f5f6fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

/* Sidebar */
.sidebar {
    min-height: calc(100vh - 100px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link {
    color: #6c757d;
    border-radius: 8px;
    transition: all 0.3s ease;
    padding: 12px 16px;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

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

.sidebar .nav-link i {
    width: 20px;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0 !important;
    padding: 1.25rem;
}

/* Stats Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-info {
    border-radius: 12px;
    overflow: hidden;
}

.card.bg-primary .card-body,
.card.bg-success .card-body,
.card.bg-warning .card-body,
.card.bg-info .card-body {
    padding: 1.5rem;
}

/* Package Cards */
.package-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.package-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.package-card.selected {
    border-color: var(--success-color);
    background-color: #f8fff9;
}

.package-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.package-features {
    list-style: none;
    padding: 0;
}

.package-features li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.package-features li:last-child {
    border-bottom: none;
}

.package-features i {
    color: var(--success-color);
    margin-right: 0.5rem;
}

/* Tables */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

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

/* Status Badges */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-draft {
    background-color: #6c757d;
    color: white;
}

.status-sent {
    background-color: #17a2b8;
    color: white;
}

.status-accepted {
    background-color: #28a745;
    color: white;
}

.status-rejected {
    background-color: #dc3545;
    color: white;
}

.status-expired {
    background-color: #ffc107;
    color: #212529;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem;
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1e3d6f;
    border-color: #1e3d6f;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #1e7e34;
    border-color: #1e7e34;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Action Buttons */
.action-btn {
    padding: 0.375rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* Quotation Summary */
.quotation-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.summary-row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.summary-label {
    font-weight: 500;
}

.summary-value {
    font-weight: 600;
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 8px 8px 0 0;
    color: #6c757d;
    font-weight: 500;
    padding: 1rem 1.5rem;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--primary-color);
    background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: white;
    border-color: #dee2e6 #dee2e6 white;
    border-width: 1px 1px 2px;
}

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

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1.5rem;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-bottom: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .package-card {
        margin-bottom: 1rem;
    }
}

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

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

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

.bg-light-primary {
    background-color: rgba(44, 90, 160, 0.1) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.shadow-sm {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.shadow {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}

/* Quotation Cards */
.quotation-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.quotation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.quotation-card .card-header {
    border-radius: 12px 12px 0 0;
    padding: 1rem;
}

.quotation-card .card-body {
    padding: 1.25rem;
}

.quotation-card .card-footer {
    padding: 1rem;
    background-color: transparent;
}

.quotation-card .btn-group .btn {
    flex: 1;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

/* Sort Controls */
.sortable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.sortable:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.sortable.active {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

/* Responsive Grid */
@media (max-width: 576px) {
    .quotation-card .card-body {
        padding: 1rem;
    }
    
    .quotation-card .btn-group .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
    
    #quotations-cards-container {
        padding: 0.75rem !important;
    }
}

@media (min-width: 1400px) {
    #quotations-cards-container .col-xl-4 {
        flex: 0 0 auto;
        width: 33.333333%;
    }
}

@media (min-width: 1600px) {
    #quotations-cards-container .col-xl-4 {
        flex: 0 0 auto;
        width: 25%;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .modal {
        display: none !important;
    }
    
    .container-fluid {
        margin: 0;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}