@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   1. CONFIGURAÇÕES GERAIS E BODY
   ========================================================================== */
body {
    background-color: #0f172a; 
    font-family: 'Inter', sans-serif;
    color: #f1f5f9;
    letter-spacing: -0.2px;
    overflow: hidden; 
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Regras para o Tema Claro Dinâmico */
body.tema-claro {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

.dashboard {
    background: #0f172a; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background 0.3s ease;
}

body.tema-claro .dashboard {
    background: #f1f5f9 !important;
}

#update-me, .update-me-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 35px); 
    width: 100vw;
    padding: 0;
    margin: 0;
    background: #0f172a;
    overflow: hidden;
    transition: background 0.3s ease;
}

body.tema-claro #update-me, 
body.tema-claro .update-me-body {
    background: #f1f5f9 !important;
}

#update-me iframe, #update-me img, .update-me-body img {
    border-radius: 0px !important;
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; 
}

/* ==========================================================================
   2. BARRA DE RODAPÉ PRINCIPAL (TELA DE FUNDO DO DASHBOARD)
   ========================================================================== */
.rodape-principal-fino {
    position: fixed; 
    bottom: 0;
    left: 0;
    background-color: #f15a22 !important; 
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 4px solid #00a896 !important; 
    height: 35px;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.3);
    z-index: 1030;
}

.rodape-principal-fino .texto-esquerda {
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 31px; 
}

.rodape-principal-fino .versao-direita {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 11px;
    font-weight: 400;
    line-height: 31px;
}

/* ==========================================================================
   3. PAINEL DE CONTROLE FLUTUANTE (DIREITA) - GLASSMORPHISM
   ========================================================================== */
.botoes-controle-painel {
    position: fixed;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1050;
    
    background: rgba(30, 41, 59, 0.7) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
    align-items: center;
}

body.tema-claro .botoes-controle-painel {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.botoes-controle-painel::-webkit-scrollbar {
    width: 4px;
}
.botoes-controle-painel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.botoes-controle-painel .btn-info, 
.botoes-controle-painel .btn-danger {
    width: 50px;
    height: 50px;
    border-radius: 16px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0 !important;
}

.botoes-controle-painel .btn-info {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #38bdf8 !important;
}

body.tema-claro .botoes-controle-painel .btn-info {
    background-color: rgba(15, 23, 42, 0.05) !important;
    color: #0284c7 !important;
}

.botoes-controle-painel .btn-info:hover {
    background-color: #38bdf8 !important;
    color: #0f172a !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}

body.tema-claro .botoes-controle-painel .btn-info:hover {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3);
}

.botoes-controle-painel .btn-danger {
    background-color: #ef4444 !important;
    color: white !important;
}

.botoes-controle-painel .btn-danger:hover {
    background-color: #f87171 !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.botoes-controle-painel #continua {
    display: none; 
}

/* ==========================================================================
   4. CONTADOR CIRCULAR DE SEGUNDOS (ESQUERDA)
   ========================================================================== */
.wait_container {
    position: fixed;
    top: 30px;
    left: 20px;
    z-index: 1060;
}

.wait_circle {
    background: rgba(30, 41, 59, 0.7) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-top: 2px solid #f15a22 !important;
    color: #ffffff !important;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

body.tema-claro .wait_circle {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 2px solid rgba(15, 23, 42, 0.1) !important;
    border-top: 2px solid #f15a22 !important;
    color: #0f172a !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

body.modal-open .wait_container,
body.modal-open #contador,
.modal-backdrop.show ~ .wait_container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ==========================================================================
   5. BOTÃO DE SELEÇÃO DE TELA (SUPERIOR DIREITO)
   ========================================================================== */
#botao_tela {
    position: fixed !important;
    top: 20px !important;
    right: 25px !important;
    z-index: 1040;
    left: auto !important;
}

#modal_agravo_botao {
    background: #f15a22 !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px !important;
    box-shadow: 0 10px 20px -5px rgba(241, 90, 34, 0.4) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: white !important;
    text-decoration: none;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important; 
    gap: 10px;
}

#modal_agravo_botao:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 25px -5px rgba(241, 90, 34, 0.6) !important;
    background: #ff6b35 !important;
}

#modal_agravo_botao .glyphicon {
    font-size: 13px;
    margin-top: -1px;
}

/* ==========================================================================
   6. MODAL DIALOG E CONTENT
   ========================================================================== */
