/* === GabiBot Soft Minimalism Titles/Subtitles === */
h1, h2, h3, .section-title, .features-title, .modal-title-wrapper h2, .stat-info h3, .settings-section h2, .setting-header > div h3 {
    color: #8b6655 !important;
}
.welcome p,
.setting-header > div p,
.gentle-subtitle {
    color: rgba(139, 102, 85, 0.7) !important;
}
/* Botão Remover Grupo - Modal */
.btn-remove-group {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    color: #ffffff;
    padding: 0;
    border-radius: 10px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin: 24px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: none;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 52px;
}
.btn-remove-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.3);
}
.group-modal-content .btn-remove-group {
    margin-top: 24px;
    margin-bottom: 0;
}
.group-modal-content #remove-group-feedback {
    margin-top: 8px;
    text-align: center;
}
/* ============================================================
   GABIBOT DASHBOARD v2.0 - ESTILOS
   ============================================================ */

/* Custom Fonts */
@font-face {
    font-family: 'Vegan Style';
    src: url('/font/vegan_style_font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vintage Brush';
    src: url('/font/vintage_brush.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* === PALETA DE CORES PRINCIPAL === */
    /* Brown Palette - Design System v2.0 */
    --color-brown-light: #c6a69b;
    --color-brown-dark: #a07c71;
    --color-brown-accent: #8b6655;
    --color-brown-muted: #d4a8a0;
    --brown-gradient: linear-gradient(135deg, #a07c71, #c6a69b);
    
    /* Neutras */
    --color-white: #ffffff;
    --color-bg-light: #faf9f6;
    --color-bg-soft: #f8f9fa;
    --color-text-dark: #0f172a;
    --color-text-muted: #8b6655;
    --color-border-light: rgba(255, 255, 255, 0.2);
    --color-border-muted: rgba(93, 64, 55, 0.15);
    
    /* Legacy - Manter compatibilidade */
    --primary: #667eea;
    --primary-dark: #764ba2;
    --brown-light: #a07c71;
    --brown-medium: #8b6655;
    --brown-dark: #8b6655;
    --success: #2E7D32;
    --danger: #dc2626;
    
    /* Status Colors */
    --status-online: #2E7D32;
    --status-online-light: #4ade80;
    --status-offline: #dc2626;
    --status-offline-light: #ef4444;
    --status-disconnected: #FF9800;
    --status-disconnected-light: #FFB74D;
    
    /* Feature Colors */
    --admin-golden: #ffe880;
    --admin-golden-dark: #e9c655;
    --details-purple: #667eea;
    --link-green: #29dd6b;
    --link-green-light: #50eb89;
    --anti-link-gradient: linear-gradient(135deg, #29dd6b, #50eb89);
    --danger-red: #ec0000;
    --protect-blue: #4bbdff;
    --protect-blue-light: #83c3ff;
    --warning-orange: #ffbb00;
    
    /* UI Colors */
    --text-dark: #1e293b;
    --text-light: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f1f5f9;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    
    /* Error Colors */
    --color-error: #d32f2f;
    --color-error-light: #f44336;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #faf9f6 0%, #f5f3f0 50%, #f0ede8 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
}

/* Soft Minimalism Blobs (copiados do login) */
.soft-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.floating-shapes {
    position: absolute;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.soft-blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.25;
    filter: blur(12px);
    animation: blobFloat 16s infinite linear alternate;
}

.blob-1 {
    width: 420px;
    height: 420px;
    background: #f0ceaa;
    left: -120px;
    top: -80px;
    animation-delay: 0s;
}

.blob-2 {
    width: 320px;
    height: 320px;
    background: #e6bfae;
    right: -100px;
    top: 60px;
    animation-delay: 2s;
}

.blob-3 {
    width: 260px;
    height: 260px;
    background: #bfaea6;
    left: 60px;
    bottom: -80px;
    animation-delay: 4s;
}

.blob-4 {
    width: 180px;
    height: 180px;
    background: #f0e6d2;
    right: 40px;
    bottom: -60px;
    animation-delay: 6s;
}

@keyframes blobFloat {
    0% {
        transform: translateY(0) scale(1);
    }
    100% {
        transform: translateY(40px) scale(1.08);
    }
}

/* ============================================================
   OFFLINE BANNER
   ============================================================ */

.offline-banner {
    background: linear-gradient(135deg, var(--status-offline-light) 0%, var(--status-offline) 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.2);
    animation: slideDown 0.3s ease;
}

.offline-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.offline-content p {
    color: white;
    font-size: 14px;
}

.offline-content h3 {
    color: white !important;
    font-size: 20px;
    margin: 0 0 8px 0;
}

/* Bloco Remover Grupo - Modal */
.modal-removegroup {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    margin-top: 0;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}
.button-deletegroup-item {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 0;
}
.button-deletegroup-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.3);
}
.remove-group-feedback {
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    background: var(--bg-white);
    color: var(--danger-red);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
}

.copy-btn:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

.offline-help {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    width: 100%;
    text-align: center;
}

/* ============================================================
   HEADER
   ============================================================ */

/* ============================================================
   FLOATING HEADER (NOVO)
   ============================================================ */

.floating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: calc(100% - 40px);
    max-width: 1160px;
    margin: 20px auto 0;
    padding: 0.8rem 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(93, 64, 55, 0.08);
    z-index: 100;
}


/* Brand & Status */
.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: fit-content;
}

.logo-text {
    font-family: 'Vegan Style', cursive;
    font-size: 1.5rem;
    font-weight: bold;
    color: #5D4037;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #F7F7F7;
    color: #2E7D32;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #2E7D32;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.pulse-dot.disconnected {
    background-color: var(--status-disconnected) !important;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.6);
}

.pulse-dot.offline {
    background-color: var(--status-offline) !important;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
}

.pulse-dot.moderador,
.pulse-dot.admgp {
    background-color: #6d28d9 !important;
    box-shadow: 0 0 8px rgba(109, 40, 217, 0.55);
}

#status-text {
    display: inline-block;
    min-width: 0;
}

/* Reserva um slot fixo para status e evita deslocamento da navegação no desktop. */
.status-badge-slot {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

@media (min-width: 851px) {
    .floating-header .status-badge-slot {
        width: 150px;
        flex: 0 0 150px;
    }
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 0.85rem;
    flex-grow: 1;
    justify-content: center;
}

.nav-links .nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 0;
    white-space: nowrap;
}

.nav-item-icon {
    display: none;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.nav-item-icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

.nav-item-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-toggle {
    display: none;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #8D6E63;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.nav-toggle:hover {
    background-color: #f0e6d2;
    color: #5D4037;
    transform: translateY(-2px);
}

.nav-mobile {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(93, 64, 55, 0.1);
    box-shadow: 2px 0 20px rgba(93, 64, 55, 0.15);
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

.nav-mobile.open {
    left: 0;
}

.nav-mobile-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.nav-mobile-backdrop.active {
    display: block;
    opacity: 1;
    pointer-events: all;
}

/* Mobile nav header with user info */
.nav-mobile-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(93, 64, 55, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-mobile-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0ceaa, #e6bfae);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5D4037;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.nav-mobile-user-info {
    flex: 1;
}

.nav-mobile-user-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #5D4037;
    margin: 0 0 4px 0;
}

.nav-mobile-user-info p {
    font-size: 12px;
    color: #8D6E63;
    margin: 0;
}

.nav-mobile-items {
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    text-decoration: none;
    color: #8D6E63;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-item:hover, .nav-item.active {
    color: #5D4037;
    background-color: rgba(93, 64, 55, 0.05);
    font-weight: 600;
}

/* Profile Wrapper */
.profile-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    min-width: fit-content;
}

.profile-avatar {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #8D6E63;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar:hover {
    background-color: #f0e6d2;
    color: #5D4037;
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.user-name {
    font-weight: 700;
    color: #5D4037;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: #8D6E63;
}

.btn-icon-logout {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #8D6E63;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.btn-icon-logout:hover {
    background-color: #FFEBEE;
    color: #D32F2F;
    transform: translateY(-2px);
}

.btn-icon-logout:active {
    transform: translateY(0);
}

.btn-icon-logout:focus-visible {
    outline: 2px solid #D32F2F;
    outline-offset: 2px;
}

.btn-icon-logout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(0);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Old Header (mantido para compatibilidade) */
.header {
    background: white;
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    overflow: hidden;
}

.logo h1 {
    font-family: 'Vintage Brush', cursive, sans-serif;
    font-size: 36px;
    font-weight: 400;
    margin: 0;
    color: #667eea;
    letter-spacing: 1px;
}

.logo p {
    display: none;
}

.header-content .status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--status-offline-light);
    display: inline-block;
    transition: all 0.3s ease;
}

.status-dot.active {
    background: var(--status-online);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.status-dot.disconnected {
    background: var(--status-disconnected);
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.6);
}

.status-dot.offline {
    background: var(--status-offline);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
}

.status-dot.moderador {
    background: #8b5cf6;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.65);
}

.status-dot.admgp {
    background: #8b5cf6;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.65);
}

#page-admin .role-badge.admgp {
    background: #ddd6fe;
    color: #5b21b6;
}

#status-text.disconnected {
    color: var(--status-disconnected) !important;
}

#status-text.offline {
    color: var(--status-offline) !important;
}

#status-text.active {
    color: var(--status-online) !important;
}

#status-text.moderador {
    color: #6d28d9 !important;
}

#status-text.admgp {
    color: #6d28d9 !important;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8eee9;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn i {
    color: #dc2626;
    width: 20px;
    height: 20px;
}

.logout-btn:hover {
    background: #fecaca;
    transform: scale(1.05);
}

/* ============================================================
   CONTAINER
   ============================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.welcome {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    background: #ffffff;
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.welcome h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
}

.welcome p {
    font-size: 15px;
    opacity: 0.85;
    margin: 0;
}

/* ============================================================
   ACTIVATION ALERT
   ============================================================ */

.activation-alert {
    margin-bottom: 24px;
    animation: slideDown 0.3s ease;
}

.activation-alert.hidden {
    display: none;
}

.alert-content {
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    border: 2px solid #fb923c;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 16px rgba(251, 146, 60, 0.15);
}

.alert-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #f97316, #fb923c);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.alert-icon svg {
    width: 32px;
    height: 32px;
}

.alert-text {
    flex: 1;
}

.alert-text h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #ea580c !important;
}

.alert-text p {
    font-size: 14px;
    color: #9a3412;
    margin: 0;
}

.btn-activate {
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.btn-activate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
}

.btn-activate svg {
    width: 20px;
    height: 20px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   STATS GRID
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:last-child {
    order: -1;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 16px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    width: 32px;
    height: 32px;
    color: white;
}

.stat-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.stat-info p {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
}

/* Status icon colors */
#status-icon.online {
    background: var(--status-online-light) !important;
}

#status-icon.online i {
    color: white;
    stroke: white;
}

#status-icon.offline {
    background: linear-gradient(135deg, var(--status-offline-light), var(--status-offline)) !important;
}

#status-icon.offline i {
    color: white;
    stroke: white;
}

#status-icon.moderador i,
#status-icon.moderador svg {
    color: white !important;
    stroke: white !important;
}

#status-icon.admgp i,
#status-icon.admgp svg {
    color: white !important;
    stroke: white !important;
}

#status-icon.moderador,
#status-icon.admgp {
    color: white !important;
}

