/* Reports and Orders Styling for Till Dashboard */

/* Reports Wrapper */
.reports-wrapper {
    padding: 20px 0;
}

/* Report Tabs */
.report-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.report-tab {
    padding: 10px 20px;
    background: white;
    border: 2px solid #ddd;
    border-bottom: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #666;
    border-radius: 4px 4px 0 0;
}

.report-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.report-content {
    display: none;
}

.report-content.active {
    display: block;
}

/* Filter Bar */
.filter-bar {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
}

.filter-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Report Metrics */
.report-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.metric-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
}

/* Report Details */
.report-details {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.report-details p {
    margin: 10px 0;
    font-size: 14px;
}

.report-details strong {
    color: #333;
}

/* Report Tables */
.report-table,
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.report-table thead,
.orders-table thead {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.report-table th,
.orders-table th {
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-table td,
.orders-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.report-table tbody tr:hover,
.orders-table tbody tr:hover {
    background: #f9f9f9;
}

/* Report Summary */
.report-summary {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-item {
    padding: 15px;
    background: white;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.summary-item strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* Orders Wrapper */
.orders-wrapper {
    padding: 20px 0;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.failed,
.status-badge.cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Action Buttons */
.action-btn {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

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

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 22px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Order Details Info */
.order-details-info {
    background: #f5f7fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-details-info p {
    margin: 10px 0;
    font-size: 14px;
}

/* Order Details Breakdown */
.order-details-breakdown {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.breakdown-item.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 600;
}

/* Receipt Modal Content */
.receipt-modal-content {
    max-width: 700px;
}

.receipt-content {
    font-family: 'Courier New', monospace;
}

.receipt-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
}

.receipt-header h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
}

.receipt-header p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.receipt-details {
    font-size: 12px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.receipt-items {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 12px;
}

.receipt-items th {
    background: #f5f5f5;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #333;
    font-weight: 600;
}

.receipt-items td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.receipt-totals {
    margin-bottom: 20px;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    padding: 15px 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
}

.total-row.grand-total {
    font-weight: 700;
    font-size: 16px;
    padding: 12px 0;
}

.receipt-footer {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 20px;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

/* Stock Tabs */
.stock-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.stock-tab-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #ddd;
    border-bottom: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s ease;
}

.stock-tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.stock-tab-content {
    display: none;
}

.stock-tab-content.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
    }

    .filter-group input {
        min-width: 100%;
    }

    .report-metrics {
        grid-template-columns: 1fr;
    }

    .report-table,
    .orders-table {
        font-size: 12px;
    }

    .report-table th,
    .report-table td,
    .orders-table th,
    .orders-table td {
        padding: 10px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 95vh;
    }

    .action-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}

@media print {
    .modal-header,
    .modal-footer,
    .action-btn,
    .filter-bar {
        display: none;
    }
}