.modal-fullscreen-xl.modal-dialog {
    max-width: 96vw !important;
    width: 96vw !important;
    min-width: 96vw !important;
    margin: 3vh auto !important;
}

.modal-fullscreen-xl .modal-content {
    border-radius: 24px !important;
    border: none !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    background-color: #f8fafc !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: 94vh !important;
    min-height: 94vh !important;
    max-height: 94vh !important;
    width: 100% !important;
}

.modal-header-sala {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 20px 40px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-shrink: 0; 
}

.modal-title-sala {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.5px;
}

.modal-body {
    display: flex !important;
    flex-direction: row !important;
    padding: 0 !important;
    overflow: hidden !important; 
    flex-grow: 1 !important; 
    width: 100% !important;
    align-items: stretch !important;
}

.modal-body-scrollable-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 30px 40px !important;
    height: 100%;
    background-color: #f8fafc !important;
}

.modal-body-scrollable-content::-webkit-scrollbar {
    width: 8px;
}
.modal-body-scrollable-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* ==========================================================================
   7. SIDEBAR DE MÓDULOS (ESQUERDA)
   ========================================================================== */
.sidebar-modulos {
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    padding: 24px 16px !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 260px; 
    flex-shrink: 0;
    height: 100%; 
    overflow-y: auto; 
}

.sidebar-modulos::-webkit-scrollbar {
    width: 6px;
}
.sidebar-modulos::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-modulos::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.sidebar-title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
    margin-top: 10px;
    padding-left: 8px;
}

.sidebar-modulos .btn-mod {
    width: 100% !important;
    text-align: left !important;
    padding: 12px 16px !important; 
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important; 
    border: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9 !important; 
    color: #475569 !important;
    cursor: pointer;
}

.sidebar-modulos .btn-mod:hover {
    transform: translateX(4px);
}

