html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
}


:root {
    --cor-fundo: #f7f6fa;
    --cor-card: #ffffff;
    --cor-sidebar: #fff081;
    --cor-hover: #ffd966;
    --cor-primaria: #ffeb3b;
    --cor-texto: #2d2a32;
    --cor-texto-escuro: #333333;
}


.layout-wrapper {
    display: flex;
    min-height: 100vh;
}


.sidebar {
    background: var(--cor-sidebar);
    color: var(--cor-texto-escuro);
    width: 260px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

    .sidebar.collapsed {
        width: 70px;
    }

        .sidebar.collapsed .menu a span {
            display: none;
        }

        .sidebar.collapsed .menu i {
            margin-right: 0;
            text-align: center;
            width: 100%;
            font-size: 20px;
        }

        .sidebar.collapsed .sidebar-header img {
            display: none;
        }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

    .sidebar-header img {
        height: 75px;
        transition: all 0.3s ease;
    }

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--cor-texto-escuro);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

    .toggle-btn:hover {
        opacity: 0.7;
    }


.menu {
    flex-grow: 1;
    padding: 20px 0;
}

    .menu a {
        display: flex;
        align-items: center;
        color: var(--cor-texto-escuro);
        padding: 12px 20px;
        text-decoration: none;
        transition: background 0.3s, color 0.3s;
        font-weight: 500;
    }

        .menu a:hover {
            background-color: var(--cor-hover);
            color: #000;
        }

    .menu i {
        margin-right: 10px;
        font-size: 18px;
        width: 22px;
        text-align: center;
    }


.nav-item {
    list-style: none;
}

    .nav-item.dropdown {
        position: relative;
    }

        .nav-item.dropdown .nav-link {
            display: flex;
            align-items: center;
            justify-content: space-between;
            color: var(--cor-texto-escuro);
            padding: 12px 20px;
            text-decoration: none;
            transition: background 0.3s;
            cursor: pointer;
            font-weight: 500;
        }

            .nav-item.dropdown .nav-link:hover {
                background-color: var(--cor-hover);
            }

/* Dropdown menu desktop */
@media (min-width: 993px) {
    .nav-item.dropdown .dropdown-menu {
        position: absolute;
        top: 0;
        left: 100%;
        margin-left: 5px;
        background-color: var(--cor-sidebar);
        border: 2px solid rgba(0, 0, 0, 0.1);
        border-radius: 6px;
        padding: 0.5rem 0;
        opacity: 0;
        visibility: hidden;
        transform: translateX(10px);
        transition: all 0.25s ease;
        min-width: 230px;
    }

    .nav-item.dropdown.show > .dropdown-menu,
    .nav-item.dropdown:hover > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    .dropdown-menu .dropdown-item {
        color: var(--cor-texto-escuro);
        padding: 10px 18px;
        transition: background 0.2s;
        background-color: transparent;
    }

        .dropdown-menu .dropdown-item:hover {
            background-color: var(--cor-hover);
        }
}

/* Dropdown menu mobile */
@media (max-width: 992px) {
    .nav-item.dropdown .dropdown-menu {
        position: static;
        display: none;
        background-color: rgba(0, 0, 0, 0.05);
        border: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 10px;
    }

    .nav-item.dropdown.show .dropdown-menu {
        display: block;
    }

    .dropdown-item {
        padding-left: 35px;
        color: var(--cor-texto-escuro);
    }

        .dropdown-item:hover {
            background-color: var(--cor-hover);
        }
}

.dropdown-item i {
    margin-right: 8px;
}

.sidebar.collapsed .dropdown-menu {
    left: 70px;
}


.main-content {
    flex-grow: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.collapsed + .main-content {
    margin-left: 70px;
}

.topbar {
    background: var(--cor-sidebar);
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-right {
    display: flex;
    align-items: center;
}


.content {
    flex-grow: 1;
    padding: 1.5rem;
    background-color: var(--cor-fundo);
}


.footer {
    text-align: center;
    padding: 15px;
    font-size: 14px;
    color: #555;
    background: var(--cor-sidebar);
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.5;
}

    .footer p {
        margin: 5px 0;
    }


.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #ffeb3b;
}


@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
    }

        .sidebar .menu a span {
            display: none;
        }

        .sidebar .menu i {
            width: 100%;
            margin-right: 0;
            text-align: center;
            font-size: 20px;
        }

    .sidebar-header img {
        display: none;
    }

    .main-content {
        margin-left: 70px !important;
    }
}


@media (max-width: 576px) {
    .sidebar {
        position: fixed;
        z-index: 2000;
        width: 260px;
        left: -260px;
        top: 0;
        height: 100vh;
        transition: all 0.3s ease;
    }

        .sidebar.show {
            left: 0;
        }

    .main-content {
        margin-left: 0 !important;
    }

    .toggle-btn {
        display: block;
        position: fixed;
        left: 15px;
        top: 15px;
        z-index: 2001;
        background: var(--cor-sidebar);
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .sidebar.show ~ .toggle-btn {
        left: 275px;
    }

    .topbar {
        padding-left: 60px;
    }

    .content {
        padding: 1rem;
    }

    /* Overlay para mobile */
    .sidebar.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: 260px;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}


select.form-control {
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ffd966;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #ffeb3b;
    }

.ad-inpage-container {
    margin: 16px 0;
    text-align: center;
    min-height: 50px;
}

@media (max-width: 768px) {
    .ad-inpage-container {
        margin: 12px 0;
    }
}

.container-loterias {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.titulo-pagina {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.descricao-pagina {
    text-align: center;
    color: #555;
    margin-bottom: 30px;
}

/* GRID RESPONSIVO */
.grid-loterias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* CARD */
.card-loteria {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .card-loteria:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    }

    .card-loteria img {
        max-width: 220px;
        height: auto;
        margin-bottom: 10px;
    }

    .card-loteria span {
        display: block;
        font-weight: 600;
        font-size: 1.1rem;
    }
.voltar-btn {
    min-width: 140px;
    max-width: 200px;
}
