:root {
  --blue: #1D4ED8;
  --blue-light: #3B82F6;
  --yellow: #FACC15;
  --yellow-dark: #CA8A04;
  --red: #DC2626;
  --red-light: #EF4444;
  --green: #22C55E;
  --dark: #111827;
  --bg: #020617;
  --card-border: rgba(59, 130, 246, 0.26);
  --text: #F9FAFB;
  --muted: #A7B0C0;
  --danger: #F87171;
  --success: #34D399;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top, rgba(29, 78, 216, 0.34), transparent 38%),
    linear-gradient(180deg, #020617 0%, #030712 100%);
  color: var(--text);
}

.app-shell {
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 18px;
}

.screen { display: none; }
.screen.active { display: block; }

.brand-area, .topbar, .brand-small {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-area { margin: 32px 0 44px; }

.logo-img {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 0 30px rgba(29, 78, 216, 0.42);
  border: 1px solid rgba(59,130,246,.5);
}

.logo-small-img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(29, 78, 216, 0.32);
}

h1, h2, h3, p { margin: 0; }

.brand-area h1, .hero-card h1 {
  font-size: 36px;
  line-height: 1;
  letter-spacing: -1.4px;
}

span { color: var(--blue-light); }

.brand-area p, .topbar p, .hero-card p, .muted {
  color: var(--muted);
}

.login-card, .hero-card, .metric-card, .student-card, .empty-card, .agenda-card, .modal-content {
  border: 1px solid var(--card-border);
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.94), rgba(3, 7, 18, 0.9));
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.login-card { padding: 26px; }

.badge, .eyebrow {
  display: inline-block;
  color: var(--yellow);
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 800;
  margin-bottom: 18px;
}

.login-card h2 { font-size: 28px; margin-bottom: 8px; }

label {
  display: block;
  margin: 16px 0 8px;
  color: #DDE6F7;
  font-size: 14px;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 16px;
  padding: 14px 15px;
  background: rgba(2, 6, 23, 0.78);
  color: var(--text);
  outline: none;
  font-size: 15px;
  font-family: Arial, Helvetica, sans-serif;
}

select option { background: #111827; color: white; }
textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.btn {
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 900;
  padding: 14px 16px;
  color: white;
  transition: transform .15s ease, opacity .15s ease;
}

.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .65; cursor: not-allowed; }

.btn.full { width: 100%; margin-top: 24px; }
.btn.small { padding: 11px 16px; }

.btn-blue {
  background: linear-gradient(135deg, #1D4ED8, #2563EB);
  box-shadow: 0 14px 30px rgba(29, 78, 216, 0.30);
}

.btn-yellow {
  color: #111827;
  background: linear-gradient(135deg, #FACC15, #F59E0B);
  box-shadow: 0 14px 30px rgba(250, 204, 21, 0.22);
}

.btn-red {
  background: linear-gradient(135deg, #DC2626, #EF4444);
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.24);
}

.close-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(239, 68, 68, 0.50);
  background: rgba(220, 38, 38, 0.18);
  color: white;
  border-radius: 16px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.message {
  min-height: 22px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.message.error { color: var(--danger); }
.message.success { color: var(--success); }

.topbar {
  justify-content: space-between;
  margin-bottom: 24px;
}

.topbar h2 { font-size: 22px; }

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  margin-bottom: 18px;
}

.hero-card h1 { font-size: 28px; margin-bottom: 10px; }

.progress-circle {
  min-width: 96px;
  height: 96px;
  border: 8px solid rgba(29, 78, 216, 0.92);
  border-left-color: rgba(250, 204, 21, 0.85);
  border-bottom-color: rgba(220, 38, 38, 0.85);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
}

.progress-circle strong { font-size: 23px; line-height: 1; }
.progress-circle small { color: var(--muted); margin-top: -18px; }

.grid-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0 18px;
}

.metric-card {
  padding: 18px;
  min-height: 116px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 12px;
  line-height: 1.35;
}

.metric-card strong {
  display: block;
  margin-top: 18px;
  font-size: 34px;
  color: white;
}

.metric-card.warning strong, .yellow-card strong { color: var(--yellow); }

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 18px 0 26px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 14px;
}

.section-head h2 {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 21px;
}

.students-list, .agenda-list {
  display: grid;
  gap: 14px;
}

.empty-card, .agenda-card { padding: 18px; }

.empty-card h3, .agenda-card h3 { margin-bottom: 8px; }
.empty-card p, .agenda-card p { color: var(--muted); line-height: 1.45; }

.student-card { padding: 18px; }

.student-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.student-name {
  font-size: 22px;
  font-weight: 900;
}

.student-meta {
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.45;
}

.status-line {
  margin-top: 10px;
  color: var(--yellow);
  font-weight: 800;
}

.status-line.apto { color: var(--green); }
.status-line.reforco { color: var(--red-light); }

.bar {
  height: 12px;
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  margin-top: 16px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #DC2626, #FACC15, #22C55E);
  border-radius: inherit;
}

.student-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.student-actions .btn {
  padding: 10px 8px;
  border-radius: 14px;
  font-size: 13px;
}

.agenda-card {
  border-left: 5px solid var(--yellow);
}

.agenda-card.realizada { border-left-color: var(--blue-light); }
.agenda-card.falta, .agenda-card.cancelada { border-left-color: var(--red-light); }
.agenda-card.remarcada { border-left-color: var(--yellow); }

.agenda-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.agenda-date {
  font-weight: 900;
  color: white;
}

.agenda-status {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #111827;
  background: var(--yellow);
}

.agenda-status.realizada { background: var(--blue-light); color: white; }
.agenda-status.falta, .agenda-status.cancelada { background: var(--red-light); color: white; }

.modal {
  position: fixed;
  inset: 0;
  display: none;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  z-index: 1000;
  overflow-y: auto;
}

.modal.active { display: block; }

.modal-content {
  width: 100%;
  max-width: 780px;
  margin: 24px auto;
  padding: 22px;
}

.modal-head, .modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-head { margin-bottom: 14px; }
.modal-head h2 { font-size: 28px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.field.full { grid-column: 1 / -1; }

.divider {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.divider h3 { color: var(--yellow); margin-bottom: 6px; }
.divider p { color: var(--muted); line-height: 1.45; }

.modal-actions { margin-top: 18px; }
.modal-actions .btn { width: 50%; }

.skills-list {
  display: grid;
  gap: 12px;
}

.skill-row {
  display: grid;
  grid-template-columns: 1fr 92px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.45);
}

.skill-row span {
  color: white;
  font-weight: 800;
}

.skill-row input {
  text-align: center;
  font-weight: 900;
}

.preview-media {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.10);
  color: var(--yellow);
  font-weight: 900;
  text-align: center;
}

.preview-media strong {
  color: white;
  font-size: 28px;
}

@media (max-width: 560px) {
  .modal { padding: 10px; }
  .modal-content { margin: 10px auto; padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
  .student-actions { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .brand-area h1 { font-size: 31px; }
  .grid-cards { grid-template-columns: 1fr; }
  .hero-card { flex-direction: column; align-items: flex-start; }
}

.btn-green {
  background: linear-gradient(135deg, #16A34A, #22C55E);
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.22);
}

.modal-actions-three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.modal-actions-three .btn {
  width: 100%;
}

#whatsTexto {
  min-height: 300px;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 560px) {
  .modal-actions-three {
    grid-template-columns: 1fr;
  }
}

.btn-purple {
  background: linear-gradient(135deg, #7C3AED, #A855F7);
  box-shadow: 0 14px 30px rgba(168, 85, 247, 0.24);
}

.exames-list {
  display: grid;
  gap: 14px;
}

.exame-card {
  padding: 18px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.94), rgba(3, 7, 18, 0.9));
  border-radius: 28px;
  border-left: 5px solid #A855F7;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.exame-card.alerta {
  border-left-color: var(--red-light);
}

.exame-card.apto {
  border-left-color: var(--green);
}

.exame-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.exame-card h3 {
  margin-bottom: 8px;
}

.exame-card p {
  color: var(--muted);
  line-height: 1.45;
}

.exame-badge {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: #A855F7;
  color: white;
  white-space: nowrap;
}

.exame-badge.alerta {
  background: var(--red-light);
}

.exame-badge.apto {
  background: var(--green);
  color: #052e16;
}

.student-actions {
  grid-template-columns: repeat(2, 1fr);
}

.extra-grid { margin-top: 0; }
.red-card strong { color: var(--red-light); }
.waiting-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(250, 204, 21, 0.14);
  color: var(--yellow);
  border: 1px solid rgba(250, 204, 21, 0.30);
}
.waiting-badge.red {
  background: rgba(220, 38, 38, 0.16);
  color: var(--red-light);
  border-color: rgba(220, 38, 38, 0.35);
}
.history-summary { display: grid; gap: 14px; margin-top: 12px; }
.history-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.50);
}
.history-card h3 { margin-bottom: 8px; }
.history-card p { color: var(--muted); line-height: 1.5; }
.history-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.history-line:last-child { border-bottom: 0; }
.history-line strong { color: white; }
@media (max-width: 560px) { .history-line { display: block; } }

.pause-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.details-summary {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.details-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.50);
}

.details-card h3 {
  margin-bottom: 8px;
}

.details-card p {
  color: var(--muted);
  line-height: 1.5;
}

.details-grid {
  display: grid;
  gap: 8px;
}

.details-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.details-line:last-child {
  border-bottom: 0;
}

.details-line strong {
  color: white;
  text-align: right;
}

.btn-gray {
  background: linear-gradient(135deg, #334155, #64748B);
  box-shadow: 0 14px 30px rgba(100, 116, 139, 0.20);
}

@media (max-width: 560px) {
  .details-line {
    display: block;
  }
}

#relatorioTexto {
  min-height: 360px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.5;
}


/* ==============================
   V11 - Ajuste visual/mobile
   ============================== */

:root {
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body {
  -webkit-tap-highlight-color: transparent;
}

button,
.btn,
select,
input,
textarea {
  touch-action: manipulation;
}

.app-shell,
.dashboard,
.main-content {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.quick-actions {
  position: sticky;
  top: 10px;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(2, 6, 23, 0.60);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 24px;
  padding: 10px;
}

.quick-actions .btn {
  min-height: 46px;
}

.student-card,
.metric-card,
.empty-card,
.exame-card,
.history-card,
.details-card {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.student-card:hover,
.metric-card:hover,
.exame-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.42);
}

.student-name {
  font-size: clamp(18px, 2.5vw, 23px);
}

.student-meta {
  line-height: 1.45;
}

.student-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 9px;
}

.student-actions .btn {
  min-height: 42px;
  padding: 10px 12px;
  font-size: 13px;
}

.section-head {
  margin-top: 28px;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(20px, 3vw, 28px);
}

.modal-content {
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.form-grid {
  align-items: start;
}

.field label {
  margin-bottom: 7px;
}

.field input,
.field select,
.field textarea {
  min-height: 46px;
}

.field textarea {
  padding-top: 12px;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 860px) {
  body {
    padding-bottom: calc(76px + var(--safe-bottom));
  }

  .app-shell,
  .dashboard,
  .main-content {
    width: 100%;
  }

  .topbar,
  .dashboard-header,
  header {
    gap: 12px;
  }

  .grid-cards,
  .extra-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metric-card {
    padding: 14px;
    border-radius: 20px;
  }

  .metric-card span {
    font-size: 12px;
  }

  .metric-card strong {
    font-size: 25px;
  }

  .quick-actions {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 12px;
  }

  .quick-actions .btn {
    width: 100%;
    min-height: 48px;
    font-size: 13px;
    padding: 11px 10px;
  }

  .students-list,
  .exames-list {
    gap: 12px;
  }

  .student-card,
  .empty-card,
  .exame-card {
    border-radius: 22px;
    padding: 15px;
  }

  .student-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-actions .btn {
    min-height: 44px;
    font-size: 12px;
  }

  .modal {
    padding: 8px;
    align-items: flex-start;
  }

  .modal-content {
    width: 100%;
    max-height: calc(100vh - 16px);
    border-radius: 22px;
    padding: 16px;
  }

  .modal-head {
    position: sticky;
    top: -16px;
    z-index: 5;
    background: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(14px);
    padding: 10px 0 12px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .modal-actions,
  .modal-actions-three {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  #relatorioTexto {
    min-height: 300px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + var(--safe-bottom));
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 9px;
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.20);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px);
  }

  .mobile-bottom-nav button {
    border: 0;
    border-radius: 16px;
    padding: 11px 8px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, #1D4ED8, #60A5FA);
    cursor: pointer;
  }

  .mobile-bottom-nav button:nth-child(2) {
    background: linear-gradient(135deg, #CA8A04, #FACC15);
    color: #111827;
  }

  .mobile-bottom-nav button:nth-child(3) {
    background: linear-gradient(135deg, #334155, #64748B);
  }
}

@media (max-width: 480px) {
  .grid-cards,
  .extra-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric-card {
    min-height: 92px;
  }

  .student-actions {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .exame-top {
    display: block;
  }

  .exame-badge {
    margin-top: 10px;
    display: inline-block;
  }

  .details-line,
  .history-line {
    display: block;
  }

  .details-line strong,
  .history-line strong {
    display: block;
    margin-top: 3px;
    text-align: left;
  }
}

@media (min-width: 861px) {
  .student-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


/* ==============================
   V12 - Beta 1.0
   ============================== */

.beta-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 18px 0 22px;
  padding: 20px;
  border-radius: 28px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background:
    radial-gradient(circle at top left, rgba(29, 78, 216, 0.26), transparent 36%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.92));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.beta-panel h2 {
  margin: 4px 0 6px;
  font-size: clamp(22px, 3vw, 30px);
}

.beta-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.checklist-beta {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.checklist-beta label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: white;
  font-weight: 800;
}

.checklist-beta input {
  width: 18px;
  height: 18px;
  accent-color: #22C55E;
}

.app-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.28);
  font-weight: 900;
  font-size: 12px;
}

