:root {
  --netflix-red: #008947;
  --netflix-red-hover: #00a556;

  --bg-main: #141414;
  --bg-dark: #000000;
  --bg-card: #181818;
  --bg-input: #2F2F2F;

  --border: #2F2F2F;

  --text-main: #FFFFFF;
  --text-secondary: #B3B3B3;

  --danger: #ff4b5c;
  --danger-hover: #ff3045;

  --shadow-red: 0 0 20px rgba(0, 137, 71, 0.35);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow: hidden;
}

body {
  font-family: Inter, sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: auto;
  pointer-events: none;
}

.toast {
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(20,20,20,.96);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  animation:
    toastEnter .18s ease,
    toastExit .25s ease 2.75s forwards;
  backdrop-filter: blur(12px);
}

.toast.success {
  border-left: 4px solid #00a556;
}

.toast.error {
  border-left: 4px solid #ff3045;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.auth-page {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top, rgba(0, 137, 71, 0.18), transparent 35%),
    var(--bg-dark);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.auth-card h1 {
  font-size: 34px;
  font-weight: 900;
  margin-bottom: 8px;
}

.auth-card p {
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  outline: none;
  background: var(--bg-input);
  color: var(--text-main);
  padding: 0 14px;
  font-size: 15px;
}

.admin-form textarea {
  min-height: 200px;
  padding-top: 12px;
  resize: vertical;
}

.admin-form input::placeholder,
.admin-form textarea::placeholder {
  color: var(--text-secondary);
}

.btn {
  border: none;
  outline: none;
  min-height: 46px;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 900;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--netflix-red);
  color: var(--text-main);
}

.btn-primary:hover {
  background: var(--netflix-red-hover);
  box-shadow: var(--shadow-red);
}

.btn-secondary {
  background: var(--danger);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--danger-hover);
}

.form-message {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 14px;
}

.form-message.success {
  color: #00d26a;
}

.form-message.error {
  color: var(--danger);
}

.auth-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--netflix-red-hover);
  font-weight: 800;
  text-decoration: none;
}

.admin-layout {
  height: 100vh;
  overflow: hidden;
  position: sticky;
  top: 0;

  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--bg-dark);
  overflow: hidden;
}

.admin-sidebar {
  background: linear-gradient(to bottom, #000, #111);
  border-right: 1px solid rgba(255, 255, 255, .08);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--netflix-red);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
  box-shadow: var(--shadow-red);
}

.admin-brand strong {
  display: block;
  font-size: 20px;
  font-weight: 900;
}

.admin-brand span {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
}

.admin-menu {
  display: grid;
  gap: 10px;
}

.admin-menu-item {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 14px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-align: left;
}

.admin-menu-item i {
  font-size: 22px;
}

.admin-menu-item.active,
.admin-menu-item:hover {
  background: var(--netflix-red);
  color: var(--text-main);
  box-shadow: var(--shadow-red);
}

.logout-btn {
  margin-top: auto;
}

.admin-content {
  height: 100vh;
  overflow-y: auto;
  padding: 24px;
}

.admin-topbar {
  background: var(--bg-main);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.admin-topbar h1 {
  font-size: 30px;
  font-weight: 900;
}

.admin-topbar p {
  color: var(--text-secondary);
  margin-top: 4px;
}

.admin-view {
  display: grid;
  gap: 18px;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.admin-card h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
}

.admin-card p {
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.store-list {
  display: grid;
  gap: 12px;
}

.store-item {
  background: var(--bg-main);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 16px;
  padding: 14px;
}

.store-item strong {
  display: block;
  font-size: 18px;
}

.store-item span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}


/* Variáveis da mensagem */
.variables-box {
  padding: 8px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.variables-title {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
}

.variables-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.variable-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;

  padding: 5px 10px;
  border-radius: 10px;

  font-size: 13px;
  font-weight: 800;

  cursor: pointer;
  transition: 0.2s ease;
}

.variable-item:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.variable-item.copied {
  background: #00a556;
  border-color: #00a556;
  color: #ffffff;
}

.variables-help {
  padding: 16px;
  border-radius: 18px;
  background: rgba(33, 52, 85, 0.72);
  border: 1px solid rgba(58, 126, 255, 0.28);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .03),
    0 8px 24px rgba(0, 0, 0, .22);
}

