/* Aydınlık ve erişilebilir tema. Kontrast varyantı themes.js ile gelir. */
:root{
  --bg:#ffffff;
  --fg:#1b1f23;
  --muted:#6a6f76;
  --accent:#1565c0;
  --ok:#0b7a0b;
  --bad:#b00020;
  --border:#e5e7eb;
  --kpi:#111827;
  --badge:#111827;
  --cell-size:44px;
  --radius:12px;
  --shadow:0 1px 2px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.06);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
  background:var(--bg);
  color:var(--fg);
}

.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 12px; background:#fff; border-bottom:1px solid var(--border);
  box-shadow: var(--shadow);
}
.brand{display:flex; align-items:center; gap:8px}
.brand .logo{width:28px; height:28px; display:grid; place-items:center; background:var(--accent); color:#fff; border-radius:8px; font-weight:700}
.actions{display:flex; flex-wrap:wrap; gap:8px; align-items:center}
.divider{width:1px; height:28px; background:var(--border)}

.btn{
  padding:8px 12px; border:1px solid var(--border); border-radius:10px; background:#fff; cursor:pointer;
}
.btn[aria-pressed="true"]{background:var(--accent); color:#fff; border-color:var(--accent)}

.shell{padding:16px; max-width:1200px; margin:0 auto}

.kpis{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:12px 0 16px}
.kpi{background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:12px; box-shadow:var(--shadow)}
.kpi-label{font-size:12px; color:var(--muted)}
.kpi-value{font-size:24px; font-weight:700; color:var(--kpi)}

.grid-container{overflow:auto; border:1px solid var(--border); border-radius:var(--radius); background:#fff}
.table{width:max-content}
.row{display:grid; grid-auto-flow:column; grid-auto-columns: var(--cell-size); border-bottom:1px solid var(--border)}
.row.header{position:sticky; top:0; z-index:1; background:#fafafa; font-weight:600}
.cell{display:flex; align-items:center; justify-content:center; min-width:var(--cell-size); height:var(--cell-size); border-right:1px solid var(--border)}
.cell.sticky{position:sticky; left:0; z-index:2; background:#fff; font-weight:600; width:220px; min-width:220px; justify-content:flex-start; padding:0 10px}
.cell.task-actions{gap:6px; justify-content:flex-start}
.badge{display:inline-flex; align-items:center; gap:6px; border:1px solid var(--border); padding:4px 8px; border-radius:999px; font-size:12px; color:var(--badge);}

.toggle{width:28px; height:28px; display:grid; place-items:center; border:1px solid var(--border); border-radius:8px; cursor:pointer}
.toggle.ok{background:#e8f5e9; color:var(--ok); border-color:#c8e6c9}
.toggle.bad{background:#ffebee; color:var(--bad); border-color:#ffcdd2}

.modal{position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,.3)}
.modal.open{display:flex}
.modal-card{width:min(520px,96vw); background:#fff; border-radius:16px; padding:16px; box-shadow:var(--shadow)}
.modal-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:8px}
.modal-body{display:grid; gap:12px}
.input, .select{padding:8px 10px; border:1px solid var(--border); border-radius:10px; width:100%}
.grid-two{display:grid; grid-template-columns:1fr 1fr; gap:10px}

.toast{background:#111827; color:#fff; padding:10px 12px; border-radius:10px; margin-top:8px; box-shadow:var(--shadow)}

.switch{display:inline-flex; gap:6px; align-items:center}

@media (max-width: 768px){
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cell.sticky{width:160px; min-width:160px}
}
@media (max-width: 420px){
  .actions{gap:6px}
  .btn{padding:6px 8px}
  .kpi-value{font-size:20px}
}
