/* orders.css - Dark Mode & Rem Scaling Support */

:root {
    /* Color Variables - Light Mode */
    --primary: #007bff;
    --primary-dark: #004085;
    --secondary: #7209b7;
    --success: #4cc9f0;
    --success-light: #d4edda;
    --success-text: #155724;
    --success-border: #28a745;
    --danger: #f72585;
    --danger-light: #f8d7da;
    --danger-text: #721c24;
    --danger-border: #dc3545;
    --warning: #f8961e;
    --warning-light: #fff3cd;
    --warning-text: #856404;
    --info: #17a2b8;
    --info-light: #d1ecf1;
    --info-text: #0c5460;
    
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #7f8c8d;
    --text-inverse: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f0f0f0;
    --bg-accent: #f5f7fa;
    
    --border-color: #e9ecef;
    --border-light: #eee;
    --border-dark: #495057;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.2);
    
    --gradient-primary: #007bff;
    --gradient-header: #007bff;
}

.darkmode {
    /* Color Variables - Dark Mode */
    --primary: #4da3ff;
    --primary-dark: #2d85e8;
    --secondary: #8a2be2;
    --success: #5cc9f0;
    --success-light: #1a3c29;
    --success-text: #d4edda;
    --success-border: #28a745;
    --danger: #ff4d94;
    --danger-light: #3c1d24;
    --danger-text: #f8d7da;
    --danger-border: #dc3545;
    --warning: #ffaa33;
    --warning-light: #332a1a;
    --warning-text: #fff3cd;
    --info: #2dc7e8;
    --info-light: #1a2d33;
    --info-text: #d1ecf1;
    
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    --text-inverse: #ffffff;
    
    --bg-primary: #0f1419;
    --bg-secondary: #1c232a;
    --bg-tertiary: #2a343e;
    --bg-accent: #1a1f25;
    
    --border-color: #495057;
    --border-light: #2a343e;
    --border-dark: #6c757d;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.35);
    
    --gradient-primary: #4da3ff;
    --gradient-header: #4da3ff;
}

.container {
    max-width: 600px; /* Converted from 1200px */
    margin: 0 auto;
}

/* Header */
.page-header {
    text-align: center;
    margin-bottom: 20px; /* Converted from 40px */
    padding: 10px 0; /* Converted from 20px 0 */
}

.page-title {
    font-size: 1.25rem; /* Converted from 2.5rem */
    font-weight: 700;
    margin-bottom: 5px; /* Converted from 10px */
    color: var(--text-primary) !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2); /* Converted from 2px 2px 4px */
}

.page-subtitle {
    font-size: 0.55rem; /* Converted from 1.1rem */
    color: var(--text-secondary) !important;
    opacity: 0.9;
}

/* Messages */
.message {
    padding: 7.5px 10px; /* Converted from 15px 20px */
    border-radius: 5px; /* Converted from 10px */
    margin-bottom: 15px; /* Converted from 30px */
    display: flex;
    align-items: center;
    gap: 7.5px; /* Converted from 15px */
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-10px); opacity: 0; } /* Converted from -20px */
    to { transform: translateY(0); opacity: 1; }
}

.message.success {
    background: var(--success-light);
    color: var(--success-text);
    border-left: 2px solid var(--success-border); /* Converted from 4px */
}

.message.error {
    background: var(--danger-light);
    color: var(--danger-text);
    border-left: 2px solid var(--danger-border); /* Converted from 4px */
}

.message i {
    font-size: 0.6rem; /* Converted from 1.2rem */
}

/* Orders Container */
.orders-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); /* Converted from 350px */
    gap: 15px; /* Converted from 30px */
}

/* Order Card */
.order-card {
    background: var(--bg-primary);
    border-radius: 7.5px; /* Converted from 15px */
    padding: 12.5px; /* Converted from 25px */
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px; /* Converted from 4px */
    background: var(--gradient-header);
}

