:root {
    --bg-dark: #0a0a0c;
    --card-bg: rgba(20, 20, 25, 0.8);
    --primary: #00f3ff;
    --primary-glow: rgba(0, 243, 255, 0.4);
    --secondary: #8a2be2;
    --text-white: #ffffff;
    --text-gray: #a0a0ab;
    --error: #ff4d4d;
    --success: #00ff88;
    --border: rgba(255, 255, 255, 0.1);
    --accent: var(--primary);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo img {
    height: 40px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary);
    color: #000;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    margin-top: 20px;
}

.btn-icon {
    background: var(--primary);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 120px 0 60px;
    text-align: center;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 24px;
    background: linear-gradient(to bottom, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-gray);
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
}

/* FAQ Section */
.faq-section {
    padding: 60px 0 100px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 48px;
    font-family: 'Outfit', sans-serif;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 20px;
    transition: all 0.3s;
}

.faq-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.faq-item h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--primary);
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Login Card Small */
.login-card-small {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    margin: 150px auto;
    backdrop-filter: blur(20px);
    text-align: center;
}

.success-box {
    margin-top: 24px;
    padding: 20px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 12px;
    color: var(--success);
}

.success-box i { margin-bottom: 8px; }

/* App Header & Profile Menu */
.app-header {
    height: 70px;
    background: rgba(0,0,0,0.4);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    position: relative;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.app-logo img { height: 30px; }

.user-profile-menu {
    position: relative;
}

.user-info-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 30px;
    transition: background 0.3s;
}

.user-info-trigger:hover {
    background: rgba(255,255,255,0.05);
}

.avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.profile-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 240px;
    background: #15151a;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}

.dropdown-header strong { display: block; margin-bottom: 4px; }
.dropdown-header span { font-size: 0.8rem; color: var(--text-gray); }

.dropdown-content button {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    transition: background 0.3s;
}

.dropdown-content button:hover {
    background: rgba(255,255,255,0.05);
    color: var(--primary);
}

/* Benefits */
.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 100px;
}

.benefit-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.benefit-card i {
    color: var(--primary);
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
}

.benefit-card h3 {
    margin-bottom: 12px;
}

.benefit-card p {
    color: var(--text-gray);
}

/* Login Section */
.login-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 10;
}

.btn-icon-plain {
    background: transparent;
    border: none;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.app-name-top {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
}

.login-split-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

.login-brand-side {
    flex: 1;
    background: linear-gradient(135deg, #000, #111);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 1px solid var(--border);
    padding: 40px;
    text-align: center;
}

.login-brand-side img {
    height: 120px;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 20px var(--primary-glow));
}

.login-brand-side h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.login-form-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-dark);
    padding: 40px;
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-form-wrapper h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-form-wrapper p {
    color: var(--text-gray);
    margin-bottom: 32px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
}

.modal-content h2 {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

/* Add DB Template Styles */
.upload-template {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.upload-box {
    border: 2px dashed var(--border);
    padding: 60px;
    border-radius: 24px;
    text-align: center;
    transition: all 0.3s;
}

.upload-box:hover {
    border-color: var(--primary);
    background: rgba(255,255,255,0.02);
}

.upload-box i {
    color: var(--primary);
    margin-bottom: 16px;
}

.db-connections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.db-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Account/Admin Styles */
.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.admin-control-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 24px;
}

.user-management-list {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
}

.user-info strong { display: block; }
.user-info span { font-size: 0.85rem; color: var(--text-gray); }

.user-actions { display: flex; gap: 8px; }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* Responsividade */
@media (max-width: 900px) {
    .login-brand-side { display: none; }
    .app-container { grid-template-columns: 80px 1fr; }
    .sidebar-btn span { display: none; }
    .sidebar-btn { justify-content: center; padding: 12px; }
}

@media (max-width: 600px) {
    .app-container { display: flex; flex-direction: column; }
    .sidebar { height: auto; border-right: none; border-bottom: 1px solid var(--border); flex-direction: row; }
    .sidebar-buttons { display: flex; width: 100%; justify-content: space-around; }
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.form-group input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: 8px;
    color: #fff;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--primary);
}

.forgot-password, .back-to-login {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.error-msg { color: var(--error); font-size: 0.85rem; margin-top: 10px; }
.success-msg { color: var(--success); font-size: 0.85rem; margin-top: 10px; }

/* Dashboard Layout */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: calc(100vh - 80px);
}

.sidebar {
    border-right: 1px solid var(--border);
    padding: 30px 20px;
    background: rgba(0,0,0,0.2);
}

.sidebar-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    color: var(--text-gray);
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.3s;
    font-size: 1rem;
    text-align: left;
}

.sidebar-btn:hover, .sidebar-btn.active {
    background: rgba(255,255,255,0.05);
    color: var(--primary);
}

.content-area {
    padding: 40px;
    overflow-y: auto;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Table */
.data-table-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: rgba(255,255,255,0.02);
    text-align: left;
    padding: 16px;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-ativo { background: rgba(0, 255, 136, 0.1); color: var(--success); }
.status-inativo { background: rgba(255, 77, 77, 0.1); color: var(--error); }

/* Chat */
.chat-window {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.message.bot {
    align-self: flex-start;
    background: rgba(255,255,255,0.05);
    border-bottom-left-radius: 4px;
}

.message.user {
    align-self: flex-end;
    background: var(--primary);
    color: #000;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 20px;
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--border);
}

.chat-input-area input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 30px;
    color: #fff;
    outline: none;
}

/* Typing Indicator */
.typing {
    display: flex;
    gap: 4px;
    padding: 10px 20px;
}

.typing span {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing span:nth-child(1) { animation-delay: -0.32s; }
.typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

.hidden { display: none !important; }

/* Transitions */
.view {
    animation: fadeIn 0.4s ease;
}

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

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.admin-card-header h3 { margin-bottom: 0; }
