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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #0b0d10;
  color: #f5f5f5;
  min-height: 100vh;
}

header {
  height: 72px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 12px;

  background: #111419;
  border-bottom: 1px solid #242830;
}

header h1 {
  font-size: 25px;
  letter-spacing: 2px;
}

header span {
  font-size: 11px;
  font-weight: bold;
  background: #242830;
  padding: 5px 8px;
  border-radius: 6px;
  color: #b8bec9;
}

main {
  width: min(1100px, 92%);
  margin: 45px auto;
}

.top-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.top-section h2 {
  font-size: 30px;
  margin-bottom: 7px;
}

.top-section p {
  color: #8d95a3;
}

#addCashierButton {
  border: none;
  background: #ffffff;
  color: #111111;
  font-weight: bold;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
}

#addCashierButton:hover {
  opacity: 0.85;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.stat-card {
  background: #14171c;
  border: 1px solid #252a32;
  border-radius: 10px;
  padding: 20px;
}

.stat-card span {
  display: block;
  color: #89919e;
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 25px;
}

.cashiers {
  background: #111419;
  border: 1px solid #252a32;
  border-radius: 12px;
  padding: 20px;
}

#search {
  width: 100%;
  background: #0b0d10;
  border: 1px solid #2b3039;
  border-radius: 8px;
  padding: 13px;
  color: white;
  outline: none;
  margin-bottom: 15px;
}

#search:focus {
  border-color: #646d7b;
}

.cashier-card {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 18px 5px;
  border-bottom: 1px solid #242830;
}

.cashier-card:last-child {
  border-bottom: none;
}

.cashier-card strong {
  font-size: 16px;
}

.cashier-card p {
  color: #8d95a3;
  font-size: 13px;
  margin-top: 6px;
}

@media (max-width: 650px) {
  header {
    padding: 0 20px;
  }

  main {
    margin-top: 25px;
  }

  .top-section {
    align-items: flex-start;
    gap: 20px;
    flex-direction: column;
  }

  #addCashierButton {
    width: 100%;
  }

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

/* =========================
   MODAL - AGREGAR CAJERO
========================= */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;

  background: #14171c;
  border: 1px solid #2b3039;
  border-radius: 14px;
  padding: 25px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
}

.modal-header h2 {
  font-size: 22px;
  margin-bottom: 5px;
}

.modal-header p {
  color: #8d95a3;
  font-size: 13px;
}

.close-button {
  border: none;
  background: transparent;
  color: #8d95a3;
  font-size: 18px;
  cursor: pointer;
}

#cashierForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#cashierForm > label {
  font-size: 13px;
  color: #b8bec9;
  margin-top: 8px;
}

#cashierForm > input {
  width: 100%;
  background: #0b0d10;
  border: 1px solid #2b3039;
  border-radius: 8px;
  padding: 13px;
  color: white;
  outline: none;
}

#cashierForm > input:focus {
  border-color: #646d7b;
}

#cashierForm h3 {
  font-size: 14px;
  margin-top: 15px;
}

.permissions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 5px 0 15px;
}

.permissions label {
  background: #0b0d10;
  border: 1px solid #2b3039;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  cursor: pointer;
}

.permissions input {
  margin-right: 7px;
}

.save-button {
  margin-top: 5px;
  border: none;
  border-radius: 8px;
  padding: 13px;

  background: #ffffff;
  color: #111111;

  font-weight: bold;
  cursor: pointer;
}

.save-button:hover {
  opacity: 0.85;
}

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

/* =========================
   DETALLE DEL CAJERO
========================= */

.cashier-card {
  cursor: pointer;
}

.cashier-card:hover {
  background: rgba(255, 255, 255, 0.025);
}

.cashier-details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 16px 0;
  border-bottom: 1px solid #252a32;
}

.detail-row span {
  color: #8d95a3;
  font-size: 13px;
}

.detail-row strong {
  font-size: 14px;
  text-align: right;
}

.cashier-details h3 {
  font-size: 14px;
  margin: 22px 0 12px;
}

/* CASINOZEUS MOVIMIENTOS */

.movements-section {
  margin-top: 32px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}

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

.movements-header h2 {
  margin: 0 0 6px;
}

.movements-header p {
  margin: 0;
  color: #64748b;
}

.movements-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.movements-controls select,
.movements-controls button {
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
}

.movements-controls button {
  background: #111827;
  color: white;
  cursor: pointer;
}

.movements-controls button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.movements-table-container {
  width: 100%;
  overflow-x: auto;
}

#movementsTable {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

#movementsTable th,
#movementsTable td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

#movementsTable th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
}

#movementsTable tbody tr:hover {
  background: #f8fafc;
}

#movementsReview {
  margin-bottom: 14px;
  color: #64748b;
  font-size: 14px;
}

#movementsReview.has-alert {
  padding: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
}

@media (max-width: 640px) {
  .movements-section {
    padding: 16px;
  }

  .movements-controls,
  .movements-controls select,
  .movements-controls button {
    width: 100%;
  }
}


/* CASINOZEUS DARK MOVEMENTS FIX */

.movements-section {
  background: #101419;
  border-color: #28303b;
  color: #f1f5f9;
}

.movements-header h2 {
  color: #f1f5f9;
}

.movements-header p,
#movementsReview {
  color: #94a3b8;
}

.movements-controls select {
  background: #0b0e12;
  border-color: #303947;
  color: #f1f5f9;
}

.movements-controls button {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

#movementsTable th {
  background: #171e27;
  color: #cbd5e1;
  border-color: #303947;
}

#movementsTable td {
  background: transparent;
  color: #e2e8f0;
  border-color: #28303b;
}

#movementsTable tbody tr:hover {
  background: #1b2531;
}

#movementsReview.has-alert {
  background: #422006;
  border-color: #92400e;
  color: #fed7aa;
}
