:root {
  --bg: #f6f8fb;
  --card: #ffffffcc;
  --cardSolid: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0077b6;
  --accent: #00a896;
  --danger: #dc2626;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --radius: 18px;
  --radiusSm: 14px;
  --max: 1280px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  font-family: var(--font);
  background: #F3F4F6;
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0EA5E9;
  box-shadow: 0 6px 14px rgba(14, 165, 233, 0.25);
}
.brand h1 {
  font-size: 18px;
  margin: 0;
  letter-spacing: 0.2px;
}
.brand p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  border-radius: 16px;
  padding: 18px 20px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 840px) {
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

.label {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 6px;
}

.input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px;
  background: #fff;
  outline: none;
  font-size: 15px;
  color: var(--text);
}
textarea {
  min-height: 90px;
  resize: vertical;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  background: #0EA5E9; 
  color: #FFFFFF;
  box-shadow: none;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.secondary {
  background: #FFFFFF;
  color: #374151;
  border: 1px solid #D1D5DB;
  box-shadow: none;
}

.btn.danger {
  background: #FFFFFF;
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: none;
}
.btn:hover {
  filter: brightness(0.98);
}

.small {
  font-size: 12px;
  color: var(--muted);
}

.badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
}

.hr {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.choiceWrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.choice {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}
.choice.selected {
  border: 2px solid var(--accent);
  background: rgba(0, 168, 150, 0.08);
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: #e9eef5;
  overflow: hidden;
}
.progress > div {
  height: 100%;
  width: 0%;
  background: #0EA5E9;
  transition: width 0.25s ease;
}

.thumbRow {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 8px 2px;
}
.thumb {
  width: 120px;
  height: 90px;
  border-radius: 14px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: #fff;
}
.thumbWrap {
  position: relative;
}
.thumbDel {
  position: absolute;
  top: 6px;
  right: 6px;
  border: 0;
  border-radius: 999px;
  padding: 6px 8px;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.55);
  color: #fff;
  font-weight: 800;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
}
.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table th {
  text-align: left;
  color: var(--muted);
  font-weight: 700;
  background: #fbfdff;
}
.table tr:last-child td {
  border-bottom: 0;
}

.notice {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 119, 182, 0.2);
  background: rgba(0, 119, 182, 0.08);
  color: #0b3a53;
  font-size: 13px;
}
.error {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.08);
  color: #7f1d1d;
  font-size: 13px;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 14px 16px 0;
}

.footer {
  margin-top: auto;
  padding: 18px 16px 26px;
  text-align: center;
  color: var(--muted);
}


.logo {
  width: 92px;
  height: 63px;
  border-radius: 12px;
  object-fit: contain;
  border: 0px solid var(--border);
}

.brandText {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brandTitle {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.brandSub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* Tipografias utilitarias usadas en HTML */
.h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
}
.h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Alertas (index/report usan alert) */
.alert {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.08);
  color: #7f1d1d;
  font-size: 13px;
  margin: 12px 0;
}

/* Variantes de botones (tu HTML usa primary y ghost) */
.btn.primary {
  /* tu .btn ya es primary, esto es por compatibilidad */
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

/* Spinner (history/report lo usan) */
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.15);
  border-top-color: rgba(15, 23, 42, 0.65);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===========================
   Historial: lista linda
   =========================== */

.listWrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.listItem {
  display: block;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 14px 14px;
  transition: transform 0.06s ease, box-shadow 0.15s ease;
}

.listItem:hover {
  transform: translateY(-1px);
}

.liTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.liTitle {
  font-weight: 900;
  font-size: 15px;
}

.pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  white-space: nowrap;
}

.liMeta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* ===========================
   Detalle reporte (por si ya lo estas usando)
   =========================== */

.kvWrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

@media (max-width: 520px) {
  .kv {
    grid-template-columns: 1fr;
  }
}

