/* === GLOBAL BODY === ☑️☑️*/
body {
  background-color: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
body.modal-open {
  overflow: hidden;
}

/* === BACKGROUND VIDEO === ☑️☑️*/
.background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  scale: 1.2;
  filter: blur(8px) brightness(1.75);
}
.background-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === TÍTULO === ☑️*/
.title {
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 0 0 12px #fff;
  user-select: none;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* === FORMULARIO CRUD === ☑️☑️*/
/* header */
.crud-form {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  background: #2c2c2c;
  border: 3px solid #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.crud-form h3 {
  color: white;
  padding: 0 15px 15px 15px;
  margin-bottom: 0;
  border-bottom: 1px solid rgb(167, 159, 159);
  user-select: none;
}
/* form ☑️ ☑️*/
.crud-form form {
  margin-top: 0;
  padding: 20px;
  color: white;
  background-color: #0e0e0e;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.crud-form label {
  user-select: none;
  font-weight: bold;
}
/* ☑️☑️☑️ */
.crud-form input[type="text"],
.crud-form input[type="number"],
.crud-form select {
  width: 100%;
  padding: 5px;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}
.crud-form input[type="text"],
.crud-form input[type="number"] {
  border: 1px solid #fff;
}
.crud-form select {
  background-color: #fff;
  color: #000;
  border: 1px solid #ccc;
}
/* ☑️☑️ */
.crud-form .fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.crud-form .columna {
  flex: 2;
}
/* ☑️☑️☑️☑️ */
.crud-form .columna label {
  margin-bottom: 5px;
  display: block;
}
.crud-form .columna input,
.crud-form .columna select {
  width: 100%;
}
.crud-form .fila-boton {
  margin-top: 10px;
}
.crud-form .btn-guardar {
  background-color: #fff;
  color: black;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  float: right;
}

/* === TABLA CRUD === ☑️☑️*/
.crud-table {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  padding: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  overflow-x: auto;
  text-overflow: ellipsis;
}
.crud-table table {
  width: 100%;
  border-collapse: collapse;
}
/* table header ☑️☑️☑️☑️☑️*/
.crud-table thead {
  background-color: #fff;
  font-weight: bold;
}
.crud-table thead th:first-child {
  border-top-left-radius: 12px;
}
.crud-table thead th:last-child {
  border-top-right-radius: 12px;
}
/* table body */
.crud-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}
.crud-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

/* table elements [☑️☑️][☑️☑️][☑️☑️]  */
.crud-table th,
.crud-table td {
  padding: 10px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}
.crud-table th:first-child,
.crud-table td:first-child {
  max-width: 150px;
  width: 100px;
  text-overflow: ellipsis;
}
.crud-table th:nth-child(4),
.crud-table td:nth-child(4) {
  max-width: 100px;
  width: 100px;
  text-overflow: ellipsis;
}
/* table inside borders☑️☑️☑️ */
.crud-table td {
  background-color: #0e0e0e;
  color: white;
}
.crud-table td:not(:first-child) {
  border-left: 1px solid #fff;
}
.crud-table tr:not(:last-child) {
  border-bottom: 1px solid #fff;
}
/* table buttons ☑️ */
.crud-table img {
  filter: invert(1);
  width: 30px;
  height: 30px;
  display: block;
  margin: 0 auto;
  cursor: pointer;
}

/* === MODAL === ☑️*/
.modal {
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}
/* ☑️☑️☑️ */
.modal.show {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  background-color: #2c2c2c;
  margin: 15% auto;
  padding-top: 10px;
  width: 80%;
  max-width: 600px;
  border: 3px solid #000;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
  user-select: none;
}
.modal-header {
  display: flex;
  padding: 5px 10px;
  justify-content: space-between;
  align-items: center;
}
/* ☑️☑️☑️ */
.modal-header h3 {
  margin: 0;
  color: #fff;
  flex: 1;
}
.modal-header .close {
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
}
.modal-header .close:hover,
.modal-header .close:focus {
  color: black;
  text-decoration: none;
}
/* ☑️☑️ */
.modal-body {
  padding: 20px;
  background-color: #0e0e0e;
  border-radius: 0 0 12px 12px;
  border-top: 1px solid #fff;
  color: white;
}
.modal-body form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
/* ☑️☑️ */
.modal-body .fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.modal-body .columna {
  flex: 2;
}
/* ☑️☑️ */
.modal-body .columna label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
.modal-body .columna input,
.modal-body .columna select {
  width: 100%;
  padding: 5px;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}
/* ☑️☑️☑️ */
.modal-body .fila-boton {
  margin-top: 10px;
}
.modal-body .btn-guardar {
  background-color: #fff;
  color: black;
  padding: 10px 15px;
  border-radius: 4px;
  border: 1px solid #ffffff7c;
  cursor: pointer;
  float: right;
  transition: all 0.3s ease;
}
.modal-body .btn-guardar:hover {
  background-color: #000;
  color: #fff;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .crud-form form .fila,
  .modal-body form .fila {
    flex-direction: column;
  }

  .crud-form form .columna input,
  .crud-form form .columna select {
    min-width: 300px;
    max-width: 100px;
    width: 100px;
    font-size: 1rem;
    box-sizing: border-box;
  }

  .crud-table th,
  .crud-table td {
    font-size: 0.8rem;
    width: auto;
    max-width: none;
  }

  .crud-table,
  .crud-form,
  .title {
    overflow-x: auto;
    min-width: 400px;
  }

  .crud-table th:first-child,
  .crud-table td:first-child {
    max-width: 100px;
    width: 100px;
    text-overflow: ellipsis;
  }
}
