/* Login · pizarra (texturas hechas con CSS/SVG). */
@font-face { font-family: "Archivo"; src: url("/plantillas/fonts/Archivo.ttf"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Big Shoulders"; src: url("/plantillas/fonts/BigShoulders.ttf"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Cabin Sketch"; src: url("/plantillas/fonts/CabinSketch-Bold.ttf"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url("/plantillas/fonts/PatrickHand.ttf"); font-display: swap; }
* { box-sizing: border-box; margin: 0; }
html, body { min-height: 100%; }
body { font: 16px/1.5 "Archivo", sans-serif; }
input { font: inherit; }

  /* Pared de ladrillo: patrón SVG con hiladas desfasadas y juntas de mortero + ruido. */
  body {
    background-color: #8A4B34;
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='88'%3E%3Crect width='120' height='88' fill='%235E3324'/%3E%3Crect x='1' y='1' width='118' height='42' rx='2' fill='%23974F38'/%3E%3Crect x='-59' y='45' width='118' height='42' rx='2' fill='%23874530'/%3E%3Crect x='61' y='45' width='118' height='42' rx='2' fill='%23A05A40'/%3E%3C/svg%3E");
    background-size: 200px 200px, 120px 88px;
    display: grid; place-items: center; padding: 40px 16px; min-height: 100vh;
  }
  body::before { content: ""; position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 30%, rgba(255,214,150,.28), rgba(0,0,0,.55) 75%); pointer-events: none; }
  .escena { position: relative; width: 100%; max-width: 980px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; align-items: center; }
  /* Pizarra con marco de madera en relieve. */
  .pizarra { position: relative; padding: 26px; border-radius: 6px;
    background: repeating-linear-gradient(90deg, #A8794A 0 9px, #966838 9px 13px, #B98A57 13px 24px, #8E6034 24px 27px);
    box-shadow: inset 0 2px 0 rgba(255,255,255,.35), inset 0 -3px 0 rgba(0,0,0,.35), 0 30px 60px rgba(0,0,0,.55), 0 4px 10px rgba(0,0,0,.4); }
  .tabla { position: relative; padding: 46px 52px 40px; color: #F4F1E8; border-radius: 2px;
    background: radial-gradient(ellipse at 40% 35%, #3B4A42, #26302B 60%, #1B231F);
    box-shadow: inset 0 0 0 3px #5B3E22, inset 0 0 60px rgba(0,0,0,.6); overflow: hidden; }
  .tabla::before { content: ""; position: absolute; inset: 0; background: url("/plantillas/pizarra.svg") center / cover; opacity: .9; pointer-events: none; }
  .tabla > * { position: relative; }
  .marca { width: 210px; filter: brightness(0) invert(.95); opacity: .95; }
  h1 { font-family: "Cabin Sketch", cursive; font-size: 54px; line-height: 1.05; margin: 22px 0 6px; text-shadow: 0 0 2px rgba(244,241,232,.5); }
  .sub { font-family: "Patrick Hand", cursive; font-size: 22px; color: #D9D3C2; }
  form { display: grid; gap: 18px; margin-top: 26px; max-width: 420px; }
  label { display: grid; gap: 2px; font-family: "Patrick Hand", cursive; font-size: 22px; color: #E8D48A; }
  input { background: transparent; border: 0; border-bottom: 3px solid rgba(244,241,232,.75); color: #F4F1E8; font-family: "Patrick Hand", cursive; font-size: 26px; padding: 6px 2px; outline: none; }
  input:focus { border-bottom-color: #E8D48A; }
  /* Botón: letrero de madera clavado, en relieve. */
  button { justify-self: start; margin-top: 8px; font: 800 22px "Big Shoulders", sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #2A1A0D; padding: 14px 34px; border: 0; border-radius: 4px; cursor: pointer;
    background: linear-gradient(180deg, #F2C25A, #D99A2B); box-shadow: inset 0 2px 0 rgba(255,255,255,.55), inset 0 -4px 0 rgba(0,0,0,.25), 0 6px 0 #8C5A16, 0 12px 20px rgba(0,0,0,.45); }
  button:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255,255,255,.55), 0 2px 0 #8C5A16; }
  .links { margin-top: 18px; font-family: "Patrick Hand", cursive; font-size: 19px; color: #CFC9B8; }
  .links a { color: #F4F1E8; }
  /* Dibujos de tiza en la esquina */
  .doodle { position: absolute; right: 20px; bottom: 14px; width: 240px; opacity: .8; }
  /* Nota adhesiva: ayuda del QR */
  .nota { position: relative; transform: rotate(3deg); background: linear-gradient(180deg, #FFE98A, #F8D85A); color: #3A2A10; padding: 26px 22px 22px; font-family: "Patrick Hand", cursive; font-size: 21px; line-height: 1.3; box-shadow: 0 18px 30px rgba(0,0,0,.45), inset 0 -18px 30px rgba(0,0,0,.06); }
  .nota::before { content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 30px; transform: translateX(-50%) rotate(-3deg); background: rgba(255,255,255,.55); box-shadow: 0 2px 4px rgba(0,0,0,.15); }
  .nota b { font-family: "Big Shoulders", sans-serif; font-size: 26px; display: block; margin-bottom: 6px; }
  .qr { width: 86px; height: 86px; margin-top: 12px; background:
      linear-gradient(90deg, #3A2A10 50%, transparent 50%) 0 0 / 12px 12px,
      linear-gradient(#3A2A10 50%, transparent 50%) 0 0 / 12px 12px; opacity: .85; border: 6px solid #3A2A10; }
  @media (max-width: 820px) {
    .escena { grid-template-columns: 1fr; gap: 26px; }
    .pizarra { padding: 14px; }
    .tabla { padding: 28px 22px 26px; }
    h1 { font-size: 40px; }
    .doodle { display: none; }
    .nota { transform: rotate(1.5deg); }
  }

.aviso { font-family: "Patrick Hand", cursive; font-size: 20px; line-height: 1.3; padding: 10px 14px; margin-top: 18px; border-left: 4px solid; }
.aviso-error { border-color: #FF8A7A; color: #FFC9C0; background: rgba(0,0,0,.18); }
.aviso-ok { border-color: #9BD8A8; color: #D6F2DB; background: rgba(0,0,0,.18); }
.nota .codigo { display: block; font-family: "Big Shoulders", sans-serif; font-size: 34px; letter-spacing: 2px; margin: 8px 0 2px; }
.admin-etq { display: inline-block; margin-top: 10px; font-family: "Big Shoulders", sans-serif; font-size: 18px; letter-spacing: 2px; color: #2A1A0D; background: #E8D48A; padding: 2px 10px; }
.doodle { pointer-events: none; }
