.account-auth-page,
.account-page,
.admin-page,
.admin-login-page {
  background: #0f0f0f;
  color: #fff;
  padding: 28px 0 56px;
}

.auth-container {
  max-width: 1100px;
}

.auth-container.single-card {
  max-width: 520px;
}

.auth-header {
  margin-bottom: 24px;
}

.auth-header h1,
.account-content h1,
.admin-content h1,
.admin-login-card h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.auth-header p,
.account-muted {
  color: #aaa;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.auth-card,
.account-section-card,
.admin-section-card,
.admin-login-card,
.account-nav,
.admin-nav {
  background: #171717;
  border: 1px solid #262626;
  border-radius: 12px;
  padding: 18px;
}

.auth-card h2,
.account-section-card h2,
.admin-section-card h2 {
  margin: 0 0 12px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-form.compact {
  gap: 8px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 0.86rem;
  color: #ddd;
}

.auth-form input,
.auth-form select,
.auth-form textarea,
.inline-status-form select {
  width: 100%;
  background: #0f0f0f;
  border: 1px solid #313131;
  border-radius: 8px;
  color: #fff;
  padding: 10px 12px;
  font-family: inherit;
}

.auth-form textarea {
  resize: vertical;
}

.auth-form button,
.inline-status-form button,
.logout-form button,
.account-btn {
  background: #ffff00;
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logout-form {
  margin-top: 10px;
}

.auth-link-row {
  margin-top: 10px;
}

.auth-link-row a,
.account-nav a,
.admin-nav a,
.account-pagination a {
  color: #ffff00;
  text-decoration: none;
}

.account-layout,
.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

.admin-nav-shell,
.admin-content,
.admin-content > *,
.admin-section-card {
  min-width: 0;
}

.account-nav,
.admin-nav {
  height: fit-content;
  position: sticky;
  top: 140px;
}

.account-nav h3,
.admin-nav h3 {
  margin: 0 0 12px;
}

.account-nav a,
.admin-nav a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid #242424;
}

.account-nav a.active,
.admin-nav a.active {
  color: #fff;
  font-weight: 700;
}

.admin-nav-shell {
  align-self: start;
}

.admin-nav-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  background: #171717;
  color: #fff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-sizing: border-box;
}

.admin-nav-toggle-icon {
  width: 18px;
  min-width: 18px;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.admin-nav-toggle-icon span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: #ffff00;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.admin-nav-toggle-label {
  flex: 1 1 auto;
  text-align: left;
}

.admin-nav-shell.is-open .admin-nav-toggle-icon span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.admin-nav-shell.is-open .admin-nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.admin-nav-shell.is-open .admin-nav-toggle-icon span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.account-content,
.admin-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-stats-grid,
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-stats-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.account-stat-card,
.admin-stat-card {
  background: #1b1b1b;
  border: 1px solid #282828;
  border-radius: 10px;
  padding: 12px;
}

.account-stat-card span,
.admin-stat-card span {
  color: #bbb;
  font-size: 0.82rem;
  display: block;
  margin-bottom: 6px;
}

.account-stat-card strong,
.admin-stat-card strong {
  font-size: 1.2rem;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.grid-two > * {
  min-width: 0;
}

.account-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.account-products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.account-product-card {
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 12px;
  background: #111;
}

.account-product-card a {
  color: #fff;
  text-decoration: none;
}

.account-product-card img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  border-radius: 6px;
  background: #1b1b1b;
}

.account-product-card h3 {
  font-size: 0.95rem;
  margin: 10px 0 4px;
}

.account-product-price {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.account-product-price-current {
  color: #ffff00;
  font-size: 1.02rem;
}

.account-product-price-original {
  color: #ff7a7a;
  font-size: 0.85rem;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  font-weight: 700;
}

.account-product-price-discount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid #ff4d4f;
  color: #ff4d4f;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.account-table th,
.account-table td {
  border-bottom: 1px solid #2d2d2d;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.account-table th {
  color: #bbb;
  font-weight: 600;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.78rem;
  text-transform: uppercase;
  background: #333;
  color: #fff;
}

.status-pending,
.status-on-hold,
.status-new,
.status-unsubscribed {
  background: #5a4100;
  color: #ffdf8c;
}

.status-processing,
.status-paid,
.status-completed,
.status-responded {
  background: #063d64;
  color: #9ad6ff;
}

.status-shipped,
.status-delivered,
.status-active,
.status-read {
  background: #0b4d2d;
  color: #a6eec2;
}

.status-cancelled,
.status-failed,
.status-refunded,
.status-closed {
  background: #4d0b0b;
  color: #ffc3c3;
}

.account-pagination {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.inline-status-form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.inline-status-form select {
  min-width: 120px;
  padding: 8px;
}

.message-body-row {
  background: #131313;
  color: #bbb;
}

@media (max-width: 1100px) {
  .admin-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .auth-grid,
  .account-layout,
  .admin-layout,
  .account-address-grid,
  .grid-two,
  .account-products-grid {
    grid-template-columns: 1fr;
  }

  .account-nav,
  .admin-nav {
    position: static;
  }

  .admin-page {
    padding: 22px 0 42px;
  }

  .admin-layout {
    gap: 14px;
  }

  .admin-nav-shell {
    position: relative;
    z-index: 30;
  }

  .admin-nav-toggle {
    display: inline-flex;
    width: fit-content;
    min-width: 152px;
  }

  .admin-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 1000;
  }

  .admin-nav-shell .admin-nav {
    display: block;
    position: fixed;
    top: 138px;
    left: 0;
    width: min(280px, calc(100vw - 28px));
    max-height: calc(100vh - 154px);
    margin-top: 0;
    border-radius: 0 14px 14px 0;
    border-left: none;
    overflow-y: auto;
    box-shadow: 18px 0 36px rgba(0, 0, 0, 0.38);
    transform: translateX(calc(-100% - 18px));
    transition: transform 0.24s ease;
    z-index: 1001;
  }

  .admin-nav-shell.is-open .admin-nav {
    transform: translateX(0);
  }

  .admin-nav-shell.is-open .admin-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-content h1 {
    font-size: 1.55rem;
  }

  .admin-section-card {
    padding: 16px;
  }

  .account-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 700px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-toolbar-actions,
  .admin-products-toolbar,
  .admin-orders-toolbar,
  .account-pagination {
    align-items: stretch;
  }

  .account-pagination {
    flex-wrap: wrap;
  }

  .admin-toolbar-actions {
    width: 100%;
    justify-content: stretch;
  }

  .admin-toolbar-actions .account-btn,
  .admin-toolbar-actions button,
  .admin-products-toolbar .account-btn {
    width: 100%;
  }

  .admin-products-search-row {
    align-items: stretch;
  }

  .admin-products-search-row button,
  .admin-products-clear {
    display: inline-flex;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .admin-page {
    padding: 18px 0 36px;
  }

  .admin-nav-shell .admin-nav {
    top: 132px;
    max-height: calc(100vh - 144px);
  }

  .admin-content {
    gap: 14px;
  }

  .admin-content h1 {
    font-size: 1.4rem;
  }

  .admin-section-card {
    padding: 14px;
  }

  .admin-stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-table th,
  .account-table td {
    padding: 9px 7px;
    font-size: 0.82rem;
  }
}


.admin-section-card.admin-orders-section {
  padding: 16px;
}

.admin-orders-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-orders-table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
  border-collapse: collapse;
}

.admin-orders-table th,
.admin-orders-table td {
  vertical-align: top;
  padding: 10px 6px;
  overflow-wrap: break-word;
  word-break: normal;
}

.admin-orders-table th {
  white-space: nowrap;
}

.admin-orders-table th:nth-child(1),
.admin-orders-table td:nth-child(1) {
  width: 14%;
}

.admin-orders-table th:nth-child(2),
.admin-orders-table td:nth-child(2) {
  width: 10%;
}

.admin-orders-table th:nth-child(3),
.admin-orders-table td:nth-child(3) {
  width: 9%;
}

.admin-orders-table th:nth-child(4),
.admin-orders-table td:nth-child(4) {
  width: 8%;
}

.admin-orders-table th:nth-child(5),
.admin-orders-table td:nth-child(5) {
  width: 14%;
}

.admin-orders-table th:nth-child(6),
.admin-orders-table td:nth-child(6) {
  width: 10%;
}

.admin-orders-table th:nth-child(7),
.admin-orders-table td:nth-child(7) {
  width: 21%;
}

.admin-orders-table th:nth-child(8),
.admin-orders-table td:nth-child(8) {
  width: 14%;
}

.admin-orders-table .status-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  padding: 2px 8px;
  white-space: nowrap;
}

.admin-order-total,
.admin-order-payment,
.admin-order-date {
  white-space: nowrap;
}

.admin-order-process-title {
  color: #ececec;
  font-weight: 600;
  line-height: 1.25;
}

.admin-order-process-meta {
  display: block;
  margin-top: 3px;
  line-height: 1.25;
  font-size: 0.8rem;
}

.admin-order-update {
  text-align: left;
}

.admin-inline-status-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.admin-inline-status-form select,
.admin-inline-status-form button {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  font-size: 0.86rem;
}

.admin-inline-status-form button {
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 1300px) {
  .admin-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .admin-orders-table th,
  .admin-orders-table td {
    padding: 8px 5px;
    font-size: 0.84rem;
  }

  .admin-orders-table .status-pill {
    font-size: 0.68rem;
    padding: 2px 6px;
  }
}

@media (max-width: 900px) {
  .admin-orders-table-wrap {
    overflow-x: auto;
  }

  .admin-orders-table {
    min-width: 980px;
  }

  .admin-inline-status-form {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  .admin-inline-status-form select {
    flex: 1;
    width: auto;
  }

  .admin-inline-status-form button {
    width: auto;
    min-width: 56px;
  }
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
  }

  .admin-nav-shell,
  .admin-content {
    grid-column: 1 / -1;
    width: 100%;
  }

  .admin-nav-shell {
    margin-bottom: 2px;
  }

  .admin-content {
    gap: 16px;
  }

  .admin-content h1 {
    width: 100%;
    margin: 0;
    line-height: 1.1;
  }

  .admin-stats-grid,
  .admin-section-card,
  .admin-orders-toolbar,
  .admin-products-toolbar,
  .admin-products-search-form,
  .admin-products-table-wrap {
    width: 100%;
    max-width: 100%;
  }
}


/* ===== Admin Orders Toolbar ===== */
.admin-orders-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-orders-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 520px;
}