#status-icon.moderador svg *,
#status-icon.admgp svg * {
    stroke: white !important;
}

/* ============================================================
   SETTINGS SECTION
   ============================================================ */

.settings-section {
    margin: 40px 0;
}

.settings-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: white;
    text-align: center;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.setting-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.setting-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 16px rgba(0, 0, 0, 0.15);
}

.setting-header {
    display: flex;
    gap: 8px;
    flex: 1;
    align-items: center;
}

.setting-header > div:last-child {
    flex: 1;
    min-width: 0;
    margin-right: 8px;
}

.setting-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.setting-icon i {
    color: white;
    width: 22px;
    height: 22px;
}

.setting-header > div h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.setting-header > div p {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: var(--text-light);
}

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */

.toggle {
    display: inline-block;
    position: relative;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e4e6e9, #cccecf);
    cursor: pointer;
    border-radius: 34px;
    transition: 0.3s ease;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* ============================================================
   GROUPS TOGGLE SECTION
   ============================================================ */

.groups-toggle-section {
    text-align: center;
    margin: 32px 0;


.groups-toggle-section .toggle-button {
    background: linear-gradient(90deg, #a98473, #c09582) !important;
    color: white !important;
}

.toggle-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(90deg, #a98473, #c09582);
    color: white;
}

/* Permite override fácil da cor do botão toggle pelo usuário */
.toggle-button.custom {
    background: linear-gradient(90deg, #8b6655, #e6bfae) !important;
    color: #fff !important;
}
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.toggle-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 204, 182, 0.3);
}

.toggle-button i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

/* ============================================================
   GROUPS LIST SECTION
   ============================================================ */

.groups-list-section {
    animation: slideDown 0.3s ease;
    padding: 0;
    margin: 0;
}

.groups-list-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    color: #5D4037;
}

/* Estilos antigos removidos - ver linha ~5400 para estilos do testegp.html */

/*  OLD STYLES - DO NOT USE - start
.group-picture {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.group-picture-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0ceaa, #e6bfae);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.group-info {
    flex: 1;
    min-width: 0;
}

.group-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.group-jid {
    font-size: 12px;
    color: var(--text-light);
    display: block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-jid-value {
    word-break: break-all;
}

.group-jid-members {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.group-members {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
}

.group-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.group-interactions-btn,
.group-admin-btn,
.group-details-btn {
    background: #cbd5e1;
    color: #64748b;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.group-interactions-btn:hover,
.group-admin-btn:hover,
.group-details-btn:hover {
    transform: scale(1.05);
}

.group-interactions-btn {
    background: var(--border-color);
    color: #64748b;
}

.group-interactions-btn i {
    color: #64748b;
    stroke: #64748b;
}

.group-interactions-btn:hover:not(.active) {
    background: var(--border-color);
    opacity: 0.8;
}

.group-admin-btn {
    background: var(--border-color);
    color: #64748b;
}

.group-admin-btn:hover:not(.active) {
    background: var(--border-color);
    opacity: 0.8;
}

.group-admin-btn.active {
    background: var(--admin-golden);
    color: black;
    box-shadow: 0 4px 8px rgba(255, 234, 46, 0.3);
}

.group-admin-btn.active svg {
    stroke: black;
}

.group-admin-btn.active i {
    color: black;
}

.group-details-btn {
    background: var(--border-color);
    color: #64748b;
}

.group-details-btn:hover {
    background: var(--border-color);
    opacity: 0.8;
}

.group-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.quick-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-feature-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 18px 0;
    border-bottom: 1px solid #eee;
    gap: 12px;
}

.quick-feature-item:last-child {
    border-bottom: none;
}

.feature-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.feature-info i {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
}

/* Cores específicas para cada feature - backgrounds pastel */
.quick-feature-item:nth-child(1) .feature-info i {
    background: #ffcccc;
    color: #e74c3c;
}

.quick-feature-item:nth-child(2) .feature-info i {
    background: #cceeff;
    color: #3498db;
}

.quick-feature-item:nth-child(3) .feature-info i {
    background: #ccffcc;
    color: #2ecc71;
}

.quick-feature-item:nth-child(4) .feature-info i {
    background: #e0f7fa;
    color: #87ceeb;
}

.quick-feature-item:nth-child(5) .feature-info i {
    background: #fff5cc;
    color: #f39c12;
}

.quick-feature-item:nth-child(6) .feature-info i {
    background: #f3ccff;
    color: #9b59b6;
}

.quick-feature-item:nth-child(7) .feature-info i {
    background: #ccccff;
    color: #5c6bc0;
}

.quick-feature-item:nth-child(8) .feature-info i {
    background: #ffccdd;
    color: #ff69b4;
}

.feature-info label {
    color: #5a4b45;
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    cursor: pointer;
}

.feature-toggle {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.feature-toggle input {
    display: none;
}

.feature-toggle label {
    position: relative;
    width: 44px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 34px;
    cursor: pointer;
    transition: background 0.4s ease;
    display: block;
    margin: 0;
}

.feature-toggle label::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.4s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.feature-toggle input:checked + label {
    background: #2ecc71;
}

.feature-toggle input:checked + label::after {
    transform: translateX(20px);
}

.quick-feature-item:hover {
    background: rgba(160, 124, 113, 0.05);
    border-color: rgba(93, 64, 55, 0.15);
}

.feature-badge {
    --feature-accent: #a07c71;
    --feature-accent-rgb: 160, 124, 113;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: #ffffff;
    color: #5D4037;
    border: 1.5px solid rgba(93, 64, 55, 0.15);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    box-shadow: 0 6px 16px rgba(93, 64, 55, 0.08);
    position: relative;
}

.feature-badge:hover {
    background: rgba(93, 64, 55, 0.04);
    border-color: rgba(93, 64, 55, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(93, 64, 55, 0.16);
}

.feature-badge:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(93, 64, 55, 0.12);
}

.feature-badge:focus-visible {
    outline: 3px solid rgba(160, 124, 113, 0.25);
    outline-offset: 2px;
}

.feature-badge i {
    width: 18px;
    height: 18px;
}

.feature-badge.active {
    background: linear-gradient(135deg, var(--feature-accent), #c6a69b);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(160, 124, 113, 0.35);
}

.feature-badge.active svg,
.feature-badge.active i {
    color: #ffffff;
    stroke: #ffffff;
}

.feature-badge svg {
    width: 18px;
    height: 18px;
    background: rgba(var(--feature-accent-rgb), 0.12);
    padding: 5px;
    border-radius: 10px;
}

.feature-badge .badge-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(var(--feature-accent-rgb), 0.15);
    color: var(--feature-accent);
}

@media (max-width: 900px) {
    .feature-badge {
        width: 100%;
        justify-content: center;
    }
}

.feature-badge[data-feature="antiFlood"] {
    --feature-accent: #22c55e;
    --feature-accent-rgb: 34, 197, 94;
}

.feature-badge[data-feature="antiJudas"] {
    --feature-accent: #4f46e5;
    --feature-accent-rgb: 79, 70, 229;
}

.feature-badge[data-feature="antiLink"] {
    --feature-accent: #06b6d4;
    --feature-accent-rgb: 6, 182, 212;
}

.feature-badge[data-feature="welcome"] {
    --feature-accent: #f59e0b;
    --feature-accent-rgb: 245, 158, 11;
}

.feature-badge[data-feature="welcomeLeave"] {
    --feature-accent: #f97316;
    --feature-accent-rgb: 249, 115, 22;
}

.feature-badge[data-feature="music"] {
    --feature-accent: #22c55e;
    --feature-accent-rgb: 34, 197, 94;
}

.feature-badge[data-feature="revelar"] {
    --feature-accent: #64748b;
    --feature-accent-rgb: 100, 116, 139;
}

/* Colorir ícones específicos dos feature-badges */
.feature-badge:has(i[data-feather="link-2"]),
.feature-badge:has(i[data-feather="zap-off"]) {
    --feature-accent: var(--link-green);
}

.feature-badge:has(i[data-feather="shield"]) {
    --feature-accent: var(--primary);
}

.feature-badge:has(i[data-feather="bell"]) {
    --feature-accent: var(--warning-orange);
}

.feature-badge:has(i[data-feather="log-out"]) {
    --feature-accent: var(--status-offline-light);
}

.empty {
    text-align: center;
    color: var(--text-light);
    padding: 32px 0;
    font-size: 14px;
}

.loading {
    text-align: center;
    color: var(--text-light);
    padding: 20px;
}

.loading-row {
    position: relative;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    text-align: center;
    padding: 20px;
    font-size: 14px;
    margin-top: 60px;
}

.footer p {
    color: #8b6655 !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 767px) and (min-width: 481px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-card {
        padding: 16px;
        min-height: 140px;
    }

    .stat-icon {
        width: 56px;
        height: 56px;
    }

    .stat-icon i {
        width: 28px;
        height: 28px;
    }

    .stat-info h3 {
        font-size: 22px;
    }

    .stat-info p {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .container {
        padding: 20px 16px;
    }

    .welcome h2 {
        font-size: 24px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .setting-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 16px;
    }

    .setting-header {
        width: auto;
        display: flex;
        gap: 8px;
        align-items: center;
        flex: 1;
        min-width: 0;
    }

    .setting-header > div:last-child {
        flex: 1;
        min-width: 0;
        margin-right: 8px;
    }

    .toggle {
        flex-shrink: 0;
        align-self: center;
    }

    .groups-list-section {
        padding: 20px;
    }

    .group-header {
        flex-wrap: wrap;
    }

    .group-jid {
        max-width: none;
        overflow: auto;
        white-space: normal;
        text-overflow: clip;
        word-break: break-all;
    }

    .group-buttons {
        width: 100%;
        order: 3;
        justify-content: flex-start;
        margin-top: 12px;
    }

    .group-features {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 12px;
        width: 100%;
    }

    .features-title {
        width: 100%;
    }

    .quick-feature-item {
        padding: 12px 14px;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .welcome h2 {
        font-size: 18px;
    }

    .welcome p {
        font-size: 13px;
    }

    .container {
        padding: 8px;
    }

    .page-section {
        padding: 0;
        margin-top: 0;
    }

    .setting-card {
        padding: 12px;
    }

    .welcome p {
        font-size: 14px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 24px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
    }

    .stat-info h3 {
        font-size: 18px;
    }

    .stat-info p {
        font-size: 12px;
    }

    .setting-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 12px;
    }

    .setting-header {
        width: 100%;
        display: flex;
        gap: 8px;
        align-items: center;
        min-width: 0;
    }

    .setting-header > div:last-child {
        flex: 1;
        min-width: 0;
        margin-right: 0;
    }

    .setting-header > div h3 {
        font-size: 13px;
    }

    .setting-header > div p {
        font-size: 11px;
    }

    .toggle {
        align-self: flex-end;
    }

    .toggle-button {
        width: 100%;
        justify-content: center;
    }

    .quick-features {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .quick-feature-item {
        padding: 10px 12px;
    }

    .button-group-vertical {
        max-width: 100%;
    }
}

/* ============================================================
   SCROLLBAR CUSTOMIZADO
   ============================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f3ece8;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #a07c71, #c6a69b);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8b6655, #a07c71);
}

* {
    scrollbar-color: #a07c71 #f3ece8;
    scrollbar-width: thin;
}

/* ============================================================
   MODAL DE GRUPO
   ============================================================ */

.group-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    flex-direction: column;
}

/* ============================================================
   DASHBOARD CLIENT OVERVIEW + EMPTY STATES
   ============================================================ */

.client-overview-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.client-overview-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-overview-main h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-dark);
}

