/* ============================================================
   FNAS - Central de Agendamentos
   Design System
   ============================================================ */

:root {
  --bg-page: #EEF2F7;
  --sidebar-bg: #FFFFFF;
  --card-dark: #003A4E;
  --card-dark-2: #004D66;
  --text-dark: #072C3D;
  --text-medium: #5A7B8C;
  --text-light: rgba(255,255,255,0.85);
  --accent-orange: #F77F00;
  --accent-green: #00B074;
  --accent-red: #FF3B53;
  --accent-blue: #00A0C4;
  --accent-teal: #007A99;
  --progress-green: #00BFA5;
  --white: #FFFFFF;
  --border: #E5ECF2;
  --shadow: 0 4px 20px rgba(0,58,78,0.10);
  --shadow-lg: 0 8px 32px rgba(0,58,78,0.15);
  --radius: 18px;
  --radius-sm: 10px;
  --font: 'Nunito Sans', 'Segoe UI', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-dark);
  min-height: 100vh;
  font-size: 15px;
}

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
#app { min-height: 100vh; display: flex; flex-direction: column; }

.painel-wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--bg-page);
  position: relative;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: 240px;
  min-width: 200px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 12px rgba(0,58,78,0.07);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.sidebar-logo {
  padding: 20px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-flag {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-flag svg { width: 100%; height: 100%; }

.logo-text .logo-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--card-dark);
  line-height: 1;
  letter-spacing: 1px;
}

.logo-text .logo-subtitle {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--text-medium);
  letter-spacing: 0.3px;
  line-height: 1.2;
  text-transform: uppercase;
  margin-top: 2px;
}

.logo-divider {
  height: 3px;
  background: linear-gradient(90deg, var(--accent-orange), #FFD700);
  border-radius: 2px;
  margin-top: 10px;
  width: 60px;
}

.sidebar-illustration {
  display: flex;
  justify-content: center;
  padding: 20px 0 10px;
}

.illus-circle {
  width: 100px;
  height: 100px;
  background: #E8F4FA;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-info {
  padding: 8px 0;
  flex: 1;
}

.sidebar-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid #F0F4F8;
}

.sidebar-info-item .info-icon {
  width: 32px;
  height: 32px;
  background: #E8F4FA;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-teal);
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar-info-item .info-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-info-item .info-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: 0.5px;
}

.sidebar-day {
  text-align: center;
  padding: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-teal);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.sidebar-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
}

.sidebar-extra-info {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ============================================================
   CONTEÚDO PRINCIPAL
   ============================================================ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
  min-width: 0;
}

/* ============================================================
   HEADER PRINCIPAL
   ============================================================ */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.main-title-block .status-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-title-block .bar-accent {
  width: 5px;
  height: 36px;
  background: var(--accent-orange);
  border-radius: 3px;
}

.main-title-block .status-title {
  font-size: 30px;
  font-weight: 900;
  color: var(--text-dark);
  letter-spacing: 0.5px;
  line-height: 1;
}

.main-title-block .status-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-medium);
  margin-top: 3px;
  padding-left: 15px;
}

.header-datetime {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card-dark);
  color: white;
  padding: 8px 14px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow);
}

.header-datetime .divider { opacity: 0.3; margin: 0 4px; }
.header-datetime i { font-size: 12px; opacity: 0.8; }
.header-temp { display: flex; align-items: center; gap: 4px; }
.header-temp i { color: #FFD700; }

/* ============================================================
   CARD SALA PRINCIPAL
   ============================================================ */
.sala-card {
  background: linear-gradient(135deg, var(--card-dark) 0%, var(--card-dark-2) 100%);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  min-height: 110px;
}

.sala-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.sala-card-icon {
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sala-card-info { flex: 1; }

.sala-card-info .sala-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sala-card-info .sala-name {
  font-size: 32px;
  font-weight: 900;
  color: white;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-top: 2px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-badge.disponivel {
  background: var(--accent-green);
  color: white;
}

.status-badge.ocupada {
  background: var(--accent-red);
  color: white;
}

.status-badge .dot {
  width: 9px;
  height: 9px;
  background: white;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* Barra de progresso */
.progress-section {
  margin-top: 10px;
}

.progress-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 6px;
}

.progress-bar-wrap {
  background: rgba(255,255,255,0.15);
  border-radius: 50px;
  height: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--progress-green), #4ECDC4);
  border-radius: 50px;
  transition: width 0.5s ease;
}

.progress-bar-text {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  margin-top: 3px;
  text-align: right;
}

/* ============================================================
   CARD PRÓXIMA REUNIÃO
   ============================================================ */
.next-meeting-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
  gap: 0;
}

.next-meeting-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 20px;
  border-right: 1px solid var(--border);
}