.admin-orders-search-form input[type="text"] {
  flex: 1 1 320px;
  min-width: 220px;
  background: #0f0f0f;
  border: 1px solid #313131;
  border-radius: 8px;
  color: #fff;
  padding: 9px 12px;
  font-family: inherit;
}

.admin-orders-search-form button {
  background: #ffff00;
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.admin-orders-clear {
  color: #ffff00;
  text-decoration: none;
  font-weight: 600;
}

.admin-orders-count {
  color: #aaa;
  font-size: 0.9rem;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .admin-orders-toolbar {
    align-items: stretch;
  }

  .admin-orders-search-form {
    flex: 1 1 100%;
    flex-wrap: wrap;
  }

  .admin-orders-search-form input[type="text"] {
    min-width: 0;
    width: 100%;
  }

  .admin-orders-count {
    width: 100%;
  }
}

/* ===== Admin Products Layout ===== */
.admin-section-card.admin-products-section,
.admin-section-card.admin-products-table-section {
  padding: 16px;
}

.admin-products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-products-toolbar h1 {
  margin: 0 0 8px;
}

.admin-products-toolbar .account-muted {
  margin: 0;
}

.admin-products-search-form {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-products-search-form > label {
  color: #ddd;
  font-size: 0.92rem;
  font-weight: 600;
}

.admin-products-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-products-search-row input[type="text"] {
  flex: 1 1 420px;
  min-width: 260px;
  background: #0f0f0f;
  border: 1px solid #313131;
  border-radius: 8px;
  color: #fff;
  padding: 10px 12px;
  font-family: inherit;
}

.admin-products-search-row button {
  background: #ffff00;
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 700;
  cursor: pointer;
}

.admin-products-clear {
  color: #ffff00;
  text-decoration: none;
  font-weight: 600;
}

.admin-products-table-meta {
  margin: 0 0 10px;
  color: #aaa;
  font-size: 0.9rem;
}

.admin-products-table-wrap {
  width: 100%;
  overflow-x: hidden;
}

.admin-products-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.admin-products-table th,
.admin-products-table td {
  padding: 10px 8px;
  vertical-align: top;
  border-bottom: 1px solid #2d2d2d;
}

.admin-products-table th {
  color: #bbb;
  font-weight: 600;
  font-size: 0.84rem;
  white-space: nowrap;
}

.admin-products-table th:nth-child(1),
.admin-products-table td:nth-child(1) {
  width: 6%;
}

.admin-products-table th:nth-child(2),
.admin-products-table td:nth-child(2) {
  width: 37%;
}

.admin-products-table th:nth-child(3),
.admin-products-table td:nth-child(3) {
  width: 14%;
}

.admin-products-table th:nth-child(4),
.admin-products-table td:nth-child(4) {
  width: 12%;
}

.admin-products-table th:nth-child(5),
.admin-products-table td:nth-child(5) {
  width: 13%;
}

.admin-products-table th:nth-child(6),
.admin-products-table td:nth-child(6) {
  width: 18%;
}

.admin-product-id {
  white-space: nowrap;
}

.admin-product-name,
.admin-product-brand,
.admin-product-size,
.admin-product-price {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-product-title {
  display: block;
  line-height: 1.25;
}

.admin-product-slug {
  display: block;
  margin-top: 4px;
  line-height: 1.25;
  font-size: 0.8rem;
}

.admin-product-price-main {
  display: block;
  white-space: nowrap;
}

.admin-product-sale {
  display: block;
  margin-top: 4px;
  line-height: 1.2;
}

.admin-product-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.admin-product-actions-wrap .account-btn,
.admin-product-delete-form button {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  height: 30px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  border-radius: 7px;
  line-height: 1;
}

.admin-product-delete-form {
  margin: 0;
}

.admin-product-delete-form button {
  background: #ffff00;
  color: #111;
  border: none;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 1200px) {
  .admin-products-table th,
  .admin-products-table td {
    padding: 8px 6px;
    font-size: 0.82rem;
  }

  .admin-products-table th:nth-child(1),
  .admin-products-table td:nth-child(1) {
    width: 7%;
  }

  .admin-products-table th:nth-child(2),
  .admin-products-table td:nth-child(2) {
    width: 34%;
  }

  .admin-products-table th:nth-child(3),
  .admin-products-table td:nth-child(3) {
    width: 14%;
  }

  .admin-products-table th:nth-child(4),
  .admin-products-table td:nth-child(4) {
    width: 13%;
  }

  .admin-products-table th:nth-child(5),
  .admin-products-table td:nth-child(5) {
    width: 13%;
  }

  .admin-products-table th:nth-child(6),
  .admin-products-table td:nth-child(6) {
    width: 19%;
  }
}

@media (max-width: 900px) {
  .admin-products-search-row input[type="text"] {
    width: 100%;
    min-width: 0;
  }

  .admin-products-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-products-table {
    min-width: 820px;
  }
}

/* ===== Admin Products Legacy Table Compatibility ===== */
/* If an older 11-column products table is rendered, reduce it to:
   ID, Name, Brand, Size, Price, Actions */
.admin-products-table:has(thead th:nth-child(11)) {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

.admin-products-table:has(thead th:nth-child(11)) th:nth-child(3),
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(3),
.admin-products-table:has(thead th:nth-child(11)) th:nth-child(5),
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(5),
.admin-products-table:has(thead th:nth-child(11)) th:nth-child(8),
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(8),
.admin-products-table:has(thead th:nth-child(11)) th:nth-child(9),
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(9),
.admin-products-table:has(thead th:nth-child(11)) th:nth-child(10),
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(10) {
  display: none !important;
}

.admin-products-table:has(thead th:nth-child(11)) th:nth-child(1),
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(1) {
  width: 6% !important;
}

.admin-products-table:has(thead th:nth-child(11)) th:nth-child(2),
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(2) {
  width: 37% !important;
}

.admin-products-table:has(thead th:nth-child(11)) th:nth-child(4),
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(4) {
  width: 14% !important;
}

.admin-products-table:has(thead th:nth-child(11)) th:nth-child(6),
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(6) {
  width: 12% !important;
}

.admin-products-table:has(thead th:nth-child(11)) th:nth-child(7),
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(7) {
  width: 13% !important;
}

.admin-products-table:has(thead th:nth-child(11)) th:nth-child(11),
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(11) {
  width: 18% !important;
}

.admin-products-table:has(thead th:nth-child(11)) .admin-product-actions,
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(11) {
  overflow: visible !important;
}

.admin-products-table:has(thead th:nth-child(11)) .admin-product-actions-wrap,
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(11) > .inline-status-form,
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(11) > form {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.admin-products-table:has(thead th:nth-child(11)) .admin-product-actions-wrap .account-btn,
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(11) .account-btn,
.admin-products-table:has(thead th:nth-child(11)) td:nth-child(11) button {
  width: 100% !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 8px !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
  border-radius: 7px !important;
}

/* ===== Admin Products Final Button/ID Sizing ===== */
.admin-products-table-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.admin-products-table th:first-child,
.admin-products-table td:first-child {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  white-space: nowrap !important;
}

.admin-products-table th:last-child,
.admin-products-table td:last-child {
  width: 96px !important;
  min-width: 96px !important;
}

.admin-products-table td:last-child,
.admin-products-table .admin-product-actions {
  overflow: visible !important;
}

.admin-products-table td:last-child .account-btn,
.admin-products-table td:last-child button,
.admin-products-table .admin-product-actions-wrap .account-btn,
.admin-products-table .admin-product-delete-form button {
  width: 100% !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 6px !important;
  font-size: 0.7rem !important;
  line-height: 1 !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
}

.admin-products-table td:last-child form,
.admin-products-table .admin-product-delete-form {
  margin: 4px 0 0 !important;
}

/* ===== Admin Products Final Compact Buttons v2 ===== */
.admin-products-table th.admin-col-id,
.admin-products-table td.admin-product-id,
.admin-products-table th:first-child,
.admin-products-table td:first-child {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  white-space: nowrap !important;
}

.admin-products-table th.admin-col-actions,
.admin-products-table td.admin-product-actions,
.admin-products-table th:last-child,
.admin-products-table td:last-child {
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
  overflow: visible !important;
}

.admin-products-table .admin-product-actions-wrap {
  align-items: flex-end !important;
  gap: 4px !important;
}

.admin-products-table .admin-product-actions-wrap .account-btn,
.admin-products-table .admin-product-delete-form button,
.admin-products-table td.admin-product-actions .account-btn,
.admin-products-table td.admin-product-actions button {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  font-size: 0.66rem !important;
  line-height: 1 !important;
  border-radius: 5px !important;
}

.admin-products-table .admin-product-delete-form {
  margin: 0 !important;
}

@media (max-width: 1200px) {
  .admin-products-table th.admin-col-actions,
  .admin-products-table td.admin-product-actions,
  .admin-products-table th:last-child,
  .admin-products-table td:last-child {
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
  }

  .admin-products-table .admin-product-actions-wrap .account-btn,
  .admin-products-table .admin-product-delete-form button {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    height: 21px !important;
    min-height: 21px !important;
    font-size: 0.64rem !important;
  }
}

/* ===== Admin Products Side-by-Side Actions v3 ===== */
.admin-products-table th.admin-col-id,
.admin-products-table td.admin-product-id,
.admin-products-table th:first-child,
.admin-products-table td:first-child {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
}

.admin-products-table th.admin-col-actions,
.admin-products-table td.admin-product-actions,
.admin-products-table th:last-child,
.admin-products-table td:last-child {
  width: 116px !important;
  min-width: 116px !important;
  max-width: 116px !important;
  overflow: visible !important;
}

.admin-products-table .admin-product-actions-wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
}

.admin-products-table .admin-product-delete-form {
  margin: 0 !important;
  display: inline-flex !important;
}

.admin-products-table .admin-product-actions-wrap .account-btn,
.admin-products-table .admin-product-delete-form button,
.admin-products-table td.admin-product-actions .account-btn,
.admin-products-table td.admin-product-actions button {
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  font-size: 0.64rem !important;
  line-height: 1 !important;
  border-radius: 5px !important;
}

@media (max-width: 1200px) {
  .admin-products-table th.admin-col-actions,
  .admin-products-table td.admin-product-actions,
  .admin-products-table th:last-child,
  .admin-products-table td:last-child {
    width: 108px !important;
    min-width: 108px !important;
    max-width: 108px !important;
  }

  .admin-products-table .admin-product-actions-wrap .account-btn,
  .admin-products-table .admin-product-delete-form button {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    font-size: 0.62rem !important;
  }
}

/* ===== Admin Products Force Side-by-Side Actions v4 ===== */
.admin-products-table th.admin-col-actions,
.admin-products-table td.admin-product-actions,
.admin-products-table th:last-child,
.admin-products-table td:last-child {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  overflow: visible !important;
}

.admin-products-table td.admin-product-actions .admin-product-actions-wrap,
.admin-products-table td:last-child .admin-product-actions-wrap {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 4px !important;
  row-gap: 0 !important;
  align-items: center !important;
  justify-items: stretch !important;
}

.admin-products-table td.admin-product-actions .admin-product-delete-form,
.admin-products-table td:last-child .admin-product-delete-form {
  margin: 0 !important;
  width: 100% !important;
  display: block !important;
}

.admin-products-table td.admin-product-actions .account-btn,
.admin-products-table td.admin-product-actions .admin-product-delete-form button,
.admin-products-table td:last-child .account-btn,
.admin-products-table td:last-child button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 4px !important;
  font-size: 0.62rem !important;
  line-height: 1 !important;
  border-radius: 5px !important;
  white-space: nowrap !important;
}

@media (max-width: 700px) {
  .admin-products-table-wrap {
    overflow: visible !important;
  }

  .admin-products-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .admin-products-table thead {
    display: none !important;
  }

  .admin-products-table,
  .admin-products-table tbody {
    display: block !important;
  }

  .admin-products-table tbody {
    display: grid !important;
    gap: 12px !important;
  }

  .admin-products-table tr {
    display: block !important;
    width: 100% !important;
    padding: 14px !important;
    border: 1px solid #2c2c2c !important;
    border-radius: 14px !important;
    background: #141414 !important;
  }

  .admin-products-table td,
  .admin-products-table td:first-child,
  .admin-products-table td:last-child,
  .admin-products-table td.admin-product-id,
  .admin-products-table td.admin-product-actions {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
  }

  .admin-products-table td + td {
    margin-top: 12px !important;
  }

  .admin-products-table td::before {
    content: attr(data-label) !important;
    display: block !important;
    margin-bottom: 4px !important;
    color: #9f9f9f !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
  }

  .admin-product-id {
    font-weight: 700;
  }

  .admin-product-title {
    font-size: 1rem;
  }

  .admin-product-slug {
    margin-top: 6px;
    font-size: 0.78rem;
  }

  .admin-product-price-main,
  .admin-product-sale {
    white-space: normal !important;
  }

  .admin-products-table td.admin-product-actions::before {
    margin-bottom: 8px !important;
  }

  .admin-products-table td.admin-product-actions .admin-product-actions-wrap,
  .admin-products-table td:last-child .admin-product-actions-wrap {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    justify-items: stretch !important;
  }

  .admin-products-table td.admin-product-actions .account-btn,
  .admin-products-table td.admin-product-actions .admin-product-delete-form button,
  .admin-products-table td:last-child .account-btn,
  .admin-products-table td:last-child button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    font-size: 0.78rem !important;
    border-radius: 8px !important;
  }
}
