/* =========================================================
   Brand Vendor Manager PRO — Dashboard Styles
   ========================================================= */

.bvmp-wrap *, .bvmp-wrap *::before, .bvmp-wrap *::after { box-sizing: border-box; }

.bvmp-wrap {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #111827;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

/* ---- Header ---- */
.bvmp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
}
.bvmp-header__title { font-size: 24px; font-weight: 700; margin: 0 0 4px; color: #111827; }
.bvmp-header__brand {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .4px;
}
.bvmp-header__right { display: flex; align-items: center; gap: 12px; }
.bvmp-header__user  { font-size: 14px; color: #6b7280; }

/* ---- Primary Buttons (header/form) ---- */
.bvmp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    white-space: nowrap;
}
.bvmp-btn--primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
.bvmp-btn--primary:hover { background: linear-gradient(135deg, #4f46e5, #4338ca); transform: translateY(-1px); }
.bvmp-btn--success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16,185,129,.3);
}
.bvmp-btn--success:hover { background: linear-gradient(135deg, #059669, #047857); transform: translateY(-1px); }
.bvmp-btn--outline {
    background: transparent;
    color: #374151;
    border: 1.5px solid #d1d5db;
}
.bvmp-btn--outline:hover { border-color: #6366f1; color: #6366f1; }
.bvmp-btn--sm { padding: 6px 12px; font-size: 12px; }

/* ---- Table Action Buttons — texte NOIR forcé ---- */
.bvmp-wrap .bvmp-action-btn,
.bvmp-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #111827 !important;          /* NOIR forcé */
    background: #ffffff !important;
    border: 1.5px solid #d1d5db !important;
    cursor: pointer !important;
    transition: background .15s ease, border-color .15s ease !important;
    font-family: inherit !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    outline: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.bvmp-wrap .bvmp-action-btn:hover,
.bvmp-action-btn:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
}

.bvmp-wrap .bvmp-action-btn--save,
.bvmp-action-btn--save              { border-color: #6ee7b7 !important; }
.bvmp-wrap .bvmp-action-btn--save:hover,
.bvmp-action-btn--save:hover        { background: #ecfdf5 !important; border-color: #34d399 !important; }

.bvmp-wrap .bvmp-action-btn--delete,
.bvmp-action-btn--delete            { border-color: #fca5a5 !important; }
.bvmp-wrap .bvmp-action-btn--delete:hover,
.bvmp-action-btn--delete:hover      { background: #fef2f2 !important; border-color: #f87171 !important; }

/* ---- Stats Grid ---- */
.bvmp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}
.bvmp-stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.04);
    transition: transform .2s ease, box-shadow .2s ease;
}
.bvmp-stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,.09); }
.bvmp-stat-card__icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.bvmp-stat-card__icon--blue   { background: #eff6ff; }
.bvmp-stat-card__icon--green  { background: #ecfdf5; }
.bvmp-stat-card__icon--red    { background: #fef2f2; }
.bvmp-stat-card__icon--orange { background: #fff7ed; }
.bvmp-stat-card__value  { font-size: 28px; font-weight: 800; color: #111827; line-height: 1; }
.bvmp-stat-card__label  { font-size: 13px; color: #6b7280; margin-top: 4px; }

/* ---- Section ---- */
.bvmp-section { margin-bottom: 32px; }
.bvmp-section__header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.bvmp-section__title { font-size: 18px; font-weight: 700; margin: 0; color: #111827; }

/* ---- Card ---- */
.bvmp-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.04);
}
.bvmp-card--table { padding: 0; overflow: hidden; position: relative; }

/* ---- Form ---- */
.bvmp-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.bvmp-form-group { display: flex; flex-direction: column; gap: 6px; }
.bvmp-form-group--full { grid-column: 1 / -1; }
.bvmp-label { font-size: 13px; font-weight: 600; color: #374151; }
.bvmp-input, .bvmp-textarea {
    width: 100%; padding: 10px 14px;
    border: 1.5px solid #e5e7eb; border-radius: 8px;
    font-size: 14px; color: #111827; background: #f9fafb;
    transition: border-color .2s, box-shadow .2s; font-family: inherit;
}
.bvmp-input:focus, .bvmp-textarea:focus {
    outline: none; border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15); background: #fff;
}
.bvmp-textarea { resize: vertical; }
.bvmp-search { max-width: 260px; }
.bvmp-form-actions { margin-top: 20px; display: flex; align-items: center; gap: 16px; }
.bvmp-form-notice { font-size: 13px; }
.bvmp-form-notice--success { color: #059669; }
.bvmp-form-notice--error   { color: #dc2626; }

/* ---- Upload ---- */
.bvmp-upload-area {
    border: 2px dashed #d1d5db; border-radius: 10px;
    padding: 24px; text-align: center; cursor: pointer;
    position: relative; transition: border-color .2s, background .2s; background: #f9fafb;
}
.bvmp-upload-area:hover { border-color: #6366f1; background: #f5f3ff; }
.bvmp-file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.bvmp-upload-placeholder span { font-size: 32px; display: block; }
.bvmp-upload-placeholder p    { margin: 8px 0 0; color: #9ca3af; font-size: 14px; }
.bvmp-upload-area img { max-width: 160px; max-height: 160px; border-radius: 8px; object-fit: cover; display: block; margin: 0 auto; }

/* ---- Table ---- */
.bvmp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bvmp-table thead tr { background: #f8fafc; }
.bvmp-table th {
    padding: 12px 16px; text-align: left;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .6px; color: #6b7280; border-bottom: 1.5px solid #e5e7eb;
}
.bvmp-table td { padding: 14px 16px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; color: #374151; }
.bvmp-table tbody tr:hover td { background: #fafafa; }
.bvmp-table tbody tr:last-child td { border-bottom: none; }

/* ---- Badges ---- */
.bvmp-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.bvmp-badge--success { background: #ecfdf5; color: #065f46; }
.bvmp-badge--warning { background: #fffbeb; color: #92400e; }
.bvmp-badge--danger  { background: #fef2f2; color: #991b1b; }
.bvmp-badge--neutral { background: #f3f4f6; color: #374151; }

/* ---- Stock inline ---- */
.bvmp-stock-wrap { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.bvmp-stock-input {
    width: 72px; padding: 5px 8px;
    border: 1.5px solid #e5e7eb; border-radius: 6px;
    font-size: 13px; font-family: inherit; color: #111827; background: #f9fafb;
}
.bvmp-stock-input:focus { outline: none; border-color: #6366f1; background: #fff; }

/* ---- Pagination ---- */
.bvmp-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 16px; border-top: 1px solid #f3f4f6; flex-wrap: wrap;
}
.bvmp-page-btn {
    min-width: 36px; height: 36px; padding: 0 10px;
    border: 1.5px solid #e5e7eb; border-radius: 8px;
    background: #fff; font-size: 13px; font-weight: 500;
    cursor: pointer; color: #374151; transition: all .15s ease;
}
.bvmp-page-btn:hover    { border-color: #6366f1; color: #6366f1; }
.bvmp-page-btn.active   { background: #6366f1; border-color: #6366f1; color: #fff; }
.bvmp-page-btn:disabled { opacity: .4; cursor: default; }

/* ---- Loader ---- */
.bvmp-loader { display: flex; align-items: center; justify-content: center; padding: 48px; }
.bvmp-spinner {
    width: 32px; height: 32px;
    border: 3px solid #e5e7eb; border-top-color: #6366f1;
    border-radius: 50%; animation: bvmp-spin .7s linear infinite;
}
@keyframes bvmp-spin { to { transform: rotate(360deg); } }

/* ---- Modal ---- */
.bvmp-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.bvmp-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(2px); }
.bvmp-modal__box {
    position: relative; z-index: 1; background: #fff;
    border-radius: 16px; width: 100%; max-width: 540px; margin: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18); overflow: hidden;
}
.bvmp-modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid #f3f4f6;
}
.bvmp-modal__header h3 { margin: 0; font-size: 17px; font-weight: 700; }
.bvmp-modal__close {
    background: none; border: none; font-size: 20px;
    cursor: pointer; color: #9ca3af; padding: 4px; border-radius: 6px;
}
.bvmp-modal__close:hover { color: #111827; }
.bvmp-modal__body  { padding: 20px 24px; }
.bvmp-modal__body .bvmp-textarea,
.bvmp-modal__body .bvmp-upload-area { width: 100%; }
.bvmp-modal__footer {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 24px; border-top: 1px solid #f3f4f6;
}

/* ---- Notice ---- */
.bvmp-notice { padding: 14px 20px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; color: #1e40af; font-size: 14px; }
.bvmp-notice--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .bvmp-header { flex-direction: column; align-items: flex-start; }
    .bvmp-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .bvmp-table { display: block; overflow-x: auto; }
    .bvmp-section__header { flex-direction: column; align-items: flex-start; }
    .bvmp-search { max-width: 100%; }
}
@media (max-width: 480px) {
    .bvmp-stats-grid { grid-template-columns: 1fr; }
    .bvmp-form-actions { flex-direction: column; align-items: flex-start; }
}
