/* style.css - Tema dark blue profissional para Discord Bot Panel */
/* Se o estilo não estiver aparecendo, verifique se o navegador consegue carregar este arquivo via URL direta. */

:root {
    --bg-main: #020617;
    --bg-alt: #020617;
    --bg-glass: rgba(15, 23, 42, 0.96);
    --accent: #4f46e5;
    --accent-soft: rgba(79, 70, 229, 0.18);
    --accent-strong: #6366f1;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-subtle: rgba(148, 163, 184, 0.36);
    --shadow-soft: 0 24px 80px rgba(15, 23, 42, 0.95);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition-fast: 0.18s ease-out;
    --transition-med: 0.28s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at 0 0, #020617 0, #020617 35%, #000 100%);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

.bg-gradient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 10% 0, rgba(59, 130, 246, 0.25), transparent 55%),
        radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.18), transparent 55%),
        radial-gradient(circle at 0 100%, rgba(37, 99, 235, 0.3), transparent 60%);
    opacity: 0.95;
    z-index: -2;
}

.theme-dark::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 0, rgba(15, 23, 42, 0.6), transparent 55%),
        linear-gradient(to bottom right, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.8));
    z-index: -3;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.6rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.4));
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0.4rem;
    gap: 1.2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0, #60a5fa, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.9),
        0 12px 35px rgba(37, 99, 235, 0.8),
        0 0 26px rgba(96, 165, 250, 0.9);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 600;
    font-size: 1.02rem;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero {
    padding: 4rem 0 4rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 3vw + 1rem, 3.2rem);
    margin-bottom: 1.1rem;
}

.hero-content .accent {
    color: var(--accent-strong);
}

.hero-content p {
    color: var(--text-muted);
    max-width: 34rem;
    margin-bottom: 1.65rem;
}

.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 999px;
    padding: 0.5rem 1.2rem;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text-main);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

/* Versão wide para dashboard: ocupa quase toda a largura do card */
.btn-wide {
    width: 100%;
    justify-content: center;
}

.btn-primary {
    background: radial-gradient(circle at 0 0, #60a5fa 0, #2563eb 40%, #1d4ed8 100%);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.8), 0 0 16px rgba(59, 130, 246, 0.7);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(248, 250, 252, 0.18) 40%, transparent 70%);
    transform: translateX(-120%);
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
    transform: translateX(120%);
    transition: transform 0.6s ease-out, opacity 0.2s ease-out;
}

.btn-primary:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.95), 0 0 24px rgba(59, 130, 246, 0.9);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.5);
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(191, 219, 254, 0.9);
}

.btn-outline {
    border-color: rgba(148, 163, 184, 0.55);
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: rgba(191, 219, 254, 0.9);
    background: rgba(15, 23, 42, 0.9);
}

.btn-large {
    padding: 0.85rem 1.9rem;
    font-size: 0.98rem;
}

.discord-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0, #a5b4fc, #6366f1);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.9),
        0 0 12px rgba(129, 140, 248, 0.9);
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.4rem;
}

.badge {
    padding: 0.28rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.7);
    background: radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.5), rgba(15, 23, 42, 0.9));
    font-size: 0.75rem;
    color: #dbeafe;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 0 14px rgba(59, 130, 246, 0.7);
}

.badge-success {
    border-color: rgba(34, 197, 94, 0.75);
    color: #bbf7d0;
}

.hero-card {
    position: relative;
}

.card.glass,
.glass {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.78));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(26px) saturate(140%);
}

.hero-card .card {
    padding: 1.6rem 1.7rem;
}

.hero-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.9rem;
}

.feature-list {
    list-style: none;
    display: grid;
    gap: 0.45rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.dashboard-main {
    padding: 2.2rem 0 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.user-card {
    padding: 1.4rem 1.4rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.user-info h1 {
    font-size: 1.25rem;
}

.user-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.user-note {
    font-size: 0.82rem;
    color: #9ca3af;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    border: 2px solid rgba(96, 165, 250, 0.8);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.7);
}

.user-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.guilds-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==== CARDS DE SERVIDOR - ESTILO PREMIUM ==== */

.guilds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.1rem;
    align-items: stretch;
}

.guild-card {
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out, background 0.18s ease-out;
    min-height: 150px;
}

.guild-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.95);
}

