/**
 * app.css - Estilos Globais do Sistema SGU
 */

:root {
    --primary: #2D7D46;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --secondary: #607D8B;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --dark: #343a40;
    --transition: all 0.3s ease;
    --radius: 0.6rem;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);

    /* Dark Mode */
    --dark-mode-bg: #121212;
    --dark-mode-card: #1e1e1e;
    --dark-mode-text: #e0e0e0;
    --dark-mode-border: #333;
}

/* Estrutura Base */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7f6;
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

/* Wrapper Centralizador */
.content-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-container {
    flex: 1;
    padding: 30px 0;
}

/* Top Bar */
.top-bar {
    background-color: var(--primary-dark);
    color: white;
    padding: 6px 0;
    font-size: 0.85rem;
}

.a11y-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.a11y-btn-sm {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    margin-right: 4px;
    transition: var(--transition);
}

.a11y-btn-sm:hover { background: rgba(255,255,255,0.2); }

/* Header */
.main-header {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-200);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-container img { max-height: 90px; }
.title-container h2 { color: var(--primary); font-weight: 700; margin: 0; font-size: 1.5rem; }

/* Navbar */
.navbar-custom {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 0;
}

.navbar-custom .nav-link {
    color: rgba(255,255,255,0.9) !important;
    padding: 15px 20px !important;
    font-weight: 500;
    transition: var(--transition);
}

.navbar-custom .nav-link:hover, .navbar-custom .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white !important;
}

/* Cards de Ação (Index) */
.card-action {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
    height: 100%;
}

.card-action:hover { transform: translateY(-5px); }

.card-action .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px;
}

/* Rodapé Verde (Solicitado) */
footer.sgu-footer {
    background: linear-gradient(135deg, #2D7D46 0%, #1B5E20 100%);
    color: #ffffff;
    padding: 40px 0 20px;
    margin-top: auto;
}

footer.sgu-footer h6 { color: #ffffff; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; }
footer.sgu-footer p, footer.sgu-footer .small, footer.sgu-footer i { color: rgba(255,255,255,0.85); }

.sgu-footer-link {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px border transparent;
}

.sgu-footer-link:hover { color: #dff5e4; border-bottom: 1px solid #dff5e4; }

.sgu-footer-hr { border-color: rgba(255,255,255,0.15); margin: 25px 0; }

/* Dark Mode Classes */
body.dark-mode { background-color: var(--dark-mode-bg); color: var(--dark-mode-text); }
body.dark-mode .main-header, body.dark-mode .card { background-color: var(--dark-mode-card); border-color: var(--dark-mode-border); }
body.dark-mode .title-container h2 { color: var(--primary-light); }

/* Responsividade */
@media (max-width: 768px) {
    .header-container { flex-direction: column; text-align: center; }
    .title-container h2 { font-size: 1.2rem; }
    .navbar-custom .nav-link { padding: 10px 15px !important; }
}

/* Perfil do usuário no topo */
.user-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.profile-dropdown {
    display: flex;
    align-items: center;
}

.user-profile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 320px;
    color: #ffffff !important;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1;
}

.user-profile:hover,
.user-profile:focus,
.user-profile:active {
    color: #ffffff !important;
    text-decoration: none !important;
}

.user-profile.dropdown-toggle::after {
    display: none !important;
}

.user-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.user-name-wrap {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 220px;
}

.user-name-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.2;
}

.user-name-text strong {
    color: #ffffff;
    font-weight: 600;
}

.user-chevron {
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
}

.profile-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.profile-menu .dropdown-item {
    font-size: 0.95rem;
    padding: 10px 14px;
}

.profile-menu .dropdown-item i {
    margin-right: 8px;
}

@media (max-width: 768px) {
    .a11y-top-bar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .a11y-tools {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .user-info {
        justify-content: center;
    }

    .user-profile {
        max-width: 260px;
    }
}