.client-overview-main p {
    margin: 2px 0 0;
    color: var(--text-light);
    font-size: 13px;
}

.client-overview-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.client-overview-item {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
}

.client-overview-label {
    display: block;
    font-size: 12px;
    color: var(--color-brown-accent);
    margin-bottom: 6px;
}

.client-overview-item strong {
    color: var(--color-brown-accent);
    font-size: 14px;
    font-weight: 700;
}

.groups-container .empty {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 64px;
}

@media (max-width: 900px) {
    .client-overview-metrics {
        grid-template-columns: 1fr;
    }
}

.group-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
    cursor: pointer;
}

.interactions-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2500;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.interactions-modal.show,
.interactions-modal.active {
    display: flex !important;
}

.interactions-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    cursor: pointer;
}

/* ============================================================
   MODAL DE UPLOAD DE GIF
   ============================================================ */
.modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
    cursor: pointer;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    animation: slideUp 0.3s ease;
    z-index: 3;
    display: flex;
    flex-direction: column;
    cursor: default;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.modal-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.modal-close-btn:active {
    transform: scale(0.95);
}

.modal-close-btn:focus-visible {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

.modal-close-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
}

.form-group input[type="file"] {
    display: block;
    width: 100%;
    padding: 12px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input[type="file"]:hover {
    border-color: #a07c71;
    background: #f1f5f9;
}

.form-group input[type="file"]:focus {
    outline: none;
    border-color: #a07c71;
    background: #ffffff;
}

.btn-cancel {
    background: #ffffff;
    color: #5D4037;
    padding: 12px 20px;
    border: 1.5px solid rgba(93, 64, 55, 0.2);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: rgba(93, 64, 55, 0.05);
    border-color: rgba(93, 64, 55, 0.3);
    transform: translateY(-1px);
}

.btn-save {
    background: linear-gradient(135deg, #a07c71, #c6a69b);
    color: #ffffff;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(160, 124, 113, 0.3);
}

button:disabled,
button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.interactions-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    animation: slideUp 0.3s ease;
    position: relative;
    z-index: 2;
}

.interactions-modal-content::-webkit-scrollbar {
    display: none;
}

.interactions-modal-content {
    scrollbar-width: none;
}

.group-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #d0d0d0;
    animation: slideUp 0.3s ease;
    position: relative;
    font-family: 'Poppins', sans-serif;
}

.group-modal-content::-webkit-scrollbar {
    display: none;
}

.group-modal-content {
    scrollbar-width: none;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}

.skeleton {
    animation: shimmer 1.2s ease-in-out infinite;
    background: linear-gradient(90deg, #f0f0f0 0px, #f8f8f8 40px, #f0f0f0 80px);
    background-size: 468px;
}

.skeleton-line {
    height: 12px;
    border-radius: 4px;
}

/* ============================================================
   MODAL DE CONFIRMAÇÃO
   ============================================================ */
.confirm-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    animation: fadeIn 0.3s ease;
}

.confirm-modal-backdrop.hidden {
    display: none !important;
    z-index: 9000;
}

.confirm-modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid #d0d0d0;
    animation: slideUp 0.3s ease;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
}

.confirm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(93, 64, 55, 0.08);
}

.confirm-modal-content {
    text-align: center;
}

.confirm-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    color: #5D4037;
}

.confirm-message {
    font-size: 14px;
    color: #1e293b;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-buttons button {
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-buttons .btn-cancel {
    background: #e2e8f0;
    color: #64748b;
}

.confirm-buttons .btn-cancel:hover {
    background: #cbd5e1;
}

.confirm-buttons .btn-confirm {
    background: #22c55e;
    color: white;
}

.confirm-buttons .btn-confirm:hover {
    background: #16a34a;
}

/* Token Modal Styles */
.token-modal-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #a07c71;
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
}

.modal-token-code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #5D4037;
    letter-spacing: 1px;
    word-break: break-all;
    user-select: all;
}

.btn-copy-modal-token {
    background: #a07c71;
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy-modal-token:hover {
    background: #8d6e63;
    transform: scale(1.05);
}

.btn-copy-modal-token svg {
    width: 20px;
    height: 20px;
    color: white;
}

.token-modal-hint {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 20px 0;
    text-align: center;
    font-style: italic;
}

.btn-secondary {
    background: #a07c71;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #8d6e63;
    transform: translateY(-2px);
}

/* Token History List */
.token-history-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.token-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.token-history-item:hover {
    border-color: #a07c71;
    transform: translateX(4px);
}

.token-history-info {
    flex: 1;
}

.token-history-code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #5D4037;
    letter-spacing: 0.5px;
}

.token-history-date {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.token-history-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.token-history-status.active {
    background: #d4edda;
    color: #155724;
}

.token-history-status.used {
    background: #f8d7da;
    color: #721c24;
}

.btn-copy-history-token {
    background: #a07c71;
    border: none;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy-history-token:hover {
    background: #8d6e63;
}

.btn-copy-history-token svg {
    width: 16px;
    height: 16px;
    color: white;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.modal-title-wrapper,
.group-modal-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.modal-group-picture {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
}

.modal-picture-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f0ceaa, #e6bfae);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
}

.modal-title-wrapper h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 600;
}

.modal-jid {
    margin: 0;
    font-size: 11px;
    color: var(--text-light);
    word-break: break-all;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-light);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1e293b;
    transition: all 0.3s ease;
    z-index: 10;
}

/* Corrigir contexto de posicionamento do botão X para todos modais */
.modal-header, .confirm-modal-content, .edit-message-content, .edit-interaction-content, .interactions-modal-content, .group-modal-content {
    position: relative;
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.modal-features {
    padding: 24px;
    background: #ffffff;
}

.modal-features h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #5D4037;
    font-weight: 600;
}

.modal-feature-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border-radius: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    border: 1px solid rgba(93, 64, 55, 0.12);
    box-shadow: 0 2px 8px rgba(93, 64, 55, 0.06);
}

.modal-feature-item:hover {
    background: var(--bg-light);
}

.feature-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.feature-info i {
    color: var(--primary);
    flex-shrink: 0;
}

.feature-info label {
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    cursor: default;
}

.feature-info p {
    font-size: 12px;
    color: #8D6E63;
    margin: 4px 0 0 0;
}

.feature-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-toggle input[type="checkbox"] {
    display: none;
}

.feature-toggle label {
    position: relative;
    width: 44px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
}

.feature-toggle input[type="checkbox"]:checked + label {
    background: #2ecc71;
}

.feature-toggle label::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 9px;
    background: white;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.feature-toggle input[type="checkbox"]:checked + label::after {
    transform: translateX(20px);
}

/* ============================================================
   INTERACTIONS MODAL CONTENT
   ============================================================ */
.interactions-content {
    padding: 18px 24px 24px;
    max-height: calc(80vh - 140px);
    overflow-y: auto;
}

.interactions-section {
    margin-bottom: 24px;
}

.section-title {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-title i {
    color: #667eea;
    width: 18px;
    height: 18px;
}

.interactions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.interaction-item {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #cbd5e1;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.interaction-item.active {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.interaction-item:hover {
    transform: translateY(-2px);
}

.interaction-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 600;
    word-break: break-word;
}

.interaction-info p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.response-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: transparent;
    color: #8b6655;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    flex-shrink: 0;
}

.interactions-empty {
    padding: 40px 24px;
    text-align: center;
}

.interactions-empty i {
    width: 48px;
    height: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
    display: block;
}

.interactions-empty p {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
}

.modal-header .modal-title-wrapper h2 {
    font-size: 18px;
    font-weight: 700;
    color: #5D4037;
}

.modal-header .modal-jid {
    font-size: 12px;
    color: #8D6E63;
}

.modal-subtitle {
    margin-top: 4px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #8D6E63;
}

.interactions-content {
    padding: 20px 24px 24px;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #8b6655;
}

.interaction-item {
    background: #ffffff;
    border: 1px solid rgba(93, 64, 55, 0.15);
    border-left: 4px solid rgba(93, 64, 55, 0.35);
    box-shadow: 0 6px 16px rgba(93, 64, 55, 0.08);
}

.interaction-item.active {
    border-left-color: #a07c71;
    background: rgba(160, 124, 113, 0.08);
}

.interaction-item:hover {
    transform: translateY(-2px);
}

.modal-features h3,
.modal-messages h3 {
    font-size: 14px;
    font-weight: 700;
    color: #5D4037;
    margin-bottom: 12px;
}

.modal-feature-item {
    background: #ffffff;
    border: 1px solid rgba(93, 64, 55, 0.15);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 6px 16px rgba(93, 64, 55, 0.08);
    margin-bottom: 10px;
}

.modal-feature-item .feature-info label {
    font-weight: 700;
    color: #5D4037;
}

.modal-feature-item .feature-info p {
    color: #8D6E63;
}

/* ============================================================
   MODAL EDITAR MENSAGENS
   ============================================================ */
.edit-message-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.edit-message-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

.edit-message-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.edit-message-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-message-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-dark);
}

.close-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--text-dark);
    transform: scale(1.1);
}

.edit-message-body {
    padding: 24px;
    flex: 1;
}

.message-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.message-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.message-help {
    margin-top: 12px;
    padding: 12px;
    background: #f0f9ff;
    border-left: 3px solid #06b6d4;
    border-radius: 4px;
    font-size: 12px;
    color: #0369a1;
}

.edit-message-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-cancel,
.btn-save {
    padding: 12px 20px;
    border: 1.5px solid rgba(93, 64, 55, 0.2);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-cancel {
    background: #ffffff;
    color: #5D4037;
}

.btn-cancel:hover {
    background: rgba(93, 64, 55, 0.05);
    border-color: rgba(93, 64, 55, 0.3);
    transform: translateY(-1px);
}

.btn-save {
    background: linear-gradient(135deg, #a07c71, #c6a69b);
    color: #ffffff;
    border-color: transparent;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 64, 55, 0.3);
}

/* MODAL MESSAGES SECTION */
.modal-messages {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
}

.modal-messages h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #1e293b;
}

.message-item {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.message-item:hover {
    background: var(--bg-light);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.message-header > div {
    flex: 1;
}

.message-header label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    font-size: 14px;
}

.message-preview {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.activation-message-header {
    align-items: center;
}

.activation-message-header > div {
    text-align: center;
}

.activation-message-header .message-preview {
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
}

.flood-limit-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.flood-limit-input {
    width: 86px;
    height: 30px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0 8px;
    font-size: 13px;
    color: #5D4037;
}

.flood-limit-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.flood-limit-save {
    height: 30px;
    border: 1px solid rgba(93, 64, 55, 0.2);
    background: #fff;
    color: #5D4037;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.flood-limit-save:hover {
    background: rgba(93, 64, 55, 0.05);
}

.edit-message-btn {
    background: #ffffff;
    color: #5D4037;
    border: 1.5px solid rgba(93, 64, 55, 0.2);
    border-radius: 10px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.edit-message-btn:hover {
    background: rgba(93, 64, 55, 0.05);
    border-color: rgba(93, 64, 55, 0.3);
    transform: translateY(-1px);
}

.edit-message-btn i {
    width: 18px;
    height: 18px;
}

/* ============================================================
   INTERACTION ACTIONS & EDITING
   ============================================================ */
.interaction-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.edit-interaction-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: white;
    border: 1px solid rgba(93, 64, 55, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #8b6655;
    flex-shrink: 0;
}

.edit-interaction-btn:hover {
    background: #f8f9fa;
    border-color: rgba(93, 64, 55, 0.3);
    transform: translateY(-1px);
}

.edit-interaction-btn:active {
    transform: translateY(0);
    background: #f0f1f3;
}

.edit-interaction-btn:focus-visible {
    outline: 2px solid #8b6655;
    outline-offset: 2px;
}

.edit-interaction-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(0);
}

.edit-interaction-btn i {
    width: 18px;
    height: 18px;
}

.edit-interaction-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.edit-interaction-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

.edit-interaction-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.edit-interaction-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.edit-interaction-header h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--text-dark);
}

