* { box-sizing: border-box; }
body { font-family: "Segoe UI", Tahoma, Arial, sans-serif; margin: 0; background: #d4d0c8; color: #000; font-size: 13px; }

/* toolbar */
#toolbar { display: flex; align-items: center; gap: 6px; background: #1f2937; color: #fff; padding: 6px 10px; position: sticky; top: 0; z-index: 1000; }
#toolbar label { color: #cbd5e1; }
#toolbar input, #toolbar select { padding: 3px 6px; border: 1px solid #94a3b8; border-radius: 3px; }
.badge { padding: 2px 8px; border-radius: 9px; font-size: 12px; color: #fff; }
.badge.gray { background: #6b7280; } .badge.green { background: #16a34a; } .badge.red { background: #dc2626; }

/* tabovi */
#tabbar { display: flex; gap: 2px; padding: 6px 6px 0; background: #d4d0c8; flex-wrap: wrap; }
#tabbar button { border: 1px solid #808080; border-bottom: none; background: #ece9d8;
  padding: 5px 14px; border-radius: 5px 5px 0 0; cursor: pointer; font-size: 13px; }
#tabbar button.active { background: #fff; font-weight: 600; margin-bottom: -1px; }

/* forma = pozicioni kanvas */
#form { position: relative; background: #ece9d8; border: 1px solid #808080;
  margin: 0 6px 6px; overflow: auto; }
.ctl { position: absolute; font-size: 13px; }
.ctl.lbl { display: flex; align-items: center; }
.ctl.btn { background: #ece9d8; border: 1px solid #707070; border-radius: 3px; cursor: pointer;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #a0a0a0; padding: 0 4px; line-height: 1; }
.ctl.btn:hover { background: #f5f3ea; }
.ctl.btn:active { box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #a0a0a0; }
.ctl.edit { border: 1px solid #7f9db9; background: #fff; padding: 0 4px; }
.ctl.memo { border: 1px solid #7f9db9; background: #fff; padding: 2px; resize: none; font-size: 12px; }
.ctl.list { border: 1px solid #7f9db9; background: #fff; overflow: auto; font-size: 12px; }
.ctl.list div { padding: 0 3px; white-space: nowrap; }
.ctl.check { display: flex; align-items: center; gap: 4px; }
.ctl.group { border: 1px solid #a0a0a0; border-radius: 3px; }
.ctl.group > span { position: absolute; top: -9px; left: 8px; background: #ece9d8; padding: 0 4px; font-weight: 600; }
.ctl.grid { border: 1px solid #828790; background: #fff; }
.ctl.grid .gh { background: #ece9d8; border-bottom: 1px solid #a0a0a0; padding: 2px 4px; font-weight: 600; color: #555; }
.ctl.nav { border: 1px solid #a0a0a0; background: #ece9d8; display: flex; align-items: center; padding: 0 3px; gap: 2px; color: #555; }
.ctl.img { border: 1px dashed #a0a0a0; background: #f6f6f0; color: #999; display: flex; align-items: center; justify-content: center; font-size: 11px; }

/* ugnjezdeni pagecontrol */
.subtab { position: absolute; }
.subbar { display: flex; gap: 2px; }
.subbar button { border: 1px solid #808080; border-bottom: none; background: #ece9d8;
  padding: 3px 10px; border-radius: 4px 4px 0 0; cursor: pointer; }
.subbar button.active { background: #fff; font-weight: 600; }
.subcanvas { position: relative; background: #fff; border: 1px solid #808080; }

#log { background: #0b1020; color: #5eead4; padding: 10px; margin: 6px;
  height: 180px; overflow: auto; font: 12px/1.5 Consolas, monospace; white-space: pre-wrap; }
.hidden { display: none; }