.guild-card-configured {
    border-color: rgba(34, 197, 94, 0.7);
    box-shadow: 0 18px 48px rgba(22, 163, 74, 0.28);
}

.guild-card-configured:hover {
    background: linear-gradient(145deg, rgba(22, 163, 74, 0.16), rgba(15, 23, 42, 0.96));
}

.guild-card-empty {
    border-color: rgba(59, 130, 246, 0.55);
}

.guild-card-empty:hover {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.16), rgba(15, 23, 42, 0.96));
}

.guild-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.35rem;
}

.guild-header-text h3 {
    font-size: 0.98rem;
    margin-bottom: 0.12rem;
    font-weight: 600;
}

.guild-header-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.9;
}

.guild-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

.guild-icon-lg {
    width: 60px;
    height: 60px;
    border-radius: 18px;
}

.guild-header h3 {
    font-size: 1rem;
}

.guild-header p {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.guild-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 0.45rem;
}

.guild-actions .btn-primary,
.guild-actions .btn-secondary {
    width: auto !important;
    min-width: 160px;
    justify-content: center;
    padding: 6px 14px;
    font-size: 13px;
}

/* Botão "Gerenciar bot" (primário) com leve destaque */
.guild-card-configured .btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 10px 30px rgba(22, 163, 74, 0.45);
}

.guild-card-configured .btn-primary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 14px 34px rgba(22, 163, 74, 0.55);
}

/* Botão "Adicionar bot" (secundário) com borda azul e fundo discreto */
.guild-card-empty .btn-secondary {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(59, 130, 246, 0.7);
}

.guild-card-empty .btn-secondary:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(96, 165, 250, 0.9);
}

/* Botão "Voltar para o painel" na tela de config um pouco mais discreto */
.config-section .form-actions .btn-outline {
    font-size: 0.8rem;
    padding: 0.3rem 0.9rem;
}

.guild-actions .badge-success {
    padding: 0.18rem 0.6rem;
    font-size: 0.7rem;
    border-radius: 999px;
    align-self: flex-start;
    margin-top: 0.15rem;
}

.guilds-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}

.guilds-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.empty-state {
    padding: 1.2rem 1.2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.empty-state p+p {
    margin-top: 0.3rem;
}

.guild-header-card {
    padding: 1.1rem 1.2rem;
}

.guild-header-card .guild-header h1 {
    font-size: 1.2rem;
    margin-bottom: 0.15rem;
}

.guild-header-card .guild-header p {
    font-size: 0.85rem;
}

.config-section {
    padding: 1.2rem 1.3rem 1.4rem;
}

/* Agrupar campos visualmente por temas utilizando o grid já existente */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.4rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

label {
    font-weight: 500;
}

input[type="text"],
input[type="number"],
textarea,
select {
    background: rgba(15, 23, 42, 0.95);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.6);
    padding: 0.52rem 0.7rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(96, 165, 250, 0.95);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.7);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

/* Botão principal mais marcante na tela de config */
button.btn-primary.btn-wide {
    font-weight: 600;
}

.save-status {
    margin-top: 0.7rem;
    padding: 0.55rem 0.6rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
}

.save-status.success {
    background: rgba(22, 163, 74, 0.18);
    border: 1px solid rgba(74, 222, 128, 0.6);
    color: #bbf7d0;
}

.save-status.error {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.7);
    color: #fecaca;
}

.site-header,
.hero,
.dashboard-main {
    animation: fade-in 0.4s ease-out;
}

.guild-card,
.user-card,
.config-section,
.guild-header-card,
.empty-state {
    animation: float-up 0.45s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float-up {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.99);
        filter: blur(2px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Status no topo do card de servidor */
.guild-card-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px;
}

.guild-status {
    background: transparent;
    border: none;
    padding: 0;
}

.guild-status-connected,
.guild-status-disconnected {
    background: transparent;
    border: none;
}

/* Bolinha de status bem visível */
.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.status-dot-online {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.8);
}

