/* Quote Generator Styles */

:root {
    --primary-blue: #0066cc;
    --dark-blue: #0052a3;
    --light-blue: #f0f6ff;
    --primary-green: #28a745;
    --dark-green: #1e7e34;
    --yellow: #ffc107;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-700: #495057;
    --gray-900: #212529;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: var(--gray-900);
    line-height: 1.6;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-info {
    font-size: 0.9rem;
}

/* Admin Header - Green Theme */
.header.admin-header {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
}

/* Company Logo in Header */
.header-logo {
    height: 40px;
    max-width: 150px;
    object-fit: contain;
    margin-right: 1rem;
}

.header h1 {
    display: flex;
    align-items: center;
}

/* Navigation */
.nav {
    background: white;
    border-bottom: 1px solid var(--gray-300);
    padding: 0.5rem 2rem;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
}

.nav a {
    color: var(--gray-700);
    text-decoration: none;
    padding: 0.75rem 1rem;
    display: inline-block;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

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

.btn-primary:hover {
    background: var(--dark-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
    background: var(--gray-300);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-700);
    color: white;
}

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

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

.btn-danger {
    background: var(--danger);
    color: white;
}

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

.btn-warning {
    background: var(--warning);
    color: var(--gray-900);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    padding: 0.6rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-700);
    transition: all 0.2s;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: var(--primary-blue);
    background: var(--light-blue);
}

.btn-icon-danger:hover {
    color: var(--danger);
    background: #fee;
}

.btn-icon svg {
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-help {
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-top: 0.25rem;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
}

.table tr:hover {
    background: var(--light-blue);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* Status badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
}

.badge-draft {
    background: var(--gray-200);
    color: var(--gray-700);
}

.badge-sent {
    background: #cce5ff;
    color: #004085;
}

.badge-accepted {
    background: #d4edda;
    color: #155724;
}

.badge-rejected {
    background: #f8d7da;
    color: #721c24;
}

.badge-archived {
    background: var(--gray-300);
    color: var(--gray-700);
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: var(--gray-900);
}

.badge-primary {
    background: var(--primary-blue);
    color: white;
}

/* Search */
.search-box {
    position: relative;
    max-width: 400px;
}

.search-box input {
    padding-right: 2.5rem;
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-700);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary-blue);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bar */
.progress-container {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
}

.progress-bar-wrapper {
    width: 100%;
    height: 30px;
    background-color: var(--gray-200);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--dark-blue));
    border-radius: 15px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,102,204,0.3);
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--gray-700);
    font-weight: 500;
}

.progress-percentage {
    text-align: center;
    margin-top: 5px;
    font-size: 1.2rem;
    color: var(--primary-blue);
    font-weight: 600;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90%;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray-700);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }

/* Loading Overlay */
#loadingOverlay {
    display: flex;
    align-items: center;
    justify-content: center;
}
#loadingOverlay.hidden {
    display: none !important;
}

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

    .card {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-content {
        flex-direction: column;
        gap: 0;
    }

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

    .table-container {
        font-size: 0.875rem;
    }
}

/* Status Select Dropdown */
.status-select {
    padding: 0.5rem 0.75rem;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    min-width: 120px;
}

.status-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.status-draft {
    background: #e7f3ff;
    color: #0066cc;
    border-color: #cce5ff;
}

.status-sent {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.status-accepted {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.status-archived {
    background: #e2e3e5;
    color: #383d41;
    border-color: #d6d8db;
}

/* Modern Table Improvements */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.table tr {
    transition: all 0.2s;
}

.table tbody tr:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Modern Stat Cards */
.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-left: 4px solid var(--primary-blue);
}

.stat-card:nth-child(2) {
    border-left-color: #ffc107;
}

.stat-card:nth-child(3) {
    border-left-color: #17a2b8;
}

.stat-card:nth-child(4) {
    border-left-color: #28a745;
}
