/**
 * MM Marketplace - Frontend Styles
 */

/* Dashboard Layout */
.mm-dashboard {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mm-dashboard-nav {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.mm-dashboard-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mm-dashboard-nav li {
    border-bottom: 1px solid #f1f5f9;
}

.mm-dashboard-nav li:last-child {
    border-bottom: 0;
}

.mm-dashboard-nav a {
    display: block;
    padding: 12px 20px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.mm-dashboard-nav a:hover {
    background: #f8fafc;
    color: #0f172a;
}

.mm-dashboard-nav li.active a {
    background: #3b82f6;
    color: #fff;
    font-weight: 600;
}

.mm-dashboard-content {
    flex: 1;
    min-width: 0;
}

/* Stats Grid */
.mm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.mm-stat-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.mm-stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.mm-stat-label {
    font-size: 13px;
    color: #64748b;
}

/* Tables */
.mm-table {
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    border-collapse: collapse;
}

.mm-table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.mm-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.mm-table tr:last-child td {
    border-bottom: 0;
}

/* Forms */
.mm-form-group {
    margin-bottom: 16px;
}

.mm-form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 14px;
    color: #334155;
}

.mm-form-row {
    display: flex;
    gap: 16px;
}

.mm-form-row .mm-form-group {
    flex: 1;
}

.mm-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.mm-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.mm-input {
    resize: vertical;
}

.required {
    color: #ef4444;
}

/* Buttons */
.mm-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: #fff;
    color: #334155;
    transition: all 0.2s;
}

.mm-btn:hover {
    background: #f1f5f9;
}

.mm-btn-primary {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.mm-btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.mm-btn-danger {
    color: #ef4444;
    border-color: #fecaca;
}

.mm-btn-danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.mm-btn-small {
    padding: 4px 10px;
    font-size: 12px;
}

.mm-btn-large {
    padding: 12px 24px;
    font-size: 15px;
}

/* Page Headers */
.mm-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mm-page-header h2 {
    margin: 0;
}

/* Status Badges */
.mm-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.mm-status-publish,
.mm-status-completed,
.mm-status-paid {
    background: #dcfce7;
    color: #166534;
}

.mm-status-pending,
.mm-status-unpaid {
    background: #fef9c3;
    color: #854d0e;
}

.mm-status-draft,
.mm-status-refunded {
    background: #f1f5f9;
    color: #475569;
}

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

/* Product cell */
.mm-product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mm-product-cell img {
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

/* Empty state */
.mm-empty {
    padding: 40px;
    text-align: center;
    color: #94a3b8;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

/* Vendor info on product */
.mm-vendor-info {
    font-size: 13px;
    margin: 5px 0;
    color: #64748b;
}

.mm-vendor-label {
    font-weight: 500;
}

.mm-vendor-name {
    color: #3b82f6;
    text-decoration: none;
}

.mm-vendor-name:hover {
    text-decoration: underline;
}

/* Become vendor form */
.mm-become-vendor {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.mm-apply-form .mm-input {
    margin-top: 4px;
}

/* Commission summary */
.mm-commission-summary {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.mm-commission-summary p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

/* Settings */
.mm-settings-form {
    max-width: 500px;
}

/* Admin */
.mm-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.mm-admin-stat-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.mm-admin-stat-box h3 {
    margin: 0 0 4px 0;
    font-size: 28px;
    color: #0f172a;
}

.mm-admin-stat-box p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.mm-admin-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.mm-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.mm-status-badge.mm-status-approved {
    background: #dcfce7;
    color: #166534;
}

.mm-status-badge.mm-status-pending {
    background: #fef9c3;
    color: #854d0e;
}

.mm-status-badge.mm-status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* Responsive */
@media (max-width: 768px) {
    .mm-dashboard {
        flex-direction: column;
    }
    
    .mm-dashboard-nav {
        width: 100%;
    }
    
    .mm-dashboard-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 8px;
    }
    
    .mm-dashboard-nav li {
        border-bottom: 0;
    }
    
    .mm-dashboard-nav a {
        padding: 8px 12px;
        border-radius: 6px;
    }
    
    .mm-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mm-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .mm-admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
