/* styles.css - responsive y táctil */
:root {
  --bg: transparent;
  --muted: #6b7280;
  --primary: #ea8a19;
  --success: #ffd500;
  --verde: #16a34a;
  --card: #f8fafc;
  --radius: 12px;
  --gap: 14px;
  --max-width: 70%;
  --font-size: 18px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100vh;
  width: 100vw;
  margin: 0;
  background: var(--bg);
  font-family: Inter, system-ui, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.container {
  width: 100%;
  max-width: var(--max-width);
}

/* Tipografía y tamaños pensados para móviles */
h1,
h2,
h3 {
  margin: 0 0 8px 0;
  font-weight: 600;
}
h1 {
  font-size: 1.6rem;
}
h2 {
  font-size: 1.3rem;
}
h3 {
  font-size: 1.1rem;
}
p,
label,
.small {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
  flex-direction: column;
}
.user-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.user-name {
  font-size: 1.05rem;
  font-weight: 700;
}
.user-nick {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Buttons grandes y táctiles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 12px;
  border: 0;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary2 {
  background: var(--primary);
  color: #fff;
  position: relative;
  overflow: hidden;
  animation: btn-wiggle 3s ease-in-out infinite,
    btn-glow 4s ease-in-out infinite;
}

/* Movimiento suave y excéntrico */
@keyframes btn-wiggle {
  0% {
    transform: rotate(0deg) scale(1);
  }
  20% {
    transform: rotate(1deg) scale(1.03);
  }
  40% {
    transform: rotate(-1deg) scale(0.98);
  }
  60% {
    transform: rotate(1.5deg) scale(1.04);
  }
  80% {
    transform: rotate(-1deg) scale(1);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

/* Pulso de brillo interno */
@keyframes btn-glow {
  0% {
    box-shadow: 0 0 0px rgba(255, 255, 255, 0);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
  }
  100% {
    box-shadow: 0 0 0px rgba(255, 255, 255, 0);
  }
}

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-ghost {
  background: #f3f4f6;
  color: #111;
  border: 1px solid #e5e7eb;
}
.btn-block {
  width: 100%;
}

/* Cards y layout */
.card {
  background: var(--card);
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: 6px 6px 6px rgba(0, 0, 0, 0.3);
  margin-bottom: 14px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

/* Inputs grandes */
.input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 1rem;
}
label {
  display: block;
  margin-top: 10px;
  margin-bottom: 6px;
  font-weight: 600;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.modal {
  width: 94%;
  max-width: 640px;
  background: #fff;
  padding: 18px;
  border-radius: 14px;
}

/* Preview imágenes */
.preview-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.preview-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e6e6e6;
}

/* Accordion áreas */
.area-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #eef2f7;
  margin-top: 8px;
}
.accordion-body {
  padding: 10px 12px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  margin-top: 6px;
}

/* Footer bottom menu estilo app */
.footer-menu {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 10vh;
  background: #021636;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
  z-index: 70;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-menu .btn {
  flex: 1;
  height: 100%;
  background: none;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.footer-menu .btn:last-child {
  border-right: none;
}

.footer-menu .btn .icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-menu svg {
  width: 20px;
  height: 20px;
  stroke: rgba(255, 255, 255, 0.75);
}

/* Checklist card grande */
.check-card {
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eef2f7;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.check-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Responsive tweaks */
@media (min-width: 900px) {
  body {
    padding: 28px;
  }
  h1 {
    font-size: 2rem;
  }
  .btn {
    font-size: 1.05rem;
    padding: 12px 18px;
  }
}

.user-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  display: inline-block;
  margin-right: 10px;
}

#chartCumplimiento {
  position: relative !important;
  z-index: 2 !important;
}