@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Premium Minimalist Dark Theme (Vercel/Apple style) */
    --bg-main: #000000;
    --bg-surface: #0a0a0a;
    --bg-elevated: #111111;
    
    --text-primary: #ededed;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --border-subtle: #27272a;
    --border-strong: #3f3f46;
    --border-neon: #3f3f46; 
    
    --primary-neon: #ffffff; /* Brando puro ao invés de neon */
    --secondary-neon: #e4e4e7; /* Cinza claro ao invés de azul */
    --accent-glow: 0 0 15px rgba(255, 255, 255, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --shadow-glass: 0 8px 30px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-secondary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    position: relative;
    /* Deep space background with subtle gradient meshes */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.08), transparent 25%);
}

/* Base typography */
h1, h2, h3, h4 {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* App Layout */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(20px); /* Base glass effect */
}

/* Elegant Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10;
}

.brand {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.brand i {
    -webkit-text-fill-color: var(--primary-neon);
    text-shadow: var(--accent-glow);
}

/* Fix for Sidebar Navigation Links */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.sidebar-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.sidebar-nav a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidebar-nav a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-subtle);
}

.sidebar-nav a:hover i {
    transform: scale(1.1);
    color: var(--primary-neon);
}

.sidebar-nav a.active {
    color: #000;
    background: #fff;
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.sidebar-nav a.active i {
    color: #000;
    text-shadow: none;
}

.user-profile {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(139, 92, 246, 0.1);
    color: #d8b4fe;
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.3);
    margin-top: 10px;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 3rem 4rem;
}

/* Premium Glass Panel */
.glass-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
}
/* Subtle top highlight for glass panels */
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* Forms & Inputs */
.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

input[type="text"], input[type="password"], select, input[type="number"] {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

input:focus, select:focus {
    border-color: var(--primary-neon);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Clean Buttons */
.btn {
    background: #ededed;
    color: #000;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 12px 24px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn-whatsapp:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Search Container */
.search-container {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.search-container select { width: 250px; }
.search-container input { flex: 1; }

/* Progress Console */
.progress-console {
    background: #000;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 2rem;
    display: none;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #34d399; /* Emerald green for logs */
    height: 180px;
    overflow-y: auto;
    box-shadow: inset 0 4px 20px rgba(0,0,0,0.5);
}

.progress-console div {
    margin-bottom: 6px;
    opacity: 0.9;
}
.progress-console .cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #34d399;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}
@keyframes blink { 50% { opacity: 0; } }

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.result-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.result-card:hover {
    border-color: var(--border-neon);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 0 15px rgba(139, 92, 246, 0.05);
}

.status-badge {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.potencial-quente { color: #fbbf24; background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.2); }
.potencial-neutro { color: var(--text-secondary); }
.potencial-lixo { color: #f87171; background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.2); }

/* Upsell Banner */
#upsell-container {
    background: linear-gradient(145deg, rgba(15, 15, 20, 0.8), rgba(25, 25, 35, 0.9));
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    margin-top: 3rem;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}

/* Auth Area */
.auth-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
}

.auth-box {
    width: 100%;
    max-width: 440px;
    padding: 3.5rem;
}

/* Support Widget */
.support-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.support-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    border: 1px solid var(--border-subtle);
}

.support-btn:hover {
    transform: scale(1.05);
    background: #ededed;
}

.chat-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.chat-header {
    background: rgba(255,255,255,0.03);
    padding: 18px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-neon);
}

.chat-header h3 { font-size: 1.1rem; margin-bottom: 4px; }
.chat-header p { font-size: 0.8rem; color: var(--text-muted); }

.chat-body {
    padding: 18px;
    min-height: 200px;
    background: rgba(0,0,0,0.2);
}

.chat-msg {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(255, 255, 255, 0.05));
    padding: 12px 16px;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    font-size: 0.95rem;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    max-width: 85%;
}

.chat-input-area {
    padding: 15px;
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--border-subtle);
}

.chat-input-area input {
    flex: 1;
    padding: 12px;
    border-radius: 30px;
}

.chat-input-area button {
    background: #fff;
    color: #000;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-area button:hover {
    transform: scale(1.05);
    background: #ededed;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

.admin-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1.2rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-strong);
    background: rgba(255,255,255,0.02);
}

.admin-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.95rem;
    transition: background 0.2s;
}

.admin-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.loader {
    border: 3px solid var(--border-subtle);
    border-top: 3px solid var(--primary-neon);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin: 4rem auto;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.potencial-aguardando { color: #10b981; background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); }

/* Premium Tables */
.custom-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.3);
    margin-top: 15px;
}
.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    color: var(--text-secondary);
}
.custom-table th {
    background: rgba(255,255,255,0.03);
    padding: 15px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-strong);
    color: var(--text-primary);
}
.custom-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}
.custom-table tr:last-child td {
    border-bottom: none;
}
.custom-table tr:hover td {
    background: rgba(255,255,255,0.02);
}
.action-btn-group {
    display: flex;
    gap: 8px;
}
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: #fff;
}
.btn-icon-green { background: rgba(16, 185, 129, 0.2); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.4); }
.btn-icon-green:hover { background: #10b981; color: #fff; }
.btn-icon-red { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.4); }
.btn-icon-red:hover { background: #ef4444; color: #fff; }
.btn-icon-yellow { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.4); }
.btn-icon-yellow:hover { background: #f59e0b; color: #fff; }
.btn-icon-purple { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.4); }
.btn-icon-purple:hover { background: #8b5cf6; color: #fff; }