.interaction-trigger {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    background: var(--bg-light);
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 500;
    display: inline-block;
}

.edit-interaction-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.responses-list label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 14px;
}

.response-item {
    background: rgba(245, 243, 240, 0.6);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    border-left: 3px solid #8D6E63;
    align-items: center;
}

.response-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: transparent;
    color: #8b6655;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    flex-shrink: 0;
}

.response-text {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.4;
}

.interaction-hint {
    margin-top: 16px;
    padding: 12px;
    background: rgba(245, 243, 240, 0.5);
    border-left: 3px solid #8D6E63;
    border-radius: 4px;
    font-size: 12px;
    color: #5D4037;
}

.interaction-hint code {
    background: rgba(93, 64, 55, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #5D4037;
}

.edit-interaction-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* btn-delete agora usa btn-action btn-action-danger */
.btn-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: white;
    border: 1px solid rgba(211, 47, 47, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #d32f2f;
    flex-shrink: 0;
}

.btn-delete:hover {
    background: rgba(211, 47, 47, 0.05);
    border-color: rgba(211, 47, 47, 0.3);
    transform: translateY(-1px);
}

/* Response editing styles */
.responses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* btn-add-response agora usa btn-primary btn-small */
.btn-add-response {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #a07c71, #c6a69b);
    color: white;
    font-family: 'Poppins', sans-serif;
}

.btn-add-response:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(160, 124, 113, 0.3);
}

.btn-add-response i {
    width: 16px;
    height: 16px;
}

.response-item.editable {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(245, 243, 240, 0.6);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid #8D6E63;
}

.response-textarea {
    flex: 1;
    padding: 8px;
    border: 1px solid rgba(93, 64, 55, 0.2);
    border-radius: 6px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    resize: vertical;
    min-height: 48px;
    transition: border-color 0.3s ease;
    background: white;
}

.response-textarea:focus {
    outline: none;
    border-color: #5D4037;
    box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.05);
}

.btn-remove-response {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: white;
    border: 1px solid rgba(211, 47, 47, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #d32f2f;
    flex-shrink: 0;
}

.btn-remove-response:hover {
    background: rgba(211, 47, 47, 0.05);
    border-color: rgba(211, 47, 47, 0.3);
    transform: translateY(-1px);
}

.btn-remove-response i {
    width: 18px;
    height: 18px;
}

.response-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.btn-toggle-gif-select {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: white;
    border: 1px solid rgba(93, 64, 55, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #8b6655;
    flex-shrink: 0;
}

.btn-toggle-gif-select:hover {
    background: #f8f9fa;
    border-color: rgba(93, 64, 55, 0.3);
    transform: translateY(-1px);
}

.btn-toggle-gif-select.active {
    background: #8b6655;
    color: white;
    border-color: #8b6655;
}

.btn-toggle-gif-select i {
    width: 18px;
    height: 18px;
}

.response-gif-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
}

.response-gif-select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.05);
}

/* btn-save legacy - usar btn-primary em vez disso */
/* Mantido para compatibilidade com código antigo */

/* ============================================================
   MEDIA QUERIES - MODAL RESPONSIVO
   ============================================================ */

@media (max-width: 768px) {
    .group-modal-content {
        width: 95%;
        max-width: 100%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-group-picture,
    .modal-picture-placeholder {
        width: 70px;
        height: 70px;
    }

    .modal-title-wrapper h2 {
        font-size: 16px;
    }

    .modal-jid {
        font-size: 10px;
    }

    .modal-content {
        padding: 16px;
    }

    .modal-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal-button {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .group-modal-content {
        width: 98%;
        border-radius: 12px;
        max-height: 95vh;
    }

    .modal-header {
        padding: 16px;
        gap: 12px;
    }

    .modal-group-picture,
    .modal-picture-placeholder {
        width: 60px;
        height: 60px;
        border-radius: 8px;
    }

    .modal-picture-placeholder {
        font-size: 32px;
    }

    .modal-title-wrapper h2 {
        font-size: 14px;
    }

    .modal-jid {
        font-size: 9px;
    }

    .modal-content {
        padding: 12px;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .modal-button {
        width: 100%;
    }

    .modal-close-btn {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
    }
}

/* ============================================================
   PAGES SYSTEM
   ============================================================ */

#pages-container {
    display: flex;
    flex-direction: column;
}

.page-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   PROFILE PAGE STYLES
   ============================================================ */

.profile-page {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-header {
    text-align: center;
    margin-bottom: 32px;
}

.profile-header h2 {
    font-size: 1.5rem;
    color: #5D4037;
    margin-bottom: 8px;
}

.profile-header p {
    color: #8D6E63;
    font-size: 0.9rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.profile-card {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(93, 64, 55, 0.1);
    box-shadow: 0 2px 8px rgba(93, 64, 55, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.profile-card:hover {
    box-shadow: 0 4px 16px rgba(93, 64, 55, 0.12);
    transform: translateY(-2px);
}

.profile-card-full {
    grid-column: 1 / -1;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid rgba(93, 64, 55, 0.08);
    background: linear-gradient(135deg, rgba(93, 64, 55, 0.02), rgba(141, 110, 99, 0.02));
}

.card-header h3 {
    margin: 0 0 4px 0;
    color: #5D4037;
    font-size: 1.2rem;
    font-weight: 600;
}

.card-subtitle {
    margin: 8px 0 0 0;
    color: #8D6E63;
    font-size: 0.9rem;
}

.card-body {
    padding: 24px;
}

.card-body.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.profile-photo-large {
    width: 140px;
    height: 140px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f0ceaa, #e6bfae);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(93, 64, 55, 0.3);
    border: 3px solid rgba(93, 64, 55, 0.1);
    overflow: hidden;
    position: relative;
}

.profile-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.button-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.char-counter {
    display: block;
    text-align: right;
    color: #8D6E63;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Button Styles */
.btn-primary,
.btn-secondary,
.btn-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1.5px solid transparent;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, #a07c71, #c6a69b);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(93, 64, 55, 0.25);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(93, 64, 55, 0.15);
}

.btn-primary:focus-visible {
    outline: 2px solid #5D4037;
    outline-offset: 2px;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #d32f2f;
    border: 1.5px solid rgba(211, 47, 47, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(211, 47, 47, 0.05);
    border-color: rgba(211, 47, 47, 0.5);
}

.btn-secondary:active:not(:disabled) {
    background: rgba(211, 47, 47, 0.1);
    border-color: rgba(211, 47, 47, 0.7);
}

.btn-secondary:focus-visible {
    outline: 2px solid #d32f2f;
    outline-offset: 2px;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.3);
}

.btn-danger:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(211, 47, 47, 0.2);
}

.btn-danger:focus-visible {
    outline: 2px solid #b71c1c;
    outline-offset: 2px;
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* === PADRÃO DE BOTÕES DE AÇÃO (Icon Buttons) === */
.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: white;
    border: 1px solid rgba(93, 64, 55, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #8b6655;
    flex-shrink: 0;
}

.btn-action:hover {
    background: #f8f9fa;
    border-color: rgba(93, 64, 55, 0.3);
    transform: translateY(-1px);
}

.btn-action i {
    width: 18px;
    height: 18px;
}

.btn-action-danger {
    color: #d32f2f;
    border-color: rgba(211, 47, 47, 0.15);
}

.btn-action-danger:hover {
    background: rgba(211, 47, 47, 0.05);
    border-color: rgba(211, 47, 47, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .profile-page {
      
    }

    .profile-header {
        margin-bottom: 20px;
    }

    .profile-header h2 {
        font-size: 1.3rem;
    }

    .profile-header p {
        font-size: 0.85rem;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        padding: 16px;
    }

    .card-header h3 {
        font-size: 1rem;
    }

    .card-body {
        padding: 16px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #5D4037;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.label-hint {
    font-weight: 500;
    color: rgba(139, 102, 85, 0.7);
    font-size: 0.85rem;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 1px solid rgba(93, 64, 55, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    background: white;
    color: #5D4037;
    cursor: text;
}

.form-group input[type="file"] {
    cursor: pointer;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235D4037' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-group select option {
    padding: 12px;
    background: white;
    color: #5D4037;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #5D4037;
    box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.05);
}

.form-group input:disabled,
.form-group select:disabled {
    background: #f5f3f0;
    color: #8D6E63;
}

.form-group small {
    font-size: 0.75rem;
    color: #8D6E63;
    margin-top: 4px;
}

#password-message {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

#password-message.success {
    background: #E8F5E9;
    color: #2E7D32;
}

#password-message.error {
    background: #FFEBEE;
    color: #D32F2F;
}

.confirm-modal.success {
    border-color: #bbf7d0;
}

.confirm-modal.error {
    border-color: #fecaca;
}

.confirm-modal.success .btn-confirm {
    background: #22c55e;
}

.confirm-modal.error .btn-confirm {
    background: #ef4444;
}

/* ============================================================
   INTERACTIONS PAGE
   ============================================================ */

.interactions-page {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
}

.interactions-page {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
}

.interactions-section-header {
    margin-bottom: 24px;
}

.interactions-section-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #5D4037;
    margin: 0 0 4px 0;
}

.interactions-section-header p {
    font-size: 0.9rem;
    color: #a0a0a0;
    margin: 0;
}

.interactions-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.interactions-toolbar .form-group {
    min-width: 260px;
    flex: 1;
}

.form-group-interact {
    flex: 1;
    min-width: 260px;
}

.form-group-interact label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #5D4037;
    margin-bottom: 8px;
}

.form-group-interact select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-group-interact select:focus {
    outline: none;
    border-color: #a07c71;
}

.btn-add-interaction {
    background: linear-gradient(135deg, #a07c71, #c6a69b);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.btn-add-interaction:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(160, 124, 113, 0.3);
}

.btn-add-interaction:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(160, 124, 113, 0.2);
}

.btn-add-interaction:focus-visible {
    outline: 2px solid #8b6655;
    outline-offset: 2px;
}

.btn-add-interaction:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-add-interaction svg {
    width: 18px;
    height: 18px;
}

.interactions-page-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.interactions-page-content > .loading,
.interactions-page-content > .interactions-grid-message {
    grid-column: 1 / -1;
    justify-self: center;
    align-self: center;
    width: 100%;
    max-width: 520px;
    text-align: center;
}

.interactions-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    border: 1px dashed #e2e8f0;
    text-align: center;
}

.interactions-empty svg {
    opacity: 0.3;
    margin-bottom: 16px;
}

.interactions-empty p {
    font-size: 16px;
    color: #94a3b8;
    margin: 0;
}

/* ============================================================
   GERENCIAMENTO DE GIFS
   ============================================================ */

.gifs-page {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
}

.gifs-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gifs-toolbar select {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.gifs-toolbar select:focus {
    outline: none;
    border-color: #a07c71;
    box-shadow: 0 0 0 3px rgba(160, 124, 113, 0.1);
}

.btn-upload-gif {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #a07c71, #c6a69b);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upload-gif:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(160, 124, 113, 0.3);
}

.btn-upload-gif i {
    width: 16px;
    height: 16px;
}

#gifs-page-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    min-height: 220px;
}

.gifs-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    color: #94a3b8;
}

.gifs-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.gifs-empty p {
    font-size: 16px;
    color: #94a3b8;
    margin: 0;
}

.gifs-info-banner {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(160, 124, 113, 0.1), rgba(198, 166, 155, 0.1));
    border: 1px solid rgba(160, 124, 113, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #5D4037;
    font-weight: 500;
    font-size: 0.9rem;
}

.gifs-info-banner i {
    color: #a07c71;
    flex-shrink: 0;
}

.gif-card {
    background: #ffffff;
    border: 1px solid rgba(93, 64, 55, 0.12);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 16px rgba(93, 64, 55, 0.08);
}

.gif-card:hover {
    border-color: rgba(93, 64, 55, 0.25);
    box-shadow: 0 10px 20px rgba(93, 64, 55, 0.14);
    transform: translateY(-2px);
}

.gif-card-preview {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 140px;
    background: linear-gradient(135deg, #f5f1ee, #ece6e1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    overflow: hidden;
    position: relative;
}

.gif-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gif-card-info {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gif-order-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
    z-index: 1;
}

.gif-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #5D4037;
    margin: 0;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gif-card-size {
    margin: 0;
    color: #8D6E63;
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.8;
}

.gif-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(93, 64, 55, 0.08);
}

.btn-delete-gif {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #d32f2f, #f44336);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-gif:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.3);
}

.gif-card-actions button.btn-replace-gif {
    color: #5D4037;
    border-color: rgba(93, 64, 55, 0.25);
}

.gif-card-actions button.btn-replace-gif:hover {
    background: rgba(93, 64, 55, 0.05);
    border-color: rgba(93, 64, 55, 0.3);
}

.btn-delete-gif i {
    width: 14px;
    height: 14px;
}

@media (max-width: 1024px) {
    .interactions-page-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
.gifs-info-banner {
     grid-column: 1 / -1;
     background: linear-gradient(135deg, rgba(160, 124, 113, 0.1), rgba(198, 166, 155, 0.1));
     border: 1px solid rgba(160, 124, 113, 0.2);
     border-radius: 10px;
     padding: 12px 16px;
     display: flex;
     align-items: center;
     gap: 12px;
     color: #5D4037;
     font-weight: 500;
     font-size: 0.9rem;
}

.gifs-info-banner i {
     color: #a07c71;
     flex-shrink: 0;
}

    #gifs-page-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 640px) {
    .interactions-page-content {
        grid-template-columns: 1fr;
    }

    .interactions-toolbar {
        flex-direction: column;
        gap: 12px;
    }

    .form-group-interact {
        width: 100%;
    }

    .btn-add-interaction {
        width: 100%;
        justify-content: center;
    }
}

.interaction-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(93, 64, 55, 0.15);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(93, 64, 55, 0.06);
}

.interaction-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(93, 64, 55, 0.12);
    border-color: rgba(93, 64, 55, 0.25);
}