.next-meeting-right {
  flex: 1;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nm-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.nm-label i { font-size: 13px; }

.nm-value {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-dark);
  letter-spacing: 0.3px;
}

.nm-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 900;
  color: var(--text-dark);
}

.nm-time i { color: var(--accent-teal); font-size: 16px; }

.nm-when {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Informações da próxima reunião (sala ocupada) */
.next-info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 24px;
  box-shadow: var(--shadow);
}

.next-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.next-info-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.next-info-title i { font-size: 16px; }

.next-info-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-medium);
}

.next-info-cols {
  display: flex;
  gap: 0;
}

.next-info-col {
  flex: 1;
  padding: 0 16px;
  border-right: 1px solid var(--border);
}

.next-info-col:first-child { padding-left: 0; }
.next-info-col:last-child { border-right: none; }

.nic-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nic-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 900;
  color: var(--text-dark);
  margin-top: 2px;
}

.nic-value i { color: var(--accent-teal); font-size: 15px; }

/* ============================================================
   BARRA DE NOTÍCIAS
   ============================================================ */
.news-bar {
  background: var(--card-dark);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.news-icon {
  background: var(--accent-orange);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.news-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-orange);
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.news-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.news-ticker-wrap {
  flex: 1;
  overflow: hidden;
}

.news-ticker {
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ============================================================
   RODAPÉ
   ============================================================ */
.painel-footer {
  text-align: right;
  padding: 6px 20px 12px;
}

.footer-line {
  height: 2px;
  background: var(--accent-orange);
  border-radius: 2px;
  margin-bottom: 4px;
  margin-left: auto;
  width: 200px;
}

.footer-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-medium);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ============================================================
   BOTÃO AGENDAMENTO FLUTUANTE
   ============================================================ */
.fab-schedule {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--accent-teal), var(--card-dark));
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,58,78,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1000;
}

.fab-schedule:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0,58,78,0.4);
}

.fab-schedule-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.fab-tooltip {
  background: var(--card-dark);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.fab-schedule-wrap:hover .fab-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   BOTÃO CONFIGURAÇÕES
   ============================================================ */
.fab-settings {
  position: fixed;
  bottom: 86px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--white);
  color: var(--text-medium);
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: all 0.2s;
  z-index: 1000;
}

.fab-settings:hover {
  background: var(--card-dark);
  color: white;
  border-color: var(--card-dark);
  transform: rotate(45deg);
}

/* ============================================================
   MODAL BASE
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,40,60,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,58,78,0.25);
  transform: translateY(20px);
  transition: transform 0.25s;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  background: linear-gradient(135deg, var(--card-dark), var(--card-dark-2));
  color: white;
  padding: 18px 22px;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover { background: rgba(255,255,255,0.25); }

.modal-body { padding: 22px; }

/* Tabs */
.modal-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
  overflow-x: auto;
}

.modal-tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-medium);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.2s;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
}

.modal-tab.active {
  color: var(--accent-teal);
  border-bottom-color: var(--accent-teal);
}

.modal-tab:hover { color: var(--text-dark); }

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

/* ============================================================
   FORMULÁRIOS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.form-full { grid-column: 1 / -1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-dark);
  transition: border-color 0.2s;
  background: white;
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(0,122,153,0.12);
}

.form-control.error { border-color: var(--accent-red); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 70px; }

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
  text-decoration: none;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-teal), var(--card-dark));
  color: white;
  box-shadow: 0 3px 12px rgba(0,122,153,0.3);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-success {
  background: var(--accent-green);
  color: white;
  box-shadow: 0 3px 12px rgba(0,176,116,0.3);
}
.btn-success:hover { opacity: 0.9; }

.btn-danger {
  background: var(--accent-red);
  color: white;
  box-shadow: 0 3px 12px rgba(255,59,83,0.3);
}
.btn-danger:hover { opacity: 0.9; }

.btn-warning {
  background: var(--accent-orange);
  color: white;
  box-shadow: 0 3px 12px rgba(247,127,0,0.3);
}
.btn-warning:hover { opacity: 0.9; }

.btn-outline {
  background: transparent;
  color: var(--text-medium);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--text-medium); color: var(--text-dark); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: 10px; }

.btn-group {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   LISTA DE AGENDAMENTOS
   ============================================================ */
.meeting-list { display: flex; flex-direction: column; gap: 10px; }

.meeting-item {
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.2s;
  cursor: pointer;
}

.meeting-item:hover {
  border-color: var(--accent-teal);
  box-shadow: 0 2px 12px rgba(0,122,153,0.1);
  background: white;
}

.meeting-item-left {
  min-width: 70px;
  text-align: center;
  background: var(--card-dark);
  color: white;
  border-radius: 8px;
  padding: 8px 6px;
}

