/* ===============================
   RESET BÁSICO
================================ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

/* ===============================
   LAYOUT PRINCIPAL
================================ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ===============================
   SIDEBAR
================================ */
.sidebar {
  width: 240px;
  background: #020617;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.sidebar h2 {
  color: #38bdf8;
  margin: 0 0 20px;
  font-size: 20px;
  text-align: center;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar nav li {
  margin-bottom: 10px;
}

.sidebar button {
  width: 100%;
  padding: 12px;
  background: #1e293b;
  border: none;
  border-radius: 6px;
  color: #e5e7eb;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar button:hover {
  background: #2563eb;
}

.sidebar .logout {
  margin-top: auto;
  background: #7f1d1d;
}

.sidebar .logout:hover {
  background: #dc2626;
}

/* ===============================
   CONTENIDO
================================ */
.contenido {
  flex: 1;
  padding: 30px;
  background: #0f172a;
}

.contenido h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
  color: #f8fafc;
}

/* ===============================
   TABLAS
================================ */
table {
  width: 100%;
  border-collapse: collapse;
  background: #020617;
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background: #1e293b;
}

th, td {
  padding: 12px;
  text-align: left;
  font-size: 14px;
}

th {
  color: #38bdf8;
  font-weight: 600;
}

td {
  color: #e5e7eb;
  border-top: 1px solid #1e293b;
}

tr:hover {
  background: #020617;
}

/* ===============================
   BOTONES
================================ */
button {
  font-family: inherit;
}

table button {
  padding: 6px 10px;
  font-size: 13px;
  background: #2563eb;
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
}

table button:hover {
  background: #1d4ed8;
}

/* ===============================
   MENSAJES
================================ */
.mensaje {
  margin-top: 10px;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
}

.mensaje.ok {
  background: #064e3b;
  color: #6ee7b7;
}

.mensaje.error {
  background: #7f1d1d;
  color: #fecaca;
}

/* ===============================
   RESPONSIVE (BÁSICO)
================================ */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }

  .sidebar nav ul {
    display: flex;
    gap: 10px;
  }

  .sidebar button {
    font-size: 12px;
    padding: 8px;
  }
}
