* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

/* 🔹 Configuração geral do Body com Flexbox */
body {
    display: block;
    /* Changed from flex to block to fix navbar layout */
    min-height: 100vh;
    margin: 0;
    background: #0a0a0f;
    color: #ffffff;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    transition: background-color 0.3s ease-in-out;
}

/* Skeleton util */
.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.field-row {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

/* 🔹 Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    padding: 100px 1.6rem 2rem;
    /* Increased top padding for navbar */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 2px 0 22px rgba(0, 200, 83, 0.18);
    border-right: 2px solid rgba(0, 200, 83, 0.25);
    transition: transform 0.3s ease-in-out;
    transform: translateX(0);
    background: linear-gradient(180deg, #0f121a 0%, #0a0d13 100%);
    z-index: 9000;
    /* High z-index but below navbar (9999) */
    overflow-y: auto;
}

/* 🔹 Sidebar fechada */
.sidebar.closed {
    transform: translateX(-100%);
}

/* 🔹 Área principal */
.main-content {
    flex-grow: 1;
    background: radial-gradient(circle at 20% 20%, rgba(0, 200, 83, 0.08), transparent 50%), #0b0e16;
    color: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 18px;
    overflow-y: auto;
    box-shadow: inset 0 0 24px rgba(0, 200, 83, 0.1);
    transition: margin-left 0.3s ease-in-out;
    margin-left: 280px;
    min-height: 100vh;
}

/* 🔹 Sidebar aberta */
.sidebar:not(.closed)~.main-content {
    margin-left: 280px;
}

/* Botão de abrir/fechar sidebar */
.toggle-sidebar-btn {
    position: absolute;
    width: 50px;
    margin-top: 6%;
    right: -39px;
    /* Ajuste conforme necessário */
    transform: translateY(-50%);
    background-color: #00c853;
    border: none;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 200, 83, 0.5);
    transition: transform 0.3s ease-in-out, right 0.3s ease-in-out;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}

/* No desktop, pode-se exibir apenas o ícone */
@media (min-width: 769px) {
    .toggle-sidebar-btn .btn-text {
        display: none;
    }
}

/* No mobile, exibe o texto para dar mais contexto */
@media (max-width: 768px) {
    .toggle-sidebar-btn {
        top: 15%;
    }

    .toggle-sidebar-btn .btn-text {
        display: inline;
    }
}

/* 🔹 Muda o texto do botão quando a sidebar está aberta */
.sidebar:not(.closed) .toggle-sidebar-btn {
    right: -15px;
    padding: 8px;
    width: 32px;
    text-indent: -9999px;
    /* Esconde o texto "Puxe-me" */
}

/* 🔹 Botão para fechar a sidebar no final */
.close-sidebar-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: #ff4444;
    color: white;
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    margin-top: 1.5rem;
}

.close-sidebar-btn:hover {
    background: #cc0000;
}

/* 🔹 Sidebar fechada */
.sidebar.closed .toggle-sidebar-btn {
    text-indent: 0;
    /* Mostra o texto novamente */
}

/* 🔹 Responsividade */
@media (max-width: 768px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 0;
        padding: 1.4rem 1.2rem;
    }

    .sidebar.closed~.main-content {
        margin-left: 0;
    }

    .sidebar:not(.closed)~.main-content {
        margin-left: 220px;
    }

    .settings-shell {
        max-width: 100%;
        padding: 1.4rem 1.2rem;
        margin: 0;
    }

    .settings-grid {
        gap: 0.8rem;
    }

    .settings-section {
        padding: 1.1rem 1.1rem;
    }
}

.sidebar-header {
    margin-top: 0;
    /* Removed excess margin since sidebar has padding */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar img {
    width: 140px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.04);
    border: 3px solid rgba(0, 200, 83, 0.35);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 0 8px rgba(0, 200, 83, 0.08);
}

.sidebar h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #00c853;
}

