/* Date Group Header */
.date-group {
    margin-bottom: 2rem;
}

.date-header {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.date-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.date-stats {
    display: flex;
    gap: 2rem;
    font-size: 0.95rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Orders Table */
.orders-table-container {
    background: var(--surface);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.orders-table thead {
    background: var(--background);
}

.orders-table th {
    padding: 0.4rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

/* Center specific columns in header */
.orders-table th:nth-child(3), /* Weight */
.orders-table th:nth-child(4), /* Bags */
.orders-table th:nth-child(5), /* Pickup */
.orders-table th:nth-child(6), /* Status */
.orders-table th:nth-child(7)  /* Actions */
{
    text-align: center;
}

.orders-table tbody tr.order-row {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.orders-table tbody tr.order-row:hover {
    background-color: var(--background);
}

.orders-table td {
    padding: .5rem 1rem;
    vertical-align: middle;
}

.order-ticket {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.order-customer {
    font-size: 1rem;
}

.order-customer strong {
    color: var(--text-primary);
}

.order-weight,
.order-bags {
    text-align: center;
    font-weight: 500;
    color: #495057;
}

.order-date {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

order-status {
    text-align: center !important;
    white-space: nowrap;
}

.order-actions {
    text-align: center;
    white-space: nowrap;
}

.order-actions {
    margin: 0 0.25rem;
}

/* Status Badges */
.status-badge {
    display: block;
    margin: 0 auto;
    width: fit-content;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-cleaning { 
    background: var(--status-cleaning); 
    color: var(--status-cleaning-text); 
}

.status-ready { 
    background: var(--status-ready); 
    color: var(--status-ready-text); 
}

.status-completed { 
    background: var(--status-completed); 
    color: var(--status-completed-text); 
}

.status-detailing { 
    background: var(--primary-light); 
    color: #721c24; 
}

.status-scheduled-onetime { 
    background: var(--status-scheduled); 
    color: var(--status-scheduled-text); 
}

.status-scheduled-recurring { 
    background: var(--status-recurring); 
    color: var(--status-recurring-text); 
}

/* Pure recurring (not yet scheduled) - different color */
.status-recurring { 
    background: #E7F3FF;  /* Lighter blue */
    color: #0056b3;       /* Darker blue text */
}

.details-toggle-icon {
    display: inline-block;
    transition: transform 0.2s;
}

/* Expanded Details Row */
.order-details-row {
    background: var(--background);
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
}

.detail-value {
    color: var(--text-primary);
}

.notes {
    background: #fff9e6;
    padding: 1rem;
    border-left: 3px solid var(--primary-light);
    border-radius: 4px;
    margin-top: 1rem;
}

.order-details-row.hidden {
    display: none;
}

.order-details-expanded {
    padding: 1.5rem;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.detail-item {
    display: flex;
    gap: 0.5rem;
}

.detail-label {
    font-weight: 600;
    color: #6c757d;
    min-width: 100px;
}

.detail-value {
    color: #495057;
}

.preferences-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.preferences-inline {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.preferences-inline span {
    color: #495057;
    font-size: 0.9rem;
}

.notes {
    background: #fff9e6;
    padding: 1rem;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
    margin-top: 1rem;
}

.notes strong {
    color: #856404;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

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

.btn-secondary:hover {
    background: var(--secondary);
}

.btn-success {
    background: #27ae60;
    color: white;
}

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

/* Print Dialog */
.print-dialog-header {
    margin-bottom: 1.5rem;
}

.print-dialog-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.print-dialog-subtitle {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.print-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.print-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s;
}

.print-option:hover {
    border-color: #3498db;
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.option-title {
    font-weight: 600;
    color: #2c3e50;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #f8f9fa;
}

.qty-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.printer-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

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

.print-actions .btn {
    flex: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .orders-table {
        font-size: 0.85rem;
    }
    
    .orders-table th {
        padding: 0.5rem;
    }

    .orders-table td {
    padding: 0.6rem 1rem;  /* Reduced vertical padding */
    vertical-align: middle;
    }
    
    .date-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .preferences-inline {
        flex-direction: column;
        gap: 0.5rem;
    }
}