:root{
  --bg:#090a0f;
  --card:rgba(255,255,255,.05);
  --line:#262d45;
  --text:#eef1fb;
  --muted:#9aa3bb;
  --accent:#6ea8fe;
  --danger:#ff6b6b;
  --ok:#2dd4bf;
  --r:16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 50% 0%, rgba(110,168,254,.16), transparent 60%),
    radial-gradient(900px 500px at 0% 40%, rgba(45,212,191,.12), transparent 55%),
    var(--bg);
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.page{
  width:100%;
  min-height:100%;
  display:block;
  padding:24px;        /* beetje padding rondom */
}

.shell{
  width:100%;
  max-width:none;      /* geen max breedte meer */
  margin:0;
}


/* Header */
.top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;        /* voorkomt overlap op small screens */
  margin-bottom:16px;
}

h1{
  margin:0;
  font-size:22px;
  letter-spacing:.2px;
}

.sub{
  color:var(--muted);
  font-size:12px;
  margin-top:4px;
}

.topRight{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

/* Cards */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  min-width:0;           /* belangrijk voor grid overflow */
}

.card.inner{
  padding:14px;
}

/* Generic */
.hidden{ display:none !important; }
.muted{ color:var(--muted); font-size:12px; margin:6px 0 10px; }
.hr{ height:1px; background:var(--line); margin:14px 0; }

label{ font-size:12px; color:var(--muted); }

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:8px 0;
  min-width:0;
}

input, select, textarea{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.22);
  color:var(--text);
  outline:none;
  font-size:14px;
  min-width:0;
}

textarea{
  min-height:70px;
  resize:vertical;
}

/* Buttons / pills */
.btn{
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color:var(--text);
  padding:9px 12px;
  border-radius:14px;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}

.btn.primary{
  border-color: rgba(110,168,254,.35);
  background: rgba(110,168,254,.16);
}

.btn.danger{
  border-color: rgba(255,107,107,.35);
  background: rgba(255,107,107,.14);
}

.btn.ghost{
  background:transparent;
}

.pill{
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  padding:7px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
  white-space:nowrap;
}

/* Layout grids */
.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
  align-items:start;
}

@media (max-width:720px){
  .grid2{ grid-template-columns:1fr; }
}

.layout{
  display:grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(0, 2fr);
  gap:14px;
  align-items:start;
}

@media (max-width:980px){
  .layout{ grid-template-columns:1fr; }
}

/* Rows */
.row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:8px;
}

.grow{ flex:1; min-width:240px; }

/* Week bar */
.weekbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
  margin-bottom:12px;
}

/* Days grid */
.days{
  display:grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap:10px;
  align-items:start;
}

@media (max-width:1100px){
  .days{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width:720px){
  .days{ grid-template-columns: 1fr; }
}

/* Day card */
.day{
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  border-radius:16px;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:160px;
  min-width:0;
}

.dayHead{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}

.dow{ font-weight:900; font-size:13px; }
.date{ color:var(--muted); font-size:12px; margin-top:2px; }

.total{
  border:1px solid var(--line);
  border-radius:999px;
  padding:6px 10px;
  font-weight:900;
  font-size:12px;
  background: rgba(45,212,191,.10);
  white-space:nowrap;
}

/* Entry item */
.item{
  border:1px solid var(--line);
  background: rgba(0,0,0,.20);
  border-radius:14px;
  padding:9px 10px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}

.tag{
  display:inline-flex;
  gap:6px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:999px;
  padding:3px 8px;
  font-size:11px;
  font-weight:900;
  background: rgba(110,168,254,.12);
  width:fit-content;
}

.tag.taak{ background: rgba(255,255,255,.06); }
.tag.study{ background: rgba(110,168,254,.12); }
.tag.lecture{ background: rgba(45,212,191,.10); }

.hours{
  font-weight:950;
  font-size:12px;
  border:1px solid var(--line);
  border-radius:999px;
  padding:4px 8px;
  background: rgba(255,255,255,.05);
  white-space:nowrap;
}

.note{
  color:var(--muted);
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:260px;
}

/* Subjects list */
.list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}

.listRow{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(0,0,0,.20);
  padding:9px 10px;
  min-width:0;
}

.listRow b{
  font-size:13px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* KPIs */
.kpis{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.kpi{
  flex:1;
  min-width:160px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.20);
  border-radius:16px;
  padding:10px 12px;
}

.kpiVal{
  font-size:20px;
  font-weight:950;
  margin-top:6px;
}

.err{
  color: var(--danger);
  font-size:12px;
  font-weight:800;
}