.status-dot-offline {
    background: #6b7280;
    box-shadow: 0 0 4px rgba(15, 23, 42, 0.9);
}

/* Centralizar botões nos cards da dashboard, sobrescrevendo .btn-wide só nesse contexto */
.guild-card .btn-wide {
    width: auto;
}

.guild-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.guild-actions .btn-primary,
.guild-actions .btn-secondary {
    min-width: 150px;
    justify-content: center;
}

/* ================== MEDIA QUERIES ================== */

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-card {
        order: -1;
    }

    .header-inner {
        padding-inline: 0;
    }
}

@media (max-width: 720px) {
    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .user-info {
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 640px) {
    .guild-card {
        padding: 0.85rem 0.9rem;
    }
}

@media (max-width: 520px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-actions {
        align-self: stretch;
        justify-content: space-between;
    }

    .hero {
        padding-top: 2rem;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
}

/* ====== ESTILOS ESPECÍFICOS DA TELA DE CONFIGURAÇÃO DO BOT (/dashboard/bot/index.php) ====== */

.bot-config-bg {
    min-height: 100vh;
    background:
        radial-gradient(circle at 0 0, rgba(79, 70, 229, 0.35), transparent 55%),
        radial-gradient(circle at 100% 0, rgba(59, 130, 246, 0.32), transparent 55%),
        radial-gradient(circle at 50% 120%, rgba(16, 185, 129, 0.24), transparent 60%),
        #020617;
}

.bot-config-page .dashboard-main {
    padding: 2.4rem 0 3.4rem;
}

/* ====== LAYOUT PRINCIPAL: GRID 3 COLUNAS (SIDEBAR + MIDDLE + CONTENT) ====== */

.bot-config-page .guild-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.4rem;
}

.bot-config-page .guild-card {
    display: grid;
    grid-template-columns: 280px 280px minmax(0, 1.6fr);
    gap: 1.4rem;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    min-height: 0;
    align-items: flex-start;
}

@media (max-width: 1180px) {
    .bot-config-page .guild-card {
        grid-template-columns: 260px minmax(0, 1.5fr);
        grid-template-areas:
            "sidebar content"
            "modules content";
    }

    .bot-config-page .guild-sidebar { grid-area: sidebar; }
    .bot-config-page .modules-shell { grid-area: modules; }
    .bot-config-page .module-content-shell { grid-area: content; }
}

@media (max-width: 900px) {
    .bot-config-page .guild-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "sidebar"
            "modules"
            "content";
        gap: 1.2rem;
    }
}

@media (max-width: 600px) {
    .bot-config-page .guild-shell {
        padding-inline: 1rem;
    }

    .bot-config-page .module-content-card {
        padding: 1.1rem 1.1rem 1.2rem;
        border-radius: 18px;
        min-height: auto;
    }
}

/* Sidebar da guild (coluna 1) */

.bot-config-page .guild-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bot-config-page .glass-card {
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: var(--shadow-soft);
}

.bot-config-page .guild-header-card {
    padding: 1.1rem 1.2rem 1.25rem;
}

.bot-config-page .guild-header-card .guild-header {
    align-items: center;
}

.bot-config-page .guild-header-card .guild-header h1 {
    font-size: 1.05rem;
}

.bot-config-page .guild-header-card .guild-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.bot-config-page .guild-meta {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.bot-config-page .guild-meta span {
    display: flex;
    flex-direction: column;
}

.bot-config-page .guild-meta strong {
    font-size: 0.78rem;
    color: var(--text-main);
}

/* ====== COLUNA DO MEIO: NAVEGAÇÃO DE MÓDULOS EM FORMATO DE LISTA/PILLS ====== */

.bot-config-page .modules-shell {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.bot-config-page .modules-shell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.bot-config-page .modules-shell-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.bot-config-page .modules-shell-card {
    padding: 0.9rem 1rem 1rem;
}

.bot-config-page .modules-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bot-config-page .module-pill {
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.96);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast),
        color var(--transition-fast);
}

.bot-config-page .module-pill-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
}

.bot-config-page .module-pill strong {
    font-weight: 600;
}

.bot-config-page .module-pill small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.bot-config-page .module-pill-status {
    font-size: 0.72rem;
    padding: 0.18rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.9);
}

.bot-config-page .module-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.95);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.96);
}

.bot-config-page .module-pill.active {
    border-color: rgba(79, 70, 229, 0.95);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.96), rgba(37, 99, 235, 0.95));
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.9);
}

.bot-config-page .module-pill.active small {
    color: rgba(226, 232, 240, 0.92);
}

.bot-config-page .module-pill.active .module-pill-status {
    border-color: rgba(167, 243, 208, 0.9);
    background: rgba(16, 185, 129, 0.25);
    color: #bbf7d0;
}

/* ====== COLUNA DE CONTEÚDO: CARD DO MÓDULO ATUAL ====== */

.bot-config-page .module-content-shell {
    position: relative;
}

.bot-config-page .module-content-card {
    border-radius: 20px;
    padding: 1.25rem 1.35rem 1.35rem;
    background:
        radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.6), transparent 55%),
        radial-gradient(circle at 100% 0, rgba(30, 64, 175, 0.4), transparent 55%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.95));
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    min-height: 380px;
}

.bot-config-page .module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.bot-config-page .module-header-main {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.bot-config-page .module-header h2 {
    font-size: 1.1rem;
}

.bot-config-page .module-header p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.bot-config-page .badge-active,
.bot-config-page .badge-inactive {
    font-size: 0.75rem;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.bot-config-page .badge-active {
    background: rgba(22, 163, 74, 0.18);
    border-color: rgba(74, 222, 128, 0.8);
    color: #bbf7d0;
}

.bot-config-page .badge-inactive {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(248, 113, 113, 0.85);
    color: #fecaca;
}

.bot-config-page .module-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.bot-config-page .module-hint {
    opacity: 0.9;
}

/* switch principal do módulo */
.bot-config-page .switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.bot-config-page .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bot-config-page .slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: rgba(15, 23, 42, 0.95);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.9);
    transition: 0.18s ease-out;
}

.bot-config-page .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background-color: #e5e7eb;
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.9);
    transition: 0.18s ease-out;
}

.bot-config-page .switch input:checked + .slider {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.bot-config-page .switch input:checked + .slider:before {
    transform: translateX(18px);
}

.bot-config-page .switch-label {
    font-size: 0.82rem;
    color: var(--text-main);
}

/* ====== FORMULÁRIO DENTRO DO MÓDULO ====== */

.bot-config-page .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.4rem;
}

@media (max-width: 900px) {
    .bot-config-page .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.bot-config-page .form-row label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.bot-config-page .form-row input[type="text"],
.bot-config-page .form-row input[type="number"],
.bot-config-page .form-row textarea,
.bot-config-page .form-row select {
    background: rgba(15, 23, 42, 0.96);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.65);
    padding: 0.55rem 0.75rem;
    color: var(--text-main);
    font-size: 0.85rem;
}

.bot-config-page .form-row input::placeholder,
.bot-config-page .form-row textarea::placeholder {
    color: #6b7280;
}

.bot-config-page .form-row input:focus,
.bot-config-page .form-row textarea:focus,
.bot-config-page .form-row select:focus {
    border-color: rgba(96, 165, 250, 0.95);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.75);
    background: #020617;
}

.bot-config-page .form-help {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.bot-config-page .form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.1rem;
    gap: 0.6rem;
}

.bot-config-page .form-actions .btn-outline {
    font-size: 0.8rem;
    padding: 0.35rem 0.95rem;
}

.bot-config-page .form-actions .btn-primary {
    font-weight: 600;
    padding-inline: 1.6rem;
}

/* ====== RESPONSIVIDADE EXTRA ====== */

@media (max-width: 720px) {
    .bot-config-page .dashboard-main {
        padding-top: 1.6rem;
    }

    .bot-config-page .guild-shell {
        padding-inline: 1.1rem;
    }

    .bot-config-page .modules-shell-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bot-config-page .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .bot-config-page .modules-shell-card,
    .bot-config-page .guild-header-card {
        padding: 0.85rem 0.9rem 0.95rem;
    }

    .bot-config-page .module-header {
        flex-direction: column;
        align-items: flex-start;
    }
}