:root {
    --primary: #2563eb;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-hover: #1e293b;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e2e8f0;
    --text-main: #1e293b;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

body { 
    font-family: 'Inter', sans-serif; 
    background: var(--bg); 
    margin: 0; 
    display: flex; 
    min-height: 100vh; 
    color: var(--text-main); 
}

/* Sidebar */
.sidebar { 
    width: 260px; 
    background: var(--sidebar-bg); 
    display: flex; 
    flex-direction: column; 
    position: fixed; 
    height: 100vh; 
    z-index: 100;
}

.sidebar-header { 
    padding: 2rem 1.5rem; 
    font-size: 1.4rem; 
    font-weight: 800; 
    border-bottom: 1px solid #1e293b; 
    color: #38bdf8; 
}

.sidebar-menu { 
    flex: 1; 
    padding: 1.5rem 0.75rem; 
}

.menu-item { 
    display: flex; 
    align-items: center; 
    padding: 1rem 1.2rem; 
    color: var(--sidebar-text); 
    text-decoration: none; 
    border-radius: 8px; 
    margin-bottom: 0.5rem; 
    font-weight: 500; 
    transition: 0.2s; 
}

.menu-item i { 
    width: 25px; 
    margin-right: 15px; 
    font-size: 1.1rem;
}

.menu-item:hover { 
    background: var(--sidebar-hover); 
    color: white; 
}

/* Sidebar Footer com Informações do Usuário */
.sidebar-footer { 
    padding: 2rem 1.5rem; 
    background: #0b1120; 
    border-top: 1px solid #1e293b; 
}

.user-info { 
    margin-bottom: 1.5rem; 
    padding-bottom: 1rem; 
    border-bottom: 1px solid #1e293b; 
}

.user-name { 
    font-size: 0.95rem; 
    font-weight: 700; 
    color: #f8fafc; 
    display: block; 
}

.company-name { 
    font-size: 0.75rem; 
    color: #38bdf8; 
    display: block; 
    margin-top: 4px; 
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.logout-link { 
    color: #f87171; 
    text-decoration: none; 
    font-size: 0.9rem; 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    transition: 0.2s;
}

.logout-link:hover {
    color: #ef4444;
}

/* Main Content Area */
.main-content { 
    margin-left: 260px; 
    flex: 1; 
    padding: 3.5rem; 
    box-sizing: border-box; 
}

h2 { 
    margin-bottom: 3rem; 
    font-size: 1.8rem; 
    font-weight: 800; 
    color: #0f172a; 
    letter-spacing: -0.025em;
}

/* Cards */
.card { 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 2.5rem; 
    margin-bottom: 2.5rem; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.success-alert { 
    background: #dcfce7; 
    color: #166534; 
    border-left: 5px solid #22c55e; 
}

/* Form Elements */
.form-group {
    margin-bottom: 2.5rem;
}

label { 
    display: block; 
    margin-bottom: 1rem; 
    font-weight: 600; 
    color: #475569; 
    font-size: 0.95rem;
}

input, select, textarea { 
    width: 100%; 
    padding: 1.1rem; 
    border: 1px solid #cbd5e1; 
    border-radius: 8px; 
    margin-bottom: 1rem; 
    box-sizing: border-box; 
    font-size: 1rem; 
    font-family: inherit;
    transition: 0.2s;
}

input:focus, select:focus, textarea:focus { 
    border-color: var(--primary); 
    outline: none; 
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); 
}

.config-textarea { 
    height: 200px; 
    resize: vertical;
}

/* Buttons */
.btn { 
    padding: 0.9rem 1.8rem; 
    border-radius: 8px; 
    font-weight: 600; 
    cursor: pointer; 
    border: none; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    gap: 10px; 
    text-decoration: none; 
    transition: 0.2s;
    font-size: 0.95rem;
}

.btn-primary { 
    background: var(--primary); 
    color: white; 
}

.btn-primary:hover { 
    background: #1d4ed8; 
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* Tables */
.table-card {
    padding: 0;
    overflow: hidden;
}

.table-header {
    padding: 2rem; 
    background: #f8fafc; 
    border-bottom: 1px solid #e2e8f0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

table { 
    width: 100%; 
    border-collapse: collapse; 
}

th { 
    text-align: left; 
    padding: 1.5rem 1rem; 
    color: #64748b; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    background: #f8fafc; 
    font-weight: 700; 
    letter-spacing: 0.05em;
}

td { 
    padding: 1.5rem 1rem; 
    border-top: 1px solid var(--border); 
}

/* Status Badges */
.status-badge { 
    font-weight: 700; 
    font-size: 0.75rem; 
    padding: 0.4rem 0.8rem; 
    border-radius: 6px; 
    display: inline-block;
}

.status-badge.pending { 
    background: #fef3c7; 
    color: #92400e; 
}

.status-badge.sent { 
    background: #dcfce7; 
    color: #166534; 
}

/* Nova Coluna: Aguarde Resposta (Countdown) */
.countdown { 
    display: inline-block;
    padding: 0.4rem 0.6rem;
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Search Dropdown */
.search-dropdown { 
    display: none; 
    position: absolute; 
    left: 0; 
    right: 0; 
    top: 90%; 
    z-index: 99; 
    padding: 0; 
    background: white; 
    border: 1px solid var(--primary); 
    border-radius: 8px; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.15); 
    overflow: hidden; 
}

.search-item { 
    padding: 1rem 1.5rem; 
    cursor: pointer; 
    border-bottom: 1px solid #eee; 
    transition: 0.2s; 
}

.search-item:hover { 
    background: #eff6ff; 
}

/* Actions */
.action-group { 
    display: flex; 
    gap: 12px; 
    justify-content: flex-end; 
    align-items: center; 
}

.btn-remove { 
    color: #ef4444; 
    font-size: 1.1rem; 
    padding: 0.5rem; 
    transition: 0.2s;
}

.btn-remove:hover {
    color: #b91c1c;
    transform: scale(1.1);
}

.sent-indicator { 
    color: #64748b; 
    font-weight: 600; 
    font-size: 0.85rem; 
}