.variables-help-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(43, 115, 255, 0.22);
  color: #67a8ff;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.variables-help-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.variables-help-content strong {
  color: #67a8ff;
  font-size: 15px;
  font-weight: 800;
}

.variables-help-content span {
  color: rgba(220, 232, 255, 0.92);
  font-size: 13px;
  line-height: 1.6;
}





.upload-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-label {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.upload-box {
  width: 100%;

  padding: 16px;

  border-radius: 18px;

  background: rgba(255, 255, 255, .04);

  border: 1px solid rgba(255, 255, 255, .08);

  display: flex;
  align-items: center;
  gap: 14px;

  cursor: pointer;

  transition: .2s ease;
}

.upload-box:hover {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .16);
}

.upload-icon {
  width: 52px;
  height: 52px;

  border-radius: 16px;

  background: rgba(255, 255, 255, .06);

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.upload-icon i {
  font-size: 26px;
  color: #00a556;
}

.upload-content {
  flex: 1;

  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-content strong {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.upload-content span {
  font-size: 12px;
  color: rgba(255, 255, 255, .58);
}

.upload-action {
  padding: 10px 14px;

  border-radius: 12px;

  background: #00a556;

  color: #fff;

  font-size: 13px;
  font-weight: 800;
}

.upload-file-name {
  font-size: 13px;
  color: rgba(255, 255, 255, .65);

  padding-left: 2px;
}

.upload-preview {
  width: 90px;
  height: 90px;

  object-fit: cover;

  border-radius: 16px;

  border: 1px solid rgba(255, 255, 255, .08);
}


.product-modal.hidden {
  display: none;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.product-modal-content {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #121212;
  border: 1px solid #2a2a2a;
  border-radius: 22px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.product-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #232323;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
}

.admin-form h3 {
  font-size: 20px;
  font-weight: 900;

}

body.modal-open {
  overflow: hidden;
}

.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.products-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.product-admin-card {
  background: #121212;
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.product-admin-image,
.product-admin-placeholder {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #f3f4f6;
}

.product-admin-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #999;
}

.product-admin-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
}

.product-form-box {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  background: #121212;
}

.product-card-title {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
}

.product-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-card-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 137, 71, 0.18);
  color: #00d26a;
  font-size: 12px;
  font-weight: 800;
}

.product-card-category {
  color: #b3b3b3;
  font-size: 12px;
  font-weight: 700;
}

.product-card-price {
  margin-top: 4px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.product-card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 12px;
  font-weight: 800;
}

.product-card-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.product-card-status.active {
  color: #00d26a;
}

.product-card-status.active::before {
  background: #00d26a;
}

.product-card-status.inactive {
  color: #ff4b5c;
}

.product-card-status.inactive::before {
  background: #ff4b5c;
}

.product-admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-danger {
  background: #ff4757;
  color: #fff;
  border: 0;
}

.btn-danger:hover {
  background: #ff2f43;
}


.premium-file-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.premium-file-label {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.premium-file-box {
  position: relative;
  min-height: 168px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px dashed rgba(56, 189, 248, 0.45);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  text-align: center;
  padding: 22px;
  transition: 0.2s ease;
}

.premium-file-box:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: #00c2ff;
}

.premium-file-media {
  border-color: rgba(0, 210, 120, 0.7);
  background: rgba(0, 150, 90, 0.12);
}

.premium-file-audio {
  border-color: rgba(0, 194, 255, 0.45);
}

.premium-file-icon {
  font-size: 34px;
  color: #00c2ff;
}

.premium-file-box strong {
  color: #fff;
  font-size: 15px;
}

.premium-file-box span {
  color: #bfc7ff;
  font-size: 14px;
  word-break: break-word;
}

.premium-file-box small {
  color: #bfc7ff;
  font-size: 13px;
}

.premium-file-remove {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #ff4d5e;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.premium-file-remove.hidden {
  display: none;
}

.premium-file-box.has-file {
  border-color: #00d26a;
  background: rgba(0, 150, 90, 0.18);
}

.premium-file-box.has-file span {
  color: #b7ffd8;
  font-weight: 700;
}

.premium-file-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.premium-file-remove.hidden {
  display: none !important;
}

.premium-file-box {
  overflow: visible;
}

.premium-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.premium-file-remove {
  z-index: 30;
  pointer-events: auto;
}

.premium-file-icon,
.premium-file-box strong,
.premium-file-box span,
.premium-file-box small {
  pointer-events: none;
}




.finance-default-label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  margin-bottom: 18px;
}