.meeting-item-left .mi-day {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.meeting-item-left .mi-month {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.75;
}

.meeting-item-info { flex: 1; min-width: 0; }

.meeting-item-info .mi-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meeting-item-info .mi-sub {
  font-size: 12px;
  color: var(--text-medium);
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meeting-item-info .mi-sub span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mi-status-badge {
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.mi-status-badge.agendada { background: #EDF7FF; color: var(--accent-teal); }
.mi-status-badge.em_andamento { background: #FFF3F5; color: var(--accent-red); }
.mi-status-badge.concluida { background: #EDFBF6; color: var(--accent-green); }
.mi-status-badge.cancelada { background: #F5F5F5; color: #999; text-decoration: line-through; }

.meeting-item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ============================================================
   CALENDÁRIO
   ============================================================ */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar-nav-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
}

.calendar-view-btns {
  display: flex;
  gap: 6px;
}

.view-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn.active {
  background: var(--card-dark);
  color: white;
  border-color: var(--card-dark);
}

/* Calendário Mensal */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-header { font-size: 11px; font-weight: 800; color: var(--text-medium); text-align: center; padding: 6px 0; text-transform: uppercase; }

.cal-day {
  min-height: 70px;
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.cal-day:hover { border-color: var(--accent-teal); background: white; }

.cal-day.other-month { opacity: 0.4; cursor: default; }

.cal-day.today {
  border-color: var(--accent-teal);
  background: rgba(0,122,153,0.06);
}

.cal-day.has-events { background: white; }

.cal-day-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.cal-day.today .cal-day-num {
  color: white;
  background: var(--accent-teal);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.cal-event {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.cal-event.agendada { background: #EDF7FF; color: var(--accent-teal); }
.cal-event.em_andamento { background: #FFF3F5; color: var(--accent-red); }
.cal-event.concluida { background: #EDFBF6; color: var(--accent-green); }

/* Vista Diária */
.day-view { }

.day-hour-row {
  display: flex;
  gap: 0;
  min-height: 48px;
  border-bottom: 1px solid #F0F4F8;
}

.day-hour-label {
  width: 56px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-medium);
  padding-top: 4px;
  text-align: right;
  padding-right: 10px;
}

.day-hour-events {
  flex: 1;
  padding: 2px 4px;
  min-height: 48px;
  cursor: pointer;
  transition: background 0.1s;
}

.day-hour-events:hover { background: rgba(0,122,153,0.04); }

.day-event-block {
  background: linear-gradient(135deg, var(--accent-teal), var(--card-dark));
  color: white;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
  cursor: pointer;
}

/* Vista Semanal */
.week-view {
  overflow-x: auto;
}

.week-header {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  gap: 0;
  border-bottom: 2px solid var(--border);
}

.week-header-day {
  text-align: center;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-medium);
}

.week-header-day.today { color: var(--accent-teal); }

.week-body {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
}

.week-hour-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-medium);
  text-align: right;
  padding-right: 8px;
  padding-top: 4px;
  border-bottom: 1px solid #F0F4F8;
  min-height: 40px;
}

.week-cell {
  border-left: 1px solid #F0F4F8;
  border-bottom: 1px solid #F0F4F8;
  min-height: 40px;
  padding: 2px;
  cursor: pointer;
  transition: background 0.1s;
}

.week-cell:hover { background: rgba(0,122,153,0.04); }

/* ============================================================
   PAINEL ADMINISTRATIVO
   ============================================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--card-dark);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 0;
  flex-shrink: 0;
}

.admin-sidebar-header {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
}

.admin-sidebar-header h3 {
  font-size: 14px;
  font-weight: 800;
  color: white;
  letter-spacing: 0.5px;
}

.admin-sidebar-header p {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.admin-nav { padding: 10px 0; flex: 1; }

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.admin-nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: white;
}

.admin-nav-item.active {
  background: rgba(255,255,255,0.1);
  color: white;
  border-left-color: var(--accent-orange);
}

.admin-nav-item i { width: 18px; text-align: center; font-size: 14px; }

.admin-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: var(--bg-page);
}

.admin-page-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-page-title i { color: var(--accent-teal); }

/* Dashboard Cards */
.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.dash-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
}

.dash-card-icon.blue { background: var(--accent-teal); }
.dash-card-icon.green { background: var(--accent-green); }
.dash-card-icon.red { background: var(--accent-red); }
.dash-card-icon.orange { background: var(--accent-orange); }
.dash-card-icon.dark { background: var(--card-dark); }

.dash-card-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1;
}

.dash-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Assets Grid */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.asset-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asset-preview {
  width: 100%;
  height: 100px;
  background: #F0F4F8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px dashed var(--border);
}

.asset-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.asset-preview .asset-placeholder {
  font-size: 32px;
  color: var(--border);
}

.asset-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dark);
}

.asset-desc {
  font-size: 11px;
  color: var(--text-medium);
}

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

/* Login Admin */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--card-dark), #001E2C);
}

.admin-login-box {
  background: white;
  border-radius: var(--radius);
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.admin-login-logo {
  text-align: center;
  margin-bottom: 24px;
}

.admin-login-logo .login-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--card-dark);
}

.admin-login-logo .login-sub {
  font-size: 12px;
  color: var(--text-medium);
  margin-top: 4px;
}

/* ============================================================
   ALERTAS E NOTIFICAÇÕES
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.alert i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.alert-error { background: #FFF0F2; color: #C92B3E; border: 1px solid #FFD0D6; }
.alert-success { background: #EDFBF4; color: #0A7D4E; border: 1px solid #B2EDD2; }
.alert-info { background: #EDF5FF; color: #0A5FA3; border: 1px solid #B2D3FF; }
.alert-warning { background: #FFF8EC; color: #8B5A00; border: 1px solid #FFE0A0; }

/* Toast */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--card-dark);
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  border-left: 4px solid var(--accent-green);
}

