@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Archivo:wght@400;600;700;900&family=JetBrains+Mono:wght@400;700&family=Black+Ops+One&family=Permanent+Marker&display=swap');

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

body {
  font-family: 'Archivo', sans-serif;
  background: #C04000;
  color: #f2ebe0;
  min-height: 100vh;
  position: relative;
}

#lienzo-brochas-admin {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 160px;
}

.franja-admin {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 10;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.6) 20%, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0.6) 80%, transparent);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 22px 56px;
}

a { color: #e8ff00; text-decoration: none; transition: color 0.15s, text-shadow 0.15s; }
a:hover { color: #fff; text-shadow: 0 0 12px rgba(232,255,0,0.35); }

/* ── Topbar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(0,0,0,0.22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.brand:hover { text-shadow: none; }

.brand-logo {
  width: min(80px, 11.5vw);
  max-width: 80px;
  height: auto;
  display: block;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: multiply;
  filter: contrast(1.1);
}

.brand-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #0a0a0a;
  background: #e8ff00;
  border: 2px solid #0a0a0a;
  padding: 4px 10px;
  transform: rotate(-3deg);
  box-shadow: 2px 2px 0 #8b0000;
}

.topbar nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 8px 12px;
  color: #f2ebe0;
  background: rgba(0,0,0,0.28);
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: 2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.nav-link:hover {
  color: #fff;
  background: rgba(0,0,0,0.42);
  border-color: rgba(255,255,255,0.45);
  text-shadow: none;
}
.nav-link--salir {
  color: rgba(242,235,224,0.75);
  border-color: rgba(139,0,0,0.45);
}
.nav-link--salir:hover {
  background: rgba(139,0,0,0.35);
  border-color: #8b0000;
}

.page-title {
  font-family: 'Black Ops One', sans-serif;
  font-size: clamp(22px, 4vw, 32px);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #f2ebe0;
  text-shadow: 2px 2px 0 #8b0000;
  margin-bottom: 20px;
}

/* ── Cards grunge ── */
.card {
  position: relative;
  background: linear-gradient(155deg, rgba(0,0,0,0.5) 0%, rgba(45,14,0,0.58) 55%, rgba(0,0,0,0.45) 100%);
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: 4px;
  padding: 22px 20px;
  margin-bottom: 22px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e8ff00 35%, #8b0000 65%, transparent);
  opacity: 0.75;
}

.card h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 2.5px;
  margin-bottom: 16px;
  color: #e8ff00;
  text-shadow: 1px 1px 0 #0a0a0a;
}

.card p {
  color: rgba(242,235,224,0.82);
  line-height: 1.55;
  font-size: 0.92rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.campo { margin-bottom: 14px; }
.campo-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 22px;
}
.campo-check label { margin: 0; transform: none; }
.campo-check input[type="checkbox"] { width: auto; accent-color: #e8ff00; }

label {
  display: block;
  font-family: 'Permanent Marker', cursive;
  font-size: 12px;
  margin-bottom: 6px;
  color: rgba(242,235,224,0.85);
  transform: rotate(-0.3deg);
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 0;
  border: 1.5px solid rgba(242,235,224,0.28);
  background: rgba(0,0,0,0.45);
  color: #f2ebe0;
  font-family: 'Archivo', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #e8ff00;
  box-shadow: 0 0 0 2px rgba(232,255,0,0.15);
}
textarea { min-height: 90px; resize: vertical; }

/* ── Botones ── */
.btn {
  display: inline-block;
  padding: 11px 20px;
  border: 2px solid #0a0a0a;
  border-radius: 0;
  background: #e8ff00;
  color: #0a0a0a;
  font-family: 'Black Ops One', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 3px 3px 0 #8b0000;
  transform: rotate(-0.5deg);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.btn:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 5px 5px 0 #0a0a0a;
  filter: brightness(1.05);
  color: #0a0a0a;
  text-shadow: none;
}
.btn-secondary {
  background: rgba(0,0,0,0.35);
  color: #f2ebe0;
  border-color: rgba(242,235,224,0.35);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
}
.btn-secondary:hover { color: #fff; }
.btn-danger {
  background: #8b0000;
  color: #f2ebe0;
  box-shadow: 3px 3px 0 #0a0a0a;
}
.btn-danger:hover { background: #a50000; color: #fff; }
.btn-small { padding: 7px 12px; font-size: 0.68rem; }
.btn-row { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── Flash ── */
.flash {
  padding: 12px 14px;
  margin-bottom: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 2px;
}
.flash-ok {
  background: rgba(29,185,84,0.18);
  border: 1.5px solid #1DB954;
  color: #b8ffd0;
}
.flash-err {
  background: rgba(139,0,0,0.3);
  border: 1.5px solid #8b0000;
  color: #ffb8b8;
}

/* ── Tabla ── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th, td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: left;
  vertical-align: top;
}
th {
  font-family: 'JetBrains Mono', monospace;
  color: #e8ff00;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
td code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: rgba(242,235,224,0.8);
}
tr:hover td { background: rgba(0,0,0,0.12); }

/* ── Stats ── */
.stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.stat {
  flex: 1;
  min-width: 150px;
  background: rgba(0,0,0,0.38);
  border: 1.5px solid rgba(255,255,255,0.18);
  padding: 18px 16px;
  border-radius: 3px;
  box-shadow: 4px 4px 0 rgba(139,0,0,0.35);
  transform: rotate(-0.5deg);
}
.stat strong {
  display: block;
  font-family: 'Black Ops One', sans-serif;
  font-size: 2rem;
  color: #e8ff00;
  text-shadow: 2px 2px 0 #8b0000;
  line-height: 1;
  margin-bottom: 6px;
}
.stat span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(242,235,224,0.65);
}

/* ── Login ── */
.login-page .wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

.login-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  text-decoration: none;
  color: inherit;
}
.login-brand:hover { text-shadow: none; }

.login-logo {
  width: min(160px, 23vw);
  max-width: 160px;
  height: auto;
  display: block;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: multiply;
  filter: contrast(1.12);
}

.login-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #0a0a0a;
  background: #e8ff00;
  border: 1.5px solid #0a0a0a;
  padding: 3px 8px;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 0 #8b0000;
}

.login-box {
  width: 100%;
}

.login-page .login-box.card {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
}
.login-page .login-box.card::before {
  opacity: 0.45;
}

.login-box h2 {
  text-align: center;
  font-family: 'Permanent Marker', cursive;
  font-size: 1.2rem;
  letter-spacing: 1px;
  color: #f2ebe0;
  margin-bottom: 18px;
  text-shadow: 1px 1px 0 #8b0000;
}

/* ── Footer ── */
.admin-pie {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(0,0,0,0.2);
  text-align: center;
}
.admin-pie a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
}
.admin-pie a:hover { color: rgba(0,0,0,0.85); text-shadow: none; }

.badge-nuevo {
  color: #e8ff00;
  font-weight: 700;
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .topbar nav { width: 100%; }
  .nav-link { flex: 1 1 auto; text-align: center; }
}