.kvK {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}
.kvV {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

.pre {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fbfdff;
  overflow: auto;
  font-size: 12px;
}

/* Fotos (detalle) */
.photoGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 720px) {
  .photoGrid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.photoA {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.photoImg {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

/* Links */
.link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.chipWrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.chip {
  appearance: none;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 650;
  font-size: 13px;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.chip:hover {
  transform: translateY(-1px);
}

.chip.active {
  border-color: rgba(46, 196, 182, 0.8);
  background: rgba(46, 196, 182, 0.12);
  color: #0f766e;
}

/* Grid de opciones con imagen (como en la app) */
.optionGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 520px) {
  .optionGrid {
    grid-template-columns: 1fr;
  }
}

.optionCard {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(2, 48, 71, 0.08);
  cursor: pointer;
  transition: transform 0.06s ease, border-color 0.15s ease;
}

.optionCard:hover {
  transform: translateY(-1px);
}

.optionCard.selected {
  border-width: 2px;
  border-color: rgba(0, 168, 150, 0.9);
  background: rgba(224, 242, 254, 0.55);
}

.optionImg {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.optionLabel {
  padding: 10px 12px;
  font-weight: 700;
  font-size: 14px;
  color: #374151;
  text-align: center;
}

.optionCard.selected .optionLabel {
  color: #0077b6;
}

.zoomBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 14px;
}

/* Modal zoom */
.zoomOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 9999;
}

.zoomOverlay.open {
  display: flex;
}

.zoomBox {
  width: min(980px, 96vw);
  height: min(720px, 78vh);
  border-radius: 18px;
  overflow: hidden;
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.zoomBox img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Input textareas para que se vean mas pro */
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
  font-size: 14px;
  color: var(--text);
}

/* Errores visibles */
.q.error {
  border: 1px solid rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.04);
  border-radius: 16px;
  padding: 12px;
}

.qErrorText {
  margin-top: 8px;
  font-size: 12px;
  color: #b91c1c;
  font-weight: 700;
}

/* Modal simple */
.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modalOverlay.open {
  display: flex;
}

.modalBox {
  width: min(520px, 96vw);
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 50px rgba(2, 48, 71, 0.24);
  padding: 14px;
}

.modalTitle {
  font-weight: 900;
  font-size: 16px;
  margin-bottom: 8px;
}

.modalRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 520px) {
  .modalRow {
    grid-template-columns: 1fr;
  }
}

.modalActions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.q {
  margin-top: 12px;
}

.qInline {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 12px;
  align-items: center;
}

@media (max-width: 840px) {
  .qInline {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.qInlineLeft {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qLabel {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.qReq {
  font-size: 11px;
  font-weight: 800;
  color: #b91c1c;
}

.qHelp {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.qInlineRight {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-outline,
.btn.btn-outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

/* Pequeño hover liviano, sin romper el look Apple */
.btn-outline:hover,
.btn.btn-outline:hover {
  transform: translateY(-1px);
}

/* Tipografia por defecto para que h1/h2/h3 se vean como en admin */
h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
}
.dash {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: #F3F4F6;
}

.dashSide {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px;
  border-right: 1px solid #E5E7EB;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashBrand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
}

.dashLogo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.dashTitle {
  font-weight: 900;
  color: #111827;
  line-height: 1.1;
}

.dashSub {
  font-size: 12px;
  color: #6B7280;
  margin-top: 2px;
}

.dashNav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashLink {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #111827;
  text-decoration: none;
  font-weight: 700;
}

.dashLink:hover {
  filter: brightness(0.98);
}

.dashLink.active {
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.dashFooter {
  margin-top: auto;
}

.dashMain {
  padding: 16px;
}

.dashTop {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.dashContent {
  max-width: 920px;
}

/* Responsive */
@media (max-width: 860px) {
  .dash {
    grid-template-columns: 1fr;
  }
  .dashSide {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #E5E7EB;
  }
}
.dashFrame{
  width: 100%;
  height: calc(100vh - 110px);
  border: none;
  background: transparent;
}
.successOverlay{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
  backdrop-filter: blur(6px);
}

.successCard{
  width: min(520px, 100%);
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(226,232,240,0.95);
  border-radius: 18px;
  padding: 18px 18px 16px 18px;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.18);
  text-align: center;
  animation: popIn 220ms ease-out;
}

@keyframes popIn{
  from{ transform: translateY(10px) scale(0.98); opacity: 0; }
  to{ transform: translateY(0) scale(1); opacity: 1; }
}

.successIcon{
  width: 88px;
  height: 88px;
  margin: 0 auto 10px auto;
  border-radius: 999px;
  background: rgba(226,232,240,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.successSvg{
  width: 64px;
  height: 64px;
}

.successCircle{
  fill: none;
  stroke: #2EC4B6;
  stroke-width: 3.5;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: drawCircle 520ms ease-out forwards;
}

@keyframes drawCircle{
  to{ stroke-dashoffset: 0; }
}

.successCheck{
  fill: none;
  stroke: #0077B6;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawCheck 380ms 320ms ease-out forwards;
}

@keyframes drawCheck{
  to{ stroke-dashoffset: 0; }
}

.successTitle{
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.2px;
}

.successSub{
  margin-top: 6px;
  font-size: 14px;
  color: #475569;
}
