/* === BASE THEME VARIABLES === */
:root {
  --bg: #0b0b0b;
  --surface: #141414;
  --surface-alt: #1c1c1c;
  --text: #f3f3f3;
  --text-dim: #ccc;
  --accent: #0a84ff;
  --accent-hover: #006ddf;
  --danger: #e33;
  --danger-hover: #c22;
  --success: #37c871;
  --radius: 10px;
  --transition: 0.2s ease;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* === GLOBAL RESET === */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, Arial, Helvetica, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}
.wrap, .container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 24px;
}

/* === TEXT === */
h1, h2, h3 {
  font-weight: 600;
}
h1 {
  font-size: 1.8rem;
  /* text-transform: uppercase; */
}
h2 {
  font-size: 1.2rem;
  color: var(--text-dim);
  margin-top: 24px;
}
p { margin: 0 0 12px; color: var(--text); }
small { color: var(--text-dim); }

/* === LINKS === */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

/* === BUTTONS === */
button, .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s;
}
button:hover, .btn:hover { background: var(--accent-hover); }
button:active, .btn:active { transform: scale(0.97); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }
.btn-secondary { background: var(--surface-alt); }
.btn-secondary:hover { background: #292929; }

/* === INPUTS / SELECT / TEXTAREA === */
input[type=text],
input[type=number],
input[type=password],
input[type=email],
textarea,
select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 0.95rem;
  outline: none;
  width: 100%;
  transition: border var(--transition), background var(--transition);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  background: var(--surface-alt);
}

/* === FORM LAYOUT === */
form {
  display: grid;
  gap: 16px;
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row.inline {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
label {
  font-weight: 500;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.form-hint {
  color: var(--text-dim);
  font-size: 0.8rem;
}
.form-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: -6px;
}

/* === FORM GRID UTILITIES === */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* === TABLES === */
.table-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 20px;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 0.95rem;
  color: var(--text);
}
thead th {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: #0e0e0e;
  padding: 12px 18px;
  border-bottom: 1px solid #2a2a2a;
  text-align: left;
}
tbody tr {
  background: #181818;
  border-radius: var(--radius);
  transition: background 0.25s ease;
}
tbody tr:hover { background: #1c1c1c; }
td {
  padding: 12px 18px;
  vertical-align: middle;
}
td:first-child {
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}
td:last-child {
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}



/* === ALERTS === */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin: 10px 0;
}
.alert-success {
  background: #214d30;
  color: #a0f0b5;
}
.alert-error {
  background: #4d1f1f;
  color: #ff8a8a;
}

/* === CARDS === */
.card {
  background: #1a1a1a;
  padding: 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.2s;
}
#products1 {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
}
.card:hover {
  background: #222;
}

.card .actions {
  display: flex;
  gap: 8px;
}

.sale-btn {
  background: #333;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.sale-btn.sale-1 {
  font-size: 1.1rem;
  padding: 12px 20px;
  background: #444;
}

.sale-btn.sale-1:hover {
  background: #555;
}

.sale-btn.sale-4 {
  background: #2a2a2a;
}

.sale-btn.sale-4:hover {
  background: #3a3a3a;
}


/* === ADMIN HEADER === */
.admin-top-bar,
.inner-admin-top-bar  {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  background: #0e0e0e;
  padding: 10px 20px;
  justify-content: space-between;
}

/* === UTILITIES === */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.center { text-align: center; }
.right { text-align: right; }

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #444;
}
.admin-market {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: sans-serif;
}
a{
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background var(--transition), transform 0.1s;
}
a:hover {
  background: var(--accent-hover);
  color: white;
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.switch-label {
  margin-right: 8px;
  font-weight: 500;
  color: white;
}

.status-label {
  font-weight: 600;
  color: #555;
  min-width: 40px;
  text-align: center;
  background: #f0f0f0;
  border-radius: 6px;
  padding: 4px 8px;
  transition: background 0.3s, color 0.3s;
}

.status-label:contains('On') {
  background: #4CAF50;
  color: #fff;
}

.status-label:contains('Off') {
  background: #ccc;
  color: #333;
}

/* your original switch styling below */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4CAF50;
}

input:checked + .slider:before {
  transform: translateX(24px);
}
.inner-container {
  width: 95%;
  margin: auto;
}
tr td {
  font-size: 1.5rem;
}
tr th {
  font-size: 1.5rem;
}
/* === RESPONSIVE DESIGN === */

/* --- Tablets (≤ 992px) --- */
@media (max-width: 992px) {
  .wrap, .container {
    padding: 16px;
  }

  table {
    font-size: 0.9rem;
  }

  thead th, td {
    padding: 10px 12px;
  }

  .admin-top-bar,
  .inner-admin-top-bar {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    text-align: center;
  }

  .card {
    flex: 1 1 45%;
  }

  #products1 {
    justify-content: center;
  }

  form {
    padding: 16px;
  }
}

/* --- Mobile (≤ 768px) --- */
@media (max-width: 768px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1rem;
  }

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

  .form-row.inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn, button, a {
    width: 100%;
    text-align: center;
  }

  .table-wrap {
    overflow-x: auto;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  .card {
    /* flex: 1 1 100%; */
  }

  #products1 {
    flex-direction: row;
    align-items: center;
  }

  .admin-top-bar,
  .inner-admin-top-bar {
    flex-direction: column;
    gap: 8px;
  }

  .switch-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .switch {
    width: 45px;
    height: 24px;
  }

  .slider:before {
    height: 18px;
    width: 18px;
  }

  .inner-container {
    width: 100%;
    padding: 0 10px;
  }
}

