:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #334155;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --border: #475569;
  --q1: #10b981;
  --q2: #f59e0b;
  --q3: #6366f1;
  --q4: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; padding: 1.5rem; }
#app-container { max-width: 1300px; margin: 0 auto; }

.app-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.badge { background: var(--accent); color: var(--bg-primary); font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 4px; }
.nav-tabs { display: flex; gap: 0.5rem; }
.tab-btn { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-muted); padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; font-weight: 600; }
.tab-btn.active { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); }

/* 2x2 Matrix */
.matrix-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1rem; min-height: 550px; }
.matrix-quadrant { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; }
.matrix-quadrant h3 { font-size: 0.95rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; }
.q1 { border-top: 4px solid var(--q1); }
.q2 { border-top: 4px solid var(--q2); }
.q3 { border-top: 4px solid var(--q3); }
.q4 { border-top: 4px solid var(--q4); }

.task-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 0.75rem; margin-bottom: 0.5rem; }
.task-header { display: flex; justify-content: space-between; font-weight: 600; font-size: 0.9rem; }
.task-meta { display: flex; gap: 0.5rem; font-size: 0.75rem; color: var(--text-muted); margin: 0.4rem 0; }
.rank-badge { background: var(--bg-primary); padding: 0.1rem 0.4rem; border-radius: 4px; font-weight: bold; color: var(--accent); }
.blocked-badge { background: var(--q4); color: white; padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.7rem; font-weight: bold; }

/* Forms & Inputs */
.panel { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; margin-bottom: 1.5rem; }
label { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; font-size: 0.85rem; font-weight: 600; }
input, select, textarea { background: var(--bg-primary); border: 1px solid var(--border); color: var(--text-primary); padding: 0.6rem; border-radius: 4px; font-size: 0.9rem; }
button { cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--bg-primary); border: none; padding: 0.6rem 1.2rem; border-radius: 4px; font-weight: 700; }
.btn-primary:hover { background: var(--accent-hover); }

/* Modals */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal.hidden { display: none; }
.modal-card { background: var(--bg-secondary); border: 1px solid var(--border); padding: 2rem; border-radius: 8px; width: 100%; max-width: 500px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }