/* ==========================================================================
   PORTAL PÚBLICO DE ESPAÇOS E ENSALAMENTO — ICED / UFOPA
   Design System Oficial: Gradiente Solar ICED + Azul Institucional UFOPA
   ========================================================================== */

:root {
  /* Identidade Visual ICED */
  --iced-yellow: #fde047;
  --iced-amber: #f59e0b;
  --iced-coral: #fb7185;
  --iced-rose: #f43f5e;
  --iced-dark-rose: #be123c;
  --iced-gradient: linear-gradient(135deg, #fde047 0%, #fb7185 100%);
  --iced-gradient-soft: linear-gradient(135deg, #fef9c3 0%, #ffe4e6 100%);
  --iced-gradient-badge: linear-gradient(135deg, #f59e0b 0%, #e11d48 100%);

  /* Identidade UFOPA */
  --ufopa-navy: #003366;
  --ufopa-blue: #005a9c;
  --ufopa-sky: #0284c7;
  --ufopa-sky-light: #e0f2fe;

  /* Neutros e Superfícies */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --border-card: #e5e7eb;

  /* Estados em Tempo Real */
  --status-free-bg: #ecfdf5;
  --status-free-border: #10b981;
  --status-free-text: #065f46;

  --status-busy-bg: #fff1f2;
  --status-busy-border: #f43f5e;
  --status-busy-text: #9f1239;

  --status-next-bg: #fffbeb;
  --status-next-border: #f59e0b;
  --status-next-text: #92400e;

  /* Tipografia & Bordas */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   CABEÇALHO INSTITUCIONAL (HEADER)
   ========================================================================== */
header {
  background: white;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(244, 63, 94, 0.25);
  transition: transform 0.2s ease;
  object-fit: cover;
}

.brand:hover .brand-logo-img {
  transform: scale(1.05);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ufopa-navy);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-tag {
  background: var(--iced-gradient);
  color: #881337;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.brand-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

.clock-badge {
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--status-free-border);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.semestre-badge {
  background: var(--ufopa-sky-light);
  color: var(--ufopa-blue);
  border: 1px solid #bae6fd;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ==========================================================================
   HERO SECTION (BUSCA AMIGÁVEL & BOAS-VINDAS)
   ========================================================================== */
.hero {
  background: radial-gradient(circle at 10% 20%, rgba(253, 224, 71, 0.15) 0%, rgba(251, 113, 133, 0.12) 40%, rgba(248, 250, 252, 1) 90%);
  border-bottom: 1px solid var(--border-light);
  padding: 2.25rem 1.25rem 2rem;
  text-align: center;
}

.hero-container {
  max-width: 760px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--ufopa-navy);
  letter-spacing: -0.5px;
  margin-bottom: 0.4rem;
}

.hero p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Barra de Busca Universal */
.search-box-wrapper {
  position: relative;
  max-width: 620px;
  margin: 0 auto 1.25rem;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 48px 14px 50px;
  font-size: 1rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-light);
  background: white;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  outline: none;
  transition: all 0.25s ease;
  color: var(--text-main);
}

.search-input:focus {
  border-color: var(--iced-coral);
  box-shadow: 0 4px 20px rgba(244, 63, 94, 0.15);
}

.search-clear-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
}

.search-clear-btn.visible {
  display: block;
}

/* Chips de Acesso Rápido */
.chips-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-btn {
  background: white;
  border: 1px solid var(--border-light);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.chip-btn:hover {
  border-color: var(--iced-coral);
  color: var(--iced-dark-rose);
  transform: translateY(-1px);
}

.chip-btn.active {
  background: var(--iced-gradient);
  border-color: transparent;
  color: #881337;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.25);
}

/* ==========================================================================
   NAVEGAÇÃO POR ABAS (TABS)
   ========================================================================== */
.tabs-wrapper {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
}

.tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border-light);
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--ufopa-navy);
}

.tab-btn.active {
  color: var(--iced-rose);
  border-bottom-color: var(--iced-rose);
  font-weight: 700;
}

/* ==========================================================================
   CONTEÚDO PRINCIPAL (MAIN)
   ========================================================================== */
main {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
  flex: 1;
  width: 100%;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ==========================================================================
   ABA 1: MAPA DE SALAS (AGRUPAMENTO POR BLOCO / ANDAR)
   ========================================================================== */
.section-block {
  margin-bottom: 2.25rem;
}

.section-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.25rem;
}

.section-block-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ufopa-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-block-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* Cards das Salas */
.room-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.room-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.room-card-head {
  padding: 1rem 1.25rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.room-identity {
  display: flex;
  flex-direction: column;
}

.room-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ufopa-navy);
  letter-spacing: -0.3px;
}

