:root {
    /* Dark Blue Theme - Exatamente como o projeto React */
    --primary-color: #3b82f6; /* blue-500 */
    --secondary-color: #60a5fa; /* blue-400 hover */
    --tertiary-color: #1e40af; /* blue-800 */
    --background-color: #0f172a; /* slate-900 background */
    --card-bg: #1e293b; /* slate-800 cards */
    --card-hover-color: #334155; /* slate-700 hover */
    --text-color: #f8fafc; /* slate-50 texto principal */
    --text-secondary: #cbd5e1; /* slate-300 texto secundário */
    --text-muted: #94a3b8; /* slate-400 texto muted */
    --gradient-start: #1e3a8a; /* blue-900 */
    --gradient-end: #0f172a; /* slate-900 */
    --message-background: #1e293b; /* slate-800 */
    --success-green: #22c55e; /* green-500 */
    --input-bg: #1e293b; /* slate-800 */
    --input-border: rgba(59, 130, 246, 0.2); /* blue-500/20 */
    --shadow-blue: rgba(59, 130, 246, 0.2);
    --shadow-blue-hover: rgba(59, 130, 246, 0.4);
}

body {
    background: radial-gradient(circle at 25% 25%, #1e3a8a 0%, transparent 50%),
                radial-gradient(circle at 75% 75%, #1e40af 0%, transparent 50%),
                #0f172a !important;
    color: var(--text-color) !important;
    font-family: "Helvetica Neue", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    min-height: 100vh;
}

.container {
    padding: 2em 1em !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
}

/* Opção 1 - Minimalista Elegante */
.main-header {
    background: rgba(30, 41, 59, 0.95) !important; /* slate-800/95 */
    color: white !important;
    padding: 2em 2.5em !important;
    border-radius: 20px !important;
    margin-bottom: 2em !important;
    box-shadow: 
        0 0 30px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    position: relative;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.4s ease;
}

.main-header:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 
        0 0 40px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
}

.hidden {
   display:none !important;
}

.ui.stackable.cards > .card.hidden {
    display: none !important;
}

.main-header .ui.header {
    position: relative;
    z-index: 2;
    margin: 0 !important;
    font-weight: 700 !important;
    font-size: clamp(1.5em, 3vw, 1.8em) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.main-header .title-container {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.main-header .whatsapp.icon {
    font-size: 1em !important;
}

.main-header .whatsapp.icon:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.main-header .version-label {
    margin-top: 4px !important;
    background: rgba(255,255,255,0.12);
    color: white;
    font-size: 0.5em;
    padding: 4px 10px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-header .version-label:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .main-header {
        padding: 2em !important;
    }

    .main-header .ui.header {
        flex-direction: column;
    }

    .main-header .version-label {
        margin-top: 4px !important;
    }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.ui.header {
    font-weight: 600 !important;
    color: var(--text-color) !important;
}

.ui.cards > .card {
    background: rgba(30, 41, 59, 0.9) !important; /* slate-800/90 neon-card */
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
    margin: 0.7em !important;
}

.ui.cards > .card:hover {
    transform: translateY(-8px) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    background-color: var(--card-hover-color) !important;
}

.ui.cards > .card .content {
    background-color: transparent !important;
}

.ui.cards > .card .header,
.ui.cards > .card .description {
    color: var(--text-color) !important;
}

.ui.cards > .card .description {
    color: var(--text-secondary) !important;
    opacity: 0.9;
}

.ui.cards > .card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6) !important;
    background-color: var(--card-hover-color) !important;
    border-color: rgba(74, 144, 226, 0.4);
}

.ui.segment {
    background-color: rgba(30, 41, 59, 0.9) !important; /* slate-800/90 */
    backdrop-filter: blur(8px) !important;
    color: var(--text-color) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

#connectstatus {
    background-color: rgba(30, 41, 59, 0.9) !important;
    backdrop-filter: blur(8px) !important;
    color: var(--text-color) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

.ui.horizontal.divider {
    font-size: 1.3em !important;
    color: var(--text-secondary) !important;
    margin: 2.5em 0 !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ui.success.message {
    border-radius: 16px !important;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3) !important;
    border: 1px solid rgba(76, 175, 80, 0.5) !important;
    background-color: rgba(76, 175, 80, 0.15) !important;
    color: #81C784 !important;
    animation: slideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

@keyframes slideIn {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.ui.button {
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    background: var(--primary-color) !important;
    color: white !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3) !important;
}

.ui.button:hover {
    transform: translateY(-2px) !important;
    background: var(--primary-hover-color) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5) !important;
}

/* Suavizar cores das labels nos cards */
.ui.label {
    color: white !important;
    font-weight: 600 !important;
}

/* Session - Teal (verde-azulado) */
.ui.teal.label {
    background-color: rgba(20, 184, 166, 0.8) !important; /* teal-500/80 */
    border: 1px solid rgba(20, 184, 166, 0.3) !important;
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.2) !important;
}

/* Webhook - Green (verde) */
.ui.green.label {
    background-color: rgba(34, 197, 94, 0.8) !important; /* green-500/80 */
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.2) !important;
}

/* Chat - Blue (azul) */
.ui.blue.label {
    background-color: rgba(59, 130, 246, 0.8) !important; /* blue-500/80 */
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2) !important;
}

/* User - Red (vermelho) */
.ui.red.label {
    background-color: rgba(239, 68, 68, 0.8) !important; /* red-500/80 */
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2) !important;
}

