/* General Styles */
:root {
    --primary-color: #00D8B4;
    --primary-rgb: 0, 216, 180;
    --primary-hover: #00C7B3;
    --secondary-color: #333333;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --transition-speed: 0.2s;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Authentication Section */
#auth-section {
    margin: 100px auto;
    text-align: center;
    max-width: 600px;
}

#auth-section h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

#login-button {
    background-color: var(--primary-color);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

#login-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
}

/* Cards */
.card {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: box-shadow var(--transition-speed);
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
}

.card-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Account Search */
#account-search {
    border-radius: 6px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    transition: border-color var(--transition-speed);
}

#account-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(27, 150, 255, 0.1);
}

#account-results {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 1rem;
}

.list-group-item {
    border: 1px solid var(--border-color);
    margin-bottom: -1px;
    padding: 1rem;
    transition: all var(--transition-speed);
}

.list-group-item:hover {
    background-color: #f8fafc;
}

/* Quote Builder */
#selected-account {
    background-color: rgba(27, 150, 255, 0.1);
    border: none;
    border-radius: 6px;
    padding: 1rem;
}

/* Products Table */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    color: var(--secondary-color);
    font-weight: 600;
    padding: 1rem;
}

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

.quantity-input {
    width: 80px;
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: center;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all var(--transition-speed);
}

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

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

.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);
    color: white;
}

/* Form Controls */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    transition: border-color var(--transition-speed);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
}

.table th {
    font-weight: 600;
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

/* List Groups */
.list-group-item {
    border: 1px solid var(--border-color);
    margin-bottom: -1px;
    padding: 1rem;
    transition: all var(--transition-speed);
}

.list-group-item:first-child {
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.list-group-item:last-child {
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
    margin-bottom: 0;
}

.list-group-item:hover {
    background-color: #f8fafc;
}

.list-group-item-action {
    cursor: pointer;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 0.25rem;
}

/* Alerts */
.alert {
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* Modals */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: var(--card-shadow);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem;
}

/* Input Groups */
.input-group-text {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
}

/* Quote Preview */
.quote-preview {
    padding: 2rem;
    background-color: white;
}

/* Quote Preview Styles */
.quote-preview {
    background-color: white;
    font-size: 14px;
}

.quote-preview h2 {
    color: var(--primary-color);
    font-weight: 600;
}

.company-logo img {
    width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.company-name {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.5rem;
}

.company-details,
.client-details {
    line-height: 1.6;
    color: #444;
}

.quote-info-table {
    margin-left: auto;
    min-width: 200px;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.quote-info-table td {
    padding: 4px 0;
}

.terms-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.terms-list li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 0.8em;
    color: #444;
    line-height: 1.4;
}

.terms-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

#quote-notes {
    color: #444;
    line-height: 1.6;
    font-style: italic;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
}

.signature-line {
    border-bottom: 1px solid #ccc;
    margin-bottom: 8px;
    width: 80%;
}

/* Table Styles */
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(var(--primary-rgb), 0.05);
}

.table-primary {
    background-color: rgba(var(--primary-rgb), 0.1) !important;
}

.table > :not(caption) > * > * {
    padding: 1rem;
}

/* Print Styles */
@media print {
    .quote-preview {
        padding: 20px;
    }

    .modal-dialog {
        max-width: none;
        margin: 0;
    }

    .modal-content {
        border: none;
        box-shadow: none;
    }

    .btn-close,
    #download-pdf {
        display: none;
    }

    .company-logo img {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .quote-preview {
        font-size: 13px;
    }

    .company-logo,
    .quote-details {
        text-align: center !important;
        margin-bottom: 2rem;
    }

    .quote-info-table {
        margin: 0 auto;
    }

    .signature-section {
        margin-bottom: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn var(--transition-speed);
}

/* Date inputs */
input[type="date"].form-control {
    min-width: 140px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        margin-bottom: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Responsive adjustments for the new columns */
@media (max-width: 992px) {
    .table td, .table th {
        min-width: 120px;
    }
    
    td:nth-child(3), /* Start Date */
    td:nth-child(4), /* End Date */
    th:nth-child(3),
    th:nth-child(4) {
        min-width: 140px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Dashboard Styles */
#dashboard .card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: none;
    transition: transform 0.2s ease-in-out;
}

#dashboard .card:hover {
    transform: translateY(-2px);
}

#dashboard .card-title {
    color: #495057;
    font-weight: 600;
}

#dashboard .card-subtitle {
    font-size: 0.875rem;
}

#dashboard .text-success {
    color: #28a745 !important;
}

#dashboard .text-danger {
    color: #dc3545 !important;
}

#dashboard canvas {
    max-height: 300px;
}

#dashboard .table th {
    font-weight: 600;
    color: #495057;
}

#dashboard .table td {
    vertical-align: middle;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #dashboard .card {
        margin-bottom: 1rem;
    }
    
    #dashboard .row {
        margin-bottom: 0 !important;
    }
}

/* Navigation Styles */
.nav-pills .nav-link {
    color: var(--primary-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.nav-pills .nav-link:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
}

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

.nav-pills .nav-link i {
    font-size: 1.1em;
}

/* Add some spacing to the top of the page */
.container-fluid {
    padding-top: 1.5rem;
}

/* Make the header more prominent */
.container-fluid > .d-flex > h2 {
    margin-bottom: 0;
    color: var(--primary-color);
}
