/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* FUNDO */
body {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #333;
}

/* LAYOUT */
.app {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
}

/* SIDEBAR (GLASS) */
.sidebar {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255,255,255,0.1);
    padding: 20px;
    color: #fff;
}

.sidebar h2 {
    margin-bottom: 20px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 12px;
}

.sidebar a {
    text-decoration: none;
    color: #fff;
    padding: 10px;
    display: block;
    border-radius: 8px;
    transition: 0.3s;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.15);
}

/* MAIN */
.main {
    display: flex;
    flex-direction: column;
}

/* HEADER GLASS */
.header {
    padding: 20px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff;
}

/* CONTENT */
.content {
    padding: 20px;
}

/* TITULOS */
.title {
    color: #fff;
    margin-bottom: 20px;
}

/* CARD GLASS */
.card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* INPUTS */
input, textarea, select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    margin-top: 5px;
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* BOTÕES GLASS */
button, .btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;
    display: inline-block;
}

/* EFEITO HOVER */
button:hover, .btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* TABELA CRM */
.table-container {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
}

.crm-table th {
    background: rgba(255,255,255,0.15);
    padding: 12px;
    text-align: left;
}

.crm-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.crm-table tr:hover {
    background: rgba(255,255,255,0.1);
}

/* STATUS */
.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

/* CORES STATUS */
.status.novo {
    background: #00c853;
    color: #fff;
}

.status.atendimento {
    background: #ffd600;
    color: #000;
}

.status.fechado {
    background: #d50000;
    color: #fff;
}

/* CHAT */
.chat-box {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.msg {
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    max-width: 70%;
}

.msg.user {
    background: #2196f3;
    color: white;
    margin-left: auto;
}

.msg.bot {
    background: #e0e0e0;
    color: #333;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
}
.config-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.config-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.config-btn:hover, .config-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.config-section {
    display: none;
}
.config-section.active {
    display: block;
    animation: fadeIn 0.3s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.produto-preview {
    padding: 12px;
    border: 1px solid #ddd;
    margin: 8px 0;
    border-radius: 8px;
    background: rgba(255,255,255,0.8);
}
.mensagem {
    margin: 8px 0;
    padding: 10px;
    border-radius: 12px;
    max-width: 80%;
}
.mensagem.usuario {
    background: #e3f2fd;
    margin-left: auto;
    text-align: right;
}
.mensagem.ia {
    background: #f3e5f5;
}