:root {
    --blue: #1e3a8a;
    --blue-2: #2563eb;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --green: #10b981;
    --orange: #f59e0b;
    --red: #ef4444;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.login-card { background: #fff; border-radius: var(--radius); padding: 40px; width: 100%; max-width: 380px; box-shadow: var(--shadow); text-align: center; }
.login-logo { font-size: 48px; }
.login-card h1 { font-size: 22px; margin: 8px 0 4px; color: var(--blue); }
.login-sub { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.login-card form { text-align: left; }
.login-card label { font-size: 13px; font-weight: 600; color: var(--text); display: block; margin: 12px 0 4px; }
.login-card input { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
.login-card input:focus { outline: 2px solid var(--blue-2); border-color: transparent; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--blue); color: #fff; display: flex; flex-direction: column; padding: 20px 12px; position: sticky; top: 0; height: 100vh; }
.brand { font-weight: 700; font-size: 18px; padding: 0 12px 20px; }
.sidebar nav { flex: 1; }
.sidebar nav a { display: block; padding: 10px 12px; border-radius: 8px; color: #cbd5e1; text-decoration: none; font-size: 14px; margin-bottom: 2px; }
.sidebar nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar nav a.active { background: var(--blue-2); color: #fff; font-weight: 600; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.15); padding-top: 12px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.logout { color: #fca5a5; text-decoration: none; font-size: 13px; }

.content { flex: 1; padding: 24px 32px; max-width: 1200px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.topbar h1 { font-size: 24px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.badge { background: #e2e8f0; padding: 4px 10px; border-radius: 20px; font-size: 12px; color: var(--muted); }
.avatar { background: var(--blue-2); color: #fff; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border-left: 4px solid var(--muted); }
.kpi-blue { border-left-color: var(--blue-2); }
.kpi-green { border-left-color: var(--green); }
.kpi-orange { border-left-color: var(--orange); }
.kpi-label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.kpi-value { font-size: 28px; font-weight: 700; }

/* Cards / grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h2 { font-size: 16px; margin-bottom: 14px; }
.muted { color: var(--muted); font-size: 13px; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 8px; border-bottom: 2px solid #e2e8f0; }
td { padding: 10px 8px; border-bottom: 1px solid #f1f5f9; }
tr:hover td { background: #f8fafc; }

/* Status / priority */
.status { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: capitalize; }
.status-ativo { background: #d1fae5; color: #065f46; }
.status-pausado { background: #fef3c7; color: #92400e; }
.status-concluido { background: #dbeafe; color: #1e40af; }
.status-arquivado { background: #e2e8f0; color: #475569; }
.priority { padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.priority-P0 { background: #fee2e2; color: #991b1b; }
.priority-P1 { background: #ffedd5; color: #9a3412; }
.priority-P2 { background: #fef9c3; color: #854d0e; }
.priority-P3 { background: #e2e8f0; color: #475569; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
input, select, textarea { width: 100%; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; margin-bottom: 6px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-2); border-color: transparent; }
.btn { background: var(--blue-2); color: #fff; border: 0; padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--blue); }
.btn-block { width: 100%; margin-top: 14px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.inline-form input, .inline-form select { width: auto; margin: 0; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* Activity */
.activity { list-style: none; }
.activity li { padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.activity-name { font-weight: 600; }
.task-list { list-style: none; }
.task-list li { padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