.interaction-card h4 {
    margin: 0 0 8px 0;
    color: #5D4037;
    font-size: 1rem;
    font-weight: 600;
}

.interaction-card p {
    margin: 0;
    color: #8D6E63;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.interaction-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(93, 64, 55, 0.08);
}

.interaction-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: white;
    border: 1px solid rgba(93, 64, 55, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #8b6655;
    flex-shrink: 0;
}

.interaction-actions button:hover {
    background: #f8f9fa;
    border-color: rgba(93, 64, 55, 0.3);
    transform: translateY(-1px);
}

.interaction-actions button:last-child {
    color: #d32f2f;
    border-color: rgba(211, 47, 47, 0.15);
}

.interaction-actions button:last-child:hover {
    background: rgba(211, 47, 47, 0.05);
    border-color: rgba(211, 47, 47, 0.3);
}

/* ============================================================
   CONFIGURAÇÃO DE GIFS
   ============================================================ */

.gifs-config-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    margin-top: 24px;
}

.gifs-config-section h3 {
    color: #8b6655;
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.gifs-config-section > p {
    color: rgba(139, 102, 85, 0.7);
    margin: 0 0 20px 0;
    font-size: 0.95rem;
}

.gifs-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group-gif {
    flex: 1;
    min-width: 260px;
}

.form-group-gif label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #5D4037;
    margin-bottom: 8px;
}

.form-group-gif select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-group-gif select:focus {
    outline: none;
    border-color: #a07c71;
}

.gifs-page-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.gifs-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    border: 1px dashed #e2e8f0;
    text-align: center;
}

.gifs-empty svg {
    opacity: 0.3;
    margin-bottom: 16px;
}

.gifs-empty p {
    font-size: 16px;
    color: #94a3b8;
    margin: 0;
}

.gif-card {
    background: #ffffff;
    border: 1px solid rgba(93, 64, 55, 0.12);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    box-shadow: 0 6px 16px rgba(93, 64, 55, 0.08);
}

.gif-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(93, 64, 55, 0.14);
    border-color: rgba(93, 64, 55, 0.25);
}

.gif-card-preview {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 140px;
    background: linear-gradient(135deg, #f5f1ee, #ece6e1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-bottom: 1px solid rgba(93, 64, 55, 0.1);
    overflow: hidden;
    position: relative;
}

.gif-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gif-card-info {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gif-card-name {
    margin: 0;
    color: #5D4037;
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gif-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid rgba(93, 64, 55, 0.08);
}

.gif-card-actions button {
    background: #ffffff;
    border: 1.5px solid rgba(93, 64, 55, 0.2);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #5D4037;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.gif-card-actions button:hover {
    background: rgba(93, 64, 55, 0.05);
    border-color: rgba(93, 64, 55, 0.3);
    transform: translateY(-1px);
}

.gif-card-actions button.btn-delete-gif {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    color: #ffffff;
    border: none;
}

.gif-card-actions button.btn-delete-gif:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.3);
}

.btn-upload-gif {
    background: linear-gradient(135deg, #a07c71, #c6a69b);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    margin-left: auto;
}

.btn-upload-gif:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(160, 124, 113, 0.3);
}

.btn-upload-gif svg {
    width: 18px;
    height: 18px;
}

#gif-file-input {
    display: none;
}

@media (max-width: 1024px) {
    .gifs-page-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .gifs-page-content {
        grid-template-columns: 1fr;
    }

    .gifs-toolbar {
        flex-direction: column;
        gap: 12px;
    }

    .form-group-gif {
        width: 100%;
    }

    .btn-upload-gif {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .gif-card-actions {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 850px) {
    .floating-header {
        width: calc(100% - 32px);
        padding: 0.6rem 0.8rem;
        display: grid;
        grid-template-columns: 44px 1fr auto;
        grid-template-rows: 1fr;
        align-items: center;
        gap: 0.5rem;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .brand-wrapper {
        grid-column: 2;
        grid-row: 1;
        justify-content: center;
        gap: 0.5rem;
    }

    .profile-wrapper {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        padding-left: 0.5rem;
        justify-self: end;
        border-left: 1px solid rgba(0, 0, 0, 0.05);
        min-width: fit-content;
    }

    .profile-avatar, .btn-icon-logout {
        width: 36px;
        height: 36px;
    }

    .nav-item {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .status-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
        display: none;
    }

    .status-badge-slot {
        display: none;
    }

    .user-info {
        display: none;
    }

    .profile-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .profile-info-form {
        width: 100%;
    }

    .profile-edit-section {
        padding: 20px;
    }

    .form-group {
        margin-bottom: 16px;
    }
}

@media (max-width: 600px) {
    .floating-header {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.8rem 12px;
        top: 0;
        left: 0;
        right: 0;
        position: sticky;
        z-index: 100;
    }

    .brand-wrapper {
        display: flex;
        align-items: center;
        gap: 14px;
        flex: 1;
        justify-content: center;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .nav-toggle {
        position: absolute;
        left: 0.8rem;
    }

    .nav-links {
        display: none;
    }

    .profile-wrapper {
        position: absolute;
        right: 0.8rem;
        gap: 0.5rem;
    }

    .user-info {
        display: none;
    }

    .container {
        margin-top: 30px;
    }

    .nav-item {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .profile-avatar, .btn-icon-logout {
        width: 36px;
        height: 36px;
    }

    .profile-edit-section {
        margin: 20px;
        padding: 16px;
    }
}

@media (min-width: 851px) and (max-width: 1180px) {
    .floating-header {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.75rem;
        min-height: 72px;
        position: relative;
        overflow: hidden;
    }

    .brand-wrapper {
        gap: 0.75rem;
        min-width: 0;
    }

    .floating-header .status-badge-slot {
        width: 122px;
        flex-basis: 122px;
    }

    .nav-links {
        gap: 0.35rem;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        justify-content: center;
        width: max-content;
        z-index: 1;
        min-width: 0;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .nav-links .nav-item {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 12px;
    }

    .nav-links .nav-item .nav-item-icon {
        display: inline-flex;
    }

    .nav-links .nav-item .nav-item-label {
        display: none;
    }

    .profile-wrapper {
        grid-column: -1;
        justify-self: end;
        margin-left: auto;
        position: relative;
        z-index: 2;
        min-width: 0;
    }
}

@media (min-width: 851px) and (max-width: 1040px) {
    .floating-header {
        gap: 0.55rem;
        padding-inline: 14px;
    }

    .floating-header .status-badge-slot {
        width: 104px;
        flex-basis: 104px;
    }

    .profile-wrapper {
        gap: 0.45rem;
        padding-left: 0.6rem;
    }

    .profile-wrapper .user-info {
        display: none;
    }
}

@media (min-width: 1181px) {
    /* True absolute centering of nav — brand left, profile right, nav pinned to midpoint */
    .floating-header {
        position: relative;
    }

    .nav-links {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
        width: max-content;
        flex-grow: 0;
    }

    .profile-wrapper {
        position: relative;
        z-index: 2;
        margin-left: auto;
    }
}

/* ============================================================
   ADMIN PANEL STYLES
   ============================================================ */

/* Admin Stats */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.admin-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.admin-stat-icon svg {
    width: 28px;
    height: 28px;
}

.admin-stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text-dark) !important;
}

.admin-stat-info p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* Admin Section */
.admin-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.section-header {
    margin-bottom: 24px;
}

.section-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-dark) !important;
}

.section-header p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* Token Generator */
.token-generator {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.group-token-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: rgba(249, 115, 22, 0.05);
    border-radius: 12px;
    border: 1.5px solid rgba(249, 115, 22, 0.15);
}

.group-token-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.group-token-form label {
    font-size: 14px;
    font-weight: 600;
    color: #5D4037;
}

.group-token-form .form-input {
    padding: 12px 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s;
}

.group-token-form .form-input:focus {
    outline: none;
    border-color: #f97316;
}

.btn-generate {
    background: linear-gradient(135deg, #a07c71, #c6a69b);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    width: fit-content;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(160, 124, 113, 0.3);
}

.btn-generate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-generate svg {
    width: 20px;
    height: 20px;
}

.token-display {
    padding: 20px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
}

.token-display.hidden {
    display: none;
}

.token-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.token-box code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    color: #667eea;
    font-weight: 600;
    word-break: break-all;
}

.btn-copy-token {
    background: #667eea;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.btn-copy-token:hover {
    background: #764ba2;
}

.btn-copy-token svg {
    width: 18px;
    height: 18px;
}

.btn-copy-token.copied svg {
    stroke: #22c55e;
}

.token-hint {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    text-align: center;
}

/* Users Table */
.users-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.users-table thead {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.users-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid #e2e8f0;
}

.users-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-dark);
}

