/* ========================================
   TEXAS LEGACIES
   CORREÇÃO DE LAYOUT — NAVEGAÇÕES
   2026-09-12

   Escopo:
   - Menu interno do Admin
   - "Escolha seu destino" do Dashboard no iPad/tablet

   Nenhuma lógica JS é alterada.
======================================== */


/* ========================================
   ADMIN — DESKTOP
   14 itens = 7 + 7
======================================== */

@media (min-width: 1181px) {

    .admin-panel-navigation {
        grid-template-columns:
            repeat(7, minmax(0, 1fr));
    }


    .admin-panel-tab {
        min-width:
            0;

        min-height:
            86px;

        padding:
            18px 20px;

        border-right:
            1px solid
            rgba(223, 192, 155, .16);

        border-bottom:
            1px solid
            rgba(223, 192, 155, .16);
    }


    .admin-panel-tab:nth-child(7),
    .admin-panel-tab:nth-child(14) {
        border-right:
            0;
    }


    .admin-panel-tab:nth-child(n + 8):nth-child(-n + 14) {
        border-bottom:
            0;
    }

}


/* ========================================
   ADMIN — TABLET
   Evita colisão com regras antigas de 5 colunas.
======================================== */

@media (min-width: 681px) and (max-width: 1180px) {

    .admin-panel-navigation {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }


    .admin-panel-tab {
        min-width:
            0;

        border-right:
            1px solid
            rgba(223, 192, 155, .16);

        border-bottom:
            1px solid
            rgba(223, 192, 155, .16);
    }


    .admin-panel-tab:nth-child(4n) {
        border-right:
            0;
    }

}


/* ========================================
   ADMIN — MOBILE
======================================== */

@media (max-width: 680px) {

    .admin-panel-navigation {
        grid-template-columns:
            1fr;
    }


    .admin-panel-tab {
        border-right:
            0;

        border-bottom:
            1px solid
            rgba(223, 192, 155, .16);
    }


    .admin-panel-tab:last-child {
        border-bottom:
            0;
    }

}


/* ========================================
   DASHBOARD — IPAD / TABLET
   13 sistemas distribuídos em 4 + 5 + 4.

   Corrige a regra antiga, criada quando
   existiam somente 9 itens.
======================================== */

@media (min-width: 651px) and (max-width: 1120px) {

    .dashboard-system-navigation-buttons {
        display:
            grid;

        grid-template-columns:
            repeat(20, minmax(0, 1fr));
    }


    .dashboard-system-tab {
        min-width:
            0;

        grid-column:
            auto;

        border-right:
            1px solid
            rgba(241, 221, 194, .13);

        border-bottom:
            1px solid
            rgba(241, 221, 194, .13);
    }


    /* LINHA 1 — 4 itens */
    .dashboard-system-tab:nth-child(1),
    .dashboard-system-tab:nth-child(2),
    .dashboard-system-tab:nth-child(3),
    .dashboard-system-tab:nth-child(4) {
        grid-column:
            span 5;
    }


    /* LINHA 2 — 5 itens */
    .dashboard-system-tab:nth-child(5),
    .dashboard-system-tab:nth-child(6),
    .dashboard-system-tab:nth-child(7),
    .dashboard-system-tab:nth-child(8),
    .dashboard-system-tab:nth-child(9) {
        grid-column:
            span 4;
    }


    /* LINHA 3 — 4 itens */
    .dashboard-system-tab:nth-child(10),
    .dashboard-system-tab:nth-child(11),
    .dashboard-system-tab:nth-child(12),
    .dashboard-system-tab:nth-child(13) {
        grid-column:
            span 5;

        border-bottom:
            0;
    }


    .dashboard-system-tab:nth-child(4),
    .dashboard-system-tab:nth-child(9),
    .dashboard-system-tab:nth-child(13) {
        border-right:
            0;
    }

}
