:root {
  --bg: #fde9ec;
  --panel: #fffaf9;
  --card: #ffffff;
  --accent: #f56b72;
  --accent-dark: #e5525c;
  --text: #242632;
  --muted: #7e7f89;
  --line: #eed4d8;
  --soft: #fff1f3;
  --shadow: 0 20px 45px rgba(201, 88, 100, 0.12);
  --radius: 24px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fdecee 0%, #fef6f7 100%);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--accent-dark);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
.flash {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
  padding: 14px 18px;
  border-radius: 16px;
  background: #111;
  color: #fff;
  box-shadow: var(--shadow);
  transition: 0.4s ease;
}
.flash-success {
  background: #207e54;
}
.flash-error {
  background: #a83f4a;
}
.flash.hide {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}
.btn {
  border: none;
  border-radius: 16px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 600;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff7f76);
  color: white;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-dark), #f96b65);
}
.btn-soft {
  background: var(--soft);
  color: var(--accent-dark);
}
.btn-block {
  width: 100%;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 240px;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--line);
}
.brand {
  padding: 12px;
}
.brand img {
  width: 70px;
  height: 70px;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}
.side-nav a {
  padding: 14px 16px;
  border-radius: 18px;
  color: var(--text);
  background: transparent;
  font-weight: 600;
}
.side-nav a.active,
.side-nav a:hover {
  background: var(--soft);
  color: var(--accent-dark);
}
.content {
  flex: 1;
  padding: 28px 28px 88px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}
.topbar h1 {
  font-size: 34px;
  margin-bottom: 6px;
}
.topbar p {
  color: var(--muted);
}
.topbar-chip {
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: capitalize;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.stat-card,
.panel,
.product-card,
.cart-panel,
.auth-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(240, 208, 213, 0.9);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.stat-card {
  padding: 24px;
}
.stat-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}
.stat-card strong {
  font-size: 30px;
}
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}
.panel {
  padding: 22px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}
.badge {
  display: inline-block;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 999px;
  text-transform: capitalize;
}
.mini-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mini-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--soft);
  border-radius: 18px;
}
.stack-form {
  display: grid;
  gap: 14px;
}
.stack-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}
.stack-form input,
.stack-form select,
.stack-form textarea,
.search-bar input,
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--text);
}
.inline-options {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.detail-card {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 14px;
  background: var(--soft);
  border-radius: 18px;
}
.settings-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.settings-grid .full {
  grid-column: 1/-1;
}
.mobile-nav {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 10px;
  box-shadow: var(--shadow);
  z-index: 20;
}
.mobile-nav a {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 700;
}
.mobile-nav a.active {
  background: var(--soft);
  color: var(--accent-dark);
}
.muted {
  color: var(--muted);
}

.image-picker {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px dashed #f3b8c0;
  border-radius: 20px;
  background: #fffafb;
}
.field-label {
  margin: 0;
  font-weight: 700;
  color: #2d3142;
}
.image-picker__preview-wrap {
  width: 160px;
  height: 160px;
  border-radius: 20px;
  overflow: hidden;
  background: #ffeef2;
  border: 1px solid #ffd5dc;
}
.image-picker__preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.muted {
  color: #7f7184;
  font-size: 0.9rem;
}

.report-filter-panel {
  margin-bottom: 18px;
}
.report-filter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.report-filter-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}
.report-filter-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.print-sheet {
  display: grid;
  gap: 18px;
}
.print-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(240, 208, 213, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.print-header h2 {
  font-size: 28px;
  margin-bottom: 8px;
}
.print-header p {
  color: var(--muted);
  margin-bottom: 4px;
}
.report-meta {
  display: grid;
  gap: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 16px 18px;
  border-radius: 20px;
  min-width: 280px;
}
.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.report-two-col {
  grid-template-columns: 1fr 1fr;
}
@media print {
  body {
    background: #fff;
  }
  .sidebar,
  .mobile-nav,
  .topbar .btn,
  .flash,
  .report-filter-panel {
    display: none !important;
  }
  .content {
    padding: 0;
  }
  .panel,
  .stat-card,
  .print-header {
    box-shadow: none;
    background: #fff;
    border: 1px solid #ddd;
  }
  .print-sheet {
    gap: 12px;
  }
  .report-summary-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  a {
    color: #000;
    text-decoration: none;
  }
}
.badge-danger {
  background: #ffe6e8;
  border-color: #ffc2c8;
  color: #b63b46;
}
.btn-danger {
  background: #b63b46;
  color: #fff;
}
.btn-danger:hover {
  background: #9f313c;
}
.btn-xs {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
}
.table-actions,
.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.table-actions form,
.detail-actions form {
  margin: 0;
}
.report-summary-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.currency-note {
  margin: -4px 0 10px;
  color: var(--muted, #666);
  font-size: 12px;
}
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Reports refresh */
.reports-page {
  display: grid;
  gap: 20px;
}
.report-filter-panel {
  padding: 24px;
}
.report-filter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}
.report-field {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}
.report-field span {
  font-size: 14px;
  color: var(--muted);
}
.report-field input[type="date"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  outline: none;
  color: var(--text);
}
.report-field input[type="date"]:focus {
  border-color: #f08d97;
  box-shadow: 0 0 0 4px rgba(245, 107, 114, 0.12);
}
.report-filter-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.report-filter-actions .btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.print-sheet {
  display: grid;
  gap: 20px;
}
.print-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92),
    rgba(255, 247, 248, 0.9)
  );
  border: 1px solid rgba(240, 208, 213, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.print-header h2 {
  font-size: 30px;
  margin-bottom: 8px;
}
.print-header p {
  color: var(--muted);
  margin-bottom: 4px;
}
.report-meta {
  display: grid;
  gap: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 16px 18px;
  border-radius: 20px;
  min-width: 280px;
}
.report-kpis .stat-card {
  position: relative;
  overflow: hidden;
}
.report-kpis .stat-card::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(245, 107, 114, 0.08);
}
.report-kpis .stat-card span {
  font-weight: 700;
  letter-spacing: 0.01em;
}
.report-kpis .stat-card strong {
  font-size: 28px;
}
.report-two-col {
  grid-template-columns: 1fr 1fr;
}
.report-two-col .panel {
  padding: 18px;
}
.report-two-col .mini-list li {
  background: #fff;
  border: 1px solid var(--line);
}
.reports-page table th {
  white-space: nowrap;
}
.reports-page table tbody tr:hover {
  background: rgba(255, 241, 243, 0.55);
}

