/*:root {
    --background: #ffffff;
    --foreground: #1f2937;
    --muted: #f3f4f6;
    --muted-foreground: #6b7280;
    --card: #ffffff;
    --card-foreground: #1f2937;
    --border: #e5e7eb;
    --primary: #10b981;
    --primary-foreground: #ffffff;
    --secondary: #f3f4f6;
    --secondary-foreground: #1f2937;
    --accent: #f3f4f6;
    --accent-foreground: #1f2937;
}*/

:root {
        /* Paleta oficial do sistema — usar somente estas cores */
        --background: #F7FAF7;
        --foreground: #173C2A;
        --muted: #F7FAF7;
        --muted-foreground: #607D6B;
        --card: #FFFFFF;
        --card-foreground: #173C2A;
        --border: #DDE5DF;
        --primary: #1B5E20;
        --primary-foreground: #FFFFFF;
        --secondary: #2E7D32;
        --secondary-foreground: #FFFFFF;
        --accent: rgba(27, 94, 32, 0.08);
        --accent-foreground: #1B5E20;
    }

    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    html {
        overflow-x: hidden;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        background-color: var(--background);
        color: var(--foreground);
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }
    
    .app-container {
        display: flex;
        min-height: 100vh;
    }
    
    .sidebar {
        width: 250px;
        background-color: var(--card);
        border-right: 1px solid var(--border);
        display: flex;
        flex-direction: column;
    }
    
    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }
    
    #theme-toggle {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--foreground);
    }
    
    .icon-sun, .icon-moon {
        width: 1.2rem;
        height: 1.2rem;
    }
    
    .dark .icon-sun {
        display: none;
    }
    
    .icon-moon {
        display: none;
    }
    
    .dark .icon-moon {
        display: inline;
    }
    
    nav ul {
        list-style-type: none;
        padding: 1rem;
    }
    
    nav ul li {
        margin-bottom: 0.5rem;
    }
    
    nav ul li a {
        display: flex;
        align-items: center;
        color: var(--foreground);
        text-decoration: none;
        padding: 0.5rem;
        border-radius: 0.25rem;
    }
    
    nav ul li a:hover {
        background-color: var(--accent);
    }
    
    nav ul li a i {
        margin-right: 0.5rem;
    }
    
    main {
        flex-grow: 1;
        padding: 2rem;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .intro {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        color: var(--muted-foreground);
    }
    
    .category-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .category-card {
        background-color: var(--card);
        border: 1px solid var(--border);
        border-radius: 0.5rem;
        padding: 1.5rem;
        box-shadow: 0 1px 12px rgba(23, 60, 42, 0.05);
        transition: box-shadow 0.3s ease;
    }
    
    .category-card:hover {
        box-shadow: 0 4px 16px rgba(23, 60, 42, 0.1);
    }
    
    .category-card i {
        font-size: 2rem;
        color: var(--primary);
        margin-bottom: 1rem;
    }
    
    .category-card h2 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .category-card p {
        color: var(--muted-foreground);
    }
    
    @media (max-width: 1024px) {
        .category-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    
    @media (max-width: 768px) {
        .app-container {
            flex-direction: column;
        }
    
        .sidebar {
            width: 100%;
            border-right: none;
            border-bottom: 1px solid var(--border);
            position: relative;
        }
    
        .sidebar-header {
            padding: 0.75rem;
        }
    
        .logo {
            position: relative;
            top: 0;
            left: 0;
            width: 120px;
        }
    
        nav ul {
            display: flex;
            flex-wrap: wrap;
            padding: 0.5rem;
            gap: 0.25rem;
        }
    
        nav ul li {
            margin-right: 0;
            margin-bottom: 0;
            flex: 1 1 calc(50% - 0.25rem);
            min-width: 140px;
        }
    
        nav ul li a {
            padding: 0.5rem 0.75rem;
            font-size: 0.875rem;
            justify-content: center;
        }
    
        .submenu {
            position: absolute;
            left: 0;
            right: 0;
            background: var(--card);
            z-index: 100;
            border-top: 1px solid var(--border);
            flex-basis: 100%;
        }
    
        .submenu li {
            flex: 1 1 100%;
        }
    
        main {
            padding: 1rem;
        }
    
        h1 {
            font-size: 1.5rem;
        }
    
        .intro {
            font-size: 1rem;
        }
    
        .category-grid {
            grid-template-columns: 1fr;
            gap: 1rem;
        }
    
        .category-card {
            padding: 1rem;
        }
    
        .category-card h2 {
            font-size: 1.1rem;
        }
    }
    
    @media (max-width: 480px) {
        nav ul li {
            flex: 1 1 100%;
        }
    
        .sidebar-header {
            text-align: center;
        }
    
        .logo {
            width: 100px;
            margin: 0 auto;
        }
    
        main {
            padding: 0.75rem;
        }
    
        h1 {
            font-size: 1.25rem;
        }
    }
    
    /* Logo: sem posicionamento absoluto/offsets negativos, para não cortar a imagem */
    .logo {
        display: block;
        position: static;
        width: 100%;
        max-width: 176px;
        height: auto;
        margin: 0 auto;
    }
    
    .styled-button {
        width: 100%;
        padding: 12px 20px;
        background-color: #2E7D32;
        color: #FFFFFF;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 16px;
        font-weight: bold;
        transition: all 0.3s ease;
        margin-top: 10px;
    }
    
    .styled-button:hover {
        background-color: #388E3C;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(23, 60, 42, 0.15);
    }
    
    .styled-button:active {
        transform: translateY(0);
        box-shadow: none;
    }
    