/* ============================================================
   BR BOUTIQUE — ADMIN STYLES (Bootstrap 5 Enhancements)
   Brand Colors:
   - Primary Black:  #111111
   - Yellow Accent:  #F5CF4D
   - White:          #FFFFFF
   ============================================================ */

:root {
  --br-black:  #111111;
  --br-yellow: #F5CF4D;
  --br-yellow-hover: #E8BE32;
  --br-white:  #FFFFFF;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1a1a1a;
  min-height: 100vh;
}

.text-yellow { color: var(--br-yellow) !important; }
.bg-yellow   { background-color: var(--br-yellow) !important; color: #111 !important; }

/* Custom Bootstrap color overrides */
.btn-warning {
  background-color: var(--br-yellow) !important;
  border-color: var(--br-yellow) !important;
  color: #111 !important;
}
.btn-warning:hover {
  background-color: var(--br-yellow-hover) !important;
  border-color: var(--br-yellow-hover) !important;
}

/* ── Navbar ── */
.navbar-dark.bg-dark {
  background-color: var(--br-black) !important;
  border-bottom: 2px solid var(--br-yellow);
}
.logo-box {
   width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.logo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nav-pills .nav-link {
  color: rgba(255,255,255,.75);
  border-radius: 8px;
  transition: all .15s ease;
}
.nav-pills .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.nav-pills .nav-link.active {
  background-color: var(--br-yellow) !important;
  color: var(--br-black) !important;
  font-weight: 700;
}
.user-avatar {
  width: 26px; height: 26px;
  background: var(--br-yellow);
  color: #111;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .8rem; font-weight: 800;
}

/* ── Tables & Badges ── */
.table-hover tbody tr:hover {
  background-color: rgba(224, 181, 0, 0.04);
}
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700;
}
.status-nouvelle       { background-color: #DBEAFE; color: #1D4ED8; }
.status-confirmée      { background-color: #DCFCE7; color: #15803D; }
.status-en_préparation { background-color: #FFEDD5; color: #C2410C; }
.status-expédiée       { background-color: #F3E8FF; color: #7E22CE; }
.status-livrée         { background-color: #D1FAE5; color: #047857; }
.status-annulée        { background-color: #FEE2E2; color: #B91C1C; }

/* ── Upload Dropzone ── */
.border-dashed {
  border-style: dashed !important;
  border-color: #cbd5e1 !important;
  transition: border-color .2s, background-color .2s;
  cursor: pointer;
}
.border-dashed:hover, .border-dashed.dragover {
  border-color: var(--br-yellow) !important;
  background-color: #fffdf0 !important;
}

/* ── Image Previews ── */
.img-preview-card {
  position: relative;
  width: 90px; height: 90px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  overflow: hidden;
  background: #fff;
}
.img-preview-card.is-primary {
  border-color: var(--br-yellow);
  box-shadow: 0 0 0 2px rgba(224, 181, 0, 0.3);
}
.img-preview-card img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.img-preview-card .badge-primary-img {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--br-yellow); color: #111;
  font-size: .65rem; font-weight: 800; text-align: center;
  padding: 2px 0;
}
.img-preview-card .btn-remove-img {
  position: absolute; top: 3px; right: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.9); color: #fff;
  border: none; padding: 0;
  font-size: .75rem;
  display: grid; place-items: center;
}
.img-preview-card .btn-set-primary {
  position: absolute; bottom: 3px; left: 3px;
  background: rgba(0, 0, 0, 0.7); color: #fff;
  border: none; font-size: .65rem;
  padding: 2px 6px; border-radius: 4px;
}

/* ── Product Table Thumbnails ── */
.product-td-thumb {
  width: 52px; height: 52px;
  border-radius: 8px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.product-td-placeholder {
  width: 52px; height: 52px;
  border-radius: 8px;
  background: #f1f5f9;
  display: grid; place-items: center;
  font-size: 22px;
}

/* ══════════════════════════════════════════════════════════
   LOGIN PAGE SPECIFIC STYLES
   ============================================================ */
.login-page {
  min-height: 100vh; display: grid; place-items: center;
  background: var(--br-black);
  background-image: radial-gradient(circle at 70% 30%, rgba(224,181,0,.08) 0%, transparent 60%);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 420px;
  background: #fff; border-radius: 20px;
  padding: 40px 36px; box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px; justify-content: center;
}
.login-logo-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--br-yellow); display: grid; place-items: center; font-size: 24px;
}
.login-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.login-sub   { font-size: .88rem; color: #64748b; margin-bottom: 24px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 6px; }
.login-field input {
  width: 100%; height: 48px; border: 1.5px solid #e2e8f0;
  border-radius: 10px; padding: 0 14px; font-size: .95rem;
}
.login-field input:focus { outline: none; border-color: var(--br-yellow); }
.login-error {
  background: #fee2e2; border: 1px solid #fecaca; color: #991b1b;
  border-radius: 8px; padding: 10px 14px; font-size: .88rem;
  margin-bottom: 16px; display: none;
}
.login-btn {
  width: 100%; height: 48px; background: var(--br-black); color: #fff;
  border-radius: 10px; font-size: 1rem; font-weight: 700;
  border: none; cursor: pointer; transition: background .15s;
}
.login-btn:hover { background: #262626; }

/* ── Mobile adjustments ── */
@media (max-width: 768px) {
  .table thead { display: none; }
  .table tbody tr {
    display: block;
    margin-bottom: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
  }
  .table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border: none;
    font-size: .9rem;
  }
  .table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: .78rem;
    color: #64748b;
    text-transform: uppercase;
  }
  .table tbody td:last-child {
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    margin-top: 6px;
    justify-content: flex-end;
  }
}


/* ===== Admin responsive ===== */
.table-responsive, .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 768px) {
  .btn-group .btn { padding: .5rem .6rem; }
  .modal-dialog { margin: .5rem; }
}
