/*
 * application.css
 * Este é o arquivo manifesto principal para seus estilos CSS.
 * Todos os seus arquivos CSS e Sass devem ser importados aqui.
 * A ordem dos @imports pode afetar a precedência do CSS.
 */


/* Importe seus estilos base (se houver, como reset, variáveis, etc.) */


/* @import 'reset'; */


/* @import 'variables'; */


/* @import 'base_styles'; */


/* Um arquivo para estilos de corpo, html, etc. */


/* ================================================== */


/* Componentes Compartilhados / Globais */


/* ================================================== */


/* Estilos para botões genéricos (se usados fora da navegação e não definidos em menu_manager) */


/* Mantenha apenas se .btn-funcao ainda for usado ou se .btn tiver estilos base globais aqui. */


/* Se .btn-funcao foi substituído por .btn .btn-primary/.btn-secondary, remova-o. */


/* novo visual */


/* ====== Design tokens ====== */

html, body {
  height: 100%;
}
/* Tema claro (default) */
body {
  /* opcional: dá uma “encolhida” geral */
  zoom: 0.9; /* 90% – funciona bem em Chrome/Edge */
}

:root {
    color-scheme: light;
    --bg: #f6f7fb;
    --panel: #ffffff;
    --panel-2: #ffffff;
    --panel-3: #d0d6df;
    --text: #0f1115;
    --text-1: #0f1115;
    --muted: #5a6270;
    --brand: #6b4bff;
    --brand-2: #00bfa6;
    --danger: #ff5d5d;
    --stroke: #e9eef6;
    --shadow: 0 10px 25px rgba(14, 20, 34, .06);
    --sidebar-width: 88px;
    --sidebar-bg: #0f1320;
    --sidebar-text: #cbd3df;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --top-nav-height: 80px;
    --sub-nav-height: 56px;
}


/* Tema escuro */

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1216;
    --panel: #151a21;
    --panel-2: #1a2029;
    --panel-3: #151a21;
    --text: #e8edf3;
    --text-1: #0f1115;
    --muted: #a6b0bf;
    --brand: #7c5cff;
    --brand-2: #00e0b8;
    --danger: #ff5d5d;
    --stroke: #273043;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .02);
    --sidebar-width: 88px;
    --sidebar-bg: #0b0f1a;
    --sidebar-text: #c1c9d6;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --top-nav-height: 80px;
    --sub-nav-height: 56px;
}

html,
body {
    background-color: var(--panel-2);
    color: var(--text);
}


/* ====== estrutura ====== */

.main-content-grid {
    display: grid;
    gap: 24px;
    margin-top: 0;
    margin-left: 2rem;
}

.card-section {
    background: var(--panel-3);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}


/* ====== header da seção ====== */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.section-title {
    margin: 0;
    font-size: clamp(18px, 2.6vw, 22px);
    font-weight: 700;
    letter-spacing: .2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: "";
    width: 46px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    display: inline-block;
    opacity: .8;
    margin-left: 4px;
}


/* ====== toolbar de filtro ====== */

.filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--stroke);
    border: 1px solid var(--stroke);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.filters-bar label {
    font-size: 13px;
    color: var(--text);
}

.filters-bar select {
    appearance: none;
    background: var(--panel-2);
    border: 1px solid var(--stroke);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 12px;
    outline: none;
    transition: .2s ease;
}

.filters-bar select:focus {
    border-color: color-mix(in srgb, var(--brand) 70%, var(--stroke));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent);
}


/* ====== botões ====== */

.btn {
    --btn-bg: var(--brand);
    --btn-fg: white;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--btn-bg) 92%, #000 8%), var(--btn-bg));
    color: var(--btn-fg);
    font-weight: 600;
    letter-spacing: .2px;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--btn-bg) 40%, transparent);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}

.btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    filter: brightness(.98);
}

.btn-ghost {
    --btn-bg: transparent;
    --btn-fg: var(--text);
    background: transparent;
    border: 1px solid var(--stroke);
    box-shadow: none;
}

.btn-ghost:hover {
    border-color: color-mix(in srgb, var(--brand) 65%, var(--stroke));
}


/* ====== grid de cards ====== */

.cards-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat( auto-fill, minmax(280px, 1fr));
}


/* ====== card ====== */

.menu-card {
    background: linear-gradient(180deg, var(--panel), color-mix(in srgb, var(--panel-2) 85%, #000 15%));
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 16px 12px;
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .25s ease, border-color .22s ease;
    isolation: isolate;
}

.menu-card::before {
    content: "";
    position: absolute;
    inset: auto -40% 60% -40%;
    height: 120px;
    background: radial-gradient(60% 60% at 50% 50%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 70%);
    filter: blur(22px);
    opacity: .6;
    z-index: -1;
    transform: translateY(10px);
}

.menu-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--stroke));
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.menu-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.menu-card small {
    color: var(--muted);
    background: color-mix(in srgb, var(--brand) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--stroke));
    padding: 4px 8px;
    border-radius: 999px;
}

.menu-card-message {
    margin: 10px 0 8px 0;
    color: var(--muted);
    line-height: 1.5;
}


/* opções dentro do card */

.menu-card-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-card-options>div {
    border: 1px dashed color-mix(in srgb, var(--stroke) 85%, #fff 15%);
    background: color-mix(in srgb, var(--panel-2) 75%, transparent);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.menu-card-options strong {
    color: var(--brand-2);
}


/* ações */

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: color-mix(in srgb, var(--panel) 75%, #000 25%);
    color: var(--text);
    cursor: pointer;
    transition: .2s;
}

.btn-icon:hover {
    border-color: color-mix(in srgb, var(--brand) 55%, var(--stroke));
}


/* delete */

.btn-action-delete {
    border-color: color-mix(in srgb, var(--danger) 40%, var(--stroke));
}

.btn-action-delete:hover {
    background: color-mix(in srgb, var(--danger) 24%, transparent);
    border-color: color-mix(in srgb, var(--danger) 70%, var(--stroke));
}


/* ====== lista (tabela) ====== */


/* ===== Tabela Moderna ===== */


/* Envolve a tabela para scroll horizontal suave em telas pequenas */

.table-wrap {
    border: 1px solid var(--stroke);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
    /* borda arredondada no thead */
    overflow-x: auto;
    /* scroll horizontal quando precisar */
    max-width: 100%;
}


/* Base */

.menu-list-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    background: var(--panel);
    color: var(--text);
    table-layout: fixed;
}


/* Cabeçalho “glass” com sticky e separador sutil */

.menu-list-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
    font-size: .78rem;
    color: var(--muted);
    padding: 14px 16px;
    border-bottom: 1px solid var(--stroke);
    backdrop-filter: blur(6px);
}


/* Células */

.menu-list-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--stroke) 85%, transparent);
    vertical-align: middle;
}


/* Primeira e última coluna com respiro extra em telas largas */

@media (min-width: 860px) {
    .menu-list-table th:first-child,
    .menu-list-table td:first-child {
        padding-left: 20px;
    }
    .menu-list-table th:last-child,
    .menu-list-table td:last-child {
        padding-right: 20px;
    }
}


/* Zebra suave + hover com realce de borda */

.menu-list-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--panel-2) 88%, transparent);
}

.menu-list-table tbody tr {
    transition: background .18s ease, box-shadow .18s ease, transform .12s ease;
}

.menu-list-table tbody tr:hover {
    background: color-mix(in srgb, var(--brand) 8%, var(--panel));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 35%, var(--stroke));
}


/* ===== Services table polish ===== */

.svc-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.svc-name i {
    color: var(--brand);
}


/* inline forms dentro da tabela */

.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}


/* inputs compactos */

.input-inline {
    width: 280px;
    max-width: 100%;
    padding: 10px 12px;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--stroke);
    border-radius: 10px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.input-inline:focus {
    border-color: color-mix(in srgb, var(--brand) 60%, var(--stroke));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent);
}


/* badge de código */

.code-pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel-2) 80%, #000 20%);
    border: 1px solid var(--stroke);
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: .85rem;
}

.code-scroll {
    max-width: 320px;
    display: inline-block;
    overflow: auto;
    white-space: nowrap;
}

/* Services: prevent columns from stretching past the container */
.services-table th,
.services-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.services-table {
    table-layout: fixed;
}

.services-table th,
.services-table td {
    padding-top: 16px;
    padding-bottom: 16px;
}

.services-table .cell-token .code-scroll {
    max-width: 100%;
    display: block;
    white-space: normal;
    word-break: break-all;
}

.services-table .input-inline {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

@media (max-width: 1200px) {
    .services-table .input-inline {
        max-width: 240px;
    }
}

/* ===== Services table responsive ===== */
@media (max-width: 900px) {
    .responsive-table thead {
        display: none;
    }

    .responsive-table tbody tr {
        display: grid;
        grid-template-columns: 1fr;
        padding: 12px 14px;
        border-bottom: 1px solid var(--stroke);
    }

    .responsive-table tbody td {
        display: grid;
        grid-template-columns: 130px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 8px 0;
        border-bottom: 1px dashed color-mix(in srgb, var(--stroke) 80%, transparent);
    }

    .responsive-table tbody td:last-child {
        border-bottom: 0;
    }

    .responsive-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--muted);
        font-size: 0.85rem;
    }

    .responsive-table .cell-token {
        align-items: start;
    }

    .responsive-table .cell-token .code-scroll {
        max-width: 100%;
    }

    .responsive-table .table-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-end;
    }
}

@media (max-width: 520px) {
    .responsive-table tbody td {
        grid-template-columns: 100px minmax(0, 1fr);
    }
}


/* status */

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    box-shadow: 0 0 8px rgba(0, 0, 0, .15);
}

.status-dot.ok {
    background: var(--ok);
}

.status-dot.off {
    background: var(--danger);
}

.status-label {
    color: var(--muted);
    font-weight: 600;
    font-size: .9rem;
}


/* botoes compactos */

.btn-sm {
    padding: 8px 12px;
    font-size: .88rem;
    border-radius: 999px;
}

.btn-danger {
    --btn-bg: var(--danger);
    background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 92%, #000 8%), var(--danger));
    color: #fff;
}

.btn-ghost.btn-sm {
    padding: 8px 12px;
    border-radius: 999px;
}


/* toggle switch bonito */

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 26px;
    cursor: pointer;
}

.switch-input {
    position: absolute;
    opacity: 0;
    inset: 0;
}

.switch-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, var(--stroke) 80%, #000 20%);
    border: 1px solid var(--stroke);
    border-radius: 999px;
    transition: background .2s ease, border-color .2s ease;
}

.switch-track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text);
    border: 1px solid var(--stroke);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
    transition: transform .2s ease;
}

.switch-input:checked+.switch-track {
    background: color-mix(in srgb, var(--brand) 45%, var(--panel-2));
    border-color: color-mix(in srgb, var(--brand) 60%, var(--stroke));
}

.switch-input:checked+.switch-track::after {
    transform: translateX(18px);
}


/* token coluna melhor alinhada */

.cell-token {
    white-space: nowrap;
}


/* log “pill” */

.log-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel-2) 85%, transparent);
    border: 1px solid var(--stroke);
    color: var(--muted);
}


/* badges e toques finos para a tabela de sessões */

.table-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--stroke));
    color: var(--text);
    font-weight: 600;
    font-size: .9rem;
}

.table-badge.soft {
    background: color-mix(in srgb, var(--panel-2) 85%, transparent);
    border-color: var(--stroke);
    color: var(--muted);
}

.table-time {
    color: var(--muted);
    font-weight: 600;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.muted {
    color: var(--muted);
}


/* já usa os existentes: .menu-list-table, .roomy, .btn, .btn-sm, .btn-danger, .btn-ghost, .code-pill, .table-wrap */

.inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.code-pill {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    background: var(--panel-2);
}

.code-scroll {
    max-width: 420px;
    display: inline-block;
    overflow: auto;
    white-space: nowrap;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.svc-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.muted {
    color: var(--muted);
}

.menu-list-table.roomy tbody td {
    padding: 16px 14px;
}


/* switch minimalista */

.switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}

.switch-input {
    display: none;
}

.switch-track {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--muted) 25%, transparent);
    border: 1px solid var(--stroke);
    border-radius: 999px;
    transition: .2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: 50%;
    transition: transform .2s ease;
}

.switch-input:checked+.switch-track {
    background: color-mix(in srgb, var(--brand) 60%, transparent);
    border-color: color-mix(in srgb, var(--brand) 60%, var(--stroke));
}

.switch-input:checked+.switch-track::after {
    transform: translateX(20px);
}

.inline-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 280px;
}

.input-inline {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--stroke);
    background: var(--panel-2);
    color: var(--text);
    outline: none;
    min-width: 280px;
}

.input-inline:focus {
    border-color: color-mix(in srgb, var(--brand) 70%, var(--stroke));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}

.form-label {
    font-size: 13px;
    color: var(--muted);
}

.table-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 700;
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand) 26%, var(--stroke));
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.svc-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.muted {
    color: var(--muted);
}

.menu-list-table.roomy tbody td {
    padding: 16px 14px;
}

.btn.btn-sm {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: .92em;
}

.btn-danger {
    --btn-bg: var(--danger);
    background: var(--danger);
    color: #fff;
}


/* Badges dentro da tabela (ex.: grupo) */

.table-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--brand) 80%, #fff);
    background: color-mix(in srgb, var(--brand) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--stroke));
}


/* Coluna de ações: botões em linha, espaçados, responsivos */

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.table-actions .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--stroke);
    background: color-mix(in srgb, var(--panel) 75%, #000 25%);
    color: var(--text);
    transition: transform .12s ease, border-color .2s ease, filter .2s ease;
}

.table-actions .btn-icon:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--brand) 55%, var(--stroke));
}


/* Estados (opcional) */

.tr-success {
    box-shadow: inset 2px 0 0 var(--ok);
}

.tr-warning {
    box-shadow: inset 2px 0 0 var(--warn);
}

.tr-danger {
    box-shadow: inset 2px 0 0 var(--danger);
}


/* Densidades (opcional): adicione .dense ou .roomy na table */

.menu-list-table.dense td {
    padding: 10px 12px;
}

.menu-list-table.roomy td {
    padding: 18px 20px;
}


/* Cantos arredondados na “primeira/última” linha visível */

.menu-list-table tbody tr:first-child td:first-child {
    border-top-left-radius: 12px;
}

.menu-list-table tbody tr:first-child td:last-child {
    border-top-right-radius: 12px;
}

.menu-list-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.menu-list-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}


/* Responsivo: em telas bem estreitas, quebra longos */

@media (max-width: 520px) {
    .menu-list-table {
        font-size: .9rem;
    }
    .menu-list-table td,
    .menu-list-table th {
        white-space: nowrap;
    }
}


/* ====== toggle de visualização ====== */

#toggleViewBtn {
    position: relative;
    padding-left: 42px;
}

#toggleViewBtn::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: linear-gradient(0deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #fff));
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2), 0 3px 10px rgba(124, 92, 255, .35);
}


/* ====== responsividade ====== */

@media (max-width: 680px) {
    .filters-bar {
        padding: 10px 12px;
    }
    .btn {
        padding: 9px 14px;
    }
    .menu-card {
        padding: 14px;
    }
}


/***************************************/

.btn-funcao {
    /* Se este estilo ainda é necessário, mova-o para um arquivo como _buttons.css */
    background-color: #4CAF50;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-funcao:hover {
    background-color: #45a049;
}


/* ================================================== */


/* Estilos de Layout e Particiais */


/* ================================================== */


/* Importe os estilos da navegação superior (o banner fixo) */

@import "top_navigation";

/* Importe os estilos da página de gerenciamento de menus */

@import "menu_manager";

/* Se você tem um arquivo para o formulário de criação/edição de menus: */


/* @import "menu_form"; */


/* ================================================== */


/* Estilos Globais do Body/HTML */


/* ================================================== */

body {
    font-family: 'Inter', sans-serif, Arial;
    /* Adicionado Arial como fallback */
    color: #333;
    margin: 0;
    line-height: 1.6;
    /* IMPORTANTE: Ajuste o padding-top aqui para a altura real do seu banner de navegação. */
    /* Use as ferramentas de desenvolvedor do navegador para medir a altura total do .top-navigation-banner */
    /* Ex: Se a navegação tem 78px de altura, use padding-top: 78px; */
    padding-top: 78px;
    /* Valor ajustado como exemplo. VERIFIQUE NO SEU NAVEGADOR! */
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
    /* Garante que padding e border sejam incluídos na largura/altura */
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    /* Previne scroll horizontal indesejado */
}

html {
    height: 100%;
    box-sizing: border-box;
}


/* Regras para evitar transbordamento de imagens etc. */

img,
video,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}




/* app/assets/stylesheets/_top_navigation.css */

.top-navigation-banner {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);   /* acompanha a sidebar */
  right: 0;
  height: var(--top-nav-height);
  background-color: #2c3e50;
  color: white;
  z-index: 90;
  display: flex;
  align-items: center;
  padding: 0 30px;
  transition: left 0.3s ease;
}

.nav-content-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-logo {
    flex-shrink: 0;
    /* Impede o logo de encolher */
}

.nav-logo .app-logo {
    font-size: 1.8em;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-logo .app-logo:hover {
    color: #a0c4ff;
}

.nav-title-and-actions {
    display: flex;
    flex-grow: 1;
    /* Permite que o título e ações ocupem o espaço restante */
    justify-content: space-between;
    /* Título à esquerda, ações à direita */
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    /* Espaço entre o título e os botões */
}

.nav-title-and-actions .page-title {
    font-size: 1.8em;
    /* Ajusta o tamanho do título aqui para o banner */
    color: white;
    /* Título branco no banner */
    margin: 0;
    /* Remove margem padrão de h1 */
    font-weight: 600;
}

.nav-actions {
    display: flex;
    gap: 10px;
    /* Espaço entre os botões de ação na navegação */
    flex-wrap: wrap;
    justify-content: flex-end;
    /* Alinha à direita */
}


/* Ajustes para botões dentro da navegação (mantidos como antes) */

.btn {
    /* Estilos gerais do botão, defina em outro lugar (ex: application.css) */
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    /* Padding ajustado */
    border: none;
    border-radius: 8px;
    /* Bordas um pouco menores */
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}


/* Media Queries para responsividade da navegação */

@media (max-width: 768px) {
    .top-navigation-banner {
        padding: 15px 20px;
    }
    .nav-content-wrapper {
        flex-direction: column;
        align-items: flex-start;
        /* Alinha itens à esquerda em telas menores */
        gap: 15px;
    }
    .nav-logo,
    .nav-title-and-actions {
        width: 100%;
        /* Ocupa largura total */
        justify-content: center;
        /* Centraliza logo e ações */
        text-align: center;
    }
    .nav-title-and-actions .page-title {
        font-size: 1.5em;
        width: 100%;
        text-align: center;
    }
    .nav-actions {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
        /* Estica os botões */
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
}


/* app/assets/stylesheets/_menu_form.css */

.menu-form-wrapper {
    max-width: 800px;
    /* Largura máxima para o wrapper do formulário */
    margin: 30px auto;
    /* Centraliza o formulário na tela */
    padding: 0 20px;
    /* Adiciona padding lateral para telas pequenas */
    box-sizing: border-box;
}

.menu-create-edit-form {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Espaço entre os grupos de formulário */
}

.form-title {
    font-size: 2em;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
}

.form-errors {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.form-errors h3 {
    color: #721c24;
    margin-top: 0;
    font-size: 1.1em;
}

.form-errors ul {
    list-style-type: disc;
    margin-left: 20px;
    padding: 0;
}

.form-errors li {
    background: none;
    box-shadow: none;
    padding: 5px 0;
    margin-bottom: 0;
    color: #721c24;
}

.form-group {
    margin-bottom: 15px;
    /* Espaçamento entre os grupos */
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    /* Garante que padding e border sejam incluídos na largura */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}


/* Estilos para a Tabela de Opções dentro do Formulário */

.options-table-container {
    overflow-x: auto;
    /* Permite rolagem horizontal da tabela */
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
    border: 1px solid #eee;
    /* Borda ao redor da tabela */
    border-radius: 8px;
}

.form-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Largura mínima para a tabela, força rolagem se menor */
}

.form-table th,
.form-table td {
    padding: 12px;
    border: 1px solid #eee;
    text-align: left;
    white-space: nowrap;
    /* Evita quebra de linha para forçar rolagem */
    vertical-align: middle;
}

.form-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.form-table td .form-input,
.form-table td .form-select {
    margin: 0;
    /* Remove margens extras dentro da tabela */
    padding: 8px 10px;
    /* Padding menor para caber na célula */
    border-radius: 6px;
}

.form-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.add-option-btn {
    width: auto;
    margin-top: 15px;
    padding: 10px 20px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    /* Alinha botões à direita */
    gap: 15px;
    /* Espaço entre os botões */
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}


/* Responsividade para telas muito pequenas */

@media (max-width: 600px) {
    .menu-create-edit-form {
        padding: 20px 15px;
        /* Reduz padding em telas muito pequenas */
        gap: 15px;
    }
    .form-title {
        font-size: 1.8em;
    }
    .form-actions {
        flex-direction: column;
        /* Empilha os botões */
        align-items: stretch;
    }
    .form-actions .btn {
        width: 100%;
        /* Botões ocupam a largura total */
        justify-content: center;
        /* Centraliza o texto */
    }
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
        padding: 0px 1px 1px 12px;
    color: #333;
}

h1,
h2,
h3 {
    color: #2c3e50;
}


/*form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin-bottom: 20px;
}*/

input[type="text"],
textarea,
select {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background: #3498db;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #2980b9;
}

.delete-btn {
    background: #e5ada7;
}

.delete-btn:hover {
    background: #c0392b;
}

.edit-btn {
    position: relative;
    text-decoration: none;
    background: #f1b75a;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    /* margin-left: 5px; */
    height: 28px;
    top: -2px;
    width: 31px;
}

.edit-btn:hover {
    background: #e67e22;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

li:hover {
    background: var(--brand);
}

#jsonOutput {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th,
td {
    padding: 10px;
    text-align: left;
}

.container {
    display: flex;
}

.menus-salvos {
    width: 30%;
    padding: 10px;
}

.cards-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-card {
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
    text-align: center;
}

.menu-title {
    font-size: 1.2em;
    font-weight: bold;
}

.menu-message {
    margin: 10px 0;
}

.menu-actions {
    display: flex;
    gap: 8px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    align-content: center;
}

.menu-form {
    width: -webkit-fill-available;
    height: -webkit-fill-available;
}

.delete-form {
    background: #fff;
    padding: 0px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin-bottom: 20px
}


/* Container para as ações e o status */

.nav-actions-container {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Espaçamento entre o status e os botões */
}


/* Estilo para o container do indicador de status */

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Espaçamento entre o ícone e o texto */
    padding: 6px 12px;
    background-color: #f0f0f0;
    border-radius: 20px;
    font-size: 0.85em;
    color: #333;
}


/* Estilo base para o ícone (a bolinha colorida) */

.status-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}


/* Cores do status */

.status-icon.loading {
    background-color: #cccccc;
    /* Cinza para carregando */
}

.status-icon.connected {
    background-color: #28a745;
    /* Verde para conectado */
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.7);
}

