body{
  margin:0;
  font-family: Arial, sans-serif;
  font-weight: normal;
}

.toolbar{
  position: sticky;
  top: 0;
  z-index: 20;

  display:flex;
  gap:8px;
  align-items:center;
  padding:8px;
  border-bottom:1px solid #bbb;
  background:#fff;

  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.toolbar{
  flex-wrap: wrap;
}

.toolbar button{
  flex: 0 0 auto;
}
html, body{
  overflow-x: hidden;
}


.cal-wrap{
  height: calc(100vh - 42px);
  overflow: auto;
  background:#f7f7f7;
}

.cal-inner{
  position: relative;     /* viktig: now-line posisjoneres mot dette */
  width: max-content;     /* folger tabellbredden */
}

.cal{
  border-collapse: collapse;
  width: max-content;
  background:#fff;
}

/* Standard celler */
.cal th, .cal td{
  border-bottom: 1px solid #666;   /* kun horisontale linjer */
  border-right: none;
  border-left: none;
  border-top: none;

  min-width: 40px;                 /* bredde per 30-min */
  height: 22px;                    /* ca 8/10 av 28px */
  padding: 0 6px;
  font-size: 11px;
  white-space: nowrap;

  font-weight: normal;             /* tving ikke-bold */
}

/* Romkolonne */
.room{
  position: sticky;
  left: 0;
  z-index: 4;

  background: transparent;         /* du ba om transparent */
  text-align: left;

  min-width: 110px;
  border-right: 2px solid #000;    /* skille rom/kalender */

  vertical-align: top;
  padding: 4px 6px 0 0;            /* ingen venstre-padding */
}

/* Dag-rad: vanlig rad + tider */
.day-row th.day-left,
.day-row td.day-time{
  background: #222;
  color: #fff;
  height: 22px;
  font-weight: normal;
}

.day-left{
  position: sticky;
  left: 0;
  z-index: 5;
  border-right: 2px solid #000;
  text-align: left;
  padding-left: 0;                 /* helt til venstre */
}

/* Kolonnestreker kun i dag-raden */
.day-time{
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.18);
  padding: 0 4px;
}

.day-row td.day-time:last-child{
  border-right: none;
}

/* Booking */
.busy{
  background:#cfe6ff;
  padding: 0;
  border: 1px solid #000;          /* svart innramming */
  vertical-align: bottom;
  font-weight: normal;
}

.busy .busy-inner{
  display:flex;
  align-items:flex-end;
  height:100%;
  padding: 0 6px 0px 6px;
}

.busy .busy-label{
  position: sticky;
  left: 0;
  display: inline-block;
  background: transparent;
  font-weight: normal;
}

/* Rod "na"-strek */
.now-line{
  position:absolute;
  width: 2px;
  background: #b00000;
  pointer-events: none;
  z-index: 10;
  top: 0;
  height: 100px; /* bare fallback */
}
