/* --- RESPONSIVIDADE MOBILE --- */
@media (max-width: 768px) {
    .navbar {
        padding: 10px;
        flex-direction: column;
        gap: 10px;
    }

    .navbar-nav {
        width: 100%;
        justify-content: space-around;
        margin-top: 10px;
    }

    .navbar-nav a,
    .navbar-nav span {
        margin-left: 0;
        font-size: 14px;
    }

    .navbar-nav span {
        display: none;
        /* Esconde "Olá, usuário" no mobile para poupar espaço */
    }

    .container {
        padding: 0 10px;
        margin: 15px auto;
    }

    .page-header h1 {
        font-size: 1.5rem;
        text-align: center;
    }

    .page-header div {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .tabs-nav {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        scrollbar-width: none;
    }

    .tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .tab-link {
        padding: 10px 15px;
        font-size: 14px;
    }

    /* Transformar Tabela em Cards no Mobile */
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: var(--card-bg);
        padding: 10px;
    }

    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50% !important;
        text-align: right;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    [data-theme="dark"] td {
        border-bottom-color: #333;
    }

    td:before {
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--secondary-color);
    }

    /* Rótulos dinâmicos para os cards */
    td:nth-of-type(1):before {
        content: "Nome:";
    }

    /* Aba Sistemas */
    .current-tab-sistema td:nth-of-type(2):before {
        content: "Status:";
    }

    .current-tab-sistema td:nth-of-type(3):before {
        content: "Custo:";
    }

    .current-tab-sistema td:nth-of-type(4):before {
        content: "Ações:";
    }

    /* Outras Abas */
    .current-tab-dominio td:nth-of-type(2):before,
    .current-tab-hospedagem td:nth-of-type(2):before {
        content: "Registrar/Servidor:";
    }

    .current-tab-dominio td:nth-of-type(3):before,
    .current-tab-hospedagem td:nth-of-type(3):before {
        content: "Vencimento:";
    }

    .current-tab-dominio td:nth-of-type(4):before,
    .current-tab-hospedagem td:nth-of-type(4):before {
        content: "Condição:";
    }

    .current-tab-dominio td:nth-of-type(5):before,
    .current-tab-hospedagem td:nth-of-type(5):before {
        content: "Custo:";
    }

    .current-tab-dominio td:nth-of-type(6):before,
    .current-tab-hospedagem td:nth-of-type(6):before {
        content: "Ações:";
    }

    td:last-child {
        border-bottom: 0;
        justify-content: center;
        padding-left: 10px !important;
        text-align: center;
    }

    td:last-child:before {
        display: none;
    }

    .row {
        flex-direction: column;
        gap: 0;
    }

    .col {
        width: 100%;
    }
}