/* =====================================================
   RESET / BASE
===================================================== */
* {
  box-sizing: border-box;
  font-family: "Inter", Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px at 20% 15%, rgba(220,38,38,0.35), transparent 55%),
    radial-gradient(800px at 85% 30%, rgba(16,185,129,0.22), transparent 55%),
    linear-gradient(180deg, #050b10 0%, #0b1a1f 50%, #0f2027 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
}

/* =====================================================
   CONTAINER PRINCIPAL (GLASS PREMIUM)
===================================================== */
.container {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.92),
    rgba(248,250,252,0.96)
  );
  padding: 38px 30px;
  border-radius: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow:
    0 35px 70px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.7);
}

/* Borda interna sutil */
.container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
  pointer-events: none;
}

/* Linha premium no topo */
.container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    #dc2626,
    #2563eb,
    transparent
  );
  border-radius: 2px;
}

/* =====================================================
   LOGO TORRE (GLASS MARK)
===================================================== */
.logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.logo-wrapper img {
  width: 120px;
  height: auto;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.35),
    rgba(255,255,255,0.08)
  );
  backdrop-filter: blur(14px);
  box-shadow:
    0 28px 55px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.5);
  filter:
    drop-shadow(0 0 22px rgba(220,38,38,0.55));
}

/* =====================================================
   TÍTULOS
===================================================== */
h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* =====================================================
   FORMULÁRIO
===================================================== */
label {
  font-weight: 600;
  margin-top: 18px;
  display: block;
}

input,
select,
button {
  width: 100%;
  padding: 13px 15px;
  margin-top: 6px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  background: #ffffff;
}

input:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

/* =====================================================
   BOTÃO PRINCIPAL
===================================================== */
button {
  margin-top: 30px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  transition: all 0.25s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.45);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* =====================================================
   MENSAGEM
===================================================== */
#mensagem {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
}

/* =====================================================
   SEÇÃO TURNOS
===================================================== */
.secao-turnos {
  margin-top: 36px;
}

.secao-turnos h2 {
  text-align: center;
  margin-bottom: 18px;
}

.hidden {
  display: none;
}

/* =====================================================
   GRADE DE TURNOS
===================================================== */
.grade-turnos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

/* =====================================================
   CARD TURNO (PREMIUM)
===================================================== */
.turno-card {
  position: relative;
  border-radius: 22px;
  padding: 18px 14px;
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
  border: 2px solid rgba(203,213,225,0.9);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.turno-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: linear-gradient(
    135deg,
    rgba(37,99,235,0.18),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.turno-card:hover::after {
  opacity: 1;
}

.turno-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 40px rgba(0,0,0,0.18);
}

/* =====================================================
   SELECIONADO
===================================================== */
.turno-card.selecionado {
  border-color: #16a34a;
  background: linear-gradient(180deg, #ecfdf5, #dcfce7);
}

/* =====================================================
   INDISPONÍVEL
===================================================== */
.turno-card.indisponivel {
  opacity: 0.5;
  cursor: not-allowed;
  background: #e5e7eb;
}

.turno-card.indisponivel:hover {
  transform: none;
  box-shadow: none;
}

/* =====================================================
   TEXTOS DO CARD
===================================================== */
.turno-data {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 4px;
}

.turno-numero {
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 6px;
}

.turno-hora {
  font-size: 14px;
  margin-bottom: 6px;
}

.turno-periodo {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 10px;
}

/* =====================================================
   INSCRITOS
===================================================== */
.turno-inscritos {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  font-size: 12px;
}

.inscrito {
  margin-top: 3px;
  color: #334155;
}

.inscrito span {
  color: #64748b;
}

.inscrito.vazio {
  font-style: italic;
  color: #94a3b8;
}

/* =====================================================
   STATUS
===================================================== */
.turno-status {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 800;
  padding: 8px;
  border-radius: 12px;
}

.turno-status.ok {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
}

.turno-status.bloqueado {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #7f1d1d;
}

/* =====================================================
   EVENTOS NÃO CLICÁVEIS
===================================================== */
.turno-card * {
  pointer-events: none;
}

.turno-card {
  pointer-events: auto;
}

.btn-cancelar {
  margin-top: 12px;
  background: transparent;
  border: 2px solid #dc2626;
  color: #dc2626;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-cancelar:hover {
  background: #dc2626;
  color: #ffffff;
}

.aviso-cancelamento {
  margin-top: 28px;
  padding: 14px;
  text-align: center;
  font-size: 13px;
  background: #f8fafc;
  border-radius: 14px;
  color: #334155;
}

.aviso-cancelamento a {
  color: #dc2626;
  font-weight: 700;
  text-decoration: none;
}

.aviso-cancelamento a:hover {
  text-decoration: underline;
}