.finance-default-label select {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-main);
  padding: 0 14px;
}

.gateway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.gateway-card {
  background: #121212;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gateway-card strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
}

.gateway-card span {
  display: block;
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 13px;
}

.gateway-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gateway-logo {
  width: 50px;
  height: 50px;

  border-radius: 12px;
  background: #fff;

  flex-shrink: 0;
}


.status-badge {
  display: inline-block;
  align-items: center;
  width: fit-content;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.status-badge.connected {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.disconnected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}



/* =========================
   DASHBOARD
========================= */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.metric-card {
  background: #121212;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
  padding: 22px;
  min-height: 120px;

  display: flex;
  align-items: center;

  transition: .2s ease;
}

.metric-header {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.metric-icon {
  width: 64px;
  height: 64px;

  border-radius: 18px;

  background: rgba(255,255,255,.04);

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.metric-icon i {
  font-size: 34px;
  color: #00d26a;
}

.metric-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-info span {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
}

.metric-info strong {
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}

.metric-subtitle {
  color: #00d26a;
  font-size: 13px;
  font-weight: 700;
}

/* =========================
   CARD DO GRÁFICO
========================= */

.chart-card {
 
  background: #121212;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.chart-card h3 {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 24px;
}

/* =========================
   GRÁFICO
========================= */

.sales-chart {
  flex: 1;

  height: 100%;
  min-height: 0;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.chart-column {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chart-bar-wrapper {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

.chart-bar {
  width: 100%;
  min-height: 10px;
  border-radius: 14px 14px 6px 6px;

  background: linear-gradient(
    180deg,
    #00c96b 0%,
    #008947 100%
  );

  box-shadow:
    0 0 20px rgba(0, 201, 107, .25),
    inset 0 1px 0 rgba(255,255,255,.15);

  transition: .25s ease;
}
.chart-bar {
  position: relative;
}

.chart-card {
  height: 500px;
  min-height: 500px;
  max-height: 500px;

  display: flex;
  flex-direction: column;
}

.chart-bar-price {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;

  font-size: 12px;
  font-weight: 900;
  color: #ffffff;

  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255,255,255,.08);
  padding: 5px 8px;
  border-radius: 999px;
}

.chart-column:hover .chart-bar {
  filter: brightness(1.08);
}

.chart-label {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 700;
}

.chart-value {
  margin-top: 4px;
  font-size: 13px;
  color: #fff;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-top: 24px;
  align-items: start;
}

.recent-sales-card {
  background: #121212;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
  padding: 24px;

  height: 500px;

  display: flex;
  flex-direction: column;
}

.recent-sales-card h3 {
  margin-bottom: 20px;
}

#recentSalesList {
  flex: 1;
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  gap: 12px;

  padding-right: 6px;
}

.sale-item {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px;
  border-radius: 14px;

  background: rgba(255,255,255,.03);
}

.sale-avatar {
  width: 42px;
  height: 42px;

  border-radius: 12px;

  background: rgba(0,210,106,.12);

  color: #00d26a;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
}

.sale-info {
  flex: 1;
}

.sale-info strong {
  display: block;
  font-size: 14px;
}

.sale-info span {
  font-size: 12px;
  color: #aaa;
}

.sale-price {
  color: #00d26a;
  font-size: 15px;
  font-weight: 900;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}





/* =========================
   RESPONSIVO
========================= */
@media (max-width: 900px) {

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .sales-chart {
    height: 260px;
    gap: 8px;
  }

  .metric-card strong {
    font-size: 26px;
  }
}



@media (max-width: 820px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .admin-menu {
    grid-template-columns: 1fr;
  }

  .admin-content {
    padding: 14px;
  }
}





/* =========================
   MENU MOBILE / HAMBURGUER
========================= */
.sidebar-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-toggle i {
  font-size: 26px;
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 820px) {
  html,
  body {
    overflow: hidden;
  }

  .admin-layout {
    display: block;
    height: 100vh;
    overflow: hidden;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10001;

    width: 280px;
    max-width: 86vw;
    height: 100vh;

    transform: translateX(-105%);
    transition: transform 0.25s ease;

    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
  }

  body.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: block;

    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-content {
    height: 100vh;
    overflow-y: auto;
    padding: 14px;
  }

  .admin-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
  }

  .sidebar-toggle {
    display: flex;
  }

  .admin-topbar h1 {
    font-size: 24px;
  }

  .admin-topbar p {
    font-size: 13px;
  }

  .products-header,
  .gateway-card,
  .variables-box {
    flex-direction: column;
    align-items: stretch;
  }

  .products-header .btn {
    width: 100%;
  }

  .gateway-card .btn {
    width: 100%;
  }

  .product-modal {
    padding: 12px;
  }

  .product-modal-content {
    max-height: calc(100vh - 24px);
    padding: 20px;
    border-radius: 18px;
  }

  .products-list {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .chart-card,
  .recent-sales-card {
    height: auto;
    min-height: 420px;
    max-height: none;
  }

  .sales-chart {
    min-height: 280px;
  }
}

/* =========================
   DASHBOARD MOBILE FIX
========================= */
@media (max-width: 820px) {
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 18px;
  }

  .metric-card {
    min-height: 86px;
    padding: 16px;
  }

  .metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .metric-icon i {
    font-size: 26px;
  }

  .metric-info strong {
    font-size: 24px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 18px;
  }

  .chart-card {
    height: auto;
    min-height: auto;
    max-height: none;
    padding: 16px;
    overflow: hidden;
  }

  .chart-card h3 {
    font-size: 16px;
    margin-bottom: 18px;
  }

  .sales-chart {
    width: 100%;
    min-height: 260px;
    height: 260px;

    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));

    gap: 6px;
    overflow: visible;

    padding: 34px 0 8px;
  }

  .chart-column {
    width: 100%;
    min-width: 0;
    flex: initial;
  }

  .chart-bar-price {
    font-size: 9px;
    padding: 3px 5px;

    max-width: none;
    width: max-content;

    left: 50%;
    transform: translateX(-50%);

    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
    z-index: 2;
  }

  .chart-label {
    font-size: 9px;
    white-space: nowrap;
  }

  .chart-value {
    font-size: 9px;
    line-height: 1.15;
    text-align: center;
    word-break: normal;
  }

  .chart-bar-wrapper {
    width: 100%;
    min-height: 150px;
  }

  .recent-sales-card {
    height: 420px;
    padding: 16px;
    overflow: hidden;
  }

  .recent-sales-card h3 {
    font-size: 16px;
    margin-bottom: 14px;
  }

  #recentSalesList {
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
  }

  .sale-item {
    padding: 10px;
    gap: 10px;
  }

  .sale-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 20px;
  }

  .sale-info strong {
    font-size: 13px;
  }

  .sale-info span {
    font-size: 11px;
  }

  .sale-price {
    font-size: 13px;
    white-space: nowrap;
  }
}