﻿/* ============================================
   QUOTE HISTORY - BASE STYLES
   Toyota Professional Insurance Interface
   ============================================ */

/* Container & Layout */
.dashboard-container {
    padding: 2rem;
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Dashboard Header */
.dashboard-header {
    border-radius: 1rem;
    padding: 3rem 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

    .dashboard-header::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 200px;
        height: 200px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        transform: translate(50px, -50px);
    }

.header-content {
    position: relative;
    z-index: 1;
}

.dashboard-header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .dashboard-header h1 i {
        font-size: 2.2rem;
    }

.dashboard-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: 400;
}

/* Controls Section */
.controls-section {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.company-selector-card,
.search-card {
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.company-selector-card {
    min-width: 300px;
}

.selector-header,
.search-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

    .selector-header i,
    .search-header i {
        font-size: 1.1rem;
    }

    .selector-header label,
    .search-header label {
        font-weight: 600;
        font-size: 0.9rem;
    }

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

    .search-input:focus {
        outline: none;
    }

.clear-search {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

/* Loading State */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    border-radius: 0.75rem;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    font-size: 1.1rem;
}

/* Pagination */
.pagination-card {
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.pagination-info {
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

    .pagination-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.current-page {
    font-weight: 600;
    padding: 0 1rem;
}

/* Dashboard Cards */
.dashboard-card {
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.card-header {
    padding: 1.5rem 2rem;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

    .card-header h2 i {
        font-size: 1.1rem;
    }

.search-summary,
.period-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quote-count {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.card-content {
    padding: 2rem;
}

/* Period Cards */
.period-card .card-header {
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.toggle-icon {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

    .empty-state i {
        margin-bottom: 1.5rem;
        opacity: 0.5;
    }

    .empty-state h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .empty-state p {
        font-size: 1rem;
    }

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.performance-table {
    width: 100%;
    border-collapse: collapse;
}

    .performance-table th {
        padding: 1rem 1.5rem;
        text-align: left;
        font-weight: 600;
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .performance-table td {
        padding: 1.25rem 1.5rem;
        vertical-align: middle;
    }

    .performance-table tbody tr {
        transition: all 0.2s ease;
    }

.quote-number-cell .quote-number {
    font-weight: 600;
    font-family: monospace;
    font-size: 1.1rem;
}

.date-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.date-value {
    font-weight: 500;
    font-size: 0.9rem;
}

.time-value {
    font-size: 0.8rem;
}

.policyholder-cell {
    min-width: 200px;
}

.policyholder-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.policyholder-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #22c55e, #2f6096);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.policyholder-info span {
    font-weight: 500;
}

.user-name {
    font-size: 0.9rem;
}

.metric-value {
    font-weight: 600;
    font-size: 1rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Mobile Card View */
.desktop-view {
    display: block;
}

.mobile-view {
    display: none;
}

.quote-cards {
    display: grid;
    gap: 1.5rem;
}

.quote-card-mobile {
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

    .quote-card-mobile:hover {
        transform: translateY(-2px);
    }

.quote-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.quote-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quote-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quote-number {
    font-weight: 600;
    font-family: monospace;
    font-size: 1.1rem;
}

.quote-card-body {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quote-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
}

.quote-card-footer {
    padding-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

    .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

    .form-control:focus {
        outline: none;
    }

    .form-control:disabled {
        opacity: 0.7;
    }

/* Responsive Design */
@media (max-width: 1200px) {
    .controls-section {
        grid-template-columns: 1fr;
    }

    .company-selector-card {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .dashboard-header {
        padding: 2rem 1.5rem;
    }

        .dashboard-header h1 {
            font-size: 2rem;
        }

    .controls-section {
        gap: 1rem;
    }

    .company-selector-card,
    .search-card {
        padding: 1rem;
    }

    .pagination-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .pagination-controls {
        justify-content: center;
    }

    .card-content {
        padding: 1rem;
    }

    .desktop-view {
        display: none;
    }

    .mobile-view {
        display: block;
    }

    .btn-text {
        display: none;
    }

    .header-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .search-summary,
    .period-summary {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 1.75rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .quote-card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .quote-info {
        text-align: center;
    }

    .status-badge {
        align-self: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ============================================
   QUOTE DIALOGS - BASE STYLES
   Toyota Professional Insurance Interface
   History Dialog & Broker Dialog
   ============================================ */

/* Modal Overlay */
.qp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal Container */
.qp-modal {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.qp-history-modal {
    width: 800px;
}

.qp-broker-modal {
    width: 600px;
}

/* Modal Header */
.qp-modal-header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid;
}

.qp-modal-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .qp-modal-title h3 {
        margin: 0;
        font-size: 1.5rem;
        font-weight: 700;
    }

    .qp-modal-title i {
        font-size: 1.5rem;
    }

/* Modal Body */
.qp-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* History Timeline */
.qp-history-timeline {
    position: relative;
    padding-left: 2rem;
}

    .qp-history-timeline::before {
        content: '';
        position: absolute;
        left: 8px;
        top: 0;
        bottom: 0;
        width: 2px;
    }

/* Timeline Item */
.qp-timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

    .qp-timeline-item:last-child {
        margin-bottom: 0;
    }

.qp-timeline-marker {
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid;
}

.qp-timeline-item.qp-active .qp-timeline-marker {
    width: 24px;
    height: 24px;
    top: 3px;
    left: calc(-2rem - 3px);
}

/* Timeline Content */
.qp-timeline-content {
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.qp-timeline-item.qp-active .qp-timeline-content {
    border: 2px solid;
}

/* Version Header */
.qp-version-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.qp-version-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.qp-version-number {
    font-weight: 700;
    font-size: 1.125rem;
}

.qp-version-date {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qp-version-author {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Changes List */
.qp-changes-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Change Item */
.qp-change-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.qp-change-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.125rem;
}

.qp-change-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qp-change-description {
    font-size: 0.9375rem;
}

.qp-change-values {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qp-old-value,
.qp-new-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

    .qp-old-value i,
    .qp-new-value i {
        font-size: 0.75rem;
    }

.qp-change-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
}

.qp-change-time,
.qp-change-author {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Broker Dialog */
.qp-form-group {
    margin-bottom: 1.5rem;
}

    .qp-form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 600;
        font-size: 0.9375rem;
    }

.qp-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    .qp-form-control:focus {
        outline: none;
    }

.qp-grid {
    display: grid;
}

.qp-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.qp-gap-4 {
    gap: 1rem;
}

/* Modal Footer */
.qp-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Buttons */
.qp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

    .qp-btn:hover {
        transform: translateY(-1px);
    }

    .qp-btn:active {
        transform: translateY(0);
    }

.qp-btn-icon {
    padding: 0.5rem;
    width: 40px;
    height: 40px;
}

.qp-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.qp-btn-md {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.qp-btn-revert {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .qp-modal {
        max-width: 95vw;
        max-height: 95vh;
    }

    .qp-history-modal,
    .qp-broker-modal {
        width: 100%;
    }

    .qp-modal-header {
        padding: 1.5rem;
    }

    .qp-modal-body {
        padding: 1.5rem;
    }

    .qp-modal-footer {
        padding: 1rem 1.5rem;
    }

    .qp-modal-title h3 {
        font-size: 1.25rem;
    }

    .qp-history-timeline {
        padding-left: 1.5rem;
    }

    .qp-timeline-item {
        padding-left: 1.5rem;
    }

    .qp-timeline-marker {
        left: -1.5rem;
    }

    .qp-timeline-item.qp-active .qp-timeline-marker {
        left: calc(-1.5rem - 3px);
    }

    .qp-timeline-content {
        padding: 1rem;
    }

    .qp-version-header {
        flex-direction: column;
        align-items: stretch;
    }

    .qp-change-item {
        flex-direction: column;
    }

    .qp-grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .qp-modal-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

        .qp-modal-title h3 {
            font-size: 1.125rem;
        }

    .qp-version-number {
        font-size: 1rem;
    }

    .qp-change-icon {
        width: 35px;
        height: 35px;
    }

    .qp-btn-revert {
        width: 100%;
        justify-content: center;
    }

    .qp-modal-footer {
        flex-direction: column;
    }

    .qp-btn {
        width: 100%;
    }
}

/* Scrollbar Styling */
.qp-modal-body::-webkit-scrollbar {
    width: 8px;
}

.qp-modal-body::-webkit-scrollbar-track {
    border-radius: 4px;
}

.qp-modal-body::-webkit-scrollbar-thumb {
    border-radius: 4px;
}