@media (max-width: 720px) {
  .beta-panel {
    display: grid;
    gap: 14px;
    border-radius: 22px;
    padding: 16px;
  }

  .beta-panel .btn {
    width: 100%;
  }
}

/* V13 - Modo Agenda da Instrutora */
.agenda-mode-panel{display:grid;gap:16px;margin:18px 0 22px;padding:20px;border-radius:30px;border:1px solid rgba(34,197,94,.28);background:radial-gradient(circle at top left,rgba(34,197,94,.22),transparent 34%),linear-gradient(145deg,rgba(15,23,42,.96),rgba(2,6,23,.93));box-shadow:0 22px 60px rgba(0,0,0,.38)}
.agenda-mode-panel h2{margin:4px 0 6px;font-size:clamp(24px,3vw,34px)}.agenda-mode-panel p{color:var(--muted);line-height:1.45}.agenda-mode-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.agenda-mode-actions .btn{min-height:50px;padding:12px 10px}.quick-output-card{margin:16px 0;padding:16px;border-radius:22px;border:1px solid rgba(148,163,184,.16);background:rgba(2,6,23,.52);color:var(--muted);line-height:1.55}.quick-output-card h3{color:white;margin:12px 0 6px}.quick-output-card ul{margin:6px 0 10px 18px}.quick-output-card li{margin-bottom:5px}.quick-stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.quick-stat{padding:14px;border-radius:20px;background:rgba(15,23,42,.72);border:1px solid rgba(148,163,184,.16)}.quick-stat span{display:block;color:var(--muted);font-size:12px;font-weight:800}.quick-stat strong{display:block;margin-top:6px;color:white;font-size:28px}#agendaAmanhaTexto,#contagemTexto,#esperaRapidaTexto,#examesRapidoTexto{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;min-height:260px}@media(max-width:960px){.agenda-mode-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.agenda-mode-panel{padding:16px;border-radius:22px}.agenda-mode-actions{grid-template-columns:1fr}.quick-stats-grid{grid-template-columns:1fr 1fr}.quick-stat strong{font-size:24px}}

/* ==============================
   V13.1 - Horários rápidos
   ============================== */

.time-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.time-shortcuts button {
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 14px;
  padding: 11px 8px;
  background: rgba(29, 78, 216, 0.16);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

.time-shortcuts button:hover {
  background: rgba(96, 165, 250, 0.28);
}

.field-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.auto-time-preview {
  margin-top: 8px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.24);
  color: #86efac;
  font-weight: 900;
  font-size: 13px;
}

@media (max-width: 520px) {
  .time-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ==============================
   V13.3 - Ícone de data mais visível
   ============================== */

input[type="date"],
input[type="time"] {
  padding-right: 52px;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  filter: invert(1) brightness(2.2) contrast(1.2);
  transform: scale(1.35);
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit {
  color: #ffffff;
}

input[type="date"]:hover,
input[type="time"]:hover,
input[type="date"]:focus,
input[type="time"]:focus {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Firefox / navegadores compatíveis */
input[type="date"],
input[type="time"] {
  color-scheme: dark;
}


/* ==============================
   V13.4 - Editar/cancelar agenda + calendário visível
   ============================== */

.date-helper-row {
  display: grid;
  grid-template-columns: 1fr 58px;
  gap: 8px;
  align-items: center;
}

.calendar-helper-btn {
  min-height: 48px;
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 16px;
  background: linear-gradient(135deg, #FACC15, #F59E0B);
  color: #111827;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(250, 204, 21, 0.16);
}

.agenda-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.agenda-actions .btn {
  min-height: 38px;
  padding: 9px 14px;
  font-size: 12px;
}

.agenda-card.cancelada {
  opacity: 0.72;
  border-left-color: var(--red-light);
}

.agenda-status.cancelada {
  background: var(--red-light);
  color: white;
}

@media (max-width: 560px) {
  .date-helper-row {
    grid-template-columns: 1fr 54px;
  }

  .agenda-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* ==============================
   V13.5 - Agenda por data
   ============================== */

.agenda-date-row {
  grid-template-columns: 1fr 90px 110px;
}

.text-helper-btn {
  font-size: 14px;
}

@media (max-width: 560px) {
  .agenda-date-row {
    grid-template-columns: 1fr;
  }
}