.users-table tbody tr {
    transition: background 0.2s;
}

.users-table tbody tr:hover {
    background: #f8fafc;
}

.user-name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
}

.role-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.role-badge.owner {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.role-badge.user {
    background: #e0e7ff;
    color: #667eea;
}

.status-badge-table {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge-table.active {
    background: #dcfce7;
    color: #22c55e;
}

.status-badge-table.inactive {
    background: #fee2e2;
    color: #ef4444;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-action:hover {
    background: #f8fafc;
}

.btn-action.edit:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.btn-action.delete:hover {
    border-color: #ef4444;
    background: #fef2f2;
}

.btn-action svg {
    width: 16px;
    height: 16px;
}

.btn-action.edit svg {
    stroke: #667eea;
}

.btn-action.delete svg {
    stroke: #ef4444;
}

.loading-row {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-style: italic;
}

/* Tokens List */
.tokens-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.token-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s;
}

.token-item:hover {
    border-color: #cbd5e1;
}

.token-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.token-code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.token-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    position: relative;
    transition: all 0.2s;
}

.token-status.available {
    background: #dcfce7;
    color: #22c55e;
}

.token-status.used {
    background: #fee2e2;
    color: #ef4444;
}

/* Tooltip melhorado */
.token-status[data-tooltip] {
    position: relative;
}

.token-status[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #111827;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: pre-line;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
    margin-bottom: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.token-status[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% - 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #ffffff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.token-status[data-tooltip]:hover::before,
.token-status[data-tooltip]:hover::after {
    opacity: 1;
}

.token-actions {
    display: flex;
    gap: 8px;
}

.token-history-section {
    margin-bottom: 16px;
}

.token-history-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin: 8px 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.btn-token-action {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s, border-color 0.2s;
}

.btn-token-action svg {
    width: 14px;
    height: 14px;
}

.btn-token-action.copy:hover {
    background: #f0f4ff;
    border-color: #667eea;
    color: #667eea;
}

.btn-token-action.copy:active {
    background: #e8eeff;
}

.btn-token-action.copy:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.btn-token-action.delete:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.btn-token-action.delete:active {
    background: #fde8e8;
}

.btn-token-action.delete:focus-visible {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

.btn-token-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-section {
        padding: 20px;
    }

    .section-header h3 {
        font-size: 18px;
    }

    .section-header p {
        font-size: 13px;
    }

    .users-table-container {
        border-radius: 0;
        margin: 0 -20px;
    }

    .users-table th,
    .users-table td {
        padding: 12px 8px;
        font-size: 13px;
    }

    .token-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .token-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Activation Alert Mobile */
    .alert-content {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .alert-icon {
        width: 48px;
        height: 48px;
    }

    .alert-icon svg {
        width: 24px;
        height: 24px;
    }

    .btn-activate {
        width: 100%;
        justify-content: center;
    }
}
/* ================================================================
   GRUPOS E ADMIN - ESTILOS PADRONIZADOS
   Seguindo o padrão do Dashboard
   ================================================================ */

/* Groups List Section */
/* Removido - conflitava com testegp.html design
.groups-list-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 32px;
    margin: 40px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
*/

.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.section-header-inline h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

.section-actions {
    display: flex;
    gap: 12px;
}

.search-input {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    min-width: 220px;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--brown-dark);
    box-shadow: 0 0 0 3px rgba(139, 102, 85, 0.1);
}

.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    width: 100%;
    padding: 24px;
    justify-items: center;
    margin: 0 auto;
}

.groups-container .loading,
.groups-container .empty {
    text-align: center;
    color: #8D6E63;
    padding: 40px 20px;
    font-size: 14px;
    width: 100%;
    max-width: none;
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 240px;
}

/* ================================================================
   GROUP CARD STYLES (Base para todos os tamanhos)
   ================================================================ */

.group-card {
    background: white;
    border: none;
    border-radius: 16px;
    padding: 18px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(93, 64, 55, 0.08);
    position: relative;
    width: 100%;
    max-width: 380px;
    min-height: 480px;
    display: flex;
    flex-direction: column;
}


.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #a07c71, #c6a69b);
    margin-bottom: 15px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-card .profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
    margin-top: 10px;
}

.group-card .profile-name {
    color: #5D4037;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.3;
    text-align: center;
    word-wrap: break-word;
    min-height: 2.6em;
    max-height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
}

