/* Design System Premium (Vanilla CSS) inspirado no wacrm */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #121212; /* Deep background */
    --card-bg: #1E1E24; /* Elevated cards */
    --text-main: #F3F4F6; /* Light gray text */
    --text-muted: #9CA3AF; /* Muted text */
    --primary: #6366F1; /* Indigo */
    --primary-hover: #4F46E5;
    --border: #2B2B36; /* Subtle borders */
    --sidebar-bg: #1A1A1F;
    --sidebar-hover: #26262E;
    --success: #10B981; 
    --warning: #F59E0B; 
    --danger: #EF4444; 
    --info: #3B82F6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
    --radius-md: 0.75rem; /* More rounded */
    --radius-lg: 1rem; /* More rounded */
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Layout */
.app-container {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: fixed;
    height: 100vh;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--sidebar-hover);
    color: var(--text-main);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem 3rem;
}

/* Typography & Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Cards & Dashboard */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.kpi-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background-color: var(--sidebar-bg); /* Darker input */
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

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

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--sidebar-hover);
}

/* Tables */
.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

th {
    background: var(--bg-color);
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: var(--sidebar-hover);
}

/* Utilities */
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Kanban Board */
.kanban-board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }
.kanban-col { background: var(--sidebar-hover); border-radius: var(--radius-md); padding: 1rem; min-width: 280px; flex: 1; display: flex; flex-direction: column; }
.kanban-col-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; color: var(--text-muted); }
.kanban-col-title .badge { background: var(--border); padding: 0.125rem 0.5rem; border-radius: 1rem; font-size: 0.75rem; color: var(--text-main); }
.kanban-cards-container { flex: 1; display: flex; flex-direction: column; gap: 0.75rem; min-height: 100px; }
.kanban-card { background: var(--card-bg); padding: 1rem; border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: var(--shadow-sm); cursor: grab; transition: transform 0.2s, box-shadow 0.2s; }
.kanban-card:active { cursor: grabbing; transform: scale(1.02); box-shadow: var(--shadow-md); }
.kanban-card h4 { font-size: 0.875rem; margin-bottom: 0.5rem; color: var(--text-main); }
.kanban-card-meta { font-size: 0.75rem; color: var(--text-muted); display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.kanban-card-wa { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: var(--success); text-decoration: none; font-weight: 500; }
.kanban-card-wa:hover { text-decoration: underline; }
.opacity-50 { opacity: 0.5; }