.order-card:hover {
    transform: translateY(-5px); /* Converted from -10px */
    box-shadow: var(--shadow-lg);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px; /* Converted from 20px */
    padding-bottom: 7.5px; /* Converted from 15px */
    border-bottom: 1px solid var(--border-light); /* Converted from 2px */
}

.order-id {
    font-size: 0.55rem; /* Converted from 1.1rem */
    font-weight: 700;
    color: var(--text-primary);
}

.order-date {
    color: var(--text-secondary);
    font-size: 0.45rem; /* Converted from 0.9rem */
}

.order-info {
    margin-bottom: 10px; /* Converted from 20px */
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0; /* Converted from 8px 0 */
    border-bottom: 1px dashed var(--border-light);
}

.info-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.7rem;
}

.info-value {
    color: var(--text-primary);
    font-size: 0.7rem;
}

/* Products Section */
.products-section {
    margin: 10px 0; /* Converted from 20px 0 */
    padding: 7.5px; /* Converted from 15px */
    background: var(--bg-secondary);
    border-radius: 5px; /* Converted from 10px */
}

.products-title {
    font-size: 0.55rem; /* Converted from 1.1rem */
    color: var(--text-primary);
    margin-bottom: 7.5px; /* Converted from 15px */
    display: flex;
    align-items: center;
    gap: 5px; /* Converted from 10px */
}

.product-list {
    list-style: none;
}

.product-item {
    padding: 4px 0; /* Converted from 8px 0 */
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-item:last-child {
    border-bottom: none;
}

.product-name {
    color: var(--text-primary);
    font-size: 0.5rem;
}

/* Order Footer */
.order-footer {
    margin-top: 10px; /* Converted from 20px */
    padding-top: 10px; /* Converted from 20px */
    border-top: 1px solid var(--border-light); /* Converted from 2px */
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px; /* Converted from 20px */
}

.total-label {
    font-size: 0.6rem; /* Converted from 1.2rem */
    color: var(--text-primary);
    font-weight: 600;
}

.total-amount {
    font-size: 0.7rem; /* Converted from 1.4rem */
    color: var(--danger);
    font-weight: 700;
}

/* Status Badge */
.status-badge {
    padding: 3px 7.5px; /* Converted from 6px 15px */
    border-radius: 10px; /* Converted from 20px */
    font-size: 0.425rem; /* Converted from 0.85rem */
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 2.5px; /* Converted from 5px */
}

.status-pending {
    background: var(--warning-light);
    color: var(--warning-text);
}

.status-paid {
    background: var(--info-light);
    color: var(--info-text);
}

.status-delivered {
    background: var(--success-light);
    color: var(--success-text);
}

/* Action Button */
.action-btn {
    width: 100%;
    padding: 6px; /* Converted from 12px */
    border: none;
    border-radius: 4px; /* Converted from 8px */
    font-size: 0.5rem; /* Converted from 1rem */
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px; /* Converted from 10px */
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: var(--text-inverse);
}

.action-btn.primary:hover {
    transform: translateY(-1px); /* Converted from -2px */
    box-shadow: 0 2.5px 7.5px rgba(102, 126, 234, 0.4); /* Converted from 5px 15px */
}

.action-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none !important;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 10px; /* Converted from 60px 20px */
    background: var(--bg-primary);
    border-radius: 7.5px; /* Converted from 15px */
    box-shadow: var(--shadow-md);
}

.empty-state i {
    font-size: 2rem; /* Converted from 4rem */
    color: var(--text-secondary);
    margin-bottom: 10px; /* Converted from 20px */
}

.empty-state h3 {
    font-size: 0.9rem; /* Converted from 1.8rem */
    color: var(--text-primary);
    margin-bottom: 5px; /* Converted from 10px */
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.55rem; /* Converted from 1.1rem */
}

/* Responsive */
@media (max-width: 768px) {
    .orders-container {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 1rem; /* Converted from 2rem */
    }
    
    body {
        padding: 5px; /* Converted from 10px */
    }
}