
:root {
  --adm-sidebar-bg: #0f172a;
  --adm-sidebar-hover: #1e293b;
  --adm-sidebar-active: #3b82f6;
  --adm-header-bg: #ffffff;
  --adm-body-bg: #f1f5f9;
  --adm-card-bg: #ffffff;
  --adm-accent: #3b82f6;
  --adm-accent-light: #eff6ff;
  --adm-text-primary: #0f172a;
  --adm-text-secondary: #64748b;
  --adm-text-muted: #94a3b8;
  --adm-border: #e2e8f0;
  --adm-table-header: #f8fafc;
  --adm-table-hover: #f1f5f9;
  --adm-table-stripe: #f8fafc;
  --adm-footer-bg: #1e293b;
  --adm-form-bg: #f8fafc;
}

* { box-sizing: border-box; }

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
}

body {
  height: 100vh;
  margin: 0;
  background-color: var(--adm-body-bg);
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 60px 1fr 48px;
  grid-template-areas: "header header"
                       "aside main"
                       "aside footer";
  color: var(--adm-text-primary);
}

/* HEADER */
header {
  grid-area: header;
  display: flex;
  align-items: center;
  background-color: var(--adm-header-bg);
  border-bottom: 1px solid var(--adm-border);
  padding: 0 24px;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}

header img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

header h1 {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--adm-text-primary);
}

header h1 a {
  text-decoration: none;
  color: inherit;
}

header ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

header ul li a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--adm-text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--adm-border);
  background: var(--adm-form-bg);
  transition: background 0.15s, color 0.15s;
}

header ul li a:hover {
  background: var(--adm-accent-light);
  color: var(--adm-accent);
  border-color: #bfdbfe;
}


/* MAIN */
main {
  grid-area: main;
  padding: 28px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}

main h1{
  margin-bottom: 0;
  text-align: center;
}

/* TABLAS */
.table-wrapper {
  background: var(--adm-card-bg);
  border-radius: 10px;
  border: 1px solid var(--adm-border);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--adm-card-bg);
  color: var(--adm-text-primary);
  font-family: inherit;
  font-size: 13.5px;
}

thead {
  background-color: var(--adm-table-header);
}

thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--adm-text-muted);
  border-bottom: 1px solid var(--adm-border);
}

tbody tr {
  border-bottom: 1px solid var(--adm-border);
  transition: background 0.1s;
}

tbody tr:last-child {
  border-bottom: none;
}

td {
  padding: 11px 16px;
  color: var(--adm-text-primary);
}

tbody tr:hover {
  background-color: var(--adm-table-hover);
}

tbody tr:nth-child(even) {
  background-color: var(--adm-table-stripe);
}

th, td {
  border-right: none;
}

/* FOOTER */
footer {
  grid-area: footer;
  background-color: var(--adm-footer-bg);
  display: flex;
  align-items: center;
  padding: 0 24px;
  color: #64748b;
  font-size: 12px;
}

footer * {
  margin: 0;
  color: inherit;
}

/* FORMULARIOS */
form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--adm-card-bg);
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 480px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin: 0 auto 0 auto;
  width: 50%;
}

form input, form select, form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--adm-border);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  background: var(--adm-form-bg);
  color: var(--adm-text-primary);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

form input:focus, form select:focus, form textarea:focus {
  border-color: var(--adm-accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

form label {
  font-size: 13px;
  font-weight: 500;
  color: var(--adm-text-secondary);
}

form button[type="submit"] {
  padding: 10px 20px;
  background: var(--adm-accent);
  color: white;
  border: none;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

form button[type="submit"]:hover {
  background: #2563eb;
}

img {
  width: 100%;
}

/* Cuenta */
.cuenta {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cuenta details {
  position: relative;
  display: inline-block;
}

.cuenta summary {
  cursor: pointer;
  background: #2c3e50;
  color: #fff;
  padding: 10px 15px;
  border-radius: 6px;
  font-weight: 500;
}

.cuenta summary {
  list-style: none;
}

.cuenta summary::-webkit-details-marker {
  display: none;
}

.cuenta details ul {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);

  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-width: fit-content;
  padding: 5px 0;
  margin: 0;

  z-index: 9999;
  box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}

.cuenta details ul li {
  list-style: none;
}

.cuenta details ul li a {
  display: block;
  padding: 10px;
  color: #333;
  text-decoration: none;
}

.cuenta details ul li a:hover {
  background: #f0f0f0;
}

i-fa-table, i.fa-user-tie {
  color: var(--adm-sidebar-bg);
}

i.fa-table:hover {
  color: white;
}

i.fa-user-tie:hover {
  color: white;
}