.room-location {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.room-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.tag-pcd {
  background: #dcfce7;
  color: #166534;
}

.tag-cap {
  background: #f1f5f9;
  color: #334155;
}

/* Status em Tempo Real no Card */
.room-status-box {
  margin: 0.5rem 1.25rem 1rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  border-left: 4px solid transparent;
}

.status-now-busy {
  background: var(--status-busy-bg);
  border-left-color: var(--status-busy-border);
  color: var(--status-busy-text);
}

.status-now-free {
  background: var(--status-free-bg);
  border-left-color: var(--status-free-border);
  color: var(--status-free-text);
}

.status-label {
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-detail {
  font-size: 0.82rem;
  line-height: 1.35;
}

.room-card-foot {
  padding: 0.75rem 1.25rem;
  background: #fafafa;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.btn-details {
  background: white;
  border: 1px solid var(--border-light);
  color: var(--ufopa-blue);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-details:hover {
  background: var(--ufopa-sky-light);
  border-color: var(--ufopa-sky);
  color: var(--ufopa-navy);
}

.qr-active-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   ABA 2: VISÃO POR CURSO & TURMA
   ========================================================================== */
.course-filter-card {
  background: white;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.course-select-group {
  flex: 1;
  min-width: 240px;
}

.course-select-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.course-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: #f8fafc;
  font-size: 0.92rem;
  color: var(--text-main);
  outline: none;
  font-weight: 600;
}

.course-select:focus {
  border-color: var(--iced-coral);
  background: white;
}

.schedule-grid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.schedule-grid-table th {
  background: #f1f5f9;
  padding: 12px 14px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}

.schedule-grid-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
  vertical-align: middle;
}

.schedule-grid-table tr:last-child td {
  border-bottom: none;
}

.schedule-grid-table tr:hover td {
  background: #fafafa;
}

.class-room-badge {
  background: var(--iced-gradient-soft);
  color: #9f1239;
  border: 1px solid #fecdd3;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.82rem;
  display: inline-block;
}

/* ==========================================================================
   ABA 3: GUIA DO CAMPUS & INFRAESTRUTURA
   ========================================================================== */
.guide-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.guide-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.guide-card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.guide-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ufopa-navy);
  margin-bottom: 0.5rem;
}

.guide-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.guide-list {
  list-style: none;
  font-size: 0.84rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ==========================================================================
   MODAL DA SALA (MOBILE FIRST / QR CODE LANDING)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--iced-gradient-soft);
}

.modal-header-info h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ufopa-navy);
}

.modal-header-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.modal-close-btn {
  background: white;
  border: 1px solid var(--border-light);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Card Destaque "Agora" dentro do Modal */
.modal-live-banner {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.modal-live-banner.is-busy {
  background: var(--status-busy-bg);
  border-color: #fecdd3;
}

.modal-live-banner.is-free {
  background: var(--status-free-bg);
  border-color: #a7f3d0;
}

.modal-live-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.modal-live-banner.is-busy .modal-live-title { color: var(--status-busy-text); }
.modal-live-banner.is-free .modal-live-title { color: var(--status-free-text); }

.modal-live-desc {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-main);
}

/* Tabs de Dias da Semana no Modal */
.week-days-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.day-chip {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.day-chip.active {
  background: var(--ufopa-navy);
  color: white;
  border-color: var(--ufopa-navy);
}

/* Footer do Modal */
.modal-footer {
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.btn-print-cartaz {
  background: var(--iced-gradient);
  border: none;
  color: #881337;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(244, 63, 94, 0.2);
}

.btn-print-cartaz:hover {
  filter: brightness(0.97);
}

/* ==========================================================================
   DRAWER / PAINEL ADMINISTRATIVO DA COADM
   ========================================================================== */
.admin-card-section {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.admin-card-section h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ufopa-navy);
  margin-bottom: 0.5rem;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 10px;
}

.admin-stat-card {
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  text-align: center;
}

.admin-stat-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--ufopa-navy);
}

.admin-stat-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ==========================================================================
   RODAPÉ (FOOTER)
   ========================================================================== */
