/* ORBIT Quote History - Enhanced Mobile & Desktop Styles */

/* ===== DESKTOP STYLES ===== */
@media (min-width: 769px) {
    .quote-history-page {
        padding: 20px;
    }

    .page-header h2 {
        font-size: 32px;
        color: #00f3ff;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .stats-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-bottom: 30px;
    }

    .stat-card {
        background: linear-gradient(135deg, rgba(0, 243, 255, 0.1), rgba(211, 47, 47, 0.1));
        border: 1px solid rgba(0, 243, 255, 0.3);
        border-radius: 12px;
        padding: 20px;
        text-align: center;
        transition: all 0.3s ease;
    }

    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 243, 255, 0.3);
    }

    .stat-card.success {
        border-color: rgba(76, 175, 80, 0.5);
        background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(0, 243, 255, 0.05));
    }

    .stat-card.warning {
        border-color: rgba(255, 152, 0, 0.5);
        background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(0, 243, 255, 0.05));
    }

    .stat-value {
        font-size: 36px;
        font-weight: 800;
        color: #00f3ff;
        margin-bottom: 8px;
    }

    .stat-label {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.7);
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .filter-bar {
        display: flex;
        gap: 15px;
        margin-bottom: 30px;
        flex-wrap: wrap;
    }

    .filter-btn {
        padding: 12px 24px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: rgba(255, 255, 255, 0.7);
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 14px;
        font-weight: 600;
    }

    .filter-btn:hover {
        background: rgba(0, 243, 255, 0.1);
        border-color: #00f3ff;
        color: #00f3ff;
    }

    .filter-btn.active {
        background: #00f3ff;
        color: #000;
        border-color: #00f3ff;
        box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    }

    .quotes-table-container {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 12px;
        padding: 20px;
        overflow-x: auto;
    }

    .quotes-table {
        width: 100%;
        border-collapse: collapse;
        color: #fff;
    }

    .quotes-table thead {
        background: rgba(0, 243, 255, 0.1);
    }

    .quotes-table th {
        padding: 15px;
        text-align: left;
        font-weight: 700;
        color: #00f3ff;
        border-bottom: 2px solid rgba(0, 243, 255, 0.3);
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .quotes-table td {
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 14px;
    }

    .quotes-table tbody tr {
        transition: all 0.3s ease;
    }

    .quotes-table tbody tr:hover {
        background: rgba(0, 243, 255, 0.05);
        transform: scale(1.01);
    }

    .actions-cell {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
    }

    .action-btn {
        padding: 8px 16px;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

    .action-btn i {
        font-size: 14px;
    }

    .action-btn.success-btn {
        background: linear-gradient(135deg, #4CAF50, #45a049);
        color: white;
    }

    .action-btn.success-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    }

    .action-btn.primary-btn {
        background: linear-gradient(135deg, #2196F3, #1976D2);
        color: white;
    }

    .action-btn.primary-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    }

    .action-btn.info-btn {
        background: linear-gradient(135deg, #00bcd4, #0097a7);
        color: white;
    }

    .action-btn.info-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 188, 212, 0.4);
    }

    .action-btn.danger-btn {
        background: linear-gradient(135deg, #f44336, #d32f2f);
        color: white;
    }

    .action-btn.danger-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
    }

    .status-badge {
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: inline-block;
    }

    .status-badge.pending {
        background: rgba(255, 152, 0, 0.2);
        color: #ff9800;
        border: 1px solid rgba(255, 152, 0, 0.5);
    }

    .status-badge.sold {
        background: rgba(76, 175, 80, 0.2);
        color: #4CAF50;
        border: 1px solid rgba(76, 175, 80, 0.5);
    }

    .status-badge.cancelled {
        background: rgba(158, 158, 158, 0.2);
        color: #9e9e9e;
        border: 1px solid rgba(158, 158, 158, 0.5);
    }

    .empty-state {
        text-align: center;
        padding: 60px 20px;
        color: rgba(255, 255, 255, 0.5);
    }

    .empty-state i {
        font-size: 64px;
        margin-bottom: 20px;
        opacity: 0.3;
    }

    .empty-state h3 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .empty-state p {
        font-size: 14px;
    }
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 768px) {
    .quote-history-page {
        padding: 10px;
        padding-bottom: 150px;
        /* Increased Space for bottom nav */
    }

    .page-header h2 {
        font-size: 20px;
        color: #00f3ff;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .stats-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 20px;
    }

    .stat-card {
        background: linear-gradient(135deg, rgba(0, 243, 255, 0.1), rgba(211, 47, 47, 0.1));
        border: 1px solid rgba(0, 243, 255, 0.3);
        border-radius: 8px;
        padding: 12px 8px;
        text-align: center;
    }

    .stat-value {
        font-size: 24px;
        font-weight: 800;
        color: #00f3ff;
        margin-bottom: 4px;
    }

    .stat-label {
        font-size: 10px;
        color: rgba(255, 255, 255, 0.7);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .filter-bar {
        display: flex;
        gap: 8px;
        margin-bottom: 20px;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        padding: 8px 16px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        color: rgba(255, 255, 255, 0.7);
        cursor: pointer;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .filter-btn.active {
        background: #00f3ff;
        color: #000;
        border-color: #00f3ff;
    }

    /* Hide table, show cards on mobile */
    .quotes-table {
        display: none;
    }

    .quotes-cards {
        display: block;
    }

    .quote-card {
        background: linear-gradient(135deg, rgba(10, 14, 39, 0.95), rgba(0, 0, 0, 0.9));
        border: 1px solid rgba(0, 243, 255, 0.2);
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
    }

    .quote-card:active {
        transform: scale(0.98);
    }

    .quote-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .quote-card-id {
        font-size: 16px;
        font-weight: 800;
        color: #00f3ff;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .quote-card-date {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.6);
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .quote-card-body {
        margin-bottom: 12px;
    }

    .quote-card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        font-size: 13px;
    }

    .quote-card-label {
        color: rgba(255, 255, 255, 0.6);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .quote-card-value {
        color: #fff;
        font-weight: 600;
    }

    .quote-card-customer {
        font-size: 14px;
        color: #fff;
        margin-bottom: 8px;
        font-weight: 600;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .quote-card-amounts {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 12px;
        padding: 10px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 8px;
    }

    .amount-box {
        text-align: center;
    }

    .amount-label {
        font-size: 10px;
        color: rgba(255, 255, 255, 0.5);
        margin-bottom: 4px;
        text-transform: uppercase;
    }

    .amount-value {
        font-size: 16px;
        font-weight: 700;
        color: #00f3ff;
    }

    .quote-card-footer {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .quote-card-status {
        display: flex;
        justify-content: center;
        margin-bottom: 8px;
    }

    .quote-card-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 10px;
    }

    .quote-card-actions.full-width {
        grid-template-columns: 1fr;
    }

    .action-btn {
        padding: 10px 12px;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: all 0.2s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        min-height: 44px;
        /* Touch-friendly */
    }

    .action-btn i {
        font-size: 16px;
    }

    .action-btn.success-btn {
        background: linear-gradient(135deg, #4CAF50, #45a049);
        color: white;
    }

    .action-btn.primary-btn {
        background: linear-gradient(135deg, #2196F3, #1976D2);
        color: white;
    }

    .action-btn.info-btn {
        background: linear-gradient(135deg, #00bcd4, #0097a7);
        color: white;
    }

    .action-btn.danger-btn {
        background: linear-gradient(135deg, #f44336, #d32f2f);
        color: white;
    }

    .action-btn:active {
        transform: scale(0.95);
    }

    .status-badge {
        padding: 6px 16px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: inline-block;
    }

    .status-badge.pending {
        background: rgba(255, 152, 0, 0.2);
        color: #ff9800;
        border: 1px solid rgba(255, 152, 0, 0.5);
    }

    .status-badge.sold {
        background: rgba(76, 175, 80, 0.2);
        color: #4CAF50;
        border: 1px solid rgba(76, 175, 80, 0.5);
    }

    .status-badge.cancelled {
        background: rgba(158, 158, 158, 0.2);
        color: #9e9e9e;
        border: 1px solid rgba(158, 158, 158, 0.5);
    }

    .text-success {
        color: #4CAF50;
        font-weight: 600;
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 6px;
        justify-content: center;
    }

    .text-muted {
        color: #9e9e9e;
        font-weight: 600;
        font-size: 13px;
        text-align: center;
    }

    .empty-state {
        text-align: center;
        padding: 40px 20px;
        color: rgba(255, 255, 255, 0.5);
    }

    .empty-state i {
        font-size: 48px;
        margin-bottom: 15px;
        opacity: 0.3;
    }

    .empty-state h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .empty-state p {
        font-size: 13px;
    }
}

/* Notification animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}