.product-admin-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 18px;
  align-items: start;
}
.bulk-panel .panel-head {
  margin-bottom: 14px;
}
.bulk-upload-card {
  border: 1px dashed #f3b3c1;
  background: #fff7fa;
  border-radius: 20px;
  padding: 18px;
}
.bulk-upload-card p {
  margin: 0 0 14px;
  color: #6b4b57;
}
.bulk-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
}
.btn-secondary {
  background: #ffd7e2;
  color: #b03060;
}
.btn-ghost {
  background: #fff;
  color: #b03060;
  border: 1px solid #f3c0cf;
}
.bulk-form {
  margin-top: 6px;
}
.bulk-help {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #7b6470;
}
.bulk-help span {
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid #f3d7e0;
}

.status-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
}
.status-paid {
  background: #e6f7ec;
  color: #1a7f37;
  border-color: #c7ebd3;
}
.status-unpaid {
  background: #fff4e5;
  color: #b26a00;
  border-color: #f3ddb4;
}
.status-refunded {
  background: #e8f0ff;
  color: #2a5bd7;
  border-color: #cbdafc;
}
.status-voided {
  background: #fdeaea;
  color: #c62828;
  border-color: #f4c6c6;
}
.status-cancelled {
  background: #f7e9ed;
  color: #a83f4a;
  border-color: #ebcbd2;
}

.orders-filter-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.orders-filter-input,
.orders-filter-select {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
}
.orders-filter-input {
  min-width: 260px;
}
.panel-head--stack {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .orders-filter-form {
    width: 100%;
  }
  .orders-filter-input,
  .orders-filter-select {
    width: 100%;
  }
}

.toolbar-row {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  margin-bottom: 18px;
}
.system-filter-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.system-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}
.system-field label {
  font-size: 14px;
  color: #7b6f74;
  font-weight: 500;
}
.system-input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid #efd3d8 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #2f2a33;
  font-size: 14px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.system-input:focus {
  border-color: #f57f86 !important;
  box-shadow: 0 0 0 3px rgba(245, 127, 134, 0.12);
}
.system-btn {
  height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.system-btn-primary {
  background: #f57f86;
  color: #fff;
}
.system-btn-light {
  background: #f9ecee;
  color: #ef6b73;
  border: 1px solid #f3d9dd;
}
.system-btn-light:hover {
  background: #f6e1e4;
}
@media (max-width: 768px) {
  .system-filter-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .system-field {
    min-width: 100%;
  }
  .system-btn {
    width: 100%;
  }
}

.orders-filter-form-v2 {
  justify-content: flex-end;
  width: 100%;
}
.orders-filter-form-v2 .system-field {
  min-width: 180px;
}
.orders-filter-form-v2 .system-field-search {
  min-width: 280px;
}
.orders-filter-form-v2 .system-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #efd3d8 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.orders-filter-form-v2 .system-field label {
  margin-bottom: 2px;
}
.orders-filter-form-v2 .system-btn {
  height: 46px;
  margin-top: auto;
}
.panel-head--stack .toolbar-row {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}
.panel-head--stack {
  align-items: flex-start;
}
.system-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
@media (max-width: 768px) {
  .panel-head--stack .toolbar-row {
    justify-content: stretch;
  }
  .orders-filter-form-v2 .system-field,
  .orders-filter-form-v2 .system-field-search,
  .orders-filter-form-v2 .system-field-status {
    min-width: 100%;
  }
}