.status-icon.awaiting-qr {
    background-color: #ffc107;
    /* Amarelo/Laranja para aguardando QR Code */
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.7);
}

.status-icon.disconnected {
    background-color: #dc3545;
    /* Vermelho para desconectado */
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.7);
}

.btn-toggle-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    margin-right: 20px;
    transition: transform 0.2s ease;
}

.btn-toggle-sidebar:hover {
    transform: scale(1.1);
}


/* Estrutura do layout geral */

.layout-wrapper {
  min-height: 100vh;
  display: flex;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #111827 0%, var(--sidebar-bg) 100%);
    color: #fff;
    padding: 16px 8px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transition: transform 0.3s ease;
    z-index: 100;
    overflow: auto;
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    text-align: center;
}

.sidebar-logo i {
    font-size: 20px;
}

.sidebar-logo-text span {
    display: block;
    font-size: 12px;
    letter-spacing: 0.6px;
    font-weight: 700;
}

.sidebar-logo-text small {
    display: block;
    font-size: 9px;
    letter-spacing: 0.6px;
    opacity: 0.75;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-menu li {
    width: 100%;
}

.sidebar-menu a,
.sidebar-link {
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: color 0.3s, background 0.2s;
    padding: 10px 6px;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background: transparent;
}

.sidebar-menu a:hover,
.sidebar-link:hover {
    color: #fff;
    background: var(--sidebar-hover);
}

.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sidebar.hidden ~ .main-container {
  margin-left: 0;
margin-right: 0;
    align-items: center;
    left: 0rem !important;
    display: block;
}



.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    top: 0;
    position: relative;
    left: var(--sidebar-width);
    height: -webkit-fill-available;
    margin-right: var(--sidebar-width);
    padding-top: var(--top-nav-height);
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-logo span,
.sidebar.collapsed .sidebar-menu a span {
    display: none;
}

.sidebar-menu a i {
    margin-right: 0;
}

.sub-navigation-bar {
  background-color: #f8f9fa;
  border-bottom: 1px solid #ddd;
  padding: 12px 30px;
  position: fixed;
  top: var(--top-nav-height);     /* logo depois do header */
  left: var(--sidebar-width);
  right: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  transition: left 0.3s ease;
}

.sub-navigation-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
}

.main-content {
  height: -webkit-fill-available;
}

.sidebar-link > * {
  pointer-events: none;
}

.sidebar-icon {
  width: auto;
  min-width: auto;
  text-align: center;
  opacity: 0.9;
  font-size: 18px;
}

.sidebar.hidden ~ .main-container .top-navigation-banner,
.sidebar.hidden ~ .main-container .sub-navigation-bar {
  left: 0;
}
