* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #1f2937;
}

.header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #3b82f6;
}

.nav-tabs {
    display: flex;
    gap: 30px;
    margin-left: auto;
}

.nav-tabs button {
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    transition: all 0.3s;
}

.nav-tabs button.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

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

.section {
    display: none;
}

.section.active {
    display: block;
}

/* ===== CONTATOS ===== */
.contatos-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contatos-actions {
    display: flex;
    gap: 10px;
}

.btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.search-bar {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
}

.search-bar input {
    flex: 1;
    border: 1px solid #e5e7eb;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
}

.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

th {
    background: #f3f4f6;
    padding: 15px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

tr:hover {
    background: #f9fafb;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #0c4a6e;
}

/* ===== KANBAN ===== */
.kanban-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.kanban-column {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 15px;
    min-height: 600px;
}

.kanban-header {
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-count {
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.kanban-card {
    background: white;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: move;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 3px solid #3b82f6;
    transition: all 0.3s;
}

.kanban-card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.kanban-card-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.kanban-card-meta {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
}

.kanban-card-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

/* ===== DASHBOARD ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid #3b82f6;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0;
}

.metric-label {
    font-size: 14px;
    color: #6b7280;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ===== PAINÉIS ===== */
.panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.panel-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-top: 3px solid #3b82f6;
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.panel-owner {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 15px;
}

.panel-items {
    background: #f3f4f6;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 15px;
}

.panel-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    text-align: center;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.metric-card.green { border-left-color: #10b981; }
.metric-card.blue { border-left-color: #3b82f6; }
.metric-card.red { border-left-color: #ef4444; }
.metric-card.orange { border-left-color: #f97316; }