.ui.orange.label {
    background-color: rgba(255, 152, 0, 0.8) !important;
}

.ui.form input, .ui.form textarea {
    border-radius: 12px !important;
    border: 1px solid var(--input-border) !important;
    background-color: var(--input-bg) !important;
    color: var(--text-color) !important;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px) !important;
}

.ui.form input:focus, .ui.form textarea:focus {
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 0 20px rgba(59, 130, 246, 0.2) !important;
    background-color: rgba(30, 41, 59, 0.95) !important;
    outline: none !important;
}

.ui.form input::placeholder, .ui.form textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7;
}

.ui.form label {
    color: var(--text-secondary) !important;
}

/*
.ui.toast-container {
    padding: 1.5em !important;
}

.ui.toast {
    border-radius: 16px !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
    background-color: var(--message-background) !important;
    border: 1px solid rgba(18, 140, 126, 0.1);
}
*/

.ui.grid {
    margin: -0.7em !important;
}

.ui.grid > .column {
    padding: 0.7em !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.ui.cards {
    animation: fadeIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ui.modal {
    border-radius: 20px !important;
    background-color: rgba(30, 41, 59, 0.95) !important; /* slate-800/95 */
    backdrop-filter: blur(16px) !important;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.15);
}

.ui.modal > .header {
    border-radius: 20px 20px 0 0 !important;
    background: rgba(30, 41, 59, 0.98) !important; /* slate-800/98 glass header */
    backdrop-filter: blur(16px) !important;
    color: white !important;
    padding: 1.5em !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

.ui.modal > .content {
    background-color: rgba(30, 41, 59, 0.95) !important;
    color: var(--text-color) !important;
}

.ui.modal > .actions {
    border-radius: 0 0 20px 20px !important;
    background-color: rgba(30, 41, 59, 0.98) !important;
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.ui.modal > .actions > .ui.button {
    background: var(--primary-color) !important;
    color: white !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3) !important;
}

/* QR Code container */
#qrcode, .qrcode {
    background-color: white !important;
    padding: 20px !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

/* Melhorar visibilidade de texto em cards */
.ui.card .meta {
    color: var(--text-muted) !important;
}

.ui.card .extra {
    border-top-color: rgba(74, 144, 226, 0.2) !important;
    background-color: rgba(0, 0, 0, 0.1) !important;
}

/* Ribbon labels - mantém cores específicas por categoria */
.ui.ribbon.label {
    font-weight: 600 !important;
}

/* Session - Teal (verde-azulado) */
.ui.teal.ribbon.label {
    background-color: rgba(20, 184, 166, 0.9) !important; /* teal-500/90 */
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.3) !important;
}

/* Webhook - Green (verde) */
.ui.green.ribbon.label {
    background-color: rgba(34, 197, 94, 0.9) !important; /* green-500/90 */
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3) !important;
}

/* Chat - Blue (azul) */
.ui.blue.ribbon.label {
    background-color: rgba(59, 130, 246, 0.9) !important; /* blue-500/90 */
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3) !important;
}

/* User - Red (vermelho) */
.ui.red.ribbon.label {
    background-color: rgba(239, 68, 68, 0.9) !important; /* red-500/90 */
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3) !important;
}

/* Messages e alerts */
.ui.message {
    background-color: rgba(30, 41, 59, 0.9) !important;
    backdrop-filter: blur(8px) !important;
    color: var(--text-color) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1) !important;
}

.ui.info.message {
    background-color: rgba(59, 130, 246, 0.15) !important; /* blue-500/15 */
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #60a5fa !important; /* blue-400 */
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2) !important;
}

.ui.warning.message {
    background-color: rgba(251, 146, 60, 0.15) !important; /* orange-400/15 */
    border-color: rgba(251, 146, 60, 0.4) !important;
    color: #fb923c !important; /* orange-400 */
    box-shadow: 0 0 15px rgba(251, 146, 60, 0.2) !important;
}

.ui.error.message {
    background-color: rgba(239, 68, 68, 0.15) !important; /* red-500/15 */
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important; /* red-400 */
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2) !important;
}

/* Webhook Events dropdown styling */
.ui.modal .ui.dropdown,
.ui.modal .ui.selection.dropdown,
.ui.modal select.ui.dropdown {
    background: rgba(30, 41, 59, 0.95) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    color: var(--text-color) !important;
    border-radius: 12px !important;
}

.ui.modal .ui.dropdown .menu {
    background: rgba(245, 245, 245, 0.98) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3) !important;
}

.ui.modal .ui.dropdown .menu .item {
    color: #1e293b !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-top: 1px solid rgba(59, 130, 246, 0.1) !important;
    font-weight: 500 !important;
}

.ui.modal .ui.dropdown .menu .item:hover {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #0f172a !important;
}

.ui.modal .ui.dropdown .menu .item.active,
.ui.modal .ui.dropdown .menu .item.selected {
    background: #1e293b !important;
    color: white !important;
    font-weight: 700 !important;
    border-left: 3px solid #3b82f6 !important;
}

.ui.modal .ui.dropdown .text {
    color: var(--text-color) !important;
}

/* Multiple selection labels */
.ui.modal .ui.dropdown .label {
    background: #1e293b !important;
    color: white !important;
    border: 1px solid #3b82f6 !important;
    font-weight: 600 !important;
}

.ui.modal .ui.dropdown .label .delete.icon {
    color: rgba(255, 255, 255, 0.8) !important;
}

.ui.modal .ui.dropdown .label .delete.icon:hover {
    color: white !important;
}
