/* Portale Accodami — coda remota */
.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.acc-captcha {
  margin: 1rem 0 0.5rem;
  min-height: 65px;
}

.page-accodami {
  min-height: 100vh;
  background: linear-gradient(180deg, #e8f4fc 0%, #f4f6f9 140px, #f4f6f9 100%);
  color: #1a2b3c;
  font-family: "Segoe UI", system-ui, Tahoma, Geneva, Verdana, sans-serif;
}

.acc-header {
  background: #fff;
  border-bottom: 4px solid var(--brand, #0066b3);
  padding: 1.15rem 1.25rem 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.acc-header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}

.acc-header img {
  max-height: 52px;
  max-width: 200px;
  object-fit: contain;
}

.acc-header h1 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: #1a2b3c;
}

.acc-header .subtitle {
  font-size: 0.88rem;
  color: #5a6b7d;
  margin: 0.2rem 0 0;
}

.acc-stepper {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem 1rem 0;
  max-width: 520px;
  margin: 0 auto;
}

.acc-stepper .step {
  flex: 1;
  text-align: center;
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.acc-stepper .step span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  margin: 0 auto 0.35rem;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
}

.acc-stepper .step.active {
  color: var(--brand, #0066b3);
}

.acc-stepper .step.active span {
  background: var(--brand, #0066b3);
  color: #fff;
}

.acc-stepper .step.done {
  color: #15803d;
}

.acc-stepper .step.done span {
  background: #dcfce7;
  color: #15803d;
}

.acc-main {
  max-width: 520px;
  margin: 1rem auto 2rem;
  padding: 0 1rem;
}

.acc-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.35rem 1.25rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
  border: 1px solid #e8edf2;
}

.acc-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.acc-card .card-hint {
  margin: 0 0 1.1rem;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
}

.acc-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin: 0.85rem 0 0.35rem;
}

.acc-label:first-of-type {
  margin-top: 0;
}

.acc-input,
.acc-select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  box-sizing: border-box;
}

.acc-input:focus,
.acc-select:focus {
  outline: 2px solid color-mix(in srgb, var(--brand, #0066b3) 35%, transparent);
  border-color: var(--brand, #0066b3);
}

.acc-party-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.acc-party-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  color: #334155;
}

.acc-party-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.acc-party-value {
  flex: 1;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand, #0066b3);
}

.acc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 1.15rem;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s;
}

.acc-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.acc-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.acc-btn-primary {
  background: var(--brand, #0066b3);
  color: #fff;
}

.acc-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  margin-top: 0.65rem;
}

.acc-btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  margin-top: 0.75rem;
}

.acc-btn-ghost {
  background: transparent;
  color: var(--brand, #0066b3);
  border: 1px solid #cbd5e1;
  width: auto;
  margin-top: 0;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.acc-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.acc-site-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.acc-pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #eff6ff;
  color: #1d4ed8;
}

.acc-pill--muted {
  background: #f1f5f9;
  color: #64748b;
}

/* Status view */
.acc-status-hero {
  text-align: center;
  padding: 0.5rem 0 1rem;
}

.acc-status-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.acc-status-badge--waiting {
  background: #fef3c7;
  color: #92400e;
}

.acc-status-badge--notified {
  background: #dbeafe;
  color: #1d4ed8;
}

.acc-status-badge--checked_in {
  background: #dcfce7;
  color: #15803d;
}

.acc-status-badge--called {
  background: #e0e7ff;
  color: #4338ca;
}

.acc-status-badge--cancelled {
  background: #f1f5f9;
  color: #64748b;
}

.acc-status-badge--absent {
  background: #fee2e2;
  color: #b91c1c;
}

.acc-code {
  font-size: clamp(1.75rem, 8vw, 2.35rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--brand, #0066b3);
  margin: 0.25rem 0;
  word-break: break-all;
}

.acc-ticket-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: #334155;
  margin: 0.25rem 0;
}

.acc-status-msg {
  font-size: 1.05rem;
  line-height: 1.45;
  color: #1e293b;
  margin: 0.75rem 0;
}

.acc-ahead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
}

.acc-ahead-num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--brand, #0066b3);
}

.acc-ahead-num--next {
  color: #15803d;
}

.acc-ahead-label {
  text-align: left;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.35;
  white-space: pre-line;
}

.acc-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  margin: 1.25rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.acc-tl-step {
  text-align: center;
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 600;
  line-height: 1.25;
}

.acc-tl-step::before {
  content: "";
  display: block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #e2e8f0;
  margin: 0 auto 0.35rem;
}

.acc-tl-step.active {
  color: var(--brand, #0066b3);
}

.acc-tl-step.active::before {
  background: var(--brand, #0066b3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #0066b3) 25%, transparent);
}

.acc-tl-step.done {
  color: #15803d;
}

.acc-tl-step.done::before {
  background: #22c55e;
}

.acc-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1rem 0 0.5rem;
  padding: 1rem;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.acc-qr-wrap p {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  text-align: center;
}

.acc-qr-target {
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-footnote {
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.75rem;
}

.acc-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #64748b;
}

.acc-loading {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: acc-spin 0.7s linear infinite;
}

@keyframes acc-spin {
  to {
    transform: rotate(360deg);
  }
}

.acc-resume-bar {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

@media (max-width: 400px) {
  .acc-timeline {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.65rem;
  }
}