.sidebar-subtitle {
    color: #8f95a5;
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

/* 🔹 Menu de navegação com UL e LI */
.menu-sidebar {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 200, 83, 0.35), transparent);
    margin: 1.1rem 0 0.8rem 0;
}


.menu-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

/* 🔹 Links do menu */
.menu-sidebar a {
    display: flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    gap: 0.4rem;
}

/* 🔹 Efeito hover */
.menu-sidebar a:hover {
    background: rgba(0, 200, 83, 0.15);
    transform: translateY(-1px);
}

/* 🔹 Ícones ajustados */
.menu-sidebar i {
    margin-right: 10px;
    font-size: 1.2rem;
    color: #00c853;
}

/* 🔹 Efeito de item selecionado */
.menu-sidebar a.selected {
    background: #00c853 !important;
    color: #000 !important;
    font-weight: bold !important;
}

/* 🔹 Indicador lateral do item ativo */
.menu-sidebar a.selected::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 80%;
    background: #ffffff;
    border-radius: 2px;
}

/* 🔹 Animações */
.sidebar img:hover,
.menu-sidebar a:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* 🔹 Links do menu */
.nav-menu-sidebar a {
    display: flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 6px;
    transition: background 0.2s ease-in-out, transform 0.1s ease;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
}

/* 🔹 Efeito hover melhorado */
.nav-menu-sidebar a:hover {
    background: rgba(0, 200, 83, 0.2);
    transform: translateX(5px);
}

/* 🔹 Ícones ajustados */
.nav-menu-sidebar i {
    margin-right: 10px;
    font-size: 1.2rem;
    color: #00c853;
}

/* 🔹 Efeito de item selecionado */
.nav-menu-sidebar a.selected {
    background: #00c853;
    color: #000;
    font-weight: bold;
}

/* 🔹 Indicador lateral do item ativo */
.nav-menu-sidebar a.selected::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 80%;
    background: #ffffff;
    border-radius: 2px;
}

/* 🔹 Responsividade: ajusta o menu para telas menores */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
        padding: 1rem;
    }

    .nav-menu-sidebar a {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* 🔹 Área principal */
.main-content {
    flex: 1;
    background: #0b0e16;
    color: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 18px;
    overflow-y: auto;
    box-shadow: inset 0 0 24px rgba(0, 200, 83, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.user-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #00c853;
}

.settings-section {
    background: rgba(14, 16, 20, 0.9);
    padding: 1.4rem 1.5rem;
    border-radius: 18px;
    margin-bottom: 20px;
    margin-top: 1rem;
    border: 1px solid rgba(0, 200, 83, 0.16);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.settings-section h3 {
    color: #fff;
    margin-top: 0;
}

.settings-section p {
    color: #b8becc;
    margin: 0.4rem 0 1rem 0;
}

.hint-text {
    color: #8f95a5;
    font-size: 0.85rem;
}

.settings-section input,
.settings-section select,
.settings-section textarea {
    width: 100%;
    background: #0f131b;
    border: 1px solid rgba(0, 200, 83, 0.2);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
}

.settings-section input:focus,
.settings-section select:focus,
.settings-section textarea:focus {
    border-color: rgba(0, 200, 83, 0.45);
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.12);
}

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.settings-section button {
    background: linear-gradient(135deg, #00c853, #00a743);
    color: #000;
    border: none;
    padding: 0.9rem 1.4rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(0, 200, 83, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.settings-section button:hover {
    transform: translateY(-2px);
}

.server-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.channel-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 200, 83, 0.12);
    border: 1px solid rgba(0, 200, 83, 0.28);
    color: #aee6c6;
    font-size: 0.9rem;
}

.channel-chip button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 0.2rem;
}

.settings-shell {
    background: rgba(10, 12, 18, 0.8);
    border: 1px solid rgba(0, 200, 83, 0.18);
    border-radius: 22px;
    padding: 1.8rem 2rem;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
    max-width: 960px;
    margin: 0 auto;
}

.settings-shell.full-width {
    max-width: 100%;
    margin: 0;
}

.section-title {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.2rem;
}

.section-title.compact {
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.section-title h2 {
    margin: 0;
    font-size: 1.6rem;
}

.section-subtitle {
    margin: 0.25rem 0 0;
    color: #a9afbf;
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    background: rgba(0, 200, 83, 0.12);
    border: 1px solid rgba(0, 200, 83, 0.3);
    color: #00c853;
    font-weight: 600;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.removeBtn {
    background: rgba(0, 200, 83, 0.15);
    border: 1px solid rgba(0, 200, 83, 0.3);
    color: #fff;
    padding: 0.35rem 0.6rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.removeBtn:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 200, 83, 0.6);
}

/* Botões utilitários */
.btn-primary {
    background: linear-gradient(135deg, #00c853, #00a743);
    color: #000;
    border: none;
    padding: 0.9rem 1.4rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(0, 200, 83, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-danger {
    background: linear-gradient(135deg, #f05454, #d83a3a);
    color: #fff;
    border: none;
    padding: 0.9rem 1.4rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(208, 58, 58, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-danger:hover {
    transform: translateY(-2px);
}

.btn-danger:active {
    transform: translateY(0);
}

.field-col {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.4rem 0;
    min-height: 44px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(0, 200, 83, 0.12);
    border: 1px solid rgba(0, 200, 83, 0.28);
    color: #aee6c6;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.chip:hover {
    transform: translateY(-1px);
    background: rgba(0, 200, 83, 0.2);
}

.settings-section .color-input {
    width: 130px;
    padding: 0.4rem;
    border-radius: 14px;
    cursor: pointer;
}

.status-message {
    margin-top: 0.8rem;
    font-weight: 600;
    color: #a9afbf;
}

.invite-table {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(0, 200, 83, 0.18);
    background: rgba(5, 7, 12, 0.6);
}

.invite-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.invite-table th,
.invite-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.95rem;
}

.invite-table th {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: #82f5b7;
    background: rgba(0, 200, 83, 0.12);
    border-bottom: 1px solid rgba(0, 200, 83, 0.25);
}

.invite-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.invite-table tbody tr:hover {
    background: rgba(0, 200, 83, 0.08);
}

.invite-table td {
    color: #dfe6ef;
}

.server-channels span {
    display: inline-block;
    background: #1e1e1e;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    margin: 5px;
    border: 1px solid #00c853;
}

.inputColor {
    background-color: #121212;
    width: 100%;
}

/* 🔹 Botões e switches */
.toggle-switch {
    --switch-track-w: 54px;
    --switch-track-h: 30px;
    display: flex;
    align-items: center;
    background: rgba(9, 14, 22, 0.82);
    border: 1px solid rgba(150, 169, 204, 0.24);
    padding: 0.78rem calc(var(--switch-track-w) + 1.25rem) 0.78rem 0.86rem;
    border-radius: 14px;
    margin-top: 10px;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.toggle-switch .toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 0.14rem;
    color: #fff;
}

.toggle-switch strong {
    font-size: 0.94rem;
}

.toggle-switch .hint-text {
    color: rgba(183, 198, 223, 0.86);
}

.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-switch::before {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: var(--switch-track-w);
    height: var(--switch-track-h);
    transform: translateY(-50%);
    border-radius: 999px;
    border: 1px solid rgba(156, 176, 214, 0.34);
    background: rgba(11, 17, 28, 0.92);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.toggle-switch::after {
    content: "";
    position: absolute;
    right: calc(10px + var(--switch-track-w) - 22px - 4px);
    top: 50%;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(214, 225, 244, 0.96);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, background 0.2s ease;
}

.toggle-switch:has(input[type="checkbox"]:checked) {
    border-color: rgba(0, 200, 83, 0.52);
    background: rgba(8, 15, 24, 0.9);
    box-shadow: inset 0 0 0 1px rgba(0, 200, 83, 0.14);
}

.toggle-switch:has(input[type="checkbox"]:checked)::before {
    border-color: rgba(0, 200, 83, 0.62);
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.34), rgba(0, 200, 83, 0.18));
}

.toggle-switch:has(input[type="checkbox"]:checked)::after {
    transform: translate(28px, -50%);
    background: #edfff6;
}

/* 🔹 Animação ao passar o mouse */
.sidebar img:hover,
.nav-menu-sidebar a:hover,
.user-info img:hover,
.server-channels span:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* 🔹 Esconde o topo em telas grandes */
@media (min-width: 769px) {
    .top-bar {
        display: none;
    }
}

/* 🔹 Topo fixo no mobile */
@media (max-width: 768px) {
    .top-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 52px;
        background: #00c853;
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px;
        font-size: 1.2rem;
        font-weight: bold;
        z-index: 1002;
        box-shadow: 0px 4px 10px rgba(0, 200, 83, 0.3);
        transition: transform 0.3s ease-in-out;
    }

    .main-content {
        margin-left: 0;
        padding: 1.4rem 1.2rem;
    }

    .sidebar.closed~.main-content {
        margin-left: 0;
    }

    .sidebar:not(.closed)~.main-content {
        margin-left: 220px;
    }

    .settings-shell {
        max-width: 100%;
        padding: 1.4rem 1.2rem;
        margin: 0;
    }

    .settings-grid {
        gap: 0.8rem;
    }

    .settings-section {
        padding: 1.1rem 1.1rem;
    }

    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-title h2 {
        font-size: 1.35rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
    }

    .pill-badge {
        align-self: flex-start;
    }
}

/* 🔹 Nome do servidor (header) */
#server-header {
    margin: 0;
    font-size: 1.2rem;
    flex-grow: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 🔹 Ajuste do Topo */
.top-bar {
    position: fixed;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Alinha os elementos à esquerda */
    padding: 12px 16px;
    z-index: 1000;
    box-shadow: 0px 4px 10px rgba(0, 200, 83, 0.3);
}

/* Ajustes extras no layout do painel em telas menores */
@media (max-width: 768px) {
    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-title h2 {
        font-size: 1.35rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
    }

    .pill-badge {
        align-self: flex-start;
    }
}

/* Sidebar redesign (2026) */
:root {
    --dashboard-accent: #00d86b;
    --dashboard-accent-soft: rgba(0, 216, 107, 0.2);
    --dashboard-border: rgba(194, 205, 228, 0.14);
    --sidebar-width: 320px;
    --dashboard-nav-offset: 14px;
}

body {
    background: #0a0a0f;
}

.sidebar {
    top: var(--dashboard-nav-offset);
    left: 14px;
    width: min(var(--sidebar-width), calc(100vw - 28px));
    height: calc(100dvh - (var(--dashboard-nav-offset) + 14px));
    border-radius: 24px;
    border: 1px solid var(--dashboard-border);
    background:
        linear-gradient(165deg, rgba(13, 17, 26, 0.96) 0%, rgba(8, 11, 18, 0.97) 58%, rgba(9, 16, 23, 0.98) 100%);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    padding: 1.05rem 0.95rem 0.95rem;
    z-index: 9500;
    transition: transform 0.32s ease, opacity 0.32s ease, box-shadow 0.32s ease;
    opacity: 1;
    align-items: stretch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 216, 107, 0.4) transparent;
}

.sidebar.closed {
    transform: translateX(calc(-100% - 22px));
    opacity: 0.2;
}

.sidebar-header {
    position: relative;
    padding: 0.5rem 0.5rem 0.95rem;
    border-radius: 18px;
    border: 1px solid rgba(0, 216, 107, 0.2);
    background: linear-gradient(145deg, rgba(16, 22, 34, 0.88), rgba(9, 14, 22, 0.9));
    margin-bottom: 0.9rem;
}

.sidebar-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: rgba(199, 213, 238, 0.72);
    font-weight: 700;
}

.server-avatar-wrap {
    width: 122px;
    height: 122px;
    margin: 0.3rem auto 0.8rem;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03));
    padding: 6px;
}

.sidebar img {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 50%;
    border: 2px solid rgba(0, 216, 107, 0.46);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.status-dot {
    position: absolute;
    right: 12px;
    bottom: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #25f0a8;
    border: 2px solid rgba(8, 12, 18, 0.95);
    box-shadow: 0 0 18px rgba(37, 240, 168, 0.8);
}

.sidebar h2 {
    margin: 0;
    color: #eaf0ff;
    font-size: 1.16rem;
    line-height: 1.22;
    max-width: 100%;
    text-align: center;
    word-break: break-word;
}

.sidebar-subtitle {
    margin: 0.3rem 0 0;
    text-align: center;
    font-size: 0.84rem;
    color: rgba(181, 195, 222, 0.82);
}

.sidebar-toggle-btn {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(0, 216, 107, 0.28);
    background: rgba(0, 216, 107, 0.12);
    color: #e7f8ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.sidebar-toggle-btn:hover {
    transform: translateY(-1px);
    background: rgba(0, 216, 107, 0.2);
    border-color: rgba(0, 216, 107, 0.46);
}

.menu-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.menu-sidebar .sidebar-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem 0.7rem;
    border-radius: 14px;
    border: 1px solid transparent;
    color: #e2eaff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.02);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.menu-sidebar .sidebar-link:focus-visible {
    outline: 2px solid rgba(0, 216, 107, 0.55);
    outline-offset: 2px;
    border-color: rgba(0, 216, 107, 0.46);
}

.menu-sidebar .sidebar-link:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 216, 107, 0.3);
    background: rgba(0, 216, 107, 0.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.menu-sidebar .sidebar-link.selected {
    border-color: rgba(0, 216, 107, 0.5) !important;
    background: linear-gradient(125deg, rgba(0, 216, 107, 0.24), rgba(24, 31, 48, 0.85)) !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

.menu-sidebar .sidebar-link.selected .menu-emoji {
    background: rgba(0, 216, 107, 0.3);
    border-color: rgba(0, 216, 107, 0.5);
}

.menu-emoji {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(0, 216, 107, 0.16);
    border: 1px solid rgba(0, 216, 107, 0.26);
    flex-shrink: 0;
}

.menu-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.menu-copy strong {
    font-size: 0.94rem;
    color: #f3f8ff;
}

.menu-copy small {
    font-size: 0.77rem;
    color: rgba(182, 196, 219, 0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.95rem 0.2rem 0.2rem;
}

.sidebar-switch-server {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid rgba(224, 238, 255, 0.2);
    color: rgba(241, 248, 255, 0.92);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.72rem 0.9rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sidebar-switch-server:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 216, 107, 0.45);
    background: rgba(0, 216, 107, 0.1);
}

.main-content {
    margin-top: 88px;
    margin-right: 14px;
    margin-bottom: 22px;
    margin-left: calc(var(--sidebar-width) + 28px);
    width: calc(100% - (var(--sidebar-width) + 42px));
    max-width: calc(100% - (var(--sidebar-width) + 42px));
    min-width: 0;
    min-height: calc(100dvh - 110px);
    background: radial-gradient(circle at 20% 20%, rgba(0, 200, 83, 0.08), transparent 50%), #0b0e16;
    color: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 18px;
    border: none;
    box-shadow: inset 0 0 24px rgba(0, 200, 83, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    overflow-x: clip;
}

.main-content > * {
    max-width: 100%;
    min-width: 0;
}

.sidebar.closed~.main-content {
    margin-left: 14px;
    width: calc(100% - 28px);
    max-width: calc(100% - 28px);
}

.sidebar:not(.closed)~.main-content {
    margin-left: calc(var(--sidebar-width) + 28px);
    width: calc(100% - (var(--sidebar-width) + 42px));
    max-width: calc(100% - (var(--sidebar-width) + 42px));
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 12, 0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 9400;
    opacity: 1;
    transition: opacity 0.26s ease;
}

.sidebar-backdrop[hidden] {
    display: block;
    opacity: 0;
    pointer-events: none;
}

.sidebar-floating-toggle {
    position: fixed;
    left: 16px;
    bottom: 18px;
    border: 1px solid rgba(0, 216, 107, 0.34);
    background: rgba(12, 17, 27, 0.9);
    color: #f4f8ff;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    z-index: 9300;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sidebar-floating-toggle.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.sidebar-floating-toggle:hover {
    border-color: rgba(0, 216, 107, 0.6);
    background: rgba(10, 17, 26, 0.98);
}

.close-sidebar-btn,
.toggle-sidebar-btn {
    display: none !important;
}

@media (max-width: 960px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar {
        top: var(--dashboard-nav-offset);
        left: 10px;
        width: min(300px, calc(100vw - 20px));
        height: calc(100dvh - (var(--dashboard-nav-offset) + 14px));
    }

    .sidebar:not(.closed)~.main-content,
    .sidebar.closed~.main-content,
    .main-content {
        margin-left: 10px;
        margin-right: 10px;
        margin-top: 78px;
        margin-bottom: 16px;
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        min-height: calc(100dvh - 94px);
        padding: 1.2rem 1rem;
    }

    .menu-copy small {
        white-space: normal;
        line-height: 1.25;
    }

    .sidebar-floating-toggle {
        top: 84px;
        left: 12px;
        bottom: auto;
        padding: 0.5rem 0.9rem;
        font-size: 0.88rem;
        border-radius: 12px;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34);
    }

    .sidebar-floating-toggle.is-visible {
        animation: menuHintPulse 1.8s ease-in-out infinite;
    }
}

@media (min-width: 961px) {
    .sidebar,
    .sidebar.closed {
        transform: translateX(0) !important;
        opacity: 1 !important;
    }

    .sidebar-toggle-btn,
    .sidebar-backdrop,
    .sidebar-floating-toggle {
        display: none !important;
    }

    .main-content,
    .sidebar.closed~.main-content,
    .sidebar:not(.closed)~.main-content {
        margin-left: calc(var(--sidebar-width) + 28px) !important;
        width: calc(100% - (var(--sidebar-width) + 42px)) !important;
        max-width: calc(100% - (var(--sidebar-width) + 42px)) !important;
    }
}

@keyframes menuHintPulse {
    0%,
    100% {
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34), 0 0 0 0 rgba(0, 216, 107, 0.24);
    }

    50% {
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34), 0 0 0 8px rgba(0, 216, 107, 0.06);
    }
}

/* Neutraliza regras antigas que causavam efeito colateral no novo layout */
.sidebar img:hover {
    transform: none;
}

.menu-sidebar a:hover {
    transform: none;
}

.menu-sidebar .sidebar-link:hover {
    transform: translateY(-1px);
}

.dashboard-login-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.1rem;
    background: rgba(4, 8, 14, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dashboard-login-overlay[hidden] {
    display: none;
}

.dashboard-login-card {
    width: min(540px, 100%);
    background: linear-gradient(160deg, rgba(18, 24, 34, 0.98), rgba(10, 14, 22, 0.98));
    border: 1px solid rgba(0, 216, 107, 0.34);
    border-radius: 16px;
    padding: 1.6rem 1.4rem;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
    text-align: center;
}

.dashboard-login-icon {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.dashboard-login-card h2 {
    margin: 0;
    color: #eaf4ff;
    font-size: 1.4rem;
}

.dashboard-login-card p {
    margin: 0.75rem 0 1.25rem;
    color: #b9c6d6;
}

.dashboard-login-card button {
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.05rem;
    background: linear-gradient(135deg, #00d86b, #00ac55);
    color: #05230f;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(0, 216, 107, 0.28);
}

.dashboard-login-card button:hover {
    filter: brightness(1.03);
}