/* Cores dos Módulos */
.sidebar-modulos .btn-mod.mod-cevepi.active-mod { background-color: #2baf5d !important; color: white !important; box-shadow: 0 4px 12px rgba(43, 175, 93, 0.2); }
.theme-mod-cevepi .group-title { border-left: 4px solid #2baf5d !important; }
.theme-mod-cevepi .sala-card-btn { border-color: #2baf5d !important; color: #2baf5d !important; }
.theme-mod-cevepi .sala-card-btn:hover { background: #2baf5d !important; color: white !important; box-shadow: 0 10px 15px -3px rgba(43, 175, 93, 0.3); }

.sidebar-modulos .btn-mod.mod-ceinfa.active-mod { background-color: #2f74b5 !important; color: white !important; box-shadow: 0 4px 12px rgba(47, 116, 181, 0.2); }
.theme-mod-ceinfa .group-title { border-left: 4px solid #2f74b5 !important; }
.theme-mod-ceinfa .sala-card-btn { border-color: #2f74b5 !important; color: #2f74b5 !important; }
.theme-mod-ceinfa .sala-card-btn:hover { background: #2f74b5 !important; color: white !important; box-shadow: 0 10px 15px -3px rgba(47, 116, 181, 0.3); }

.sidebar-modulos .btn-mod.mod-ciam.active-mod { background-color: #f15a22 !important; color: white !important; box-shadow: 0 4px 12px rgba(241, 90, 34, 0.2); }
.theme-mod-ciam .group-title { border-left: 4px solid #f15a22 !important; }
.theme-mod-ciam .sala-card-btn { border-color: #f15a22 !important; color: #f15a22 !important; }
.theme-mod-ciam .sala-card-btn:hover { background: #f15a22 !important; color: white !important; box-shadow: 0 10px 15px -3px rgba(241, 90, 34, 0.3); }

.sidebar-modulos .btn-mod.mod-cerest.active-mod { background-color: #4baed4 !important; color: white !important; box-shadow: 0 4px 12px rgba(75, 174, 212, 0.2); }
.theme-mod-cerest .group-title { border-left: 4px solid #4baed4 !important; }
.theme-mod-cerest .sala-card-btn { border-color: #4baed4 !important; color: #4baed4 !important; }
.theme-mod-cerest .sala-card-btn:hover { background: #4baed4 !important; color: white !important; box-shadow: 0 10px 15px -3px rgba(75, 174, 212, 0.3); }

.sidebar-modulos .btn-mod.mod-cevisa.active-mod { background-color: #ce4646 !important; color: white !important; box-shadow: 0 4px 12px rgba(206, 70, 70, 0.2); }
.theme-mod-cevisa .group-title { border-left: 4px solid #ce4646 !important; }
.theme-mod-cevisa .sala-card-btn { border-color: #ce4646 !important; color: #ce4646 !important; }
.theme-mod-cevisa .sala-card-btn:hover { background: #ce4646 !important; color: white !important; box-shadow: 0 10px 15px -3px rgba(206, 70, 70, 0.3); }

.group-title {
    color: #1e293b !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    margin-bottom: 15px;
    padding-left: 10px;
    text-align: left !important;
}

/* ==========================================================================
   8. CARDS DE SELEÇÃO DE SALAS
   ========================================================================== */
.sala-card-btn {
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 16px 20px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: block;
    text-decoration: none !important;
}

.sala-card-btn:hover { 
    transform: translateY(-3px); 
    padding-bottom: 34px !important; 
}

.sala-card-btn small { 
    font-size: 13px !important; 
    font-weight: 700 !important; 
    line-height: 1.4;
    color: inherit !important;
}

.sala-card-btn .texto-atualizado-card {
    font-size: 11px !important; 
    color: #64748b !important;
    font-weight: 500 !important; 
    letter-spacing: 0.2px !important;
    position: absolute !important;
    bottom: 10px !important;
    left: 0 !important;
    width: 100% !important;
    text-align: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.15s ease, visibility 0.15s ease, color 0.15s ease !important;
}

.sala-card-btn:hover .texto-atualizado-card {
    color: #ffffff !important; 
    opacity: 0.95 !important;
    visibility: visible !important;
}

/* ==========================================================================
   9. RODAPÉ DA MODAL
   ========================================================================== */
.modal-footer-laranja-institucional {
    background-color: #f15a22 !important;
    padding: 15px 40px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important; 
    margin-top: auto !important; 
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.modal-footer-laranja-institucional .info-esquerda { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
}

.modal-footer-laranja-institucional .logo-fortaleza { 
    height: 38px; 
    width: auto; 
    filter: brightness(0) invert(1); 
}

.modal-footer-laranja-institucional .texto-rodape { 
    color: #ffffff !important; 
    font-size: 13px; 
    font-weight: 500; 
}

.modal-footer-laranja-institucional .versao-texto { 
    color: rgba(255, 255, 255, 0.8) !important; 
    font-size: 12px; 
    font-weight: 400; 
}

.atualizado-date { 
    display: none; 
}

/* ==========================================================================
   10. CUSTOM SWITCH CYBER-TOGGLE (FIXADO EXATAMENTE ABAIXO DO RELÓGIO)
   ========================================================================== */
.cyber-toggle-wrapper {
  position: fixed;
  top: 62%;
  right: 40px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  z-index: 1060;
  width: 54px;
}

.cyber-toggle-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cyber-toggle {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 28px;
  cursor: pointer;
}

.cyber-toggle-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1e293b;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  opacity: 0.5;
}

body.tema-claro .cyber-toggle-track {
  background: #e2e8f0; 
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cyber-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 50%;
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.tema-claro .cyber-toggle-thumb {
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15);
}

.cyber-toggle-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 6px;
  padding: 0 2px;
}

.cyber-toggle-label-off, 
.cyber-toggle-label-on {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Tamanho e cor padrão dos novos ícones SVG vetorizados */
.cyber-toggle-label-off svg,
.cyber-toggle-label-on svg {
  width: 14px;
  height: 14px;
  stroke: #64748b; 
  transition: stroke 0.3s ease, filter 0.3s ease;
}

/* --- Estados Ativos Modernos (Interações) --- */

/* Modo Claro / Sol Ativo */
.cyber-toggle-checkbox:not(:checked) ~ .cyber-toggle-labels .cyber-toggle-label-off svg {
  stroke: #f59e0b; 
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4));
}

/* Transição do Slider */
.cyber-toggle-checkbox:checked + .cyber-toggle .cyber-toggle-thumb {
  left: calc(100% - 26px);
}

/* Modo Escuro / Lua Ativa */
.cyber-toggle-checkbox:checked ~ .cyber-toggle-labels .cyber-toggle-label-on svg {
  stroke: #38bdf8; 
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.4));
}

/* Efeito Hover Discreto no Slider */
.cyber-toggle:hover .cyber-toggle-thumb {
  transform: scale(1.05);
}

/* Garante o sumiço do Switch ao abrir a modal */
body.modal-open .cyber-toggle-wrapper,
.modal-backdrop.show ~ .cyber-toggle-wrapper {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}