/* Dima Shop Admin Styles - Modern Design */

/* Global Styles */
.wrap h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1d2327;
    margin-bottom: 20px;
}

/* Dashboard Widgets */
.dima-dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.dima-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dima-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.dima-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.dima-widget:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.3);
}

.dima-widget:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

.dima-widget:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 10px 30px rgba(67, 233, 123, 0.3);
}

.dima-widget h3 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.dima-widget-value {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Order Details */
.dima-order-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 30px;
}

.dima-order-info,
.dima-customer-info,
.dima-order-items,
.dima-order-actions {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.dima-order-info:hover,
.dima-customer-info:hover,
.dima-order-items:hover,
.dima-order-actions:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.dima-order-info h3,
.dima-customer-info h3,
.dima-order-items h3,
.dima-order-actions h3 {
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
    color: #1d2327;
    font-size: 18px;
    font-weight: 600;
}

.dima-order-items,
.dima-order-actions {
    grid-column: 1 / -1;
}

/* Report Filters */
.dima-report-filters {
    margin: 30px 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dima-report-filters .button {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dima-report-filters .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dima-report-filters .button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Report Summary */
.dima-report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

/* Coupon Form */
.dima-add-coupon-form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dima-add-coupon-form h2 {
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
    color: #1d2327;
    font-size: 20px;
    font-weight: 600;
}

/* Tables */
.wp-list-table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wp-list-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.wp-list-table thead th {
    color: #fff;
    font-weight: 600;
    padding: 16px 12px;
    border: none;
}

.wp-list-table tbody tr {
    transition: all 0.2s ease;
}

.wp-list-table tbody tr:hover {
    background: #f9fafb;
    transform: scale(1.01);
}

.wp-list-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid #f3f4f6;
}

/* Category Fields */
.form-field {
    margin-bottom: 24px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

#category-image-wrapper {
    margin-top: 12px;
}

#category-image-preview {
    margin-bottom: 12px;
    min-height: 100px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#category-image-preview img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#upload-category-image-btn,
#remove-category-image-btn {
    margin-left: 8px;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#upload-category-image-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

#remove-category-image-btn:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

#category_icon {
    min-width: 300px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

#category_color {
    width: 100px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    cursor: pointer;
}

/* Meta Box Styles */
.dima-meta-box {
    padding: 12px 0;
}

.dima-meta-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
}

.dima-meta-box input,
.dima-meta-box select {
    width: 100%;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
}

.dima-meta-box input:focus,
.dima-meta-box select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Variation Styles */
.dima-variations {
    margin-top: 20px;
}

.dima-variation-item {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.dima-variation-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.dima-variation-item h4 {
    margin: 0 0 16px 0;
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
}

/* Buttons */
.button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* Category Display in Frontend */
.dima-category-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.dima-category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.dima-category-card .category-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.dima-category-card .category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dima-category-card:hover .category-image img {
    transform: scale(1.1);
}

.dima-category-card .category-content {
    padding: 20px;
    text-align: center;
}

.dima-category-card .category-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dima-category-card .category-name {
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    margin: 0;
}

/* Responsive */
@media (max-width: 782px) {
    .dima-order-details {
        grid-template-columns: 1fr;
    }
    
    .dima-dashboard-widgets,
    .dima-report-summary {
        grid-template-columns: 1fr;
    }
    
    .dima-report-filters {
        flex-direction: column;
    }
    
    .dima-report-filters .button {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dima-widget,
.dima-order-info,
.dima-customer-info,
.dima-order-items,
.dima-order-actions {
    animation: fadeIn 0.5s ease-out;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #667eea;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}