/* ========================================
   M2 Guardião — Tema Filament Admin
   Identidade: vermelho M2 (#CC0000) + sidebar dark
   ======================================== */

/* ─── Sidebar ───────────────────────────────────────── */
.fi-sidebar,
.fi-sidebar-nav {
    background-color: #111111 !important;
}
.fi-sidebar {
    border-right: 1px solid #2a2a2a !important;
}
.fi-sidebar-header {
    background-color: #0d0d0d !important;
    border-bottom: 1px solid #CC0000 !important;
    padding: 1rem !important;
}

/* Texto e ícones dos itens do menu — branco */
.fi-sidebar-nav,
.fi-sidebar-nav * {
    color: #ffffff !important;
    opacity: 1 !important;
}
.fi-sidebar-nav svg {
    fill: currentColor !important;
    stroke: currentColor !important;
}

.fi-sidebar-item-button {
    border-radius: 6px !important;
    transition: all 0.15s ease !important;
    font-weight: 500 !important;
}
.fi-sidebar-item-button:hover {
    background-color: rgba(204, 0, 0, 0.22) !important;
}

/* Item ATIVO — fundo branco + texto/ícone vermelho M2 */
.fi-sidebar .fi-sidebar-item-button.fi-active,
.fi-sidebar .fi-sidebar-item-button[aria-current],
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-button {
    background-color: #ffffff !important;
    color: #CC0000 !important;
}
.fi-sidebar .fi-sidebar-item-button.fi-active *,
.fi-sidebar .fi-sidebar-item-button[aria-current] *,
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-button * {
    color: #CC0000 !important;
    fill: #CC0000 !important;
    stroke: #CC0000 !important;
}

/* Header do grupo (ex: "CONFIGURAÇÕES") */
.fi-sidebar-group-label,
.fi-sidebar-group-label *,
.fi-sidebar-group-button {
    color: #d0d0d0 !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    opacity: 1 !important;
}

/* Botão de colapsar sidebar */
.fi-sidebar-close-btn {
    color: #ffffff !important;
}

/* Scrollbar da sidebar */
.fi-sidebar::-webkit-scrollbar { width: 4px; }
.fi-sidebar::-webkit-scrollbar-track { background: #1a1a1a; }
.fi-sidebar::-webkit-scrollbar-thumb {
    background: #CC0000;
    border-radius: 4px;
}

/* ─── Topbar ────────────────────────────────────────── */
.fi-topbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
}
.fi-avatar {
    border: 2px solid #CC0000 !important;
}

/* ─── Botões e badges ───────────────────────────────── */
.fi-btn-primary,
button[class*="bg-primary"] {
    background-color: #CC0000 !important;
    border-color: #CC0000 !important;
}
.fi-btn-primary:hover,
button[class*="bg-primary"]:hover {
    background-color: #A30000 !important;
}
.fi-badge-color-primary {
    background-color: rgba(204, 0, 0, 0.1) !important;
    color: #CC0000 !important;
}

/* ─── Cards, formulários, links, tabelas ────────────── */
.fi-wi-stats-overview-stat {
    border-left: 3px solid #CC0000 !important;
}
input:focus,
select:focus,
textarea:focus {
    border-color: #CC0000 !important;
    box-shadow: 0 0 0 1px #CC0000 !important;
}
a.fi-link {
    color: #CC0000 !important;
}
.fi-ta-row:hover {
    background-color: rgba(204, 0, 0, 0.04) !important;
}

/* ─── Background temático com circuitos M2 ──────────── */
/* Aplicado no painel admin (dashboard, resources, etc.) — NÃO se aplica
   ao login custom (.fi-simple-layout) que tem seu próprio gradient. */
body.fi-body {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)),
        url('/images/backgrounds/admin-bg.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
}
.dark body.fi-body {
    background-image:
        linear-gradient(rgba(17, 17, 17, 0.92), rgba(17, 17, 17, 0.92)),
        url('/images/backgrounds/admin-bg.jpg') !important;
}
.dark .fi-section,
.dark .fi-ta-ctn,
.dark .fi-fo-component-ctn {
    background-color: #1a1a1a !important;
}

/* ─── Release notes popup (atualizações do dia) ───────── */
.release-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
    animation: rpFadeIn 0.3s ease;
}
@keyframes rpFadeIn { from { opacity: 0; } to { opacity: 1; } }

.release-popup-card {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: rpSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-top: 4px solid #CC0000;
}
@keyframes rpSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.release-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 0;
}
.release-popup-badge {
    display: inline-block;
    background: linear-gradient(135deg, #CC0000, #aa0000);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(204, 0, 0, 0.3);
}
.release-popup-close {
    background: transparent;
    border: none;
    font-size: 18px;
    color: #888;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background 0.15s ease;
}
.release-popup-close:hover { background: #f3f4f6; color: #111; }

.release-popup-body {
    padding: 16px 28px 22px;
    overflow-y: auto;
}
.release-popup-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.release-popup-date { color: #CC0000; font-weight: 700; }
.release-popup-sep { margin: 0 6px; opacity: 0.5; }
.release-popup-brand { letter-spacing: 1px; }

.release-popup-title {
    font-size: 22px;
    font-weight: 900;
    color: #111;
    line-height: 1.25;
    margin-bottom: 16px;
}

.release-popup-content {
    font-size: 14.5px;
    line-height: 1.7;
    color: #333;
}
.release-popup-content p { margin-bottom: 10px; }
.release-popup-content ul,
.release-popup-content ol { margin: 10px 0 14px 22px; }
.release-popup-content li { margin-bottom: 6px; }
.release-popup-content strong { color: #CC0000; }
.release-popup-content code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: Consolas, monospace;
    font-size: 13px;
    color: #c7254e;
}
.release-popup-content h3 {
    font-size: 15px;
    font-weight: 800;
    color: #111;
    margin-top: 14px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.release-popup-footer {
    padding: 16px 28px 22px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.release-popup-btn {
    background: linear-gradient(135deg, #CC0000, #aa0000);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(204, 0, 0, 0.3);
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.release-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(204, 0, 0, 0.4);
}
.release-popup-btn-secondary {
    background: #fff;
    color: #444;
    border: 1.5px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.release-popup-btn-secondary:hover {
    background: #f4f5f7;
    color: #111;
    border-color: #ccc;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

@media (max-width: 600px) {
    .release-popup-card { max-height: 90vh; }
    .release-popup-title { font-size: 18px; }
    .release-popup-body { padding: 14px 20px 18px; }
    .release-popup-footer { padding: 14px 20px 18px; }
    .release-popup-btn { padding: 11px 20px; font-size: 13px; }
}
