/* Custom styles for DexStoore Admin */

/* Order status badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.5em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-red {
    color: #fff;
    background-color: #dc3545;
}

.badge-blue {
    color: #fff;
    background-color: #007bff;
}

.badge-green {
    color: #fff;
    background-color: #28a745;
}

.badge-purple {
    color: #fff;
    background-color: #6f42c1;
}

.badge-gray {
    color: #fff;
    background-color: #6c757d;
}

/* Profit display colors */
.profit-positive {
    color: #28a745;
    font-weight: bold;
}

.profit-negative {
    color: #dc3545;
    font-weight: bold;
}

/* Dashboard widgets */
.dashboard-widget {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.dashboard-widget h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #495057;
}

.dashboard-stat {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
}

/* Order list enhancements */
.order-list .status-badge {
    min-width: 100px;
    text-align: center;
}

.order-list .profit-cell {
    text-align: right;
    font-weight: 600;
}

/* Webhook event payload */
.payload-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Custom admin actions */
.admin-actions {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.admin-actions h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .dashboard-widget {
        padding: 1rem;
    }
    
    .dashboard-stat {
        font-size: 1.5rem;
    }
    
    .order-list .status-badge {
        min-width: 80px;
        font-size: 0.7rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error states */
.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 0.25rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 0.25rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

/* Custom form styling */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Import notice styling */
.import-notice {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 1rem;
    color: #004085;
}

.import-notice p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.import-notice strong {
    color: #002752;
}