footer {
  background: white;
  border-top: 1px solid var(--border-light);
  padding: 2rem 1.25rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.footer-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-admin-access {
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-admin-access:hover {
  background: #e2e8f0;
  color: var(--ufopa-navy);
}

.btn-admin-nav {
  background: #003366;
  border: 1px solid #002244;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.btn-admin-nav:hover {
  background: #001f3f;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 51, 102, 0.25);
  color: #ffffff;
}

.btn-card-reserve {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  color: #be123c;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}
.btn-card-reserve:hover {
  background: var(--iced-gradient);
  border-color: #fb7185;
  color: #881337;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(244, 63, 94, 0.2);
}

/* Banner de Ação Rápida: Reservas na Página Inicial */
.reservation-cta-strip {
  background: linear-gradient(135deg, #003366 0%, #001f3f 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin: 1.5rem auto 1rem;
  max-width: 1200px;
  width: calc(100% - 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 8px 20px -4px rgba(0, 51, 102, 0.25);
  flex-wrap: wrap;
}

.cta-strip-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}

.cta-strip-icon {
  font-size: 1.8rem;
  background: rgba(255, 255, 255, 0.12);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-strip-text strong {
  display: block;
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 2px;
}

.cta-strip-text span {
  font-size: 0.8rem;
  color: #93c5fd;
  line-height: 1.35;
}

.cta-strip-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-cta-reserve {
  background: var(--iced-gradient);
  color: #881337;
  font-weight: 800;
  font-size: 0.84rem;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
}

.btn-cta-reserve:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(251, 113, 133, 0.4);
}

.btn-cta-lookup {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-cta-lookup:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ==========================================================================
   ABA GUARITA & LIBERAÇÃO DE CHAVES (VIGILÂNCIA ICED)
   ========================================================================== */
.guarita-lock-card {
  max-width: 520px;
  margin: 3.5rem auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 25px -5px rgba(0, 51, 102, 0.1), 0 8px 10px -6px rgba(0, 51, 102, 0.05);
  padding: 2.5rem 2rem;
  text-align: center;
}

.guarita-lock-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 1.25rem;
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.guarita-lock-card h2 {
  font-size: 1.35rem;
  color: var(--ufopa-navy);
  margin-bottom: 0.6rem;
}

.guarita-lock-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.guarita-lock-badge {
  display: inline-block;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.guarita-lock-form {
  text-align: left;
}

.guarita-input-row {
  display: flex;
  gap: 8px;
}

.guarita-input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.guarita-input:focus {
  border-color: var(--ufopa-navy);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.12);
}

.btn-unlock-guarita {
  background: var(--ufopa-navy);
  color: #ffffff;
  border: none;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-unlock-guarita:hover {
  background: #001f3f;
  transform: translateY(-1px);
}

.guarita-error-msg {
  margin-top: 10px;
  padding: 9px 12px;
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  color: #991b1b;
  font-size: 0.82rem;
  border-radius: 4px;
}

/* Painel Aberto da Guarita */
.guarita-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
}

.guarita-panel-badge {
  display: inline-block;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-lock-guarita {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-lock-guarita:hover {
  background: #ef4444;
  color: #ffffff;
}

.guarita-notice-banner {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.guarita-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.guarita-search-box {
  position: relative;
  width: 100%;
}

.guarita-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: #94a3b8;
}

.guarita-search-box input {
  width: 100%;
  padding: 12px 38px 12px 40px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  background: #ffffff;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.guarita-search-box input:focus {
  border-color: var(--ufopa-navy);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.12);
}

.guarita-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px;
}

.guarita-category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.g-pill {
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.g-pill:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.g-pill.active {
  background: var(--ufopa-navy);
  color: #ffffff;
  border-color: var(--ufopa-navy);
  box-shadow: 0 2px 6px rgba(0, 51, 102, 0.2);
}

/* Grid e Cards de Representantes da Guarita */
.guarita-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.guarita-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.guarita-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.guarita-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.guarita-course-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ufopa-navy);
  line-height: 1.3;
}

.guarita-badge-category {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.cat-graduacao { background: #e0f2fe; color: #0369a1; }
.cat-laboratorio { background: #fef3c7; color: #92400e; }
.cat-pesquisa { background: #f3e8ff; color: #7e22ce; }
.cat-setor { background: #dcfce7; color: #166534; }
.cat-pos { background: #fce7f3; color: #9d174d; }

.guarita-reps-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.guarita-rep-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.85rem;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.guarita-rep-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guarita-rep-badge-info {
  font-size: 0.72rem;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.guarita-card-raw {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px;
  font-size: 0.84rem;
  color: #334155;
  white-space: pre-line;
  line-height: 1.45;
}

.guarita-rooms-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.78rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.guarita-room-chip {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Responsividade Mobile */
@media (max-width: 640px) {
  .hero h2 {
    font-size: 1.45rem;
  }
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-status {
    width: 100%;
    justify-content: space-between;
  }
  .rooms-grid {
    grid-template-columns: 1fr;
  }
  .guarita-grid {
    grid-template-columns: 1fr;
  }
  .guarita-input-row {
    flex-direction: column;
  }
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
}
