/* ================================================
   Quotes List & Quote Detail Styles
   ================================================ */

/* ---- Container ---- */
.qt-container {
    max-width: 100%;
}

.qt-detail-container {
    max-width: 100%;
}

/* ---- Page Header ---- */
.qt-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.qt-page-title {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.qt-page-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 0 0;
}

.qt-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.qt-create-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}

.qt-create-btn:active {
    transform: scale(0.97);
}

/* ---- Filter Bar ---- */
.qt-filter-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.qt-filter-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.qt-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qt-filter-search {
    flex: 1;
    min-width: 180px;
}

.qt-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qt-input {
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s;
}

.qt-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.qt-filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.qt-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.qt-search-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.3);
}

.qt-search-btn:active {
    transform: scale(0.97);
}

.qt-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 36px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.qt-clear-btn:hover {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
}

/* ---- Table ---- */
.qt-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.qt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.qt-table thead tr {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
}

.qt-table thead th {
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    white-space: nowrap;
    border-bottom: 2px solid #1e3a8a;
}

.qt-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.qt-table tbody tr:hover {
    background: #f8fafc;
}

.qt-table tbody tr:last-child {
    border-bottom: none;
}

.qt-table td {
    padding: 10px 14px;
    color: #334155;
    vertical-align: middle;
}

.qt-right {
    text-align: right !important;
}

.qt-center {
    text-align: center !important;
}

.qt-total {
    font-weight: 700;
    color: #1e293b !important;
}

/* ---- Quote Link ---- */
.qt-quote-link {
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.15s;
}

.qt-quote-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ---- Item Count Badge ---- */
.qt-item-count-badge {
    display: inline-block;
    padding: 2px 10px;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ---- View Button ---- */
.qt-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #2563eb;
    background: #eff6ff;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.qt-view-btn:hover {
    background: #2563eb;
    color: #fff;
}

/* ---- Delete Button ---- */
.qt-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #dc2626;
    background: #fef2f2;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.qt-delete-btn:hover {
    background: #dc2626;
    color: #fff;
}

/* ---- Empty State ---- */
.qt-empty {
    text-align: center;
    color: #94a3b8;
    padding: 40px 16px !important;
    font-size: 14px;
}

.qt-empty-hint {
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 4px;
}

/* ---- Pagination ---- */
.qt-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

.qt-pagination-info {
    font-size: 12px;
    color: #64748b;
}

.qt-pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qt-per-page {
    height: 30px;
    padding: 0 6px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #334155;
    margin-right: 4px;
}

.qt-per-page-label {
    font-size: 11px;
    color: #94a3b8;
    margin-right: 8px;
}

.qt-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.qt-page-btn:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.qt-page-btn-active {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}

.qt-page-btn-disabled {
    cursor: default;
    opacity: 0.4;
}

.qt-page-btn-disabled:hover {
    background: #fff;
    color: #334155;
    border-color: #cbd5e1;
}

/* ================================================
   Quote Detail Page Styles
   ================================================ */

/* ---- Not Found ---- */
.qt-not-found {
    text-align: center;
    padding: 60px 20px;
}

.qt-not-found h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.qt-not-found p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}

/* ---- Back Bar ---- */
.qt-back-bar {
    margin-bottom: 16px;
}

.qt-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.15s;
}

.qt-back-link:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.qt-back-icon {
    width: 16px;
    height: 16px;
}

/* ---- Quote Header ---- */
.qt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
}

.qt-number {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #fff;
}

.qt-header-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.qt-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #bfdbfe;
}

.qt-meta-icon {
    width: 16px;
    height: 16px;
    color: #93c5fd;
}

.qt-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

/* ---- Status Badges ---- */
.qt-status-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.qt-status-active {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.qt-status-canceled {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ---- Info Grid ---- */
.qt-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.qt-info-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.qt-info-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.qt-info-icon {
    width: 16px;
    height: 16px;
}

.qt-info-card-body {
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #334155;
}

.qt-info-company {
    font-weight: 700;
    color: #1e293b;
    font-size: 14px;
}

.qt-info-light {
    color: #94a3b8;
    font-size: 12px;
}

/* ---- Line Items Section ---- */
.qt-section {
    margin-bottom: 20px;
}

.qt-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px 10px 0 0;
}

.qt-section-icon {
    width: 18px;
    height: 18px;
}

.qt-item-count {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* ---- Items Table ---- */
.qt-items-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

.qt-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.qt-items-table thead tr {
    background: #f1f5f9;
}

.qt-items-table thead th {
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    white-space: nowrap;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.qt-th-product {
    min-width: 200px;
}

.qt-items-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.qt-items-table tbody tr:hover {
    background: #f8fafc;
}

.qt-items-table tbody tr:last-child {
    border-bottom: none;
}

.qt-items-table td {
    padding: 10px 14px;
    color: #334155;
    vertical-align: top;
}

/* ---- Product Display ---- */
.qt-product-wrap {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.qt-product-img {
    width: 56px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #f3f4f6;
}

.qt-product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.qt-product-info {
    min-width: 0;
    flex: 1;
}

.qt-product-link {
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.15s;
}

.qt-product-link:hover {
    color: #2563eb;
}

.qt-item-note {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
    font-style: italic;
}

.qt-part-number {
    font-family: monospace;
    font-size: 12px;
    color: #64748b;
}

/* ---- Price Display ---- */
.qt-price {
    font-weight: 600;
    color: #1e293b;
}

.qt-list-price {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    text-decoration: line-through;
}

.qt-line-total {
    font-weight: 700;
    color: #1e293b !important;
}

/* ---- ETA Badge ---- */
.qt-eta-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* ---- Totals Section ---- */
.qt-totals-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.qt-totals-card {
    width: 380px;
    max-width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.qt-totals-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.qt-totals-icon {
    width: 16px;
    height: 16px;
}

.qt-totals-body {
    padding: 4px 0;
}

.qt-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 20px;
    font-size: 13px;
    color: #475569;
}

.qt-total-row span:last-child {
    font-weight: 600;
    color: #1e293b;
}

.qt-savings-row {
    color: #059669;
}

.qt-savings-row span:last-child {
    color: #059669 !important;
}

.qt-discount-row {
    color: #2563eb;
}

.qt-discount-row span:last-child {
    color: #2563eb !important;
}

.qt-grand-total {
    border-top: 2px solid #e2e8f0;
    margin-top: 4px;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 16px;
    font-weight: 800;
}

.qt-grand-total span:last-child {
    color: #1e3a8a !important;
    font-size: 18px;
}

/* ---- Notes Section ---- */
.qt-notes-section {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.qt-notes-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.qt-notes-body {
    padding: 14px 16px;
    font-size: 13px;
    color: #334155;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .qt-info-grid {
        grid-template-columns: 1fr;
    }
    .qt-header {
        flex-direction: column;
        gap: 12px;
    }
    .qt-header-right {
        align-items: flex-start;
    }
    .qt-page-header {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .qt-filter-row {
        flex-direction: column;
    }

    .qt-filter-search {
        min-width: 100%;
    }

    .qt-totals-card {
        width: 100%;
    }

    .qt-items-table td,
    .qt-items-table th {
        padding: 8px 10px;
    }

    .qt-table td,
    .qt-table th {
        padding: 8px 10px;
    }
}