.group-card .profile-id {
    color: #a0a0a0;
    font-size: 0.75rem;
    margin: 8px 0 0 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-card .action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.group-card .action-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.group-card .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.group-card .action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.group-card .action-btn:focus-visible {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

.group-card .btn-blue {
    background: #eceff3;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.group-card .btn-blue:hover {
    background: #e5e7eb;
    color: #4b5563;
}

.group-card .btn-yellow {
    background: #eceff3;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.group-card .btn-yellow:hover {
    background: #e5e7eb;
    color: #4b5563;
}

.group-card .btn-yellow.active {
    background: #fff5cc;
    color: #f39c12;
    border-color: #f2d38b;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.18);
}

.group-card .action-btn svg {
    stroke: currentColor;
}

.group-card .shortcuts-title {
    color: #5D4037;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0 0 10px 0;
}

.group-card .divider {
    height: 1px;
    background-color: rgba(93, 64, 55, 0.1);
    margin-bottom: 15px;
    width: 100%;
}

.group-card .shortcuts-list {
    display: flex;
    flex-direction: column;
}

.group-card .shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.group-card .shortcut-item:last-child {
    margin-bottom: 0;
}

.group-card .item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.group-card .icon-box {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.group-card .icon-box svg {
    width: 12px;
    height: 12px;
}

.group-card .item-label {
    color: #5D4037;
    font-weight: 700;
    font-size: 0.85rem;
    margin: 0;
}

.group-card .bg-red { background-color: #ffcccc; color: #e74c3c; }
.group-card .bg-blue { background-color: #cceeff; color: #3498db; }
.group-card .bg-green { background-color: #ccffcc; color: #2ecc71; }
.group-card .bg-lightblue { background-color: #e0f7fa; color: #87ceeb; }
.group-card .bg-yellow { background-color: #fff5cc; color: #f39c12; }
.group-card .bg-purple { background-color: #f3ccff; color: #9b59b6; }
.group-card .bg-indigo { background-color: #ccccff; color: #5c6bc0; }
.group-card .bg-pink { background-color: #ffccdd; color: #ff69b4; }

.group-card .toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.group-card .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.group-card .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: 0.4s;
    border-radius: 34px;
}

.group-card .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.group-card .toggle-switch input:checked + .slider {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.group-card .toggle-switch input:checked + .slider:before {
    transform: translateX(18px);
}

.group-card .settings-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    color: #8D6E63;
    font-size: 1.2rem;
    cursor: pointer;
    background: #f5f3f0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    transition: all 0.2s ease;
    opacity: 1;
    z-index: 10;
}

.group-card .settings-btn:hover {
    background: #e6ddd6;
    color: #5D4037;
    transform: rotate(90deg);
}

.group-card .settings-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.group-card .settings-btn:focus-visible {
    outline: 2px solid #8D6E63;
    outline-offset: 2px;
}


/* ================================================================
   ADMIN SECTION
   ================================================================ */

.admin-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 32px;
    margin: 40px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: var(--text-dark);
}

/* Token Generator Card */
.token-generator-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.token-gen-header {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.token-gen-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.token-gen-icon i {
    width: 28px;
    height: 28px;
    color: white;
}

.token-gen-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text-dark);
}

.token-gen-header p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

.token-gen-actions {
    margin-bottom: 16px;
}

.token-gen-form {
    margin-bottom: 16px;
}

/* Form Group Horizontal - ALINHAMENTO CORRETO */
.form-group-horizontal {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.form-group-horizontal .form-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    background: white;
    color: var(--text-dark);
    height: auto;
}

.form-group-horizontal .form-input:focus {
    outline: none;
    border-color: var(--brown-dark);
    box-shadow: 0 0 0 3px rgba(139, 102, 85, 0.1);
}

.form-group-horizontal .btn-primary {
    height: auto;
    padding: 12px 20px;
    white-space: nowrap;
}

/* Token Display */
.token-display {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.token-display.hidden {
    display: none;
}

.token-box {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.token-box code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-dark);
    padding: 10px 12px;
    background: var(--bg-light);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    word-break: break-all;
}

.btn-copy-token {
    padding: 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--brown-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy-token:hover {
    background: var(--brown-light);
    border-color: var(--brown-light);
    color: white;
}

.token-hint {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

.token-hint code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* Users Table */
.users-table-container {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.users-table thead {
    background: var(--bg-light);
}

.users-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
}

.users-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.users-table tbody tr:hover {
    background: var(--bg-light);
}

.users-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-dark);
}

.loading-row {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-light);
}

/* Role Badge - PADRONIZADO */
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.owner {
    background: linear-gradient(135deg, #FFD700, #FFC700);
    color: #000;
}

.role-badge.admin {
    background: linear-gradient(135deg, #FFB4D6, #FFD4E5);
    color: #c2185b;
}

.role-badge.moderador {
    background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
    color: #4c1d95;
}

.role-badge.admgp {
    background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
    color: #4c1d95;
}

.role-badge.cliente {
    background: linear-gradient(135deg, #c8f7dc, #b2f2bb);
    color: #2f9e44;
}

.role-badge.user {
    background: linear-gradient(135deg, #C3B1E1, #E5D4F5);
    color: #6a1b9a;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: #F7F7F7;
    color: #F7F7F7;
}

.status-badge.inactive {
    background: #F7F7F7;
    color: #F7F7F7;
}

/* Action Buttons */
.btn-action {
    background: none;
    border: none;
    color: var(--text-light);
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    color: var(--text-dark);
    transform: scale(1.1);
}

.btn-action.btn-edit:hover {
    color: #2563eb;
}

.btn-action.btn-delete:hover {
    color: #dc2626;
}

.btn-action.btn-copy:hover {
    color: var(--brown-dark);
}

/* Tokens List */
.tokens-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.token-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    gap: 16px;
}

.token-info {
    flex: 1;
    min-width: 0;
}

.token-value {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 4px;
    word-break: break-all;
}

.token-status {
    font-size: 12px;
    font-weight: 600;
}

.token-actions {
    display: flex;
    gap: 8px;
}

.empty-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 14px;
}

/* Primary Button - PADRONIZADO */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(90deg, var(--brown-dark), var(--brown-light));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(160, 124, 113, 0.3);
}

.btn-primary i {
    width: 18px;
    height: 18px;
}

/* ================================================================
   GROUPS CONTAINER (Para grupos.html)
   ================================================================ */

.grupos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    padding: 24px;
}

/* ================================================================
   RESPONSIVIDADE - GRUPOS E ADMIN
   ================================================================ */

@media (max-width: 768px) {
    .section-header-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-actions {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .group-features {
        grid-template-columns: 1fr;
    }
    
    .form-group-horizontal {
        flex-direction: column;
    }
    
    .users-table {
        font-size: 12px;
    }
    
    .users-table th,
    .users-table td {
        padding: 10px 8px;
    }
    
    .token-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .token-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 1024px) {
    .grupos-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 24px 32px;
    }
}

@media (max-width: 768px) {
    .groups-container {
        grid-template-columns: 1fr;
        width: 100%;
        padding: 0 16px;
        gap: 20px;
        justify-items: center;
    }

    .grupos-grid {
        grid-template-columns: 1fr;
        width: 100%;
        padding: 0 16px;
        gap: 20px;
        justify-items: center;
    }

    .group-card .settings-btn {
        position: absolute;
        top: 18px;
        right: 18px;
    }
    
    .avatar-placeholder {
        width: 90px;
        height: 90px;
        border-radius: 22px;
    }
    
    .profile-name {
        font-size: 1.3rem;
    }
    
    .profile-id {
        font-size: 0.8rem;
    }
    
    .action-buttons {
        gap: 12px;
    }
    
    .action-btn {
        width: 42px;
        height: 42px;
    }
    
    .shortcuts-title {
        font-size: 0.95rem;
    }
    
    .shortcut-item {
        margin-bottom: 16px;
    }
    
    .icon-box {
        width: 26px;
        height: 26px;
    }
    
    .icon-box svg {
        width: 13px;
        height: 13px;
    }
    
    .item-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .groups-list-section,
    .admin-section {
        padding: 0;
    }
    
    .group-picture,
    .group-picture-placeholder {
        width: 48px;
        height: 48px;
    }
    
    .groups-container,
    .grupos-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 12px;
    }
    
    .token-generator-card {
        padding: 16px;
    }
    
    .token-gen-icon {
        width: 48px;
        height: 48px;
    }
    
    .users-table th,
    .users-table td {
        padding: 8px 6px;
        font-size: 11px;
    }
}


/* ================================================================
   GRUPOS PAGE - WELCOME & QUICK FEATURES
   ================================================================ */

.welcome {
    margin-bottom: 48px;
    padding: 24px 0;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #5D4037;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 1.05rem;
    color: rgba(139, 102, 85, 0.7);
    margin: 0;
    line-height: 1.6;
}

.quick-features-section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #5D4037;
    margin: 0 0 24px 0;
}

.quick-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.quick-feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background: white;
    border: 1px solid rgba(93, 64, 55, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-feature-item:hover {
    border-color: rgba(93, 64, 55, 0.3);
    box-shadow: 0 4px 12px rgba(93, 64, 55, 0.1);
    transform: translateY(-2px);
}

.feature-icon {
    width: 24px;
    height: 24px;
    color: #5D4037;
    stroke-width: 2;
}

.feature-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #5D4037;
    text-align: center;
}

.quick-feature-item .feature-toggle {
    display: inline-flex;
    position: relative;
    width: 32px;
    height: 18px;
    background: rgba(93, 64, 55, 0.15);
    border-radius: 999px;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.quick-feature-item .feature-toggle.active {
    background: #2ecc71;
}

.toggle-indicator {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.quick-feature-item .feature-toggle.active .toggle-indicator {
    left: 16px;
}

.grupos-section {
    margin-bottom: 48px;
}

.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    color: rgba(93, 64, 55, 0.3);
    margin-bottom: 20px;
}

.empty-state h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #5D4037;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 0.95rem;
    color: rgba(93, 64, 55, 0.6);
    margin: 0;
}

/* ================================================================
   OVERRIDE UNIFICADO DE CARDS E GRID (PÁGINA GRUPOS)
   ================================================================ */

.groups-list-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.groups-container .group-card,
.grupos-grid .group-card {
    background: white;
    border: none;
    border-radius: 16px;
    padding: 18px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(93, 64, 55, 0.08);
    position: relative;
    width: 100%;
    max-width: 380px;
    min-height: 480px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.groups-container .group-card:hover,
.grupos-grid .group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(93, 64, 55, 0.12);
}

.groups-container,
.grupos-grid {
    display: grid;
    gap: 24px;
    width: 100%;
    padding: 24px;
    grid-template-columns: repeat(3, 1fr);
    justify-items: stretch;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .groups-container,
    .grupos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .groups-list-section {
        padding: 16px;
    }

    .groups-container,
    .grupos-grid {
        grid-template-columns: 1fr;
        padding: 12px;
        justify-items: center;
    }
}

/* ============================================================
   MODAL DE GRUPO - OVERRIDE FINAL (desktop + mobile)
   ============================================================ */
.group-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
}

.group-modal-backdrop {
    background: transparent;
}

.group-modal-content {
    background: white;
    border-radius: 20px;
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.modal-header,
.group-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(93, 64, 55, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.modal-close-btn,
.group-modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f5f3f0;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.floating-header .status-badge {
    display: inline-flex;
    width: fit-content;
    max-width: max-content;
    padding: 0.25rem 0.75rem;
    gap: 0.5rem;
    background-color: #E8F5E9;
    color: #2E7D32;
}

.floating-header .status-badge.active {
    background-color: #dff6e6;
    color: #166534;
    border: 1px solid #86efac;
}

.floating-header .status-badge.disconnected {
    background-color: #FFF3E0;
    color: #F57C00;
}

.floating-header .status-badge.offline {
    background-color: #FEE2E2;
    color: #B91C1C;
}

.floating-header .status-badge.moderador {
    background-color: #ede9fe;
    color: #6d28d9;
}

.floating-header .status-badge.admgp {
    background-color: #ede9fe;
    color: #6d28d9;
}

.floating-header .status-badge #status-text,
.floating-header .status-badge #header-status-text {
    min-width: 0 !important;
}

.floating-header .status-badge #status-text.disconnected,
.floating-header .status-badge #header-status-text.disconnected {
    color: var(--status-disconnected) !important;
}

.floating-header .status-badge #status-text.offline,
.floating-header .status-badge #header-status-text.offline {
    color: var(--status-offline) !important;
}

.floating-header .status-badge #status-text.active,
.floating-header .status-badge #header-status-text.active {
    color: #166534 !important;
}

.floating-header .status-badge #status-text.moderador,
.floating-header .status-badge #header-status-text.moderador {
    color: #6d28d9 !important;
}

.floating-header .status-badge #status-text.admgp,
.floating-header .status-badge #header-status-text.admgp {
    color: #6d28d9 !important;
}

@media (max-width: 1100px) {
    .floating-header {
        gap: 0.65rem;
    }

    .nav-links {
        gap: 0.55rem;
    }

    .profile-wrapper {
        gap: 0.45rem;
        padding-left: 0.5rem;
    }

    .profile-wrapper .user-info {
        display: none;
    }
}

/* ============================================================
   ADMIN UIUX MOLD (PORTADO DE /admin uiux)
   ============================================================ */

#page-admin .admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

#page-admin .admin-stat-card,
#page-admin .stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(93, 64, 55, 0.05);
}

#page-admin .admin-stat-icon,
#page-admin .stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    background: #f5f3f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brown-light);
}

#page-admin .admin-stat-info p,
#page-admin .stat-info p {
    margin: 0;
}

#page-admin .admin-main-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

#page-admin .tabs-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 0 10px;
}

#page-admin .tab-btn {
    padding: 16px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    color: var(--brown-medium);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

#page-admin .tab-btn.active {
    color: var(--brown-dark);
    background: #fff;
    box-shadow: inset 0 -2px 0 #8b6655;
}

#page-admin .tab-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

#page-admin .tab-content {
    padding: 30px;
    display: none;
    animation: fadeIn 0.4s ease;
}

#page-admin .tab-content.active {
    display: block;
}

#page-admin .tokens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

#page-admin .token-action-card {
    border: 1.5px solid #f0f0f0;
    border-radius: 16px;
    padding: 25px;
    transition: 0.3s;
    background: #fff;
    display: flex;
    flex-direction: column;
}

#page-admin .token-action-card:hover {
    border-color: var(--brown-light);
    background: #fdfdfd;
}

#page-admin .token-card-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 10px;
    color: var(--brown-light);
}

#page-admin .token-action-card h4 {
    margin: 0 0 8px;
    color: var(--brown-dark);
}

#page-admin .token-card-subtitle {
    font-size: 0.82rem;
    opacity: 0.75;
    margin: 0 0 18px;
}

#page-admin .btn-action {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--brown-light);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
}

#page-admin .btn-action:hover {
    background: var(--brown-medium);
    transform: translateY(-2px);
}

#page-admin .btn-generate.btn-action {
    background: var(--brown-light);
    box-shadow: none;
    border: none;
}

#page-admin .token-history-mini {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    font-size: 0.8rem;
}

#page-admin .tokens-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#page-admin .token-history-mini {
    max-height: 160px;
    overflow: auto;
}

#page-admin .history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

#page-admin .history-item code {
    color: var(--brown-medium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
    background: transparent;
    border: none;
    padding: 0;
}

#page-admin .history-btn-group {
    display: flex;
    gap: 8px;
}

#page-admin .btn-icon-small {
    background: none;
    border: none;
    padding: 4px;
    color: var(--brown-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
}

#page-admin .btn-icon-small:hover {
    color: #e74c3c;
}

#page-admin .btn-icon-small.copy:hover {
    color: #2ecc71;
}

#page-admin .history-item.used code {
    opacity: 0.65;
}

#page-admin .history-item.empty code {
    max-width: none;
    color: #8D6E63;
}

#page-admin .token-display {
    padding: 16px;
    margin-top: 12px;
    background: #f5f3f0;
    border: 1px dashed #d9c8c2;
    border-radius: 10px;
}

#page-admin .token-box {
    background: #fff;
    border: 1px solid #f0e7e3;
    margin-bottom: 10px;
}

#page-admin .token-box code {
    color: var(--brown-dark);
}

#page-admin .btn-copy-token {
    background: #f6f1ee;
    border: 1px solid #e7ddd8;
    color: var(--brown-medium);
}

#page-admin .btn-copy-token:hover {
    background: var(--brown-light);
    border-color: var(--brown-light);
    color: #fff;
}

#page-admin .users-table-container {
    overflow-x: auto;
    margin-top: 10px;
}

#page-admin .users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #fff;
}

#page-admin .users-table thead {
    background: transparent;
}

#page-admin .users-table th {
    text-align: left;
    padding: 15px;
    background: #fafafa;
    color: var(--brown-medium);
    font-weight: 600;
    border-bottom: 0;
    text-transform: none;
}

#page-admin .users-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    color: var(--brown-dark);
}

#page-admin .users-table tbody tr {
    border-bottom: 0;
}

#page-admin .users-table tbody tr:hover {
    background: #fcfcfc;
}

#page-admin .td-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

#page-admin .users-table th:last-child,
#page-admin .users-table td:last-child {
    text-align: right;
}

#page-admin .users-table td:last-child .td-actions {
    justify-content: flex-end;
    width: 100%;
}