/* Orders filter matches system/product inputs */
.orders-toolbar-row {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.orders-filter-form-v3 {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  width: auto;
}
.orders-filter-form-v3 .system-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 190px;
}
.orders-filter-form-v3 .system-field-search {
  min-width: 280px;
}
.orders-filter-form-v3 .system-field label {
  font-size: 14px;
  color: #7b6f74;
  font-weight: 500;
}
.orders-filter-form-v3 .system-input,
.orders-filter-form-v3 input[type="text"],
.orders-filter-form-v3 select {
  width: 100%;
  height: 44px !important;
  padding: 0 14px !important;
  border: 1px solid #efd3d8 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #2f2a33 !important;
  font-size: 14px !important;
  outline: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.orders-filter-form-v3 .system-input:focus,
.orders-filter-form-v3 input[type="text"]:focus,
.orders-filter-form-v3 select:focus {
  border-color: #f57f86 !important;
  box-shadow: 0 0 0 3px rgba(245, 127, 134, 0.12) !important;
}
.orders-filter-form-v3 .system-select {
  padding-right: 40px !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #9b8f93 50%),
    linear-gradient(135deg, #9b8f93 50%, transparent 50%) !important;
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px) !important;
  background-size:
    6px 6px,
    6px 6px !important;
  background-repeat: no-repeat !important;
}
.orders-filter-form-v3 .system-btn {
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  margin-top: auto;
}
@media (max-width: 768px) {
  .orders-toolbar-row {
    justify-content: stretch;
  }
  .orders-filter-form-v3 {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .orders-filter-form-v3 .system-field,
  .orders-filter-form-v3 .system-field-search {
    min-width: 100%;
  }
  .orders-filter-form-v3 .system-btn {
    width: 100%;
  }
}

/* Orders filter styled like product form inputs */
.orders-toolbar-row {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.orders-form-style-filter {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.orders-form-style-field {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
  min-width: 220px;
}
.orders-form-style-field:first-child {
  min-width: 320px;
}
.orders-form-style-input {
  width: 100%;
  border: 1px solid var(--line) !important;
  background: #fff !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  color: var(--text) !important;
  min-height: 46px;
  outline: none;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.orders-form-style-input:focus {
  border-color: #f57f86 !important;
  box-shadow: 0 0 0 3px rgba(245, 127, 134, 0.1) !important;
}
.orders-form-style-filter select.orders-form-style-input {
  padding-right: 42px !important;
}
.orders-filter-reset {
  margin-top: auto;
  height: 46px;
}
@media (max-width: 768px) {
  .orders-toolbar-row {
    justify-content: stretch;
  }
  .orders-form-style-filter {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .orders-form-style-field,
  .orders-form-style-field:first-child {
    min-width: 100%;
  }
  .orders-filter-reset {
    width: 100%;
  }
}

.products-toolbar-row {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.products-live-filter-form {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.products-filter-field {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
  min-width: 220px;
}
.products-filter-field:first-child {
  min-width: 320px;
}
.products-filter-input {
  width: 100%;
  border: 1px solid var(--line) !important;
  background: #fff !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  color: var(--text) !important;
  min-height: 46px;
  outline: none;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.products-filter-input:focus {
  border-color: #f57f86 !important;
  box-shadow: 0 0 0 3px rgba(245, 127, 134, 0.1) !important;
}
.products-live-filter-form select.products-filter-input {
  padding-right: 42px !important;
}
.products-filter-reset {
  margin-top: auto;
  height: 46px;
}
@media (max-width: 768px) {
  .products-toolbar-row {
    justify-content: stretch;
  }
  .products-live-filter-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .products-filter-field,
  .products-filter-field:first-child {
    min-width: 100%;
  }
  .products-filter-reset {
    width: 100%;
  }
}

/* Product list filter aligned beside heading and styled like system UI */
.products-panel-head-inline {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.products-panel-head-copy {
  flex: 1 1 260px;
  min-width: 220px;
}
.products-live-filter-inline {
  flex: 0 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-left: auto;
}
.products-live-filter-inline .products-filter-field {
  min-width: 210px;
}
.products-live-filter-inline .products-filter-field:first-child {
  min-width: 280px;
}
.products-live-filter-inline .products-filter-field {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}
.products-live-filter-inline .products-filter-input,
.products-live-filter-inline input[type="text"],
.products-live-filter-inline select {
  width: 100%;
  min-height: 46px;
  height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: var(--text) !important;
  box-shadow: none !important;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.products-live-filter-inline .products-filter-input:focus,
.products-live-filter-inline input[type="text"]:focus,
.products-live-filter-inline select:focus {
  border-color: #f57f86 !important;
  box-shadow: 0 0 0 3px rgba(245, 127, 134, 0.1) !important;
}
.products-live-filter-inline .products-filter-select {
  padding-right: 42px !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #9b8f93 50%),
    linear-gradient(135deg, #9b8f93 50%, transparent 50%) !important;
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px) !important;
  background-size:
    6px 6px,
    6px 6px !important;
  background-repeat: no-repeat !important;
}
.products-filter-reset {
  height: 46px !important;
  padding: 0 18px !important;
  border-radius: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: auto;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .products-panel-head-inline {
    align-items: stretch;
  }
  .products-live-filter-inline {
    width: 100%;
    justify-content: flex-start;
  }
}
@media (max-width: 768px) {
  .products-live-filter-inline {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .products-live-filter-inline .products-filter-field,
  .products-live-filter-inline .products-filter-field:first-child {
    min-width: 100%;
  }
  .products-filter-reset {
    width: 100%;
  }
}

/* Products page layout adjustment */
.product-admin-grid-single {
  display: block;
}
.product-admin-grid-single > .panel {
  max-width: 820px;
}
.bulk-panel-below {
  margin-top: 18px;
}
.bulk-panel-below .bulk-upload-card {
  max-width: 820px;
}
@media (max-width: 900px) {
  .product-admin-grid-single > .panel,
  .bulk-panel-below .bulk-upload-card {
    max-width: 100%;
  }
}

/* Uniform width for Add product and Bulk upload */
.product-admin-grid-single > .panel,
.bulk-panel-below,
.bulk-panel-below .bulk-upload-card {
  max-width: 820px;
}
.product-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.pagination-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .product-admin-grid-single > .panel,
  .bulk-panel-below,
  .bulk-panel-below .bulk-upload-card {
    max-width: 100%;
  }
  .product-pagination {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Products two-column layout */
.products-two-col-layout {
  display: grid !important;
  grid-template-columns: 380px minmax(0, 1fr) !important;
  gap: 20px !important;
  align-items: start !important;
}
.products-two-col-left,
.products-two-col-right {
  min-width: 0;
}
.products-two-col-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.products-two-col-left .product-admin-grid-single {
  display: block;
}
.products-two-col-left .product-admin-grid-single > .panel,
.products-two-col-left .bulk-panel-below,
.products-two-col-left .bulk-panel-below .bulk-upload-card,
.products-two-col-right .panel {
  width: 100% !important;
  max-width: 100% !important;
}
@media (max-width: 1000px) {
  .products-two-col-layout {
    grid-template-columns: 1fr !important;
  }
}

.product-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.pagination-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.pagination-links .btn {
  min-width: 40px;
}
.pagination-current {
  pointer-events: none;
}
.pagination-ellipsis {
  color: var(--muted);
  padding: 0 4px;
}
@media (max-width: 900px) {
  .product-pagination {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Product list live filter under heading */
.products-panel-head-under {
  display: block;
  margin-bottom: 8px;
}
.products-live-filter-under {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.products-live-filter-under .products-filter-field {
  display: grid;
  gap: 8px;
  min-width: 220px;
  font-weight: 600;
  color: var(--text);
}
.products-live-filter-under .products-filter-field:first-of-type {
  min-width: 300px;
}
.products-live-filter-under .products-filter-input,
.products-live-filter-under input[type="text"],
.products-live-filter-under select {
  width: 100%;
  min-height: 46px;
  height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: var(--text) !important;
  outline: none;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.products-live-filter-under .products-filter-input:focus,
.products-live-filter-under input[type="text"]:focus,
.products-live-filter-under select:focus {
  border-color: #f57f86 !important;
  box-shadow: 0 0 0 3px rgba(245, 127, 134, 0.1) !important;
}
.products-live-filter-under .products-filter-select {
  padding-right: 42px !important;
}
.products-live-filter-under .products-filter-reset {
  height: 46px !important;
  padding: 0 18px !important;
  border-radius: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-top: auto;
}
@media (max-width: 768px) {
  .products-live-filter-under {
    flex-direction: column;
    align-items: stretch;
  }
  .products-live-filter-under .products-filter-field,
  .products-live-filter-under .products-filter-field:first-of-type {
    min-width: 100%;
  }
  .products-live-filter-under .products-filter-reset {
    width: 100%;
    justify-content: center;
  }
}

/* Sidebar redesign inspired by compact admin menu */
.sidebar-modern {
  width: 250px;
  padding: 18px 14px 16px;
  background: rgba(255, 255, 255, 0.66);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-window-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
}
.sidebar-window-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.sidebar-window-dots .dot-red {
  background: #f2646d;
}
.sidebar-window-dots .dot-yellow {
  background: #f6bc43;
}
.sidebar-window-dots .dot-green {
  background: #9dd13f;
}

.sidebar-brand-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px 10px;
}
.brand-modern {
  padding: 0;
}
.brand-modern img {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  padding: 12px;
  background: rgba(245, 127, 134, 0.08);
}
.sidebar-collapse-mark {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-right: 4px;
}
.sidebar-collapse-mark span {
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: rgba(239, 107, 115, 0.9);
  opacity: 0.65;
}

.side-nav-modern {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}
.side-nav-modern a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 48px;
  padding: 13px 14px;
  border-radius: 18px;
  color: var(--text);
  background: transparent;
  font-weight: 600;
  transition: all 0.2s ease;
}
.side-nav-modern a:hover,
.side-nav-modern a.active {
  background: var(--soft);
  color: var(--accent-dark);
}
.nav-icon {
  width: 22px;
  min-width: 22px;
  text-align: center;
  font-size: 15px;
  opacity: 0.92;
}
.nav-label {
  flex: 1;
}
.nav-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 8px;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 10px 8px;
  min-height: 60px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  position: sticky;
  bottom: 0;
}
.sidebar-user-card img {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  background: #fff0f3;
  border: 1px solid var(--line);
}
.sidebar-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sidebar-user-meta strong {
  font-size: 13px;
  line-height: 1.2;
}
.sidebar-user-meta span {
  font-size: 11px;
  color: var(--muted);
}
.sidebar-user-exit {
  margin-left: auto;
  font-size: 16px;
  color: var(--accent-dark);
}

/* Working sidebar toggle */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 49, 66, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 25;
}

.sidebar-brand-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px 10px;
}

.sidebar-toggle-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
  background: var(--soft);
}
.sidebar-toggle-btn span {
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: rgba(239, 107, 115, 0.92);
  opacity: 0.72;
  display: block;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 30;
  flex: 0 0 250px;
  width: 250px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    width 0.25s ease,
    padding 0.25s ease,
    opacity 0.25s ease,
    margin 0.25s ease;
}
.content {
  flex: 1;
  min-width: 0;
  margin-left: 250px;
  transition:
    margin-left 0.25s ease,
    padding 0.25s ease;
}

body.sidebar-collapsed .sidebar {
  width: 80px !important;
  flex-basis: 80px;
  padding: 18px 10px !important;
  border-right: 1px solid var(--line) !important;
  overflow: hidden;
  opacity: 1 !important;
}
body.sidebar-collapsed .content {
  margin-left: 80px;
  padding-left: 28px;
}

body.sidebar-collapsed .sidebar-brand-wrap {
  justify-content: center;
}

body.sidebar-collapsed .brand-modern {
  display: none;
}

body.sidebar-collapsed .nav-label {
  display: none;
}

body.sidebar-collapsed .side-nav-modern a {
  justify-content: flex-start;
  padding: 13px 14px;
}

body.sidebar-collapsed .nav-icon {
  width: 22px;
  min-width: 22px;
  margin: 0;
  text-align: center;
  font-size: 18px;
}

body.sidebar-collapsed .sidebar-user-meta,
body.sidebar-collapsed .sidebar-user-exit {
  display: none;
}

body.sidebar-collapsed .sidebar-user-card {
  justify-content: center;
}

.pagination-disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.mobile-more-menu {
  position: fixed;
  bottom: 70px;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #eee;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  z-index: 50;
}

.mobile-more-menu.show {
  display: flex;
}

.mobile-more-menu a {
  padding: 14px;
  text-align: center;
  border-bottom: 1px solid #f2f2f2;
  text-decoration: none;
  color: #333;
}

.mobile-more-menu a.logout {
  color: #ef4444;
  font-weight: 600;
}
