/**
 * Order Management System Styles
 * Save as: assets/css/oms-styles.css
 */

/* Reset and Base Styles */
.oms-dashboard * {
    box-sizing: border-box;
}

.oms-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    color: #333;
}

/* Header */
.oms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.oms-header h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #1a1a1a;
}

.oms-order-id {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Status Badges */
.oms-status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: capitalize;
}

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

.oms-status-awaiting_requirements {
    background: #d1ecf1;
    color: #0c5460;
}

.oms-status-requirements_submitted {
    background: #d4edda;
    color: #155724;
}

.oms-status-in_progress {
    background: #cce5ff;
    color: #004085;
}

.oms-status-delivered {
    background: #d4edda;
    color: #155724;
}

.oms-status-completed {
    background: #28a745;
    color: #fff;
}

.oms-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Container Layout */
.oms-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
}

@media (max-width: 968px) {
    .oms-container {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.oms-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.oms-card h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #1a1a1a;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Detail Rows */
.oms-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.oms-detail-row:last-child {
    border-bottom: none;
}

.oms-label {
    color: #666;
    font-size: 14px;
}

.oms-value {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 14px;
}

/* Forms */
.oms-form {
    margin-top: 15px;
}

.oms-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 10px;
}

.oms-textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Buttons */
.oms-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.oms-btn-primary {
    background: #4CAF50;
    color: #fff;
}

.oms-btn-primary:hover {
    background: #45a049;
}

.oms-btn-success {
    background: #28a745;
    color: #fff;
    width: 100%;
    margin-bottom: 10px;
}

.oms-btn-success:hover {
    background: #218838;
}

.oms-btn-outline {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    width: 100%;
}

.oms-btn-outline:hover {
    background: #f8f9fa;
}

/* Messages Section */
.oms-messages-card {
    height: 600px;
    display: flex;
    flex-direction: column;
}

.oms-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 15px;
}

.oms-message {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    max-width: 70%;
}

.oms-message-sent {
    background: #4CAF50;
    color: #fff;
    margin-left: auto;
}

.oms-message-received {
    background: #fff;
    border: 1px solid #e0e0e0;
}

.oms-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.oms-message-sent .oms-message-header {
    color: rgba(255,255,255,0.9);
}

.oms-message-time {
    font-size: 11px;
    opacity: 0.8;
}

.oms-message-body {
    font-size: 14px;
    line-height: 1.5;
}

/* Message Form */
.oms-message-form {
    border-top: 2px solid #f0f0f0;
    padding-top: 15px;
}

.oms-message-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 10px;
}

.oms-message-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.oms-message-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.oms-file-upload-label {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.oms-file-upload-label:hover {
    background: #e9ecef;
}

.oms-file-upload-label-large {
    display: block;
    padding: 20px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.oms-file-upload-label-large:hover {
    background: #e9ecef;
    border-color: #4CAF50;
}

/* Activity Log */
.oms-activity-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.oms-activity-icon {
    font-size: 24px;
}

.oms-activity-content {
    flex: 1;
}

.oms-activity-content strong {
    display: block;
    margin-bottom: 5px;
    color: #1a1a1a;
}

.oms-activity-time {
    font-size: 13px;
    color: #666;
}

/* Requirements Display */
.oms-requirements-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #4CAF50;
    margin-bottom: 15px;
}

/* Empty State */
.oms-empty-state {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

/* Delivery Card */
.oms-delivery-card {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.oms-delivery-submit-card {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.oms-file-upload-area {
    margin: 15px 0;
}

#oms-delivery-files-list {
    margin-top: 10px;
}

/* Earnings Card */
.oms-earnings-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.oms-earnings-card h3 {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.2);
}

.oms-earnings-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.oms-earnings-row:last-child {
    border-bottom: none;
}

.oms-earnings-total {
    font-size: 18px;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid rgba(255,255,255,0.3);
}

/* Success Message */
.oms-success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 10px;
}

/* Loading State */
.oms-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .oms-dashboard {
        padding: 0 10px;
    }
    
    .oms-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .oms-message {
        max-width: 85%;
    }
    
    .oms-message-actions {
        flex-direction: column;
    }
    
    .oms-btn {
        width: 100%;
    }
}

/* Scrollbar Styling */
.oms-messages-container::-webkit-scrollbar {
    width: 8px;
}

.oms-messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.oms-messages-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.oms-messages-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}