#page-admin .users-table td:last-child .td-actions {
    margin-left: auto;
}

#page-admin .btn-icon-small {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--brown-medium);
    display: flex;
    align-items: center;
}

#page-admin .btn-icon-small:hover {
    color: #e74c3c;
}

#page-admin .btn-icon-small.copy:hover {
    color: #2ecc71;
}

#page-admin .user-status.active {
    color: #2ecc71;
}

#page-admin .user-status.inactive {
    color: #e74c3c;
}

#page-admin .role-badge.owner {
    background: #fff3e0;
    color: #ff9800;
}

#page-admin .role-badge.cliente {
    background: #e8f5e9;
    color: #4caf50;
}

#page-admin .role-badge.moderador {
    background: #ede9fe;
    color: #6d28d9;
}

#page-admin .token-group-form {
    display: grid;
    gap: 12px;
}

#page-admin .token-activate-link {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#page-admin .terminal-container {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

#page-admin .terminal-header {
    background: #333;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #bbb;
    font-size: 0.8rem;
}

#page-admin .terminal-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

#page-admin .terminal-body {
    padding: 20px;
    height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #d7e7d7;
    line-height: 1.6;
}

#page-admin .log-info { color: #4af626; }
#page-admin .log-warn { color: #ffcc00; }
#page-admin .log-error { color: #ff5555; }

#page-admin #security-terminal-meta {
    color: #4af626;
    margin-bottom: 4px;
}

#page-admin #security-terminal-output {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: #00ff00;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
}

#page-admin .log-level {
    font-weight: 700;
}

#page-admin .log-debug { color: #9ca3af; }

#page-admin #cursor {
    animation: adminCursorBlink 0.8s steps(1) infinite;
}

@keyframes adminCursorBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ============================================================
   ADMIN UIUX FINAL PARITY OVERRIDES
   ============================================================ */

#page-admin .tabs-nav {
    background: #f8f9fa !important;
    border-bottom: 1px solid #eee !important;
}

#page-admin .tab-btn {
    color: #8D6E63 !important;
    padding: 20px 25px !important;
    gap: 10px !important;
    transition: 0.3s !important;
}

#page-admin .tab-btn.active {
    color: #5D4037 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#page-admin .tab-btn.active::after {
    height: 3px !important;
    background: #8b6655 !important;
}

#page-admin .admin-stat-icon,
#page-admin .stat-icon {
    background: #f5f3f0 !important;
    color: #a07c71 !important;
}

#page-admin .admin-stat-info h3,
#page-admin .stat-info h3,
#page-admin .admin-stat-info p,
#page-admin .stat-info p {
    color: #5D4037 !important;
}

#page-admin .users-table th {
    background: #fafafa !important;
    color: #8b6655 !important;
    font-weight: 600 !important;
}

#page-admin .users-table td {
    color: #5D4037 !important;
}

#page-admin .token-action-card {
    border: 1.5px solid #f0f0f0 !important;
    border-radius: 16px !important;
    padding: 25px !important;
    background: #fff !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#page-admin .token-action-card:hover {
    border-color: #a07c71 !important;
    background: #fdfdfd !important;
}

#page-admin .token-card-icon,
#page-admin .token-action-card h4 {
    color: #5D4037 !important;
}

#page-admin .token-card-subtitle {
    font-size: 0.8rem !important;
    opacity: 0.7 !important;
    margin-bottom: 20px !important;
    min-height: 34px;
}

#page-admin .btn-action,
#page-admin .btn-generate.btn-action {
    background: #a07c71 !important;
    color: #fff !important;
    border-radius: 10px !important;
    margin-top: auto;
}

#page-admin .btn-action:hover,
#page-admin .btn-generate.btn-action:hover {
    background: #8b6655 !important;
}

#page-admin .token-history-mini {
    border-top: 1px dashed #eee !important;
    font-size: 0.8rem !important;
    margin-top: 15px !important;
    padding-top: 15px !important;
}

#page-admin .history-item code {
    color: #8b6655 !important;
}

#page-admin .terminal-container {
    background: #1a1a1a !important;
    border-radius: 12px !important;
}

#page-admin .terminal-header {
    background: #333 !important;
    color: #bbb !important;
}

#page-admin #security-terminal-meta {
    color: #4af626 !important;
    font-family: 'Consolas', monospace !important;
    font-size: 12px !important;
}

#page-admin #security-terminal-output {
    color: #d7e7d7 !important;
    font-family: 'Consolas', monospace !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}

#page-admin #security-terminal-output .log-prefix {
    color: #93a3a5;
}

#page-admin #security-terminal-output .log-level {
    cursor: help;
    text-decoration: underline dotted rgba(255, 255, 255, 0.25);
}

#page-admin #security-terminal-output .log-level.log-info { color: #4af626; }
#page-admin #security-terminal-output .log-level.log-warn { color: #ffcc00; }
#page-admin #security-terminal-output .log-level.log-error { color: #ff5555; }
#page-admin #security-terminal-output .log-level.log-debug { color: #9ca3af; }

#page-admin .token-history-mini {
    margin-top: 15px !important;
    padding-top: 15px !important;
}

#page-admin .history-item {
    min-height: 24px;
}

#page-admin .history-item code {
    font-size: 12px;
}

#page-admin .token-display {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-top: 12px !important;
}

#page-admin .token-box {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 0 8px 0 !important;
}

#page-admin .token-box code {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

#page-admin #security-terminal-output {
    font-size: 13px !important;
    line-height: 1.6 !important;
}

#page-admin #security-terminal-output .log-prefix {
    opacity: 1;
}

/* ============================================================
   TOKENS CARDS - TEMPLATE EXACT COPY
   ============================================================ */

#page-admin .tokens-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 20px !important;
}

#page-admin .token-action-card {
    border: 1.5px solid #f0f0f0 !important;
    border-radius: 16px !important;
    padding: 25px !important;
    display: flex !important;
    flex-direction: column !important;
    transition: 0.3s !important;
    background: #fff !important;
}

#page-admin .token-action-card:hover {
    border-color: var(--brown-light) !important;
    background: #fdfdfd !important;
}

#page-admin .btn-action,
#page-admin .btn-generate.btn-action {
    width: 100% !important;
    padding: 12px !important;
    border: none !important;
    border-radius: 10px !important;
    background: var(--brown-light) !important;
    color: white !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: auto !important;
}

#page-admin .btn-action:hover,
#page-admin .btn-generate.btn-action:hover {
    background: var(--brown-medium) !important;
    transform: translateY(-2px) !important;
}

#page-admin .token-history-mini {
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: 1px dashed #eee !important;
    font-size: 0.8rem !important;
}

#page-admin .history-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 5px 0 !important;
}

#page-admin .history-item code {
    color: var(--brown-medium) !important;
    font-size: 12px !important;
}

#page-admin .history-btn-group {
    display: flex !important;
    gap: 8px !important;
}

#page-admin .btn-icon-small {
    background: none !important;
    border: none !important;
    padding: 4px !important;
    cursor: pointer !important;
    color: var(--brown-medium) !important;
    display: flex !important;
    align-items: center !important;
}

#page-admin .btn-icon-small:hover {
    color: var(--danger) !important;
}

#page-admin .btn-icon-small.copy:hover {
    color: var(--success) !important;
}

/* remove visual de card interno */
#page-admin .token-display {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-top: 12px !important;
}

#page-admin .token-box {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#page-admin .token-box code {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: var(--brown-medium) !important;
}

    /* ============================================================
       BOOT OVERLAY — shown during restart / backend unreachable
       ============================================================ */
    .boot-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9500;
        animation: fadeIn 0.3s ease;
    }

    .boot-overlay.hidden {
        display: none !important;
    }

    .boot-overlay-card {
        background: #fff;
        border-radius: 16px;
        padding: 40px 48px;
        max-width: 420px;
        width: 90%;
        text-align: center;
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
        animation: slideDown 0.35s ease;
    }

    .boot-overlay-icon {
        font-size: 2.8rem;
        margin-bottom: 16px;
        line-height: 1;
    }

    .boot-overlay-title {
        font-size: 1.25rem;
        font-weight: 600;
        color: #1a1a1a;
        margin: 0 0 10px;
    }

    .boot-overlay-message {
        font-size: 0.97rem;
        color: #555;
        line-height: 1.5;
        margin: 0;
    }

    /* Animated dots: "Aguarde..." */
    .boot-dots::after {
        content: '';
        animation: bootDots 1.4s steps(4, end) infinite;
    }

    @keyframes bootDots {
        0%   { content: ''; }
        25%  { content: '.'; }
        50%  { content: '..'; }
        75%  { content: '...'; }
        100% { content: ''; }
    }

    /* State: success (conexão reestabelecida) */
    .boot-overlay.boot-state-restored .boot-overlay-card {
        border-top: 4px solid #22c55e;
    }

    .boot-overlay.boot-state-restored .boot-overlay-title {
        color: #15803d;
    }

    /* State: failed (não foi possível conectar) */
    .boot-overlay.boot-state-failed .boot-overlay-card {
        border-top: 4px solid #ef4444;
    }

    .boot-overlay.boot-state-failed .boot-overlay-title {
        color: #b91c1c;
    }

#page-admin #security-terminal-output {
    white-space: pre-wrap !important;
    word-break: break-word !important;
}

#page-admin #security-terminal-output .log-prefix {
    color: #93a3a5 !important;
}

#page-admin .btn-copy-token {
    background: none !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
    padding: 4px !important;
    color: var(--brown-medium) !important;
}

#page-admin .btn-copy-token:hover {
    color: var(--success) !important;
}

/* ============================================================
   ADMIN UIUX - FINAL LOCK (TABS + TOKENS EXACT)
   ============================================================ */

#page-admin .tabs-nav {
    display: flex !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #eee !important;
    padding: 0 10px !important;
}

#page-admin .tab-btn {
    padding: 20px 25px !important;
    border: none !important;
    background: none !important;
    cursor: pointer !important;
    font-family: inherit !important;
    font-weight: 600 !important;
    color: var(--brown-medium) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    transition: 0.3s !important;
    position: relative !important;
}

#page-admin .tab-btn.active {
    color: var(--brown-dark) !important;
    background: transparent !important;
    box-shadow: none !important;
}

#page-admin .tab-btn.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important;
    background: var(--brown-medium) !important;
}

#page-admin .tokens-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 20px !important;
}

#page-admin .token-action-card {
    border: 1.5px solid #f0f0f0 !important;
    border-radius: 16px !important;
    padding: 25px !important;
    display: flex !important;
    flex-direction: column !important;
    transition: 0.3s !important;
    background: #fff !important;
}

#page-admin .token-action-card:hover {
    border-color: var(--brown-light) !important;
    background: #fdfdfd !important;
}

#page-admin .btn-action {
    width: 100% !important;
    padding: 12px !important;
    border: none !important;
    border-radius: 10px !important;
    background: var(--brown-light) !important;
    color: #fff !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: auto !important;
}

#page-admin .btn-action:hover {
    background: var(--brown-medium) !important;
    transform: translateY(-2px) !important;
}

#page-admin .token-history-mini {
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: 1px dashed #eee !important;
    font-size: 0.8rem !important;
}

#page-admin .history-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 5px 0 !important;
}

#page-admin .history-item code {
    color: var(--brown-medium) !important;
}