/* Mehndi Designs 2026 - modern admin compatibility layer
   Keeps the existing Bootstrap/AdminBSB stack while modernising spacing,
   typography, cards, forms and store management. */
:root {
  --md-primary: #7a3e65;
  --md-primary-dark: #5e2d4d;
  --md-primary-soft: #f5eaf1;
  --md-accent: #c06b96;
  --md-text: #261d24;
  --md-muted: #776d75;
  --md-border: #eadfe6;
  --md-bg: #f7f5f7;
  --md-surface: #ffffff;
  --md-success: #2e7d5b;
  --md-warning: #a05f17;
  --md-danger: #b3404a;
  --md-radius: 16px;
  --md-shadow: 0 8px 28px rgba(54, 31, 48, .08);
}

html, body { background: var(--md-bg); color: var(--md-text); }
body.poppins { font-family: 'Poppins', 'Roboto', sans-serif !important; }
.navbar { background: linear-gradient(105deg, var(--md-primary-dark), var(--md-primary)) !important; box-shadow: 0 4px 18px rgba(70, 34, 57, .20); }
.navbar-brand { font-weight: 700; letter-spacing: .2px; }
.sidebar { box-shadow: 4px 0 22px rgba(39, 25, 34, .06); border-right: 1px solid var(--md-border); }
.sidebar .user-info { background: linear-gradient(135deg, #6d385b, #9b527c) !important; }
.sidebar .menu .list .header { color: var(--md-muted); font-size: 11px; letter-spacing: 1.2px; font-weight: 700; }
.sidebar .menu .list a { border-radius: 10px; margin: 2px 10px; width: calc(100% - 20px); transition: .18s ease; }
.sidebar .menu .list a:hover { background: var(--md-primary-soft); }
.sidebar .menu .list li.active > :first-child i,
.sidebar .menu .list li.active > :first-child span { color: var(--md-primary) !important; }
.sidebar .menu .list li.active > :first-child { background: var(--md-primary-soft); }

section.content { background: transparent; }
.block-header h2 { font-size: 24px !important; font-weight: 700 !important; color: var(--md-text); }
.breadcrumb { background: transparent !important; padding-left: 0 !important; }
.breadcrumb > .active { color: var(--md-muted); }
.card { border-radius: var(--md-radius) !important; box-shadow: var(--md-shadow) !important; border: 1px solid var(--md-border); overflow: hidden; }
.card .header { border-bottom: 1px solid var(--md-border) !important; padding: 20px 22px !important; }
.card .header h2 { font-weight: 700 !important; color: var(--md-text) !important; }
.card .body { padding: 22px !important; }

.btn { border-radius: 10px !important; font-weight: 600; text-transform: none !important; letter-spacing: .1px; box-shadow: none !important; }
.btn-primary { background: var(--md-primary) !important; border-color: var(--md-primary) !important; }
.btn-primary:hover, .btn-primary:focus { background: var(--md-primary-dark) !important; border-color: var(--md-primary-dark) !important; }
.btn-danger { background: var(--md-danger) !important; border-color: var(--md-danger) !important; }
.form-control { border-radius: 10px !important; border: 1px solid #ded3da !important; padding: 10px 12px !important; height: auto !important; box-shadow: none !important; background: #fff !important; }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-control:focus { border-color: var(--md-accent) !important; box-shadow: 0 0 0 3px rgba(192,107,150,.12) !important; }
.form-line:after { border-bottom-color: var(--md-primary) !important; }
.table { margin-bottom: 12px; }
.table > thead > tr > th { color: var(--md-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .45px; border-bottom: 1px solid var(--md-border) !important; }
.table > tbody > tr > td { vertical-align: middle; border-top: 1px solid #f0e8ed !important; }
.table-hover > tbody > tr:hover { background: #fcf9fb !important; }
.alert { border-radius: 12px !important; border: 0; }
.pagination > li > a, .pagination > li > span { border-radius: 8px !important; margin: 0 2px; color: var(--md-primary); }
.pagination > .active > a, .pagination > .active > a:hover { background: var(--md-primary) !important; border-color: var(--md-primary) !important; }

.md-page-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; flex-wrap:wrap; }
.md-page-head h2 { margin:0; font-size:28px; font-weight:800; }
.md-page-head p { margin:5px 0 0; color:var(--md-muted); }
.md-actions { display:flex; gap:8px; flex-wrap:wrap; }
.md-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.md-stat { background:var(--md-surface); border:1px solid var(--md-border); border-radius:15px; padding:17px; box-shadow:0 5px 18px rgba(54,31,48,.05); }
.md-stat .md-stat-label { color:var(--md-muted); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; }
.md-stat .md-stat-value { font-size:26px; line-height:1.2; font-weight:800; margin-top:6px; color:var(--md-text); }
.md-stat .material-icons { float:right; color:var(--md-primary); background:var(--md-primary-soft); border-radius:10px; padding:7px; margin-top:-2px; }
.md-tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.md-tab { padding:9px 14px; border-radius:999px; background:#fff; border:1px solid var(--md-border); color:var(--md-muted); font-weight:700; text-decoration:none !important; }
.md-tab:hover { color:var(--md-primary); border-color:#d7b7c9; }
.md-tab.active { background:var(--md-primary); color:#fff !important; border-color:var(--md-primary); }
.md-filterbar { background:#fcfafb; border:1px solid var(--md-border); border-radius:14px; padding:14px; margin-bottom:15px; }
.md-product-thumb { width:64px; height:64px; object-fit:cover; border-radius:12px; border:1px solid var(--md-border); background:#f2edf0; }
.md-badge { display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border-radius:999px; font-size:11px; font-weight:800; white-space:nowrap; }
.md-badge.digital { color:#7d4e10; background:#fff1d9; }
.md-badge.affiliate { color:#265d7c; background:#e6f4fb; }
.md-badge.active { color:#226747; background:#e4f5ec; }
.md-badge.disabled { color:#8c3440; background:#fde9ec; }
.md-badge.featured { color:#6e3d73; background:#f4e7f5; }
.md-description { max-width:410px; color:var(--md-muted); font-size:12px; margin-top:3px; }
.md-type-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.md-type-option { border:2px solid var(--md-border); border-radius:14px; padding:16px; cursor:pointer; transition:.18s ease; background:#fff; position:relative; }
.md-type-option:hover { transform:translateY(-1px); border-color:#d8b7ca; }
.md-type-option.active { border-color:var(--md-primary); background:var(--md-primary-soft); }
.md-type-option input { position:absolute; opacity:0; pointer-events:none; }
.md-type-option .material-icons { color:var(--md-primary); font-size:28px; }
.md-type-option strong { display:block; font-size:15px; margin:7px 0 3px; }
.md-type-option small { color:var(--md-muted); line-height:1.4; }
.md-form-section { border:1px solid var(--md-border); border-radius:14px; padding:18px; margin-bottom:16px; background:#fff; }
.md-form-section h3 { font-size:15px; font-weight:800; margin:0 0 14px; }
.md-field-help { color:var(--md-muted); margin-top:5px; display:block; }
.md-image-preview { width:160px; height:160px; object-fit:cover; border-radius:14px; border:1px solid var(--md-border); display:none; margin:10px 0; background:#f4eff2; }
.md-image-preview.visible { display:block; }
.md-current-image { width:160px; height:160px; object-fit:cover; border-radius:14px; border:1px solid var(--md-border); margin-bottom:10px; }
.md-required { color:var(--md-danger); }
.md-hidden { display:none !important; }

@media (max-width: 991px) {
  .md-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .md-page-head h2 { font-size:24px; }
}
@media (max-width: 767px) {
  .md-stat-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .md-stat { padding:14px; }
  .md-stat .md-stat-value { font-size:22px; }
  .md-type-picker { grid-template-columns:1fr; }
  .card .body { padding:15px !important; }
  .table-responsive { border:0 !important; }
}

/* Accessible polish: visible focus, responsive controls and reduced motion. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--md-primary); outline-offset: 3px;
}
.md-type-option:focus-within { outline: 3px solid var(--md-primary); outline-offset: 3px; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.btn, .button { min-height: 44px; }
@media (max-width: 600px) {
  .card .body { padding: 16px !important; }
  .form-control { font-size: 16px !important; }
  .login-box { max-width: calc(100vw - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}