.toast.error { border-left-color: var(--accent-red); }
.toast.warning { border-left-color: var(--accent-orange); }
.toast.info { border-left-color: var(--accent-blue); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(10px); }
}

/* Loader */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,40,60,0.4);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Confirm Dialog */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,40,60,0.5);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-box {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  text-align: center;
}

.confirm-icon {
  font-size: 42px;
  margin-bottom: 14px;
  color: var(--accent-orange);
}

.confirm-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.confirm-message {
  font-size: 14px;
  color: var(--text-medium);
  margin-bottom: 20px;
}

.confirm-buttons { display: flex; gap: 10px; justify-content: center; }

/* ============================================================
   TABELA DE DADOS
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: #F0F4F8;
  color: var(--text-medium);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dark);
  vertical-align: middle;
}

.data-table tr:hover td { background: #F8FAFC; }

.data-table-wrap {
  background: white;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 768px) {
  .painel-wrapper { flex-direction: column; }

  .sidebar {
    width: 100%;
    min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
    gap: 10px;
    min-height: auto;
  }

  .sidebar-logo { padding: 0; border: none; flex: 1; }
  .sidebar-illustration { display: none; }
  .sidebar-info { display: flex; flex-direction: row; flex-wrap: wrap; padding: 0; flex: 2; }
  .sidebar-info-item { padding: 6px 10px; border: none; }
  .sidebar-waves { display: none; }
  .sidebar-day { display: none; }

  .main-content { padding: 12px; gap: 12px; }
  .main-title-block .status-title { font-size: 20px; }
  .header-datetime { font-size: 12px; padding: 6px 10px; }
  .sala-card { padding: 14px; gap: 12px; }
  .sala-card-info .sala-name { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.three { grid-template-columns: 1fr; }

  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .admin-nav { display: flex; overflow-x: auto; padding: 6px; }
  .admin-nav-item { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
  .admin-nav-item.active { border-left-color: transparent; border-bottom-color: var(--accent-orange); }

  .next-meeting-card { flex-direction: column; gap: 12px; }
  .next-meeting-left { border-right: none; padding-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
  .next-meeting-right { padding-left: 0; }

  .next-info-cols { flex-direction: column; gap: 10px; }
  .next-info-col { border-right: none; padding: 0; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
  .next-info-col:last-child { border-bottom: none; }

  .fab-schedule-wrap { bottom: 16px; right: 16px; }
  .fab-settings { bottom: 78px; right: 16px; }

  .modal { max-width: 100%; border-radius: var(--radius) var(--radius) 0 0; max-height: 92vh; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .cal-grid { gap: 2px; }
  .cal-day { min-height: 50px; padding: 3px; }
  .dash-cards { grid-template-columns: repeat(2, 1fr); }
  .assets-grid { grid-template-columns: repeat(2, 1fr); }
  .week-view { font-size: 10px; }
}

@media (max-width: 480px) {
  .header-datetime { display: none; }
  .status-badge { font-size: 11px; padding: 6px 12px; }
  .sala-card-info .sala-name { font-size: 20px; }
  .dash-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .assets-grid { grid-template-columns: 1fr; }
}

/* Sem resultados */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-medium);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state p { font-size: 14px; font-weight: 600; }

/* Separador de seção admin */
.admin-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-section-title i { color: var(--accent-teal); }

/* File input custom */
.file-input-wrap {
  position: relative;
}

.file-input-wrap input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}

.file-input-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: #F0F4F8;
  border: 2px dashed var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.2s;
}

.file-input-wrap:hover .file-input-label {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  background: rgba(0,122,153,0.06);
}
